diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..d09a50ca3 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "svg.preview.background": "transparent" +} \ No newline at end of file diff --git a/DRAFT_CHANGELOG.md b/DRAFT_CHANGELOG.md index ec0f848a9..2ab8b5433 100644 --- a/DRAFT_CHANGELOG.md +++ b/DRAFT_CHANGELOG.md @@ -9,11 +9,28 @@ ## Summary +- Ajout du widget *Export* +- Import des couches de calculs (itineraire, isochrone et profil altimétrique) + ## Changelog * [Added] - - Widget d'export des tracés et calculs des contrôles d'itineraire, d'isochrone et de profil altimétrique. + - Widget d'export des tracés et des calculs au format GPX, KML et GeoJSON sur les contôles d'itineraire, d'isochrone et de profil altimétrique (#363) : + + ``` js + // exemple + var route = new ol.control.Route(); + map.addControl(route); + var exportRoute = new ol.control.Export({ + control : route, + format : "GPX" + }); + map.addControl(exportRoute); + ``` + + - Import des couches de calculs (itineraire, isochrone et profil altimétrique) au format GPX, KML et GeoJSON (#363). + - Widget d'export des tracés et calculs des contrôles d'itineraire, d'isochrone et de profil altimétrique (#357). * [Changed] @@ -26,6 +43,7 @@ * [Fixed] + - Fix sur le format KML avec l'affichage des labels - Fix sur le profil altimétrique qui permet de construire le profil même si le panneau d'affichage est masqué (calcul en arrière plan). * [Security] diff --git a/build/scripts/release/geoportal-extensions-openlayers-3.2.21.tgz b/build/scripts/release/geoportal-extensions-openlayers-3.2.21.tgz index d9dbc7a48..9df9fdc50 100644 Binary files a/build/scripts/release/geoportal-extensions-openlayers-3.2.21.tgz and b/build/scripts/release/geoportal-extensions-openlayers-3.2.21.tgz differ diff --git a/build/scripts/release/package-openlayers.json b/build/scripts/release/package-openlayers.json index d3bf5d0c8..f47ebe2e9 100644 --- a/build/scripts/release/package-openlayers.json +++ b/build/scripts/release/package-openlayers.json @@ -1,17 +1,6 @@ { - "bugs" : {}, - "repository" : { - "url" : "https://github.com/IGNF/geoportal-extensions.git", - "type" : "git" - }, - "types" : "src/OpenLayers/index.d.ts", - "date" : "23/03/2023", - "keywords" : [ - "geoportail", - "plugin", - "javascript", - "OpenLayers" - ], + "peerDependencies" : {}, + "scripts" : {}, "files" : [ "dist/", "src/", @@ -19,23 +8,34 @@ "README.md", "package.json" ], - "scripts" : {}, - "version" : "3.2.21", - "peerDependencies" : {}, - "module" : "src/OpenLayers/index.js", - "devDependencies" : {}, + "date" : "23/03/2023", "license" : "CECILL-B", - "directories" : {}, "dependencies" : { - "sortablejs" : "1.14.0", - "proj4" : "2.7.5", - "eventbusjs" : "0.2.0", - "loglevel" : "1.6.6", + "ol" : "6.9.0", "geoportal-access-lib" : "3.2.1", "@mapbox/mapbox-gl-style-spec" : "13.20.1", - "ol" : "6.9.0", - "node-fetch" : "^2.6.1", - "xmldom" : "^0.1.27" + "xmldom" : "^0.1.27", + "loglevel" : "1.6.6", + "proj4" : "2.7.5", + "eventbusjs" : "0.2.0", + "sortablejs" : "1.14.0", + "node-fetch" : "^2.6.1" }, - "name" : "geoportal-extensions-openlayers" + "directories" : {}, + "repository" : { + "url" : "https://github.com/IGNF/geoportal-extensions.git", + "type" : "git" + }, + "name" : "geoportal-extensions-openlayers", + "bugs" : {}, + "version" : "3.2.21", + "types" : "src/OpenLayers/index.d.ts", + "module" : "src/OpenLayers/index.js", + "devDependencies" : {}, + "keywords" : [ + "geoportail", + "plugin", + "javascript", + "OpenLayers" + ] } diff --git a/resources/.gitignore b/resources/.gitignore new file mode 100644 index 000000000..5b19aa70f --- /dev/null +++ b/resources/.gitignore @@ -0,0 +1,2 @@ +base64.txt +png32/*.png \ No newline at end of file diff --git a/resources/README.md b/resources/README.md new file mode 100644 index 000000000..a7d2b2ca1 --- /dev/null +++ b/resources/README.md @@ -0,0 +1,48 @@ +# Ressources + +Les icones de l'outil de dessins se composent ainsi : + +```sh +. +├── api +│ ├── base64.txt +│ ├── icon_[1-24].png +│ ├── png32/ +│ └── script.sh +├── portail +│ ├── base64.txt +│ ├── icon_[1-24].png +│ ├── png32/ +│ └── script.sh +``` + +Le répertoire *api/* contient les icones originaux utilisés par les APIs au format PNG : + +```sh +image size : [51, 38] +scale : 32 / Math.min(size[0], size[1]) = 0.8421052631578947 +``` + +On les transforme dans un ratio correct pour le rendu graphique sur *OpenLayers* avec le script : `./script.sh` + +Le résultat du traitement est disponible dans le répertoire *api/png32/* et dans le fichier *base64.txt* pour obtenir les URI des PNG : + +```sh +image size : [43, 32] +scale : 32 / Math.min(size[0], size[1]) = 1 +``` + +et + +```json +[ + { + src : "data:image/png;base64,...", + anchor : [0.5, 1] + } + (...) +] +``` + +**NOTE :** +> On procéde aussi pour les icones du Portail ! diff --git a/resources/api/icon_1.png b/resources/api/icon_1.png new file mode 100644 index 000000000..6f96e66e9 Binary files /dev/null and b/resources/api/icon_1.png differ diff --git a/resources/api/icon_10.png b/resources/api/icon_10.png new file mode 100644 index 000000000..d70768456 Binary files /dev/null and b/resources/api/icon_10.png differ diff --git a/resources/api/icon_11.png b/resources/api/icon_11.png new file mode 100644 index 000000000..7d901f292 Binary files /dev/null and b/resources/api/icon_11.png differ diff --git a/resources/api/icon_12.png b/resources/api/icon_12.png new file mode 100644 index 000000000..8587a9e48 Binary files /dev/null and b/resources/api/icon_12.png differ diff --git a/resources/api/icon_13.png b/resources/api/icon_13.png new file mode 100644 index 000000000..6436a1911 Binary files /dev/null and b/resources/api/icon_13.png differ diff --git a/resources/api/icon_14.png b/resources/api/icon_14.png new file mode 100644 index 000000000..27108a502 Binary files /dev/null and b/resources/api/icon_14.png differ diff --git a/resources/api/icon_15.png b/resources/api/icon_15.png new file mode 100644 index 000000000..c5ece225b Binary files /dev/null and b/resources/api/icon_15.png differ diff --git a/resources/api/icon_16.png b/resources/api/icon_16.png new file mode 100644 index 000000000..b37109ffb Binary files /dev/null and b/resources/api/icon_16.png differ diff --git a/resources/api/icon_17.png b/resources/api/icon_17.png new file mode 100644 index 000000000..ca22ff1dc Binary files /dev/null and b/resources/api/icon_17.png differ diff --git a/resources/api/icon_18.png b/resources/api/icon_18.png new file mode 100644 index 000000000..20a75a534 Binary files /dev/null and b/resources/api/icon_18.png differ diff --git a/resources/api/icon_19.png b/resources/api/icon_19.png new file mode 100644 index 000000000..958148f75 Binary files /dev/null and b/resources/api/icon_19.png differ diff --git a/resources/api/icon_2.png b/resources/api/icon_2.png new file mode 100644 index 000000000..830c76e84 Binary files /dev/null and b/resources/api/icon_2.png differ diff --git a/resources/api/icon_20.png b/resources/api/icon_20.png new file mode 100644 index 000000000..7c8e23304 Binary files /dev/null and b/resources/api/icon_20.png differ diff --git a/resources/api/icon_21.png b/resources/api/icon_21.png new file mode 100644 index 000000000..bfe638b7d Binary files /dev/null and b/resources/api/icon_21.png differ diff --git a/resources/api/icon_22.png b/resources/api/icon_22.png new file mode 100644 index 000000000..aeae5f74a Binary files /dev/null and b/resources/api/icon_22.png differ diff --git a/resources/api/icon_23.png b/resources/api/icon_23.png new file mode 100644 index 000000000..ad45b454e Binary files /dev/null and b/resources/api/icon_23.png differ diff --git a/resources/api/icon_24.png b/resources/api/icon_24.png new file mode 100644 index 000000000..8b4487a59 Binary files /dev/null and b/resources/api/icon_24.png differ diff --git a/resources/api/icon_3.png b/resources/api/icon_3.png new file mode 100644 index 000000000..3c209a804 Binary files /dev/null and b/resources/api/icon_3.png differ diff --git a/resources/api/icon_4.png b/resources/api/icon_4.png new file mode 100644 index 000000000..19708d348 Binary files /dev/null and b/resources/api/icon_4.png differ diff --git a/resources/api/icon_5.png b/resources/api/icon_5.png new file mode 100644 index 000000000..9a6b04c82 Binary files /dev/null and b/resources/api/icon_5.png differ diff --git a/resources/api/icon_6.png b/resources/api/icon_6.png new file mode 100644 index 000000000..1cfb5f81d Binary files /dev/null and b/resources/api/icon_6.png differ diff --git a/resources/api/icon_7.png b/resources/api/icon_7.png new file mode 100644 index 000000000..d71f88510 Binary files /dev/null and b/resources/api/icon_7.png differ diff --git a/resources/api/icon_8.png b/resources/api/icon_8.png new file mode 100644 index 000000000..4e36bc6b5 Binary files /dev/null and b/resources/api/icon_8.png differ diff --git a/resources/api/icon_9.png b/resources/api/icon_9.png new file mode 100644 index 000000000..f2af3f8bc Binary files /dev/null and b/resources/api/icon_9.png differ diff --git a/resources/api/png32/.gitkeep b/resources/api/png32/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/resources/api/script.sh b/resources/api/script.sh new file mode 100755 index 000000000..83d05dc90 --- /dev/null +++ b/resources/api/script.sh @@ -0,0 +1,9 @@ +for file in $(ls -v *.png) +do + convert "$file" -resize 43x32! png32/"$file" + echo "{" >> base64.txt + echo -n " src : \"data:image/png;base64,$(cat png32/"$file" | base64 | tr -d '\r\n')\"," >> base64.txt + echo "" >> base64.txt + echo " anchor : [0.5, 1]" >> base64.txt + echo "}," >> base64.txt +done diff --git a/resources/portail/icon_1.png b/resources/portail/icon_1.png new file mode 100644 index 000000000..40c63640a Binary files /dev/null and b/resources/portail/icon_1.png differ diff --git a/resources/portail/icon_10.png b/resources/portail/icon_10.png new file mode 100644 index 000000000..d4255bef3 Binary files /dev/null and b/resources/portail/icon_10.png differ diff --git a/resources/portail/icon_11.png b/resources/portail/icon_11.png new file mode 100644 index 000000000..3fed98df6 Binary files /dev/null and b/resources/portail/icon_11.png differ diff --git a/resources/portail/icon_12.png b/resources/portail/icon_12.png new file mode 100644 index 000000000..b02ed56e7 Binary files /dev/null and b/resources/portail/icon_12.png differ diff --git a/resources/portail/icon_13.png b/resources/portail/icon_13.png new file mode 100644 index 000000000..5455529ff Binary files /dev/null and b/resources/portail/icon_13.png differ diff --git a/resources/portail/icon_14.png b/resources/portail/icon_14.png new file mode 100644 index 000000000..f7786a279 Binary files /dev/null and b/resources/portail/icon_14.png differ diff --git a/resources/portail/icon_15.png b/resources/portail/icon_15.png new file mode 100644 index 000000000..76b35c215 Binary files /dev/null and b/resources/portail/icon_15.png differ diff --git a/resources/portail/icon_16.png b/resources/portail/icon_16.png new file mode 100644 index 000000000..cf03e7261 Binary files /dev/null and b/resources/portail/icon_16.png differ diff --git a/resources/portail/icon_17.png b/resources/portail/icon_17.png new file mode 100644 index 000000000..83fc2bd08 Binary files /dev/null and b/resources/portail/icon_17.png differ diff --git a/resources/portail/icon_18.png b/resources/portail/icon_18.png new file mode 100644 index 000000000..f1bd37ba6 Binary files /dev/null and b/resources/portail/icon_18.png differ diff --git a/resources/portail/icon_19.png b/resources/portail/icon_19.png new file mode 100644 index 000000000..15df30b4a Binary files /dev/null and b/resources/portail/icon_19.png differ diff --git a/resources/portail/icon_2.png b/resources/portail/icon_2.png new file mode 100644 index 000000000..0e0786a48 Binary files /dev/null and b/resources/portail/icon_2.png differ diff --git a/resources/portail/icon_20.png b/resources/portail/icon_20.png new file mode 100644 index 000000000..6923d1970 Binary files /dev/null and b/resources/portail/icon_20.png differ diff --git a/resources/portail/icon_21.png b/resources/portail/icon_21.png new file mode 100644 index 000000000..3804dbbfb Binary files /dev/null and b/resources/portail/icon_21.png differ diff --git a/resources/portail/icon_22.png b/resources/portail/icon_22.png new file mode 100644 index 000000000..f237c3435 Binary files /dev/null and b/resources/portail/icon_22.png differ diff --git a/resources/portail/icon_23.png b/resources/portail/icon_23.png new file mode 100644 index 000000000..951db15a0 Binary files /dev/null and b/resources/portail/icon_23.png differ diff --git a/resources/portail/icon_24.png b/resources/portail/icon_24.png new file mode 100644 index 000000000..c11fb6da3 Binary files /dev/null and b/resources/portail/icon_24.png differ diff --git a/resources/portail/icon_3.png b/resources/portail/icon_3.png new file mode 100644 index 000000000..75c60f2c5 Binary files /dev/null and b/resources/portail/icon_3.png differ diff --git a/resources/portail/icon_4.png b/resources/portail/icon_4.png new file mode 100644 index 000000000..ef9f7e8ff Binary files /dev/null and b/resources/portail/icon_4.png differ diff --git a/resources/portail/icon_5.png b/resources/portail/icon_5.png new file mode 100644 index 000000000..9da7dc1c0 Binary files /dev/null and b/resources/portail/icon_5.png differ diff --git a/resources/portail/icon_6.png b/resources/portail/icon_6.png new file mode 100644 index 000000000..2ee63ca82 Binary files /dev/null and b/resources/portail/icon_6.png differ diff --git a/resources/portail/icon_7.png b/resources/portail/icon_7.png new file mode 100644 index 000000000..cadf03183 Binary files /dev/null and b/resources/portail/icon_7.png differ diff --git a/resources/portail/icon_8.png b/resources/portail/icon_8.png new file mode 100644 index 000000000..6d235a440 Binary files /dev/null and b/resources/portail/icon_8.png differ diff --git a/resources/portail/icon_9.png b/resources/portail/icon_9.png new file mode 100644 index 000000000..111b1e41f Binary files /dev/null and b/resources/portail/icon_9.png differ diff --git a/resources/portail/png32/.gitkeep b/resources/portail/png32/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/resources/portail/script.sh b/resources/portail/script.sh new file mode 100755 index 000000000..f03dec33e --- /dev/null +++ b/resources/portail/script.sh @@ -0,0 +1,9 @@ +for file in $(ls -v *.png) +do + convert "$file" -resize 32x41! png32/"$file" + echo "{" >> base64.txt + echo -n " src : \"data:image/png;base64,$(cat png32/"$file" | base64 | tr -d '\r\n')\"," >> base64.txt + echo "" >> base64.txt + echo " anchor : [0.5, 1]" >> base64.txt + echo "}," >> base64.txt +done diff --git a/samples-src/pages/openlayers/Drawing/pages-ol-drawing-bundle-addlayer-geojson.html b/samples-src/pages/openlayers/Drawing/pages-ol-drawing-bundle-addlayer-geojson.html new file mode 100644 index 000000000..364695bb1 --- /dev/null +++ b/samples-src/pages/openlayers/Drawing/pages-ol-drawing-bundle-addlayer-geojson.html @@ -0,0 +1,177 @@ +{{#extend "ol-sample-bundle-layout"}} + +{{#content "head"}} + Sample OpenLayers Drawing + + +{{/content}} + +{{#content "style"}} + +{{/content}} + +{{#content "body"}} +

Association d'une couche avec l'outil de dessin

+

(Choix du format d'export)

+ +
+
+ + + +{{/content}} + +{{#content "js"}} + +{{/content}} + +{{/extend}} diff --git a/samples-src/pages/openlayers/Drawing/pages-ol-drawing-bundle-addlayer.html b/samples-src/pages/openlayers/Drawing/pages-ol-drawing-bundle-addlayer-gpx.html similarity index 54% rename from samples-src/pages/openlayers/Drawing/pages-ol-drawing-bundle-addlayer.html rename to samples-src/pages/openlayers/Drawing/pages-ol-drawing-bundle-addlayer-gpx.html index bbfbff7cf..054dfdb78 100644 --- a/samples-src/pages/openlayers/Drawing/pages-ol-drawing-bundle-addlayer.html +++ b/samples-src/pages/openlayers/Drawing/pages-ol-drawing-bundle-addlayer-gpx.html @@ -2,6 +2,8 @@ {{#content "head"}} Sample OpenLayers Drawing + + {{/content}} {{#content "style"}} @@ -13,19 +15,29 @@ background-position:center center; background-repeat:no-repeat; } + div[id^=GPdrawing-] { + top: 190px; + left: 9px; + } + div[id^=GPdrawingPanel-] { + top: 0px; + left: 0px; + position: absolute; + } {{/content}} {{#content "body"}} -

Ajout des outils de dessin

+

Association d'une couche avec l'outil de dessin

+

(Choix du format d'export)

- +
{{/content}} @@ -35,17 +47,20 @@

Ajout des outils de dessin

var m_map; var m_vector; var m_drawing; + var m_layerImport; + var m_layerSwitcher; + var m_exportDrawing; var m_url; window.onload = function() { // on cache l'image de chargement du Géoportail. document.getElementById('map').style.backgroundImage = 'none'; - m_url = location.href.substring(0, location.href.lastIndexOf('/')) + "/../../resources/data/geojson/map.geojson"; + m_url = location.href.substring(0, location.href.lastIndexOf('/')) + "/../../resources/data/gpx/Campomoro-Tizzano-Sartene_3029.gpx"; m_vector = new ol.layer.Vector({ source : new ol.source.Vector({ url : m_url, - format : new ol.format.GeoJSONExtended({ + format : new ol.format.GPXExtended({ defaultStyle : new ol.style.Style({ fill: new ol.style.Fill({ color: [250,250,0,1] @@ -54,12 +69,20 @@

Ajout des outils de dessin

color: [0,0,255,1], width: 5 }), + text: new ol.style.Text({ + font : "16px sans", + textAlign : "left", + stroke : new ol.style.Stroke({ + color: [250,250,250,1], + width: 5 + }), + fill: new ol.style.Fill({ + color: [0,0,0,1] + }) + }), image: new ol.style.Icon({ src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAsCAYAAAAATWqyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABZ9JREFUeNq8WGtMHFUUPrvLY4EC5VGeLVJeRR4GlJcUSWwqVqBGba1iYksFRfhhUqTSVJvUmCZVCWraBPGRUPWvpk1KrK2W1DREK0SsUquFoq1ACe/wKI+F9XzDHZgt7MwuLHzJyb1z5577fXPn3nPPjI7sgNls3sxFHls2WzzbfWwe4vYY279srWw/stXrdLoOchSYXMe2k+2S2X5cEr46LR6dhogkLmrYMhbaiNq7h+j67X7q7h+j4fFJqd3b3ZWC/TwodpMfRQavJ53lyD+xlfIMtdgthEUc4OJdNmdc9w6P0zeXb9DFlls0MDKh+nS+nkbalhRGz2RF0wZvd7l5mq2SxXxgkxAWYBCz8DKuJ6ZMdOpCK51ubCPTzKxdr9XJoKenMqNo32PxZHRxkps/FbMzY1WIeJefsBXj+p+eYTr6ZSN19o2uaJ2F+q+joy9mUnigt9z0GdsrLMZsTchBLt5D/feOPjpy6jKNTUw7ZNF7GJ3pnX1ZlLjZX256g4W8v0gIi0jjopHNcLN7mMprGxwmQimmuuRRigiWZgavJpPFXMGFXohA+TFEjE+a6O2vGh0uQgo0PCbGBge4wCm454Qw9rAlo1J3/g/q6h+l1QLGBodAsuCeezWs6hcuUu4MjFFh1bc0M2vWHBDbMjM+hDb6e0rX//WNUGNrl7TNtWDQ66iu4gkK8pWCchO/nlREzTgRlqnmbIsUK9Tg4mSgkrwHKD89kvR6y90/yw9w9ud2qq2/SlOmGdVxEGNK85Pky3i8mlwxK1KwUoOzk56OF2XTkw9HLRIhvWduwz30QV81gAucArl6cYBRW9cQDY1Oqjrvz0lQbj+rQB/0VQO4wCmQrRenKP3dOajquM7NmZ7eGm3zokRf+KhBwSm9mhBpNWtEzwejAqWQbU94h4/qDlrgDMHIRtTGJ9XjRpCPh91bVctHwWmcf0TFobQk7k6Z7Bai5aPkhJBhVLw4n1DDze4hu4Vo+Sg4hyGkHbWwAE9Vp2u3BqSgZSvQFz5qUHC2Q0gzagnh/vdmVffmKXTyzK/Kvb+ivuACp0AzhDRIqZ6HK23Z6KtK0Hyjh6q/blZNkHAPfdBXDeACp0ADVks91hWbW25aBOei6tN5rqlD2v97t8dR2pbg+Qg6bZqlK3910xffX7NpPYFLXtNSxi+mEhlTEZ6msOoc9QyO2bQOcO4E+szlpD2D45rni4xA3tZ1FTvkuPQ5H3rF8vY9jlnFjbKdSTYvSBDf7h2RzFYRADiECJPgnstHWFEbFydQz4wLoZyHwlctH8HY4BA4IbgtUkXMMb47opG5l3x0weEJEnKXmte2y4EM+UYSCxlXZmgkGl7AdKHj4YJ0u84WW84ejClEILYXyCIshAgxTVwckbdXYU68w4RgrOhQH/nyLeZqtshllvDB58RFKZHNjqWkyIAVi0iOCpDGEviBrWpRUrU44ukQrfayDSD6VT6XRp7uLssW4cW+lXvS5Kjdj7EFB2nNCMR0Iq6g7u/lRq/vSlm2kHL29eMxBIp47K6l+umtnwW601zUor41PpTyFiKhzchPj5B8BWp5zDPW+mpti3K266iUchDatMHTZhFhAV706kKW/ifbAbX+qkLE9ipAEHV1NtCbBRma2bmc7R9+Pp3gA1+xVe8uW4gQgyB3CPXIkPX00uOJmkKKdiRKfQUO8Ri/afnYGrE+ZDuPyu5HYiglJshqR9zblRUzf1gLX3KIEPEfA1u6F9cHn01V5hLzQBvuCaBvofIfiCNmBGKQ6eyXf01V7E61yOhQhwjck7/HhA85VIgQgyTqJOoZ9wdLn5cyUE+PDVaeqvW0muBT2sh2Ff8up6ZnzMXV30mGugDuGWktwEQJbBNg7bgzJJkA2hJoLcGEZUv84C2jtYb4I32MbVTYMVv+MFvD/wIMAMn6dBKfJSmUAAAAAElFTkSuQmCC", - anchor: [17,48], - anchorOrigin : "top-left", - anchorXUnits : "pixels", - anchorYUnits : "pixels" + anchor: [0.5, 1] }) }) }) @@ -76,20 +99,70 @@

Ajout des outils de dessin

m_vector ], view : new ol.View({ - center : [288074.8449901076, 6247982.515792289], - zoom : 12 + center : [985211.92, 5099709.08], + zoom : 10 }) }); + m_layerSwitcher = new ol.control.LayerSwitcher(); + m_map.addControl(m_layerSwitcher); + + m_layerImport = new ol.control.LayerImport(); + m_map.addControl(m_layerImport); + m_drawing = new ol.control.Drawing(); m_map.addControl(m_drawing); + m_drawing.setLayer(m_vector); + + m_exportDrawing = new ol.control.Export(); + m_exportDrawing.setTarget(document.getElementById("btnExport")); + m_exportDrawing.setControl(m_drawing); + m_exportDrawing.setFormat("gpx"); + m_exportDrawing.setName("exportFromGPX"); + m_map.addControl(m_exportDrawing); + + var popup = new ol.Overlay.Popup(); + m_map.addOverlay(popup); + + // cf. http://astuntechnology.github.io/osgis-openlayers-leaflet/openlayers/03-GEOJSON-INFO.html + m_map.on("click", function(evt) { + + popup.hide(); + popup.setOffset([0, 0]); + + // Attempt to find a feature in one of the visible vector layers + var feature = m_map.forEachFeatureAtPixel(evt.pixel, function(feature, layer) { + return feature; + }); + + if (feature) { + + var coord = evt.coordinate; + var props = feature.getProperties(); + var contents = ""; + var length = "30"; + for (var key in props) { + if (props.hasOwnProperty(key)) { + if (key === "geometry") { + continue; + } + var value = props[key]; + if (typeof value === "string") { + value = props[key].substring(0, length); + } + contents += key + " / " + value; + contents += "
"; + } + } + // Offset the popup so it points at the middle of the marker not the tip + popup.setOffset([0, -22]); + popup.show(coord, contents); - document.getElementById('btn-associate-layer').addEventListener("click", function() { - m_drawing.setLayer(m_vector); + } }); document.getElementById('formats-select').addEventListener("change", function(e) { - m_drawing.setExportFormat(e.target.value); + m_exportDrawing.setFormat(e.target.value); }); }; diff --git a/samples-src/pages/openlayers/Drawing/pages-ol-drawing-bundle-addlayer-kml.html b/samples-src/pages/openlayers/Drawing/pages-ol-drawing-bundle-addlayer-kml.html new file mode 100644 index 000000000..2b3127784 --- /dev/null +++ b/samples-src/pages/openlayers/Drawing/pages-ol-drawing-bundle-addlayer-kml.html @@ -0,0 +1,172 @@ +{{#extend "ol-sample-bundle-layout"}} + +{{#content "head"}} + Sample OpenLayers Drawing + + +{{/content}} + +{{#content "style"}} + +{{/content}} + +{{#content "body"}} +

Association d'une couche avec l'outil de dessin

+

(Choix du format d'export)

+ +
+
+ + +{{/content}} + +{{#content "js"}} + +{{/content}} + +{{/extend}} diff --git a/samples-src/pages/openlayers/Export/pages-ol-export-bundle-default.html b/samples-src/pages/openlayers/Export/pages-ol-export-bundle-default.html index d11fc7655..8f50caa64 100644 --- a/samples-src/pages/openlayers/Export/pages-ol-export-bundle-default.html +++ b/samples-src/pages/openlayers/Export/pages-ol-export-bundle-default.html @@ -10,6 +10,10 @@ width: 100%; height: 500px; } + div[id^=GPlayerSwitcher-] { + top: 80px; + right: 8px; + } {{/content}} @@ -24,13 +28,14 @@

Ajout du widget Export

{{#content "js"}} + document.getElementById("viewIti").addEventListener("click", function () { + var key = "geoportail:compute"; + var result = exportFormatRoute.readRootExtensions(key); + document.getElementById("viewer").textContent = JSON.stringify(result, null, 2); + }); + document.getElementById("viewIso").addEventListener("click", function () { + var key = "geoportail:compute"; + var result = exportFormatIso.readRootExtensions(key); + document.getElementById("viewer").textContent = JSON.stringify(result, null, 2); + }); + {{/content}} - +options {{/extend}} diff --git a/samples-src/pages/openlayers/Formats/pages-ol-gpxextended-bundle-default.html b/samples-src/pages/openlayers/Formats/pages-ol-gpxextended-bundle-default.html index 090ec93b9..88a23677b 100644 --- a/samples-src/pages/openlayers/Formats/pages-ol-gpxextended-bundle-default.html +++ b/samples-src/pages/openlayers/Formats/pages-ol-gpxextended-bundle-default.html @@ -12,6 +12,9 @@ width: 100%; height: 500px; } + #viewer { + width: 100%; + } {{/content}} @@ -21,44 +24,54 @@

Ajout d'une couche GPX

- + + trier + + +
+ +
{{/content}} {{#content "js"}} + document.getElementById("viewIti").addEventListener("click", function () { + var key = "geoportail:compute"; + var result = exportFormatRoute.readRootExtensions(key); + document.getElementById("viewer").textContent = JSON.stringify(result, null, 2); + }); + document.getElementById("viewIso").addEventListener("click", function () { + var key = "geoportail:compute"; + var result = exportFormatIso.readRootExtensions(key); + document.getElementById("viewer").textContent = JSON.stringify(result, null, 2); + }); + {{/content}} {{/extend}} diff --git a/samples-src/pages/openlayers/Formats/pages-ol-kmlextended-bundle-default.html b/samples-src/pages/openlayers/Formats/pages-ol-kmlextended-bundle-default.html index b75a06bbc..0dcdb33d9 100644 --- a/samples-src/pages/openlayers/Formats/pages-ol-kmlextended-bundle-default.html +++ b/samples-src/pages/openlayers/Formats/pages-ol-kmlextended-bundle-default.html @@ -12,6 +12,9 @@ width: 100%; height: 500px; } + #viewer { + width: 100%; + } {{/content}} @@ -21,40 +24,118 @@

Ajout d'une couche KML

- + + + +
+ +
{{/content}} {{#content "js"}} + document.getElementById("viewIti").addEventListener("click", function () { + var key = "geoportail:compute"; + var result = exportFormatRoute.readRootExtensions(key); + document.getElementById("viewer").textContent = JSON.stringify(result, null, 2); + }); + document.getElementById("viewIso").addEventListener("click", function () { + var key = "geoportail:compute"; + var result = exportFormatIso.readRootExtensions(key); + document.getElementById("viewer").textContent = JSON.stringify(result, null, 2); + }); + {{/content}} {{/extend}} diff --git a/samples-src/resources/data/geojson/export-iso.geojson b/samples-src/resources/data/geojson/export-iso.geojson new file mode 100644 index 000000000..2f60ee7ab --- /dev/null +++ b/samples-src/resources/data/geojson/export-iso.geojson @@ -0,0 +1 @@ +{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[2.5822865119999996,48.84220389800001],[2.58217211,48.842089496],[2.5821567709999997,48.84207867400002],[2.582155165,48.84207791199998],[2.582108917,48.84214964299997],[2.581813568,48.84260772400003],[2.583030614,48.843592258],[2.583958347,48.84415312600001],[2.585424701,48.844122751999976],[2.585459358,48.84415740899999],[2.585465251,48.844163302],[2.5854711729999997,48.844169223999984],[2.585472923,48.84417097400001],[2.5853521369999997,48.84466949],[2.585275542,48.844746085],[2.585237372,48.84478425500001],[2.585181998,48.844839629000006],[2.585172943,48.844851559999995],[2.5851666110000004,48.844862801000005],[2.5851611000000005,48.844876728],[2.5851603459999994,48.84487980299997],[2.585795597,48.84526384899999],[2.586397816,48.845005215000015],[2.586369812,48.844900704999986],[2.586367493,48.84489387299999],[2.586365098,48.84488808999998],[2.586361907,48.844881619999995],[2.586358841,48.844876309],[2.586354833,48.844870310999994],[2.586351023,48.84486534499999],[2.586346266,48.844859920999994],[2.5862363959999994,48.844750051000005],[2.586229503,48.844743158],[2.586221096,48.844734751000004],[2.586199204,48.84471285899997],[2.58626411,48.84433989799999],[2.588303633,48.844186729],[2.589570493,48.84364265400001],[2.5895058049999995,48.84340123199999],[2.589503486,48.843394399999994],[2.58950109,48.84338861799998],[2.589497899,48.843382147],[2.589494545,48.843376337999985],[2.589490537,48.84337033899999],[2.5894867269999997,48.84336537400003],[2.58948197,48.84335994899996],[2.5894559270000004,48.843333906],[2.5909384749999997,48.843047350000006],[2.5909394330000004,48.84304715600001],[2.5909402640000003,48.84304698],[2.5909412180000007,48.84304676900001],[2.590942113,48.843046563],[2.5909430630000005,48.843046335],[2.590943888,48.843046130000005],[2.590944834,48.84304588500004],[2.5909852869999996,48.84303504600001],[2.59118702,48.84294840800001],[2.591218544,48.842933743],[2.5912507149999997,48.842921053],[2.5913066949999997,48.84289701199998],[2.59131796,48.842889622],[2.5914625390000006,48.84274504300001],[2.591467296,48.842739618999985],[2.59147098,48.842734818],[2.5914749879999994,48.84272881899997],[2.591478096,48.842723436],[2.5914812870000006,48.842716964999994],[2.591483603,48.842711373999975],[2.591485922,48.84270454199998],[2.591559816,48.84242876799999],[2.591561223,48.842421692000016],[2.591562013,48.842415690999985],[2.5915624849999994,48.842408492000004],[2.5915624849999994,48.84240227700002],[2.591562013,48.84239507699999],[2.591561223,48.84238907700001],[2.591559816,48.842382001000004],[2.591514524,48.842212968999974],[2.592280588,48.84205811699999],[2.5922813560000004,48.842058885],[2.592315163,48.842092692999984],[2.592407026,48.842184556000035],[2.592448194,48.842225724],[2.592453618,48.842230481],[2.59245842,48.84223416500001],[2.592464419,48.842238173],[2.592469801,48.842241281000014],[2.592476272,48.842244472000004],[2.592481864,48.84224678800001],[2.592488695,48.84224910699999],[2.5925451789999996,48.842264242],[2.592689829,48.842303001000005],[2.5935341319999994,48.8419404],[2.594028762,48.84172797299999],[2.594546314,48.84136921600003],[2.594544238,48.84136595300001],[2.5945367040000002,48.84135656000001],[2.5945057269999996,48.841325583000014],[2.594499596,48.84123944800001],[2.594502028,48.84123890800001],[2.594504735,48.841238213999986],[2.5945082,48.84123720299999],[2.594511082,48.841236259],[2.594514473,48.841235023999985],[2.594531891,48.841228027],[2.594550588,48.84122637499999],[2.5945541710000004,48.841225940000015],[2.594557168,48.841225476000034],[2.594560715,48.84122480799999],[2.5945634429999997,48.84122420099999],[2.594566938,48.84122330200003],[2.594569849,48.84122245099999],[2.5945732779999995,48.841221324999964],[2.594836987,48.841125089],[2.594840335,48.84112374200001],[2.594842364,48.84112284700001],[2.594844471,48.841122157],[2.5948478629999996,48.84112092299998],[2.594982508,48.84106685699999],[2.595353442,48.840809732999986],[2.5953617,48.840623596],[2.5953033369999994,48.84041924699997],[2.595058571,48.84015598900001],[2.595044029,48.84016591400001],[2.595041116,48.840168044999984],[2.595038729,48.84016991499999],[2.595035961,48.840172232000015],[2.595033879,48.84017409399999],[2.595031269,48.84017658700003],[2.595029146,48.84017875300003],[2.595026704,48.840181411],[2.594919771,48.840305787999995],[2.5947020639999994,48.840393207999995],[2.5946737059999996,48.840366588999984],[2.5946709949999995,48.840364206000004],[2.5946686530000003,48.840362279999994],[2.594665792,48.84036008000001],[2.594663523,48.84035844900001],[2.594660524,48.84035644099998],[2.59465795,48.84035483700001],[2.594654827,48.840353029],[2.594559911,48.84030216100004],[2.5945599100000005,48.84030216100004],[2.594380826,48.840206185],[2.5942714720000004,48.840104620000005],[2.594208379,48.83995080700001],[2.594195594,48.83991963899999],[2.5941646120000006,48.839844107000005],[2.594163133,48.839840815],[2.594161801,48.83983809099996],[2.594160111,48.83983490200001],[2.594158722,48.839832477000016],[2.594156827,48.83982940499999],[2.594155151,48.839826878],[2.5941530579999994,48.83982393699998],[2.5941363830000004,48.83980205],[2.594076545,48.83972350900001],[2.594066205,48.839713144],[2.5940565189999996,48.839705726999966],[2.5940438160000006,48.83969844799998],[2.5940356930000004,48.839695135],[2.594021072,48.83904010700002],[2.5937165260000006,48.838712552000004],[2.593639421,48.838702418],[2.593626411,48.838702256000005],[2.592483756,48.838823572000024],[2.592483311,48.83881678099999],[2.592482477,48.83881044899999],[2.59248107,48.83880337299999],[2.592473925,48.838776709],[2.592841343,48.83833588800002],[2.593001933,48.83830565299999],[2.5930597,48.83829477699996],[2.593063223,48.838293994],[2.593066322,48.83829319700001],[2.593069786,48.838292185],[2.593072995,48.838291132999984],[2.5930763860000003,48.83828989599999],[2.593079356,48.83828870100001],[2.593082659,48.83828724599999],[2.593124024,48.838267371],[2.593140329,48.838255428999986],[2.5932114359999994,48.838179768],[2.593215946,48.838174154],[2.593177514,48.83813281799999],[2.5929915500000003,48.83793280400002],[2.592320233,48.837856749000025],[2.590665072,48.837669234],[2.59051165,48.837660915000015],[2.5905126249999997,48.83765464799998],[2.59051275,48.83765197700001],[2.590416502,48.837641072999986],[2.589881203,48.837580427999995],[2.589331891,48.83758877599999],[2.588867451,48.83759583400001],[2.5874925180000004,48.83764979799997],[2.587121873,48.83767799500001],[2.587113867,48.83766466],[2.587002615,48.837669026000015],[2.5853922280000003,48.83773223199998],[2.5846693189999996,48.83817849900001],[2.5843615230000005,48.83865588500004],[2.584330947,48.83870330900001],[2.5843705129999996,48.83874287500001],[2.5843752400000004,48.83874708799999],[2.5844486049999995,48.838805275],[2.584459766,48.83881089100004],[2.584473167,48.838824292],[2.584477894,48.83882850500001],[2.584730806,48.83902909400001],[2.584750805,48.839039155999984],[2.584964736,48.839096479000034],[2.584971812,48.83909788700001],[2.5849781450000004,48.83909872000001],[2.5849793919999997,48.83909880199997],[2.585110219,48.83913385699998],[2.585117295,48.83913526399999],[2.5851236270000006,48.83913609799998],[2.585130826,48.839136569999994],[2.585137426,48.839136569999994],[2.585144625,48.83913609799998],[2.585150957,48.83913526399999],[2.585158033,48.83913385699998],[2.585214135,48.839118825000014],[2.585268096,48.839133282999995],[2.585292737,48.83913988599997],[2.585299812,48.83914129300001],[2.5853061449999997,48.839142127],[2.585313344,48.83914259900001],[2.585319944,48.83914259900001],[2.585327143,48.839142127],[2.5853334750000005,48.83914129300001],[2.585340551,48.83913988599997],[2.585366958,48.839132809999995],[2.58543812,48.839113741999995],[2.5854395339999994,48.83911336400001],[2.585880172,48.83990931799997],[2.5856764239999994,48.840098591000014],[2.585640497,48.839964510000016],[2.5856349870000006,48.839951208],[2.585629402,48.83994153500001],[2.5856206369999994,48.83993011199999],[2.585418756,48.83972823100001],[2.585407333,48.83971946599999],[2.58539766,48.839713881999984],[2.585384358,48.83970837199999],[2.5853451270000005,48.83969786000003],[2.585339846,48.83968871299999],[2.5853310810000005,48.839677291000015],[2.585160221,48.83950643099999],[2.585139004,48.83949322199999],[2.585092726,48.839477458000005],[2.585089217,48.839476391999966],[2.5848134430000003,48.839402499000016],[2.584811982,48.83940212800002],[2.584651516,48.83936379900001],[2.584624427,48.83936416899999],[2.5843486519999996,48.839438062],[2.584329818,48.839447226999994],[2.584207467,48.839539062],[2.584201576,48.83954417300001],[2.5841982159999994,48.839547533],[2.584192431,48.83955034799996],[2.584146148,48.839585088000035],[2.584140257,48.839590198999986],[2.5839383760000003,48.839792079999995],[2.5839344309999994,48.83979647199999],[2.583900965,48.839837999999986],[2.583890635,48.839858332999995],[2.5838293649999997,48.84008699500001],[2.583827994,48.84009740799999],[2.583740013,48.840185389],[2.583731248,48.84019681199999],[2.583725663,48.84020648500001],[2.5837201529999994,48.840219786999995],[2.58364626,48.84049556100001],[2.583644381,48.84050983700004],[2.583644381,48.84052100600002],[2.58364626,48.840535281],[2.5837201529999994,48.84081105500002],[2.583725663,48.84082435799999],[2.583731248,48.840834030999986],[2.583740013,48.840845454000004],[2.5838052320000005,48.84091067200001],[2.5838181020000004,48.84095870300001],[2.583815835,48.840964668],[2.583815163,48.840977917000004],[2.5838169709999996,48.840994986],[2.583817364,48.840996450000006],[2.583747092,48.841240529000004],[2.583707075,48.841251252000006],[2.583700243,48.84125357100001],[2.583695039,48.841255725999986],[2.583688569,48.841258916999976],[2.5836838700000007,48.84126162999999],[2.583677871,48.84126563899997],[2.583673402,48.841269068],[2.5836679779999994,48.84127382499997],[2.583622909,48.84131889299999],[2.583612604,48.84132919799998],[2.583466097,48.84147570599998],[2.58346134,48.841481130000005],[2.583457911,48.84148559799999],[2.5834539030000006,48.841491597000015],[2.58345119,48.841496296],[2.583447999,48.84150276699998],[2.583445843,48.841507971],[2.583443524,48.841514802999995],[2.58336963,48.84179057699998],[2.583369367,48.84179190099999],[2.583291946,48.84198416000001],[2.583191493,48.842052198000005],[2.583144327,48.84206483699998],[2.583144326,48.84206483699998],[2.582954866,48.84211560200001],[2.582948035,48.84211792100001],[2.58294283,48.842120077000004],[2.58293636,48.842123267999966],[2.582931661,48.84212598100001],[2.582925662,48.842129989],[2.582921193,48.842133418],[2.582915769,48.842138174999974],[2.5827138880000002,48.84234005600001],[2.5827091310000005,48.842345480000006],[2.582705702,48.84234994900001],[2.582701694,48.842355948000005],[2.582698981,48.84236064700002],[2.5826957899999994,48.842367118],[2.582693634,48.84237232200002],[2.582693382,48.842373065000004],[2.582623296,48.84230297900001],[2.582617872,48.84229822200001],[2.582613403,48.84229479300001],[2.5826074040000004,48.84229078499999],[2.582602705,48.842288072],[2.5825962350000005,48.84228488100004],[2.582591031,48.84228272499999],[2.582584199,48.842280405999986],[2.582308424,48.84220651199999],[2.582301348,48.842205105000005],[2.582295764,48.84220436999999],[2.582288565,48.84220389800001],[2.5822865119999996,48.84220389800001]]]},"properties":{"fill":"#00b798","fill-opacity":0.7}},{"type":"Feature","geometry":{"type":"Point","coordinates":[2.5889593786271514,48.84181708047407]},"properties":{"description":"Point d'origine","marker-symbol":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAmCAYAAABpuqMCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAARDSURBVFiF3ZndaxxVGMZ/Z/YjX00Nadpo1qrFBgu56D9QbAtiLoRC7ywSNK1NURRREBKRFlSwFBW0gnSrJXY1CmISgyjFiyYSFC9ajE3MmpjdjWlMUtNos9lN9mteLzbRuCbZmTMTBB+Yi51znvd5n3nPnjnnjBIR/i/wuh4xpCpI0ojiENAA1AE1wCzwKzCE0EM5l2iShJvSyrXKnFVb8dOK4hmg3AIjifAmaU7ztMy7kYI7Zs6rQwjvka+AXcyiOMZx6XGahuE0AEHVitCFnhGAGoQugqrVaSrOKpNP4FWnSaxCGy1yWpesbyY/tLpwo7p/w0RxWHfI6Zk5q7ZSwhj6Q2sjzJLiXp1JQe+p+mllc4wA1CzHtw37lQmpCha5gbXpVxdJythh9z1kvzJJGrFixPBmOXixl+Z4mONmguZ4mIMXezG8WQsq5cs6tmDfTP7NXiSqN0vTzBD1TQfwbdmDUhX4tuyhvukATTNDlgxZ0SmUtUsgv0TZGPsv9FNSvXfNtpLqvey/0O+KTgF0zNQV7XHP4dsdtVvVKYCOmeqiPbwVOx21W9UpgI6ZWNEe2cSEo3arOgWwb0YYLp5G17Sjdqs6BdCZzYqL9B3dR2puYM221NwAfUf3uaJTAB0zaye5GmbWS6i2gdFQL5mFMCIJMgthRkO9hGobMLPFN4VWdAoptlcAQeUDRoG77YrZwDhQT4tk7JDsV6ZFMggv2+bZwyt2jYDuQnOa94GIFrc4IkzRrkPUM3NKsijatLjF0copsbJ++xec7TTPqw6EI/oB/glT+PC+13Y/aSQNv/Is+tNer09lMn7DMHwAYppp8fvTIpISkVQsFrslqww4M9OuqkgzANzl1MhCyrjZGAycm573pK1yFCyi5FoWvo/FYlPOT2fOqftRXMbB9lkEs+3zbe2f/FD5i3YMj2p3vn8/IV8DZ5yE+Gqkot+JEQCPada5dRhxEriiQ5ya90w+272916F+KpnJDLhjpkUy5HgESNqhZU2Vfr5ne+dSFtOBeso06J6cnEy6d0z0hPwEPGeH8sGVykvfjpfe1NZUci2+mHg7Go2G8z/d/goQVJ9B8S1veMYffujduo/thl+ZwUzDuBqJRGZWt7n/FcDH46lFNVLilar1uiTTxsJTnTssH/QpJVlMNQa5wbGJiWERya3Vz30zzfLb3OveY3dU5j5dp4e80Xdbd3TOu/H/yyAtpjnqgeGS8crRQRks+v5xf5gtY/KM/6NAVebhwvv90bLvHu2o/XId2pJSMmIaxo/RaHRMxN6yZtPM0K5K/7hl/FxVZgZWbs0mPDceeKcuGE95/kpSKUmaImHDNIfHrl+PiIj2zOb+MFvBY7IUOVl2ZG9g6bJH4ckJuRe/2NYZT3myKIkrGM4pNRyLjY+LW09URDb1+uaF0pfm3zJ+7zhRGdq1c9eDuwOBOzdLa/OG2X+APwE8DU64Y/5gfAAAAABJRU5ErkJggg==","marker-size":"medium"}}],"geoportail:compute":{"type":"isocurve","transport":"Pieton","computation":"time","exclusions":[],"direction":"departure","point":[2.5889593786271514,48.84181708047407],"results":{"message":"","id":"","location":{"x":"2.5889593786271514","y":"48.84181708047407"},"srs":"EPSG:4326","geometry":{"type":"Polygon","coordinates":[[[2.582286512,48.842203898],[2.58217211,48.842089496],[2.582156771,48.842078674],[2.582155165,48.842077912],[2.582108917,48.842149643],[2.581813568,48.842607724],[2.583030614,48.843592258],[2.583958347,48.844153126],[2.585424701,48.844122752],[2.585459358,48.844157409],[2.585465251,48.844163302],[2.585471173,48.844169224],[2.585472923,48.844170974],[2.585352137,48.84466949],[2.585275542,48.844746085],[2.585237372,48.844784255],[2.585181998,48.844839629],[2.585172943,48.84485156],[2.585166611,48.844862801],[2.5851611,48.844876728],[2.585160346,48.844879803],[2.585795597,48.845263849],[2.586397816,48.845005215],[2.586369812,48.844900705],[2.586367493,48.844893873],[2.586365098,48.84488809],[2.586361907,48.84488162],[2.586358841,48.844876309],[2.586354833,48.844870311],[2.586351023,48.844865345],[2.586346266,48.844859921],[2.586236396,48.844750051],[2.586229503,48.844743158],[2.586221096,48.844734751],[2.586199204,48.844712859],[2.58626411,48.844339898],[2.588303633,48.844186729],[2.589570493,48.843642654],[2.589505805,48.843401232],[2.589503486,48.8433944],[2.58950109,48.843388618],[2.589497899,48.843382147],[2.589494545,48.843376338],[2.589490537,48.843370339],[2.589486727,48.843365374],[2.58948197,48.843359949],[2.589455927,48.843333906],[2.590938475,48.84304735],[2.590939433,48.843047156],[2.590940264,48.84304698],[2.590941218,48.843046769],[2.590942113,48.843046563],[2.590943063,48.843046335],[2.590943888,48.84304613],[2.590944834,48.843045885],[2.590985287,48.843035046],[2.59118702,48.842948408],[2.591218544,48.842933743],[2.591250715,48.842921053],[2.591306695,48.842897012],[2.59131796,48.842889622],[2.591462539,48.842745043],[2.591467296,48.842739619],[2.59147098,48.842734818],[2.591474988,48.842728819],[2.591478096,48.842723436],[2.591481287,48.842716965],[2.591483603,48.842711374],[2.591485922,48.842704542],[2.591559816,48.842428768],[2.591561223,48.842421692],[2.591562013,48.842415691],[2.591562485,48.842408492],[2.591562485,48.842402277],[2.591562013,48.842395077],[2.591561223,48.842389077],[2.591559816,48.842382001],[2.591514524,48.842212969],[2.592280588,48.842058117],[2.592281356,48.842058885],[2.592315163,48.842092693],[2.592407026,48.842184556],[2.592448194,48.842225724],[2.592453618,48.842230481],[2.59245842,48.842234165],[2.592464419,48.842238173],[2.592469801,48.842241281],[2.592476272,48.842244472],[2.592481864,48.842246788],[2.592488695,48.842249107],[2.592545179,48.842264242],[2.592689829,48.842303001],[2.593534132,48.8419404],[2.594028762,48.841727973],[2.594546314,48.841369216],[2.594544238,48.841365953],[2.594536704,48.84135656],[2.594505727,48.841325583],[2.594499596,48.841239448],[2.594502028,48.841238908],[2.594504735,48.841238214],[2.5945082,48.841237203],[2.594511082,48.841236259],[2.594514473,48.841235024],[2.594531891,48.841228027],[2.594550588,48.841226375],[2.594554171,48.84122594],[2.594557168,48.841225476],[2.594560715,48.841224808],[2.594563443,48.841224201],[2.594566938,48.841223302],[2.594569849,48.841222451],[2.594573278,48.841221325],[2.594836987,48.841125089],[2.594840335,48.841123742],[2.594842364,48.841122847],[2.594844471,48.841122157],[2.594847863,48.841120923],[2.594982508,48.841066857],[2.595353442,48.840809733],[2.5953617,48.840623596],[2.595303337,48.840419247],[2.595058571,48.840155989],[2.595044029,48.840165914],[2.595041116,48.840168045],[2.595038729,48.840169915],[2.595035961,48.840172232],[2.595033879,48.840174094],[2.595031269,48.840176587],[2.595029146,48.840178753],[2.595026704,48.840181411],[2.594919771,48.840305788],[2.594702064,48.840393208],[2.594673706,48.840366589],[2.594670995,48.840364206],[2.594668653,48.84036228],[2.594665792,48.84036008],[2.594663523,48.840358449],[2.594660524,48.840356441],[2.59465795,48.840354837],[2.594654827,48.840353029],[2.594559911,48.840302161],[2.59455991,48.840302161],[2.594380826,48.840206185],[2.594271472,48.84010462],[2.594208379,48.839950807],[2.594195594,48.839919639],[2.594164612,48.839844107],[2.594163133,48.839840815],[2.594161801,48.839838091],[2.594160111,48.839834902],[2.594158722,48.839832477],[2.594156827,48.839829405],[2.594155151,48.839826878],[2.594153058,48.839823937],[2.594136383,48.83980205],[2.594076545,48.839723509],[2.594066205,48.839713144],[2.594056519,48.839705727],[2.594043816,48.839698448],[2.594035693,48.839695135],[2.594021072,48.839040107],[2.593716526,48.838712552],[2.593639421,48.838702418],[2.593626411,48.838702256],[2.592483756,48.838823572],[2.592483311,48.838816781],[2.592482477,48.838810449],[2.59248107,48.838803373],[2.592473925,48.838776709],[2.592841343,48.838335888],[2.593001933,48.838305653],[2.5930597,48.838294777],[2.593063223,48.838293994],[2.593066322,48.838293197],[2.593069786,48.838292185],[2.593072995,48.838291133],[2.593076386,48.838289896],[2.593079356,48.838288701],[2.593082659,48.838287246],[2.593124024,48.838267371],[2.593140329,48.838255429],[2.593211436,48.838179768],[2.593215946,48.838174154],[2.593177514,48.838132818],[2.59299155,48.837932804],[2.592320233,48.837856749],[2.590665072,48.837669234],[2.59051165,48.837660915],[2.590512625,48.837654648],[2.59051275,48.837651977],[2.590416502,48.837641073],[2.589881203,48.837580428],[2.589331891,48.837588776],[2.588867451,48.837595834],[2.587492518,48.837649798],[2.587121873,48.837677995],[2.587113867,48.83766466],[2.587002615,48.837669026],[2.585392228,48.837732232],[2.584669319,48.838178499],[2.584361523,48.838655885],[2.584330947,48.838703309],[2.584370513,48.838742875],[2.58437524,48.838747088],[2.584448605,48.838805275],[2.584459766,48.838810891],[2.584473167,48.838824292],[2.584477894,48.838828505],[2.584730806,48.839029094],[2.584750805,48.839039156],[2.584964736,48.839096479],[2.584971812,48.839097887],[2.584978145,48.83909872],[2.584979392,48.839098802],[2.585110219,48.839133857],[2.585117295,48.839135264],[2.585123627,48.839136098],[2.585130826,48.83913657],[2.585137426,48.83913657],[2.585144625,48.839136098],[2.585150957,48.839135264],[2.585158033,48.839133857],[2.585214135,48.839118825],[2.585268096,48.839133283],[2.585292737,48.839139886],[2.585299812,48.839141293],[2.585306145,48.839142127],[2.585313344,48.839142599],[2.585319944,48.839142599],[2.585327143,48.839142127],[2.585333475,48.839141293],[2.585340551,48.839139886],[2.585366958,48.83913281],[2.58543812,48.839113742],[2.585439534,48.839113364],[2.585880172,48.839909318],[2.585676424,48.840098591],[2.585640497,48.83996451],[2.585634987,48.839951208],[2.585629402,48.839941535],[2.585620637,48.839930112],[2.585418756,48.839728231],[2.585407333,48.839719466],[2.58539766,48.839713882],[2.585384358,48.839708372],[2.585345127,48.83969786],[2.585339846,48.839688713],[2.585331081,48.839677291],[2.585160221,48.839506431],[2.585139004,48.839493222],[2.585092726,48.839477458],[2.585089217,48.839476392],[2.584813443,48.839402499],[2.584811982,48.839402128],[2.584651516,48.839363799],[2.584624427,48.839364169],[2.584348652,48.839438062],[2.584329818,48.839447227],[2.584207467,48.839539062],[2.584201576,48.839544173],[2.584198216,48.839547533],[2.584192431,48.839550348],[2.584146148,48.839585088],[2.584140257,48.839590199],[2.583938376,48.83979208],[2.583934431,48.839796472],[2.583900965,48.839838],[2.583890635,48.839858333],[2.583829365,48.840086995],[2.583827994,48.840097408],[2.583740013,48.840185389],[2.583731248,48.840196812],[2.583725663,48.840206485],[2.583720153,48.840219787],[2.58364626,48.840495561],[2.583644381,48.840509837],[2.583644381,48.840521006],[2.58364626,48.840535281],[2.583720153,48.840811055],[2.583725663,48.840824358],[2.583731248,48.840834031],[2.583740013,48.840845454],[2.583805232,48.840910672],[2.583818102,48.840958703],[2.583815835,48.840964668],[2.583815163,48.840977917],[2.583816971,48.840994986],[2.583817364,48.84099645],[2.583747092,48.841240529],[2.583707075,48.841251252],[2.583700243,48.841253571],[2.583695039,48.841255726],[2.583688569,48.841258917],[2.58368387,48.84126163],[2.583677871,48.841265639],[2.583673402,48.841269068],[2.583667978,48.841273825],[2.583622909,48.841318893],[2.583612604,48.841329198],[2.583466097,48.841475706],[2.58346134,48.84148113],[2.583457911,48.841485598],[2.583453903,48.841491597],[2.58345119,48.841496296],[2.583447999,48.841502767],[2.583445843,48.841507971],[2.583443524,48.841514803],[2.58336963,48.841790577],[2.583369367,48.841791901],[2.583291946,48.84198416],[2.583191493,48.842052198],[2.583144327,48.842064837],[2.583144326,48.842064837],[2.582954866,48.842115602],[2.582948035,48.842117921],[2.58294283,48.842120077],[2.58293636,48.842123268],[2.582931661,48.842125981],[2.582925662,48.842129989],[2.582921193,48.842133418],[2.582915769,48.842138175],[2.582713888,48.842340056],[2.582709131,48.84234548],[2.582705702,48.842349949],[2.582701694,48.842355948],[2.582698981,48.842360647],[2.58269579,48.842367118],[2.582693634,48.842372322],[2.582693382,48.842373065],[2.582623296,48.842302979],[2.582617872,48.842298222],[2.582613403,48.842294793],[2.582607404,48.842290785],[2.582602705,48.842288072],[2.582596235,48.842284881],[2.582591031,48.842282725],[2.582584199,48.842280406],[2.582308424,48.842206512],[2.582301348,48.842205105],[2.582295764,48.84220437],[2.582288565,48.842203898],[2.582286512,48.842203898]]]},"time":600,"distance":""}}} \ No newline at end of file diff --git a/samples-src/resources/data/geojson/export-profil.geojson b/samples-src/resources/data/geojson/export-profil.geojson new file mode 100644 index 000000000..418bafe27 --- /dev/null +++ b/samples-src/resources/data/geojson/export-profil.geojson @@ -0,0 +1 @@ +{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"LineString","coordinates":[[2.4352744768852865,48.96458336001166],[2.3539666836501008,48.72736748173057]]},"properties":null}],"geoportail:compute":{"type":"elevationpath","greaterSlope":12,"meanSlope":2,"distancePlus":13414.310931585807,"distanceMinus":13520.002115154157,"ascendingElevation":240.83000000000015,"descendingElevation":-202.26,"altMin":"28,05","altMax":"120,08","distance":27039.93759507291,"unit":"m","points":[{"z":46.33,"lon":2.4353,"lat":48.9646,"acc":2.5,"dist":0,"slope":0},{"z":45.67,"lon":2.435,"lat":48.9637,"acc":2.5,"dist":105.62223884135284,"slope":1,"color":"#00B798"},{"z":44.58,"lon":2.4346,"lat":48.9627,"acc":2.5,"dist":211.24533567735983,"slope":1,"color":"#00B798"},{"z":43.43,"lon":2.4343,"lat":48.9618,"acc":2.5,"dist":316.86744339158764,"slope":1,"color":"#00B798"},{"z":41.84,"lon":2.434,"lat":48.9609,"acc":2.5,"dist":422.490409088714,"slope":2,"color":"#00B798"},{"z":40.94,"lon":2.4337,"lat":48.96,"acc":2.5,"dist":528.1133092069166,"slope":1,"color":"#00B798"},{"z":39.63,"lon":2.4334,"lat":48.959,"acc":2.5,"dist":633.7361437393077,"slope":1,"color":"#00B798"},{"z":39.13,"lon":2.433,"lat":48.9581,"acc":2.5,"dist":739.3587516663466,"slope":0,"color":"#00B798"},{"z":39.47,"lon":2.4327,"lat":48.9572,"acc":2.5,"dist":844.9814550067377,"slope":0,"color":"#00B798"},{"z":39.66,"lon":2.4324,"lat":48.9562,"acc":2.5,"dist":950.603931726924,"slope":0,"color":"#00B798"},{"z":39.89,"lon":2.4321,"lat":48.9553,"acc":2.5,"dist":1056.2263428342671,"slope":0,"color":"#00B798"},{"z":40.44,"lon":2.4318,"lat":48.9544,"acc":2.5,"dist":1161.8497729023165,"slope":1,"color":"#00B798"},{"z":41.35,"lon":2.4314,"lat":48.9535,"acc":2.5,"dist":1267.4720527654492,"slope":1,"color":"#00B798"},{"z":42.3,"lon":2.4311,"lat":48.9525,"acc":2.5,"dist":1373.0951905630232,"slope":1,"color":"#00B798"},{"z":42.74,"lon":2.4308,"lat":48.9516,"acc":2.5,"dist":1478.717339154242,"slope":0,"color":"#00B798"},{"z":43.03,"lon":2.4305,"lat":48.9507,"acc":2.5,"dist":1584.3403456684318,"slope":0,"color":"#00B798"},{"z":43.8,"lon":2.4302,"lat":48.9498,"acc":2.5,"dist":1689.963286532057,"slope":1,"color":"#00B798"},{"z":44.46,"lon":2.4299,"lat":48.9488,"acc":2.5,"dist":1795.5861617356095,"slope":1,"color":"#00B798"},{"z":44.67,"lon":2.4295,"lat":48.9479,"acc":2.5,"dist":1901.2088102630175,"slope":0,"color":"#00B798"},{"z":45.66,"lon":2.4292,"lat":48.947,"acc":2.5,"dist":2006.831554131651,"slope":1,"color":"#00B798"},{"z":45.49,"lon":2.4289,"lat":48.9461,"acc":2.5,"dist":2112.4551558960875,"slope":0,"color":"#00B798"},{"z":46.03,"lon":2.4286,"lat":48.9451,"acc":2.5,"dist":2218.077607389068,"slope":1,"color":"#00B798"},{"z":46.2,"lon":2.4283,"lat":48.9442,"acc":2.5,"dist":2323.7010777805494,"slope":0,"color":"#00B798"},{"z":45.93,"lon":2.4279,"lat":48.9433,"acc":2.5,"dist":2429.3233978843155,"slope":0,"color":"#00B798"},{"z":46.19,"lon":2.4276,"lat":48.9423,"acc":2.5,"dist":2534.9465758610827,"slope":0,"color":"#00B798"},{"z":39.78,"lon":2.4273,"lat":48.9414,"acc":2.5,"dist":2640.5698491426765,"slope":6,"color":"#00B798"},{"z":45.74,"lon":2.427,"lat":48.9405,"acc":2.5,"dist":2746.1928956928555,"slope":6,"color":"#00B798"},{"z":42.84,"lon":2.4267,"lat":48.9396,"acc":2.5,"dist":2851.8158765210187,"slope":3,"color":"#00B798"},{"z":39.07,"lon":2.4263,"lat":48.9386,"acc":2.5,"dist":2957.438791617658,"slope":4,"color":"#00B798"},{"z":39.16,"lon":2.426,"lat":48.9377,"acc":2.5,"dist":3063.0614799640653,"slope":0,"color":"#00B798"},{"z":41.41,"lon":2.4257,"lat":48.9368,"acc":2.5,"dist":3168.6853481800567,"slope":2,"color":"#00B798"},{"z":43.34,"lon":2.4251,"lat":48.9349,"acc":2.5,"dist":3379.931480731123,"slope":1,"color":"#00B798"},{"z":44.35,"lon":2.4248,"lat":48.934,"acc":2.5,"dist":3485.553906065343,"slope":1,"color":"#00B798"},{"z":44.45,"lon":2.4244,"lat":48.9331,"acc":2.5,"dist":3591.1773502316187,"slope":0,"color":"#00B798"},{"z":44.9,"lon":2.4241,"lat":48.9322,"acc":2.5,"dist":3696.8005676086514,"slope":0,"color":"#00B798"},{"z":44.46,"lon":2.4238,"lat":48.9312,"acc":2.5,"dist":3802.423880217659,"slope":0,"color":"#00B798"},{"z":43.57,"lon":2.4235,"lat":48.9303,"acc":2.5,"dist":3908.046966023273,"slope":1,"color":"#00B798"},{"z":48.15,"lon":2.4232,"lat":48.9294,"acc":2.5,"dist":4013.6699860354997,"slope":4,"color":"#00B798"},{"z":49.28,"lon":2.4228,"lat":48.9284,"acc":2.5,"dist":4119.292940244847,"slope":1,"color":"#00B798"},{"z":43.47,"lon":2.4225,"lat":48.9275,"acc":2.5,"dist":4224.91691325337,"slope":6,"color":"#00B798"},{"z":42.59,"lon":2.4222,"lat":48.9266,"acc":2.5,"dist":4330.539574825868,"slope":1,"color":"#00B798"},{"z":42.81,"lon":2.4219,"lat":48.9257,"acc":2.5,"dist":4436.163255186841,"slope":0,"color":"#00B798"},{"z":42.8,"lon":2.4216,"lat":48.9247,"acc":2.5,"dist":4541.78578510748,"slope":0,"color":"#00B798"},{"z":42.58,"lon":2.4212,"lat":48.9238,"acc":2.5,"dist":4647.409333806564,"slope":0,"color":"#00B798"},{"z":41.46,"lon":2.4209,"lat":48.9229,"acc":2.5,"dist":4753.032816665108,"slope":1,"color":"#00B798"},{"z":41.72,"lon":2.4206,"lat":48.922,"acc":2.5,"dist":4858.656233676394,"slope":0,"color":"#00B798"},{"z":41.81,"lon":2.42,"lat":48.9201,"acc":2.5,"dist":5069.902548102409,"slope":0,"color":"#00B798"},{"z":42.75,"lon":2.4197,"lat":48.9192,"acc":2.5,"dist":5175.526852148913,"slope":1,"color":"#00B798"},{"z":42.27,"lon":2.4193,"lat":48.9183,"acc":2.5,"dist":5281.149683677052,"slope":0,"color":"#00B798"},{"z":43.12,"lon":2.419,"lat":48.9173,"acc":2.5,"dist":5386.773694959015,"slope":1,"color":"#00B798"},{"z":42.77,"lon":2.4187,"lat":48.9164,"acc":2.5,"dist":5492.396555734283,"slope":0,"color":"#00B798"},{"z":40.02,"lon":2.4184,"lat":48.9155,"acc":2.5,"dist":5598.020274223431,"slope":3,"color":"#00B798"},{"z":42.36,"lon":2.4181,"lat":48.9146,"acc":2.5,"dist":5703.643926813584,"slope":2,"color":"#00B798"},{"z":42.48,"lon":2.4174,"lat":48.9127,"acc":2.5,"dist":5914.891034270614,"slope":0,"color":"#00B798"},{"z":42.26,"lon":2.4171,"lat":48.9118,"acc":2.5,"dist":6020.514489124057,"slope":0,"color":"#00B798"},{"z":43.33,"lon":2.4168,"lat":48.9108,"acc":2.5,"dist":6126.13771703769,"slope":1,"color":"#00B798"},{"z":43.49,"lon":2.4161,"lat":48.909,"acc":2.5,"dist":6337.3850596897155,"slope":0,"color":"#00B798"},{"z":45.59,"lon":2.4155,"lat":48.9071,"acc":2.5,"dist":6548.632138562224,"slope":1,"color":"#00B798"},{"z":47.7,"lon":2.4149,"lat":48.9053,"acc":2.5,"dist":6759.8798772203845,"slope":1,"color":"#00B798"},{"z":46.24,"lon":2.4146,"lat":48.9044,"acc":2.5,"dist":6865.50356708921,"slope":1,"color":"#00B798"},{"z":44.9,"lon":2.4142,"lat":48.9034,"acc":2.5,"dist":6971.127190981787,"slope":1,"color":"#00B798"},{"z":44.22,"lon":2.4139,"lat":48.9025,"acc":2.5,"dist":7076.750748888653,"slope":1,"color":"#00B798"},{"z":45.44,"lon":2.4136,"lat":48.9016,"acc":2.5,"dist":7182.374240805843,"slope":1,"color":"#00B798"},{"z":52.57,"lon":2.4133,"lat":48.9007,"acc":2.5,"dist":7287.997505710742,"slope":7,"color":"#00B798"},{"z":51.58,"lon":2.413,"lat":48.8997,"acc":2.5,"dist":7393.621950265311,"slope":1,"color":"#00B798"},{"z":51.4,"lon":2.4126,"lat":48.8988,"acc":2.5,"dist":7499.246167796905,"slope":0,"color":"#00B798"},{"z":49.13,"lon":2.4123,"lat":48.8979,"acc":2.5,"dist":7604.869234670951,"slope":2,"color":"#00B798"},{"z":51.3,"lon":2.412,"lat":48.8969,"acc":2.5,"dist":7710.493320162403,"slope":2,"color":"#00B798"},{"z":52.21,"lon":2.4117,"lat":48.896,"acc":2.5,"dist":7816.117178612816,"slope":1,"color":"#00B798"},{"z":52.15,"lon":2.4114,"lat":48.8951,"acc":2.5,"dist":7921.7411320396595,"slope":0,"color":"#00B798"},{"z":52.47,"lon":2.4111,"lat":48.8942,"acc":2.5,"dist":8027.364858409987,"slope":0,"color":"#00B798"},{"z":53.59,"lon":2.4107,"lat":48.8932,"acc":2.5,"dist":8132.988518732277,"slope":1,"color":"#00B798"},{"z":55.91,"lon":2.4104,"lat":48.8923,"acc":2.5,"dist":8238.612112997744,"slope":2,"color":"#00B798"},{"z":57.34,"lon":2.4101,"lat":48.8914,"acc":2.5,"dist":8344.236725848545,"slope":1,"color":"#00B798"},{"z":59.14,"lon":2.4098,"lat":48.8905,"acc":2.5,"dist":8449.860187983335,"slope":2,"color":"#00B798"},{"z":60.41,"lon":2.4095,"lat":48.8895,"acc":2.5,"dist":8555.484507678293,"slope":1,"color":"#00B798"},{"z":61.24,"lon":2.4091,"lat":48.8886,"acc":2.5,"dist":8661.108761293028,"slope":1,"color":"#00B798"},{"z":63.34,"lon":2.4088,"lat":48.8877,"acc":2.5,"dist":8766.731864167166,"slope":2,"color":"#00B798"},{"z":65.64,"lon":2.4085,"lat":48.8868,"acc":2.5,"dist":8872.355985598235,"slope":2,"color":"#00B798"},{"z":67.77,"lon":2.4082,"lat":48.8858,"acc":2.5,"dist":8977.980040928956,"slope":2,"color":"#00B798"},{"z":69.81,"lon":2.4079,"lat":48.8849,"acc":2.5,"dist":9083.60386913884,"slope":2,"color":"#00B798"},{"z":74.35,"lon":2.4072,"lat":48.883,"acc":2.5,"dist":9294.85257287905,"slope":2,"color":"#00B798"},{"z":86.96,"lon":2.4069,"lat":48.8821,"acc":2.5,"dist":9400.476202726504,"slope":12,"color":"#00B798"},{"z":91.96,"lon":2.4066,"lat":48.8812,"acc":2.5,"dist":9506.100851099545,"slope":5,"color":"#00B798"},{"z":108.68,"lon":2.406,"lat":48.8793,"acc":2.5,"dist":9717.348703745318,"slope":8,"color":"#00B798"},{"z":110.97,"lon":2.4053,"lat":48.8775,"acc":2.5,"dist":9928.597215427711,"slope":1,"color":"#00B798"},{"z":118.72,"lon":2.4047,"lat":48.8756,"acc":2.5,"dist":10139.845462446017,"slope":4,"color":"#00B798"},{"z":120.08,"lon":2.4044,"lat":48.8747,"acc":2.5,"dist":10245.469325676695,"slope":1,"color":"#00B798"},{"z":116.67,"lon":2.4041,"lat":48.8738,"acc":2.5,"dist":10351.094368402635,"slope":3,"color":"#00B798"},{"z":112.08,"lon":2.4037,"lat":48.8729,"acc":2.5,"dist":10456.718099255399,"slope":4,"color":"#00B798"},{"z":107.72,"lon":2.4034,"lat":48.8719,"acc":2.5,"dist":10562.342848577668,"slope":4,"color":"#00B798"},{"z":105.9,"lon":2.4031,"lat":48.871,"acc":2.5,"dist":10667.966447025721,"slope":2,"color":"#00B798"},{"z":103.4,"lon":2.4028,"lat":48.8701,"acc":2.5,"dist":10773.591063932625,"slope":2,"color":"#00B798"},{"z":96.44,"lon":2.4022,"lat":48.8682,"acc":2.5,"dist":10984.839938075422,"slope":3,"color":"#00B798"},{"z":87.59,"lon":2.4018,"lat":48.8673,"acc":2.5,"dist":11090.464195295861,"slope":8,"color":"#00B798"},{"z":87.38,"lon":2.4015,"lat":48.8664,"acc":2.5,"dist":11196.088386280038,"slope":0,"color":"#00B798"},{"z":87.01,"lon":2.4012,"lat":48.8654,"acc":2.5,"dist":11301.712511019186,"slope":0,"color":"#00B798"},{"z":83.08,"lon":2.4009,"lat":48.8645,"acc":2.5,"dist":11407.337654186593,"slope":4,"color":"#00B798"},{"z":82.1,"lon":2.4002,"lat":48.8627,"acc":2.5,"dist":11618.586335039692,"slope":0,"color":"#00B798"},{"z":90.43,"lon":2.3996,"lat":48.8608,"acc":2.5,"dist":11829.834911826123,"slope":4,"color":"#00B798"},{"z":86.82,"lon":2.3993,"lat":48.8599,"acc":2.5,"dist":11935.459401619537,"slope":3,"color":"#00B798"},{"z":73.82,"lon":2.399,"lat":48.859,"acc":2.5,"dist":12041.08398613748,"slope":12,"color":"#00B798"},{"z":64.66,"lon":2.3983,"lat":48.8571,"acc":2.5,"dist":12252.332795264896,"slope":4,"color":"#00B798"},{"z":62,"lon":2.3977,"lat":48.8553,"acc":2.5,"dist":12463.582262832771,"slope":1,"color":"#00B798"},{"z":57.34,"lon":2.3971,"lat":48.8534,"acc":2.5,"dist":12674.831304100151,"slope":2,"color":"#00B798"},{"z":52.14,"lon":2.3964,"lat":48.8515,"acc":2.5,"dist":12886.081164720088,"slope":2,"color":"#00B798"},{"z":50.92,"lon":2.3958,"lat":48.8497,"acc":2.5,"dist":13097.33059893873,"slope":1,"color":"#00B798"},{"z":50.67,"lon":2.3952,"lat":48.8478,"acc":2.5,"dist":13308.579606702622,"slope":0,"color":"#00B798"},{"z":50.28,"lon":2.3945,"lat":48.846,"acc":2.5,"dist":13519.8294336682,"slope":0,"color":"#00B798"},{"z":50.22,"lon":2.3942,"lat":48.8451,"acc":2.5,"dist":13625.453624719368,"slope":0,"color":"#00B798"},{"z":47.03,"lon":2.3939,"lat":48.8441,"acc":2.5,"dist":13731.078834076225,"slope":3,"color":"#00B798"},{"z":49.15,"lon":2.3936,"lat":48.8432,"acc":2.5,"dist":13836.703816022216,"slope":2,"color":"#00B798"},{"z":52.46,"lon":2.3933,"lat":48.8423,"acc":2.5,"dist":13942.327807873258,"slope":3,"color":"#00B798"},{"z":46.39,"lon":2.3929,"lat":48.8414,"acc":2.5,"dist":14047.95265700084,"slope":6,"color":"#00B798"},{"z":46.93,"lon":2.3926,"lat":48.8404,"acc":2.5,"dist":14153.577600721896,"slope":1,"color":"#00B798"},{"z":47.1,"lon":2.3923,"lat":48.8395,"acc":2.5,"dist":14259.20231700606,"slope":0,"color":"#00B798"},{"z":44.43,"lon":2.392,"lat":48.8386,"acc":2.5,"dist":14364.827890551858,"slope":3,"color":"#00B798"},{"z":37.47,"lon":2.3917,"lat":48.8376,"acc":2.5,"dist":14470.45247396486,"slope":7,"color":"#00B798"},{"z":35.77,"lon":2.3913,"lat":48.8367,"acc":2.5,"dist":14576.076990933141,"slope":2,"color":"#00B798"},{"z":39.79,"lon":2.391,"lat":48.8358,"acc":2.5,"dist":14681.702365147457,"slope":4,"color":"#00B798"},{"z":38.32,"lon":2.3907,"lat":48.8349,"acc":2.5,"dist":14787.327672902997,"slope":1,"color":"#00B798"},{"z":38.47,"lon":2.3904,"lat":48.8339,"acc":2.5,"dist":14892.951829484857,"slope":0,"color":"#00B798"},{"z":33.8,"lon":2.3901,"lat":48.833,"acc":2.5,"dist":14998.57700430797,"slope":4,"color":"#00B798"},{"z":33.42,"lon":2.3898,"lat":48.8321,"acc":2.5,"dist":15104.202112652272,"slope":0,"color":"#00B798"},{"z":39.56,"lon":2.3894,"lat":48.8312,"acc":2.5,"dist":15209.82699350239,"slope":6,"color":"#00B798"},{"z":38.4,"lon":2.3891,"lat":48.8302,"acc":2.5,"dist":15315.451807860365,"slope":1,"color":"#00B798"},{"z":38.81,"lon":2.3888,"lat":48.8293,"acc":2.5,"dist":15421.077801453926,"slope":0,"color":"#00B798"},{"z":32.23,"lon":2.3885,"lat":48.8284,"acc":2.5,"dist":15526.702482812725,"slope":6,"color":"#00B798"},{"z":28.05,"lon":2.3882,"lat":48.8275,"acc":2.5,"dist":15632.328021370893,"slope":4,"color":"#00B798"},{"z":28.05,"lon":2.3879,"lat":48.8265,"acc":2.5,"dist":15737.95256970384,"slope":0,"color":"#00B798"},{"z":33.04,"lon":2.3875,"lat":48.8256,"acc":2.5,"dist":15843.57797522418,"slope":5,"color":"#00B798"},{"z":33.12,"lon":2.3869,"lat":48.8237,"acc":2.5,"dist":16054.827662961123,"slope":0,"color":"#00B798"},{"z":34.99,"lon":2.3866,"lat":48.8228,"acc":2.5,"dist":16160.452868874861,"slope":2,"color":"#00B798"},{"z":32.61,"lon":2.3863,"lat":48.8219,"acc":2.5,"dist":16266.07800824124,"slope":2,"color":"#00B798"},{"z":33.61,"lon":2.3856,"lat":48.82,"acc":2.5,"dist":16477.329011018,"slope":0,"color":"#00B798"},{"z":34.02,"lon":2.3853,"lat":48.8191,"acc":2.5,"dist":16582.95378968705,"slope":0,"color":"#00B798"},{"z":34.17,"lon":2.385,"lat":48.8182,"acc":2.5,"dist":16688.579586512464,"slope":0,"color":"#00B798"},{"z":34.74,"lon":2.3844,"lat":48.8163,"acc":2.5,"dist":16899.829895686154,"slope":0,"color":"#00B798"},{"z":33.88,"lon":2.384,"lat":48.8154,"acc":2.5,"dist":17005.45533173977,"slope":1,"color":"#00B798"},{"z":33.54,"lon":2.3837,"lat":48.8145,"acc":2.5,"dist":17111.08086220612,"slope":0,"color":"#00B798"},{"z":34.65,"lon":2.3834,"lat":48.8136,"acc":2.5,"dist":17216.706165053034,"slope":1,"color":"#00B798"},{"z":34.7,"lon":2.3831,"lat":48.8126,"acc":2.5,"dist":17322.331401289357,"slope":0,"color":"#00B798"},{"z":40.31,"lon":2.3828,"lat":48.8117,"acc":2.5,"dist":17427.95657090568,"slope":5,"color":"#00B798"},{"z":48.05,"lon":2.3825,"lat":48.8108,"acc":2.5,"dist":17533.58167389535,"slope":7,"color":"#00B798"},{"z":61.41,"lon":2.3818,"lat":48.8089,"acc":2.5,"dist":17744.83260369798,"slope":6,"color":"#00B798"},{"z":63.92,"lon":2.3815,"lat":48.808,"acc":2.5,"dist":17850.458430498995,"slope":2,"color":"#00B798"},{"z":64.62,"lon":2.3812,"lat":48.8071,"acc":2.5,"dist":17956.08419064945,"slope":1,"color":"#00B798"},{"z":64.35,"lon":2.3809,"lat":48.8061,"acc":2.5,"dist":18061.708799400396,"slope":0,"color":"#00B798"},{"z":64.25,"lon":2.3806,"lat":48.8052,"acc":2.5,"dist":18167.33442622872,"slope":0,"color":"#00B798"},{"z":60.18,"lon":2.3799,"lat":48.8034,"acc":2.5,"dist":18378.586403599762,"slope":2,"color":"#00B798"},{"z":61.06,"lon":2.3793,"lat":48.8015,"acc":2.5,"dist":18589.836868480812,"slope":0,"color":"#00B798"},{"z":61.84,"lon":2.379,"lat":48.8006,"acc":2.5,"dist":18695.463085627343,"slope":1,"color":"#00B798"},{"z":61.02,"lon":2.3787,"lat":48.7997,"acc":2.5,"dist":18801.088151321306,"slope":1,"color":"#00B798"},{"z":65.9,"lon":2.378,"lat":48.7978,"acc":2.5,"dist":19012.3388453001,"slope":2,"color":"#00B798"},{"z":75.48,"lon":2.3774,"lat":48.7959,"acc":2.5,"dist":19223.590518154106,"slope":5,"color":"#00B798"},{"z":79.83,"lon":2.3768,"lat":48.7941,"acc":2.5,"dist":19434.841602043416,"slope":2,"color":"#00B798"},{"z":95.4,"lon":2.3761,"lat":48.7922,"acc":2.5,"dist":19646.09350369705,"slope":7,"color":"#00B798"},{"z":98.43,"lon":2.3755,"lat":48.7904,"acc":2.5,"dist":19857.345138308312,"slope":1,"color":"#00B798"},{"z":97.8,"lon":2.3749,"lat":48.7885,"acc":2.5,"dist":20068.596183798774,"slope":0,"color":"#00B798"},{"z":97.28,"lon":2.3742,"lat":48.7867,"acc":2.5,"dist":20279.848046904917,"slope":0,"color":"#00B798"},{"z":97.51,"lon":2.3739,"lat":48.7858,"acc":2.5,"dist":20385.47379775515,"slope":0,"color":"#00B798"},{"z":97.87,"lon":2.3736,"lat":48.7848,"acc":2.5,"dist":20491.099481800673,"slope":0,"color":"#00B798"},{"z":97.75,"lon":2.3733,"lat":48.7839,"acc":2.5,"dist":20596.726183799517,"slope":0,"color":"#00B798"},{"z":98.18,"lon":2.373,"lat":48.783,"acc":2.5,"dist":20702.351734213273,"slope":0,"color":"#00B798"},{"z":98.23,"lon":2.3726,"lat":48.782,"acc":2.5,"dist":20807.978302569776,"slope":0,"color":"#00B798"},{"z":96.84,"lon":2.3723,"lat":48.7811,"acc":2.5,"dist":20913.60355831398,"slope":1,"color":"#00B798"},{"z":94.9,"lon":2.3717,"lat":48.7793,"acc":2.5,"dist":21124.85603882081,"slope":1,"color":"#00B798"},{"z":94.5,"lon":2.3714,"lat":48.7783,"acc":2.5,"dist":21230.482178802085,"slope":0,"color":"#00B798"},{"z":94.46,"lon":2.3711,"lat":48.7774,"acc":2.5,"dist":21336.108251926882,"slope":0,"color":"#00B798"},{"z":94.18,"lon":2.3707,"lat":48.7765,"acc":2.5,"dist":21441.73409717322,"slope":0,"color":"#00B798"},{"z":94.3,"lon":2.3704,"lat":48.7756,"acc":2.5,"dist":21547.360036563055,"slope":0,"color":"#00B798"},{"z":94.19,"lon":2.3698,"lat":48.7737,"acc":2.5,"dist":21758.611392679002,"slope":0,"color":"#00B798"},{"z":94.42,"lon":2.3692,"lat":48.7719,"acc":2.5,"dist":21969.864650795516,"slope":0,"color":"#00B798"},{"z":95.08,"lon":2.3688,"lat":48.7709,"acc":2.5,"dist":22075.489933710487,"slope":1,"color":"#00B798"},{"z":94.87,"lon":2.3685,"lat":48.77,"acc":2.5,"dist":22181.116395510417,"slope":0,"color":"#00B798"},{"z":94.13,"lon":2.3679,"lat":48.7681,"acc":2.5,"dist":22392.368796333296,"slope":0,"color":"#00B798"},{"z":92.49,"lon":2.3673,"lat":48.7663,"acc":2.5,"dist":22603.620768430457,"slope":1,"color":"#00B798"},{"z":91.26,"lon":2.3666,"lat":48.7644,"acc":2.5,"dist":22814.873557552935,"slope":1,"color":"#00B798"},{"z":89.48,"lon":2.366,"lat":48.7626,"acc":2.5,"dist":23026.12607885949,"slope":1,"color":"#00B798"},{"z":88.85,"lon":2.3654,"lat":48.7607,"acc":2.5,"dist":23237.379095064945,"slope":0,"color":"#00B798"},{"z":87.22,"lon":2.3647,"lat":48.7589,"acc":2.5,"dist":23448.631843355968,"slope":1,"color":"#00B798"},{"z":86.63,"lon":2.3641,"lat":48.757,"acc":2.5,"dist":23659.88432367676,"slope":0,"color":"#00B798"},{"z":86.19,"lon":2.3638,"lat":48.7561,"acc":2.5,"dist":23765.510382826124,"slope":0,"color":"#00B798"},{"z":86.46,"lon":2.3635,"lat":48.7552,"acc":2.5,"dist":23871.137298748323,"slope":0,"color":"#00B798"},{"z":79.6,"lon":2.3628,"lat":48.7533,"acc":2.5,"dist":24082.390005749803,"slope":3,"color":"#00B798"},{"z":85.17,"lon":2.3622,"lat":48.7515,"acc":2.5,"dist":24293.64244462614,"slope":3,"color":"#00B798"},{"z":84.61,"lon":2.3616,"lat":48.7496,"acc":2.5,"dist":24504.895378105193,"slope":0,"color":"#00B798"},{"z":84,"lon":2.3609,"lat":48.7478,"acc":2.5,"dist":24716.14912816361,"slope":0,"color":"#00B798"},{"z":91.3,"lon":2.3603,"lat":48.7459,"acc":2.5,"dist":24927.402609948163,"slope":3,"color":"#00B798"},{"z":85.05,"lon":2.3597,"lat":48.744,"acc":2.5,"dist":25138.655662392124,"slope":3,"color":"#00B798"},{"z":88.53,"lon":2.359,"lat":48.7422,"acc":2.5,"dist":25349.908285441164,"slope":2,"color":"#00B798"},{"z":91.07,"lon":2.3587,"lat":48.7413,"acc":2.5,"dist":25455.53495820814,"slope":2,"color":"#00B798"},{"z":91.45,"lon":2.3584,"lat":48.7403,"acc":2.5,"dist":25561.161563859627,"slope":0,"color":"#00B798"},{"z":86.89,"lon":2.3578,"lat":48.7385,"acc":2.5,"dist":25772.415658612415,"slope":2,"color":"#00B798"},{"z":86.72,"lon":2.3571,"lat":48.7366,"acc":2.5,"dist":25983.669323821745,"slope":0,"color":"#00B798"},{"z":86.58,"lon":2.3565,"lat":48.7348,"acc":2.5,"dist":26194.922720445036,"slope":0,"color":"#00B798"},{"z":86.76,"lon":2.3559,"lat":48.7329,"acc":2.5,"dist":26406.176611230003,"slope":0,"color":"#00B798"},{"z":85.42,"lon":2.3552,"lat":48.7311,"acc":2.5,"dist":26617.430394341663,"slope":1,"color":"#00B798"},{"z":85.28,"lon":2.3546,"lat":48.7292,"acc":2.5,"dist":26828.68358668796,"slope":0,"color":"#00B798"},{"z":84.9,"lon":2.354,"lat":48.7274,"acc":2.5,"dist":27039.93759507291,"slope":0,"color":"#00B798"}]}} \ No newline at end of file diff --git a/samples-src/resources/data/geojson/export-route.geojson b/samples-src/resources/data/geojson/export-route.geojson new file mode 100644 index 000000000..0087ddbfd --- /dev/null +++ b/samples-src/resources/data/geojson/export-route.geojson @@ -0,0 +1 @@ +{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"LineString","coordinates":[[2.588904,48.84180900000001],[2.588796,48.841804999999965]]},"properties":{"popupContent":"(1) distance : 7 m / temps : 0 min","stroke":"#00b798","stroke-opacity":0.9,"stroke-width":12},"id":1},{"type":"Feature","geometry":{"type":"LineString","coordinates":[[2.588796,48.841804999999965],[2.5888200000000006,48.84153900000001]]},"properties":{"popupContent":"(2) distance : 29 m / temps : 0 min","stroke":"#00b798","stroke-opacity":0.9,"stroke-width":12},"id":2},{"type":"Feature","geometry":{"type":"LineString","coordinates":[[2.5888200000000006,48.84153900000001],[2.587649,48.841488999999996],[2.586988,48.84146100000001],[2.586537,48.84144200000003]]},"properties":{"popupContent":"(3) distance : 167 m / temps : 2 min","stroke":"#00b798","stroke-opacity":0.9,"stroke-width":12},"id":3},{"type":"Feature","geometry":{"type":"LineString","coordinates":[[2.586537,48.84144200000003],[2.5865789999999995,48.84093299999998],[2.5865770000000006,48.84091999999998],[2.586567,48.840902],[2.586539,48.84089],[2.586505,48.84088700000001],[2.586226,48.84087600000001]]},"properties":{"popupContent":"(4) distance : 85 m / temps : 1 min","stroke":"#00b798","stroke-opacity":0.9,"stroke-width":12},"id":4},{"type":"Feature","geometry":{"type":"LineString","coordinates":[[2.586226,48.84087600000001],[2.5862319999999994,48.84079700000001],[2.586256,48.840524000000016],[2.586264,48.84043299999999]]},"properties":{"popupContent":"(5) distance : 49 m / temps : 0 min","stroke":"#00b798","stroke-opacity":0.9,"stroke-width":12},"id":5},{"type":"Feature","geometry":{"type":"LineString","coordinates":[[2.586264,48.84043299999999],[2.586264,48.84043299999999]]},"properties":{"popupContent":"(6) distance : 0 m / temps : 0 min","stroke":"#00b798","stroke-opacity":0.9,"stroke-width":12},"id":6},{"type":"Feature","geometry":{"type":"Point","coordinates":[2.588903974691772,48.84180319210205]},"properties":{"description":"Point de départ","marker-symbol":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAmCAYAAABpuqMCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAQxSURBVFiF3ZldaBxVFMd/d2ayTRtjQpo2mlilWBEMshoj+FAERZIHIdA3iw+V1icRREFIQAKNgsUHQfBFwZI2WgWxqYUiVTDBBj9ILC5Nu2tjdjemsR+mSZNNNvsxO8eHTTRuk+zMnQmCf9iHnXvO+Z//nDvn3rmjRIT/C6zAI4ZVFRbtKDpQNCM0AvXANIo/EC4inMbmLBFZDJJaBVaZJ9Sd2HQCrwDbXHikgfewOMKPMh9ECsGIeVx1IHxEsQJeMY3iEMNy2m8aht8AtKpOhH70hADUI/TTqjr9puKvMsUE3vabxCp0MSJHdJ31xRSnVj9BVPcfOCj26U45PTHFh30c/am1EaaxuF+nKejd1WLX2gwhAPXL8T3De2XCqooKbuCu/eoiTZ6dXtch75WxaMeNENOyOXx8kHOpGMPOIudSMQ4fH8S0bBcs25Z5PMF7ZVpVL3BgQxvTsvn6+kVq6sK3jc3NRGhraKZgl9t9HGNEXvCSmvfKKJrL2nQfHVpTCEBNXZjuo0OB8JTAu5jiXmtjPL3vLl/jbnlKoNPN6spaVFbt8jXulqcEOmKSZS0yi5O+xt3ylEBHTLSsxbf913yNu+UpgU4DKE/Sc3AvczORNcfmZiL0HNwbCE8JvItxWDvJ1SjYFm0NzZzpG2RpIYbIIksLMc70Dbpsy+54SqCzzlQAY8B9Xsk8YAJ4gBHJe3HyXpkRyaN407OfN7zlVQjobjTv4BgQ1/ItjzjV9Oo46okZEBuhS8u3PDoZEDf7t9vg903zBLBfP8C/4cAnD87teclIGyFlLoVyllWh8vmQYRgVAOI4OQmFciKSFZFsMpmck1UC/Il5VNViEgHu9StkQYyb7bNNH1wrmDm3PgqWUHLBhl+SyeRV/6czLepJDAbw8fos4HTNb+/9PFv9u3YMU/X6f38/L98B7/gJ8U2uasiPEADTcRqDOozoBn7WcbzqmFOvpnYM+uTPpvP5SDBiimvP8xRPKV3DFpV7fX7HyYyD44M96xicmpqaSgd3TDQsv6J4zYvLx5nqsz/kK29qcyq5kFpafD+RSMSKf4P+CvCY+hJFRzmzmB2KPTvb+JnX8CsdzDGM8/F4/PrqseC/AggvZlGXtyipXc8kLcbCy6mdrg/6lBIbR41DYXR8cjIqIoW17IIXc17+nHnEOnS3VfhiHQt5d7HmVMK2Nn6+DHLiOGMmRLdMVI+NymjZ9Sf4abaMqZbQp01G/rnS60P5rT8duNXw1TpuGaXksmMYlxKJxLiIt23NponhKVV5a874rdZwmlYuTTvmjWdmGj9Mifl3kkpJ2hGJGY4THb9yJS4i2p0t+Gm2ggHJxMNb94eNzIAJZgEKbyxsP5kS00ZJSkG0oFQ0mZyYkKDuqIhs6u/7hyt75luM2RMPVfft3rW7bU9T0z2bxbV50+w/wF8f81R5OpwBhwAAAABJRU5ErkJggg==","marker-size":"medium"}},{"type":"Feature","geometry":{"type":"Point","coordinates":[2.5862700454391456,48.840433323926135]},"properties":{"description":"Point d'arrivée","marker-symbol":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAmCAYAAABpuqMCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAQ+SURBVFiF3ZlLaFxlGIaf/5zJpJNpaoxpYieoCxULEYK7Lqp0IWQhFLooKNKEtNIULxWlQoJgQQWLFMEg0lQMuXgD0dRSkNJFgoy0IrYNSTpj08xMmoxNYhLUyUwyt/O5mFbjmGTOLS58d3O+y/u95/vnvx0lIvxf4HE9Y7PyU0ETwl6gAQgANcA88AswhuIsKc7TJ0k3qZVrnTmqtpGhHeFloMJERArF+3g5Qaf84UYJ7og5rPai+JhCB6xiHuEQp+Ws0zI0pwloU+0oBrAnBKAGxQBtqt1pKc46UyjgHadFrEIHXXLCbrB9MYWhNYAb3f0bBsI+u0POnpijahtpJrA/tDbCPOU8aGdSsPdWM7SzOUIAam7ntwzrnWlWfnzMYW76tYsUy9RaXYesd6aCJswI0Tw5WvuG6EyEOWUk6UyEae0bQvPkTLEUeCzBupjCyl4iqyfHydkxdh3YQ/nWnSjlp3zrTnYd2MPJ2TFTgszwFNNaDaCwRdkYLd1B/NWNa9r81Y20dAdd4SmCHTGBkh6P7bvXkd0sTxHsiKku6eH13+fIbpanCHbExEp6ZJJTjuxmeYpgXYwiVNLnysCMI7tZniLYmc1Kk/Qe3E1ycXhNW3JxmN6Du13hKYIdMWsXuRpGzsOxugYu9Q+RXgojkiS9FOZS/xDH6howcqUPhWZ4imB9B9CmyoBx4AGrZBYwCTxMl2StBFnvTJdkUbxlOc4a3rYqBOxuNHfQC0RsxZZGhAA9dgLtiTkuOYQOW7Gl0c5xMbN/+xecnTQPq89QPGM/wT9hCJ8+MvjQ81pK8yp92ZvxeMpUNuvVNK0MQAwjI15vRkTSIpKOxWK/yyoBzsS0qiq8DAP3OxWylNMWmoL1XTMresZsjIJllIzk4GosFrvl/HbmiHoCYRAHx2cBo2Pknp4v45U3befQVY/z8/sp+Q5410mKC7P+oBMhALphBNy6jHgDxU92Am+t6PFXhrcPOeRPp7LZYXfEdEkWjWeBlJWwnKEyr41s/3rFwHDAnjY0zsTj8ZR710Qfys/Aq1ZCPrlZef7iwpYF25xKRhLLyQ+i0Wi48NPtrwBt6hsofeQNJ7zhp74PfGE1/Z0ZzNC0y5FIZHa1zf2vAFmeS2vqerkuVeu5pPLa0otXa01f9CklOQw1AfnRiampkIjk1/JzX0y3/LrY7Dm0w5f/ah0Pee/GXWeiSc/G/y+NjBjGuA6h8snK8VEZLbn+uD/MbiPe7P283pd9uvh5cMH3Q8uPdd+uE7ailFw3NO1aNBqdELG2rdk0MbSqLb8p7UZVmVF/59F8Wp97Mhg4ncjqfxWplKQMkbBmGKGJ6emIiNie2TZPDHB5v+/xxrtXBnWFnhfyL1yp/ejCXMUMShIKQnmlQrFYbFJcKmJTxQBc3O9789FtmZfOzfjPvT5S068bmWvj09PTm8G16WL+S/wJLybNu1V6htkAAAAASUVORK5CYII=","marker-size":"medium"}}],"geoportail:compute":{"type":"route","points":[[2.588903974691772,48.84180319210205],null,null,null,null,null,[2.5862700454391456,48.840433323926135]],"transport":"Pieton","exclusions":[],"computation":"fastest","results":{"totalTime":304.2,"totalDistance":340.1,"bbox":{"left":2.586226,"right":2.588904,"top":48.841809,"bottom":48.840433},"routeGeometry":null,"routeInstructions":[{"duration":5.2,"distance":7.9,"code":"","instruction":"Départ","geometry":{"coordinates":[[2.588904,48.841809],[2.588796,48.841805]],"type":"LineString"}},{"duration":26.6,"distance":29.6,"code":"","instruction":"Continuer à gauche","geometry":{"coordinates":[[2.588796,48.841805],[2.58882,48.841539]],"type":"LineString"}},{"duration":151.1,"distance":167.5,"code":"","instruction":"Continuer à droite","geometry":{"coordinates":[[2.58882,48.841539],[2.587649,48.841489],[2.586988,48.841461],[2.586537,48.841442]],"type":"LineString"}},{"duration":77.4,"distance":85.7,"code":"","instruction":"Continuer à gauche","geometry":{"coordinates":[[2.586537,48.841442],[2.586579,48.840933],[2.586577,48.84092],[2.586567,48.840902],[2.586539,48.84089],[2.586505,48.840887],[2.586226,48.840876]],"type":"LineString"}},{"duration":43.9,"distance":49.4,"code":"","instruction":"Tourner à gauche sur BD COPERNIC","geometry":{"coordinates":[[2.586226,48.840876],[2.586232,48.840797],[2.586256,48.840524],[2.586264,48.840433]],"type":"LineString"}},{"duration":0,"distance":0,"code":"","instruction":"Arrivée sur BD COPERNIC","geometry":{"coordinates":[[2.586264,48.840433],[2.586264,48.840433]],"type":"LineString"}}]}}} \ No newline at end of file diff --git a/samples-src/resources/data/geojson/map.geojson b/samples-src/resources/data/geojson/map.geojson index 7ec5ed13e..38a586098 100644 --- a/samples-src/resources/data/geojson/map.geojson +++ b/samples-src/resources/data/geojson/map.geojson @@ -4,6 +4,7 @@ { "type": "Feature", "properties": { + "description": "Ceci est un lineaire", "stroke": "#99229b", "stroke-width": 5, "stroke-opacity": 1 @@ -30,6 +31,7 @@ }, { "type": "Feature", "properties": { + "description": "Ceci est une surface", "stroke": "#000000", "stroke-width": 13, "stroke-opacity": 0.8, @@ -50,7 +52,9 @@ } }, { "type": "Feature", - "properties": {}, + "properties": { + "description": "Ceci est une surface (style par defaut)" + }, "geometry": { "type": "Polygon", "coordinates": [ @@ -66,6 +70,8 @@ }, { "type": "Feature", "properties": { + "name": "Icone avec un label", + "description": "Ceci est un icone avec un label", "marker-color": "#d41616", "marker-size": "small", "marker-symbol": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAmCAYAAABpuqMCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAToSURBVFiF3VhdbFNlGH7ec05/F6IUE9GLIYgXXYpXJBBZE0xM9EausIl6ObzBGSHRdnEJ1p+RhnBBNF4YY/xJFigNaIwxLpFYB2WwMWCW0bG1W7eEdUBwQ0fb7fy83nQJjK3nnO90F/okvTnf+7zP+/Q75/ve7wP+R6BGJ4xGo+skSXqFmfcAaAHwFIANAO4CmCai64Zh/OT3+3+Nx+PzjdRumJmOjo71zNwB4B0APguUMjN/vri4mDh27NhcI2poiJloNLqXiL4EEBCg/8XMbx05cuS00zpkh3yKxWKHiOgLAH7BHD4iiuzatcvIZDJnnRTjyEw0Gv2QiD6C8xkmInqxtbVVy2QyvcJJRIm1V+ukkxwrwCCivYlE4gcRslAhBw4ceNzj8RQg9o2YYZaInk0kErN2iZKImtvt/gBrYwQA1gN4X4Roe2ai0eg6IroFa8uvKMo+n+9Ju/uQYleltiGaGnG73eVIJNIfDAa3yLK8Udf1mVwuN55MJneoqmrG91er1ZcBnLJVm51gAKjt7HXhdrvLnZ2d46FQaLcsy80A3LIsN4dCod2dnZ15l8tVaYTOcoh8M0GzgEgk0u/xeEIrjXm93m2RSOSiBZ0Wu4WJmHnaLCAYDG6pN97S0rK5ETrLIWJmg1mALMsbnYzX8ITlimoQMfOPWYCu6zMm4yULOn9brqgGETO3zAJyudx4vfFr164VzXIwc90/ZCWImOk3C0gmkzuq1Wp2pbFyuZxNpVI7zXIQkanOcoiY+d0sQFVVX1dX19ZsNpvWdX0SwKKu65NDQ0Ppw4cPP6dpmtcsBzOn7RZme9P0+XynK5XKZwAeqxenqqqvu7t79wOPNtV+VnDPMAzb5xvbM1NrMb6xy7OJr48ePXrfLkmo0SSijwHcFuFawG0i+lSEKGSm1p4fFOFawEGR9h9weLCKxWLdAN5wkuNBMPPxEydOvC1JksfD7Fsg8riYSdMlFwAosqFqkmQQUcW9sHB/282bcylAX+LbXgCWYT+AFwA84zAPVFWdO9PTM+WWpHcBQCeCAoCJICsMAGAQZGaAGZrLhcubNutbGUVF4rMjxWLR8ZE3Fou1AkjDwX0CM/OVwcHvJwqFomgKDfjO6e0MMpnMVDgc9gIIi+YoTU+fyw4NXXFQBpFh3BFaAJbD6/UeAmClrX8ElXK5dOnixT+c6BuAoUtSoSFm4vG4ZhjGm7DQhD5UhGGoAwMDp1RV1c2jVwHzIsny6WKxOOP4NVvC+fPnZ8Ph8F0Ar1rlFPL5X8bHxuo2pXXADIx4df3kjcnJSWANLs5jsdhJAK+Zxd2bmxv5racnKSBRYeY/oSiDhULhoY3b6dL8CDRN209EL8myvH7VGFW9f6Gv72erOZlJA3GeJWm4ubk5l06ntZXiGj4zANDe3r6nqanpx1Xyc/bq1eOjN26M1cvBTKoEY4IkadiQ5ZF8Pr9gprsmZgCgvb29u6mp6ZHuYKZUupDp7e1ZhVYB0bgEjLr8/tzw8PCiHc2Gv2ZLmJ+fb1MUpdXj8TQvPatWq3f6+/rOPBjHQBnMY4okXX9++/Z8KpUSXtnWbGYAYN++fTsDgUAvEbkMw9AvnDv3ValUugXgHojyMjD6+sTEWBwwGqG3pmYAoK2t7ZNAIPDe1OTUqSuXBr6FouRGR0enAfBaa/+n8S8PPeWMetb8+wAAAABJRU5ErkJggg==" @@ -77,6 +83,7 @@ }, { "type": "Feature", "properties": { + "description": "Ceci est un icone", "marker-color": "#2a13d8", "marker-size": "medium", "marker-symbol": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAmCAYAAABpuqMCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAToSURBVFiF3VhdbFNlGH7ec05/F6IUE9GLIYgXXYpXJBBZE0xM9EausIl6ObzBGSHRdnEJ1p+RhnBBNF4YY/xJFigNaIwxLpFYB2WwMWCW0bG1W7eEdUBwQ0fb7fy83nQJjK3nnO90F/okvTnf+7zP+/Q75/ve7wP+R6BGJ4xGo+skSXqFmfcAaAHwFIANAO4CmCai64Zh/OT3+3+Nx+PzjdRumJmOjo71zNwB4B0APguUMjN/vri4mDh27NhcI2poiJloNLqXiL4EEBCg/8XMbx05cuS00zpkh3yKxWKHiOgLAH7BHD4iiuzatcvIZDJnnRTjyEw0Gv2QiD6C8xkmInqxtbVVy2QyvcJJRIm1V+ukkxwrwCCivYlE4gcRslAhBw4ceNzj8RQg9o2YYZaInk0kErN2iZKImtvt/gBrYwQA1gN4X4Roe2ai0eg6IroFa8uvKMo+n+9Ju/uQYleltiGaGnG73eVIJNIfDAa3yLK8Udf1mVwuN55MJneoqmrG91er1ZcBnLJVm51gAKjt7HXhdrvLnZ2d46FQaLcsy80A3LIsN4dCod2dnZ15l8tVaYTOcoh8M0GzgEgk0u/xeEIrjXm93m2RSOSiBZ0Wu4WJmHnaLCAYDG6pN97S0rK5ETrLIWJmg1mALMsbnYzX8ITlimoQMfOPWYCu6zMm4yULOn9brqgGETO3zAJyudx4vfFr164VzXIwc90/ZCWImOk3C0gmkzuq1Wp2pbFyuZxNpVI7zXIQkanOcoiY+d0sQFVVX1dX19ZsNpvWdX0SwKKu65NDQ0Ppw4cPP6dpmtcsBzOn7RZme9P0+XynK5XKZwAeqxenqqqvu7t79wOPNtV+VnDPMAzb5xvbM1NrMb6xy7OJr48ePXrfLkmo0SSijwHcFuFawG0i+lSEKGSm1p4fFOFawEGR9h9weLCKxWLdAN5wkuNBMPPxEydOvC1JksfD7Fsg8riYSdMlFwAosqFqkmQQUcW9sHB/282bcylAX+LbXgCWYT+AFwA84zAPVFWdO9PTM+WWpHcBQCeCAoCJICsMAGAQZGaAGZrLhcubNutbGUVF4rMjxWLR8ZE3Fou1AkjDwX0CM/OVwcHvJwqFomgKDfjO6e0MMpnMVDgc9gIIi+YoTU+fyw4NXXFQBpFh3BFaAJbD6/UeAmClrX8ElXK5dOnixT+c6BuAoUtSoSFm4vG4ZhjGm7DQhD5UhGGoAwMDp1RV1c2jVwHzIsny6WKxOOP4NVvC+fPnZ8Ph8F0Ar1rlFPL5X8bHxuo2pXXADIx4df3kjcnJSWANLs5jsdhJAK+Zxd2bmxv5racnKSBRYeY/oSiDhULhoY3b6dL8CDRN209EL8myvH7VGFW9f6Gv72erOZlJA3GeJWm4ubk5l06ntZXiGj4zANDe3r6nqanpx1Xyc/bq1eOjN26M1cvBTKoEY4IkadiQ5ZF8Pr9gprsmZgCgvb29u6mp6ZHuYKZUupDp7e1ZhVYB0bgEjLr8/tzw8PCiHc2Gv2ZLmJ+fb1MUpdXj8TQvPatWq3f6+/rOPBjHQBnMY4okXX9++/Z8KpUSXtnWbGYAYN++fTsDgUAvEbkMw9AvnDv3ValUugXgHojyMjD6+sTEWBwwGqG3pmYAoK2t7ZNAIPDe1OTUqSuXBr6FouRGR0enAfBaa/+n8S8PPeWMetb8+wAAAABJRU5ErkJggg==" @@ -88,6 +95,7 @@ }, { "type": "Feature", "properties": { + "description": "Ceci est un icone", "marker-color": "#7e7e7e", "marker-size": "large", "marker-symbol": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAmCAYAAABpuqMCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAToSURBVFiF3VhdbFNlGH7ec05/F6IUE9GLIYgXXYpXJBBZE0xM9EausIl6ObzBGSHRdnEJ1p+RhnBBNF4YY/xJFigNaIwxLpFYB2WwMWCW0bG1W7eEdUBwQ0fb7fy83nQJjK3nnO90F/okvTnf+7zP+/Q75/ve7wP+R6BGJ4xGo+skSXqFmfcAaAHwFIANAO4CmCai64Zh/OT3+3+Nx+PzjdRumJmOjo71zNwB4B0APguUMjN/vri4mDh27NhcI2poiJloNLqXiL4EEBCg/8XMbx05cuS00zpkh3yKxWKHiOgLAH7BHD4iiuzatcvIZDJnnRTjyEw0Gv2QiD6C8xkmInqxtbVVy2QyvcJJRIm1V+ukkxwrwCCivYlE4gcRslAhBw4ceNzj8RQg9o2YYZaInk0kErN2iZKImtvt/gBrYwQA1gN4X4Roe2ai0eg6IroFa8uvKMo+n+9Ju/uQYleltiGaGnG73eVIJNIfDAa3yLK8Udf1mVwuN55MJneoqmrG91er1ZcBnLJVm51gAKjt7HXhdrvLnZ2d46FQaLcsy80A3LIsN4dCod2dnZ15l8tVaYTOcoh8M0GzgEgk0u/xeEIrjXm93m2RSOSiBZ0Wu4WJmHnaLCAYDG6pN97S0rK5ETrLIWJmg1mALMsbnYzX8ITlimoQMfOPWYCu6zMm4yULOn9brqgGETO3zAJyudx4vfFr164VzXIwc90/ZCWImOk3C0gmkzuq1Wp2pbFyuZxNpVI7zXIQkanOcoiY+d0sQFVVX1dX19ZsNpvWdX0SwKKu65NDQ0Ppw4cPP6dpmtcsBzOn7RZme9P0+XynK5XKZwAeqxenqqqvu7t79wOPNtV+VnDPMAzb5xvbM1NrMb6xy7OJr48ePXrfLkmo0SSijwHcFuFawG0i+lSEKGSm1p4fFOFawEGR9h9weLCKxWLdAN5wkuNBMPPxEydOvC1JksfD7Fsg8riYSdMlFwAosqFqkmQQUcW9sHB/282bcylAX+LbXgCWYT+AFwA84zAPVFWdO9PTM+WWpHcBQCeCAoCJICsMAGAQZGaAGZrLhcubNutbGUVF4rMjxWLR8ZE3Fou1AkjDwX0CM/OVwcHvJwqFomgKDfjO6e0MMpnMVDgc9gIIi+YoTU+fyw4NXXFQBpFh3BFaAJbD6/UeAmClrX8ElXK5dOnixT+c6BuAoUtSoSFm4vG4ZhjGm7DQhD5UhGGoAwMDp1RV1c2jVwHzIsny6WKxOOP4NVvC+fPnZ8Ph8F0Ar1rlFPL5X8bHxuo2pXXADIx4df3kjcnJSWANLs5jsdhJAK+Zxd2bmxv5racnKSBRYeY/oSiDhULhoY3b6dL8CDRN209EL8myvH7VGFW9f6Gv72erOZlJA3GeJWm4ubk5l06ntZXiGj4zANDe3r6nqanpx1Xyc/bq1eOjN26M1cvBTKoEY4IkadiQ5ZF8Pr9gprsmZgCgvb29u6mp6ZHuYKZUupDp7e1ZhVYB0bgEjLr8/tzw8PCiHc2Gv2ZLmJ+fb1MUpdXj8TQvPatWq3f6+/rOPBjHQBnMY4okXX9++/Z8KpUSXtnWbGYAYN++fTsDgUAvEbkMw9AvnDv3ValUugXgHojyMjD6+sTEWBwwGqG3pmYAoK2t7ZNAIPDe1OTUqSuXBr6FouRGR0enAfBaa/+n8S8PPeWMetb8+wAAAABJRU5ErkJggg==" @@ -99,6 +107,7 @@ }, { "type": "Feature", "properties": { + "description": "Ceci est un icone", "marker-symbol": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAmCAYAAABpuqMCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAToSURBVFiF3VhdbFNlGH7ec05/F6IUE9GLIYgXXYpXJBBZE0xM9EausIl6ObzBGSHRdnEJ1p+RhnBBNF4YY/xJFigNaIwxLpFYB2WwMWCW0bG1W7eEdUBwQ0fb7fy83nQJjK3nnO90F/okvTnf+7zP+/Q75/ve7wP+R6BGJ4xGo+skSXqFmfcAaAHwFIANAO4CmCai64Zh/OT3+3+Nx+PzjdRumJmOjo71zNwB4B0APguUMjN/vri4mDh27NhcI2poiJloNLqXiL4EEBCg/8XMbx05cuS00zpkh3yKxWKHiOgLAH7BHD4iiuzatcvIZDJnnRTjyEw0Gv2QiD6C8xkmInqxtbVVy2QyvcJJRIm1V+ukkxwrwCCivYlE4gcRslAhBw4ceNzj8RQg9o2YYZaInk0kErN2iZKImtvt/gBrYwQA1gN4X4Roe2ai0eg6IroFa8uvKMo+n+9Ju/uQYleltiGaGnG73eVIJNIfDAa3yLK8Udf1mVwuN55MJneoqmrG91er1ZcBnLJVm51gAKjt7HXhdrvLnZ2d46FQaLcsy80A3LIsN4dCod2dnZ15l8tVaYTOcoh8M0GzgEgk0u/xeEIrjXm93m2RSOSiBZ0Wu4WJmHnaLCAYDG6pN97S0rK5ETrLIWJmg1mALMsbnYzX8ITlimoQMfOPWYCu6zMm4yULOn9brqgGETO3zAJyudx4vfFr164VzXIwc90/ZCWImOk3C0gmkzuq1Wp2pbFyuZxNpVI7zXIQkanOcoiY+d0sQFVVX1dX19ZsNpvWdX0SwKKu65NDQ0Ppw4cPP6dpmtcsBzOn7RZme9P0+XynK5XKZwAeqxenqqqvu7t79wOPNtV+VnDPMAzb5xvbM1NrMb6xy7OJr48ePXrfLkmo0SSijwHcFuFawG0i+lSEKGSm1p4fFOFawEGR9h9weLCKxWLdAN5wkuNBMPPxEydOvC1JksfD7Fsg8riYSdMlFwAosqFqkmQQUcW9sHB/282bcylAX+LbXgCWYT+AFwA84zAPVFWdO9PTM+WWpHcBQCeCAoCJICsMAGAQZGaAGZrLhcubNutbGUVF4rMjxWLR8ZE3Fou1AkjDwX0CM/OVwcHvJwqFomgKDfjO6e0MMpnMVDgc9gIIi+YoTU+fyw4NXXFQBpFh3BFaAJbD6/UeAmClrX8ElXK5dOnixT+c6BuAoUtSoSFm4vG4ZhjGm7DQhD5UhGGoAwMDp1RV1c2jVwHzIsny6WKxOOP4NVvC+fPnZ8Ph8F0Ar1rlFPL5X8bHxuo2pXXADIx4df3kjcnJSWANLs5jsdhJAK+Zxd2bmxv5racnKSBRYeY/oSiDhULhoY3b6dL8CDRN209EL8myvH7VGFW9f6Gv72erOZlJA3GeJWm4ubk5l06ntZXiGj4zANDe3r6nqanpx1Xyc/bq1eOjN26M1cvBTKoEY4IkadiQ5ZF8Pr9gprsmZgCgvb29u6mp6ZHuYKZUupDp7e1ZhVYB0bgEjLr8/tzw8PCiHc2Gv2ZLmJ+fb1MUpdXj8TQvPatWq3f6+/rOPBjHQBnMY4okXX9++/Z8KpUSXtnWbGYAYN++fTsDgUAvEbkMw9AvnDv3ValUugXgHojyMjD6+sTEWBwwGqG3pmYAoK2t7ZNAIPDe1OTUqSuXBr6FouRGR0enAfBaa/+n8S8PPeWMetb8+wAAAABJRU5ErkJggg==" }, "geometry": { @@ -107,7 +116,9 @@ } }, { "type": "Feature", - "properties": {}, + "properties": { + "description": "Ceci est un icone (style par defaut)" + }, "geometry": { "type": "Point", "coordinates": [2.3853628548039062, 48.89613168160397] @@ -115,25 +126,55 @@ }, { "type": "Feature", "properties": { - "name": "Ceci est un label" + "name": "Ceci est un label (style par defaut)" }, "geometry": { "type": "Point", - "coordinates": [2.3953628548039062, 48.89613168160397] + "coordinates": [2.3953628548039062, 48.87613168160397] } }, { "type": "Feature", "properties": { - "name": "Ceci est un cercle", - "stroke": "#000000", - "stroke-width": 1, - "stroke-opacity": 0.8, - "fill": "#a03737", - "fill-opacity": 0.5 + "description": "Ceci est un cercle", + "circle-stroke": "#000000", + "circle-stroke-width": 1, + "circle-stroke-opacity": 0.8, + "circle-fill": "#a03737", + "circle-fill-opacity": 0.5, + "circle-radius":10 + }, + "geometry": { + "type": "Point", + "coordinates": [2.4053628548039062, 48.88613168160397] + } + }, { + "type": "Feature", + "properties": { + "name": "Ceci est un label", + "label-stroke": "#a03737", + "label-stroke-width": 10, + "label-stroke-opacity": 0.8, + "label-fill": "#000000", + "label-fill-opacity": 0.5 + }, + "geometry": { + "type": "Point", + "coordinates": [2.4153628548039062, 48.89613168160397] + } + }, { + "type": "Feature", + "properties": { + "name": "Ceci est un cercle avec label", + "circle-stroke": "#000000", + "circle-stroke-width": 2, + "circle-stroke-opacity": 0.8, + "circle-fill": "#a03737", + "circle-fill-opacity": 0.5, + "circle-radius" : 15 }, "geometry": { "type": "Point", - "coordinates": [2.4053628548039062, 48.89613168160397] + "coordinates": [2.4053628548039062, 48.90613168160397] } } ] diff --git a/samples-src/resources/data/gpx/Campomoro-Tizzano-Sartene_3029.gpx b/samples-src/resources/data/gpx/Campomoro-Tizzano-Sartene_3029.gpx index e69681c40..05948db6e 100644 --- a/samples-src/resources/data/gpx/Campomoro-Tizzano-Sartene_3029.gpx +++ b/samples-src/resources/data/gpx/Campomoro-Tizzano-Sartene_3029.gpx @@ -1,1191 +1,1628 @@ - - - - Garmin International - - - - - - 15.000000 - 003 - 21/08/2005 - 21/08/2005 - Waypoint - - small - - - - 40.000000 - 004 - 21/08/2005 - 21/08/2005 - Waypoint - - #ffffff - 0.5 - #ff0000 - 2 - - - - 36.000000 - 005 - 21/08/2005 - 21/08/2005 - Waypoint - - - 5.000000 - Tivell - 21/08/2005 - 21/08/2005 - Waypoint - - medium - data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAmCAYAAABpuqMCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAToSURBVFiF3VhdbFNlGH7ec05/F6IUE9GLIYgXXYpXJBBZE0xM9EausIl6ObzBGSHRdnEJ1p+RhnBBNF4YY/xJFigNaIwxLpFYB2WwMWCW0bG1W7eEdUBwQ0fb7fy83nQJjK3nnO90F/okvTnf+7zP+/Q75/ve7wP+R6BGJ4xGo+skSXqFmfcAaAHwFIANAO4CmCai64Zh/OT3+3+Nx+PzjdRumJmOjo71zNwB4B0APguUMjN/vri4mDh27NhcI2poiJloNLqXiL4EEBCg/8XMbx05cuS00zpkh3yKxWKHiOgLAH7BHD4iiuzatcvIZDJnnRTjyEw0Gv2QiD6C8xkmInqxtbVVy2QyvcJJRIm1V+ukkxwrwCCivYlE4gcRslAhBw4ceNzj8RQg9o2YYZaInk0kErN2iZKImtvt/gBrYwQA1gN4X4Roe2ai0eg6IroFa8uvKMo+n+9Ju/uQYleltiGaGnG73eVIJNIfDAa3yLK8Udf1mVwuN55MJneoqmrG91er1ZcBnLJVm51gAKjt7HXhdrvLnZ2d46FQaLcsy80A3LIsN4dCod2dnZ15l8tVaYTOcoh8M0GzgEgk0u/xeEIrjXm93m2RSOSiBZ0Wu4WJmHnaLCAYDG6pN97S0rK5ETrLIWJmg1mALMsbnYzX8ITlimoQMfOPWYCu6zMm4yULOn9brqgGETO3zAJyudx4vfFr164VzXIwc90/ZCWImOk3C0gmkzuq1Wp2pbFyuZxNpVI7zXIQkanOcoiY+d0sQFVVX1dX19ZsNpvWdX0SwKKu65NDQ0Ppw4cPP6dpmtcsBzOn7RZme9P0+XynK5XKZwAeqxenqqqvu7t79wOPNtV+VnDPMAzb5xvbM1NrMb6xy7OJr48ePXrfLkmo0SSijwHcFuFawG0i+lSEKGSm1p4fFOFawEGR9h9weLCKxWLdAN5wkuNBMPPxEydOvC1JksfD7Fsg8riYSdMlFwAosqFqkmQQUcW9sHB/282bcylAX+LbXgCWYT+AFwA84zAPVFWdO9PTM+WWpHcBQCeCAoCJICsMAGAQZGaAGZrLhcubNutbGUVF4rMjxWLR8ZE3Fou1AkjDwX0CM/OVwcHvJwqFomgKDfjO6e0MMpnMVDgc9gIIi+YoTU+fyw4NXXFQBpFh3BFaAJbD6/UeAmClrX8ElXK5dOnixT+c6BuAoUtSoSFm4vG4ZhjGm7DQhD5UhGGoAwMDp1RV1c2jVwHzIsny6WKxOOP4NVvC+fPnZ8Ph8F0Ar1rlFPL5X8bHxuo2pXXADIx4df3kjcnJSWANLs5jsdhJAK+Zxd2bmxv5racnKSBRYeY/oSiDhULhoY3b6dL8CDRN209EL8myvH7VGFW9f6Gv72erOZlJA3GeJWm4ubk5l06ntZXiGj4zANDe3r6nqanpx1Xyc/bq1eOjN26M1cvBTKoEY4IkadiQ5ZF8Pr9gprsmZgCgvb29u6mp6ZHuYKZUupDp7e1ZhVYB0bgEjLr8/tzw8PCiHc2Gv2ZLmJ+fb1MUpdXj8TQvPatWq3f6+/rOPBjHQBnMY4okXX9++/Z8KpUSXtnWbGYAYN++fTsDgUAvEbkMw9AvnDv3ValUugXgHojyMjD6+sTEWBwwGqG3pmYAoK2t7ZNAIPDe1OTUqSuXBr6FouRGR0enAfBaa/+n8S8PPeWMetb8+wAAAABJRU5ErkJggg== - #ffffff - - - - 5.000000 - Tivell2 - 21/08/2005 - 21/08/2005 - Waypoint - - #ff0000 - small - data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAmCAYAAABpuqMCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAToSURBVFiF3VhdbFNlGH7ec05/F6IUE9GLIYgXXYpXJBBZE0xM9EausIl6ObzBGSHRdnEJ1p+RhnBBNF4YY/xJFigNaIwxLpFYB2WwMWCW0bG1W7eEdUBwQ0fb7fy83nQJjK3nnO90F/okvTnf+7zP+/Q75/ve7wP+R6BGJ4xGo+skSXqFmfcAaAHwFIANAO4CmCai64Zh/OT3+3+Nx+PzjdRumJmOjo71zNwB4B0APguUMjN/vri4mDh27NhcI2poiJloNLqXiL4EEBCg/8XMbx05cuS00zpkh3yKxWKHiOgLAH7BHD4iiuzatcvIZDJnnRTjyEw0Gv2QiD6C8xkmInqxtbVVy2QyvcJJRIm1V+ukkxwrwCCivYlE4gcRslAhBw4ceNzj8RQg9o2YYZaInk0kErN2iZKImtvt/gBrYwQA1gN4X4Roe2ai0eg6IroFa8uvKMo+n+9Ju/uQYleltiGaGnG73eVIJNIfDAa3yLK8Udf1mVwuN55MJneoqmrG91er1ZcBnLJVm51gAKjt7HXhdrvLnZ2d46FQaLcsy80A3LIsN4dCod2dnZ15l8tVaYTOcoh8M0GzgEgk0u/xeEIrjXm93m2RSOSiBZ0Wu4WJmHnaLCAYDG6pN97S0rK5ETrLIWJmg1mALMsbnYzX8ITlimoQMfOPWYCu6zMm4yULOn9brqgGETO3zAJyudx4vfFr164VzXIwc90/ZCWImOk3C0gmkzuq1Wp2pbFyuZxNpVI7zXIQkanOcoiY+d0sQFVVX1dX19ZsNpvWdX0SwKKu65NDQ0Ppw4cPP6dpmtcsBzOn7RZme9P0+XynK5XKZwAeqxenqqqvu7t79wOPNtV+VnDPMAzb5xvbM1NrMb6xy7OJr48ePXrfLkmo0SSijwHcFuFawG0i+lSEKGSm1p4fFOFawEGR9h9weLCKxWLdAN5wkuNBMPPxEydOvC1JksfD7Fsg8riYSdMlFwAosqFqkmQQUcW9sHB/282bcylAX+LbXgCWYT+AFwA84zAPVFWdO9PTM+WWpHcBQCeCAoCJICsMAGAQZGaAGZrLhcubNutbGUVF4rMjxWLR8ZE3Fou1AkjDwX0CM/OVwcHvJwqFomgKDfjO6e0MMpnMVDgc9gIIi+YoTU+fyw4NXXFQBpFh3BFaAJbD6/UeAmClrX8ElXK5dOnixT+c6BuAoUtSoSFm4vG4ZhjGm7DQhD5UhGGoAwMDp1RV1c2jVwHzIsny6WKxOOP4NVvC+fPnZ8Ph8F0Ar1rlFPL5X8bHxuo2pXXADIx4df3kjcnJSWANLs5jsdhJAK+Zxd2bmxv5racnKSBRYeY/oSiDhULhoY3b6dL8CDRN209EL8myvH7VGFW9f6Gv72erOZlJA3GeJWm4ubk5l06ntZXiGj4zANDe3r6nqanpx1Xyc/bq1eOjN26M1cvBTKoEY4IkadiQ5ZF8Pr9gprsmZgCgvb29u6mp6ZHuYKZUupDp7e1ZhVYB0bgEjLr8/tzw8PCiHc2Gv2ZLmJ+fb1MUpdXj8TQvPatWq3f6+/rOPBjHQBnMY4okXX9++/Z8KpUSXtnWbGYAYN++fTsDgUAvEbkMw9AvnDv3ValUugXgHojyMjD6+sTEWBwwGqG3pmYAoK2t7ZNAIPDe1OTUqSuXBr6FouRGR0enAfBaa/+n8S8PPeWMetb8+wAAAABJRU5ErkJggg== - - - - 5.000000 - Tivell3 - 21/08/2005 - 21/08/2005 - Waypoint - - large - data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAmCAYAAABpuqMCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAToSURBVFiF3VhdbFNlGH7ec05/F6IUE9GLIYgXXYpXJBBZE0xM9EausIl6ObzBGSHRdnEJ1p+RhnBBNF4YY/xJFigNaIwxLpFYB2WwMWCW0bG1W7eEdUBwQ0fb7fy83nQJjK3nnO90F/okvTnf+7zP+/Q75/ve7wP+R6BGJ4xGo+skSXqFmfcAaAHwFIANAO4CmCai64Zh/OT3+3+Nx+PzjdRumJmOjo71zNwB4B0APguUMjN/vri4mDh27NhcI2poiJloNLqXiL4EEBCg/8XMbx05cuS00zpkh3yKxWKHiOgLAH7BHD4iiuzatcvIZDJnnRTjyEw0Gv2QiD6C8xkmInqxtbVVy2QyvcJJRIm1V+ukkxwrwCCivYlE4gcRslAhBw4ceNzj8RQg9o2YYZaInk0kErN2iZKImtvt/gBrYwQA1gN4X4Roe2ai0eg6IroFa8uvKMo+n+9Ju/uQYleltiGaGnG73eVIJNIfDAa3yLK8Udf1mVwuN55MJneoqmrG91er1ZcBnLJVm51gAKjt7HXhdrvLnZ2d46FQaLcsy80A3LIsN4dCod2dnZ15l8tVaYTOcoh8M0GzgEgk0u/xeEIrjXm93m2RSOSiBZ0Wu4WJmHnaLCAYDG6pN97S0rK5ETrLIWJmg1mALMsbnYzX8ITlimoQMfOPWYCu6zMm4yULOn9brqgGETO3zAJyudx4vfFr164VzXIwc90/ZCWImOk3C0gmkzuq1Wp2pbFyuZxNpVI7zXIQkanOcoiY+d0sQFVVX1dX19ZsNpvWdX0SwKKu65NDQ0Ppw4cPP6dpmtcsBzOn7RZme9P0+XynK5XKZwAeqxenqqqvu7t79wOPNtV+VnDPMAzb5xvbM1NrMb6xy7OJr48ePXrfLkmo0SSijwHcFuFawG0i+lSEKGSm1p4fFOFawEGR9h9weLCKxWLdAN5wkuNBMPPxEydOvC1JksfD7Fsg8riYSdMlFwAosqFqkmQQUcW9sHB/282bcylAX+LbXgCWYT+AFwA84zAPVFWdO9PTM+WWpHcBQCeCAoCJICsMAGAQZGaAGZrLhcubNutbGUVF4rMjxWLR8ZE3Fou1AkjDwX0CM/OVwcHvJwqFomgKDfjO6e0MMpnMVDgc9gIIi+YoTU+fyw4NXXFQBpFh3BFaAJbD6/UeAmClrX8ElXK5dOnixT+c6BuAoUtSoSFm4vG4ZhjGm7DQhD5UhGGoAwMDp1RV1c2jVwHzIsny6WKxOOP4NVvC+fPnZ8Ph8F0Ar1rlFPL5X8bHxuo2pXXADIx4df3kjcnJSWANLs5jsdhJAK+Zxd2bmxv5racnKSBRYeY/oSiDhULhoY3b6dL8CDRN209EL8myvH7VGFW9f6Gv72erOZlJA3GeJWm4ubk5l06ntZXiGj4zANDe3r6nqanpx1Xyc/bq1eOjN26M1cvBTKoEY4IkadiQ5ZF8Pr9gprsmZgCgvb29u6mp6ZHuYKZUupDp7e1ZhVYB0bgEjLr8/tzw8PCiHc2Gv2ZLmJ+fb1MUpdXj8TQvPatWq3f6+/rOPBjHQBnMY4okXX9++/Z8KpUSXtnWbGYAYN++fTsDgUAvEbkMw9AvnDv3ValUugXgHojyMjD6+sTEWBwwGqG3pmYAoK2t7ZNAIPDe1OTUqSuXBr6FouRGR0enAfBaa/+n8S8PPeWMetb8+wAAAABJRU5ErkJggg== - - - - circuit_litoral_montagne - 1 - - - 5.000000 - - - 7.000000 - - - 17.000000 - - - 27.000000 - - - 28.000000 - - - 50.000000 - - - 61.000000 - - - 68.000000 - - - 91.000000 - - - 93.000000 - - - 111.000000 - - - 110.000000 - - - 115.000000 - - - 105.000000 - - - 106.000000 - - - 92.000000 - - - 80.000000 - - - 54.000000 - - - 34.000000 - - - 15.000000 - - - 32.000000 - - - 13.000000 - - - 15.000000 - - - 18.000000 - - - 14.000000 - - - 10.000000 - - - 15.000000 - - - 11.000000 - - - 26.000000 - - - 12.000000 - - - 13.000000 - - - 12.000000 - - - 14.000000 - - - 13.000000 - - - 15.000000 - - - 12.000000 - - - 18.000000 - - - 18.000000 - - - 5.000000 - - - 8.000000 - - - 9.000000 - - - 46.000000 - - - 29.000000 - - - 13.000000 - - - 7.000000 - - - 7.000000 - - - 26.000000 - - - 62.000000 - - - 66.000000 - - - 69.000000 - - - 67.000000 - - - 54.000000 - - - 44.000000 - - - 37.000000 - - - 12.000000 - - - 4.000000 - - - 6.000000 - - - 6.000000 - - - 13.000000 - - - 10.000000 - - - 10.000000 - - - 13.000000 - - - 16.000000 - - - 13.000000 - - - 13.000000 - - - 12.000000 - - - 12.000000 - - - 24.000000 - - - 25.000000 - - - 16.000000 - - - 14.000000 - - - 15.000000 - - - 14.000000 - - - 29.000000 - - - 29.000000 - - - 40.000000 - - - 31.000000 - - - 14.000000 - - - 15.000000 - - - 8.000000 - - - 9.000000 - - - 13.000000 - - - 8.000000 - - - 5.000000 - - - 13.000000 - - - 14.000000 - - - 1.000000 - - - 16.000000 - - - 10.000000 - - - 11.000000 - - - 28.000000 - - - 44.000000 - - - 48.000000 - - - 12.000000 - - - 6.000000 - - - 3.000000 - - - 6.000000 - - - 5.000000 - - - 23.000000 - - - 13.000000 - - - 18.000000 - - - 27.000000 - - - 14.000000 - - - 11.000000 - - - 8.000000 - - - 8.000000 - - - 10.000000 - - - 7.000000 - - - 12.000000 - - - 12.000000 - - - -1.000000 - - - - - 7.000000 - - - 17.000000 - - - 10.000000 - - - 22.000000 - - - 17.000000 - - - 6.000000 - - - 18.000000 - - - 23.000000 - - - 19.000000 - - - 10.000000 - - - -1.000000 - - - -1.000000 - - - - - 1.000000 - - - - - - - 5.000000 - - - 4.000000 - - - 2.000000 - - - 6.000000 - - - 3.000000 - - - 7.000000 - - - 7.000000 - - - 7.000000 - - - 5.000000 - - - 5.000000 - - - 2.000000 - - - 8.000000 - - - 14.000000 - - - 16.000000 - - - 24.000000 - - - 25.000000 - - - 21.000000 - - - 36.000000 - - - 39.000000 - - - 34.000000 - - - 29.000000 - - - 34.000000 - - - 41.000000 - - - 37.000000 - - - 38.000000 - - - 48.000000 - - - 60.000000 - - - 73.000000 - - - 83.000000 - - - 78.000000 - - - 81.000000 - - - 80.000000 - - - 73.000000 - - - 68.000000 - - - 60.000000 - - - 57.000000 - - - 57.000000 - - - 58.000000 - - - 58.000000 - - - 56.000000 - - - 50.000000 - - - 56.000000 - - - 59.000000 - - - 65.000000 - - - 65.000000 - - - 68.000000 - - - 81.000000 - - - 83.000000 - - - 88.000000 - - - 92.000000 - - - 97.000000 - - - 100.000000 - - - 103.000000 - - - 108.000000 - - - 115.000000 - - - 120.000000 - - - 122.000000 - - - 125.000000 - - - 126.000000 - - - 127.000000 - - - 132.000000 - - - 135.000000 - - - 144.000000 - - - 150.000000 - - - 152.000000 - - - 179.000000 - - - 200.000000 - - - 208.000000 - - - 209.000000 - - - 218.000000 - - - 219.000000 - - - 230.000000 - - - 232.000000 - - - 239.000000 - - - 245.000000 - - - 253.000000 - - - 265.000000 - - - 274.000000 - - - 276.000000 - - - 284.000000 - - - 288.000000 - - - 288.000000 - - - 292.000000 - - - 292.000000 - - - 289.000000 - - - 302.000000 - - - 310.000000 - - - 315.000000 - - - 324.000000 - - - 329.000000 - - - 335.000000 - - - 342.000000 - - - 345.000000 - - - 350.000000 - - - 352.000000 - - - 342.000000 - - - 339.000000 - - - 325.000000 - - - 316.000000 - - - 306.000000 - - - 301.000000 - - - 294.000000 - - - 286.000000 - - - 284.000000 - - - 281.000000 - - - 276.000000 - - - 277.000000 - - - 277.000000 - - - 282.000000 - - - 299.000000 - - - 316.000000 - - - 325.000000 - - - 329.000000 - - - 338.000000 - - - 346.000000 - - - 357.000000 - - - 369.000000 - - - 376.000000 - - - 381.000000 - - - 393.000000 - - - 395.000000 - - - 386.000000 - - - 383.000000 - - - 376.000000 - - - 375.000000 - - - 366.000000 - - - 359.000000 - - - 357.000000 - - - 351.000000 - - - 347.000000 - - - 343.000000 - - - 342.000000 - - - 338.000000 - - - 325.000000 - - - 319.000000 - - - 311.000000 - - - 310.000000 - - - 304.000000 - - - 300.000000 - - - 291.000000 - - - 283.000000 - - - 269.000000 - - - 259.000000 - - - 254.000000 - - - 250.000000 - - - 243.000000 - - - 242.000000 - - - 239.000000 - - - 235.000000 - - - 235.000000 - - - 231.000000 - - - 228.000000 - - - 222.000000 - - - 217.000000 - - - 214.000000 - - - 213.000000 - - - 199.000000 - - - 193.000000 - - - 187.000000 - - - 185.000000 - - - 183.000000 - - - 179.000000 - - - 160.000000 - - - 148.000000 - - - 134.000000 - - - 121.000000 - - - 110.000000 - - - 104.000000 - - - 102.000000 - - - 100.000000 - - - 85.000000 - - - 73.000000 - - - 71.000000 - - - 68.000000 - - - 63.000000 - - - 59.000000 - - - 43.000000 - - - 33.000000 - - - 30.000000 - - - 18.000000 - - - 15.000000 - - - 13.000000 - - - - #ff0000 - 12 - 0.5 - - - - circuit_litoral_montagne 2 - 1 - - - 5.000000 - - - 7.000000 - - - 17.000000 - - - 27.000000 - - - 28.000000 - - - 50.000000 - - - 61.000000 - - - 68.000000 - - - 91.000000 - - - 93.000000 - - - 111.000000 - - - 110.000000 - - - 115.000000 - - - 105.000000 - - - 106.000000 - - - 92.000000 - - - 80.000000 - - - 54.000000 - - - 34.000000 - - - 15.000000 - - - 32.000000 - - - 13.000000 - - - 15.000000 - - - 18.000000 - - - 14.000000 - - - 10.000000 - - - 15.000000 - - - 11.000000 - - - 26.000000 - - - 12.000000 - - - 13.000000 - - - 12.000000 - - - 14.000000 - - - 13.000000 - - - 15.000000 - - - 12.000000 - - - 18.000000 - - - 18.000000 - - - 5.000000 - - - 8.000000 - - - 9.000000 - - - 46.000000 - - - 29.000000 - - - 13.000000 - - - 7.000000 - - - 7.000000 - - - 26.000000 - - - 62.000000 - - - 66.000000 - - - 69.000000 - - - 67.000000 - - - 54.000000 - - - 44.000000 - - - 37.000000 - - - - - #ff00ff - 3 - 1 - - + + + + Garmin International + + + + + + 15.000000 + label uniquement + 21/08/2005 + 21/08/2005 + Waypoint + + #ff00ff + 3 + 1 + #ffffff + 1 + + + + 15.000000 + icone small avec label + 21/08/2005 + 21/08/2005 + Waypoint + + small + + + + 40.000000 + cercle avec label + 21/08/2005 + 21/08/2005 + Waypoint + + #0000ff + 0.5 + #000000 + 5 + 10 + + + + 36.000000 + 21/08/2005 + icone par defaut sans label + Waypoint + + + 5.000000 + icone medium avec label + 21/08/2005 + 21/08/2005 + Waypoint + + medium + data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAmCAYAAABpuqMCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAToSURBVFiF3VhdbFNlGH7ec05/F6IUE9GLIYgXXYpXJBBZE0xM9EausIl6ObzBGSHRdnEJ1p+RhnBBNF4YY/xJFigNaIwxLpFYB2WwMWCW0bG1W7eEdUBwQ0fb7fy83nQJjK3nnO90F/okvTnf+7zP+/Q75/ve7wP+R6BGJ4xGo+skSXqFmfcAaAHwFIANAO4CmCai64Zh/OT3+3+Nx+PzjdRumJmOjo71zNwB4B0APguUMjN/vri4mDh27NhcI2poiJloNLqXiL4EEBCg/8XMbx05cuS00zpkh3yKxWKHiOgLAH7BHD4iiuzatcvIZDJnnRTjyEw0Gv2QiD6C8xkmInqxtbVVy2QyvcJJRIm1V+ukkxwrwCCivYlE4gcRslAhBw4ceNzj8RQg9o2YYZaInk0kErN2iZKImtvt/gBrYwQA1gN4X4Roe2ai0eg6IroFa8uvKMo+n+9Ju/uQYleltiGaGnG73eVIJNIfDAa3yLK8Udf1mVwuN55MJneoqmrG91er1ZcBnLJVm51gAKjt7HXhdrvLnZ2d46FQaLcsy80A3LIsN4dCod2dnZ15l8tVaYTOcoh8M0GzgEgk0u/xeEIrjXm93m2RSOSiBZ0Wu4WJmHnaLCAYDG6pN97S0rK5ETrLIWJmg1mALMsbnYzX8ITlimoQMfOPWYCu6zMm4yULOn9brqgGETO3zAJyudx4vfFr164VzXIwc90/ZCWImOk3C0gmkzuq1Wp2pbFyuZxNpVI7zXIQkanOcoiY+d0sQFVVX1dX19ZsNpvWdX0SwKKu65NDQ0Ppw4cPP6dpmtcsBzOn7RZme9P0+XynK5XKZwAeqxenqqqvu7t79wOPNtV+VnDPMAzb5xvbM1NrMb6xy7OJr48ePXrfLkmo0SSijwHcFuFawG0i+lSEKGSm1p4fFOFawEGR9h9weLCKxWLdAN5wkuNBMPPxEydOvC1JksfD7Fsg8riYSdMlFwAosqFqkmQQUcW9sHB/282bcylAX+LbXgCWYT+AFwA84zAPVFWdO9PTM+WWpHcBQCeCAoCJICsMAGAQZGaAGZrLhcubNutbGUVF4rMjxWLR8ZE3Fou1AkjDwX0CM/OVwcHvJwqFomgKDfjO6e0MMpnMVDgc9gIIi+YoTU+fyw4NXXFQBpFh3BFaAJbD6/UeAmClrX8ElXK5dOnixT+c6BuAoUtSoSFm4vG4ZhjGm7DQhD5UhGGoAwMDp1RV1c2jVwHzIsny6WKxOOP4NVvC+fPnZ8Ph8F0Ar1rlFPL5X8bHxuo2pXXADIx4df3kjcnJSWANLs5jsdhJAK+Zxd2bmxv5racnKSBRYeY/oSiDhULhoY3b6dL8CDRN209EL8myvH7VGFW9f6Gv72erOZlJA3GeJWm4ubk5l06ntZXiGj4zANDe3r6nqanpx1Xyc/bq1eOjN26M1cvBTKoEY4IkadiQ5ZF8Pr9gprsmZgCgvb29u6mp6ZHuYKZUupDp7e1ZhVYB0bgEjLr8/tzw8PCiHc2Gv2ZLmJ+fb1MUpdXj8TQvPatWq3f6+/rOPBjHQBnMY4okXX9++/Z8KpUSXtnWbGYAYN++fTsDgUAvEbkMw9AvnDv3ValUugXgHojyMjD6+sTEWBwwGqG3pmYAoK2t7ZNAIPDe1OTUqSuXBr6FouRGR0enAfBaa/+n8S8PPeWMetb8+wAAAABJRU5ErkJggg== + #ffffff + + + + 5.000000 + icone small red avec label + 21/08/2005 + 21/08/2005 + Waypoint + + #ff0000 + small + data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAmCAYAAABpuqMCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAToSURBVFiF3VhdbFNlGH7ec05/F6IUE9GLIYgXXYpXJBBZE0xM9EausIl6ObzBGSHRdnEJ1p+RhnBBNF4YY/xJFigNaIwxLpFYB2WwMWCW0bG1W7eEdUBwQ0fb7fy83nQJjK3nnO90F/okvTnf+7zP+/Q75/ve7wP+R6BGJ4xGo+skSXqFmfcAaAHwFIANAO4CmCai64Zh/OT3+3+Nx+PzjdRumJmOjo71zNwB4B0APguUMjN/vri4mDh27NhcI2poiJloNLqXiL4EEBCg/8XMbx05cuS00zpkh3yKxWKHiOgLAH7BHD4iiuzatcvIZDJnnRTjyEw0Gv2QiD6C8xkmInqxtbVVy2QyvcJJRIm1V+ukkxwrwCCivYlE4gcRslAhBw4ceNzj8RQg9o2YYZaInk0kErN2iZKImtvt/gBrYwQA1gN4X4Roe2ai0eg6IroFa8uvKMo+n+9Ju/uQYleltiGaGnG73eVIJNIfDAa3yLK8Udf1mVwuN55MJneoqmrG91er1ZcBnLJVm51gAKjt7HXhdrvLnZ2d46FQaLcsy80A3LIsN4dCod2dnZ15l8tVaYTOcoh8M0GzgEgk0u/xeEIrjXm93m2RSOSiBZ0Wu4WJmHnaLCAYDG6pN97S0rK5ETrLIWJmg1mALMsbnYzX8ITlimoQMfOPWYCu6zMm4yULOn9brqgGETO3zAJyudx4vfFr164VzXIwc90/ZCWImOk3C0gmkzuq1Wp2pbFyuZxNpVI7zXIQkanOcoiY+d0sQFVVX1dX19ZsNpvWdX0SwKKu65NDQ0Ppw4cPP6dpmtcsBzOn7RZme9P0+XynK5XKZwAeqxenqqqvu7t79wOPNtV+VnDPMAzb5xvbM1NrMb6xy7OJr48ePXrfLkmo0SSijwHcFuFawG0i+lSEKGSm1p4fFOFawEGR9h9weLCKxWLdAN5wkuNBMPPxEydOvC1JksfD7Fsg8riYSdMlFwAosqFqkmQQUcW9sHB/282bcylAX+LbXgCWYT+AFwA84zAPVFWdO9PTM+WWpHcBQCeCAoCJICsMAGAQZGaAGZrLhcubNutbGUVF4rMjxWLR8ZE3Fou1AkjDwX0CM/OVwcHvJwqFomgKDfjO6e0MMpnMVDgc9gIIi+YoTU+fyw4NXXFQBpFh3BFaAJbD6/UeAmClrX8ElXK5dOnixT+c6BuAoUtSoSFm4vG4ZhjGm7DQhD5UhGGoAwMDp1RV1c2jVwHzIsny6WKxOOP4NVvC+fPnZ8Ph8F0Ar1rlFPL5X8bHxuo2pXXADIx4df3kjcnJSWANLs5jsdhJAK+Zxd2bmxv5racnKSBRYeY/oSiDhULhoY3b6dL8CDRN209EL8myvH7VGFW9f6Gv72erOZlJA3GeJWm4ubk5l06ntZXiGj4zANDe3r6nqanpx1Xyc/bq1eOjN26M1cvBTKoEY4IkadiQ5ZF8Pr9gprsmZgCgvb29u6mp6ZHuYKZUupDp7e1ZhVYB0bgEjLr8/tzw8PCiHc2Gv2ZLmJ+fb1MUpdXj8TQvPatWq3f6+/rOPBjHQBnMY4okXX9++/Z8KpUSXtnWbGYAYN++fTsDgUAvEbkMw9AvnDv3ValUugXgHojyMjD6+sTEWBwwGqG3pmYAoK2t7ZNAIPDe1OTUqSuXBr6FouRGR0enAfBaa/+n8S8PPeWMetb8+wAAAABJRU5ErkJggg== + + + + 5.000000 + icone large avec label + 21/08/2005 + 21/08/2005 + Waypoint + + large + data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAmCAYAAABpuqMCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAToSURBVFiF3VhdbFNlGH7ec05/F6IUE9GLIYgXXYpXJBBZE0xM9EausIl6ObzBGSHRdnEJ1p+RhnBBNF4YY/xJFigNaIwxLpFYB2WwMWCW0bG1W7eEdUBwQ0fb7fy83nQJjK3nnO90F/okvTnf+7zP+/Q75/ve7wP+R6BGJ4xGo+skSXqFmfcAaAHwFIANAO4CmCai64Zh/OT3+3+Nx+PzjdRumJmOjo71zNwB4B0APguUMjN/vri4mDh27NhcI2poiJloNLqXiL4EEBCg/8XMbx05cuS00zpkh3yKxWKHiOgLAH7BHD4iiuzatcvIZDJnnRTjyEw0Gv2QiD6C8xkmInqxtbVVy2QyvcJJRIm1V+ukkxwrwCCivYlE4gcRslAhBw4ceNzj8RQg9o2YYZaInk0kErN2iZKImtvt/gBrYwQA1gN4X4Roe2ai0eg6IroFa8uvKMo+n+9Ju/uQYleltiGaGnG73eVIJNIfDAa3yLK8Udf1mVwuN55MJneoqmrG91er1ZcBnLJVm51gAKjt7HXhdrvLnZ2d46FQaLcsy80A3LIsN4dCod2dnZ15l8tVaYTOcoh8M0GzgEgk0u/xeEIrjXm93m2RSOSiBZ0Wu4WJmHnaLCAYDG6pN97S0rK5ETrLIWJmg1mALMsbnYzX8ITlimoQMfOPWYCu6zMm4yULOn9brqgGETO3zAJyudx4vfFr164VzXIwc90/ZCWImOk3C0gmkzuq1Wp2pbFyuZxNpVI7zXIQkanOcoiY+d0sQFVVX1dX19ZsNpvWdX0SwKKu65NDQ0Ppw4cPP6dpmtcsBzOn7RZme9P0+XynK5XKZwAeqxenqqqvu7t79wOPNtV+VnDPMAzb5xvbM1NrMb6xy7OJr48ePXrfLkmo0SSijwHcFuFawG0i+lSEKGSm1p4fFOFawEGR9h9weLCKxWLdAN5wkuNBMPPxEydOvC1JksfD7Fsg8riYSdMlFwAosqFqkmQQUcW9sHB/282bcylAX+LbXgCWYT+AFwA84zAPVFWdO9PTM+WWpHcBQCeCAoCJICsMAGAQZGaAGZrLhcubNutbGUVF4rMjxWLR8ZE3Fou1AkjDwX0CM/OVwcHvJwqFomgKDfjO6e0MMpnMVDgc9gIIi+YoTU+fyw4NXXFQBpFh3BFaAJbD6/UeAmClrX8ElXK5dOnixT+c6BuAoUtSoSFm4vG4ZhjGm7DQhD5UhGGoAwMDp1RV1c2jVwHzIsny6WKxOOP4NVvC+fPnZ8Ph8F0Ar1rlFPL5X8bHxuo2pXXADIx4df3kjcnJSWANLs5jsdhJAK+Zxd2bmxv5racnKSBRYeY/oSiDhULhoY3b6dL8CDRN209EL8myvH7VGFW9f6Gv72erOZlJA3GeJWm4ubk5l06ntZXiGj4zANDe3r6nqanpx1Xyc/bq1eOjN26M1cvBTKoEY4IkadiQ5ZF8Pr9gprsmZgCgvb29u6mp6ZHuYKZUupDp7e1ZhVYB0bgEjLr8/tzw8PCiHc2Gv2ZLmJ+fb1MUpdXj8TQvPatWq3f6+/rOPBjHQBnMY4okXX9++/Z8KpUSXtnWbGYAYN++fTsDgUAvEbkMw9AvnDv3ValUugXgHojyMjD6+sTEWBwwGqG3pmYAoK2t7ZNAIPDe1OTUqSuXBr6FouRGR0enAfBaa/+n8S8PPeWMetb8+wAAAABJRU5ErkJggg== + + + + circuit_litoral_montagne 1 + 1 + + + 5.000000 + + + + 7.000000 + + + + 17.000000 + + + + 27.000000 + + + + 28.000000 + + + + 50.000000 + + + + 61.000000 + + + + 68.000000 + + + + 91.000000 + + + + 93.000000 + + + + 111.000000 + + + + 110.000000 + + + + 115.000000 + + + + 105.000000 + + + + 106.000000 + + + + 92.000000 + + + + 80.000000 + + + + 54.000000 + + + + 34.000000 + + + + 15.000000 + + + + 32.000000 + + + + 13.000000 + + + + 15.000000 + + + + 18.000000 + + + + 14.000000 + + + + 10.000000 + + + + 15.000000 + + + + 11.000000 + + + + 26.000000 + + + + 12.000000 + + + + 13.000000 + + + + 12.000000 + + + + 14.000000 + + + + 13.000000 + + + + 15.000000 + + + + 12.000000 + + + + 18.000000 + + + + 18.000000 + + + + 5.000000 + + + + 8.000000 + + + + 9.000000 + + + + 46.000000 + + + + 29.000000 + + + + 13.000000 + + + + 7.000000 + + + + 7.000000 + + + + 26.000000 + + + + 62.000000 + + + + 66.000000 + + + + 69.000000 + + + + 67.000000 + + + + 54.000000 + + + + 44.000000 + + + + 37.000000 + + + + 12.000000 + + + + 4.000000 + + + + 6.000000 + + + + 6.000000 + + + + 13.000000 + + + + 10.000000 + + + + 10.000000 + + + + 13.000000 + + + + 16.000000 + + + + 13.000000 + + + + 13.000000 + + + + 12.000000 + + + + 12.000000 + + + + 24.000000 + + + + 25.000000 + + + + 16.000000 + + + + 14.000000 + + + + 15.000000 + + + + 14.000000 + + + + 29.000000 + + + + 29.000000 + + + + 40.000000 + + + + 31.000000 + + + + 14.000000 + + + + 15.000000 + + + + 8.000000 + + + + 9.000000 + + + + 13.000000 + + + + 8.000000 + + + + 5.000000 + + + + 13.000000 + + + + 14.000000 + + + + 1.000000 + + + + 16.000000 + + + + 10.000000 + + + + 11.000000 + + + + 28.000000 + + + + 44.000000 + + + + 48.000000 + + + + 12.000000 + + + + 6.000000 + + + + 3.000000 + + + + 6.000000 + + + + 5.000000 + + + + 23.000000 + + + + 13.000000 + + + + 18.000000 + + + + 27.000000 + + + + 14.000000 + + + + 11.000000 + + + + 8.000000 + + + + 8.000000 + + + + 10.000000 + + + + 7.000000 + + + + 12.000000 + + + + 12.000000 + + + + -1.000000 + + + + + + + 7.000000 + + + + 17.000000 + + + + 10.000000 + + + + 22.000000 + + + + 17.000000 + + + + 6.000000 + + + + 18.000000 + + + + 23.000000 + + + + 19.000000 + + + + 10.000000 + + + + -1.000000 + + + + -1.000000 + + + + + + + 1.000000 + + + + + + + + + + 5.000000 + + + + 4.000000 + + + + 2.000000 + + + + 6.000000 + + + + 3.000000 + + + + 7.000000 + + + + 7.000000 + + + + 7.000000 + + + + 5.000000 + + + + 5.000000 + + + + 2.000000 + + + + 8.000000 + + + + 14.000000 + + + + 16.000000 + + + + 24.000000 + + + + 25.000000 + + + + 21.000000 + + + + 36.000000 + + + + 39.000000 + + + + 34.000000 + + + + 29.000000 + + + + 34.000000 + + + + 41.000000 + + + + 37.000000 + + + + 38.000000 + + + + 48.000000 + + + + 60.000000 + + + + 73.000000 + + + + 83.000000 + + + + 78.000000 + + + + 81.000000 + + + + 80.000000 + + + + 73.000000 + + + + 68.000000 + + + + 60.000000 + + + + 57.000000 + + + + 57.000000 + + + + 58.000000 + + + + 58.000000 + + + + 56.000000 + + + + 50.000000 + + + + 56.000000 + + + + 59.000000 + + + + 65.000000 + + + + 65.000000 + + + + 68.000000 + + + + 81.000000 + + + + 83.000000 + + + + 88.000000 + + + + 92.000000 + + + + 97.000000 + + + + 100.000000 + + + + 103.000000 + + + + 108.000000 + + + + 115.000000 + + + + 120.000000 + + + + 122.000000 + + + + 125.000000 + + + + 126.000000 + + + + 127.000000 + + + + 132.000000 + + + + 135.000000 + + + + 144.000000 + + + + 150.000000 + + + + 152.000000 + + + + 179.000000 + + + + 200.000000 + + + + 208.000000 + + + + 209.000000 + + + + 218.000000 + + + + 219.000000 + + + + 230.000000 + + + + 232.000000 + + + + 239.000000 + + + + 245.000000 + + + + 253.000000 + + + + 265.000000 + + + + 274.000000 + + + + 276.000000 + + + + 284.000000 + + + + 288.000000 + + + + 288.000000 + + + + 292.000000 + + + + 292.000000 + + + + 289.000000 + + + + 302.000000 + + + + 310.000000 + + + + 315.000000 + + + + 324.000000 + + + + 329.000000 + + + + 335.000000 + + + + 342.000000 + + + + 345.000000 + + + + 350.000000 + + + + 352.000000 + + + + 342.000000 + + + + 339.000000 + + + + 325.000000 + + + + 316.000000 + + + + 306.000000 + + + + 301.000000 + + + + 294.000000 + + + + 286.000000 + + + + 284.000000 + + + + 281.000000 + + + + 276.000000 + + + + 277.000000 + + + + 277.000000 + + + + 282.000000 + + + + 299.000000 + + + + 316.000000 + + + + 325.000000 + + + + 329.000000 + + + + 338.000000 + + + + 346.000000 + + + + 357.000000 + + + + 369.000000 + + + + 376.000000 + + + + 381.000000 + + + + 393.000000 + + + + 395.000000 + + + + 386.000000 + + + + 383.000000 + + + + 376.000000 + + + + 375.000000 + + + + 366.000000 + + + + 359.000000 + + + + 357.000000 + + + + 351.000000 + + + + 347.000000 + + + + 343.000000 + + + + 342.000000 + + + + 338.000000 + + + + 325.000000 + + + + 319.000000 + + + + 311.000000 + + + + 310.000000 + + + + 304.000000 + + + + 300.000000 + + + + 291.000000 + + + + 283.000000 + + + + 269.000000 + + + + 259.000000 + + + + 254.000000 + + + + 250.000000 + + + + 243.000000 + + + + 242.000000 + + + + 239.000000 + + + + 235.000000 + + + + 235.000000 + + + + 231.000000 + + + + 228.000000 + + + + 222.000000 + + + + 217.000000 + + + + 214.000000 + + + + 213.000000 + + + + 199.000000 + + + + 193.000000 + + + + 187.000000 + + + + 185.000000 + + + + 183.000000 + + + + 179.000000 + + + + 160.000000 + + + + 148.000000 + + + + 134.000000 + + + + 121.000000 + + + + 110.000000 + + + + 104.000000 + + + + 102.000000 + + + + 100.000000 + + + + 85.000000 + + + + 73.000000 + + + + 71.000000 + + + + 68.000000 + + + + 63.000000 + + + + 59.000000 + + + + 43.000000 + + + + 33.000000 + + + + 30.000000 + + + + 18.000000 + + + + 15.000000 + + + + 13.000000 + + + + + #ff0000 + 12 + 0.5 + + + + circuit_litoral_montagne 2 + 2 + + + 5.000000 + + + + 7.000000 + + + + 17.000000 + + + + 27.000000 + + + + 28.000000 + + + + 50.000000 + + + + 61.000000 + + + + 68.000000 + + + + 91.000000 + + + + 93.000000 + + + + 111.000000 + + + + 110.000000 + + + + 115.000000 + + + + 105.000000 + + + + 106.000000 + + + + 92.000000 + + + + 80.000000 + + + + 54.000000 + + + + 34.000000 + + + + 15.000000 + + + + 32.000000 + + + + 13.000000 + + + + 15.000000 + + + + 18.000000 + + + + 14.000000 + + + + 10.000000 + + + + 15.000000 + + + + 11.000000 + + + + 26.000000 + + + + 12.000000 + + + + 13.000000 + + + + 12.000000 + + + + 14.000000 + + + + 13.000000 + + + + 15.000000 + + + + 12.000000 + + + + 18.000000 + + + + 18.000000 + + + + 5.000000 + + + + 8.000000 + + + + 9.000000 + + + + 46.000000 + + + + 29.000000 + + + + 13.000000 + + + + 7.000000 + + + + 7.000000 + + + + 26.000000 + + + + 62.000000 + + + + 66.000000 + + + + 69.000000 + + + + 67.000000 + + + + 54.000000 + + + + 44.000000 + + + + 37.000000 + + + + + #ff00ff + 3 + 1 + + + + circuit_litoral_montagne 3 + 3 + + + 199.000000 + + + + 193.000000 + + + + 187.000000 + + + + 185.000000 + + + + 183.000000 + + + + 179.000000 + + + + 160.000000 + + + + 148.000000 + + + + 134.000000 + + + + 121.000000 + + + + 110.000000 + + + + 104.000000 + + + + 102.000000 + + + + 100.000000 + + + + \ No newline at end of file diff --git a/samples-src/resources/data/gpx/export-iso.gpx b/samples-src/resources/data/gpx/export-iso.gpx new file mode 100644 index 000000000..d2c4ef393 --- /dev/null +++ b/samples-src/resources/data/gpx/export-iso.gpx @@ -0,0 +1,363 @@ + + + + {"type":"isocurve","transport":"Pieton","computation":"time","exclusions":[],"direction":"departure","point":[2.5889593786271514,48.84181708047407],"results":{"message":"","id":"","location":{"x":"2.5889593786271514","y":"48.84181708047407"},"srs":"EPSG:4326","geometry":{"type":"Polygon","coordinates":[[[2.582286512,48.842203898],[2.58217211,48.842089496],[2.582156771,48.842078674],[2.582155165,48.842077912],[2.582108917,48.842149643],[2.581813568,48.842607724],[2.583030614,48.843592258],[2.583958347,48.844153126],[2.585424701,48.844122752],[2.585459358,48.844157409],[2.585465251,48.844163302],[2.585471173,48.844169224],[2.585472923,48.844170974],[2.585352137,48.84466949],[2.585275542,48.844746085],[2.585237372,48.844784255],[2.585181998,48.844839629],[2.585172943,48.84485156],[2.585166611,48.844862801],[2.5851611,48.844876728],[2.585160346,48.844879803],[2.585795597,48.845263849],[2.586397816,48.845005215],[2.586369812,48.844900705],[2.586367493,48.844893873],[2.586365098,48.84488809],[2.586361907,48.84488162],[2.586358841,48.844876309],[2.586354833,48.844870311],[2.586351023,48.844865345],[2.586346266,48.844859921],[2.586236396,48.844750051],[2.586229503,48.844743158],[2.586221096,48.844734751],[2.586199204,48.844712859],[2.58626411,48.844339898],[2.588303633,48.844186729],[2.589570493,48.843642654],[2.589505805,48.843401232],[2.589503486,48.8433944],[2.58950109,48.843388618],[2.589497899,48.843382147],[2.589494545,48.843376338],[2.589490537,48.843370339],[2.589486727,48.843365374],[2.58948197,48.843359949],[2.589455927,48.843333906],[2.590938475,48.84304735],[2.590939433,48.843047156],[2.590940264,48.84304698],[2.590941218,48.843046769],[2.590942113,48.843046563],[2.590943063,48.843046335],[2.590943888,48.84304613],[2.590944834,48.843045885],[2.590985287,48.843035046],[2.59118702,48.842948408],[2.591218544,48.842933743],[2.591250715,48.842921053],[2.591306695,48.842897012],[2.59131796,48.842889622],[2.591462539,48.842745043],[2.591467296,48.842739619],[2.59147098,48.842734818],[2.591474988,48.842728819],[2.591478096,48.842723436],[2.591481287,48.842716965],[2.591483603,48.842711374],[2.591485922,48.842704542],[2.591559816,48.842428768],[2.591561223,48.842421692],[2.591562013,48.842415691],[2.591562485,48.842408492],[2.591562485,48.842402277],[2.591562013,48.842395077],[2.591561223,48.842389077],[2.591559816,48.842382001],[2.591514524,48.842212969],[2.592280588,48.842058117],[2.592281356,48.842058885],[2.592315163,48.842092693],[2.592407026,48.842184556],[2.592448194,48.842225724],[2.592453618,48.842230481],[2.59245842,48.842234165],[2.592464419,48.842238173],[2.592469801,48.842241281],[2.592476272,48.842244472],[2.592481864,48.842246788],[2.592488695,48.842249107],[2.592545179,48.842264242],[2.592689829,48.842303001],[2.593534132,48.8419404],[2.594028762,48.841727973],[2.594546314,48.841369216],[2.594544238,48.841365953],[2.594536704,48.84135656],[2.594505727,48.841325583],[2.594499596,48.841239448],[2.594502028,48.841238908],[2.594504735,48.841238214],[2.5945082,48.841237203],[2.594511082,48.841236259],[2.594514473,48.841235024],[2.594531891,48.841228027],[2.594550588,48.841226375],[2.594554171,48.84122594],[2.594557168,48.841225476],[2.594560715,48.841224808],[2.594563443,48.841224201],[2.594566938,48.841223302],[2.594569849,48.841222451],[2.594573278,48.841221325],[2.594836987,48.841125089],[2.594840335,48.841123742],[2.594842364,48.841122847],[2.594844471,48.841122157],[2.594847863,48.841120923],[2.594982508,48.841066857],[2.595353442,48.840809733],[2.5953617,48.840623596],[2.595303337,48.840419247],[2.595058571,48.840155989],[2.595044029,48.840165914],[2.595041116,48.840168045],[2.595038729,48.840169915],[2.595035961,48.840172232],[2.595033879,48.840174094],[2.595031269,48.840176587],[2.595029146,48.840178753],[2.595026704,48.840181411],[2.594919771,48.840305788],[2.594702064,48.840393208],[2.594673706,48.840366589],[2.594670995,48.840364206],[2.594668653,48.84036228],[2.594665792,48.84036008],[2.594663523,48.840358449],[2.594660524,48.840356441],[2.59465795,48.840354837],[2.594654827,48.840353029],[2.594559911,48.840302161],[2.59455991,48.840302161],[2.594380826,48.840206185],[2.594271472,48.84010462],[2.594208379,48.839950807],[2.594195594,48.839919639],[2.594164612,48.839844107],[2.594163133,48.839840815],[2.594161801,48.839838091],[2.594160111,48.839834902],[2.594158722,48.839832477],[2.594156827,48.839829405],[2.594155151,48.839826878],[2.594153058,48.839823937],[2.594136383,48.83980205],[2.594076545,48.839723509],[2.594066205,48.839713144],[2.594056519,48.839705727],[2.594043816,48.839698448],[2.594035693,48.839695135],[2.594021072,48.839040107],[2.593716526,48.838712552],[2.593639421,48.838702418],[2.593626411,48.838702256],[2.592483756,48.838823572],[2.592483311,48.838816781],[2.592482477,48.838810449],[2.59248107,48.838803373],[2.592473925,48.838776709],[2.592841343,48.838335888],[2.593001933,48.838305653],[2.5930597,48.838294777],[2.593063223,48.838293994],[2.593066322,48.838293197],[2.593069786,48.838292185],[2.593072995,48.838291133],[2.593076386,48.838289896],[2.593079356,48.838288701],[2.593082659,48.838287246],[2.593124024,48.838267371],[2.593140329,48.838255429],[2.593211436,48.838179768],[2.593215946,48.838174154],[2.593177514,48.838132818],[2.59299155,48.837932804],[2.592320233,48.837856749],[2.590665072,48.837669234],[2.59051165,48.837660915],[2.590512625,48.837654648],[2.59051275,48.837651977],[2.590416502,48.837641073],[2.589881203,48.837580428],[2.589331891,48.837588776],[2.588867451,48.837595834],[2.587492518,48.837649798],[2.587121873,48.837677995],[2.587113867,48.83766466],[2.587002615,48.837669026],[2.585392228,48.837732232],[2.584669319,48.838178499],[2.584361523,48.838655885],[2.584330947,48.838703309],[2.584370513,48.838742875],[2.58437524,48.838747088],[2.584448605,48.838805275],[2.584459766,48.838810891],[2.584473167,48.838824292],[2.584477894,48.838828505],[2.584730806,48.839029094],[2.584750805,48.839039156],[2.584964736,48.839096479],[2.584971812,48.839097887],[2.584978145,48.83909872],[2.584979392,48.839098802],[2.585110219,48.839133857],[2.585117295,48.839135264],[2.585123627,48.839136098],[2.585130826,48.83913657],[2.585137426,48.83913657],[2.585144625,48.839136098],[2.585150957,48.839135264],[2.585158033,48.839133857],[2.585214135,48.839118825],[2.585268096,48.839133283],[2.585292737,48.839139886],[2.585299812,48.839141293],[2.585306145,48.839142127],[2.585313344,48.839142599],[2.585319944,48.839142599],[2.585327143,48.839142127],[2.585333475,48.839141293],[2.585340551,48.839139886],[2.585366958,48.83913281],[2.58543812,48.839113742],[2.585439534,48.839113364],[2.585880172,48.839909318],[2.585676424,48.840098591],[2.585640497,48.83996451],[2.585634987,48.839951208],[2.585629402,48.839941535],[2.585620637,48.839930112],[2.585418756,48.839728231],[2.585407333,48.839719466],[2.58539766,48.839713882],[2.585384358,48.839708372],[2.585345127,48.83969786],[2.585339846,48.839688713],[2.585331081,48.839677291],[2.585160221,48.839506431],[2.585139004,48.839493222],[2.585092726,48.839477458],[2.585089217,48.839476392],[2.584813443,48.839402499],[2.584811982,48.839402128],[2.584651516,48.839363799],[2.584624427,48.839364169],[2.584348652,48.839438062],[2.584329818,48.839447227],[2.584207467,48.839539062],[2.584201576,48.839544173],[2.584198216,48.839547533],[2.584192431,48.839550348],[2.584146148,48.839585088],[2.584140257,48.839590199],[2.583938376,48.83979208],[2.583934431,48.839796472],[2.583900965,48.839838],[2.583890635,48.839858333],[2.583829365,48.840086995],[2.583827994,48.840097408],[2.583740013,48.840185389],[2.583731248,48.840196812],[2.583725663,48.840206485],[2.583720153,48.840219787],[2.58364626,48.840495561],[2.583644381,48.840509837],[2.583644381,48.840521006],[2.58364626,48.840535281],[2.583720153,48.840811055],[2.583725663,48.840824358],[2.583731248,48.840834031],[2.583740013,48.840845454],[2.583805232,48.840910672],[2.583818102,48.840958703],[2.583815835,48.840964668],[2.583815163,48.840977917],[2.583816971,48.840994986],[2.583817364,48.84099645],[2.583747092,48.841240529],[2.583707075,48.841251252],[2.583700243,48.841253571],[2.583695039,48.841255726],[2.583688569,48.841258917],[2.58368387,48.84126163],[2.583677871,48.841265639],[2.583673402,48.841269068],[2.583667978,48.841273825],[2.583622909,48.841318893],[2.583612604,48.841329198],[2.583466097,48.841475706],[2.58346134,48.84148113],[2.583457911,48.841485598],[2.583453903,48.841491597],[2.58345119,48.841496296],[2.583447999,48.841502767],[2.583445843,48.841507971],[2.583443524,48.841514803],[2.58336963,48.841790577],[2.583369367,48.841791901],[2.583291946,48.84198416],[2.583191493,48.842052198],[2.583144327,48.842064837],[2.583144326,48.842064837],[2.582954866,48.842115602],[2.582948035,48.842117921],[2.58294283,48.842120077],[2.58293636,48.842123268],[2.582931661,48.842125981],[2.582925662,48.842129989],[2.582921193,48.842133418],[2.582915769,48.842138175],[2.582713888,48.842340056],[2.582709131,48.84234548],[2.582705702,48.842349949],[2.582701694,48.842355948],[2.582698981,48.842360647],[2.58269579,48.842367118],[2.582693634,48.842372322],[2.582693382,48.842373065],[2.582623296,48.842302979],[2.582617872,48.842298222],[2.582613403,48.842294793],[2.582607404,48.842290785],[2.582602705,48.842288072],[2.582596235,48.842284881],[2.582591031,48.842282725],[2.582584199,48.842280406],[2.582308424,48.842206512],[2.582301348,48.842205105],[2.582295764,48.84220437],[2.582288565,48.842203898],[2.582286512,48.842203898]]]},"time":600,"distance":""}} + + + + + data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAmCAYAAABpuqMCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAARDSURBVFiF3ZndaxxVGMZ/Z/YjX00Nadpo1qrFBgu56D9QbAtiLoRC7ywSNK1NURRREBKRFlSwFBW0gnSrJXY1CmISgyjFiyYSFC9ajE3MmpjdjWlMUtNos9lN9mteLzbRuCbZmTMTBB+Yi51znvd5n3nPnjnnjBIR/i/wuh4xpCpI0ojiENAA1AE1wCzwKzCE0EM5l2iShJvSyrXKnFVb8dOK4hmg3AIjifAmaU7ztMy7kYI7Zs6rQwjvka+AXcyiOMZx6XGahuE0AEHVitCFnhGAGoQugqrVaSrOKpNP4FWnSaxCGy1yWpesbyY/tLpwo7p/w0RxWHfI6Zk5q7ZSwhj6Q2sjzJLiXp1JQe+p+mllc4wA1CzHtw37lQmpCha5gbXpVxdJythh9z1kvzJJGrFixPBmOXixl+Z4mONmguZ4mIMXezG8WQsq5cs6tmDfTP7NXiSqN0vTzBD1TQfwbdmDUhX4tuyhvukATTNDlgxZ0SmUtUsgv0TZGPsv9FNSvXfNtpLqvey/0O+KTgF0zNQV7XHP4dsdtVvVKYCOmeqiPbwVOx21W9UpgI6ZWNEe2cSEo3arOgWwb0YYLp5G17Sjdqs6BdCZzYqL9B3dR2puYM221NwAfUf3uaJTAB0zaye5GmbWS6i2gdFQL5mFMCIJMgthRkO9hGobMLPFN4VWdAoptlcAQeUDRoG77YrZwDhQT4tk7JDsV6ZFMggv2+bZwyt2jYDuQnOa94GIFrc4IkzRrkPUM3NKsijatLjF0copsbJ++xec7TTPqw6EI/oB/glT+PC+13Y/aSQNv/Is+tNer09lMn7DMHwAYppp8fvTIpISkVQsFrslqww4M9OuqkgzANzl1MhCyrjZGAycm573pK1yFCyi5FoWvo/FYlPOT2fOqftRXMbB9lkEs+3zbe2f/FD5i3YMj2p3vn8/IV8DZ5yE+Gqkot+JEQCPada5dRhxEriiQ5ya90w+272916F+KpnJDLhjpkUy5HgESNqhZU2Vfr5ne+dSFtOBeso06J6cnEy6d0z0hPwEPGeH8sGVykvfjpfe1NZUci2+mHg7Go2G8z/d/goQVJ9B8S1veMYffujduo/thl+ZwUzDuBqJRGZWt7n/FcDH46lFNVLilar1uiTTxsJTnTssH/QpJVlMNQa5wbGJiWERya3Vz30zzfLb3OveY3dU5j5dp4e80Xdbd3TOu/H/yyAtpjnqgeGS8crRQRks+v5xf5gtY/KM/6NAVebhwvv90bLvHu2o/XId2pJSMmIaxo/RaHRMxN6yZtPM0K5K/7hl/FxVZgZWbs0mPDceeKcuGE95/kpSKUmaImHDNIfHrl+PiIj2zOb+MFvBY7IUOVl2ZG9g6bJH4ckJuRe/2NYZT3myKIkrGM4pNRyLjY+LW09URDb1+uaF0pfm3zJ+7zhRGdq1c9eDuwOBOzdLa/OG2X+APwE8DU64Y/5gfAAAAABJRU5ErkJggg== + medium + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Polygon + #00b798 + 0.7 + + + diff --git a/samples-src/resources/data/gpx/export-profil.gpx b/samples-src/resources/data/gpx/export-profil.gpx new file mode 100644 index 000000000..d6a7d466b --- /dev/null +++ b/samples-src/resources/data/gpx/export-profil.gpx @@ -0,0 +1,11 @@ + + + + {"type":"elevationpath","greaterSlope":11,"meanSlope":2,"distancePlus":14447.145168226985,"distanceMinus":12232.65880922472,"ascendingElevation":237.81000000000003,"descendingElevation":-198.90999999999997,"altMin":"28,05","altMax":"121,01","distance":26996.16928242218,"unit":"m","points":[{"z":45.69,"lon":2.4351,"lat":48.964,"acc":2.5,"dist":0,"slope":0},{"z":45.17,"lon":2.4347,"lat":48.9631,"acc":2.5,"dist":105.45169699738912,"slope":0,"color":"#00B798"},{"z":43.92,"lon":2.4344,"lat":48.9622,"acc":2.5,"dist":210.9031696295348,"slope":1,"color":"#00B798"},{"z":42.33,"lon":2.4341,"lat":48.9613,"acc":2.5,"dist":316.3545759656396,"slope":2,"color":"#00B798"},{"z":41.26,"lon":2.4338,"lat":48.9603,"acc":2.5,"dist":421.8070015733902,"slope":1,"color":"#00B798"},{"z":40.23,"lon":2.4335,"lat":48.9594,"acc":2.5,"dist":527.2582752965388,"slope":1,"color":"#00B798"},{"z":39.15,"lon":2.4332,"lat":48.9585,"acc":2.5,"dist":632.7094827024223,"slope":1,"color":"#00B798"},{"z":39.34,"lon":2.4329,"lat":48.9576,"acc":2.5,"dist":738.1617093641144,"slope":0,"color":"#00B798"},{"z":39.61,"lon":2.4326,"lat":48.9566,"acc":2.5,"dist":843.6137116258594,"slope":0,"color":"#00B798"},{"z":39.68,"lon":2.4322,"lat":48.9557,"acc":2.5,"dist":949.0647200457233,"slope":0,"color":"#00B798"},{"z":40.32,"lon":2.4319,"lat":48.9548,"acc":2.5,"dist":1054.5165896303386,"slope":1,"color":"#00B798"},{"z":40.88,"lon":2.4316,"lat":48.9539,"acc":2.5,"dist":1159.9683928686318,"slope":1,"color":"#00B798"},{"z":41.87,"lon":2.4313,"lat":48.9529,"acc":2.5,"dist":1265.4201297534062,"slope":1,"color":"#00B798"},{"z":42.49,"lon":2.431,"lat":48.952,"acc":2.5,"dist":1370.8727277885237,"slope":1,"color":"#00B798"},{"z":42.79,"lon":2.4307,"lat":48.9511,"acc":2.5,"dist":1476.3243319469996,"slope":0,"color":"#00B798"},{"z":43.45,"lon":2.4304,"lat":48.9502,"acc":2.5,"dist":1581.7757116608998,"slope":1,"color":"#00B798"},{"z":44.05,"lon":2.4301,"lat":48.9492,"acc":2.5,"dist":1687.2281105810791,"slope":1,"color":"#00B798"},{"z":44.69,"lon":2.4297,"lat":48.9483,"acc":2.5,"dist":1792.6793575298473,"slope":1,"color":"#00B798"},{"z":45.08,"lon":2.4294,"lat":48.9474,"acc":2.5,"dist":1898.1316236752725,"slope":0,"color":"#00B798"},{"z":45.41,"lon":2.4291,"lat":48.9464,"acc":2.5,"dist":2003.5838234230744,"slope":0,"color":"#00B798"},{"z":46,"lon":2.4288,"lat":48.9455,"acc":2.5,"dist":2109.035956767476,"slope":1,"color":"#00B798"},{"z":46.16,"lon":2.4285,"lat":48.9446,"acc":2.5,"dist":2214.487865630424,"slope":0,"color":"#00B798"},{"z":46.35,"lon":2.4282,"lat":48.9437,"acc":2.5,"dist":2319.939708075655,"slope":0,"color":"#00B798"},{"z":45.85,"lon":2.4279,"lat":48.9427,"acc":2.5,"dist":2425.39148409804,"slope":0,"color":"#00B798"},{"z":45.52,"lon":2.4276,"lat":48.9418,"acc":2.5,"dist":2530.8431936924712,"slope":0,"color":"#00B798"},{"z":43.55,"lon":2.4272,"lat":48.9409,"acc":2.5,"dist":2636.2959224450856,"slope":2,"color":"#00B798"},{"z":44.19,"lon":2.4269,"lat":48.94,"acc":2.5,"dist":2741.747499161076,"slope":1,"color":"#00B798"},{"z":42.69,"lon":2.4266,"lat":48.939,"acc":2.5,"dist":2847.1999369541495,"slope":1,"color":"#00B798"},{"z":38.54,"lon":2.4263,"lat":48.9381,"acc":2.5,"dist":2952.6513807671868,"slope":4,"color":"#00B798"},{"z":40.44,"lon":2.426,"lat":48.9372,"acc":2.5,"dist":3058.1036856463143,"slope":2,"color":"#00B798"},{"z":42.2,"lon":2.4257,"lat":48.9363,"acc":2.5,"dist":3163.555924058593,"slope":2,"color":"#00B798"},{"z":44.42,"lon":2.4251,"lat":48.9344,"acc":2.5,"dist":3374.460043386571,"slope":1,"color":"#00B798"},{"z":44.25,"lon":2.4247,"lat":48.9335,"acc":2.5,"dist":3479.912082362176,"slope":0,"color":"#00B798"},{"z":44.65,"lon":2.4244,"lat":48.9326,"acc":2.5,"dist":3585.363896772875,"slope":0,"color":"#00B798"},{"z":44.63,"lon":2.4241,"lat":48.9316,"acc":2.5,"dist":3690.816888362464,"slope":0,"color":"#00B798"},{"z":44.13,"lon":2.4238,"lat":48.9307,"acc":2.5,"dist":3796.268569770635,"slope":0,"color":"#00B798"},{"z":49.53,"lon":2.4235,"lat":48.9298,"acc":2.5,"dist":3901.721270275249,"slope":5,"color":"#00B798"},{"z":48.64,"lon":2.4232,"lat":48.9289,"acc":2.5,"dist":4007.173904262547,"slope":1,"color":"#00B798"},{"z":49.94,"lon":2.4229,"lat":48.9279,"acc":2.5,"dist":4112.62522804605,"slope":1,"color":"#00B798"},{"z":42.54,"lon":2.4226,"lat":48.927,"acc":2.5,"dist":4218.077728981066,"slope":7,"color":"#00B798"},{"z":51.81,"lon":2.4222,"lat":48.9261,"acc":2.5,"dist":4323.530005309247,"slope":9,"color":"#00B798"},{"z":42.88,"lon":2.4219,"lat":48.9252,"acc":2.5,"dist":4428.982215095631,"slope":8,"color":"#00B798"},{"z":42.44,"lon":2.4216,"lat":48.9242,"acc":2.5,"dist":4534.434358332353,"slope":0,"color":"#00B798"},{"z":42.2,"lon":2.4213,"lat":48.9233,"acc":2.5,"dist":4639.887520629878,"slope":0,"color":"#00B798"},{"z":41.62,"lon":2.421,"lat":48.9224,"acc":2.5,"dist":4745.339530753034,"slope":1,"color":"#00B798"},{"z":41.98,"lon":2.4207,"lat":48.9214,"acc":2.5,"dist":4850.792401851829,"slope":0,"color":"#00B798"},{"z":42.87,"lon":2.4201,"lat":48.9196,"acc":2.5,"dist":5061.69701677983,"slope":0,"color":"#00B798"},{"z":42.14,"lon":2.4197,"lat":48.9187,"acc":2.5,"dist":5167.1496881425,"slope":1,"color":"#00B798"},{"z":42.42,"lon":2.4194,"lat":48.9177,"acc":2.5,"dist":5272.601207292849,"slope":0,"color":"#00B798"},{"z":43.28,"lon":2.4191,"lat":48.9168,"acc":2.5,"dist":5378.053745464319,"slope":1,"color":"#00B798"},{"z":43.5,"lon":2.4188,"lat":48.9159,"acc":2.5,"dist":5483.506058958517,"slope":0,"color":"#00B798"},{"z":43.06,"lon":2.4185,"lat":48.915,"acc":2.5,"dist":5588.959549537667,"slope":0,"color":"#00B798"},{"z":43.49,"lon":2.4182,"lat":48.914,"acc":2.5,"dist":5694.411729805279,"slope":0,"color":"#00B798"},{"z":42.7,"lon":2.4176,"lat":48.9122,"acc":2.5,"dist":5905.3169760879,"slope":0,"color":"#00B798"},{"z":42.45,"lon":2.4172,"lat":48.9113,"acc":2.5,"dist":6010.768956464955,"slope":0,"color":"#00B798"},{"z":43.5,"lon":2.4169,"lat":48.9103,"acc":2.5,"dist":6116.221955827505,"slope":1,"color":"#00B798"},{"z":43.77,"lon":2.4166,"lat":48.9094,"acc":2.5,"dist":6221.674730468927,"slope":0,"color":"#00B798"},{"z":43.86,"lon":2.4163,"lat":48.9085,"acc":2.5,"dist":6327.127596529659,"slope":0,"color":"#00B798"},{"z":46.19,"lon":2.4157,"lat":48.9066,"acc":2.5,"dist":6538.032812517409,"slope":1,"color":"#00B798"},{"z":46.96,"lon":2.4151,"lat":48.9048,"acc":2.5,"dist":6748.93776181119,"slope":0,"color":"#00B798"},{"z":44.95,"lon":2.4148,"lat":48.9039,"acc":2.5,"dist":6854.389978359657,"slope":2,"color":"#00B798"},{"z":44.29,"lon":2.4144,"lat":48.9029,"acc":2.5,"dist":6959.843371923235,"slope":1,"color":"#00B798"},{"z":44.52,"lon":2.4141,"lat":48.902,"acc":2.5,"dist":7065.2954550798595,"slope":0,"color":"#00B798"},{"z":52.2,"lon":2.4138,"lat":48.9011,"acc":2.5,"dist":7170.748557169319,"slope":7,"color":"#00B798"},{"z":52.05,"lon":2.4135,"lat":48.9002,"acc":2.5,"dist":7276.201592547858,"slope":0,"color":"#00B798"},{"z":51.51,"lon":2.4132,"lat":48.8992,"acc":2.5,"dist":7381.654561211108,"slope":1,"color":"#00B798"},{"z":50.24,"lon":2.4129,"lat":48.8983,"acc":2.5,"dist":7487.107463149843,"slope":1,"color":"#00B798"},{"z":48.61,"lon":2.4126,"lat":48.8974,"acc":2.5,"dist":7592.560298359705,"slope":2,"color":"#00B798"},{"z":51.43,"lon":2.4123,"lat":48.8964,"acc":2.5,"dist":7698.012908760837,"slope":3,"color":"#00B798"},{"z":52.28,"lon":2.4119,"lat":48.8955,"acc":2.5,"dist":7803.465452418818,"slope":1,"color":"#00B798"},{"z":53.12,"lon":2.4116,"lat":48.8946,"acc":2.5,"dist":7908.917929327884,"slope":1,"color":"#00B798"},{"z":53.68,"lon":2.4113,"lat":48.8937,"acc":2.5,"dist":8014.371425128776,"slope":1,"color":"#00B798"},{"z":55.42,"lon":2.411,"lat":48.8927,"acc":2.5,"dist":8119.823768522357,"slope":2,"color":"#00B798"},{"z":55.8,"lon":2.4107,"lat":48.8918,"acc":2.5,"dist":8225.277130795466,"slope":0,"color":"#00B798"},{"z":59.74,"lon":2.4101,"lat":48.89,"acc":2.5,"dist":8436.183496945776,"slope":2,"color":"#00B798"},{"z":61.09,"lon":2.4098,"lat":48.889,"acc":2.5,"dist":8541.636500809409,"slope":1,"color":"#00B798"},{"z":62.78,"lon":2.4094,"lat":48.8881,"acc":2.5,"dist":8647.089437879611,"slope":2,"color":"#00B798"},{"z":64.6,"lon":2.4091,"lat":48.8872,"acc":2.5,"dist":8752.54230815271,"slope":2,"color":"#00B798"},{"z":67.83,"lon":2.4088,"lat":48.8863,"acc":2.5,"dist":8857.994953548221,"slope":3,"color":"#00B798"},{"z":68.13,"lon":2.4085,"lat":48.8853,"acc":2.5,"dist":8963.447690204326,"slope":0,"color":"#00B798"},{"z":70.95,"lon":2.4082,"lat":48.8844,"acc":2.5,"dist":9068.901287627023,"slope":3,"color":"#00B798"},{"z":76.53,"lon":2.4076,"lat":48.8826,"acc":2.5,"dist":9279.807354412762,"slope":3,"color":"#00B798"},{"z":87.24,"lon":2.4073,"lat":48.8816,"acc":2.5,"dist":9385.260751348314,"slope":10,"color":"#00B798"},{"z":95.81,"lon":2.407,"lat":48.8807,"acc":2.5,"dist":9490.714081442276,"slope":8,"color":"#00B798"},{"z":109.28,"lon":2.4063,"lat":48.8789,"acc":2.5,"dist":9701.62038300566,"slope":6,"color":"#00B798"},{"z":112.7,"lon":2.406,"lat":48.8779,"acc":2.5,"dist":9807.073354462915,"slope":3,"color":"#00B798"},{"z":116.37,"lon":2.4057,"lat":48.877,"acc":2.5,"dist":9912.526417126126,"slope":3,"color":"#00B798"},{"z":121.01,"lon":2.4051,"lat":48.8752,"acc":2.5,"dist":10123.433111344402,"slope":2,"color":"#00B798"},{"z":118.19,"lon":2.4048,"lat":48.8742,"acc":2.5,"dist":10228.885657222752,"slope":3,"color":"#00B798"},{"z":115.31,"lon":2.4045,"lat":48.8733,"acc":2.5,"dist":10334.339379946752,"slope":3,"color":"#00B798"},{"z":109.7,"lon":2.4041,"lat":48.8724,"acc":2.5,"dist":10439.7928777027,"slope":5,"color":"#00B798"},{"z":107.3,"lon":2.4038,"lat":48.8714,"acc":2.5,"dist":10545.245380957092,"slope":2,"color":"#00B798"},{"z":104.61,"lon":2.4035,"lat":48.8705,"acc":2.5,"dist":10650.698744896978,"slope":3,"color":"#00B798"},{"z":100.15,"lon":2.4032,"lat":48.8696,"acc":2.5,"dist":10756.152041920723,"slope":4,"color":"#00B798"},{"z":89.72,"lon":2.4026,"lat":48.8677,"acc":2.5,"dist":10967.05952086404,"slope":5,"color":"#00B798"},{"z":87.97,"lon":2.4023,"lat":48.8668,"acc":2.5,"dist":11072.5124590278,"slope":2,"color":"#00B798"},{"z":87.4,"lon":2.402,"lat":48.8659,"acc":2.5,"dist":11177.96657399629,"slope":1,"color":"#00B798"},{"z":84.85,"lon":2.4017,"lat":48.865,"acc":2.5,"dist":11283.419378267443,"slope":2,"color":"#00B798"},{"z":81.69,"lon":2.4013,"lat":48.864,"acc":2.5,"dist":11388.873201261928,"slope":3,"color":"#00B798"},{"z":83.62,"lon":2.401,"lat":48.8631,"acc":2.5,"dist":11494.3258716182,"slope":2,"color":"#00B798"},{"z":84.62,"lon":2.4007,"lat":48.8622,"acc":2.5,"dist":11599.779560684854,"slope":1,"color":"#00B798"},{"z":87.17,"lon":2.4001,"lat":48.8603,"acc":2.5,"dist":11810.686579823101,"slope":1,"color":"#00B798"},{"z":75.81,"lon":2.3998,"lat":48.8594,"acc":2.5,"dist":11916.139909880476,"slope":11,"color":"#00B798"},{"z":69.58,"lon":2.3995,"lat":48.8585,"acc":2.5,"dist":12021.594416701651,"slope":6,"color":"#00B798"},{"z":65.29,"lon":2.3989,"lat":48.8566,"acc":2.5,"dist":12232.500741833393,"slope":2,"color":"#00B798"},{"z":65.03,"lon":2.3982,"lat":48.8548,"acc":2.5,"dist":12443.407726534062,"slope":0,"color":"#00B798"},{"z":56.77,"lon":2.3976,"lat":48.8529,"acc":2.5,"dist":12654.315528833504,"slope":4,"color":"#00B798"},{"z":52.4,"lon":2.397,"lat":48.8511,"acc":2.5,"dist":12865.22290492052,"slope":2,"color":"#00B798"},{"z":51.08,"lon":2.3964,"lat":48.8492,"acc":2.5,"dist":13076.130012814876,"slope":1,"color":"#00B798"},{"z":50.68,"lon":2.3957,"lat":48.8474,"acc":2.5,"dist":13287.037780089879,"slope":0,"color":"#00B798"},{"z":49.4,"lon":2.3951,"lat":48.8455,"acc":2.5,"dist":13497.945121003073,"slope":1,"color":"#00B798"},{"z":50.8,"lon":2.3948,"lat":48.8446,"acc":2.5,"dist":13603.399233683544,"slope":1,"color":"#00B798"},{"z":46.34,"lon":2.3945,"lat":48.8437,"acc":2.5,"dist":13708.853279273233,"slope":4,"color":"#00B798"},{"z":52.96,"lon":2.3942,"lat":48.8427,"acc":2.5,"dist":13814.306172067108,"slope":6,"color":"#00B798"},{"z":53.51,"lon":2.3939,"lat":48.8418,"acc":2.5,"dist":13919.759925382572,"slope":1,"color":"#00B798"},{"z":47.19,"lon":2.3936,"lat":48.8409,"acc":2.5,"dist":14025.21485536383,"slope":6,"color":"#00B798"},{"z":48.23,"lon":2.3932,"lat":48.84,"acc":2.5,"dist":14130.668474453829,"slope":1,"color":"#00B798"},{"z":48.37,"lon":2.3929,"lat":48.839,"acc":2.5,"dist":14236.122026422372,"slope":0,"color":"#00B798"},{"z":41.77,"lon":2.3926,"lat":48.8381,"acc":2.5,"dist":14341.57551126028,"slope":6,"color":"#00B798"},{"z":36.49,"lon":2.3923,"lat":48.8372,"acc":2.5,"dist":14447.03001466912,"slope":5,"color":"#00B798"},{"z":37.12,"lon":2.392,"lat":48.8363,"acc":2.5,"dist":14552.484450938533,"slope":1,"color":"#00B798"},{"z":39.15,"lon":2.3917,"lat":48.8353,"acc":2.5,"dist":14657.93757628113,"slope":2,"color":"#00B798"},{"z":36.56,"lon":2.3914,"lat":48.8344,"acc":2.5,"dist":14763.391878249422,"slope":2,"color":"#00B798"},{"z":38.32,"lon":2.3911,"lat":48.8335,"acc":2.5,"dist":14868.84595498664,"slope":2,"color":"#00B798"},{"z":33.93,"lon":2.3908,"lat":48.8326,"acc":2.5,"dist":14974.299964556727,"slope":4,"color":"#00B798"},{"z":38.73,"lon":2.3901,"lat":48.8307,"acc":2.5,"dist":15185.207782176096,"slope":2,"color":"#00B798"},{"z":38.77,"lon":2.3898,"lat":48.8298,"acc":2.5,"dist":15290.661432138779,"slope":0,"color":"#00B798"},{"z":37.07,"lon":2.3895,"lat":48.8289,"acc":2.5,"dist":15396.116258698614,"slope":2,"color":"#00B798"},{"z":30.96,"lon":2.3892,"lat":48.8279,"acc":2.5,"dist":15501.56977427381,"slope":6,"color":"#00B798"},{"z":28.05,"lon":2.3889,"lat":48.827,"acc":2.5,"dist":15607.024308362234,"slope":3,"color":"#00B798"},{"z":28.05,"lon":2.3886,"lat":48.8261,"acc":2.5,"dist":15712.478933314414,"slope":0,"color":"#00B798"},{"z":32.52,"lon":2.3883,"lat":48.8252,"acc":2.5,"dist":15817.932089186714,"slope":4,"color":"#00B798"},{"z":35.23,"lon":2.388,"lat":48.8242,"acc":2.5,"dist":15923.386421628362,"slope":3,"color":"#00B798"},{"z":33.91,"lon":2.3876,"lat":48.8233,"acc":2.5,"dist":16028.840686842854,"slope":1,"color":"#00B798"},{"z":34.72,"lon":2.3873,"lat":48.8224,"acc":2.5,"dist":16134.294726749355,"slope":1,"color":"#00B798"},{"z":33.26,"lon":2.387,"lat":48.8214,"acc":2.5,"dist":16239.749943212259,"slope":1,"color":"#00B798"},{"z":33.45,"lon":2.3864,"lat":48.8196,"acc":2.5,"dist":16450.65768680046,"slope":0,"color":"#00B798"},{"z":34.25,"lon":2.3861,"lat":48.8187,"acc":2.5,"dist":16556.1125434332,"slope":1,"color":"#00B798"},{"z":34.68,"lon":2.3858,"lat":48.8177,"acc":2.5,"dist":16661.566247075814,"slope":0,"color":"#00B798"},{"z":34.9,"lon":2.3852,"lat":48.8159,"acc":2.5,"dist":16872.47546592204,"slope":0,"color":"#00B798"},{"z":33.76,"lon":2.3848,"lat":48.815,"acc":2.5,"dist":16977.929895386616,"slope":1,"color":"#00B798"},{"z":33.25,"lon":2.3845,"lat":48.814,"acc":2.5,"dist":17083.383171830843,"slope":0,"color":"#00B798"},{"z":34.2,"lon":2.3842,"lat":48.8131,"acc":2.5,"dist":17188.838552439745,"slope":1,"color":"#00B798"},{"z":35.3,"lon":2.3839,"lat":48.8122,"acc":2.5,"dist":17294.292780016192,"slope":1,"color":"#00B798"},{"z":37.63,"lon":2.3836,"lat":48.8113,"acc":2.5,"dist":17399.746940282876,"slope":2,"color":"#00B798"},{"z":47.72,"lon":2.3833,"lat":48.8103,"acc":2.5,"dist":17505.200875161783,"slope":10,"color":"#00B798"},{"z":61.88,"lon":2.3827,"lat":48.8085,"acc":2.5,"dist":17716.10978675769,"slope":7,"color":"#00B798"},{"z":64.28,"lon":2.3824,"lat":48.8076,"acc":2.5,"dist":17821.564605390857,"slope":2,"color":"#00B798"},{"z":64.66,"lon":2.3821,"lat":48.8066,"acc":2.5,"dist":17927.01935668495,"slope":0,"color":"#00B798"},{"z":63.84,"lon":2.3814,"lat":48.8048,"acc":2.5,"dist":18137.92865723033,"slope":0,"color":"#00B798"},{"z":58.61,"lon":2.3808,"lat":48.8029,"acc":2.5,"dist":18348.837530271103,"slope":2,"color":"#00B798"},{"z":60.04,"lon":2.3802,"lat":48.8011,"acc":2.5,"dist":18559.745975754082,"slope":1,"color":"#00B798"},{"z":60.53,"lon":2.3799,"lat":48.8001,"acc":2.5,"dist":18665.201183169273,"slope":0,"color":"#00B798"},{"z":60.6,"lon":2.3796,"lat":48.7992,"acc":2.5,"dist":18770.65523744936,"slope":0,"color":"#00B798"},{"z":63.94,"lon":2.3789,"lat":48.7974,"acc":2.5,"dist":18981.565315311014,"slope":2,"color":"#00B798"},{"z":71.41,"lon":2.3783,"lat":48.7955,"acc":2.5,"dist":19192.47480739924,"slope":4,"color":"#00B798"},{"z":74.21,"lon":2.3777,"lat":48.7937,"acc":2.5,"dist":19403.38402980539,"slope":1,"color":"#00B798"},{"z":92.96,"lon":2.3771,"lat":48.7918,"acc":2.5,"dist":19614.292982480434,"slope":9,"color":"#00B798"},{"z":97.51,"lon":2.3765,"lat":48.79,"acc":2.5,"dist":19825.20259305706,"slope":2,"color":"#00B798"},{"z":97.75,"lon":2.3758,"lat":48.7881,"acc":2.5,"dist":20036.112861488717,"slope":0,"color":"#00B798"},{"z":98.29,"lon":2.3752,"lat":48.7863,"acc":2.5,"dist":20247.02286004462,"slope":0,"color":"#00B798"},{"z":98.38,"lon":2.3749,"lat":48.7853,"acc":2.5,"dist":20352.477758102694,"slope":0,"color":"#00B798"},{"z":98.81,"lon":2.3746,"lat":48.7844,"acc":2.5,"dist":20457.932430599456,"slope":0,"color":"#00B798"},{"z":99.18,"lon":2.3743,"lat":48.7835,"acc":2.5,"dist":20563.38719367498,"slope":0,"color":"#00B798"},{"z":98.97,"lon":2.374,"lat":48.7826,"acc":2.5,"dist":20668.84173117576,"slope":0,"color":"#00B798"},{"z":97.99,"lon":2.3737,"lat":48.7816,"acc":2.5,"dist":20774.297286935147,"slope":1,"color":"#00B798"},{"z":96.91,"lon":2.3734,"lat":48.7807,"acc":2.5,"dist":20879.751689415414,"slope":1,"color":"#00B798"},{"z":94.93,"lon":2.3727,"lat":48.7788,"acc":2.5,"dist":21090.661377578403,"slope":1,"color":"#00B798"},{"z":94.77,"lon":2.3724,"lat":48.7779,"acc":2.5,"dist":21196.1165051768,"slope":0,"color":"#00B798"},{"z":95,"lon":2.3721,"lat":48.777,"acc":2.5,"dist":21301.571723310557,"slope":0,"color":"#00B798"},{"z":94.59,"lon":2.3715,"lat":48.7751,"acc":2.5,"dist":21512.481640795122,"slope":0,"color":"#00B798"},{"z":94.01,"lon":2.3709,"lat":48.7733,"acc":2.5,"dist":21723.392373827555,"slope":0,"color":"#00B798"},{"z":94.38,"lon":2.3702,"lat":48.7714,"acc":2.5,"dist":21934.30267851435,"slope":0,"color":"#00B798"},{"z":92.92,"lon":2.3699,"lat":48.7705,"acc":2.5,"dist":22039.757265637043,"slope":1,"color":"#00B798"},{"z":94.31,"lon":2.3696,"lat":48.7696,"acc":2.5,"dist":22145.212712876666,"slope":1,"color":"#00B798"},{"z":93.98,"lon":2.369,"lat":48.7677,"acc":2.5,"dist":22356.123404570906,"slope":0,"color":"#00B798"},{"z":93.14,"lon":2.3684,"lat":48.7659,"acc":2.5,"dist":22567.03382584473,"slope":0,"color":"#00B798"},{"z":90.83,"lon":2.3678,"lat":48.764,"acc":2.5,"dist":22777.94381857026,"slope":1,"color":"#00B798"},{"z":90.17,"lon":2.3675,"lat":48.7631,"acc":2.5,"dist":22883.39972023961,"slope":1,"color":"#00B798"},{"z":88.9,"lon":2.3671,"lat":48.7622,"acc":2.5,"dist":22988.854468486745,"slope":1,"color":"#00B798"},{"z":88.56,"lon":2.3665,"lat":48.7603,"acc":2.5,"dist":23199.765933619146,"slope":0,"color":"#00B798"},{"z":86.81,"lon":2.3659,"lat":48.7585,"acc":2.5,"dist":23410.6760423439,"slope":1,"color":"#00B798"},{"z":85.89,"lon":2.3653,"lat":48.7566,"acc":2.5,"dist":23621.5866500432,"slope":0,"color":"#00B798"},{"z":86.24,"lon":2.365,"lat":48.7557,"acc":2.5,"dist":23727.04309623986,"slope":0,"color":"#00B798"},{"z":86.06,"lon":2.3647,"lat":48.7548,"acc":2.5,"dist":23832.498230887522,"slope":0,"color":"#00B798"},{"z":82.75,"lon":2.364,"lat":48.7529,"acc":2.5,"dist":24043.409224821233,"slope":2,"color":"#00B798"},{"z":84.56,"lon":2.3634,"lat":48.7511,"acc":2.5,"dist":24254.319947936183,"slope":1,"color":"#00B798"},{"z":83.57,"lon":2.3628,"lat":48.7492,"acc":2.5,"dist":24465.231485981207,"slope":0,"color":"#00B798"},{"z":84.36,"lon":2.3622,"lat":48.7474,"acc":2.5,"dist":24676.142595040357,"slope":0,"color":"#00B798"},{"z":84.36,"lon":2.3616,"lat":48.7455,"acc":2.5,"dist":24887.05327505865,"slope":0,"color":"#00B798"},{"z":86.14,"lon":2.3609,"lat":48.7437,"acc":2.5,"dist":25097.964769865608,"slope":1,"color":"#00B798"},{"z":90.43,"lon":2.3603,"lat":48.7418,"acc":2.5,"dist":25308.87599360869,"slope":2,"color":"#00B798"},{"z":92.33,"lon":2.3597,"lat":48.74,"acc":2.5,"dist":25519.787715900504,"slope":1,"color":"#00B798"},{"z":87.05,"lon":2.3591,"lat":48.7381,"acc":2.5,"dist":25730.69916703071,"slope":3,"color":"#00B798"},{"z":87.87,"lon":2.3585,"lat":48.7363,"acc":2.5,"dist":25941.610346947797,"slope":0,"color":"#00B798"},{"z":86.67,"lon":2.3578,"lat":48.7344,"acc":2.5,"dist":26152.522183344354,"slope":1,"color":"#00B798"},{"z":86.7,"lon":2.3572,"lat":48.7325,"acc":2.5,"dist":26363.4337484294,"slope":0,"color":"#00B798"},{"z":85.66,"lon":2.3566,"lat":48.7307,"acc":2.5,"dist":26574.345969900107,"slope":0,"color":"#00B798"},{"z":85.51,"lon":2.356,"lat":48.7288,"acc":2.5,"dist":26785.257761891116,"slope":0,"color":"#00B798"},{"z":84.59,"lon":2.3554,"lat":48.727,"acc":2.5,"dist":26996.16928242218,"slope":0,"color":"#00B798"}]} + + + + + + + diff --git a/samples-src/resources/data/gpx/export-route-json.gpx b/samples-src/resources/data/gpx/export-route-json.gpx new file mode 100644 index 000000000..ce1c4f5f3 --- /dev/null +++ b/samples-src/resources/data/gpx/export-route-json.gpx @@ -0,0 +1,84 @@ + + + + {"type":"route","points":[[2.588903974691772,48.84180319210205],null,null,null,null,null,[2.5862700454391456,48.840433323926135]],"transport":"Pieton","exclusions":[],"computation":"fastest","results":{"totalTime":304.2,"totalDistance":340.1,"bbox":{"left":2.586226,"right":2.588904,"top":48.841809,"bottom":48.840433},"routeGeometry":null,"routeInstructions":[{"duration":5.2,"distance":7.9,"code":"","instruction":"Départ","geometry":{"coordinates":[[2.588904,48.841809],[2.588796,48.841805]],"type":"LineString"}},{"duration":26.6,"distance":29.6,"code":"","instruction":"Continuer à gauche","geometry":{"coordinates":[[2.588796,48.841805],[2.58882,48.841539]],"type":"LineString"}},{"duration":151.1,"distance":167.5,"code":"","instruction":"Continuer à droite","geometry":{"coordinates":[[2.58882,48.841539],[2.587649,48.841489],[2.586988,48.841461],[2.586537,48.841442]],"type":"LineString"}},{"duration":77.4,"distance":85.7,"code":"","instruction":"Continuer à gauche","geometry":{"coordinates":[[2.586537,48.841442],[2.586579,48.840933],[2.586577,48.84092],[2.586567,48.840902],[2.586539,48.84089],[2.586505,48.840887],[2.586226,48.840876]],"type":"LineString"}},{"duration":43.9,"distance":49.4,"code":"","instruction":"Tourner à gauche sur BD COPERNIC","geometry":{"coordinates":[[2.586226,48.840876],[2.586232,48.840797],[2.586256,48.840524],[2.586264,48.840433]],"type":"LineString"}},{"duration":0,"distance":0,"code":"","instruction":"Arrivée sur BD COPERNIC","geometry":{"coordinates":[[2.586264,48.840433],[2.586264,48.840433]],"type":"LineString"}}]}} + + + + + + + #00b798 + 0.9 + 12 + + + + + + + #00b798 + 0.9 + 12 + + + + + + + + + #00b798 + 0.9 + 12 + + + + + + + + + + + + #00b798 + 0.9 + 12 + + + + + + + + + #00b798 + 0.9 + 12 + + + + + + + #00b798 + 0.9 + 12 + + + + Point de départ + + data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAmCAYAAABpuqMCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAQxSURBVFiF3ZldaBxVFMd/d2ayTRtjQpo2mlilWBEMshoj+FAERZIHIdA3iw+V1icRREFIQAKNgsUHQfBFwZI2WgWxqYUiVTDBBj9ILC5Nu2tjdjemsR+mSZNNNvsxO8eHTTRuk+zMnQmCf9iHnXvO+Z//nDvn3rmjRIT/C6zAI4ZVFRbtKDpQNCM0AvXANIo/EC4inMbmLBFZDJJaBVaZJ9Sd2HQCrwDbXHikgfewOMKPMh9ECsGIeVx1IHxEsQJeMY3iEMNy2m8aht8AtKpOhH70hADUI/TTqjr9puKvMsUE3vabxCp0MSJHdJ31xRSnVj9BVPcfOCj26U45PTHFh30c/am1EaaxuF+nKejd1WLX2gwhAPXL8T3De2XCqooKbuCu/eoiTZ6dXtch75WxaMeNENOyOXx8kHOpGMPOIudSMQ4fH8S0bBcs25Z5PMF7ZVpVL3BgQxvTsvn6+kVq6sK3jc3NRGhraKZgl9t9HGNEXvCSmvfKKJrL2nQfHVpTCEBNXZjuo0OB8JTAu5jiXmtjPL3vLl/jbnlKoNPN6spaVFbt8jXulqcEOmKSZS0yi5O+xt3ylEBHTLSsxbf913yNu+UpgU4DKE/Sc3AvczORNcfmZiL0HNwbCE8JvItxWDvJ1SjYFm0NzZzpG2RpIYbIIksLMc70Dbpsy+54SqCzzlQAY8B9Xsk8YAJ4gBHJe3HyXpkRyaN407OfN7zlVQjobjTv4BgQ1/ItjzjV9Oo46okZEBuhS8u3PDoZEDf7t9vg903zBLBfP8C/4cAnD87teclIGyFlLoVyllWh8vmQYRgVAOI4OQmFciKSFZFsMpmck1UC/Il5VNViEgHu9StkQYyb7bNNH1wrmDm3PgqWUHLBhl+SyeRV/6czLepJDAbw8fos4HTNb+/9PFv9u3YMU/X6f38/L98B7/gJ8U2uasiPEADTcRqDOozoBn7WcbzqmFOvpnYM+uTPpvP5SDBiimvP8xRPKV3DFpV7fX7HyYyD44M96xicmpqaSgd3TDQsv6J4zYvLx5nqsz/kK29qcyq5kFpafD+RSMSKf4P+CvCY+hJFRzmzmB2KPTvb+JnX8CsdzDGM8/F4/PrqseC/AggvZlGXtyipXc8kLcbCy6mdrg/6lBIbR41DYXR8cjIqIoW17IIXc17+nHnEOnS3VfhiHQt5d7HmVMK2Nn6+DHLiOGMmRLdMVI+NymjZ9Sf4abaMqZbQp01G/rnS60P5rT8duNXw1TpuGaXksmMYlxKJxLiIt23NponhKVV5a874rdZwmlYuTTvmjWdmGj9Mifl3kkpJ2hGJGY4THb9yJS4i2p0t+Gm2ggHJxMNb94eNzIAJZgEKbyxsP5kS00ZJSkG0oFQ0mZyYkKDuqIhs6u/7hyt75luM2RMPVfft3rW7bU9T0z2bxbV50+w/wF8f81R5OpwBhwAAAABJRU5ErkJggg== + medium + + + + Point d'arrivée + + data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAmCAYAAABpuqMCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAQ+SURBVFiF3ZlLaFxlGIaf/5zJpJNpaoxpYieoCxULEYK7Lqp0IWQhFLooKNKEtNIULxWlQoJgQQWLFMEg0lQMuXgD0dRSkNJFgoy0IrYNSTpj08xMmoxNYhLUyUwyt/O5mFbjmGTOLS58d3O+y/u95/vnvx0lIvxf4HE9Y7PyU0ETwl6gAQgANcA88AswhuIsKc7TJ0k3qZVrnTmqtpGhHeFloMJERArF+3g5Qaf84UYJ7og5rPai+JhCB6xiHuEQp+Ws0zI0pwloU+0oBrAnBKAGxQBtqt1pKc46UyjgHadFrEIHXXLCbrB9MYWhNYAb3f0bBsI+u0POnpijahtpJrA/tDbCPOU8aGdSsPdWM7SzOUIAam7ntwzrnWlWfnzMYW76tYsUy9RaXYesd6aCJswI0Tw5WvuG6EyEOWUk6UyEae0bQvPkTLEUeCzBupjCyl4iqyfHydkxdh3YQ/nWnSjlp3zrTnYd2MPJ2TFTgszwFNNaDaCwRdkYLd1B/NWNa9r81Y20dAdd4SmCHTGBkh6P7bvXkd0sTxHsiKku6eH13+fIbpanCHbExEp6ZJJTjuxmeYpgXYwiVNLnysCMI7tZniLYmc1Kk/Qe3E1ycXhNW3JxmN6Du13hKYIdMWsXuRpGzsOxugYu9Q+RXgojkiS9FOZS/xDH6howcqUPhWZ4imB9B9CmyoBx4AGrZBYwCTxMl2StBFnvTJdkUbxlOc4a3rYqBOxuNHfQC0RsxZZGhAA9dgLtiTkuOYQOW7Gl0c5xMbN/+xecnTQPq89QPGM/wT9hCJ8+MvjQ81pK8yp92ZvxeMpUNuvVNK0MQAwjI15vRkTSIpKOxWK/yyoBzsS0qiq8DAP3OxWylNMWmoL1XTMresZsjIJllIzk4GosFrvl/HbmiHoCYRAHx2cBo2Pknp4v45U3befQVY/z8/sp+Q5410mKC7P+oBMhALphBNy6jHgDxU92Am+t6PFXhrcPOeRPp7LZYXfEdEkWjWeBlJWwnKEyr41s/3rFwHDAnjY0zsTj8ZR710Qfys/Aq1ZCPrlZef7iwpYF25xKRhLLyQ+i0Wi48NPtrwBt6hsofeQNJ7zhp74PfGE1/Z0ZzNC0y5FIZHa1zf2vAFmeS2vqerkuVeu5pPLa0otXa01f9CklOQw1AfnRiampkIjk1/JzX0y3/LrY7Dm0w5f/ah0Pee/GXWeiSc/G/y+NjBjGuA6h8snK8VEZLbn+uD/MbiPe7P283pd9uvh5cMH3Q8uPdd+uE7ailFw3NO1aNBqdELG2rdk0MbSqLb8p7UZVmVF/59F8Wp97Mhg4ncjqfxWplKQMkbBmGKGJ6emIiNie2TZPDHB5v+/xxrtXBnWFnhfyL1yp/ejCXMUMShIKQnmlQrFYbFJcKmJTxQBc3O9789FtmZfOzfjPvT5S068bmWvj09PTm8G16WL+S/wJLybNu1V6htkAAAAASUVORK5CYII= + medium + + + diff --git a/samples-src/resources/data/gpx/export-route-xml.gpx b/samples-src/resources/data/gpx/export-route-xml.gpx new file mode 100644 index 000000000..4e10bf36c --- /dev/null +++ b/samples-src/resources/data/gpx/export-route-xml.gpx @@ -0,0 +1,3930 @@ + + + + + route + + + 2.5877529997344015 + 48.84050412161184 + + + + + + + + 2.424470549423338 + 48.84586375242972 + + + Voiture + + fastest + + 857.7 + 14488.3 + + 2.424473 + 2.587755 + 48.845872 + 48.825745 + + + + + 6.3 + 109.3 + + Départ sur AV BLAISE PASCAL + + + + 2.587755 + 48.840481 + + + 2.586265 + 48.840419 + + + LineString + + + + 25.3 + 246 + + Tourner à gauche sur BD COPERNIC + + + + 2.586265 + 48.840419 + + + 2.586268 + 48.84035 + + + 2.586187 + 48.840106 + + + 2.585973 + 48.839422 + + + 2.585748 + 48.838748 + + + 2.585685 + 48.838557 + + + 2.585633 + 48.838434 + + + 2.58556 + 48.838259 + + + LineString + + + + 8.1 + 56.9 + + Tourner à droite + + + + 2.58556 + 48.838259 + + + 2.585482 + 48.838307 + + + 2.585437 + 48.838326 + + + 2.585314 + 48.838348 + + + 2.585258 + 48.838347 + + + 2.585187 + 48.838335 + + + 2.585129 + 48.838327 + + + 2.585032 + 48.838292 + + + 2.58497 + 48.838243 + + + 2.584925 + 48.838189 + + + LineString + + + + 25.7 + 202.9 + + Tourner légèrement à droite sur BD BLAISE PASCAL + + + + 2.584925 + 48.838189 + + + 2.584772 + 48.83818 + + + 2.584669 + 48.838179 + + + 2.584213 + 48.838172 + + + 2.583698 + 48.838144 + + + 2.583461 + 48.838128 + + + 2.583083 + 48.838091 + + + 2.582885 + 48.838066 + + + 2.582684 + 48.83804 + + + 2.582555 + 48.838024 + + + 2.582517 + 48.838019 + + + 2.582431 + 48.838021 + + + 2.582376 + 48.838028 + + + 2.582322 + 48.838042 + + + 2.582312 + 48.838047 + + + 2.582289 + 48.83806 + + + 2.582263 + 48.838069 + + + 2.582236 + 48.838078 + + + 2.582208 + 48.838085 + + + 2.582196 + 48.838086 + + + LineString + + + + 5.8 + 57.1 + + Tourner à gauche sur BD DU RU DE NESLE + + + + 2.582196 + 48.838086 + + + 2.582178 + 48.838089 + + + 2.582148 + 48.838092 + + + 2.58212 + 48.838094 + + + 2.582091 + 48.838093 + + + 2.582061 + 48.838089 + + + 2.582031 + 48.838085 + + + 2.582004 + 48.838078 + + + 2.581977 + 48.83807 + + + 2.581951 + 48.83806 + + + 2.581926 + 48.838048 + + + 2.581918 + 48.838044 + + + 2.581905 + 48.838035 + + + 2.581883 + 48.83802 + + + 2.581866 + 48.838004 + + + 2.58186 + 48.838 + + + 2.581843 + 48.837986 + + + 2.58175 + 48.837932 + + + 2.581635 + 48.837881 + + + 2.581551 + 48.83784 + + + LineString + + + + 4.300000000000001 + 42 + + Continuer à gauche sur BD DU RU DE NESLE + + + + 2.581551 + 48.83784 + + + 2.581648 + 48.837834 + + + 2.581709 + 48.837827 + + + 2.581758 + 48.837816 + + + 2.581865 + 48.837781 + + + 2.581882 + 48.837765 + + + 2.581903 + 48.837751 + + + 2.581925 + 48.837737 + + + 2.58195 + 48.837726 + + + 2.581975 + 48.837716 + + + 2.582001 + 48.837707 + + + 2.582029 + 48.8377 + + + 2.582059 + 48.837695 + + + 2.582063 + 48.837695 + + + LineString + + + + 12.3 + 227.6 + + Continuer légèrement à droite sur BD DU RU DE NESLE + + + + 2.582063 + 48.837695 + + + 2.582136 + 48.837582 + + + 2.582243 + 48.837281 + + + 2.58227 + 48.837145 + + + 2.582312 + 48.837035 + + + 2.582369 + 48.836883 + + + 2.582401 + 48.836788 + + + 2.582442 + 48.836674 + + + 2.582522 + 48.836442 + + + 2.58266 + 48.836071 + + + 2.582719 + 48.835924 + + + 2.582776 + 48.835706 + + + LineString + + + + 28.5 + 357.5 + + Sur la bifurcation, prendre légèrement à droite + + + + 2.582776 + 48.835706 + + + 2.582752 + 48.835566 + + + 2.582727 + 48.835513 + + + 2.582679 + 48.835438 + + + 2.582592 + 48.835367 + + + 2.582487 + 48.83532 + + + 2.582099 + 48.835228 + + + 2.581721 + 48.835182 + + + 2.581463 + 48.835164 + + + 2.581428 + 48.835161 + + + 2.581 + 48.83514 + + + 2.580934 + 48.835138 + + + 2.580259 + 48.835121 + + + 2.579644 + 48.835096 + + + 2.578844 + 48.835082 + + + 2.578332 + 48.835033 + + + LineString + + + + 16.8 + 582.3 + + Continuer tout droit + + + + 2.578332 + 48.835033 + + + 2.578 + 48.835051 + + + 2.577928 + 48.835055 + + + 2.577775 + 48.835062 + + + 2.577694 + 48.835066 + + + 2.577686 + 48.835067 + + + 2.575886 + 48.835164 + + + 2.573963 + 48.835266 + + + 2.572078 + 48.83537 + + + 2.570404 + 48.835453 + + + LineString + + + + 365.90000000000003 + 8026.6 + + Sur la bifurcation, prendre lègèrement à gauche + + + + 2.570404 + 48.835453 + + + 2.570022 + 48.835471 + + + 2.569177 + 48.835517 + + + 2.56824 + 48.835566 + + + 2.565146 + 48.835722 + + + 2.56508 + 48.835727 + + + 2.562902 + 48.835844 + + + 2.562883 + 48.835844 + + + 2.562477 + 48.835862 + + + 2.560521 + 48.835965 + + + 2.558564 + 48.836068 + + + 2.556832 + 48.836159 + + + 2.556599 + 48.836171 + + + 2.555571 + 48.836227 + + + 2.555563 + 48.836227 + + + 2.552589 + 48.836386 + + + 2.552375 + 48.836407 + + + 2.55086 + 48.836476 + + + 2.549121 + 48.836564 + + + 2.547806 + 48.836632 + + + 2.547593 + 48.836643 + + + 2.547377 + 48.836654 + + + 2.545428 + 48.836756 + + + 2.545042 + 48.836766 + + + 2.544116 + 48.836767 + + + 2.543866 + 48.836753 + + + 2.543697 + 48.836743 + + + 2.543534 + 48.836736 + + + 2.543424 + 48.836727 + + + 2.543179 + 48.836705 + + + 2.542849 + 48.836667 + + + 2.542332 + 48.836592 + + + 2.541893 + 48.836501 + + + 2.541496 + 48.836417 + + + 2.541177 + 48.836335 + + + 2.540804 + 48.836228 + + + 2.540425 + 48.836105 + + + 2.540141 + 48.836007 + + + 2.539624 + 48.835817 + + + 2.539063 + 48.835595 + + + 2.538299 + 48.835271 + + + 2.53777 + 48.835037 + + + 2.53744 + 48.834891 + + + 2.536451 + 48.834427 + + + 2.536008 + 48.834213 + + + 2.535997 + 48.834208 + + + 2.534875 + 48.833641 + + + 2.534487 + 48.833431 + + + 2.534236 + 48.833299 + + + 2.533746 + 48.833027 + + + 2.533297 + 48.83278 + + + 2.532865 + 48.832533 + + + 2.5328 + 48.832491 + + + 2.53275 + 48.83246 + + + 2.532117 + 48.832082 + + + 2.531503 + 48.831707 + + + 2.530915 + 48.83133 + + + 2.529758 + 48.830548 + + + 2.528889 + 48.829926 + + + 2.528638 + 48.829735 + + + 2.527675 + 48.828995 + + + 2.527586 + 48.82893 + + + 2.527284 + 48.828707 + + + 2.527051 + 48.828534 + + + 2.526699 + 48.828292 + + + 2.526632 + 48.82825 + + + 2.526372 + 48.828087 + + + 2.526022 + 48.82789 + + + 2.52579 + 48.827774 + + + 2.525595 + 48.827673 + + + 2.525271 + 48.827521 + + + 2.524992 + 48.827407 + + + 2.524781 + 48.827324 + + + 2.524622 + 48.827264 + + + 2.524443 + 48.827202 + + + 2.524342 + 48.827166 + + + 2.524115 + 48.827093 + + + 2.524061 + 48.827076 + + + 2.523969 + 48.827042 + + + 2.523901 + 48.82702 + + + 2.523651 + 48.826944 + + + 2.523326 + 48.826858 + + + 2.522963 + 48.826786 + + + 2.522599 + 48.826713 + + + 2.522176 + 48.826639 + + + 2.521683 + 48.826571 + + + 2.521249 + 48.826529 + + + 2.520796 + 48.826503 + + + 2.520088 + 48.826477 + + + 2.519645 + 48.82647 + + + 2.518953 + 48.826491 + + + 2.518183 + 48.826528 + + + 2.51757 + 48.826561 + + + 2.517134 + 48.826592 + + + 2.516745 + 48.826618 + + + 2.516167 + 48.826651 + + + 2.515645 + 48.826682 + + + 2.515126 + 48.826714 + + + 2.514597 + 48.826753 + + + 2.513967 + 48.826799 + + + 2.513242 + 48.826865 + + + 2.512625 + 48.826921 + + + 2.511961 + 48.826984 + + + 2.511305 + 48.82705 + + + 2.510706 + 48.827117 + + + 2.510038 + 48.827196 + + + 2.509313 + 48.827292 + + + 2.508595 + 48.827385 + + + 2.507891 + 48.827487 + + + 2.507223 + 48.827586 + + + 2.506724 + 48.827669 + + + 2.505912 + 48.827788 + + + 2.505342 + 48.827889 + + + 2.505055 + 48.827951 + + + 2.504568 + 48.82805 + + + 2.504162 + 48.828135 + + + 2.503727 + 48.828215 + + + 2.503041 + 48.828365 + + + 2.50241 + 48.828522 + + + 2.501693 + 48.828701 + + + 2.501212 + 48.828825 + + + 2.500596 + 48.828999 + + + 2.500103 + 48.82914 + + + 2.499397 + 48.82935 + + + 2.499058 + 48.829449 + + + 2.498762 + 48.829539 + + + 2.498279 + 48.829672 + + + 2.497767 + 48.829803 + + + 2.497378 + 48.829904 + + + 2.497033 + 48.829968 + + + 2.496784 + 48.830017 + + + 2.496554 + 48.830065 + + + 2.496286 + 48.830114 + + + 2.496034 + 48.830157 + + + 2.49576 + 48.830202 + + + 2.49551 + 48.830238 + + + 2.495219 + 48.830278 + + + 2.494947 + 48.830312 + + + 2.494677 + 48.830341 + + + 2.494362 + 48.830372 + + + 2.494112 + 48.83039 + + + 2.493841 + 48.830409 + + + 2.493571 + 48.830424 + + + 2.493314 + 48.830433 + + + 2.493006 + 48.830441 + + + 2.492709 + 48.830445 + + + 2.492444 + 48.830447 + + + 2.492158 + 48.830448 + + + 2.491895 + 48.830444 + + + 2.491612 + 48.83044 + + + 2.491348 + 48.830433 + + + 2.491084 + 48.830424 + + + 2.490817 + 48.830412 + + + 2.490486 + 48.830397 + + + 2.490161 + 48.830378 + + + 2.48959 + 48.830342 + + + 2.489454 + 48.830331 + + + 2.489071 + 48.830301 + + + 2.488692 + 48.830269 + + + 2.488274 + 48.830232 + + + 2.487878 + 48.830193 + + + 2.487494 + 48.830153 + + + 2.487143 + 48.830116 + + + 2.486706 + 48.830072 + + + 2.486369 + 48.830034 + + + 2.486072 + 48.829995 + + + 2.485754 + 48.829954 + + + 2.485357 + 48.829901 + + + 2.484984 + 48.82985 + + + 2.484595 + 48.829797 + + + 2.484202 + 48.829739 + + + 2.483832 + 48.82968 + + + 2.483449 + 48.829626 + + + 2.483073 + 48.82957 + + + 2.482754 + 48.829525 + + + 2.482401 + 48.829475 + + + 2.481982 + 48.829421 + + + 2.481591 + 48.829368 + + + 2.481251 + 48.829321 + + + 2.480918 + 48.829279 + + + 2.480096 + 48.829169 + + + 2.479857 + 48.829138 + + + 2.479589 + 48.829099 + + + 2.479326 + 48.829061 + + + 2.479047 + 48.82902 + + + 2.478807 + 48.828985 + + + 2.478544 + 48.828945 + + + 2.478271 + 48.828904 + + + 2.477978 + 48.82886 + + + 2.477755 + 48.828827 + + + 2.477524 + 48.828795 + + + 2.477301 + 48.828761 + + + 2.47706 + 48.828726 + + + 2.476845 + 48.828695 + + + 2.476674 + 48.828669 + + + 2.476584 + 48.828659 + + + 2.476349 + 48.828626 + + + 2.476109 + 48.828591 + + + 2.475851 + 48.828553 + + + 2.47558 + 48.828516 + + + 2.475266 + 48.828473 + + + 2.474979 + 48.828435 + + + 2.474708 + 48.828396 + + + 2.474428 + 48.828356 + + + 2.474144 + 48.828317 + + + 2.473838 + 48.828272 + + + 2.473605 + 48.82824 + + + 2.473373 + 48.828207 + + + 2.473163 + 48.828178 + + + 2.472967 + 48.82815 + + + 2.472756 + 48.828121 + + + 2.472532 + 48.828088 + + + 2.472322 + 48.828055 + + + 2.472108 + 48.828021 + + + 2.471883 + 48.827985 + + + 2.471687 + 48.827952 + + + 2.471473 + 48.827916 + + + 2.471256 + 48.827879 + + + 2.471054 + 48.827841 + + + 2.47084 + 48.827803 + + + 2.470639 + 48.827765 + + + 2.470445 + 48.827727 + + + 2.470282 + 48.827693 + + + 2.470159 + 48.827667 + + + 2.470003 + 48.827636 + + + 2.469837 + 48.827599 + + + 2.469688 + 48.827565 + + + 2.469529 + 48.827528 + + + 2.46938 + 48.827492 + + + 2.469217 + 48.82745 + + + 2.469048 + 48.827407 + + + 2.468872 + 48.827361 + + + 2.468684 + 48.827311 + + + 2.468507 + 48.827262 + + + 2.468329 + 48.827213 + + + 2.468176 + 48.827169 + + + 2.468056 + 48.827134 + + + 2.467908 + 48.82709 + + + 2.467757 + 48.827045 + + + LineString + + + + 223.8 + 4481.5 + + Sur la bifurcation, prendre lègèrement à gauche + + + + 2.552375 + 48.836407 + + + 2.55086 + 48.836476 + + + 2.549121 + 48.836564 + + + 2.547806 + 48.836632 + + + 2.547593 + 48.836643 + + + 2.547377 + 48.836654 + + + 2.545428 + 48.836756 + + + 2.545042 + 48.836766 + + + 2.544116 + 48.836767 + + + 2.543866 + 48.836753 + + + 2.543697 + 48.836743 + + + 2.543534 + 48.836736 + + + 2.543424 + 48.836727 + + + 2.543179 + 48.836705 + + + 2.542849 + 48.836667 + + + 2.542332 + 48.836592 + + + 2.541893 + 48.836501 + + + 2.541496 + 48.836417 + + + 2.541177 + 48.836335 + + + 2.540804 + 48.836228 + + + 2.540425 + 48.836105 + + + 2.540141 + 48.836007 + + + 2.539624 + 48.835817 + + + 2.539063 + 48.835595 + + + 2.538299 + 48.835271 + + + 2.53777 + 48.835037 + + + 2.53744 + 48.834891 + + + 2.536451 + 48.834427 + + + 2.536008 + 48.834213 + + + 2.535997 + 48.834208 + + + 2.534875 + 48.833641 + + + 2.534487 + 48.833431 + + + 2.534236 + 48.833299 + + + 2.533746 + 48.833027 + + + 2.533297 + 48.83278 + + + 2.532865 + 48.832533 + + + 2.5328 + 48.832491 + + + 2.53275 + 48.83246 + + + 2.532117 + 48.832082 + + + 2.531503 + 48.831707 + + + 2.530915 + 48.83133 + + + 2.529758 + 48.830548 + + + 2.528889 + 48.829926 + + + 2.528638 + 48.829735 + + + 2.527675 + 48.828995 + + + 2.527586 + 48.82893 + + + 2.527284 + 48.828707 + + + 2.527051 + 48.828534 + + + 2.526699 + 48.828292 + + + 2.526632 + 48.82825 + + + 2.526372 + 48.828087 + + + 2.526022 + 48.82789 + + + 2.52579 + 48.827774 + + + 2.525595 + 48.827673 + + + 2.525271 + 48.827521 + + + 2.524992 + 48.827407 + + + 2.524781 + 48.827324 + + + 2.524622 + 48.827264 + + + 2.524443 + 48.827202 + + + 2.524342 + 48.827166 + + + 2.524115 + 48.827093 + + + 2.524061 + 48.827076 + + + 2.523969 + 48.827042 + + + 2.523901 + 48.82702 + + + 2.523651 + 48.826944 + + + 2.523326 + 48.826858 + + + 2.522963 + 48.826786 + + + 2.522599 + 48.826713 + + + 2.522176 + 48.826639 + + + 2.521683 + 48.826571 + + + 2.521249 + 48.826529 + + + 2.520796 + 48.826503 + + + 2.520088 + 48.826477 + + + 2.519645 + 48.82647 + + + 2.518953 + 48.826491 + + + 2.518183 + 48.826528 + + + 2.51757 + 48.826561 + + + 2.517134 + 48.826592 + + + 2.516745 + 48.826618 + + + 2.516167 + 48.826651 + + + 2.515645 + 48.826682 + + + 2.515126 + 48.826714 + + + 2.514597 + 48.826753 + + + 2.513967 + 48.826799 + + + 2.513242 + 48.826865 + + + 2.512625 + 48.826921 + + + 2.511961 + 48.826984 + + + 2.511305 + 48.82705 + + + 2.510706 + 48.827117 + + + 2.510038 + 48.827196 + + + 2.509313 + 48.827292 + + + 2.508595 + 48.827385 + + + 2.507891 + 48.827487 + + + 2.507223 + 48.827586 + + + 2.506724 + 48.827669 + + + 2.505912 + 48.827788 + + + 2.505342 + 48.827889 + + + 2.505055 + 48.827951 + + + 2.504568 + 48.82805 + + + 2.504162 + 48.828135 + + + 2.503727 + 48.828215 + + + 2.503041 + 48.828365 + + + 2.50241 + 48.828522 + + + 2.501693 + 48.828701 + + + 2.501212 + 48.828825 + + + 2.500596 + 48.828999 + + + 2.500103 + 48.82914 + + + 2.499397 + 48.82935 + + + 2.499058 + 48.829449 + + + 2.498762 + 48.829539 + + + 2.498279 + 48.829672 + + + 2.497767 + 48.829803 + + + 2.497378 + 48.829904 + + + LineString + + + + 89.30000000000001 + 2220.9 + + Sur la bifurcation, prendre lègèrement à gauche + + + + 2.497378 + 48.829904 + + + 2.497033 + 48.829968 + + + 2.496784 + 48.830017 + + + 2.496554 + 48.830065 + + + 2.496286 + 48.830114 + + + 2.496034 + 48.830157 + + + 2.49576 + 48.830202 + + + 2.49551 + 48.830238 + + + 2.495219 + 48.830278 + + + 2.494947 + 48.830312 + + + 2.494677 + 48.830341 + + + 2.494362 + 48.830372 + + + 2.494112 + 48.83039 + + + 2.493841 + 48.830409 + + + 2.493571 + 48.830424 + + + 2.493314 + 48.830433 + + + 2.493006 + 48.830441 + + + 2.492709 + 48.830445 + + + 2.492444 + 48.830447 + + + 2.492158 + 48.830448 + + + 2.491895 + 48.830444 + + + 2.491612 + 48.83044 + + + 2.491348 + 48.830433 + + + 2.491084 + 48.830424 + + + 2.490817 + 48.830412 + + + 2.490486 + 48.830397 + + + 2.490161 + 48.830378 + + + 2.48959 + 48.830342 + + + 2.489454 + 48.830331 + + + 2.489071 + 48.830301 + + + 2.488692 + 48.830269 + + + 2.488274 + 48.830232 + + + 2.487878 + 48.830193 + + + 2.487494 + 48.830153 + + + 2.487143 + 48.830116 + + + 2.486706 + 48.830072 + + + 2.486369 + 48.830034 + + + 2.486072 + 48.829995 + + + 2.485754 + 48.829954 + + + 2.485357 + 48.829901 + + + 2.484984 + 48.82985 + + + 2.484595 + 48.829797 + + + 2.484202 + 48.829739 + + + 2.483832 + 48.82968 + + + 2.483449 + 48.829626 + + + 2.483073 + 48.82957 + + + 2.482754 + 48.829525 + + + 2.482401 + 48.829475 + + + 2.481982 + 48.829421 + + + 2.481591 + 48.829368 + + + 2.481251 + 48.829321 + + + 2.480918 + 48.829279 + + + 2.480096 + 48.829169 + + + 2.479857 + 48.829138 + + + 2.479589 + 48.829099 + + + 2.479326 + 48.829061 + + + 2.479047 + 48.82902 + + + 2.478807 + 48.828985 + + + 2.478544 + 48.828945 + + + 2.478271 + 48.828904 + + + 2.477978 + 48.82886 + + + 2.477755 + 48.828827 + + + 2.477524 + 48.828795 + + + 2.477301 + 48.828761 + + + 2.47706 + 48.828726 + + + 2.476845 + 48.828695 + + + 2.476674 + 48.828669 + + + 2.476584 + 48.828659 + + + 2.476349 + 48.828626 + + + 2.476109 + 48.828591 + + + 2.475851 + 48.828553 + + + 2.47558 + 48.828516 + + + 2.475266 + 48.828473 + + + 2.474979 + 48.828435 + + + 2.474708 + 48.828396 + + + 2.474428 + 48.828356 + + + 2.474144 + 48.828317 + + + 2.473838 + 48.828272 + + + 2.473605 + 48.82824 + + + 2.473373 + 48.828207 + + + 2.473163 + 48.828178 + + + 2.472967 + 48.82815 + + + 2.472756 + 48.828121 + + + 2.472532 + 48.828088 + + + 2.472322 + 48.828055 + + + 2.472108 + 48.828021 + + + 2.471883 + 48.827985 + + + 2.471687 + 48.827952 + + + 2.471473 + 48.827916 + + + 2.471256 + 48.827879 + + + 2.471054 + 48.827841 + + + 2.47084 + 48.827803 + + + 2.470639 + 48.827765 + + + 2.470445 + 48.827727 + + + 2.470282 + 48.827693 + + + 2.470159 + 48.827667 + + + 2.470003 + 48.827636 + + + 2.469837 + 48.827599 + + + 2.469688 + 48.827565 + + + 2.469529 + 48.827528 + + + 2.46938 + 48.827492 + + + 2.469217 + 48.82745 + + + 2.469048 + 48.827407 + + + 2.468872 + 48.827361 + + + 2.468684 + 48.827311 + + + 2.468507 + 48.827262 + + + 2.468329 + 48.827213 + + + 2.468176 + 48.827169 + + + 2.468056 + 48.827134 + + + 2.467908 + 48.82709 + + + 2.467757 + 48.827045 + + + LineString + + + + 46.400000000000006 + 443.7 + + Sur la bifurcation, prendre légèrement à droite + + + + 2.467757 + 48.827045 + + + 2.467561 + 48.827022 + + + 2.467249 + 48.826955 + + + 2.467016 + 48.826897 + + + 2.466792 + 48.82684 + + + 2.466447 + 48.826753 + + + 2.465894 + 48.826612 + + + 2.465225 + 48.826414 + + + 2.464969 + 48.826333 + + + 2.46425 + 48.826096 + + + 2.464014 + 48.826012 + + + 2.463383 + 48.825792 + + + 2.463275 + 48.82576 + + + 2.463178 + 48.825745 + + + 2.463028 + 48.825751 + + + 2.46297 + 48.82576 + + + 2.462871 + 48.825795 + + + 2.462832 + 48.825815 + + + 2.462797 + 48.825834 + + + 2.462737 + 48.825884 + + + 2.462697 + 48.825938 + + + 2.462668 + 48.825996 + + + 2.462662 + 48.826055 + + + 2.462673 + 48.826107 + + + 2.462695 + 48.826158 + + + 2.462745 + 48.826223 + + + LineString + + + + 8.5 + 153.4 + + Continuer tout droit sur RTE DE LA FERME + + + + 2.462745 + 48.826223 + + + 2.462962 + 48.82634 + + + 2.463631 + 48.826701 + + + 2.463662 + 48.826717 + + + 2.463951 + 48.826871 + + + 2.463979 + 48.826885 + + + 2.464223 + 48.827018 + + + 2.464361 + 48.8271 + + + LineString + + + + 4 + 26.3 + + Tourner à droite sur CAR DE BEAUTE + + + + 2.464361 + 48.8271 + + + 2.464383 + 48.827085 + + + 2.46441 + 48.827075 + + + 2.464444 + 48.827068 + + + 2.464478 + 48.827065 + + + 2.464514 + 48.827069 + + + 2.464548 + 48.827076 + + + 2.464579 + 48.827089 + + + 2.464603 + 48.827103 + + + 2.464621 + 48.827126 + + + 2.46463 + 48.827156 + + + LineString + + + + 1.2 + 7.4 + + À la fin de la route, prendre à gauche sur CAR DE BEAUTE + + + + 2.46463 + 48.827156 + + + 2.464629 + 48.827169 + + + 2.464623 + 48.827185 + + + 2.46461 + 48.827204 + + + 2.464598 + 48.827218 + + + LineString + + + + 2.8 + 18.3 + + Continuer à gauche sur CAR DE BEAUTE + + + + 2.464598 + 48.827218 + + + 2.46458 + 48.827233 + + + 2.464558 + 48.827247 + + + 2.464524 + 48.827262 + + + 2.464493 + 48.827272 + + + 2.464464 + 48.827272 + + + 2.464419 + 48.827268 + + + 2.464382 + 48.827258 + + + LineString + + + + 115.6 + 2017 + + À la fin de la route, prendre à droite sur AV DU TREMBLAY + + + + 2.464382 + 48.827258 + + + 2.464279 + 48.827369 + + + 2.464154 + 48.827502 + + + 2.463964 + 48.827697 + + + 2.463774 + 48.827874 + + + 2.463497 + 48.828098 + + + 2.463156 + 48.828365 + + + 2.462423 + 48.828918 + + + 2.461745 + 48.829398 + + + 2.461643 + 48.82947 + + + 2.461525 + 48.829554 + + + 2.461074 + 48.829851 + + + 2.459959 + 48.830595 + + + 2.459054 + 48.831212 + + + 2.458708 + 48.831437 + + + 2.457309 + 48.832341 + + + 2.457251 + 48.832376 + + + 2.457197 + 48.832412 + + + 2.45709 + 48.832485 + + + 2.456806 + 48.832674 + + + 2.456394 + 48.832954 + + + 2.455513 + 48.8336 + + + 2.455165 + 48.833868 + + + 2.454982 + 48.834022 + + + 2.454936 + 48.834063 + + + 2.454808 + 48.834177 + + + 2.454483 + 48.834477 + + + 2.454055 + 48.834892 + + + 2.453754 + 48.835184 + + + 2.453446 + 48.835514 + + + 2.453226 + 48.835768 + + + 2.45316 + 48.835842 + + + 2.453122 + 48.835882 + + + 2.452936 + 48.836105 + + + 2.452751 + 48.836344 + + + 2.452581 + 48.836579 + + + 2.4524 + 48.836838 + + + 2.45205 + 48.837366 + + + 2.451953 + 48.837515 + + + 2.45182 + 48.837726 + + + 2.451637 + 48.837993 + + + 2.4513 + 48.838504 + + + 2.451248 + 48.838583 + + + 2.45101 + 48.838945 + + + 2.45079 + 48.839277 + + + 2.450545 + 48.839645 + + + 2.450282 + 48.840037 + + + 2.450045 + 48.840393 + + + 2.449138 + 48.841777 + + + 2.44914 + 48.84194 + + + 2.44915 + 48.842045 + + + LineString + + + + 41.3 + 728.5 + + Tourner lègèrement à gauche sur AV DE NOGENT + + + + 2.44915 + 48.842045 + + + 2.448909 + 48.842246 + + + 2.448834 + 48.842328 + + + 2.448729 + 48.842448 + + + 2.448599 + 48.84259 + + + 2.44849 + 48.84271 + + + 2.44841 + 48.842787 + + + 2.44828 + 48.842906 + + + 2.448139 + 48.843024 + + + 2.447962 + 48.843167 + + + 2.447782 + 48.843303 + + + 2.447613 + 48.843412 + + + 2.447411 + 48.843532 + + + 2.447305 + 48.843592 + + + 2.447193 + 48.843644 + + + 2.447093 + 48.843679 + + + 2.44696 + 48.843721 + + + 2.446806 + 48.843765 + + + 2.446545 + 48.843831 + + + 2.446277 + 48.843885 + + + 2.446019 + 48.843932 + + + 2.445879 + 48.843955 + + + 2.445617 + 48.843988 + + + 2.445287 + 48.844019 + + + 2.442774 + 48.844243 + + + 2.442346 + 48.844284 + + + 2.441015 + 48.8444 + + + 2.440746 + 48.84442 + + + 2.44052 + 48.84444 + + + LineString + + + + 7.5 + 129.3 + + Continuer tout droit sur AV DE NOGENT + + + + 2.44052 + 48.84444 + + + 2.440334 + 48.844453 + + + 2.440172 + 48.844467 + + + 2.439995 + 48.844481 + + + 2.439714 + 48.844503 + + + 2.439489 + 48.844521 + + + 2.438767 + 48.844585 + + + LineString + + + + 131.4 + 1056.1 + + Continuer tout droit sur AV DE PARIS + + + + 2.438767 + 48.844585 + + + 2.438614 + 48.8446 + + + 2.43838 + 48.844622 + + + 2.438173 + 48.844644 + + + 2.437958 + 48.844664 + + + 2.436429 + 48.844804 + + + 2.436247 + 48.84482 + + + 2.435121 + 48.844925 + + + 2.434554 + 48.844981 + + + 2.432141 + 48.845192 + + + 2.431575 + 48.845239 + + + 2.430991 + 48.845291 + + + 2.430652 + 48.845322 + + + 2.42882 + 48.845487 + + + 2.428412 + 48.845524 + + + 2.428222 + 48.84554 + + + 2.427482 + 48.845606 + + + 2.42698 + 48.845649 + + + 2.426305 + 48.845709 + + + 2.426247 + 48.845713 + + + 2.426141 + 48.845723 + + + 2.424473 + 48.845872 + + + LineString + + + + + + + Arrivée sur AV DE PARIS + + + + 2.424473 + 48.845872 + + + 2.424473 + 48.845872 + + + LineString + + + + + + + + + + + + + + + + + + + + + + #00b798 + 0.9 + 12 + + + + + + + + + + + + + + + + + + + + + + + + + #00b798 + 0.9 + 12 + + + + + + + + + + + + + + + #00b798 + 0.9 + 12 + + + + + + + + + + + + + #00b798 + 0.9 + 12 + + + + + + + #00b798 + 0.9 + 12 + + + + Point de départ + + data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAmCAYAAABpuqMCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAQxSURBVFiF3ZldaBxVFMd/d2ayTRtjQpo2mlilWBEMshoj+FAERZIHIdA3iw+V1icRREFIQAKNgsUHQfBFwZI2WgWxqYUiVTDBBj9ILC5Nu2tjdjemsR+mSZNNNvsxO8eHTTRuk+zMnQmCf9iHnXvO+Z//nDvn3rmjRIT/C6zAI4ZVFRbtKDpQNCM0AvXANIo/EC4inMbmLBFZDJJaBVaZJ9Sd2HQCrwDbXHikgfewOMKPMh9ECsGIeVx1IHxEsQJeMY3iEMNy2m8aht8AtKpOhH70hADUI/TTqjr9puKvMsUE3vabxCp0MSJHdJ31xRSnVj9BVPcfOCj26U45PTHFh30c/am1EaaxuF+nKejd1WLX2gwhAPXL8T3De2XCqooKbuCu/eoiTZ6dXtch75WxaMeNENOyOXx8kHOpGMPOIudSMQ4fH8S0bBcs25Z5PMF7ZVpVL3BgQxvTsvn6+kVq6sK3jc3NRGhraKZgl9t9HGNEXvCSmvfKKJrL2nQfHVpTCEBNXZjuo0OB8JTAu5jiXmtjPL3vLl/jbnlKoNPN6spaVFbt8jXulqcEOmKSZS0yi5O+xt3ylEBHTLSsxbf913yNu+UpgU4DKE/Sc3AvczORNcfmZiL0HNwbCE8JvItxWDvJ1SjYFm0NzZzpG2RpIYbIIksLMc70Dbpsy+54SqCzzlQAY8B9Xsk8YAJ4gBHJe3HyXpkRyaN407OfN7zlVQjobjTv4BgQ1/ItjzjV9Oo46okZEBuhS8u3PDoZEDf7t9vg903zBLBfP8C/4cAnD87teclIGyFlLoVyllWh8vmQYRgVAOI4OQmFciKSFZFsMpmck1UC/Il5VNViEgHu9StkQYyb7bNNH1wrmDm3PgqWUHLBhl+SyeRV/6czLepJDAbw8fos4HTNb+/9PFv9u3YMU/X6f38/L98B7/gJ8U2uasiPEADTcRqDOozoBn7WcbzqmFOvpnYM+uTPpvP5SDBiimvP8xRPKV3DFpV7fX7HyYyD44M96xicmpqaSgd3TDQsv6J4zYvLx5nqsz/kK29qcyq5kFpafD+RSMSKf4P+CvCY+hJFRzmzmB2KPTvb+JnX8CsdzDGM8/F4/PrqseC/AggvZlGXtyipXc8kLcbCy6mdrg/6lBIbR41DYXR8cjIqIoW17IIXc17+nHnEOnS3VfhiHQt5d7HmVMK2Nn6+DHLiOGMmRLdMVI+NymjZ9Sf4abaMqZbQp01G/rnS60P5rT8duNXw1TpuGaXksmMYlxKJxLiIt23NponhKVV5a874rdZwmlYuTTvmjWdmGj9Mifl3kkpJ2hGJGY4THb9yJS4i2p0t+Gm2ggHJxMNb94eNzIAJZgEKbyxsP5kS00ZJSkG0oFQ0mZyYkKDuqIhs6u/7hyt75luM2RMPVfft3rW7bU9T0z2bxbV50+w/wF8f81R5OpwBhwAAAABJRU5ErkJggg== + + + + + + + + + + + + + + + + + + + + + #00b798 + 0.9 + 12 + + + + + + + + + + + + + + + + + + + #00b798 + 0.9 + 12 + + + + + + + + + + + + + + + + + + + + + + + + + #00b798 + 0.9 + 12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #00b798 + 0.9 + 12 + + + + + + + + + + + + #00b798 + 0.9 + 12 + + + + + + + + + + + + + + + + + + + + + + + + + + + #00b798 + 0.9 + 12 + + + + Point d'arrivée + + data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAmCAYAAABpuqMCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAQxSURBVFiF3ZldaBxVFMd/d2ayTRtjQpo2mlilWBEMshoj+FAERZIHIdA3iw+V1icRREFIQAKNgsUHQfBFwZI2WgWxqYUiVTDBBj9ILC5Nu2tjdjemsR+mSZNNNvsxO8eHTTRuk+zMnQmCf9iHnXvO+Z//nDvn3rmjRIT/C6zAI4ZVFRbtKDpQNCM0AvXANIo/EC4inMbmLBFZDJJaBVaZJ9Sd2HQCrwDbXHikgfewOMKPMh9ECsGIeVx1IHxEsQJeMY3iEMNy2m8aht8AtKpOhH70hADUI/TTqjr9puKvMsUE3vabxCp0MSJHdJ31xRSnVj9BVPcfOCj26U45PTHFh30c/am1EaaxuF+nKejd1WLX2gwhAPXL8T3De2XCqooKbuCu/eoiTZ6dXtch75WxaMeNENOyOXx8kHOpGMPOIudSMQ4fH8S0bBcs25Z5PMF7ZVpVL3BgQxvTsvn6+kVq6sK3jc3NRGhraKZgl9t9HGNEXvCSmvfKKJrL2nQfHVpTCEBNXZjuo0OB8JTAu5jiXmtjPL3vLl/jbnlKoNPN6spaVFbt8jXulqcEOmKSZS0yi5O+xt3ylEBHTLSsxbf913yNu+UpgU4DKE/Sc3AvczORNcfmZiL0HNwbCE8JvItxWDvJ1SjYFm0NzZzpG2RpIYbIIksLMc70Dbpsy+54SqCzzlQAY8B9Xsk8YAJ4gBHJe3HyXpkRyaN407OfN7zlVQjobjTv4BgQ1/ItjzjV9Oo46okZEBuhS8u3PDoZEDf7t9vg903zBLBfP8C/4cAnD87teclIGyFlLoVyllWh8vmQYRgVAOI4OQmFciKSFZFsMpmck1UC/Il5VNViEgHu9StkQYyb7bNNH1wrmDm3PgqWUHLBhl+SyeRV/6czLepJDAbw8fos4HTNb+/9PFv9u3YMU/X6f38/L98B7/gJ8U2uasiPEADTcRqDOozoBn7WcbzqmFOvpnYM+uTPpvP5SDBiimvP8xRPKV3DFpV7fX7HyYyD44M96xicmpqaSgd3TDQsv6J4zYvLx5nqsz/kK29qcyq5kFpafD+RSMSKf4P+CvCY+hJFRzmzmB2KPTvb+JnX8CsdzDGM8/F4/PrqseC/AggvZlGXtyipXc8kLcbCy6mdrg/6lBIbR41DYXR8cjIqIoW17IIXc17+nHnEOnS3VfhiHQt5d7HmVMK2Nn6+DHLiOGMmRLdMVI+NymjZ9Sf4abaMqZbQp01G/rnS60P5rT8duNXw1TpuGaXksmMYlxKJxLiIt23NponhKVV5a874rdZwmlYuTTvmjWdmGj9Mifl3kkpJ2hGJGY4THb9yJS4i2p0t+Gm2ggHJxMNb94eNzIAJZgEKbyxsP5kS00ZJSkG0oFQ0mZyYkKDuqIhs6u/7hyt75luM2RMPVfft3rW7bU9T0z2bxbV50+w/wF8f81R5OpwBhwAAAABJRU5ErkJggg== + + + + + + + #00b798 + 0.9 + 12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #00b798 + 0.9 + 12 + + + + + + + + + + + + + #00b798 + 0.9 + 12 + + + + + + + + + + #00b798 + 0.9 + 12 + + + + + + + + + + + + + + + + #00b798 + 0.9 + 12 + + + + + + + + + + + + + #00b798 + 0.9 + 12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #00b798 + 0.9 + 12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #00b798 + 0.9 + 12 + + + + + + + + + + + + + + + #00b798 + 0.9 + 12 + + + diff --git a/samples-src/resources/data/kml/export-iso.kml b/samples-src/resources/data/kml/export-iso.kml new file mode 100644 index 000000000..5d6a54e55 --- /dev/null +++ b/samples-src/resources/data/kml/export-iso.kml @@ -0,0 +1,42 @@ + + + {"type":"isocurve","transport":"Pieton","computation":"time","exclusions":[],"direction":"departure","point":[2.5889593786271514,48.84181708047407],"results":{"message":"","id":"","location":{"x":"2.5889593786271514","y":"48.84181708047407"},"srs":"EPSG:4326","geometry":{"type":"Polygon","coordinates":[[[2.582286512,48.842203898],[2.58217211,48.842089496],[2.582156771,48.842078674],[2.582155165,48.842077912],[2.582108917,48.842149643],[2.581813568,48.842607724],[2.583030614,48.843592258],[2.583958347,48.844153126],[2.585424701,48.844122752],[2.585459358,48.844157409],[2.585465251,48.844163302],[2.585471173,48.844169224],[2.585472923,48.844170974],[2.585352137,48.84466949],[2.585275542,48.844746085],[2.585237372,48.844784255],[2.585181998,48.844839629],[2.585172943,48.84485156],[2.585166611,48.844862801],[2.5851611,48.844876728],[2.585160346,48.844879803],[2.585795597,48.845263849],[2.586397816,48.845005215],[2.586369812,48.844900705],[2.586367493,48.844893873],[2.586365098,48.84488809],[2.586361907,48.84488162],[2.586358841,48.844876309],[2.586354833,48.844870311],[2.586351023,48.844865345],[2.586346266,48.844859921],[2.586236396,48.844750051],[2.586229503,48.844743158],[2.586221096,48.844734751],[2.586199204,48.844712859],[2.58626411,48.844339898],[2.588303633,48.844186729],[2.589570493,48.843642654],[2.589505805,48.843401232],[2.589503486,48.8433944],[2.58950109,48.843388618],[2.589497899,48.843382147],[2.589494545,48.843376338],[2.589490537,48.843370339],[2.589486727,48.843365374],[2.58948197,48.843359949],[2.589455927,48.843333906],[2.590938475,48.84304735],[2.590939433,48.843047156],[2.590940264,48.84304698],[2.590941218,48.843046769],[2.590942113,48.843046563],[2.590943063,48.843046335],[2.590943888,48.84304613],[2.590944834,48.843045885],[2.590985287,48.843035046],[2.59118702,48.842948408],[2.591218544,48.842933743],[2.591250715,48.842921053],[2.591306695,48.842897012],[2.59131796,48.842889622],[2.591462539,48.842745043],[2.591467296,48.842739619],[2.59147098,48.842734818],[2.591474988,48.842728819],[2.591478096,48.842723436],[2.591481287,48.842716965],[2.591483603,48.842711374],[2.591485922,48.842704542],[2.591559816,48.842428768],[2.591561223,48.842421692],[2.591562013,48.842415691],[2.591562485,48.842408492],[2.591562485,48.842402277],[2.591562013,48.842395077],[2.591561223,48.842389077],[2.591559816,48.842382001],[2.591514524,48.842212969],[2.592280588,48.842058117],[2.592281356,48.842058885],[2.592315163,48.842092693],[2.592407026,48.842184556],[2.592448194,48.842225724],[2.592453618,48.842230481],[2.59245842,48.842234165],[2.592464419,48.842238173],[2.592469801,48.842241281],[2.592476272,48.842244472],[2.592481864,48.842246788],[2.592488695,48.842249107],[2.592545179,48.842264242],[2.592689829,48.842303001],[2.593534132,48.8419404],[2.594028762,48.841727973],[2.594546314,48.841369216],[2.594544238,48.841365953],[2.594536704,48.84135656],[2.594505727,48.841325583],[2.594499596,48.841239448],[2.594502028,48.841238908],[2.594504735,48.841238214],[2.5945082,48.841237203],[2.594511082,48.841236259],[2.594514473,48.841235024],[2.594531891,48.841228027],[2.594550588,48.841226375],[2.594554171,48.84122594],[2.594557168,48.841225476],[2.594560715,48.841224808],[2.594563443,48.841224201],[2.594566938,48.841223302],[2.594569849,48.841222451],[2.594573278,48.841221325],[2.594836987,48.841125089],[2.594840335,48.841123742],[2.594842364,48.841122847],[2.594844471,48.841122157],[2.594847863,48.841120923],[2.594982508,48.841066857],[2.595353442,48.840809733],[2.5953617,48.840623596],[2.595303337,48.840419247],[2.595058571,48.840155989],[2.595044029,48.840165914],[2.595041116,48.840168045],[2.595038729,48.840169915],[2.595035961,48.840172232],[2.595033879,48.840174094],[2.595031269,48.840176587],[2.595029146,48.840178753],[2.595026704,48.840181411],[2.594919771,48.840305788],[2.594702064,48.840393208],[2.594673706,48.840366589],[2.594670995,48.840364206],[2.594668653,48.84036228],[2.594665792,48.84036008],[2.594663523,48.840358449],[2.594660524,48.840356441],[2.59465795,48.840354837],[2.594654827,48.840353029],[2.594559911,48.840302161],[2.59455991,48.840302161],[2.594380826,48.840206185],[2.594271472,48.84010462],[2.594208379,48.839950807],[2.594195594,48.839919639],[2.594164612,48.839844107],[2.594163133,48.839840815],[2.594161801,48.839838091],[2.594160111,48.839834902],[2.594158722,48.839832477],[2.594156827,48.839829405],[2.594155151,48.839826878],[2.594153058,48.839823937],[2.594136383,48.83980205],[2.594076545,48.839723509],[2.594066205,48.839713144],[2.594056519,48.839705727],[2.594043816,48.839698448],[2.594035693,48.839695135],[2.594021072,48.839040107],[2.593716526,48.838712552],[2.593639421,48.838702418],[2.593626411,48.838702256],[2.592483756,48.838823572],[2.592483311,48.838816781],[2.592482477,48.838810449],[2.59248107,48.838803373],[2.592473925,48.838776709],[2.592841343,48.838335888],[2.593001933,48.838305653],[2.5930597,48.838294777],[2.593063223,48.838293994],[2.593066322,48.838293197],[2.593069786,48.838292185],[2.593072995,48.838291133],[2.593076386,48.838289896],[2.593079356,48.838288701],[2.593082659,48.838287246],[2.593124024,48.838267371],[2.593140329,48.838255429],[2.593211436,48.838179768],[2.593215946,48.838174154],[2.593177514,48.838132818],[2.59299155,48.837932804],[2.592320233,48.837856749],[2.590665072,48.837669234],[2.59051165,48.837660915],[2.590512625,48.837654648],[2.59051275,48.837651977],[2.590416502,48.837641073],[2.589881203,48.837580428],[2.589331891,48.837588776],[2.588867451,48.837595834],[2.587492518,48.837649798],[2.587121873,48.837677995],[2.587113867,48.83766466],[2.587002615,48.837669026],[2.585392228,48.837732232],[2.584669319,48.838178499],[2.584361523,48.838655885],[2.584330947,48.838703309],[2.584370513,48.838742875],[2.58437524,48.838747088],[2.584448605,48.838805275],[2.584459766,48.838810891],[2.584473167,48.838824292],[2.584477894,48.838828505],[2.584730806,48.839029094],[2.584750805,48.839039156],[2.584964736,48.839096479],[2.584971812,48.839097887],[2.584978145,48.83909872],[2.584979392,48.839098802],[2.585110219,48.839133857],[2.585117295,48.839135264],[2.585123627,48.839136098],[2.585130826,48.83913657],[2.585137426,48.83913657],[2.585144625,48.839136098],[2.585150957,48.839135264],[2.585158033,48.839133857],[2.585214135,48.839118825],[2.585268096,48.839133283],[2.585292737,48.839139886],[2.585299812,48.839141293],[2.585306145,48.839142127],[2.585313344,48.839142599],[2.585319944,48.839142599],[2.585327143,48.839142127],[2.585333475,48.839141293],[2.585340551,48.839139886],[2.585366958,48.83913281],[2.58543812,48.839113742],[2.585439534,48.839113364],[2.585880172,48.839909318],[2.585676424,48.840098591],[2.585640497,48.83996451],[2.585634987,48.839951208],[2.585629402,48.839941535],[2.585620637,48.839930112],[2.585418756,48.839728231],[2.585407333,48.839719466],[2.58539766,48.839713882],[2.585384358,48.839708372],[2.585345127,48.83969786],[2.585339846,48.839688713],[2.585331081,48.839677291],[2.585160221,48.839506431],[2.585139004,48.839493222],[2.585092726,48.839477458],[2.585089217,48.839476392],[2.584813443,48.839402499],[2.584811982,48.839402128],[2.584651516,48.839363799],[2.584624427,48.839364169],[2.584348652,48.839438062],[2.584329818,48.839447227],[2.584207467,48.839539062],[2.584201576,48.839544173],[2.584198216,48.839547533],[2.584192431,48.839550348],[2.584146148,48.839585088],[2.584140257,48.839590199],[2.583938376,48.83979208],[2.583934431,48.839796472],[2.583900965,48.839838],[2.583890635,48.839858333],[2.583829365,48.840086995],[2.583827994,48.840097408],[2.583740013,48.840185389],[2.583731248,48.840196812],[2.583725663,48.840206485],[2.583720153,48.840219787],[2.58364626,48.840495561],[2.583644381,48.840509837],[2.583644381,48.840521006],[2.58364626,48.840535281],[2.583720153,48.840811055],[2.583725663,48.840824358],[2.583731248,48.840834031],[2.583740013,48.840845454],[2.583805232,48.840910672],[2.583818102,48.840958703],[2.583815835,48.840964668],[2.583815163,48.840977917],[2.583816971,48.840994986],[2.583817364,48.84099645],[2.583747092,48.841240529],[2.583707075,48.841251252],[2.583700243,48.841253571],[2.583695039,48.841255726],[2.583688569,48.841258917],[2.58368387,48.84126163],[2.583677871,48.841265639],[2.583673402,48.841269068],[2.583667978,48.841273825],[2.583622909,48.841318893],[2.583612604,48.841329198],[2.583466097,48.841475706],[2.58346134,48.84148113],[2.583457911,48.841485598],[2.583453903,48.841491597],[2.58345119,48.841496296],[2.583447999,48.841502767],[2.583445843,48.841507971],[2.583443524,48.841514803],[2.58336963,48.841790577],[2.583369367,48.841791901],[2.583291946,48.84198416],[2.583191493,48.842052198],[2.583144327,48.842064837],[2.583144326,48.842064837],[2.582954866,48.842115602],[2.582948035,48.842117921],[2.58294283,48.842120077],[2.58293636,48.842123268],[2.582931661,48.842125981],[2.582925662,48.842129989],[2.582921193,48.842133418],[2.582915769,48.842138175],[2.582713888,48.842340056],[2.582709131,48.84234548],[2.582705702,48.842349949],[2.582701694,48.842355948],[2.582698981,48.842360647],[2.58269579,48.842367118],[2.582693634,48.842372322],[2.582693382,48.842373065],[2.582623296,48.842302979],[2.582617872,48.842298222],[2.582613403,48.842294793],[2.582607404,48.842290785],[2.582602705,48.842288072],[2.582596235,48.842284881],[2.582591031,48.842282725],[2.582584199,48.842280406],[2.582308424,48.842206512],[2.582301348,48.842205105],[2.582295764,48.84220437],[2.582288565,48.842203898],[2.582286512,48.842203898]]]},"time":600,"distance":""}} + + + + + + + + 2.5822865119999996,48.84220389800001 2.58217211,48.842089496 2.5821567709999997,48.84207867400002 2.582155165,48.84207791199998 2.582108917,48.84214964299997 2.581813568,48.84260772400003 2.583030614,48.843592258 2.583958347,48.84415312600001 2.585424701,48.844122751999976 2.585459358,48.84415740899999 2.585465251,48.844163302 2.5854711729999997,48.844169223999984 2.585472923,48.84417097400001 2.5853521369999997,48.84466949 2.585275542,48.844746085 2.585237372,48.84478425500001 2.585181998,48.844839629000006 2.585172943,48.844851559999995 2.5851666110000004,48.844862801000005 2.5851611000000005,48.844876728 2.5851603459999994,48.84487980299997 2.585795597,48.84526384899999 2.586397816,48.845005215000015 2.586369812,48.844900704999986 2.586367493,48.84489387299999 2.586365098,48.84488808999998 2.586361907,48.844881619999995 2.586358841,48.844876309 2.586354833,48.844870310999994 2.586351023,48.84486534499999 2.586346266,48.844859920999994 2.5862363959999994,48.844750051000005 2.586229503,48.844743158 2.586221096,48.844734751000004 2.586199204,48.84471285899997 2.58626411,48.84433989799999 2.588303633,48.844186729 2.589570493,48.84364265400001 2.5895058049999995,48.84340123199999 2.589503486,48.843394399999994 2.58950109,48.84338861799998 2.589497899,48.843382147 2.589494545,48.843376337999985 2.589490537,48.84337033899999 2.5894867269999997,48.84336537400003 2.58948197,48.84335994899996 2.5894559270000004,48.843333906 2.5909384749999997,48.843047350000006 2.5909394330000004,48.84304715600001 2.5909402640000003,48.84304698 2.5909412180000007,48.84304676900001 2.590942113,48.843046563 2.5909430630000005,48.843046335 2.590943888,48.843046130000005 2.590944834,48.84304588500004 2.5909852869999996,48.84303504600001 2.59118702,48.84294840800001 2.591218544,48.842933743 2.5912507149999997,48.842921053 2.5913066949999997,48.84289701199998 2.59131796,48.842889622 2.5914625390000006,48.84274504300001 2.591467296,48.842739618999985 2.59147098,48.842734818 2.5914749879999994,48.84272881899997 2.591478096,48.842723436 2.5914812870000006,48.842716964999994 2.591483603,48.842711373999975 2.591485922,48.84270454199998 2.591559816,48.84242876799999 2.591561223,48.842421692000016 2.591562013,48.842415690999985 2.5915624849999994,48.842408492000004 2.5915624849999994,48.84240227700002 2.591562013,48.84239507699999 2.591561223,48.84238907700001 2.591559816,48.842382001000004 2.591514524,48.842212968999974 2.592280588,48.84205811699999 2.5922813560000004,48.842058885 2.592315163,48.842092692999984 2.592407026,48.842184556000035 2.592448194,48.842225724 2.592453618,48.842230481 2.59245842,48.84223416500001 2.592464419,48.842238173 2.592469801,48.842241281000014 2.592476272,48.842244472000004 2.592481864,48.84224678800001 2.592488695,48.84224910699999 2.5925451789999996,48.842264242 2.592689829,48.842303001000005 2.5935341319999994,48.8419404 2.594028762,48.84172797299999 2.594546314,48.84136921600003 2.594544238,48.84136595300001 2.5945367040000002,48.84135656000001 2.5945057269999996,48.841325583000014 2.594499596,48.84123944800001 2.594502028,48.84123890800001 2.594504735,48.841238213999986 2.5945082,48.84123720299999 2.594511082,48.841236259 2.594514473,48.841235023999985 2.594531891,48.841228027 2.594550588,48.84122637499999 2.5945541710000004,48.841225940000015 2.594557168,48.841225476000034 2.594560715,48.84122480799999 2.5945634429999997,48.84122420099999 2.594566938,48.84122330200003 2.594569849,48.84122245099999 2.5945732779999995,48.841221324999964 2.594836987,48.841125089 2.594840335,48.84112374200001 2.594842364,48.84112284700001 2.594844471,48.841122157 2.5948478629999996,48.84112092299998 2.594982508,48.84106685699999 2.595353442,48.840809732999986 2.5953617,48.840623596 2.5953033369999994,48.84041924699997 2.595058571,48.84015598900001 2.595044029,48.84016591400001 2.595041116,48.840168044999984 2.595038729,48.84016991499999 2.595035961,48.840172232000015 2.595033879,48.84017409399999 2.595031269,48.84017658700003 2.595029146,48.84017875300003 2.595026704,48.840181411 2.594919771,48.840305787999995 2.5947020639999994,48.840393207999995 2.5946737059999996,48.840366588999984 2.5946709949999995,48.840364206000004 2.5946686530000003,48.840362279999994 2.594665792,48.84036008000001 2.594663523,48.84035844900001 2.594660524,48.84035644099998 2.59465795,48.84035483700001 2.594654827,48.840353029 2.594559911,48.84030216100004 2.5945599100000005,48.84030216100004 2.594380826,48.840206185 2.5942714720000004,48.840104620000005 2.594208379,48.83995080700001 2.594195594,48.83991963899999 2.5941646120000006,48.839844107000005 2.594163133,48.839840815 2.594161801,48.83983809099996 2.594160111,48.83983490200001 2.594158722,48.839832477000016 2.594156827,48.83982940499999 2.594155151,48.839826878 2.5941530579999994,48.83982393699998 2.5941363830000004,48.83980205 2.594076545,48.83972350900001 2.594066205,48.839713144 2.5940565189999996,48.839705726999966 2.5940438160000006,48.83969844799998 2.5940356930000004,48.839695135 2.594021072,48.83904010700002 2.5937165260000006,48.838712552000004 2.593639421,48.838702418 2.593626411,48.838702256000005 2.592483756,48.838823572000024 2.592483311,48.83881678099999 2.592482477,48.83881044899999 2.59248107,48.83880337299999 2.592473925,48.838776709 2.592841343,48.83833588800002 2.593001933,48.83830565299999 2.5930597,48.83829477699996 2.593063223,48.838293994 2.593066322,48.83829319700001 2.593069786,48.838292185 2.593072995,48.838291132999984 2.5930763860000003,48.83828989599999 2.593079356,48.83828870100001 2.593082659,48.83828724599999 2.593124024,48.838267371 2.593140329,48.838255428999986 2.5932114359999994,48.838179768 2.593215946,48.838174154 2.593177514,48.83813281799999 2.5929915500000003,48.83793280400002 2.592320233,48.837856749000025 2.590665072,48.837669234 2.59051165,48.837660915000015 2.5905126249999997,48.83765464799998 2.59051275,48.83765197700001 2.590416502,48.837641072999986 2.589881203,48.837580427999995 2.589331891,48.83758877599999 2.588867451,48.83759583400001 2.5874925180000004,48.83764979799997 2.587121873,48.83767799500001 2.587113867,48.83766466 2.587002615,48.837669026000015 2.5853922280000003,48.83773223199998 2.5846693189999996,48.83817849900001 2.5843615230000005,48.83865588500004 2.584330947,48.83870330900001 2.5843705129999996,48.83874287500001 2.5843752400000004,48.83874708799999 2.5844486049999995,48.838805275 2.584459766,48.83881089100004 2.584473167,48.838824292 2.584477894,48.83882850500001 2.584730806,48.83902909400001 2.584750805,48.839039155999984 2.584964736,48.839096479000034 2.584971812,48.83909788700001 2.5849781450000004,48.83909872000001 2.5849793919999997,48.83909880199997 2.585110219,48.83913385699998 2.585117295,48.83913526399999 2.5851236270000006,48.83913609799998 2.585130826,48.839136569999994 2.585137426,48.839136569999994 2.585144625,48.83913609799998 2.585150957,48.83913526399999 2.585158033,48.83913385699998 2.585214135,48.839118825000014 2.585268096,48.839133282999995 2.585292737,48.83913988599997 2.585299812,48.83914129300001 2.5853061449999997,48.839142127 2.585313344,48.83914259900001 2.585319944,48.83914259900001 2.585327143,48.839142127 2.5853334750000005,48.83914129300001 2.585340551,48.83913988599997 2.585366958,48.839132809999995 2.58543812,48.839113741999995 2.5854395339999994,48.83911336400001 2.585880172,48.83990931799997 2.5856764239999994,48.840098591000014 2.585640497,48.839964510000016 2.5856349870000006,48.839951208 2.585629402,48.83994153500001 2.5856206369999994,48.83993011199999 2.585418756,48.83972823100001 2.585407333,48.83971946599999 2.58539766,48.839713881999984 2.585384358,48.83970837199999 2.5853451270000005,48.83969786000003 2.585339846,48.83968871299999 2.5853310810000005,48.839677291000015 2.585160221,48.83950643099999 2.585139004,48.83949322199999 2.585092726,48.839477458000005 2.585089217,48.839476391999966 2.5848134430000003,48.839402499000016 2.584811982,48.83940212800002 2.584651516,48.83936379900001 2.584624427,48.83936416899999 2.5843486519999996,48.839438062 2.584329818,48.839447226999994 2.584207467,48.839539062 2.584201576,48.83954417300001 2.5841982159999994,48.839547533 2.584192431,48.83955034799996 2.584146148,48.839585088000035 2.584140257,48.839590198999986 2.5839383760000003,48.839792079999995 2.5839344309999994,48.83979647199999 2.583900965,48.839837999999986 2.583890635,48.839858332999995 2.5838293649999997,48.84008699500001 2.583827994,48.84009740799999 2.583740013,48.840185389 2.583731248,48.84019681199999 2.583725663,48.84020648500001 2.5837201529999994,48.840219786999995 2.58364626,48.84049556100001 2.583644381,48.84050983700004 2.583644381,48.84052100600002 2.58364626,48.840535281 2.5837201529999994,48.84081105500002 2.583725663,48.84082435799999 2.583731248,48.840834030999986 2.583740013,48.840845454000004 2.5838052320000005,48.84091067200001 2.5838181020000004,48.84095870300001 2.583815835,48.840964668 2.583815163,48.840977917000004 2.5838169709999996,48.840994986 2.583817364,48.840996450000006 2.583747092,48.841240529000004 2.583707075,48.841251252000006 2.583700243,48.84125357100001 2.583695039,48.841255725999986 2.583688569,48.841258916999976 2.5836838700000007,48.84126162999999 2.583677871,48.84126563899997 2.583673402,48.841269068 2.5836679779999994,48.84127382499997 2.583622909,48.84131889299999 2.583612604,48.84132919799998 2.583466097,48.84147570599998 2.58346134,48.841481130000005 2.583457911,48.84148559799999 2.5834539030000006,48.841491597000015 2.58345119,48.841496296 2.583447999,48.84150276699998 2.583445843,48.841507971 2.583443524,48.841514802999995 2.58336963,48.84179057699998 2.583369367,48.84179190099999 2.583291946,48.84198416000001 2.583191493,48.842052198000005 2.583144327,48.84206483699998 2.583144326,48.84206483699998 2.582954866,48.84211560200001 2.582948035,48.84211792100001 2.58294283,48.842120077000004 2.58293636,48.842123267999966 2.582931661,48.84212598100001 2.582925662,48.842129989 2.582921193,48.842133418 2.582915769,48.842138174999974 2.5827138880000002,48.84234005600001 2.5827091310000005,48.842345480000006 2.582705702,48.84234994900001 2.582701694,48.842355948000005 2.582698981,48.84236064700002 2.5826957899999994,48.842367118 2.582693634,48.84237232200002 2.582693382,48.842373065000004 2.582623296,48.84230297900001 2.582617872,48.84229822200001 2.582613403,48.84229479300001 2.5826074040000004,48.84229078499999 2.582602705,48.842288072 2.5825962350000005,48.84228488100004 2.582591031,48.84228272499999 2.582584199,48.842280405999986 2.582308424,48.84220651199999 2.582301348,48.842205105000005 2.582295764,48.84220436999999 2.582288565,48.84220389800001 2.5822865119999996,48.84220389800001 + + + + + + Point d'origine + + + 2.5889593786271514,48.84181708047407 + + + + diff --git a/samples-src/resources/data/kml/export-profil.kml b/samples-src/resources/data/kml/export-profil.kml new file mode 100644 index 000000000..04431e3b0 --- /dev/null +++ b/samples-src/resources/data/kml/export-profil.kml @@ -0,0 +1,10 @@ + + + {"type":"elevationpath","greaterSlope":9,"meanSlope":1,"distancePlus":12972.710456585306,"distanceMinus":13921.945849175365,"ascendingElevation":229.26999999999998,"descendingElevation":-188.7300000000002,"altMin":"28,05","altMax":"120,39","distance":27000.126799561986,"unit":"m","points":[{"z":44.28,"lon":2.4377,"lat":48.9635,"acc":2.5,"dist":0,"slope":0},{"z":43.08,"lon":2.4373,"lat":48.9625,"acc":2.5,"dist":105.46675388206238,"slope":1,"color":"#00B798"},{"z":42.55,"lon":2.437,"lat":48.9616,"acc":2.5,"dist":210.93436039636455,"slope":1,"color":"#00B798"},{"z":41.9,"lon":2.4367,"lat":48.9607,"acc":2.5,"dist":316.4008186912944,"slope":1,"color":"#00B798"},{"z":40.94,"lon":2.4364,"lat":48.9598,"acc":2.5,"dist":421.86829490866813,"slope":1,"color":"#00B798"},{"z":40.21,"lon":2.436,"lat":48.9589,"acc":2.5,"dist":527.3357059661245,"slope":1,"color":"#00B798"},{"z":39.34,"lon":2.4357,"lat":48.9579,"acc":2.5,"dist":632.8030518566836,"slope":1,"color":"#00B798"},{"z":38.35,"lon":2.4354,"lat":48.957,"acc":2.5,"dist":738.2701672742973,"slope":1,"color":"#00B798"},{"z":38.34,"lon":2.435,"lat":48.9561,"acc":2.5,"dist":843.7372175115535,"slope":0,"color":"#00B798"},{"z":39.67,"lon":2.4347,"lat":48.9552,"acc":2.5,"dist":949.2042025613233,"slope":1,"color":"#00B798"},{"z":40.47,"lon":2.4344,"lat":48.9542,"acc":2.5,"dist":1054.6711224165842,"slope":1,"color":"#00B798"},{"z":41.74,"lon":2.4341,"lat":48.9533,"acc":2.5,"dist":1160.1388948543286,"slope":1,"color":"#00B798"},{"z":42.25,"lon":2.4337,"lat":48.9524,"acc":2.5,"dist":1265.6056842996743,"slope":0,"color":"#00B798"},{"z":42.35,"lon":2.4334,"lat":48.9515,"acc":2.5,"dist":1371.0733263155212,"slope":0,"color":"#00B798"},{"z":42.84,"lon":2.4331,"lat":48.9505,"acc":2.5,"dist":1476.540903110063,"slope":0,"color":"#00B798"},{"z":43.49,"lon":2.4328,"lat":48.9496,"acc":2.5,"dist":1582.0084146776103,"slope":1,"color":"#00B798"},{"z":44.35,"lon":2.4324,"lat":48.9487,"acc":2.5,"dist":1687.4756957101445,"slope":1,"color":"#00B798"},{"z":44.69,"lon":2.4321,"lat":48.9478,"acc":2.5,"dist":1792.9429115015798,"slope":0,"color":"#00B798"},{"z":45.13,"lon":2.4318,"lat":48.9468,"acc":2.5,"dist":1898.4100620427237,"slope":0,"color":"#00B798"},{"z":45.45,"lon":2.4315,"lat":48.9459,"acc":2.5,"dist":2003.8771473285674,"slope":0,"color":"#00B798"},{"z":46.27,"lon":2.4311,"lat":48.945,"acc":2.5,"dist":2109.345250443412,"slope":1,"color":"#00B798"},{"z":46.25,"lon":2.4308,"lat":48.9441,"acc":2.5,"dist":2214.812039897771,"slope":0,"color":"#00B798"},{"z":47.37,"lon":2.4305,"lat":48.9431,"acc":2.5,"dist":2320.280012469304,"slope":1,"color":"#00B798"},{"z":46.61,"lon":2.4301,"lat":48.9422,"acc":2.5,"dist":2425.746671363389,"slope":1,"color":"#00B798"},{"z":47.97,"lon":2.4298,"lat":48.9413,"acc":2.5,"dist":2531.2143480625396,"slope":1,"color":"#00B798"},{"z":46.73,"lon":2.4295,"lat":48.9404,"acc":2.5,"dist":2636.6817941660197,"slope":1,"color":"#00B798"},{"z":45.14,"lon":2.4292,"lat":48.9394,"acc":2.5,"dist":2742.1493402657948,"slope":2,"color":"#00B798"},{"z":41.48,"lon":2.4288,"lat":48.9385,"acc":2.5,"dist":2847.6166557564807,"slope":3,"color":"#00B798"},{"z":40.05,"lon":2.4285,"lat":48.9376,"acc":2.5,"dist":2953.0849890305135,"slope":1,"color":"#00B798"},{"z":39.94,"lon":2.4282,"lat":48.9367,"acc":2.5,"dist":3058.5521738791927,"slope":0,"color":"#00B798"},{"z":41.23,"lon":2.4279,"lat":48.9358,"acc":2.5,"dist":3164.0202112012034,"slope":1,"color":"#00B798"},{"z":43.64,"lon":2.4272,"lat":48.9339,"acc":2.5,"dist":3374.9551720221502,"slope":1,"color":"#00B798"},{"z":43.99,"lon":2.4269,"lat":48.933,"acc":2.5,"dist":3480.4230133121837,"slope":0,"color":"#00B798"},{"z":45.82,"lon":2.4265,"lat":48.9321,"acc":2.5,"dist":3585.890789244711,"slope":2,"color":"#00B798"},{"z":44.57,"lon":2.4262,"lat":48.9311,"acc":2.5,"dist":3691.358334513271,"slope":1,"color":"#00B798"},{"z":43.95,"lon":2.4259,"lat":48.9302,"acc":2.5,"dist":3796.8259797102996,"slope":1,"color":"#00B798"},{"z":44.27,"lon":2.4256,"lat":48.9293,"acc":2.5,"dist":3902.293394228561,"slope":0,"color":"#00B798"},{"z":44.25,"lon":2.4252,"lat":48.9284,"acc":2.5,"dist":4007.760743361118,"slope":0,"color":"#00B798"},{"z":44.59,"lon":2.4249,"lat":48.9274,"acc":2.5,"dist":4113.2291102134905,"slope":0,"color":"#00B798"},{"z":47.23,"lon":2.4246,"lat":48.9265,"acc":2.5,"dist":4218.696163254438,"slope":3,"color":"#00B798"},{"z":52.17,"lon":2.4243,"lat":48.9256,"acc":2.5,"dist":4324.16439930407,"slope":5,"color":"#00B798"},{"z":42.91,"lon":2.4239,"lat":48.9247,"acc":2.5,"dist":4429.6324046425325,"slope":9,"color":"#00B798"},{"z":42.5,"lon":2.4236,"lat":48.9237,"acc":2.5,"dist":4535.100344561509,"slope":0,"color":"#00B798"},{"z":41.68,"lon":2.4233,"lat":48.9228,"acc":2.5,"dist":4640.566970635184,"slope":1,"color":"#00B798"},{"z":41.83,"lon":2.423,"lat":48.9219,"acc":2.5,"dist":4746.035862815487,"slope":0,"color":"#00B798"},{"z":42.38,"lon":2.4226,"lat":48.921,"acc":2.5,"dist":4851.5034411363995,"slope":1,"color":"#00B798"},{"z":42.27,"lon":2.422,"lat":48.9191,"acc":2.5,"dist":5062.438401428139,"slope":0,"color":"#00B798"},{"z":42.83,"lon":2.4216,"lat":48.9182,"acc":2.5,"dist":5167.906866511046,"slope":1,"color":"#00B798"},{"z":43.04,"lon":2.4213,"lat":48.9173,"acc":2.5,"dist":5273.375266128004,"slope":0,"color":"#00B798"},{"z":43.09,"lon":2.421,"lat":48.9164,"acc":2.5,"dist":5378.842351845624,"slope":0,"color":"#00B798"},{"z":42.34,"lon":2.4207,"lat":48.9154,"acc":2.5,"dist":5484.310455208387,"slope":1,"color":"#00B798"},{"z":43.92,"lon":2.4203,"lat":48.9145,"acc":2.5,"dist":5589.778493083376,"slope":1,"color":"#00B798"},{"z":42.88,"lon":2.42,"lat":48.9136,"acc":2.5,"dist":5695.246465465623,"slope":1,"color":"#00B798"},{"z":42.71,"lon":2.4194,"lat":48.9117,"acc":2.5,"dist":5906.182966249763,"slope":0,"color":"#00B798"},{"z":42.26,"lon":2.419,"lat":48.9108,"acc":2.5,"dist":6011.650576809096,"slope":0,"color":"#00B798"},{"z":42.92,"lon":2.4187,"lat":48.9099,"acc":2.5,"dist":6117.118121844756,"slope":1,"color":"#00B798"},{"z":43.58,"lon":2.4184,"lat":48.909,"acc":2.5,"dist":6222.586684486011,"slope":1,"color":"#00B798"},{"z":44.32,"lon":2.4181,"lat":48.908,"acc":2.5,"dist":6328.055016293748,"slope":1,"color":"#00B798"},{"z":45.6,"lon":2.4177,"lat":48.9071,"acc":2.5,"dist":6433.52344786092,"slope":1,"color":"#00B798"},{"z":47.53,"lon":2.4174,"lat":48.9062,"acc":2.5,"dist":6538.990565440266,"slope":2,"color":"#00B798"},{"z":46.61,"lon":2.4168,"lat":48.9043,"acc":2.5,"dist":6749.927688041851,"slope":0,"color":"#00B798"},{"z":45.62,"lon":2.4164,"lat":48.9034,"acc":2.5,"dist":6855.395692073671,"slope":1,"color":"#00B798"},{"z":45.16,"lon":2.4161,"lat":48.9025,"acc":2.5,"dist":6960.863465227699,"slope":0,"color":"#00B798"},{"z":52.22,"lon":2.4158,"lat":48.9016,"acc":2.5,"dist":7066.33225594323,"slope":7,"color":"#00B798"},{"z":51.9,"lon":2.4154,"lat":48.9006,"acc":2.5,"dist":7171.799897925782,"slope":0,"color":"#00B798"},{"z":51.72,"lon":2.4151,"lat":48.8997,"acc":2.5,"dist":7277.26855745585,"slope":0,"color":"#00B798"},{"z":52.03,"lon":2.4148,"lat":48.8988,"acc":2.5,"dist":7382.736986083543,"slope":0,"color":"#00B798"},{"z":49.42,"lon":2.4145,"lat":48.8979,"acc":2.5,"dist":7488.205349103204,"slope":2,"color":"#00B798"},{"z":49.08,"lon":2.4141,"lat":48.8969,"acc":2.5,"dist":7593.672563355361,"slope":0,"color":"#00B798"},{"z":52.62,"lon":2.4138,"lat":48.896,"acc":2.5,"dist":7699.141878284043,"slope":3,"color":"#00B798"},{"z":52.01,"lon":2.4135,"lat":48.8951,"acc":2.5,"dist":7804.610044431861,"slope":1,"color":"#00B798"},{"z":52.2,"lon":2.4132,"lat":48.8942,"acc":2.5,"dist":7910.077979644247,"slope":0,"color":"#00B798"},{"z":56.36,"lon":2.4128,"lat":48.8933,"acc":2.5,"dist":8015.545849209997,"slope":4,"color":"#00B798"},{"z":57.32,"lon":2.4125,"lat":48.8923,"acc":2.5,"dist":8121.014736279902,"slope":1,"color":"#00B798"},{"z":58.82,"lon":2.4122,"lat":48.8914,"acc":2.5,"dist":8226.483557693336,"slope":1,"color":"#00B798"},{"z":62.45,"lon":2.4115,"lat":48.8896,"acc":2.5,"dist":8437.419755063762,"slope":2,"color":"#00B798"},{"z":64.37,"lon":2.4112,"lat":48.8886,"acc":2.5,"dist":8542.888214163944,"slope":2,"color":"#00B798"},{"z":65.82,"lon":2.4109,"lat":48.8877,"acc":2.5,"dist":8648.356607580232,"slope":1,"color":"#00B798"},{"z":68.58,"lon":2.4106,"lat":48.8868,"acc":2.5,"dist":8753.824935304234,"slope":3,"color":"#00B798"},{"z":71.32,"lon":2.4102,"lat":48.8859,"acc":2.5,"dist":8859.294280492928,"slope":3,"color":"#00B798"},{"z":70.95,"lon":2.4099,"lat":48.8849,"acc":2.5,"dist":8964.76231151453,"slope":0,"color":"#00B798"},{"z":79.77,"lon":2.4096,"lat":48.884,"acc":2.5,"dist":9070.231359988265,"slope":8,"color":"#00B798"},{"z":83.87,"lon":2.4089,"lat":48.8822,"acc":2.5,"dist":9281.168176607776,"slope":2,"color":"#00B798"},{"z":92.45,"lon":2.4086,"lat":48.8812,"acc":2.5,"dist":9386.637027906769,"slope":8,"color":"#00B798"},{"z":100.45,"lon":2.4083,"lat":48.8803,"acc":2.5,"dist":9492.105648167299,"slope":8,"color":"#00B798"},{"z":113.3,"lon":2.4076,"lat":48.8785,"acc":2.5,"dist":9703.04269144244,"slope":6,"color":"#00B798"},{"z":117.27,"lon":2.407,"lat":48.8766,"acc":2.5,"dist":9913.979471681056,"slope":2,"color":"#00B798"},{"z":120.39,"lon":2.4063,"lat":48.8748,"acc":2.5,"dist":10124.916741400124,"slope":1,"color":"#00B798"},{"z":118.28,"lon":2.406,"lat":48.8739,"acc":2.5,"dist":10230.38581917189,"slope":2,"color":"#00B798"},{"z":113.01,"lon":2.4057,"lat":48.8729,"acc":2.5,"dist":10335.854831149694,"slope":5,"color":"#00B798"},{"z":109.04,"lon":2.4053,"lat":48.872,"acc":2.5,"dist":10441.323777329299,"slope":4,"color":"#00B798"},{"z":108.93,"lon":2.405,"lat":48.8711,"acc":2.5,"dist":10546.79249240178,"slope":0,"color":"#00B798"},{"z":103.27,"lon":2.4047,"lat":48.8702,"acc":2.5,"dist":10652.261141661347,"slope":5,"color":"#00B798"},{"z":99.47,"lon":2.4044,"lat":48.8692,"acc":2.5,"dist":10757.729725099598,"slope":4,"color":"#00B798"},{"z":88.53,"lon":2.4037,"lat":48.8674,"acc":2.5,"dist":10968.667777670358,"slope":5,"color":"#00B798"},{"z":85.75,"lon":2.4034,"lat":48.8665,"acc":2.5,"dist":11074.135998306618,"slope":3,"color":"#00B798"},{"z":83.88,"lon":2.4031,"lat":48.8655,"acc":2.5,"dist":11179.605236279887,"slope":2,"color":"#00B798"},{"z":80.3,"lon":2.4024,"lat":48.8637,"acc":2.5,"dist":11390.542431470314,"slope":2,"color":"#00B798"},{"z":85.56,"lon":2.4018,"lat":48.8618,"acc":2.5,"dist":11601.48028107646,"slope":2,"color":"#00B798"},{"z":72.45,"lon":2.4011,"lat":48.86,"acc":2.5,"dist":11812.418785052194,"slope":6,"color":"#00B798"},{"z":70.4,"lon":2.4008,"lat":48.8591,"acc":2.5,"dist":11917.887396602457,"slope":2,"color":"#00B798"},{"z":66.49,"lon":2.4005,"lat":48.8581,"acc":2.5,"dist":12023.355942252225,"slope":4,"color":"#00B798"},{"z":66.01,"lon":2.3998,"lat":48.8563,"acc":2.5,"dist":12234.294671608683,"slope":0,"color":"#00B798"},{"z":65.49,"lon":2.3995,"lat":48.8554,"acc":2.5,"dist":12339.763937409303,"slope":0,"color":"#00B798"},{"z":62.8,"lon":2.3991,"lat":48.8544,"acc":2.5,"dist":12445.232054081518,"slope":3,"color":"#00B798"},{"z":55.58,"lon":2.3985,"lat":48.8526,"acc":2.5,"dist":12656.17117391075,"slope":3,"color":"#00B798"},{"z":53.29,"lon":2.3978,"lat":48.8508,"acc":2.5,"dist":12867.108781443218,"slope":1,"color":"#00B798"},{"z":51.24,"lon":2.3972,"lat":48.8489,"acc":2.5,"dist":13078.047208327682,"slope":1,"color":"#00B798"},{"z":51.27,"lon":2.3965,"lat":48.8471,"acc":2.5,"dist":13288.986289213502,"slope":0,"color":"#00B798"},{"z":48.95,"lon":2.3959,"lat":48.8452,"acc":2.5,"dist":13499.92369233412,"slope":1,"color":"#00B798"},{"z":50.25,"lon":2.3956,"lat":48.8443,"acc":2.5,"dist":13605.394002359335,"slope":1,"color":"#00B798"},{"z":50.53,"lon":2.3952,"lat":48.8434,"acc":2.5,"dist":13710.862997862469,"slope":0,"color":"#00B798"},{"z":51.67,"lon":2.3949,"lat":48.8424,"acc":2.5,"dist":13816.332092648028,"slope":1,"color":"#00B798"},{"z":53.46,"lon":2.3946,"lat":48.8415,"acc":2.5,"dist":13921.800956110339,"slope":2,"color":"#00B798"},{"z":51.91,"lon":2.3943,"lat":48.8406,"acc":2.5,"dist":14027.27083675683,"slope":1,"color":"#00B798"},{"z":49.51,"lon":2.3939,"lat":48.8397,"acc":2.5,"dist":14132.74048606685,"slope":2,"color":"#00B798"},{"z":46.5,"lon":2.3936,"lat":48.8387,"acc":2.5,"dist":14238.209151416597,"slope":3,"color":"#00B798"},{"z":44.04,"lon":2.3933,"lat":48.8378,"acc":2.5,"dist":14343.678668633083,"slope":2,"color":"#00B798"},{"z":36.67,"lon":2.393,"lat":48.8369,"acc":2.5,"dist":14449.148119791826,"slope":7,"color":"#00B798"},{"z":38.96,"lon":2.3926,"lat":48.836,"acc":2.5,"dist":14554.617504887203,"slope":2,"color":"#00B798"},{"z":39.52,"lon":2.3923,"lat":48.835,"acc":2.5,"dist":14660.086658611875,"slope":1,"color":"#00B798"},{"z":38.3,"lon":2.392,"lat":48.8341,"acc":2.5,"dist":14765.555911558176,"slope":1,"color":"#00B798"},{"z":38.02,"lon":2.3917,"lat":48.8332,"acc":2.5,"dist":14871.02601634314,"slope":0,"color":"#00B798"},{"z":38.11,"lon":2.3913,"lat":48.8323,"acc":2.5,"dist":14976.494971813137,"slope":0,"color":"#00B798"},{"z":38.06,"lon":2.3907,"lat":48.8304,"acc":2.5,"dist":15187.434850905734,"slope":0,"color":"#00B798"},{"z":36.72,"lon":2.3904,"lat":48.8295,"acc":2.5,"dist":15292.903442759603,"slope":1,"color":"#00B798"},{"z":37.83,"lon":2.39,"lat":48.8286,"acc":2.5,"dist":15398.373051724306,"slope":1,"color":"#00B798"},{"z":33.37,"lon":2.3897,"lat":48.8277,"acc":2.5,"dist":15503.842594563532,"slope":4,"color":"#00B798"},{"z":28.05,"lon":2.3894,"lat":48.8267,"acc":2.5,"dist":15609.312071271665,"slope":5,"color":"#00B798"},{"z":28.05,"lon":2.3891,"lat":48.8258,"acc":2.5,"dist":15714.78256507298,"slope":0,"color":"#00B798"},{"z":32.44,"lon":2.3887,"lat":48.8249,"acc":2.5,"dist":15820.251744198078,"slope":4,"color":"#00B798"},{"z":33.79,"lon":2.3884,"lat":48.824,"acc":2.5,"dist":15925.721022469364,"slope":1,"color":"#00B798"},{"z":34.94,"lon":2.3881,"lat":48.823,"acc":2.5,"dist":16031.19115251719,"slope":1,"color":"#00B798"},{"z":34.75,"lon":2.3878,"lat":48.8221,"acc":2.5,"dist":16136.661216401162,"slope":0,"color":"#00B798"},{"z":34.09,"lon":2.3874,"lat":48.8212,"acc":2.5,"dist":16242.129965575337,"slope":1,"color":"#00B798"},{"z":33.29,"lon":2.3868,"lat":48.8193,"acc":2.5,"dist":16453.069597155332,"slope":0,"color":"#00B798"},{"z":34.23,"lon":2.3861,"lat":48.8175,"acc":2.5,"dist":16664.008798665218,"slope":0,"color":"#00B798"},{"z":34.9,"lon":2.3855,"lat":48.8156,"acc":2.5,"dist":16874.94881859457,"slope":0,"color":"#00B798"},{"z":33.07,"lon":2.3852,"lat":48.8147,"acc":2.5,"dist":16980.418022311114,"slope":2,"color":"#00B798"},{"z":33.5,"lon":2.3848,"lat":48.8138,"acc":2.5,"dist":17085.888243046913,"slope":0,"color":"#00B798"},{"z":33.75,"lon":2.3845,"lat":48.8129,"acc":2.5,"dist":17191.358397550535,"slope":0,"color":"#00B798"},{"z":34.26,"lon":2.3842,"lat":48.8119,"acc":2.5,"dist":17296.828485815702,"slope":0,"color":"#00B798"},{"z":39.14,"lon":2.3839,"lat":48.811,"acc":2.5,"dist":17402.29834253451,"slope":5,"color":"#00B798"},{"z":47.39,"lon":2.3835,"lat":48.8101,"acc":2.5,"dist":17507.768298299758,"slope":8,"color":"#00B798"},{"z":62.09,"lon":2.3829,"lat":48.8082,"acc":2.5,"dist":17718.70768044469,"slope":7,"color":"#00B798"},{"z":64.16,"lon":2.3826,"lat":48.8073,"acc":2.5,"dist":17824.177272108594,"slope":2,"color":"#00B798"},{"z":64.89,"lon":2.3822,"lat":48.8064,"acc":2.5,"dist":17929.64771544854,"slope":1,"color":"#00B798"},{"z":64.85,"lon":2.3819,"lat":48.8055,"acc":2.5,"dist":18035.11717454526,"slope":0,"color":"#00B798"},{"z":63.8,"lon":2.3816,"lat":48.8046,"acc":2.5,"dist":18140.58748530417,"slope":1,"color":"#00B798"},{"z":57.93,"lon":2.3809,"lat":48.8027,"acc":2.5,"dist":18351.527907917163,"slope":3,"color":"#00B798"},{"z":60.9,"lon":2.3803,"lat":48.8009,"acc":2.5,"dist":18562.46789997591,"slope":1,"color":"#00B798"},{"z":61.21,"lon":2.38,"lat":48.7999,"acc":2.5,"dist":18667.937713868283,"slope":0,"color":"#00B798"},{"z":60.67,"lon":2.3796,"lat":48.799,"acc":2.5,"dist":18773.407461424686,"slope":1,"color":"#00B798"},{"z":63.17,"lon":2.3793,"lat":48.7981,"acc":2.5,"dist":18878.87822590508,"slope":2,"color":"#00B798"},{"z":63.18,"lon":2.379,"lat":48.7972,"acc":2.5,"dist":18984.34767547439,"slope":0,"color":"#00B798"},{"z":72.32,"lon":2.3783,"lat":48.7953,"acc":2.5,"dist":19195.28870737312,"slope":4,"color":"#00B798"},{"z":75.18,"lon":2.3777,"lat":48.7935,"acc":2.5,"dist":19406.22822523384,"slope":1,"color":"#00B798"},{"z":93.76,"lon":2.377,"lat":48.7916,"acc":2.5,"dist":19617.16947881073,"slope":9,"color":"#00B798"},{"z":96.76,"lon":2.3764,"lat":48.7898,"acc":2.5,"dist":19828.10921823686,"slope":1,"color":"#00B798"},{"z":98.1,"lon":2.3757,"lat":48.7879,"acc":2.5,"dist":20039.04977530349,"slope":1,"color":"#00B798"},{"z":98.17,"lon":2.3751,"lat":48.7861,"acc":2.5,"dist":20249.990984662647,"slope":0,"color":"#00B798"},{"z":98.81,"lon":2.3748,"lat":48.7851,"acc":2.5,"dist":20355.461407043225,"slope":1,"color":"#00B798"},{"z":98.69,"lon":2.3744,"lat":48.7842,"acc":2.5,"dist":20460.93176298281,"slope":0,"color":"#00B798"},{"z":99.32,"lon":2.3741,"lat":48.7833,"acc":2.5,"dist":20566.40205247378,"slope":1,"color":"#00B798"},{"z":98.91,"lon":2.3738,"lat":48.7824,"acc":2.5,"dist":20671.872110209042,"slope":0,"color":"#00B798"},{"z":97.85,"lon":2.3735,"lat":48.7815,"acc":2.5,"dist":20777.342266781874,"slope":1,"color":"#00B798"},{"z":96.6,"lon":2.3731,"lat":48.7805,"acc":2.5,"dist":20882.81327487031,"slope":1,"color":"#00B798"},{"z":94.95,"lon":2.3725,"lat":48.7787,"acc":2.5,"dist":21093.753843031274,"slope":1,"color":"#00B798"},{"z":94.9,"lon":2.3722,"lat":48.7778,"acc":2.5,"dist":21199.224651675548,"slope":0,"color":"#00B798"},{"z":94.85,"lon":2.3718,"lat":48.7768,"acc":2.5,"dist":21304.69522852459,"slope":0,"color":"#00B798"},{"z":94.56,"lon":2.3712,"lat":48.775,"acc":2.5,"dist":21515.63634800943,"slope":0,"color":"#00B798"},{"z":93.66,"lon":2.3705,"lat":48.7731,"acc":2.5,"dist":21726.576870831468,"slope":0,"color":"#00B798"},{"z":94.69,"lon":2.3699,"lat":48.7713,"acc":2.5,"dist":21937.518210829076,"slope":0,"color":"#00B798"},{"z":94.47,"lon":2.3696,"lat":48.7704,"acc":2.5,"dist":22042.989240017425,"slope":0,"color":"#00B798"},{"z":95.24,"lon":2.3692,"lat":48.7694,"acc":2.5,"dist":22148.459119357743,"slope":1,"color":"#00B798"},{"z":94.15,"lon":2.3686,"lat":48.7676,"acc":2.5,"dist":22359.40067965935,"slope":1,"color":"#00B798"},{"z":93.74,"lon":2.3683,"lat":48.7667,"acc":2.5,"dist":22464.87127730978,"slope":0,"color":"#00B798"},{"z":93.02,"lon":2.3679,"lat":48.7657,"acc":2.5,"dist":22570.341808385187,"slope":1,"color":"#00B798"},{"z":90.67,"lon":2.3673,"lat":48.7639,"acc":2.5,"dist":22781.28375408006,"slope":1,"color":"#00B798"},{"z":89.13,"lon":2.3666,"lat":48.762,"acc":2.5,"dist":22992.22526809236,"slope":1,"color":"#00B798"},{"z":88.01,"lon":2.366,"lat":48.7602,"acc":2.5,"dist":23203.166350365183,"slope":1,"color":"#00B798"},{"z":87.35,"lon":2.3653,"lat":48.7583,"acc":2.5,"dist":23414.108084152533,"slope":0,"color":"#00B798"},{"z":86.32,"lon":2.3647,"lat":48.7565,"acc":2.5,"dist":23625.049551394335,"slope":0,"color":"#00B798"},{"z":86.75,"lon":2.3644,"lat":48.7556,"acc":2.5,"dist":23730.521185706893,"slope":0,"color":"#00B798"},{"z":85.67,"lon":2.364,"lat":48.7547,"acc":2.5,"dist":23835.99167004888,"slope":1,"color":"#00B798"},{"z":82.91,"lon":2.3634,"lat":48.7528,"acc":2.5,"dist":24046.933356751884,"slope":1,"color":"#00B798"},{"z":84.2,"lon":2.3627,"lat":48.751,"acc":2.5,"dist":24257.875694763166,"slope":1,"color":"#00B798"},{"z":84.05,"lon":2.3621,"lat":48.7491,"acc":2.5,"dist":24468.81760071693,"slope":0,"color":"#00B798"},{"z":83.77,"lon":2.3614,"lat":48.7473,"acc":2.5,"dist":24679.759239854204,"slope":0,"color":"#00B798"},{"z":91.59,"lon":2.3608,"lat":48.7454,"acc":2.5,"dist":24890.701530146132,"slope":4,"color":"#00B798"},{"z":85.93,"lon":2.3602,"lat":48.7436,"acc":2.5,"dist":25101.643553517,"slope":3,"color":"#00B798"},{"z":90.6,"lon":2.3595,"lat":48.7417,"acc":2.5,"dist":25312.586062640283,"slope":2,"color":"#00B798"},{"z":93.2,"lon":2.3589,"lat":48.7399,"acc":2.5,"dist":25523.528304735235,"slope":1,"color":"#00B798"},{"z":86.94,"lon":2.3582,"lat":48.738,"acc":2.5,"dist":25734.471197779538,"slope":3,"color":"#00B798"},{"z":87.53,"lon":2.3576,"lat":48.7362,"acc":2.5,"dist":25945.41365839045,"slope":0,"color":"#00B798"},{"z":86.46,"lon":2.3569,"lat":48.7343,"acc":2.5,"dist":26156.355851810382,"slope":1,"color":"#00B798"},{"z":87.56,"lon":2.3563,"lat":48.7325,"acc":2.5,"dist":26367.298530725682,"slope":1,"color":"#00B798"},{"z":85.07,"lon":2.3556,"lat":48.7306,"acc":2.5,"dist":26578.240942344193,"slope":1,"color":"#00B798"},{"z":85.26,"lon":2.355,"lat":48.7288,"acc":2.5,"dist":26789.184169954213,"slope":0,"color":"#00B798"},{"z":84.82,"lon":2.3543,"lat":48.7269,"acc":2.5,"dist":27000.126799561986,"slope":0,"color":"#00B798"}]} + + + + 2.4376632683539583,48.96347018329644 2.3543162121296386,48.72692870609552 + + + diff --git a/samples-src/resources/data/kml/export-route.kml b/samples-src/resources/data/kml/export-route.kml new file mode 100644 index 000000000..04569c2be --- /dev/null +++ b/samples-src/resources/data/kml/export-route.kml @@ -0,0 +1,147 @@ + + + {"type":"route","points":[[2.588903974691772,48.84180319210205],null,null,null,null,null,[2.5862700454391456,48.840433323926135]],"transport":"Pieton","exclusions":[],"computation":"fastest","results":{"totalTime":304.2,"totalDistance":340.1,"bbox":{"left":2.586226,"right":2.588904,"top":48.841809,"bottom":48.840433},"routeGeometry":null,"routeInstructions":[{"duration":5.2,"distance":7.9,"code":"","instruction":"Départ","geometry":{"coordinates":[[2.588904,48.841809],[2.588796,48.841805]],"type":"LineString"}},{"duration":26.6,"distance":29.6,"code":"","instruction":"Continuer à gauche","geometry":{"coordinates":[[2.588796,48.841805],[2.58882,48.841539]],"type":"LineString"}},{"duration":151.1,"distance":167.5,"code":"","instruction":"Continuer à droite","geometry":{"coordinates":[[2.58882,48.841539],[2.587649,48.841489],[2.586988,48.841461],[2.586537,48.841442]],"type":"LineString"}},{"duration":77.4,"distance":85.7,"code":"","instruction":"Continuer à gauche","geometry":{"coordinates":[[2.586537,48.841442],[2.586579,48.840933],[2.586577,48.84092],[2.586567,48.840902],[2.586539,48.84089],[2.586505,48.840887],[2.586226,48.840876]],"type":"LineString"}},{"duration":43.9,"distance":49.4,"code":"","instruction":"Tourner à gauche sur BD COPERNIC","geometry":{"coordinates":[[2.586226,48.840876],[2.586232,48.840797],[2.586256,48.840524],[2.586264,48.840433]],"type":"LineString"}},{"duration":0,"distance":0,"code":"","instruction":"Arrivée sur BD COPERNIC","geometry":{"coordinates":[[2.586264,48.840433],[2.586264,48.840433]],"type":"LineString"}}]}} + + + + + + + (1) distance : 7 m / temps : 0 min + + + + 2.588904,48.84180900000001 2.588796,48.841804999999965 + + + + + + + (2) distance : 29 m / temps : 0 min + + + + 2.588796,48.841804999999965 2.5888200000000006,48.84153900000001 + + + + + + + (3) distance : 167 m / temps : 2 min + + + + 2.5888200000000006,48.84153900000001 2.587649,48.841488999999996 2.586988,48.84146100000001 2.586537,48.84144200000003 + + + + + + + (4) distance : 85 m / temps : 1 min + + + + 2.586537,48.84144200000003 2.5865789999999995,48.84093299999998 2.5865770000000006,48.84091999999998 2.586567,48.840902 2.586539,48.84089 2.586505,48.84088700000001 2.586226,48.84087600000001 + + + + + + + (5) distance : 49 m / temps : 0 min + + + + 2.586226,48.84087600000001 2.5862319999999994,48.84079700000001 2.586256,48.840524000000016 2.586264,48.84043299999999 + + + + + + + (6) distance : 0 m / temps : 0 min + + + + 2.586264,48.84043299999999 2.586264,48.84043299999999 + + + + Point de départ + + + + medium + + + + 2.588903974691772,48.84180319210205 + + + + Point d'arrivée + + + + medium + + + + 2.5862700454391456,48.840433323926135 + + + + diff --git a/samples-src/resources/data/kml/map-extendeddata.kml b/samples-src/resources/data/kml/map-extendeddata.kml new file mode 100644 index 000000000..b5ae51d7c --- /dev/null +++ b/samples-src/resources/data/kml/map-extendeddata.kml @@ -0,0 +1,163 @@ + + + + Icone avec un label + + + 2.3692703247070312,48.87758662245017 + + + + Ceci est un cercle + + + 2.4053628548039057,48.886131681603956 + + + + Ceci est un label + + + 2.4153628548039063,48.896131681603975 + + + + + + 2.3753628548039063,48.896131681603975 + + + + + 2.385362854803906,48.896131681603975 + + + + Ceci est un cercle avec label + + + 2.4053628548039057,48.906131681603966 + + + + + + 2.2988891601562718,48.830825619641985 2.2741699218750218,48.845287792226486 2.2748565673828343,48.86403720372047 2.2751998901367188,48.872618928290024 2.285671234130859,48.8778124150092 2.2961425781249996,48.883005362568866 2.3081588745117188,48.88887500189762 2.319831848144553,48.894743952279924 2.351417541503928,48.90061221373509 2.381629943847656,48.884134192869226 2.420082092285179,48.86652153850778 2.4180221557617188,48.84393214092012 2.397079467773437,48.83918707235517 2.4001693725586164,48.830599615064585 + + + + + + 2.371330261230469,48.83760528293374 + + + + + + + + 2.3054122924804688,48.864940612458355 2.3273849487304688,48.840768811826564 2.377166748046875,48.86177861052681 2.3424911499023438,48.87171565817036 2.3054122924804688,48.864940612458355 + + + + + + + + 2.3953628540039062,48.85613168160398 + + + + + + + 2.4193954467773438,48.86019753464396 2.4393081665039062,48.86019753464396 2.4393081665039062,48.87419961175908 2.4193954467773438,48.87419961175908 2.4193954467773438,48.86019753464396 + + + + + + Ceci est un label (style par defaut) + + 2.3953628548039063,48.876131681603965 + + + + diff --git a/samples-src/resources/data/kml/map.kml b/samples-src/resources/data/kml/map.kml new file mode 100644 index 000000000..035d3a6da --- /dev/null +++ b/samples-src/resources/data/kml/map.kml @@ -0,0 +1,173 @@ + + + + Icone avec un label + + + 2.3692703247070312,48.87758662245017 + + + + Ceci est un cercle + + + 2.4053628548039057,48.886131681603956 + + + + Ceci est un label + + + 2.4153628548039063,48.896131681603975 + + + + Ceci est un icone + + + 2.3753628548039063,48.896131681603975 + + + + Ceci est un icone (style par defaut) + + 2.385362854803906,48.896131681603975 + + + + Ceci est un cercle avec label + + + 2.4053628548039057,48.906131681603966 + + + + Ceci est un lineaire + + + 2.2988891601562718,48.830825619641985 2.2741699218750218,48.845287792226486 2.2748565673828343,48.86403720372047 2.2751998901367188,48.872618928290024 2.285671234130859,48.8778124150092 2.2961425781249996,48.883005362568866 2.3081588745117188,48.88887500189762 2.319831848144553,48.894743952279924 2.351417541503928,48.90061221373509 2.381629943847656,48.884134192869226 2.420082092285179,48.86652153850778 2.4180221557617188,48.84393214092012 2.397079467773437,48.83918707235517 2.4001693725586164,48.830599615064585 + + + + LineString + + + + + Ceci est un icone + + + 2.371330261230469,48.83760528293374 + + + + Ceci est une surface + + + + + 2.3054122924804688,48.864940612458355 2.3273849487304688,48.840768811826564 2.377166748046875,48.86177861052681 2.3424911499023438,48.87171565817036 2.3054122924804688,48.864940612458355 + + + + + + Ceci est un icone + + + 2.3953628540039062,48.85613168160398 + + + + Ceci est une surface (style par defaut) + + + + 2.4193954467773438,48.86019753464396 2.4393081665039062,48.86019753464396 2.4393081665039062,48.87419961175908 2.4193954467773438,48.87419961175908 2.4193954467773438,48.86019753464396 + + + + + + Ceci est un label (style par defaut) + + 2.3953628548039063,48.876131681603965 + + + + diff --git a/samples-src/resources/vendor/ol/v6.9.0/ol.js b/samples-src/resources/vendor/ol/v6.9.0/ol.js index 793e2b4b8..e5ea195b6 100644 --- a/samples-src/resources/vendor/ol/v6.9.0/ol.js +++ b/samples-src/resources/vendor/ol/v6.9.0/ol.js @@ -1,3 +1,133637 @@ -/*! For license information please see ol.js.LICENSE.txt */ -!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.ol=n():t.ol=n()}(self,(function(){return function(){var t,n={9796:function(t,n,e){var r;n.formatArgs=function(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;var e="color: "+this.color;n.splice(1,0,e,"color: inherit");var r=0,i=0;n[0].replace(/%[a-zA-Z%]/g,(function(t){"%%"!==t&&(r++,"%c"===t&&(i=r))})),n.splice(i,0,e)},n.save=function(t){try{t?n.storage.setItem("debug",t):n.storage.removeItem("debug")}catch(t){}},n.load=function(){var t;try{t=n.storage.getItem("debug")}catch(t){}!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG);return t},n.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},n.storage=function(){try{return localStorage}catch(t){}}(),n.destroy=(r=!1,function(){r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),n.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],n.log=console.debug||console.log||function(){},t.exports=e(4701)(n),t.exports.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},4701:function(t,n,e){function r(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return i(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return i(t,n)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e>1,f=-7,h=e?i-1:0,l=e?-1:1,v=t[n+h];for(h+=l,o=v&(1<<-f)-1,v>>=-f,f+=a;f>0;o=256*o+t[n+h],h+=l,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=r;f>0;s=256*s+t[n+h],h+=l,f-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(v?-1:1);s+=Math.pow(2,r),o-=c}return(v?-1:1)*s*Math.pow(2,o-r)},n.write=function(t,n,e,r,i,o){var s,a,u,c=8*o-i-1,f=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:o-1,d=r?1:-1,p=n<0||0===n&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(a=isNaN(n)?1:0,s=f):(s=Math.floor(Math.log(n)/Math.LN2),n*(u=Math.pow(2,-s))<1&&(s--,u*=2),(n+=s+h>=1?l/u:l*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=f?(a=0,s=f):s+h>=1?(a=(n*u-1)*Math.pow(2,i),s+=h):(a=n*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[e+v]=255&a,v+=d,a/=256,i-=8);for(s=s<0;t[e+v]=255&s,v+=d,s/=256,c-=8);t[e+v-d]|=128*p}},152:function(t){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){return!!t&&("symbol"===n(Symbol.observable)&&"function"==typeof t[Symbol.observable]?t===t[Symbol.observable]():"function"==typeof t["@@observable"]&&t===t["@@observable"]())}},6875:function(t,n,e){"use strict";function r(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function i(t,n){for(var e=0;ethis[s])return x(this,this[d].get(t)),!1;var o=this[d].get(t).value;return this[h]&&(this[l]||this[h](t,o.value)),o.now=r,o.maxAge=e,o.value=n,this[a]+=i-o.length,o.length=i,this.get(t),w(this),!0}var c=new k(t,n,i,r,e);return c.length>this[s]?(this[h]&&this[h](t,n),!1):(this[a]+=c.length,this[v].unshift(c),this[d].set(t,this[v].head),w(this),!0)}},{key:"has",value:function(t){if(!this[d].has(t))return!1;var n=this[d].get(t).value;return!g(this,n)}},{key:"get",value:function(t){return b(this,t,!0)}},{key:"peek",value:function(t){return b(this,t,!1)}},{key:"pop",value:function(){var t=this[v].tail;return t?(x(this,t),t.value):null}},{key:"del",value:function(t){x(this,this[d].get(t))}},{key:"load",value:function(t){this.reset();for(var n=Date.now(),e=t.length-1;e>=0;e--){var r=t[e],i=r.e||0;if(0===i)this.set(r.k,r.v);else{var o=i-n;o>0&&this.set(r.k,r.v,o)}}}},{key:"prune",value:function(){var t=this;this[d].forEach((function(n,e){return b(t,e,!1)}))}}])&&i(n.prototype,e),m&&i(n,m),t}(),b=function(t,n,e){var r=t[d].get(n);if(r){var i=r.value;if(g(t,i)){if(x(t,r),!t[c])return}else e&&(t[p]&&(r.value.now=Date.now()),t[v].unshiftNode(r));return i.value}},g=function(t,n){if(!n||!n.maxAge&&!t[f])return!1;var e=Date.now()-n.now;return n.maxAge?e>n.maxAge:t[f]&&e>t[f]},w=function(t){if(t[a]>t[s])for(var n=t[v].tail;t[a]>t[s]&&null!==n;){var e=n.prev;x(t,n),n=e}},x=function(t,n){if(n){var e=n.value;t[h]&&t[h](e.key,e.value),t[a]-=e.length,t[d].delete(e.key),t[v].removeNode(n)}},k=function t(n,e,i,o,s){r(this,t),this.key=n,this.value=e,this.length=i,this.now=o,this.maxAge=s||0},_=function(t,n,e,r){var i=e.value;g(t,i)&&(x(t,e),t[c]||(i=void 0)),i&&n.call(r,i.value,i.key,t)};t.exports=m},1063:function(t){var n={thin:100,hairline:100,"ultra-light":100,"extra-light":100,light:200,book:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,heavy:800,black:800,"extra-bold":800,"ultra-black":900,"extra-black":900,"ultra-bold":900,"heavy-black":900,fat:900,poster:900},e=" ",r=/(italic|oblique)$/i,i={};t.exports=function(t,o,s){var a=i[t];if(!a){Array.isArray(t)||(t=[t]);for(var u=400,c="normal",f=[],h=0,l=t.length;h=1.5*e;return Math.round(t/e)+" "+r+(i?"s":"")}t.exports=function(t,c){c=c||{};var f=n(t);if("string"===f&&t.length>0)return function(t){if((t=String(t)).length>100)return;var n=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!n)return;var u=parseFloat(n[1]);switch((n[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*a;case"weeks":case"week":case"w":return u*s;case"days":case"day":case"d":return u*o;case"hours":case"hour":case"hrs":case"hr":case"h":return u*i;case"minutes":case"minute":case"mins":case"min":case"m":return u*r;case"seconds":case"second":case"secs":case"sec":case"s":return u*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(t);if("number"===f&&isFinite(t))return c.long?function(t){var n=Math.abs(t);if(n>=o)return u(t,n,o,"day");if(n>=i)return u(t,n,i,"hour");if(n>=r)return u(t,n,r,"minute");if(n>=e)return u(t,n,e,"second");return t+" ms"}(t):function(t){var n=Math.abs(t);if(n>=o)return Math.round(t/o)+"d";if(n>=i)return Math.round(t/i)+"h";if(n>=r)return Math.round(t/r)+"m";if(n>=e)return Math.round(t/e)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},9694:function(t,n,e){"use strict";function r(t,n){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=function(t,n){if(!t)return;if("string"==typeof t)return i(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return i(t,n)}(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,u=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return a=t.done,t},e:function(t){u=!0,s=t},f:function(){try{a||null==e.return||e.return()}finally{if(u)throw s}}}}function i(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==e.return||e.return()}finally{if(a)throw o}}}}function y(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e1?e-1:0),i=1;i1,o=!1,s=n;return new r((function(n){return e.subscribe({next:function(e){var r=!o;if(o=!0,!r||i)try{s=t(s,e)}catch(t){return n.error(t)}else s=e},error:function(t){n.error(t)},complete:function(){if(!o&&!i)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(s),n.complete()}})}))}},{key:"concat",value:function(){for(var t=this,n=arguments.length,e=new Array(n),r=0;r=0&&i.splice(t,1),s()}});i.push(a)},error:function(t){r.error(t)},complete:function(){s()}});function s(){o.closed&&0===i.length&&r.complete()}return function(){i.forEach((function(t){return t.unsubscribe()})),o.unsubscribe()}}))}},{key:t,value:function(){return this}}],[{key:"from",value:function(t){var e="function"==typeof this?this:n;if(null==t)throw new TypeError(t+" is not an object");var r=w(t,b);if(r){var i=r.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return k(i)&&i.constructor===e?i:new e((function(t){return i.subscribe(t)}))}if(c("iterator")){var o=w(t,m);if(o)return new e((function(n){S((function(){if(!n.closed){var e,r=p(o.call(t));try{for(r.s();!(e=r.n()).done;){var i=e.value;if(n.next(i),n.closed)return}}catch(t){r.e(t)}finally{r.f()}n.complete()}}))}))}if(Array.isArray(t))return new e((function(n){S((function(){if(!n.closed){var e,r=p(t);try{for(r.s();!(e=r.n()).done;){var i=e.value;if(n.next(i),n.closed)return}}catch(t){r.e(t)}finally{r.f()}n.complete()}}))}));throw new TypeError(t+" is not observable")}},{key:"of",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==e.return||e.return()}finally{if(a)throw o}}}}function Z(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e>>0):4294967296*(n>>>0)+(t>>>0)}function f(t,n,e){var r=n<=16383?1:n<=2097151?2:n<=268435455?3:Math.floor(Math.log(n)/(7*Math.LN2));e.realloc(r);for(var i=e.pos-1;i>=t;i--)e.buf[i+r]=e.buf[i]}function h(t,n){for(var e=0;e>>8,t[e+2]=n>>>16,t[e+3]=n>>>24}function k(t,n){return(t[n]|t[n+1]<<8|t[n+2]<<16)+(t[n+3]<<24)}i.prototype={destroy:function(){this.buf=null},readFields:function(t,n,e){for(e=e||this.length;this.pos>3,o=this.pos;this.type=7&r,t(i,n,this),this.pos===o&&this.skip(r)}return n},readMessage:function(t,n){return this.readFields(t,n,this.readVarint()+this.pos)},readFixed32:function(){var t=w(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=k(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=w(this.buf,this.pos)+w(this.buf,this.pos+4)*o;return this.pos+=8,t},readSFixed64:function(){var t=w(this.buf,this.pos)+k(this.buf,this.pos+4)*o;return this.pos+=8,t},readFloat:function(){var t=r.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=r.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var n,e,r=this.buf;return n=127&(e=r[this.pos++]),e<128?n:(n|=(127&(e=r[this.pos++]))<<7,e<128?n:(n|=(127&(e=r[this.pos++]))<<14,e<128?n:(n|=(127&(e=r[this.pos++]))<<21,e<128?n:function(t,n,e){var r,i,o=e.buf;if(i=o[e.pos++],r=(112&i)>>4,i<128)return c(t,r,n);if(i=o[e.pos++],r|=(127&i)<<3,i<128)return c(t,r,n);if(i=o[e.pos++],r|=(127&i)<<10,i<128)return c(t,r,n);if(i=o[e.pos++],r|=(127&i)<<17,i<128)return c(t,r,n);if(i=o[e.pos++],r|=(127&i)<<24,i<128)return c(t,r,n);if(i=o[e.pos++],r|=(1&i)<<31,i<128)return c(t,r,n);throw new Error("Expected varint not more than 10 bytes")}(n|=(15&(e=r[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,n=this.pos;return this.pos=t,t-n>=12&&a?function(t,n,e){return a.decode(t.subarray(n,e))}(this.buf,n,t):function(t,n,e){var r="",i=n;for(;i239?4:u>223?3:u>191?2:1;if(i+f>e)break;1===f?u<128&&(c=u):2===f?128==(192&(o=t[i+1]))&&(c=(31&u)<<6|63&o)<=127&&(c=null):3===f?(o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&((c=(15&u)<<12|(63&o)<<6|63&s)<=2047||c>=55296&&c<=57343)&&(c=null)):4===f&&(o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&((c=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,f=1):c>65535&&(c-=65536,r+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),r+=String.fromCharCode(c),i+=f}return r}(this.buf,n,t)},readBytes:function(){var t=this.readVarint()+this.pos,n=this.buf.subarray(this.pos,t);return this.pos=t,n},readPackedVarint:function(t,n){if(this.type!==i.Bytes)return t.push(this.readVarint(n));var e=u(this);for(t=t||[];this.pos127;);else if(n===i.Bytes)this.pos=this.readVarint()+this.pos;else if(n===i.Fixed32)this.pos+=4;else{if(n!==i.Fixed64)throw new Error("Unimplemented type: "+n);this.pos+=8}},writeTag:function(t,n){this.writeVarint(t<<3|n)},realloc:function(t){for(var n=this.length||16;n268435455||t<0?function(t,n){var e,r;t>=0?(e=t%4294967296|0,r=t/4294967296|0):(r=~(-t/4294967296),4294967295^(e=~(-t%4294967296))?e=e+1|0:(e=0,r=r+1|0));if(t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");n.realloc(10),function(t,n,e){e.buf[e.pos++]=127&t|128,t>>>=7,e.buf[e.pos++]=127&t|128,t>>>=7,e.buf[e.pos++]=127&t|128,t>>>=7,e.buf[e.pos++]=127&t|128,t>>>=7,e.buf[e.pos]=127&t}(e,0,n),function(t,n){var e=(7&t)<<4;if(n.buf[n.pos++]|=e|((t>>>=3)?128:0),!t)return;if(n.buf[n.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(n.buf[n.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(n.buf[n.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(n.buf[n.pos++]=127&t|((t>>>=7)?128:0),!t)return;n.buf[n.pos++]=127&t}(r,n)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var n=this.pos;this.pos=function(t,n,e){for(var r,i,o=0;o55295&&r<57344){if(!i){r>56319||o+1===n.length?(t[e++]=239,t[e++]=191,t[e++]=189):i=r;continue}if(r<56320){t[e++]=239,t[e++]=191,t[e++]=189,i=r;continue}r=i-55296<<10|r-56320|65536,i=null}else i&&(t[e++]=239,t[e++]=191,t[e++]=189,i=null);r<128?t[e++]=r:(r<2048?t[e++]=r>>6|192:(r<65536?t[e++]=r>>12|224:(t[e++]=r>>18|240,t[e++]=r>>12&63|128),t[e++]=r>>6&63|128),t[e++]=63&r|128)}return e}(this.buf,t,this.pos);var e=this.pos-n;e>=128&&f(n,e,this),this.pos=n-1,this.writeVarint(e),this.pos+=e},writeFloat:function(t){this.realloc(4),r.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),r.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var n=t.length;this.writeVarint(n),this.realloc(n);for(var e=0;e=128&&f(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,n,e){this.writeTag(t,i.Bytes),this.writeRawMessage(n,e)},writePackedVarint:function(t,n){n.length&&this.writeMessage(t,h,n)},writePackedSVarint:function(t,n){n.length&&this.writeMessage(t,l,n)},writePackedBoolean:function(t,n){n.length&&this.writeMessage(t,p,n)},writePackedFloat:function(t,n){n.length&&this.writeMessage(t,v,n)},writePackedDouble:function(t,n){n.length&&this.writeMessage(t,d,n)},writePackedFixed32:function(t,n){n.length&&this.writeMessage(t,y,n)},writePackedSFixed32:function(t,n){n.length&&this.writeMessage(t,m,n)},writePackedFixed64:function(t,n){n.length&&this.writeMessage(t,b,n)},writePackedSFixed64:function(t,n){n.length&&this.writeMessage(t,g,n)},writeBytesField:function(t,n){this.writeTag(t,i.Bytes),this.writeBytes(n)},writeFixed32Field:function(t,n){this.writeTag(t,i.Fixed32),this.writeFixed32(n)},writeSFixed32Field:function(t,n){this.writeTag(t,i.Fixed32),this.writeSFixed32(n)},writeFixed64Field:function(t,n){this.writeTag(t,i.Fixed64),this.writeFixed64(n)},writeSFixed64Field:function(t,n){this.writeTag(t,i.Fixed64),this.writeSFixed64(n)},writeVarintField:function(t,n){this.writeTag(t,i.Varint),this.writeVarint(n)},writeSVarintField:function(t,n){this.writeTag(t,i.Varint),this.writeSVarint(n)},writeStringField:function(t,n){this.writeTag(t,i.Bytes),this.writeString(n)},writeFloatField:function(t,n){this.writeTag(t,i.Fixed32),this.writeFloat(n)},writeDoubleField:function(t,n){this.writeTag(t,i.Fixed64),this.writeDouble(n)},writeBooleanField:function(t,n){this.writeVarintField(t,Boolean(n))}}},7072:function(t,n,e){var r,i,o;function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}o=function(){"use strict";function t(t,r,i,o,s){!function t(e,r,i,o,s){for(;o>i;){if(o-i>600){var a=o-i+1,u=r-i+1,c=Math.log(a),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(a-f)/a)*(u-a/2<0?-1:1);t(e,r,Math.max(i,Math.floor(r-u*f/a+h)),Math.min(o,Math.floor(r+(a-u)*f/a+h)),s)}var l=e[r],v=i,d=o;for(n(e,i,r),s(e[o],l)>0&&n(e,i,o);v0;)d--}0===s(e[i],l)?n(e,i,d):n(e,++d,o),d<=r&&(i=d+1),r<=d&&(o=d-1)}}(t,r,i||0,o||t.length-1,s||e)}function n(t,n,e){var r=t[n];t[n]=t[e],t[e]=r}function e(t,n){return tn?1:0}var r=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function i(t,n,e){if(!e)return n.indexOf(t);for(var r=0;r=t.minX&&n.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function p(n,e,r,i,o){for(var s=[e,r];s.length;)if(!((r=s.pop())-(e=s.pop())<=i)){var a=e+Math.ceil((r-e)/i/2)*i;t(n,a,e,r,o),s.push(e,a,a,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var n=this.data,e=[];if(!v(t,n))return e;for(var r=this.toBBox,i=[];n;){for(var o=0;o=0&&i[n].children.length>this._maxEntries;)this._split(i,n),n--;this._adjustParentBBoxes(r,i,n)},r.prototype._split=function(t,n){var e=t[n],r=e.children.length,i=this._minEntries;this._chooseSplitAxis(e,i,r);var s=this._chooseSplitIndex(e,i,r),a=d(e.children.splice(s,e.children.length-s));a.height=e.height,a.leaf=e.leaf,o(e,this.toBBox),o(a,this.toBBox),n?t[n-1].children.push(a):this._splitRoot(e,a)},r.prototype._splitRoot=function(t,n){this.data=d([t,n]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,n,e){for(var r,i,o,a,u,c,h,l=1/0,v=1/0,d=n;d<=e-n;d++){var p=s(t,0,d,this.toBBox),y=s(t,d,e,this.toBBox),m=(i=p,o=y,a=Math.max(i.minX,o.minX),u=Math.max(i.minY,o.minY),c=Math.min(i.maxX,o.maxX),h=Math.min(i.maxY,o.maxY),Math.max(0,c-a)*Math.max(0,h-u)),b=f(p)+f(y);m=n;v--){var d=t.children[v];a(u,t.leaf?i(d):d),c+=h(u)}return c},r.prototype._adjustParentBBoxes=function(t,n,e){for(var r=e;r>=0;r--)a(n[r],t)},r.prototype._condense=function(t){for(var n=t.length-1,e=void 0;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children).splice(e.indexOf(t[n]),1):this.clear():o(t[n],this.toBBox)},r},"object"==s(n)?t.exports=o():void 0===(i="function"==typeof(r=o)?r.call(n,e,n,t):r)||(t.exports=i)},6760:function(t,n,e){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=function(t){"use strict";var n,e=Object.prototype,i=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,n,e){return Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[n]}try{c({},"")}catch(t){c=function(t,n,e){return t[n]=e}}function f(t,n,e,r){var i=n&&n.prototype instanceof m?n:m,o=Object.create(i.prototype),s=new E(r||[]);return o._invoke=function(t,n,e){var r=l;return function(i,o){if(r===d)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw o;return C()}for(e.method=i,e.arg=o;;){var s=e.delegate;if(s){var a=j(s,e);if(a){if(a===y)continue;return a}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(r===l)throw r=p,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);r=d;var u=h(t,n,e);if("normal"===u.type){if(r=e.done?p:v,u.arg===y)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(r=p,e.method="throw",e.arg=u.arg)}}}(t,e,s),o}function h(t,n,e){try{return{type:"normal",arg:t.call(n,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var l="suspendedStart",v="suspendedYield",d="executing",p="completed",y={};function m(){}function b(){}function g(){}var w={};c(w,s,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(A([])));k&&k!==e&&i.call(k,s)&&(w=k);var _=g.prototype=m.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(n){c(t,n,(function(t){return this._invoke(n,t)}))}))}function M(t,n){function e(o,s,a,u){var c=h(t[o],t,s);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"===r(l)&&i.call(l,"__await")?n.resolve(l.__await).then((function(t){e("next",t,a,u)}),(function(t){e("throw",t,a,u)})):n.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return e("throw",t,a,u)}))}u(c.arg)}var o;this._invoke=function(t,r){function i(){return new n((function(n,i){e(t,r,n,i)}))}return o=o?o.then(i,i):i()}}function j(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,j(t,e),"throw"===e.method))return y;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var i=h(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,y;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,y):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,y)}function T(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function O(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function A(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var u=i.call(s,"catchLoc"),c=i.call(s,"finallyLoc");if(u&&c){if(this.prev=0;--e){var r=this.tryEntries[e];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev=0;--n){var e=this.tryEntries[n];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),O(e),y}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc===t){var r=e.completion;if("throw"===r.type){var i=r.arg;O(e)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:A(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),y}},t}("object"===r(t=e.nmd(t))?t.exports:{});try{regeneratorRuntime=i}catch(t){"object"===("undefined"==typeof globalThis?"undefined":r(globalThis))?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},2335:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.serialize=n.deserialize=n.registerSerializer=void 0;var r=e(9713),i=r.DefaultSerializer;n.registerSerializer=function(t){i=r.extendSerializer(i,t)},n.deserialize=function(t){return i.deserialize(t)},n.serialize=function(t){return i.serialize(t)}},769:function(t,n,e){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),i=this&&this.__exportStar||function(t,n){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(n,e)||r(n,t,e)};Object.defineProperty(n,"__esModule",{value:!0}),n.Transfer=n.DefaultSerializer=n.expose=n.registerSerializer=void 0;var o=e(2335);Object.defineProperty(n,"registerSerializer",{enumerable:!0,get:function(){return o.registerSerializer}}),i(e(2305),n);var s=e(1459);Object.defineProperty(n,"expose",{enumerable:!0,get:function(){return s.expose}});var a=e(9713);Object.defineProperty(n,"DefaultSerializer",{enumerable:!0,get:function(){return a.DefaultSerializer}});var u=e(6126);Object.defineProperty(n,"Transfer",{enumerable:!0,get:function(){return u.Transfer}})},406:function(t,n){"use strict";var e;function r(t){return(""+t).replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\/\/.+)?\/[^/]+(?:\?.*)?$/,"$1")+"/"}Object.defineProperty(n,"__esModule",{value:!0}),n.getBundleURL=n.getBaseURL=void 0,n.getBundleURL=function(){return e||(e=function(){try{throw new Error}catch(n){var t=(""+n.stack).match(/(https?|file|ftp|chrome-extension|moz-extension):\/\/[^)\n]+/g);if(t)return r(t[0])}return"/"}()),e},n.getBaseURL=r},4002:function(t,n,e){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,n){for(var e=0;e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,u=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return a=t.done,t},e:function(t){u=!0,s=t},f:function(){try{a||null==e.return||e.return()}finally{if(u)throw s}}}}function o(t,n){if(t){if("string"==typeof t)return s(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?s(t,n):void 0}}function s(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);et.length)&&(n=t.length);for(var e=0,r=new Array(n);e0&&void 0!==arguments[0]&&arguments[0];return s(this,void 0,void 0,regeneratorRuntime.mark((function n(){var e,r,i,o=this;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e=function(){return y(o.workers,(function(t){return t.runningTasks}))},r=[],i=this.eventObservable.subscribe((function(t){t.type===l.PoolEventType.taskFailed&&r.push(t.error)})),!(this.initErrors.length>0)){n.next=5;break}return n.abrupt("return",Promise.reject(this.initErrors[0]));case 5:if(!t||0!==this.taskQueue.length){n.next=9;break}return n.next=8,f.allSettled(e());case 8:return n.abrupt("return",r);case 9:return n.next=11,new Promise((function(t,n){var e=o.eventObservable.subscribe({next:function(n){n.type===l.PoolEventType.taskQueueDrained&&(e.unsubscribe(),t(void 0))},error:n})}));case 11:return n.next=13,f.allSettled(e());case 13:return i.unsubscribe(),n.abrupt("return",r);case 15:case"end":return n.stop()}}),n,this)})))}},{key:"completed",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return s(this,void 0,void 0,regeneratorRuntime.mark((function n(){var e,r,i,o=this;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e=this.settled(t),r=new Promise((function(t,n){var r=o.eventObservable.subscribe({next:function(i){i.type===l.PoolEventType.taskQueueDrained?(r.unsubscribe(),t(e)):i.type===l.PoolEventType.taskFailed&&(r.unsubscribe(),n(i.error))},error:n})})),n.next=4,Promise.race([e,r]);case 4:if(!((i=n.sent).length>0)){n.next=7;break}throw i[0];case 7:case"end":return n.stop()}}),n,this)})))}},{key:"events",value:function(){return this.eventObservable}},{key:"queue",value:function(t){var n=this,e=this.options.maxQueuedJobs,r=void 0===e?1/0:e;if(this.isClosing)throw Error("Cannot schedule pool tasks after terminate() has been called.");if(this.initErrors.length>0)throw this.initErrors[0];var i=this.nextTaskID++,o=this.taskCompletion(i);o.catch((function(t){n.debug("Task #".concat(i," errored:"),t)}));var s={id:i,run:t,cancel:function(){-1!==n.taskQueue.indexOf(s)&&(n.taskQueue=n.taskQueue.filter((function(t){return t!==s})),n.eventSubject.next({type:l.PoolEventType.taskCanceled,taskID:s.id}))},then:o.then.bind(o)};if(this.taskQueue.length>=r)throw Error("Maximum number of pool tasks queued. Refusing to queue another one.\nThis usually happens for one of two reasons: We are either at peak workload right now or some tasks just won't finish, thus blocking the pool.");return this.debug("Queueing task #".concat(s.id,"...")),this.taskQueue.push(s),this.eventSubject.next({type:l.PoolEventType.taskQueued,taskID:s.id}),this.scheduleWork(),s}},{key:"terminate",value:function(t){return s(this,void 0,void 0,regeneratorRuntime.mark((function n(){var e=this;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.isClosing=!0,t){n.next=4;break}return n.next=4,this.completed(!0);case 4:return this.eventSubject.next({type:l.PoolEventType.terminated,remainingQueue:i(this.taskQueue)}),this.eventSubject.complete(),n.next=8,Promise.all(this.workers.map((function(t){return s(e,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=v.Thread,n.next=3,t.init;case 3:return n.t1=n.sent,n.abrupt("return",n.t0.terminate.call(n.t0,n.t1));case 5:case"end":return n.stop()}}),n)})))})));case 8:case"end":return n.stop()}}),n,this)})))}}])&&r(n.prototype,e),o&&r(n,o),t}();function b(t,n){return new m(t,n)}m.EventType=l.PoolEventType,b.EventType=l.PoolEventType,n.Pool=b},5441:function(t,n,e){"use strict";function r(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function i(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==e)return;var r,i,o=[],s=!0,a=!1;try{for(e=e.call(t);!(s=(r=e.next()).done)&&(o.push(r.value),!n||o.length!==n);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==e.return||e.return()}finally{if(a)throw i}}return o}(t,n)||function(t,n){if(!t)return;if("string"==typeof t)return o(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return o(t,n)}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,u=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return a=t.done,t},e:function(t){u=!0,s=t},f:function(){try{a||null==e.return||e.return()}finally{if(u)throw s}}}}function o(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);et.length)&&(n=t.length);for(var e=0,r=new Array(n);e]"),o);if(i&&console.log("start:",s),-1!==s){var a=t.slice(s+n.length),u=r(a,"[ /]"+n+">",0),c=-1===u;c&&(u=r(a,"[ /]>",0));var f=s+n.length+u+1+(c?0:n.length)+1;if(i&&console.log("end:",f),-1!==f){var h=t.slice(s,f);return{inner:c?null:h.slice(h.indexOf(">")+1,h.lastIndexOf("<")),outer:h,start:s,end:f}}}}},5051:function(t,n,e){var r=e(617);t.exports=function(t,n,e){for(var i,o=[],s=e&&e.debug||!1,a=e&&e.startIndex||0;i=r(t,n,{debug:s,startIndex:a});)a=i.end,o.push(i);return s&&console.log("findTagsByName found",o.length,"tags"),o}},5802:function(t){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t,e,r){var i=r&&r.debug||!1;i&&console.log("getting "+e+" in "+t);var o="object"===n(t)?t.outer:t,s="".concat(e,'\\="([^"]*)"');i&&console.log("pattern:",s);var a=new RegExp(s).exec(o);if(i&&console.log("match:",a),a)return a[1]}},9279:function(t){t.exports=function(t,n,e){var r=new RegExp(n).exec(t.slice(e));return r?e+r.index:-1}},8518:function(t){"use strict";t.exports=function(t){t.prototype[Symbol.iterator]=regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.head;case 1:if(!n){t.next=7;break}return t.next=4,n.value;case 4:n=n.next,t.next=1;break;case 7:case"end":return t.stop()}}),t,this)}))}},8692:function(t,n,e){"use strict";function r(t){var n=this;if(n instanceof r||(n=new r),n.tail=null,n.head=null,n.length=0,t&&"function"==typeof t.forEach)t.forEach((function(t){n.push(t)}));else if(arguments.length>0)for(var e=0,i=arguments.length;e1)e=n;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,e=this.head.value}for(var i=0;null!==r;i++)e=t(e,r.value,i),r=r.next;return e},r.prototype.reduceReverse=function(t,n){var e,r=this.tail;if(arguments.length>1)e=n;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,e=this.tail.value}for(var i=this.length-1;null!==r;i--)e=t(e,r.value,i),r=r.prev;return e},r.prototype.toArray=function(){for(var t=new Array(this.length),n=0,e=this.head;null!==e;n++)t[n]=e.value,e=e.next;return t},r.prototype.toArrayReverse=function(){for(var t=new Array(this.length),n=0,e=this.tail;null!==e;n++)t[n]=e.value,e=e.prev;return t},r.prototype.slice=function(t,n){(n=n||this.length)<0&&(n+=this.length),(t=t||0)<0&&(t+=this.length);var e=new r;if(nthis.length&&(n=this.length);for(var i=0,o=this.head;null!==o&&ithis.length&&(n=this.length);for(var i=this.length,o=this.tail;null!==o&&i>n;i--)o=o.prev;for(;null!==o&&i>t;i--,o=o.prev)e.push(o.value);return e},r.prototype.splice=function(t,n){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var e=0,r=this.head;null!==r&&e>1)],n))<0?s=r+1:(a=r,u=!i);return u?s:~s}function p(t,n){return t>n?1:t=0}function m(t,n,e){var r=t.length;if(t[0]<=n)return 0;if(n<=t[r-1])return r-1;var i=void 0;if(e>0){for(i=1;i0?i-1:i:t[i-1]-n>>0,i=0;i0||e&&0===o)}))}function S(){return!0}function M(){return!1}function j(){}function T(t){var n,e,r,i=!1;return function(){var o=Array.prototype.slice.call(arguments);return i&&this===r&&x(o,e)||(i=!0,r=this,e=o,n=t.apply(this,arguments)),n}}var O="function"==typeof Object.assign?Object.assign:function(t,n){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),r=1,i=arguments.length;r0)},n.prototype.removeEventListener=function(t,n){var e=this.T&&this.T[t];if(e){var r=e.indexOf(n);-1!==r&&(this._&&t in this._?(e[r]=j,++this._[t]):(e.splice(r,1),0===e.length&&delete this.T[t]))}},n}(v),P="change",D="error",N="clear",z="contextmenu",L="click",F="dblclick",G="dragenter",U="dragover",B="drop",q="keydown",$="keypress",V="load",Z="resize",W="touchmove",H="wheel";function K(t,n,e,r,i){if(r&&r!==t&&(e=e.bind(r)),i){var o=e;e=function(){t.removeEventListener(n,e),o.apply(this,arguments)}}var s={target:t,type:n,listener:e};return t.addEventListener(n,e),s}function X(t,n,e,r){return K(t,n,e,r,!0)}function Y(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),E(t))}var J=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Q=function(t){function n(){var n=t.call(this)||this;return n.on=n.onInternal,n.once=n.onceInternal,n.un=n.unInternal,n.O=0,n}return J(n,t),n.prototype.changed=function(){++this.O,this.dispatchEvent(P)},n.prototype.getRevision=function(){return this.O},n.prototype.onInternal=function(t,n){if(Array.isArray(t)){for(var e=t.length,r=new Array(e),i=0;i0;)this.pop()},n.prototype.extend=function(t){for(var n=0,e=t.length;nt)throw new Error("Tile load sequence violation");this.state=t,this.changed()},n.prototype.load=function(){r()},n.prototype.getAlpha=function(t,n){if(!this.G)return 1;var e=this.U[t];if(e){if(-1===e)return 1}else e=n,this.U[t]=e;var r=n-e+1e3/60;return r>=this.G?1:yt(r/this.G)},n.prototype.inTransition=function(t){return!!this.G&&-1!==this.U[t]},n.prototype.endTransition=function(t){this.G&&(this.U[t]=-1)},n}(I),kt=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),_t=function(t){function n(n){var e=this,r=ht;return(e=t.call(this,n.tileCoord,r,{transition:n.transition})||this).B=n.loader,e.q=null,e.V=null,e}return kt(n,t),n.prototype.getData=function(){return this.q},n.prototype.getError=function(){return this.V},n.prototype.load=function(){this.state=lt,this.changed();var t=this;this.B().then((function(n){t.q=n,t.state=vt,t.changed()})).catch((function(n){t.V=n,t.state=dt,t.changed()}))},n}(xt);function St(t,n){if(!t)throw new c(n)}var Mt=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function jt(t){return"function"==typeof t?t:(Array.isArray(t)?n=t:(St("function"==typeof t.getZIndex,41),n=[t]),function(){return n});var n}var Tt=function(t){function n(n){var e=t.call(this)||this;if(e.on,e.once,e.un,e.W=void 0,e.H="geometry",e.K=null,e.tt=void 0,e.nt=null,e.addChangeListener(e.H,e.et),n)if("function"==typeof n.getSimplifiedGeometry){var r=n;e.setGeometry(r)}else{var i=n;e.setProperties(i)}return e}return Mt(n,t),n.prototype.clone=function(){var t=new n(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());var e=this.getGeometry();e&&t.setGeometry(e.clone());var r=this.getStyle();return r&&t.setStyle(r),t},n.prototype.getGeometry=function(){return this.get(this.H)},n.prototype.getId=function(){return this.W},n.prototype.getGeometryName=function(){return this.H},n.prototype.getStyle=function(){return this.K},n.prototype.getStyleFunction=function(){return this.tt},n.prototype.rt=function(){this.changed()},n.prototype.et=function(){this.nt&&(Y(this.nt),this.nt=null);var t=this.getGeometry();t&&(this.nt=K(t,P,this.rt,this)),this.changed()},n.prototype.setGeometry=function(t){this.set(this.H,t)},n.prototype.setStyle=function(t){this.K=t,this.tt=t?jt(t):void 0,this.changed()},n.prototype.setId=function(t){this.W=t,this.changed()},n.prototype.setGeometryName=function(t){this.removeChangeListener(this.H,this.et),this.H=t,this.addChangeListener(this.H,this.et),this.et()},n}(it),Ot="XY",Et="XYZ",At="XYM",Ct="XYZM",Rt={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"},It={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},Pt={9001:It.METERS,9002:It.FEET,9003:It.USFEET,9101:It.RADIANS,9102:It.DEGREES};function Dt(t){return Pt[t]}var Nt={};Nt[It.RADIANS]=6370997/(2*Math.PI),Nt[It.DEGREES]=2*Math.PI*6370997/360,Nt[It.FEET]=.3048,Nt[It.METERS]=1,Nt[It.USFEET]=1200/3937;var zt,Lt=It,Ft="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",Gt=-1!==Ft.indexOf("firefox"),Ut=-1!==Ft.indexOf("safari")&&-1==Ft.indexOf("chrom"),Bt=-1!==Ft.indexOf("webkit")&&-1==Ft.indexOf("edge"),qt=-1!==Ft.indexOf("macintosh"),$t="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,Vt="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,Zt="undefined"!=typeof Image&&Image.prototype.decode,Wt=function(){var t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,n),window.removeEventListener("_",null,n)}catch(t){}return t}(),Ht=new Array(6);function Kt(){return[1,0,0,1,0,0]}function Xt(t){return Jt(t,1,0,0,1,0,0)}function Yt(t,n){var e=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=t[5],u=n[0],c=n[1],f=n[2],h=n[3],l=n[4],v=n[5];return t[0]=e*u+i*c,t[1]=r*u+o*c,t[2]=e*f+i*h,t[3]=r*f+o*h,t[4]=e*l+i*v+s,t[5]=r*l+o*v+a,t}function Jt(t,n,e,r,i,o,s){return t[0]=n,t[1]=e,t[2]=r,t[3]=i,t[4]=o,t[5]=s,t}function Qt(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t}function tn(t,n){var e=n[0],r=n[1];return n[0]=t[0]*e+t[2]*r+t[4],n[1]=t[1]*e+t[3]*r+t[5],n}function nn(t,n){var e=Math.cos(n),r=Math.sin(n);return Yt(t,Jt(Ht,e,r,-r,e,0,0))}function en(t,n,e){return Yt(t,Jt(Ht,n,0,0,e,0,0))}function rn(t,n,e){return Jt(t,n,0,0,e,0,0)}function on(t,n,e){return Yt(t,Jt(Ht,1,0,0,1,n,e))}function sn(t,n,e,r,i,o,s,a){var u=Math.sin(o),c=Math.cos(o);return t[0]=r*c,t[1]=i*u,t[2]=-r*u,t[3]=i*c,t[4]=s*r*c-a*r*u+n,t[5]=s*i*u+a*i*c+e,t}function an(t,n){var e=un(n);St(0!==e,32);var r=n[0],i=n[1],o=n[2],s=n[3],a=n[4],u=n[5];return t[0]=s/e,t[1]=-i/e,t[2]=-o/e,t[3]=r/e,t[4]=(o*u-s*a)/e,t[5]=-(r*u-i*a)/e,t}function un(t){return t[0]*t[3]-t[1]*t[2]}function cn(t){var n="matrix("+t.join(", ")+")";if(Vt)return n;var e=zt||(zt=document.createElement("div"));return e.style.transform=n,e.style.transform}var fn="bottom-left",hn="bottom-right",ln="top-left",vn="top-right",dn=0,pn=1,yn=2,mn=4,bn=8,gn=16;function wn(t){for(var n=On(),e=0,r=t.length;ei&&(u|=mn),ao&&(u|=yn),u===dn&&(u=pn),u}function On(){return[1/0,1/0,-1/0,-1/0]}function En(t,n,e,r,i){return i?(i[0]=t,i[1]=n,i[2]=e,i[3]=r,i):[t,n,e,r]}function An(t){return En(1/0,1/0,-1/0,-1/0,t)}function Cn(t,n){var e=t[0],r=t[1];return En(e,r,e,r,n)}function Rn(t,n,e,r,i){return Ln(An(i),t,n,e,r)}function In(t,n){return t[0]==n[0]&&t[2]==n[2]&&t[1]==n[1]&&t[3]==n[3]}function Pn(t,n,e){return Math.abs(t[0]-n[0])t[2]&&(t[2]=n[2]),n[1]t[3]&&(t[3]=n[3]),t}function Nn(t,n){n[0]t[2]&&(t[2]=n[0]),n[1]t[3]&&(t[3]=n[1])}function zn(t,n){for(var e=0,r=n.length;en[0]?r[0]=t[0]:r[0]=n[0],t[1]>n[1]?r[1]=t[1]:r[1]=n[1],t[2]=n[0]&&t[1]<=n[3]&&t[3]>=n[1]}function te(t){return t[2]=s&&p<=u),r||!(o&mn)||i&mn||(r=(y=v-(l-u)*d)>=a&&y<=c),r||!(o&bn)||i&bn||(r=(p=l-(v-a)/d)>=s&&p<=u),r||!(o&gn)||i&gn||(r=(y=v-(l-s)*d)>=a&&y<=c)}return r}function ie(t,n,e,r){var i=[];if(r>1)for(var o=t[2]-t[0],s=t[3]-t[1],a=0;a=e[2])){var i=Jn(e),o=Math.floor((r[0]-e[0])/i)*i;t[0]-=o,t[2]-=o}return t}var se=function(){function t(t){this.it=t.code,this.ot=t.units,this.st=void 0!==t.extent?t.extent:null,this.ut=void 0!==t.worldExtent?t.worldExtent:null,this.ct=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.ft=void 0!==t.global&&t.global,this.ht=!(!this.ft||!this.st),this.lt=t.getPointResolution,this.vt=null,this.dt=t.metersPerUnit}return t.prototype.canWrapX=function(){return this.ht},t.prototype.getCode=function(){return this.it},t.prototype.getExtent=function(){return this.st},t.prototype.getUnits=function(){return this.ot},t.prototype.getMetersPerUnit=function(){return this.dt||Nt[this.ot]},t.prototype.getWorldExtent=function(){return this.ut},t.prototype.getAxisOrientation=function(){return this.ct},t.prototype.isGlobal=function(){return this.ft},t.prototype.setGlobal=function(t){this.ft=t,this.ht=!(!t||!this.st)},t.prototype.getDefaultTileGrid=function(){return this.vt},t.prototype.setDefaultTileGrid=function(t){this.vt=t},t.prototype.setExtent=function(t){this.st=t,this.ht=!(!this.ft||!t)},t.prototype.setWorldExtent=function(t){this.ut=t},t.prototype.setGetPointResolution=function(t){this.lt=t},t.prototype.getPointResolutionFunc=function(){return this.lt},t}();function ae(t,n,e){return Math.min(Math.max(t,n),e)}var ue="cosh"in Math?Math.cosh:function(t){var n=Math.exp(t);return(n+1/n)/2},ce="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E};function fe(t,n,e,r,i,o){var s=i-e,a=o-r;if(0!==s||0!==a){var u=((t-e)*s+(n-r)*a)/(s*s+a*a);u>1?(e=i,r=o):u>0&&(e+=s*u,r+=a*u)}return he(t,n,e,r)}function he(t,n,e,r){var i=e-t,o=r-n;return i*i+o*o}function le(t){for(var n=t.length,e=0;ei&&(i=s,r=o)}if(0===i)return null;var a=t[r];t[r]=t[e],t[e]=a;for(var u=e+1;u=0;l--){h[l]=t[l][n]/t[l][l];for(var v=l-1;v>=0;v--)t[v][n]-=t[v][l]*h[l]}return h}function ve(t){return 180*t/Math.PI}function de(t){return t*Math.PI/180}function pe(t,n){var e=t%n;return e*n<0?e+n:e}function ye(t,n,e){return t+e*(n-t)}var me=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),be=6378137,ge=Math.PI*be,we=[-ge,-ge,ge,ge],xe=[-180,-85,180,85],ke=be*Math.log(Math.tan(Math.PI/2)),_e=function(t){function n(n){return t.call(this,{code:n,units:Lt.METERS,extent:we,global:!0,worldExtent:xe,getPointResolution:function(t,n){return t/ue(n[1]/be)}})||this}return me(n,t),n}(se),Se=[new _e("EPSG:3857"),new _e("EPSG:102100"),new _e("EPSG:102113"),new _e("EPSG:900913"),new _e("http://www.opengis.net/def/crs/EPSG/0/3857"),new _e("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Me(t,n,e){var r=t.length,i=e>1?e:2,o=n;void 0===o&&(o=i>2?t.slice():new Array(r));for(var s=0;ske?a=ke:a<-ke&&(a=-ke),o[s+1]=a}return o}function je(t,n,e){var r=t.length,i=e>1?e:2,o=n;void 0===o&&(o=i>2?t.slice():new Array(r));for(var s=0;sn?r:new Array(1+n-i).join("0")+r}function We(t,n){for(var e=(""+t).split("."),r=(""+n).split("."),i=0;is)return 1;if(s>o)return-1}return 0}function He(t,n){return t[0]+=+n[0],t[1]+=+n[1],t}function Ke(t,n){var e=n.getRadius(),r=n.getCenter(),i=r[0],o=r[1],s=t[0]-i,a=t[1]-o;0===s&&0===a&&(s=1);var u=Math.sqrt(s*s+a*a);return[i+e*s/u,o+e*a/u]}function Xe(t,n){var e,r,i=t[0],o=t[1],s=n[0],a=n[1],u=s[0],c=s[1],f=a[0],h=a[1],l=f-u,v=h-c,d=0===l&&0===v?0:(l*(i-u)+v*(o-c))/(l*l+v*v||0);return d<=0?(e=u,r=c):d>=1?(e=f,r=h):(e=u+d*l,r=c+d*v),[e,r]}function Ye(t,n,e){var r=pe(n+180,360)-180,i=Math.abs(3600*r),o=e||0,s=Math.pow(10,o),a=Math.floor(i/3600),u=Math.floor((i-3600*a)/60),c=i-3600*a-60*u;return(c=Math.ceil(c*s)/s)>=60&&(c=0,u+=1),u>=60&&(u=0,a+=1),a+"° "+Ze(u,2)+"′ "+Ze(c,2,o)+"″"+(0==r?"":" "+t.charAt(r<0?1:0))}function Je(t,n,e){return t?n.replace("{x}",t[0].toFixed(e)).replace("{y}",t[1].toFixed(e)):""}function Qe(t,n){for(var e=!0,r=t.length-1;r>=0;--r)if(t[r]!=n[r]){e=!1;break}return e}function tr(t,n){var e=Math.cos(n),r=Math.sin(n),i=t[0]*e-t[1]*r,o=t[1]*e+t[0]*r;return t[0]=i,t[1]=o,t}function nr(t,n){return t[0]*=n,t[1]*=n,t}function er(t,n){var e=t[0]-n[0],r=t[1]-n[1];return e*e+r*r}function rr(t,n){return Math.sqrt(er(t,n))}function ir(t,n){return er(t,Xe(t,n))}function or(t,n){return Je(t,"{x}, {y}",n)}function sr(t,n){if(n.canWrapX()){var e=Jn(n.getExtent()),r=ar(t,n,e);r&&(t[0]-=r*e)}return t}function ar(t,n,e){var r=n.getExtent(),i=0;if(n.canWrapX()&&(t[0]r[2])){var o=e||Jn(r);i=Math.floor((t[0]-r[0])/o)}return i}function ur(t,n,e){var r;if(void 0!==n){for(var i=0,o=t.length;i=2;--c)s[a+c]=n[a+c]}return s}}function br(t,n,e,r){var i=lr(t),o=lr(n);Fe(i,o,mr(e)),Fe(o,i,mr(r))}function gr(t,n){return _r(t,"EPSG:4326",void 0!==n?n:"EPSG:3857")}function wr(t,n){if(t===n)return!0;var e=t.getUnits()===n.getUnits();return(t.getCode()===n.getCode()||xr(t,n)===ur)&&e}function xr(t,n){var e=Ge(t.getCode(),n.getCode());return e||(e=cr),e}function kr(t,n){return xr(lr(t),lr(n))}function _r(t,n,e){return kr(n,e)(t,void 0,t.length)}function Sr(t,n,e,r){return ie(t,kr(n,e),void 0,r)}var Mr=null;function jr(t){Mr=lr(t)}function Tr(){return Mr}function Or(t,n){return Mr?_r(t,n,Mr):t}function Er(t,n){return Mr?_r(t,Mr,n):t}function Ar(t,n){return Mr?Sr(t,n,Mr):t}function Cr(t,n){return Mr?Sr(t,Mr,n):t}function Rr(t,n){if(!Mr)return t;var e=lr(n).getUnits(),r=Mr.getUnits();return e&&r?t*Nt[e]/Nt[r]:t}function Ir(t,n){if(!Mr)return t;var e=lr(n).getUnits(),r=Mr.getUnits();return e&&r?t*Nt[r]/Nt[e]:t}function Pr(t,n,e){return function(r){var i,o,s=r[0],a=r[1];if(t.canWrapX()){var u=t.getExtent(),c=Jn(u);(o=ar(r,t,c))&&(s-=o*c),s=ae(s,u[0],u[2]),a=ae(a,u[1],u[3]),i=e([s,a])}else i=e(r);return o&&n.canWrapX()&&(i[0]+=o*Jn(n.getExtent())),i}}function Dr(){dr(Se),dr(Re),pr(Re,Se,Me,je)}function Nr(t,n,e,r,i,o){for(var s=o||[],a=0,u=n;u1)a=e;else{if(l>0){for(var v=0;vi&&(i=c),o=a,s=u}return i}function Kr(t,n,e,r,i){for(var o=0,s=e.length;o0;){for(var h=c.pop(),l=c.pop(),v=0,d=t[l],p=t[l+1],y=t[h],m=t[h+1],b=l+r;bv&&(f=b,v=g)}v>i&&(u[(f-n)/r]=1,l+ri&&(o[s++]=c,o[s++]=f,a=c,u=f);return c==a&&f==u||(o[s++]=c,o[s++]=f),s}function ai(t,n){return n*Math.round(t/n)}function ui(t,n,e,r,i,o,s){if(n==e)return s;var a,u,c=ai(t[n],i),f=ai(t[n+1],i);n+=r,o[s++]=c,o[s++]=f;do{if(a=ai(t[n],i),u=ai(t[n+1],i),(n+=r)==e)return o[s++]=a,o[s++]=u,s}while(a==c&&u==f);for(;n0&&p>v)&&(d<0&&y0&&y>d)?(a=h,u=l):(o[s++]=a,o[s++]=u,c=a,f=u,a=h,u=l)}}return o[s++]=a,o[s++]=u,s}function ci(t,n,e,r,i,o,s,a){for(var u=0,c=e.length;uo&&(c-a)*(o-u)-(i-a)*(f-u)>0&&s++:f<=o&&(c-a)*(o-u)-(i-a)*(f-u)<0&&s--,a=c,u=f}return 0!==s}function _i(t,n,e,r,i,o){if(0===e.length)return!1;if(!ki(t,n,e[0],r,i,o))return!1;for(var s=1,a=e.length;sx&&_i(t,n,e,r,c=(f+h)/2,d)&&(w=c,x=k),f=h}return isNaN(w)&&(w=i[o]),s?(s.push(w,d,x),s):[w,d,x]}function ji(t,n,e,r,i){for(var o=[],s=0,a=e.length;s=i[0]&&o[2]<=i[2]||(o[1]>=i[1]&&o[3]<=i[3]||Ti(t,n,e,r,(function(t,n){return re(i,t,n)})))))}function Ei(t,n,e,r,i){for(var o=0,s=e.length;o0}function Di(t,n,e,r,i){for(var o=void 0!==i&&i,s=0,a=e.length;s0&&this.Ht[e+2]>t;)e-=3;var r=this.Ht[n+2]-this.Ht[e+2];if(r<1e3/60)return!1;var i=this.Ht[n]-this.Ht[e],o=this.Ht[n+1]-this.Ht[e+1];return this.Kt=Math.atan2(o,i),this.Xt=Math.sqrt(i*i+o*o)/r,this.Xt>this.Zt},t.prototype.getDistance=function(){return(this.Zt-this.Xt)/this.Vt},t.prototype.getAngle=function(){return this.Kt},t}(),Oo=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Eo=/^([a-z]*)$|^hsla?\(.*\)$/i;function Ao(t){return"string"==typeof t?t:Do(t)}function Co(t){var n=document.createElement("div");if(n.style.color=t,""!==n.style.color){document.body.appendChild(n);var e=getComputedStyle(n).color;return document.body.removeChild(n),e}return""}var Ro=function(){var t={},n=0;return function(e){var r;if(t.hasOwnProperty(e))r=t[e];else{if(n>=1024){var i=0;for(var o in t)0==(3&i++)&&(delete t[o],--n)}r=function(t){var n,e,r,i,o;Eo.exec(t)&&(t=Co(t));if(Oo.exec(t)){var s=t.length-1,a=void 0;a=s<=4?1:2;var u=4===s||8===s;n=parseInt(t.substr(1+0*a,a),16),e=parseInt(t.substr(1+1*a,a),16),r=parseInt(t.substr(1+2*a,a),16),i=u?parseInt(t.substr(1+3*a,a),16):255,1==a&&(n=(n<<4)+n,e=(e<<4)+e,r=(r<<4)+r,u&&(i=(i<<4)+i)),o=[n,e,r,i/255]}else 0==t.indexOf("rgba(")?Po(o=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((o=t.slice(4,-1).split(",").map(Number)).push(1),Po(o)):St(!1,14);return o}(e),t[e]=r,++n}return r}}();function Io(t){return Array.isArray(t)?t:Ro(t)}function Po(t){return t[0]=ae(t[0]+.5|0,0,255),t[1]=ae(t[1]+.5|0,0,255),t[2]=ae(t[2]+.5|0,0,255),t[3]=ae(t[3],0,1),t}function Do(t){var n=t[0];n!=(0|n)&&(n=n+.5|0);var e=t[1];e!=(0|e)&&(e=e+.5|0);var r=t[2];return r!=(0|r)&&(r=r+.5|0),"rgba("+n+","+e+","+r+","+(void 0===t[3]?1:t[3])+")"}function No(t){return Eo.test(t)&&(t=Co(t)),Oo.test(t)||0===t.indexOf("rgba(")||0===t.indexOf("rgb(")}var zo=function(){function t(){this.Yt={},this.Jt=0,this.Qt=32}return t.prototype.clear=function(){this.Yt={},this.Jt=0},t.prototype.canExpireCache=function(){return this.Jt>this.Qt},t.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var n in this.Yt){var e=this.Yt[n];0!=(3&t++)||e.hasListener()||(delete this.Yt[n],--this.Jt)}}},t.prototype.get=function(t,n,e){var r=Lo(t,n,e);return r in this.Yt?this.Yt[r]:null},t.prototype.set=function(t,n,e,r){var i=Lo(t,n,e);this.Yt[i]=r,++this.Jt},t.prototype.setSize=function(t){this.Qt=t,this.expire()},t}();function Lo(t,n,e){return n+":"+t+":"+(e?Ao(e):"null")}var Fo=zo,Go=new zo,Uo="opacity",Bo="visible",qo="extent",$o="zIndex",Vo="maxResolution",Zo="minResolution",Wo="maxZoom",Ho="minZoom",Ko="source";function Xo(t){return(Xo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Yo=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Jo=function(t){function n(n){var e=t.call(this)||this;e.on,e.once,e.un;var r=O({},n);return"object"===Xo(n.properties)&&(delete r.properties,O(r,n.properties)),r[Uo]=void 0!==n.opacity?n.opacity:1,St("number"==typeof r[Uo],64),r[Bo]=void 0===n.visible||n.visible,r[$o]=n.zIndex,r[Vo]=void 0!==n.maxResolution?n.maxResolution:1/0,r[Zo]=void 0!==n.minResolution?n.minResolution:0,r[Ho]=void 0!==n.minZoom?n.minZoom:-1/0,r[Wo]=void 0!==n.maxZoom?n.maxZoom:1/0,e.tn=void 0!==r.className?n.className:"ol-layer",delete r.className,e.setProperties(r),e.nn=null,e}return Yo(n,t),n.prototype.getClassName=function(){return this.tn},n.prototype.getLayerState=function(t){var n=this.nn||{layer:this,managed:void 0===t||t},e=this.getZIndex();return n.opacity=ae(Math.round(100*this.getOpacity())/100,0,1),n.sourceState=this.getSourceState(),n.visible=this.getVisible(),n.extent=this.getExtent(),n.zIndex=void 0!==e||n.managed?e:1/0,n.maxResolution=this.getMaxResolution(),n.minResolution=Math.max(this.getMinResolution(),0),n.minZoom=this.getMinZoom(),n.maxZoom=this.getMaxZoom(),this.nn=n,n},n.prototype.getLayersArray=function(t){return r()},n.prototype.getLayerStatesArray=function(t){return r()},n.prototype.getExtent=function(){return this.get(qo)},n.prototype.getMaxResolution=function(){return this.get(Vo)},n.prototype.getMinResolution=function(){return this.get(Zo)},n.prototype.getMinZoom=function(){return this.get(Ho)},n.prototype.getMaxZoom=function(){return this.get(Wo)},n.prototype.getOpacity=function(){return this.get(Uo)},n.prototype.getSourceState=function(){return r()},n.prototype.getVisible=function(){return this.get(Bo)},n.prototype.getZIndex=function(){return this.get($o)},n.prototype.setExtent=function(t){this.set(qo,t)},n.prototype.setMaxResolution=function(t){this.set(Vo,t)},n.prototype.setMinResolution=function(t){this.set(Zo,t)},n.prototype.setMaxZoom=function(t){this.set(Wo,t)},n.prototype.setMinZoom=function(t){this.set(Ho,t)},n.prototype.setOpacity=function(t){St("number"==typeof t,64),this.set(Uo,t)},n.prototype.setVisible=function(t){this.set(Bo,t)},n.prototype.setZIndex=function(t){this.set($o,t)},n.prototype.disposeInternal=function(){this.nn&&(this.nn.layer=null,this.nn=null),t.prototype.disposeInternal.call(this)},n}(it),Qo="prerender",ts="postrender",ns="precompose",es="postcompose",rs="rendercomplete",is="undefined",os="loading",ss="ready",as="error",us=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function cs(t,n){if(!t.visible)return!1;var e=n.resolution;if(e=t.maxResolution)return!1;var r=n.zoom;return r>t.minZoom&&r<=t.maxZoom}var fs=function(t){function n(n){var e=this,r=O({},n);delete r.source,(e=t.call(this,r)||this).on,e.once,e.un,e.en=null,e.rn=null,e.sn=null,e.an=null,n.render&&(e.render=n.render),n.map&&e.setMap(n.map),e.addChangeListener(Ko,e.cn);var i=n.source?n.source:null;return e.setSource(i),e}return us(n,t),n.prototype.getLayersArray=function(t){var n=t||[];return n.push(this),n},n.prototype.getLayerStatesArray=function(t){var n=t||[];return n.push(this.getLayerState()),n},n.prototype.getSource=function(){return this.get(Ko)||null},n.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():is},n.prototype.fn=function(){this.changed()},n.prototype.cn=function(){this.sn&&(Y(this.sn),this.sn=null);var t=this.getSource();t&&(this.sn=K(t,P,this.fn,this)),this.changed()},n.prototype.getFeatures=function(t){return this.an?this.an.getFeatures(t):new Promise((function(t){return t([])}))},n.prototype.render=function(t,n){var e=this.getRenderer();if(e.prepareFrame(t))return e.renderFrame(t,n)},n.prototype.setMap=function(t){this.en&&(Y(this.en),this.en=null),t||this.changed(),this.rn&&(Y(this.rn),this.rn=null),t&&(this.en=K(t,ns,(function(t){var n=t.frameState.layerStatesArray,e=this.getLayerState(!1);St(!n.some((function(t){return t.layer===e.layer})),67),n.push(e)}),this),this.rn=K(this,P,t.render,t),this.changed())},n.prototype.setSource=function(t){this.set(Ko,t)},n.prototype.getRenderer=function(){return this.an||(this.an=this.createRenderer()),this.an},n.prototype.hasRenderer=function(){return!!this.an},n.prototype.createRenderer=function(){return null},n.prototype.disposeInternal=function(){this.an&&(this.an.dispose(),delete this.an),this.setSource(null),t.prototype.disposeInternal.call(this)},n}(Jo),hs=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function ls(t,n){Go.expire()}var vs=function(t){function n(n){var e=t.call(this)||this;return e.hn=n,e}return hs(n,t),n.prototype.dispatchRenderEvent=function(t,n){r()},n.prototype.calculateMatrices2D=function(t){var n=t.viewState,e=t.coordinateToPixelTransform,r=t.pixelToCoordinateTransform;sn(e,t.size[0]/2,t.size[1]/2,1/n.resolution,-1/n.resolution,-n.rotation,-n.center[0],-n.center[1]),an(r,e)},n.prototype.forEachFeatureAtCoordinate=function(t,n,e,r,i,o,s,a){var u,c=n.viewState;function f(t,n,e,r){return i.call(o,n,t?e:null,r)}var h=c.projection,l=sr(t.slice(),h),v=[[0,0]];if(h.canWrapX()&&r){var d=Jn(h.getExtent());v.push([-d,0],[d,0])}for(var p=n.layerStatesArray,y=p.length,m=[],b=[],g=0;g=0;--w){var x=p[w],k=x.layer;if(k.hasRenderer()&&cs(x,c)&&s.call(a,k)){var _=k.getRenderer(),S=k.getSource();if(_&&S){var M=S.getWrapX()?l:t,j=f.bind(null,x.managed);b[0]=M[0]+v[g][0],b[1]=M[1]+v[g][1],u=_.forEachFeatureAtCoordinate(b,n,e,j,m)}if(u)return u}}if(0!==m.length){var T=1/m.length;return m.forEach((function(t,n){return t.distanceSq+=n*T})),m.sort((function(t,n){return t.distanceSq-n.distanceSq})),m.some((function(t){return u=t.callback(t.feature,t.layer,t.geometry)})),u}},n.prototype.forEachLayerAtPixel=function(t,n,e,i,o){return r()},n.prototype.hasFeatureAtCoordinate=function(t,n,e,r,i,o){return void 0!==this.forEachFeatureAtCoordinate(t,n,e,r,S,this,i,o)},n.prototype.getMap=function(){return this.hn},n.prototype.renderFrame=function(t){r()},n.prototype.scheduleExpireIconCache=function(t){Go.canExpireCache()&&t.postRenderFunctions.push(ls)},n}(v),ds=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),ps=function(t){function n(n,e,r,i){var o=t.call(this,n)||this;return o.inversePixelTransform=e,o.frameState=r,o.context=i,o}return ds(n,t),n}(h),ys="ol-hidden",ms="ol-selectable",bs="ol-unselectable",gs="ol-unsupported",ws="ol-control",xs="ol-collapsed",ks=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),_s=["style","variant","weight","size","lineHeight","family"],Ss=function(t){var n=t.match(ks);if(!n)return null;for(var e={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},r=0,i=_s.length;r=0;--o)r[o].renderDeclutter(t);So(this.dn,this.pn),this.dispatchRenderEvent(es,t),this.yn||(this.dn.style.display="",this.yn=!0),this.scheduleExpireIconCache(t)}else this.yn&&(this.dn.style.display="none",this.yn=!1)},n.prototype.forEachLayerAtPixel=function(t,n,e,r,i){for(var o=n.viewState,s=n.layerStatesArray,a=s.length-1;a>=0;--a){var u=s[a],c=u.layer;if(c.hasRenderer()&&cs(u,o)&&i(c)){var f=c.getRenderer().getDataAtPixel(t,n,e);if(f){var h=r(c,f);if(h)return h}}}},n}(vs),Ys=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Js="layers",Qs=function(t){function n(n){var e=this,r=n||{},i=O({},r);delete i.layers;var o=r.layers;return(e=t.call(this,i)||this).on,e.once,e.un,e.mn=[],e.bn={},e.addChangeListener(Js,e.gn),o?Array.isArray(o)?o=new ft(o.slice(),{unique:!0}):St("function"==typeof o.getArray,43):o=new ft(void 0,{unique:!0}),e.setLayers(o),e}return Ys(n,t),n.prototype.wn=function(){this.changed()},n.prototype.gn=function(){this.mn.forEach(Y),this.mn.length=0;var t=this.getLayers();for(var n in this.mn.push(K(t,ot,this.xn,this),K(t,st,this.kn,this)),this.bn)this.bn[n].forEach(Y);E(this.bn);for(var e=t.getArray(),r=0,i=e.length;rthis.En||Math.abs(t.clientY-this.An.clientY)>this.En},n.prototype.disposeInternal=function(){this.Nn&&(Y(this.Nn),this.Nn=null),this.dn.removeEventListener(W,this.Ln),this.In&&(Y(this.In),this.In=null),this.On.forEach(Y),this.On.length=0,this.dn=null,t.prototype.disposeInternal.call(this)},n}(I),ha="postrender",la="movestart",va="moveend",da="layergroup",pa="size",ya="target",ma="view",ba=1/0,ga=function(){function t(t,n){this.Zn=t,this.Wn=n,this.Hn=[],this.Kn=[],this.Xn={}}return t.prototype.clear=function(){this.Hn.length=0,this.Kn.length=0,E(this.Xn)},t.prototype.dequeue=function(){var t=this.Hn,n=this.Kn,e=t[0];1==t.length?(t.length=0,n.length=0):(t[0]=t.pop(),n[0]=n.pop(),this.Yn(0));var r=this.Wn(e);return delete this.Xn[r],e},t.prototype.enqueue=function(t){St(!(this.Wn(t)in this.Xn),31);var n=this.Zn(t);return n!=ba&&(this.Hn.push(t),this.Kn.push(n),this.Xn[this.Wn(t)]=!0,this.Jn(0,this.Hn.length-1),!0)},t.prototype.getCount=function(){return this.Hn.length},t.prototype.Qn=function(t){return 2*t+1},t.prototype.te=function(t){return 2*t+2},t.prototype.ne=function(t){return t-1>>1},t.prototype.ee=function(){var t;for(t=(this.Hn.length>>1)-1;t>=0;t--)this.Yn(t)},t.prototype.isEmpty=function(){return 0===this.Hn.length},t.prototype.isKeyQueued=function(t){return t in this.Xn},t.prototype.isQueued=function(t){return this.isKeyQueued(this.Wn(t))},t.prototype.Yn=function(t){for(var n=this.Hn,e=this.Kn,r=n.length,i=n[t],o=e[t],s=t;t>1;){var a=this.Qn(t),u=this.te(t),c=ut;){var s=this.ne(n);if(!(r[s]>o))break;e[n]=e[s],r[n]=r[s],n=s}e[n]=i,r[n]=o},t.prototype.reprioritize=function(){var t,n,e,r=this.Zn,i=this.Hn,o=this.Kn,s=0,a=i.length;for(n=0;n0;)r=(e=this.dequeue()[0]).getKey(),e.getState()!==ht||r in this.se||(this.se[r]=!0,++this.oe,++i,e.load())},n}(ga);function ka(t,n,e,r,i){if(!t||!(e in t.wantedTiles))return ba;if(!t.wantedTiles[e][n.getKey()])return ba;var o=t.viewState.center,s=r[0]-o[0],a=r[1]-o[1];return 65536*Math.log(i)+Math.sqrt(s*s+a*a)/i}var _a=0,Sa=1,Ma="center",ja="resolution",Ta="rotation",Oa=256;function Ea(t,n,e){return function(r,i,o,s,a){if(r){var u=n?0:o[0]*i,c=n?0:o[1]*i,f=a?a[0]:0,h=a?a[1]:0,l=t[0]+u/2+f,v=t[2]-u/2+f,d=t[1]+c/2+h,p=t[3]-c/2+h;l>v&&(v=l=(v+l)/2),d>p&&(p=d=(p+d)/2);var y=ae(r[0],l,v),m=ae(r[1],d,p),b=30*i;return s&&e&&(y+=-b*Math.log(1+Math.max(0,l-r[0])/b)+b*Math.log(1+Math.max(0,r[0]-v)/b),m+=-b*Math.log(1+Math.max(0,d-r[1])/b)+b*Math.log(1+Math.max(0,r[1]-p)/b)),[y,m]}}}function Aa(t){return t}function Ca(t,n,e,r){var i=Jn(n)/e[0],o=Hn(n)/e[1];return r?Math.min(t,Math.max(i,o)):Math.min(t,Math.min(i,o))}function Ra(t,n,e){var r=Math.min(t,n);return r*=Math.log(1+50*Math.max(0,t/n-1))/50+1,e&&(r=Math.max(r,e),r/=Math.log(1+50*Math.max(0,e/t-1))/50+1),ae(r,e/2,2*n)}function Ia(t,n,e,r){return function(i,o,s,a){if(void 0!==i){var u=t[0],c=t[t.length-1],f=e?Ca(u,e,s,r):u;if(a)return void 0===n||n?Ra(i,f,c):ae(i,c,f);var h=Math.min(f,i),l=Math.floor(m(t,h,o));return t[l]>f&&l1&&"function"==typeof arguments[e-1]&&(n=arguments[e-1],--e);for(var r=0;r0},n.prototype.getInteracting=function(){return this.ae[Sa]>0},n.prototype.cancelAnimations=function(){var t;this.setHint(_a,-this.ae[_a]);for(var n=0,e=this.ue.length;n=0;--e){for(var r=this.ue[e],i=!0,o=0,s=r.length;o0?u/a.duration:1;c>=1?(a.complete=!0,c=1):i=!1;var f=a.easing(c);if(a.sourceCenter){var h=a.sourceCenter[0],l=a.sourceCenter[1],v=a.targetCenter[0],d=a.targetCenter[1];this.pe=a.targetCenter;var p=h+f*(v-h),y=l+f*(d-l);this.le=[p,y]}if(a.sourceResolution&&a.targetResolution){var m=1===f?a.targetResolution:a.sourceResolution+f*(a.targetResolution-a.sourceResolution);if(a.anchor){var b=this.Ae(this.getRotation()),g=this.je.resolution(m,0,b,!0);this.le=this.calculateCenterZoom(g,a.anchor)}this.ye=a.targetResolution,this.ve=m,this.Ce(!0)}if(void 0!==a.sourceRotation&&void 0!==a.targetRotation){var w=1===f?pe(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+f*(a.targetRotation-a.sourceRotation);if(a.anchor){var x=this.je.rotation(w,!0);this.le=this.calculateCenterRotate(x,a.anchor)}this.me=a.targetRotation,this.de=w}if(this.Ce(!0),n=!0,!a.complete)break}}if(i){this.ue[e]=null,this.setHint(_a,-1),this.pe=null,this.ye=NaN,this.me=NaN;var k=r[0].callback;k&&Ua(k,!0)}}this.ue=this.ue.filter(Boolean),n&&void 0===this.ce&&(this.ce=requestAnimationFrame(this.Ee.bind(this)))}},n.prototype.calculateCenterRotate=function(t,n){var e,r=this.getCenterInternal();return void 0!==r&&(tr(e=[r[0]-n[0],r[1]-n[1]],t-this.getRotation()),He(e,n)),e},n.prototype.calculateCenterZoom=function(t,n){var e,r=this.getCenterInternal(),i=this.getResolution();void 0!==r&&void 0!==i&&(e=[n[0]-t*(n[0]-r[0])/i,n[1]-t*(n[1]-r[1])/i]);return e},n.prototype.Ae=function(t){var n=this.he;if(t){var e=n[0],r=n[1];return[Math.abs(e*Math.cos(t))+Math.abs(r*Math.sin(t)),Math.abs(e*Math.sin(t))+Math.abs(r*Math.cos(t))]}return n},n.prototype.setViewportSize=function(t){this.he=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},n.prototype.getCenter=function(){var t=this.getCenterInternal();return t?Or(t,this.getProjection()):t},n.prototype.getCenterInternal=function(){return this.get(Ma)},n.prototype.getConstraints=function(){return this.je},n.prototype.getConstrainResolution=function(){return this.Te.constrainResolution},n.prototype.getHints=function(t){return void 0!==t?(t[0]=this.ae[0],t[1]=this.ae[1],t):this.ae.slice()},n.prototype.calculateExtent=function(t){return Ar(this.calculateExtentInternal(t),this.getProjection())},n.prototype.calculateExtentInternal=function(t){var n=t||this.Re(),e=this.getCenterInternal();St(e,1);var r=this.getResolution();St(void 0!==r,2);var i=this.getRotation();return St(void 0!==i,3),Wn(e,r,i,n)},n.prototype.getMaxResolution=function(){return this.we},n.prototype.getMinResolution=function(){return this.xe},n.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.xe)},n.prototype.setMaxZoom=function(t){this.ge(this.Oe({maxZoom:t}))},n.prototype.getMinZoom=function(){return this.getZoomForResolution(this.we)},n.prototype.setMinZoom=function(t){this.ge(this.Oe({minZoom:t}))},n.prototype.setConstrainResolution=function(t){this.ge(this.Oe({constrainResolution:t}))},n.prototype.getProjection=function(){return this.fe},n.prototype.getResolution=function(){return this.get(ja)},n.prototype.getResolutions=function(){return this._e},n.prototype.getResolutionForExtent=function(t,n){return this.getResolutionForExtentInternal(Cr(t,this.getProjection()),n)},n.prototype.getResolutionForExtentInternal=function(t,n){var e=n||this.Re(),r=Jn(t)/e[0],i=Hn(t)/e[1];return Math.max(r,i)},n.prototype.getResolutionForValueFunction=function(t){var n=t||2,e=this.getConstrainedResolution(this.we),r=this.xe,i=Math.log(e/r)/Math.log(n);return function(t){return e/Math.pow(n,t*i)}},n.prototype.getRotation=function(){return this.get(Ta)},n.prototype.getValueForResolutionFunction=function(t){var n=Math.log(t||2),e=this.getConstrainedResolution(this.we),r=this.xe,i=Math.log(e/r)/n;return function(t){return Math.log(e/t)/n/i}},n.prototype.Re=function(t){var n=this.Ae(t),e=this.Se;return e&&(n=[n[0]-e[1]-e[3],n[1]-e[0]-e[2]]),n},n.prototype.getState=function(){var t=this.getProjection(),n=this.getResolution(),e=this.getRotation(),r=this.getCenterInternal(),i=this.Se;if(i){var o=this.Re();r=Za(r,this.Ae(),[o[0]/2+i[3],o[1]/2+i[0]],n,e)}return{center:r.slice(0),projection:void 0!==t?t:null,resolution:n,nextCenter:this.pe,nextResolution:this.ye,nextRotation:this.me,rotation:e,zoom:this.getZoom()}},n.prototype.getZoom=function(){var t,n=this.getResolution();return void 0!==n&&(t=this.getZoomForResolution(n)),t},n.prototype.getZoomForResolution=function(t){var n,e,r=this.Me||0;if(this._e){var i=m(this._e,t,1);r=i,n=this._e[i],e=i==this._e.length-1?2:n/this._e[i+1]}else n=this.we,e=this.ke;return r+Math.log(n/t)/Math.log(e)},n.prototype.getResolutionForZoom=function(t){if(this._e){if(this._e.length<=1)return 0;var n=ae(Math.floor(t),0,this._e.length-2),e=this._e[n]/this._e[n+1];return this._e[n]/Math.pow(e,ae(t-n,0,1))}return this.we/Math.pow(this.ke,t-this.Me)},n.prototype.fit=function(t,n){var e;if(St(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))St(!te(t),25),e=qi(r=Cr(t,this.getProjection()));else if(t.getType()===Rt.CIRCLE){var r;(e=qi(r=Cr(t.getExtent(),this.getProjection()))).rotate(this.getRotation(),Vn(r))}else{var i=Tr();e=i?t.clone().transform(i,this.getProjection()):t}this.fitInternal(e,n)},n.prototype.rotatedExtentForGeometry=function(t){for(var n=this.getRotation(),e=Math.cos(n),r=Math.sin(-n),i=t.getFlatCoordinates(),o=t.getStride(),s=1/0,a=1/0,u=-1/0,c=-1/0,f=0,h=i.length;f0&&t[1]>0}function Xa(t,n,e){return void 0===e&&(e=[0,0]),e[0]=t[0]*n+.5|0,e[1]=t[1]*n+.5|0,e}function Ya(t,n){return Array.isArray(t)?t:(void 0===n?n=[t,t]:(n[0]=t,n[1]=t),n)}var Ja=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();var Qa=function(t){function n(n){var e=t.call(this)||this;e.on,e.once,e.un;var r=function(t){var n=null;void 0!==t.keyboardEventTarget&&(n="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var e,r,i,o={},s=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new Qs({layers:t.layers});o[da]=s,o[ya]=t.target,o[ma]=t.view instanceof Wa?t.view:new Wa,void 0!==t.controls&&(Array.isArray(t.controls)?e=new ft(t.controls.slice()):(St("function"==typeof t.controls.getArray,47),e=t.controls));void 0!==t.interactions&&(Array.isArray(t.interactions)?r=new ft(t.interactions.slice()):(St("function"==typeof t.interactions.getArray,48),r=t.interactions));void 0!==t.overlays?Array.isArray(t.overlays)?i=new ft(t.overlays.slice()):(St("function"==typeof t.overlays.getArray,49),i=t.overlays):i=new ft;return{controls:e,interactions:r,keyboardEventTarget:n,overlays:i,values:o}}(n);e.Pe=e.handleBrowserEvent.bind(e),e.De=void 0!==n.maxTilesLoading?n.maxTilesLoading:16,e.Rt=void 0!==n.pixelRatio?n.pixelRatio:$t,e.Ne,e.ze,e.Le=function(){this.ze=void 0,this.Fe(Date.now())}.bind(e),e.Ge=[1,0,0,1,0,0],e.Ue=[1,0,0,1,0,0],e.Be=0,e.qe=null,e.$e=null,e.Ve=null,e.Ze=null,e.We=null,e.He=document.createElement("div"),e.He.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),e.He.style.position="relative",e.He.style.overflow="hidden",e.He.style.width="100%",e.He.style.height="100%",e.Ke=document.createElement("div"),e.Ke.style.position="absolute",e.Ke.style.zIndex="0",e.Ke.style.width="100%",e.Ke.style.height="100%",e.Ke.style.pointerEvents="none",e.Ke.className="ol-overlaycontainer",e.He.appendChild(e.Ke),e.Xe=document.createElement("div"),e.Xe.style.position="absolute",e.Xe.style.zIndex="0",e.Xe.style.width="100%",e.Xe.style.height="100%",e.Xe.style.pointerEvents="none",e.Xe.className="ol-overlaycontainer-stopevent",e.He.appendChild(e.Xe),e.Ye=null,e.En=n.moveTolerance,e.Je=r.keyboardEventTarget,e.Qe=null,e.controls=r.controls||new ft,e.interactions=r.interactions||new ft,e.tr=r.overlays,e.nr={},e.an=null,e.er,e.rr=[],e.ir=new xa(e.getTilePriority.bind(e),e.sr.bind(e)),e.addChangeListener(da,e.ar),e.addChangeListener(ma,e.ur),e.addChangeListener(pa,e.cr),e.addChangeListener(ya,e.hr),e.setProperties(r.values);var i=e;return!n.view||n.view instanceof Wa||n.view.then((function(t){i.setView(new Wa(t))})),e.controls.addEventListener(ot,function(t){t.element.setMap(this)}.bind(e)),e.controls.addEventListener(st,function(t){t.element.setMap(null)}.bind(e)),e.interactions.addEventListener(ot,function(t){t.element.setMap(this)}.bind(e)),e.interactions.addEventListener(st,function(t){t.element.setMap(null)}.bind(e)),e.tr.addEventListener(ot,function(t){this.lr(t.element)}.bind(e)),e.tr.addEventListener(st,function(t){var n=t.element.getId();void 0!==n&&delete this.nr[n.toString()],t.element.setMap(null)}.bind(e)),e.controls.forEach(function(t){t.setMap(this)}.bind(e)),e.interactions.forEach(function(t){t.setMap(this)}.bind(e)),e.tr.forEach(e.lr.bind(e)),e}return Ja(n,t),n.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},n.prototype.addControl=function(t){this.getControls().push(t)},n.prototype.addInteraction=function(t){this.getInteractions().push(t)},n.prototype.addLayer=function(t){this.getLayerGroup().getLayers().push(t)},n.prototype.addOverlay=function(t){this.getOverlays().push(t)},n.prototype.lr=function(t){var n=t.getId();void 0!==n&&(this.nr[n.toString()]=t),t.setMap(this)},n.prototype.disposeInternal=function(){this.setTarget(null),t.prototype.disposeInternal.call(this)},n.prototype.forEachFeatureAtPixel=function(t,n,e){if(this.qe){var r=this.getCoordinateFromPixelInternal(t),i=void 0!==(e=void 0!==e?e:{}).hitTolerance?e.hitTolerance:0,o=void 0!==e.layerFilter?e.layerFilter:S,s=!1!==e.checkWrapped;return this.an.forEachFeatureAtCoordinate(r,this.qe,i,s,n,null,o,null)}},n.prototype.getFeaturesAtPixel=function(t,n){var e=[];return this.forEachFeatureAtPixel(t,(function(t){e.push(t)}),n),e},n.prototype.forEachLayerAtPixel=function(t,n,e){if(this.qe){var r=e||{},i=void 0!==r.hitTolerance?r.hitTolerance:0,o=r.layerFilter||S;return this.an.forEachLayerAtPixel(t,this.qe,i,n,o)}},n.prototype.hasFeatureAtPixel=function(t,n){if(!this.qe)return!1;var e=this.getCoordinateFromPixelInternal(t),r=void 0!==(n=void 0!==n?n:{}).layerFilter?n.layerFilter:S,i=void 0!==n.hitTolerance?n.hitTolerance:0,o=!1!==n.checkWrapped;return this.an.hasFeatureAtCoordinate(e,this.qe,i,o,r,null)},n.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},n.prototype.getEventCoordinateInternal=function(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))},n.prototype.getEventPixel=function(t){var n=this.He.getBoundingClientRect(),e="changedTouches"in t?t.changedTouches[0]:t;return[e.clientX-n.left,e.clientY-n.top]},n.prototype.getTarget=function(){return this.get(ya)},n.prototype.getTargetElement=function(){var t=this.getTarget();return void 0!==t?"string"==typeof t?document.getElementById(t):t:null},n.prototype.getCoordinateFromPixel=function(t){return Or(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},n.prototype.getCoordinateFromPixelInternal=function(t){var n=this.qe;return n?tn(n.pixelToCoordinateTransform,t.slice()):null},n.prototype.getControls=function(){return this.controls},n.prototype.getOverlays=function(){return this.tr},n.prototype.getOverlayById=function(t){var n=this.nr[t.toString()];return void 0!==n?n:null},n.prototype.getInteractions=function(){return this.interactions},n.prototype.getLayerGroup=function(){return this.get(da)},n.prototype.setLayers=function(t){var n=this.getLayerGroup();if(t instanceof ft)n.setLayers(t);else{var e=n.getLayers();e.clear(),e.extend(t)}},n.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},n.prototype.getLoading=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),n=0,e=t.length;n=0;a--){var u=s[a];if(u.getMap()===this&&u.getActive()&&this.getTargetElement())if(!u.handleEvent(t)||t.propagationStopped)break}}},n.prototype.handlePostRender=function(){var t=this.qe,n=this.ir;if(!n.isEmpty()){var e=this.De,r=e;if(t){var i=t.viewHints;if(i[_a]||i[Sa]){var o=Date.now()-t.time>8;e=o?0:8,r=o?0:2}}n.getTilesLoading()0;if(this.yn!=e&&(this.element.style.display=e?"":"none",this.yn=e),!x(n,this.jr)){_o(this.yr);for(var r=0,i=n.length;r0&&n%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.Rr,easing:mt}):t.setRotation(0))}},n.prototype.render=function(t){var n=t.frameState;if(n){var e=n.viewState.rotation;if(e!=this.Pr){var r="rotate("+e+"rad)";if(this.Ir){var i=this.element.classList.contains(ys);i||0!==e?i&&0!==e&&this.element.classList.remove(ys):this.element.classList.add(ys)}this._r.style.transform=r}this.Pr=e}},n}(nu),su=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),au=function(t){function n(n){var e=this,r=n||{};e=t.call(this,{element:document.createElement("div"),target:r.target})||this;var i=void 0!==r.className?r.className:"ol-zoom",o=void 0!==r.delta?r.delta:1,s=void 0!==r.zoomInClassName?r.zoomInClassName:i+"-in",a=void 0!==r.zoomOutClassName?r.zoomOutClassName:i+"-out",u=void 0!==r.zoomInLabel?r.zoomInLabel:"+",c=void 0!==r.zoomOutLabel?r.zoomOutLabel:"–",f=void 0!==r.zoomInTipLabel?r.zoomInTipLabel:"Zoom in",h=void 0!==r.zoomOutTipLabel?r.zoomOutTipLabel:"Zoom out",l=document.createElement("button");l.className=s,l.setAttribute("type","button"),l.title=f,l.appendChild("string"==typeof u?document.createTextNode(u):u),l.addEventListener(L,e.Mr.bind(e,o),!1);var v=document.createElement("button");v.className=a,v.setAttribute("type","button"),v.title=h,v.appendChild("string"==typeof c?document.createTextNode(c):c),v.addEventListener(L,e.Mr.bind(e,-o),!1);var d=i+" "+"ol-unselectable "+ws,p=e.element;return p.className=d,p.appendChild(l),p.appendChild(v),e.Rr=void 0!==r.duration?r.duration:250,e}return su(n,t),n.prototype.Mr=function(t,n){n.preventDefault(),this.Nr(t)},n.prototype.Nr=function(t){var n=this.getMap().getView();if(n){var e=n.getZoom();if(void 0!==e){var r=n.getConstrainedZoom(e+t);this.Rr>0?(n.getAnimating()&&n.cancelAnimations(),n.animate({zoom:r,duration:this.Rr,easing:mt})):n.setZoom(r)}}},n}(nu);function uu(t){var n=t||{},e=new ft;return(void 0===n.zoom||n.zoom)&&e.push(new au(n.zoomOptions)),(void 0===n.rotate||n.rotate)&&e.push(new ou(n.rotateOptions)),(void 0===n.attribution||n.attribution)&&e.push(new ru(n.attributionOptions)),e}var cu="active",fu=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function hu(t,n,e){var r=t.getCenterInternal();if(r){var i=[r[0]+n[0],r[1]+n[1]];t.animateInternal({duration:void 0!==e?e:250,easing:gt,center:t.getConstrainedCenter(i)})}}function lu(t,n,e,r){var i=t.getZoom();if(void 0!==i){var o=t.getConstrainedZoom(i+n),s=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:s,anchor:e,duration:void 0!==r?r:250,easing:mt})}}var vu=function(t){function n(n){var e=t.call(this)||this;return e.on,e.once,e.un,n&&n.handleEvent&&(e.handleEvent=n.handleEvent),e.hn=null,e.setActive(!0),e}return fu(n,t),n.prototype.getActive=function(){return this.get(cu)},n.prototype.getMap=function(){return this.hn},n.prototype.handleEvent=function(t){return!0},n.prototype.setActive=function(t){this.set(cu,t)},n.prototype.setMap=function(t){this.hn=t},n}(it),du=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),pu=function(t){function n(n){var e=t.call(this)||this,r=n||{};return e.zr=r.delta?r.delta:1,e.Rr=void 0!==r.duration?r.duration:250,e}return du(n,t),n.prototype.handleEvent=function(t){var n=!1;if(t.type==ia.DBLCLICK){var e=t.originalEvent,r=t.map,i=t.coordinate,o=e.shiftKey?-this.zr:this.zr;lu(r.getView(),o,i,this.Rr),e.preventDefault(),n=!0}return!n},n}(vu),yu=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function mu(t){for(var n=t.length,e=0,r=0,i=0;i0}}else if(t.type==ia.POINTERDOWN){var r=this.handleDownEvent(t);this.handlingDownUpSequence=r,n=this.stopDown(r)}else t.type==ia.POINTERMOVE&&this.handleMoveEvent(t);return!n},n.prototype.handleMoveEvent=function(t){},n.prototype.handleUpEvent=function(t){return!1},n.prototype.stopDown=function(t){return t},n.prototype.Fr=function(t){if(function(t){var n=t.type;return n===ia.POINTERDOWN||n===ia.POINTERDRAG||n===ia.POINTERUP}(t)){var n=t.originalEvent,e=n.pointerId.toString();t.type==ia.POINTERUP?delete this.Lr[e]:(t.type==ia.POINTERDOWN||e in this.Lr)&&(this.Lr[e]=n),this.targetPointers=A(this.Lr)}},n}(vu);function gu(t){var n=arguments;return function(t){for(var e=!0,r=0,i=n.length;r0&&this.qr(t)){var n=t.map.getView();return this.lastCentroid=null,n.getAnimating()&&n.cancelAnimations(),this.Gr&&this.Gr.begin(),this.$r=this.targetPointers.length>1,!0}return!1},n}(bu),Du=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Nu=function(t){function n(n){var e=this,r=n||{};return(e=t.call(this,{stopDown:M})||this).qr=r.condition?r.condition:xu,e.Vr=void 0,e.Rr=void 0!==r.duration?r.duration:250,e}return Du(n,t),n.prototype.handleDragEvent=function(t){if(Cu(t)){var n=t.map,e=n.getView();if(e.getConstraints().rotation!==Na){var r=n.getSize(),i=t.pixel,o=Math.atan2(r[1]/2-i[1],i[0]-r[0]/2);if(void 0!==this.Vr){var s=o-this.Vr;e.adjustRotationInternal(-s)}this.Vr=o}}},n.prototype.handleUpEvent=function(t){return!Cu(t)||(t.map.getView().endInteraction(this.Rr),!1)},n.prototype.handleDownEvent=function(t){return!!Cu(t)&&(!(!Mu(t)||!this.qr(t))&&(t.map.getView().beginInteraction(),this.Vr=void 0,!0))},n}(bu),zu=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Lu=function(t){function n(n){var e=t.call(this)||this;return e.Zr=null,e.dn=document.createElement("div"),e.dn.style.position="absolute",e.dn.style.pointerEvents="auto",e.dn.className="ol-box "+n,e.hn=null,e.Wr=null,e.Hr=null,e}return zu(n,t),n.prototype.disposeInternal=function(){this.setMap(null)},n.prototype.Kr=function(){var t=this.Wr,n=this.Hr,e="px",r=this.dn.style;r.left=Math.min(t[0],n[0])+e,r.top=Math.min(t[1],n[1])+e,r.width=Math.abs(n[0]-t[0])+e,r.height=Math.abs(n[1]-t[1])+e},n.prototype.setMap=function(t){if(this.hn){this.hn.getOverlayContainer().removeChild(this.dn);var n=this.dn.style;n.left="inherit",n.top="inherit",n.width="inherit",n.height="inherit"}this.hn=t,this.hn&&this.hn.getOverlayContainer().appendChild(this.dn)},n.prototype.setPixels=function(t,n){this.Wr=t,this.Hr=n,this.createOrUpdateGeometry(),this.Kr()},n.prototype.createOrUpdateGeometry=function(){var t=this.Wr,n=this.Hr,e=[t,[t[0],n[1]],n,[n[0],t[1]]].map(this.hn.getCoordinateFromPixelInternal,this.hn);e[4]=e[0].slice(),this.Zr?this.Zr.setCoordinates([e]):this.Zr=new Ui([e])},n.prototype.getGeometry=function(){return this.Zr},n}(v),Fu=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Gu="boxstart",Uu="boxdrag",Bu="boxend",qu="boxcancel",$u=function(t){function n(n,e,r){var i=t.call(this,n)||this;return i.coordinate=e,i.mapBrowserEvent=r,i}return Fu(n,t),n}(h),Vu=function(t){function n(n){var e=t.call(this)||this;e.on,e.once,e.un;var r=n||{};return e.Xr=new Lu(r.className||"ol-dragbox"),e.Yr=void 0!==r.minArea?r.minArea:64,r.onBoxEnd&&(e.onBoxEnd=r.onBoxEnd),e.Wr=null,e.qr=r.condition?r.condition:Mu,e.Jr=r.boxEndCondition?r.boxEndCondition:e.defaultBoxEndCondition,e}return Fu(n,t),n.prototype.defaultBoxEndCondition=function(t,n,e){var r=e[0]-n[0],i=e[1]-n[1];return r*r+i*i>=this.Yr},n.prototype.getGeometry=function(){return this.Xr.getGeometry()},n.prototype.handleDragEvent=function(t){this.Xr.setPixels(this.Wr,t.pixel),this.dispatchEvent(new $u(Uu,t.coordinate,t))},n.prototype.handleUpEvent=function(t){this.Xr.setMap(null);var n=this.Jr(t,this.Wr,t.pixel);return n&&this.onBoxEnd(t),this.dispatchEvent(new $u(n?Bu:qu,t.coordinate,t)),!1},n.prototype.handleDownEvent=function(t){return!!this.qr(t)&&(this.Wr=t.pixel,this.Xr.setMap(t.map),this.Xr.setPixels(this.Wr,this.Wr),this.dispatchEvent(new $u(Gu,t.coordinate,t)),!0)},n.prototype.onBoxEnd=function(t){},n}(bu),Zu=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Wu=function(t){function n(n){var e=this,r=n||{},i=r.condition?r.condition:Eu;return(e=t.call(this,{condition:i,className:r.className||"ol-dragzoom",minArea:r.minArea})||this).Rr=void 0!==r.duration?r.duration:200,e.Qr=void 0!==r.out&&r.out,e}return Zu(n,t),n.prototype.onBoxEnd=function(t){var n=this.getMap().getView(),e=this.getGeometry();if(this.Qr){var r=n.rotatedExtentForGeometry(e),i=n.getResolutionForExtentInternal(r),o=n.getResolution()/i;(e=e.clone()).scale(o*o)}n.fitInternal(e,{duration:this.Rr,easing:mt})},n}(Vu),Hu=37,Ku=38,Xu=39,Yu=40,Ju=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Qu=function(t){function n(n){var e=t.call(this)||this,r=n||{};return e.ti=function(t){return Ou(t)&&Au(t)},e.qr=void 0!==r.condition?r.condition:e.ti,e.Rr=void 0!==r.duration?r.duration:100,e.ni=void 0!==r.pixelDelta?r.pixelDelta:128,e}return Ju(n,t),n.prototype.handleEvent=function(t){var n=!1;if(t.type==q){var e=t.originalEvent,r=e.keyCode;if(this.qr(t)&&(r==Yu||r==Hu||r==Xu||r==Ku)){var i=t.map.getView(),o=i.getResolution()*this.ni,s=0,a=0;r==Yu?a=-o:r==Hu?s=-o:r==Xu?s=o:a=o;var u=[s,a];tr(u,i.getRotation()),hu(i,u,this.Rr),e.preventDefault(),n=!0}}return!n},n}(vu),tc=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),nc=function(t){function n(n){var e=t.call(this)||this,r=n||{};return e.qr=r.condition?r.condition:Au,e.zr=r.delta?r.delta:1,e.Rr=void 0!==r.duration?r.duration:100,e}return tc(n,t),n.prototype.handleEvent=function(t){var n=!1;if(t.type==q||t.type==$){var e=t.originalEvent,r=e.charCode;if(this.qr(t)&&(r=="+".charCodeAt(0)||r=="-".charCodeAt(0))){var i=t.map,o=r=="+".charCodeAt(0)?this.zr:-this.zr;lu(i.getView(),o,void 0,this.Rr),e.preventDefault(),n=!0}}return!n},n}(vu),ec=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),rc="trackpad",ic="wheel",oc=function(t){function n(n){var e=this,r=n||{};(e=t.call(this,r)||this).ei=0,e.ri=0,e.bt=void 0!==r.maxDelta?r.maxDelta:1,e.Rr=void 0!==r.duration?r.duration:250,e.ii=void 0!==r.timeout?r.timeout:80,e.oi=void 0===r.useAnchor||r.useAnchor,e.si=void 0!==r.constrainResolution&&r.constrainResolution;var i=r.condition?r.condition:Su;return e.qr=r.onFocusOnly?gu(_u,i):i,e.ai=null,e.ui=void 0,e.ci,e.fi=void 0,e.hi=400,e.li,e.vi=300,e}return ec(n,t),n.prototype.di=function(){this.li=void 0,this.getMap().getView().endInteraction(void 0,this.ri?this.ri>0?1:-1:0,this.ai)},n.prototype.handleEvent=function(t){if(!this.qr(t))return!0;if(t.type!==H)return!0;var n,e=t.map,r=t.originalEvent;if(r.preventDefault(),this.oi&&(this.ai=t.coordinate),t.type==H&&(n=r.deltaY,Gt&&r.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(n/=$t),r.deltaMode===WheelEvent.DOM_DELTA_LINE&&(n*=40)),0===n)return!1;this.ri=n;var i=Date.now();void 0===this.ui&&(this.ui=i),(!this.fi||i-this.ui>this.hi)&&(this.fi=Math.abs(n)<4?rc:ic);var o=e.getView();if(this.fi===rc&&!o.getConstrainResolution()&&!this.si)return this.li?clearTimeout(this.li):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.li=setTimeout(this.di.bind(this),this.ii),o.adjustZoom(-n/this.vi,this.ai),this.ui=i,!1;this.ei+=n;var s=Math.max(this.ii-(i-this.ui),0);return clearTimeout(this.ci),this.ci=setTimeout(this.yi.bind(this,e),s),!1},n.prototype.yi=function(t){var n=t.getView();n.getAnimating()&&n.cancelAnimations();var e=-ae(this.ei,-this.bt*this.vi,this.bt*this.vi)/this.vi;(n.getConstrainResolution()||this.si)&&(e=e?e>0?1:-1:0),lu(n,e,this.ai,this.Rr),this.fi=void 0,this.ei=0,this.ai=null,this.ui=void 0,this.ci=void 0},n.prototype.setMouseAnchor=function(t){this.oi=t,t||(this.ai=null)},n}(vu),sc=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),ac=function(t){function n(n){var e=this,r=n||{},i=r;return i.stopDown||(i.stopDown=M),(e=t.call(this,i)||this).mi=null,e.Vr=void 0,e.bi=!1,e.gi=0,e.wi=void 0!==r.threshold?r.threshold:.3,e.Rr=void 0!==r.duration?r.duration:250,e}return sc(n,t),n.prototype.handleDragEvent=function(t){var n=0,e=this.targetPointers[0],r=this.targetPointers[1],i=Math.atan2(r.clientY-e.clientY,r.clientX-e.clientX);if(void 0!==this.Vr){var o=i-this.Vr;this.gi+=o,!this.bi&&Math.abs(this.gi)>this.wi&&(this.bi=!0),n=o}this.Vr=i;var s=t.map,a=s.getView();if(a.getConstraints().rotation!==Na){var u=s.getViewport().getBoundingClientRect(),c=mu(this.targetPointers);c[0]-=u.left,c[1]-=u.top,this.mi=s.getCoordinateFromPixelInternal(c),this.bi&&(s.render(),a.adjustRotationInternal(n,this.mi))}},n.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.Rr),!1)},n.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var n=t.map;return this.mi=null,this.Vr=void 0,this.bi=!1,this.gi=0,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}return!1},n}(bu),uc=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),cc=function(t){function n(n){var e=this,r=n||{},i=r;return i.stopDown||(i.stopDown=M),(e=t.call(this,i)||this).mi=null,e.Rr=void 0!==r.duration?r.duration:400,e.xi=void 0,e.ki=1,e}return uc(n,t),n.prototype.handleDragEvent=function(t){var n=1,e=this.targetPointers[0],r=this.targetPointers[1],i=e.clientX-r.clientX,o=e.clientY-r.clientY,s=Math.sqrt(i*i+o*o);void 0!==this.xi&&(n=this.xi/s),this.xi=s;var a=t.map,u=a.getView();1!=n&&(this.ki=n);var c=a.getViewport().getBoundingClientRect(),f=mu(this.targetPointers);f[0]-=c.left,f[1]-=c.top,this.mi=a.getCoordinateFromPixelInternal(f),a.render(),u.adjustResolutionInternal(n,this.mi)},n.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var n=t.map.getView(),e=this.ki>1?1:-1;return n.endInteraction(this.Rr,e),!1}return!0},n.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var n=t.map;return this.mi=null,this.xi=void 0,this.ki=1,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}return!1},n}(bu);function fc(t){var n=t||{},e=new ft,r=new To(-.005,.05,100);return(void 0===n.altShiftDragRotate||n.altShiftDragRotate)&&e.push(new Nu),(void 0===n.doubleClickZoom||n.doubleClickZoom)&&e.push(new pu({delta:n.zoomDelta,duration:n.zoomDuration})),(void 0===n.dragPan||n.dragPan)&&e.push(new Pu({onFocusOnly:n.onFocusOnly,kinetic:r})),(void 0===n.pinchRotate||n.pinchRotate)&&e.push(new ac),(void 0===n.pinchZoom||n.pinchZoom)&&e.push(new cc({duration:n.zoomDuration})),(void 0===n.keyboard||n.keyboard)&&(e.push(new Qu),e.push(new nc({delta:n.zoomDelta,duration:n.zoomDuration}))),(void 0===n.mouseWheelZoom||n.mouseWheelZoom)&&e.push(new oc({onFocusOnly:n.onFocusOnly,duration:n.zoomDuration})),(void 0===n.shiftDragZoom||n.shiftDragZoom)&&e.push(new Wu({duration:n.zoomDuration})),e}var hc=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),lc=function(t){function n(n){return(n=O({},n)).controls||(n.controls=uu()),n.interactions||(n.interactions=fc({onFocusOnly:!0})),t.call(this,n)||this}return hc(n,t),n.prototype.createRenderer=function(){return new Xs(this)},n}(Qa),vc="bottom-left",dc="bottom-center",pc="bottom-right",yc="center-left",mc="center-center",bc="center-right",gc="top-left",wc="top-center",xc="top-right";function kc(t){return(kc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var _c=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Sc="element",Mc="map",jc="offset",Tc="position",Oc="positioning",Ec=function(t){function n(n){var e=t.call(this)||this;e.on,e.once,e.un,e.options=n,e.id=n.id,e.insertFirst=void 0===n.insertFirst||n.insertFirst,e.stopEvent=void 0===n.stopEvent||n.stopEvent,e.element=document.createElement("div"),e.element.className=void 0!==n.className?n.className:"ol-overlay-container ol-selectable",e.element.style.position="absolute",e.element.style.pointerEvents="auto";var r=n.autoPan;return r&&"object"!==kc(r)&&(r={animation:n.autoPanAnimation,margin:n.autoPanMargin}),e.autoPan=r||!1,e.rendered={jt:"",visible:!0},e.mapPostrenderListenerKey=null,e.addChangeListener(Sc,e.handleElementChanged),e.addChangeListener(Mc,e.handleMapChanged),e.addChangeListener(jc,e.handleOffsetChanged),e.addChangeListener(Tc,e.handlePositionChanged),e.addChangeListener(Oc,e.handlePositioningChanged),void 0!==n.element&&e.setElement(n.element),e.setOffset(void 0!==n.offset?n.offset:[0,0]),e.setPositioning(void 0!==n.positioning?n.positioning:gc),void 0!==n.position&&e.setPosition(n.position),e}return _c(n,t),n.prototype.getElement=function(){return this.get(Sc)},n.prototype.getId=function(){return this.id},n.prototype.getMap=function(){return this.get(Mc)},n.prototype.getOffset=function(){return this.get(jc)},n.prototype.getPosition=function(){return this.get(Tc)},n.prototype.getPositioning=function(){return this.get(Oc)},n.prototype.handleElementChanged=function(){_o(this.element);var t=this.getElement();t&&this.element.appendChild(t)},n.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&(ko(this.element),Y(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=K(t,ha,this.render,this),this.updatePixelPosition();var n=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?n.insertBefore(this.element,n.childNodes[0]||null):n.appendChild(this.element),this.performAutoPan()}},n.prototype.render=function(){this.updatePixelPosition()},n.prototype.handleOffsetChanged=function(){this.updatePixelPosition()},n.prototype.handlePositionChanged=function(){this.updatePixelPosition(),this.performAutoPan()},n.prototype.handlePositioningChanged=function(){this.updatePixelPosition()},n.prototype.setElement=function(t){this.set(Sc,t)},n.prototype.setMap=function(t){this.set(Mc,t)},n.prototype.setOffset=function(t){this.set(jc,t)},n.prototype.setPosition=function(t){this.set(Tc,t)},n.prototype.performAutoPan=function(){this.autoPan&&this.panIntoView(this.autoPan)},n.prototype.panIntoView=function(t){var n=this.getMap();if(n&&n.getTargetElement()&&this.get(Tc)){var e=this.getRect(n.getTargetElement(),n.getSize()),r=this.getElement(),i=this.getRect(r,[go(r),wo(r)]),o=t||{},s=void 0===o.margin?20:o.margin;if(!Mn(e,i)){var a=i[0]-e[0],u=e[2]-i[2],c=i[1]-e[1],f=e[3]-i[3],h=[0,0];if(a<0?h[0]=a-s:u<0&&(h[0]=Math.abs(u)+s),c<0?h[1]=c-s:f<0&&(h[1]=Math.abs(f)+s),0!==h[0]||0!==h[1]){var l=n.getView().getCenterInternal(),v=n.getPixelFromCoordinateInternal(l);if(!v)return;var d=[v[0]+h[0],v[1]+h[1]],p=o.animation||{};n.getView().animateInternal({center:n.getCoordinateFromPixelInternal(d),duration:p.duration,easing:p.easing})}}}},n.prototype.getRect=function(t,n){var e=t.getBoundingClientRect(),r=e.left+window.pageXOffset,i=e.top+window.pageYOffset;return[r,i,r+n[0],i+n[1]]},n.prototype.setPositioning=function(t){this.set(Oc,t)},n.prototype.setVisible=function(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)},n.prototype.updatePixelPosition=function(){var t=this.getMap(),n=this.getPosition();if(t&&t.isRendered()&&n){var e=t.getPixelFromCoordinate(n),r=t.getSize();this.updateRenderedPosition(e,r)}else this.setVisible(!1)},n.prototype.updateRenderedPosition=function(t,n){var e=this.element.style,r=this.getOffset(),i=this.getPositioning();this.setVisible(!0);var o=Math.round(t[0]+r[0])+"px",s=Math.round(t[1]+r[1])+"px",a="0%",u="0%";i==pc||i==bc||i==xc?a="-100%":i!=dc&&i!=mc&&i!=wc||(a="-50%"),i==vc||i==dc||i==pc?u="-100%":i!=yc&&i!=mc&&i!=bc||(u="-50%");var c="translate("+a+", "+u+") translate("+o+", "+s+")";this.rendered.jt!=c&&(this.rendered.jt=c,e.transform=c,e.msTransform=c)},n.prototype.getOptions=function(){return this.options},n}(it),Ac=function(){function t(t){this.highWaterMark=void 0!==t?t:2048,this._i=0,this.Si={},this.Mi=null,this.ji=null}return t.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},t.prototype.clear=function(){this._i=0,this.Si={},this.Mi=null,this.ji=null},t.prototype.containsKey=function(t){return this.Si.hasOwnProperty(t)},t.prototype.forEach=function(t){for(var n=this.Mi;n;)t(n.Ti,n.Oi,this),n=n.newer},t.prototype.get=function(t,n){var e=this.Si[t];return St(void 0!==e,15),e===this.ji||(e===this.Mi?(this.Mi=this.Mi.newer,this.Mi.older=null):(e.newer.older=e.older,e.older.newer=e.newer),e.newer=null,e.older=this.ji,this.ji.newer=e,this.ji=e),e.Ti},t.prototype.remove=function(t){var n=this.Si[t];return St(void 0!==n,15),n===this.ji?(this.ji=n.older,this.ji&&(this.ji.newer=null)):n===this.Mi?(this.Mi=n.newer,this.Mi&&(this.Mi.older=null)):(n.newer.older=n.older,n.older.newer=n.newer),delete this.Si[t],--this._i,n.Ti},t.prototype.getCount=function(){return this._i},t.prototype.getKeys=function(){var t,n=new Array(this._i),e=0;for(t=this.ji;t;t=t.older)n[e++]=t.Oi;return n},t.prototype.getValues=function(){var t,n=new Array(this._i),e=0;for(t=this.ji;t;t=t.older)n[e++]=t.Ti;return n},t.prototype.peekLast=function(){return this.Mi.Ti},t.prototype.peekLastKey=function(){return this.Mi.Oi},t.prototype.peekFirstKey=function(){return this.ji.Oi},t.prototype.pop=function(){var t=this.Mi;return delete this.Si[t.Oi],t.newer&&(t.newer.older=null),this.Mi=t.newer,this.Mi||(this.ji=null),--this._i,t.Ti},t.prototype.replace=function(t,n){this.get(t),this.Si[t].Ti=n},t.prototype.set=function(t,n){St(!(t in this.Si),16);var e={Oi:t,newer:null,older:this.ji,Ti:n};this.ji?this.ji.newer=e:this.Mi=e,this.ji=e,this.Si[t]=e,++this._i},t.prototype.setSize=function(t){this.highWaterMark=t},t}();function Cc(t,n,e,r){return void 0!==r?(r[0]=t,r[1]=n,r[2]=e,r):[t,n,e]}function Rc(t,n,e){return t+"/"+n+"/"+e}function Ic(t){return Rc(t[0],t[1],t[2])}function Pc(t){var n=t.substring(t.lastIndexOf("/")+1,t.length).split(",").map(Number);return Rc(n[0],n[1],n[2])}function Dc(t){return t.split("/").map(Number)}function Nc(t){return(t[1]<e||e>n.getMaxZoom())return!1;var o=n.getFullTileRange(e);return!o||o.containsXY(r,i)}var Lc=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Fc=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Lc(n,t),n.prototype.expireCache=function(t){for(;this.canExpireCache();){if(this.peekLast().getKey()in t)break;this.pop().release()}},n.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=Dc(this.peekFirstKey())[0];this.forEach(function(n){n.tileCoord[0]!==t&&(this.remove(Ic(n.tileCoord)),n.release())}.bind(this))}},n}(Ac),Gc=function(){function t(t,n,e,r){this.minX=t,this.maxX=n,this.minY=e,this.maxY=r}return t.prototype.contains=function(t){return this.containsXY(t[1],t[2])},t.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},t.prototype.containsXY=function(t,n){return this.minX<=t&&t<=this.maxX&&this.minY<=n&&n<=this.maxY},t.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},t.prototype.extend=function(t){t.minXthis.maxX&&(this.maxX=t.maxX),t.minYthis.maxY&&(this.maxY=t.maxY)},t.prototype.getHeight=function(){return this.maxY-this.minY+1},t.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},t.prototype.getWidth=function(){return this.maxX-this.minX+1},t.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},t}();function Uc(t,n,e,r,i){return void 0!==i?(i.minX=t,i.maxX=n,i.minY=e,i.maxY=r,i):new Gc(t,n,e,r)}var Bc=Gc,qc=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),$c=[],Vc=function(t){function n(n,e,r,i){var o=t.call(this,n,e,{transition:0})||this;return o.Ei={},o.executorGroups={},o.declutterExecutorGroups={},o.loadingSourceTiles=0,o.hitDetectionImageData={},o.Ai={},o.sourceTiles=[],o.errorTileKeys={},o.wantedResolution,o.getSourceTiles=i.bind(void 0,o),o.wrappedTileCoord=r,o}return qc(n,t),n.prototype.getContext=function(t){var n=o(t);return n in this.Ei||(this.Ei[n]=bo(1,1,$c)),this.Ei[n]},n.prototype.hasContext=function(t){return o(t)in this.Ei},n.prototype.getImage=function(t){return this.hasContext(t)?this.getContext(t).canvas:null},n.prototype.getReplayState=function(t){var n=o(t);return n in this.Ai||(this.Ai[n]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.Ai[n]},n.prototype.load=function(){this.getSourceTiles()},n.prototype.release=function(){for(var n in this.Ei)$c.push(this.Ei[n].canvas),delete this.Ei[n];t.prototype.release.call(this)},n}(xt),Zc=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Wc=function(t){function n(n,e,r,i,o,s){var a=t.call(this,n,e,s)||this;return a.extent=null,a.Ci=i,a.Ri=null,a.B,a.projection=null,a.resolution,a.$t=o,a.Ii=r,a.key=r,a}return Zc(n,t),n.prototype.getFormat=function(){return this.Ci},n.prototype.getFeatures=function(){return this.Ri},n.prototype.load=function(){this.state==ht&&(this.setState(lt),this.$t(this,this.Ii),this.B&&this.B(this.extent,this.resolution,this.projection))},n.prototype.onLoad=function(t,n){this.setFeatures(t)},n.prototype.onError=function(){this.setState(dt)},n.prototype.setFeatures=function(t){this.Ri=t,this.setState(vt)},n.prototype.setLoader=function(t){this.B=t},n}(xt);function Hc(t){return Array.isArray(t)?Do(t):t}var Kc="arraybuffer",Xc="json",Yc="text",Jc="xml",Qc=!1;function tf(t,n,e,r,i,o,s){var a=new XMLHttpRequest;a.open("GET","function"==typeof t?t(e,r,i):t,!0),n.getType()==Kc&&(a.responseType="arraybuffer"),a.withCredentials=Qc,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){var r=n.getType(),u=void 0;r==Xc||r==Yc?u=a.responseText:r==Jc?(u=a.responseXML)||(u=(new DOMParser).parseFromString(a.responseText,"application/xml")):r==Kc&&(u=a.response),u?o(n.readFeatures(u,{extent:e,featureProjection:i}),n.readProjection(u)):s()}else s()},a.onerror=s,a.send()}function nf(t,n){return function(e,r,i,o,s){var a=this;tf(t,n,e,r,i,(function(t,n){a.addFeatures(t),void 0!==o&&o(t)}),s||j)}}function ef(t,n){return[[-1/0,-1/0,1/0,1/0]]}var rf=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function of(t,n,e,r){var i=document.createElement("script"),s="olc_"+o(n);function a(){delete window[s],i.parentNode.removeChild(i)}i.async=!0,i.src=t+(-1==t.indexOf("?")?"?":"&")+(r||"callback")+"="+s;var u=setTimeout((function(){a(),e&&e()}),1e4);window[s]=function(t){clearTimeout(u),a(),n(t)},document.getElementsByTagName("head")[0].appendChild(i)}var sf,af=function(t){function n(n){var e=this,r="Unexpected response status: "+n.status;return(e=t.call(this,r)||this).name="ResponseError",e.response=n,e}return rf(n,t),n}(Error),uf=function(t){function n(n){var e=t.call(this,"Failed to issue request")||this;return e.name="ClientError",e.client=n,e}return rf(n,t),n}(Error);function cf(t){return new Promise((function(n,e){var r=new XMLHttpRequest;r.addEventListener("load",(function(t){var r=t.target;if(!r.status||r.status>=200&&r.status<300){var i=void 0;try{i=JSON.parse(r.responseText)}catch(t){var o="Error parsing response text as JSON: "+t.message;return void e(new Error(o))}n(i)}else e(new af(r))})),r.addEventListener("error",(function(t){e(new uf(t.target))})),r.open("GET",t),r.setRequestHeader("Accept","application/json"),r.send()}))}function ff(t,n){return n.indexOf("://")>=0?n:new URL(n,t).href}var hf=function(){function t(){}return t.prototype.drawCustom=function(t,n,e,r){},t.prototype.drawGeometry=function(t){},t.prototype.setStyle=function(t){},t.prototype.drawCircle=function(t,n){},t.prototype.drawFeature=function(t,n){},t.prototype.drawGeometryCollection=function(t,n){},t.prototype.drawLineString=function(t,n){},t.prototype.drawMultiLineString=function(t,n){},t.prototype.drawMultiPoint=function(t,n){},t.prototype.drawMultiPolygon=function(t,n){},t.prototype.drawPoint=function(t,n){},t.prototype.drawPolygon=function(t,n){},t.prototype.drawText=function(t,n){},t.prototype.setFillStrokeStyle=function(t,n){},t.prototype.setImageStyle=function(t,n){},t.prototype.setTextStyle=function(t,n){},t}(),lf=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),vf=function(t){function n(n,e,r,i,o,s,a){var u=t.call(this)||this;return u.Ei=n,u.Rt=e,u.st=r,u.jt=i,u.Pi=o,u.Di=s,u.Ni=a,u.zi=null,u.Li=null,u.Fi=null,u.Gi=null,u.Ui=null,u.Dt=null,u.Bi=0,u.qi=0,u.$i=0,u.Vi=0,u.Zi=0,u.Wi=0,u.Hi=!1,u.Ki=0,u.Xi=[0,0],u.Yi=0,u.Ji="",u.Qi=0,u.no=0,u.eo=!1,u.ro=0,u.io=[0,0],u.oo=null,u.so=null,u.ao=null,u.uo=[],u.co=[1,0,0,1,0,0],u}return lf(n,t),n.prototype.fo=function(t,n,e,r){if(this.Dt){var i=Nr(t,n,e,r,this.jt,this.uo),o=this.Ei,s=this.co,a=o.globalAlpha;1!=this.Vi&&(o.globalAlpha=a*this.Vi);var u=this.Ki;this.Hi&&(u+=this.Pi);for(var c=0,f=i.length;c2||Math.abs(t[4*n+3]-191.25)>2}function Rf(t,n,e,r){var i=_r(e,n,t),o=vr(n,r,e),s=n.getMetersPerUnit();void 0!==s&&(o*=s);var a=t.getMetersPerUnit();void 0!==a&&(o/=a);var u=t.getExtent();if(!u||Sn(u,i)){var c=vr(t,o,i)/o;isFinite(c)&&c>0&&(o/=c)}return o}function If(t,n,e,r){var i=Vn(e),o=Rf(t,n,i,r);return(!isFinite(o)||o<=0)&&Un(e,(function(e){return o=Rf(t,n,e,r),isFinite(o)&&o>0})),o}function Pf(t,n,e,r,i,o,s,a,u,c,f,h){var l=bo(Math.round(e*t),Math.round(e*n));if(O(l,h),0===u.length)return l.canvas;function v(t){return Math.round(t*e)/e}l.scale(e,e),l.globalCompositeOperation="lighter";var d=[1/0,1/0,-1/0,-1/0];u.forEach((function(t,n,e){Dn(d,t.extent)}));var p=Jn(d),y=Hn(d),m=bo(Math.round(e*p/r),Math.round(e*y/r));O(m,h);var b=e/r;u.forEach((function(t,n,e){var r=t.extent[0]-d[0],i=-(t.extent[3]-d[3]),o=Jn(t.extent),s=Hn(t.extent);t.image.width>0&&t.image.height>0&&m.drawImage(t.image,c,c,t.image.width-2*c,t.image.height-2*c,r*b,i*b,o*b,s*b)}));var g=Xn(s);return a.getTriangles().forEach((function(t,n,i){var s=t.source,a=t.target,u=s[0][0],c=s[0][1],f=s[1][0],p=s[1][1],y=s[2][0],b=s[2][1],w=v((a[0][0]-g[0])/o),x=v(-(a[0][1]-g[1])/o),k=v((a[1][0]-g[0])/o),_=v(-(a[1][1]-g[1])/o),S=v((a[2][0]-g[0])/o),M=v(-(a[2][1]-g[1])/o),j=u,T=c;u=0,c=0;var O=le([[f-=j,p-=T,0,0,k-w],[y-=j,b-=T,0,0,S-w],[0,0,f,p,_-x],[0,0,y,b,M-x]]);if(O){if(l.save(),l.beginPath(),function(){if(void 0===Tf){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",Af(t,4,5,4,0),Af(t,4,5,0,5);var n=t.getImageData(0,0,3,3).data;Tf=Cf(n,0)||Cf(n,4)||Cf(n,8)}return Tf}()||h===Ef){l.moveTo(k,_);for(var E=w-k,A=x-_,C=0;C<4;C++)l.lineTo(k+v((C+1)*E/4),_+v(C*A/3)),3!=C&&l.lineTo(k+v((C+1)*E/4),_+v((C+1)*A/3));l.lineTo(S,M)}else l.moveTo(k,_),l.lineTo(w,x),l.lineTo(S,M);l.clip(),l.transform(O[0],O[2],O[1],O[3],w,x),l.translate(d[0]-j,d[3]-T),l.scale(r/e,-r/e),l.drawImage(m.canvas,0,0),l.restore()}})),f&&(l.save(),l.globalCompositeOperation="source-over",l.strokeStyle="black",l.lineWidth=1,a.getTriangles().forEach((function(t,n,e){var r=t.target,i=(r[0][0]-g[0])/o,s=-(r[0][1]-g[1])/o,a=(r[1][0]-g[0])/o,u=-(r[1][1]-g[1])/o,c=(r[2][0]-g[0])/o,f=-(r[2][1]-g[1])/o;l.beginPath(),l.moveTo(a,u),l.lineTo(i,s),l.lineTo(c,f),l.closePath(),l.stroke()})),l.restore()),l.canvas}var Df=[0,0,0],Nf=function(){function t(t){var n;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this._e=t.resolutions,St(_(this._e,(function(t,n){return n-t}),!0),17),!t.origins)for(var e=0,r=this._e.length-1;e=this.minZoom;){if(n(a,2===this.ke?Uc(i=Math.floor(i/2),i,o=Math.floor(o/2),o,e):this.getTileRangeForExtentAndZ(s,a,e)))return!0;--a}return!1},t.prototype.getExtent=function(){return this.st},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.getMinZoom=function(){return this.minZoom},t.prototype.getOrigin=function(t){return this.mo?this.mo:this.bo[t]},t.prototype.getResolution=function(t){return this._e[t]},t.prototype.getResolutions=function(){return this._e},t.prototype.getTileCoordChildTileRange=function(t,n,e){if(t[0]this.maxZoom||n0?r:Math.max(s/a[0],o/a[1]),c=i+1,f=new Array(c),h=0;h=0;s--)this.Ko[s].init(t);e.bindTexture(e.TEXTURE_2D,null),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.enable(e.BLEND),e.blendFunc(e.ONE,n?e.ZERO:e.ONE_MINUS_SRC_ALPHA),e.useProgram(this.qo),this.applyFrameState(t),this.applyUniforms(t)},n.prototype.prepareDrawToRenderTarget=function(t,n,e){var r=this.getGL(),i=n.getSize();r.bindFramebuffer(r.FRAMEBUFFER,n.getFramebuffer()),r.viewport(0,0,i[0],i[1]),r.bindTexture(r.TEXTURE_2D,n.getTexture()),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),r.enable(r.BLEND),r.blendFunc(r.ONE,e?r.ZERO:r.ONE_MINUS_SRC_ALPHA),r.useProgram(this.qo),this.applyFrameState(t),this.applyUniforms(t)},n.prototype.drawElements=function(t,n){var e=this.getGL();this.getExtension("OES_element_index_uint");var r=e.UNSIGNED_INT,i=n-t,o=4*t;e.drawElements(e.TRIANGLES,i,r,o)},n.prototype.finalizeDraw=function(t){for(var n=0;nthis.ns[0]||n>=this.ns[1])return Kh[0]=0,Kh[1]=0,Kh[2]=0,Kh[3]=0,Kh;this.readAll();var e=Math.floor(t)+(this.ns[1]-Math.floor(n)-1)*this.ns[0];return Kh[0]=this.q[4*e],Kh[1]=this.q[4*e+1],Kh[2]=this.q[4*e+2],Kh[3]=this.q[4*e+3],Kh},t.prototype.getTexture=function(){return this.Qo},t.prototype.getFramebuffer=function(){return this.ts},t.prototype.rs=function(){var t=this.ns,n=this.Jo.getGL();this.Qo=this.Jo.createTexture(t,null,this.Qo),n.bindFramebuffer(n.FRAMEBUFFER,this.ts),n.viewport(0,0,t[0],t[1]),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,this.Qo,0),this.q=new Uint8Array(t[0]*t[1]*4)},t}(),Yh=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function Jh(t,n){t.bindTexture(t.TEXTURE_2D,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR)}function Qh(t,n,e,r,i){var o,s,a=t.getGL();switch(Jh(a,n),i){case 1:o=a.LUMINANCE;break;case 2:o=a.LUMINANCE_ALPHA;break;case 3:o=a.RGB;break;case 4:o=a.RGBA;break;default:throw new Error("Unsupported number of bands: "+i)}e instanceof Float32Array?(s=a.FLOAT,t.getExtension("OES_texture_float"),t.getExtension("OES_texture_float_linear")):s=a.UNSIGNED_BYTE,a.texImage2D(a.TEXTURE_2D,0,o,r[0],r[1],0,o,s,e)}var tl=function(t){function n(n,e,r){var i=t.call(this)||this;i.tile,i.textures=[],i.sr=i.sr.bind(i),i.size=Ya(e.getTileSize(n.tileCoord[0])),i.bandCount=NaN,i.Jo=r;var o=new Rh(Yf,Qf);return o.fromArray([0,1,1,1,1,0,0,0]),r.flushBufferData(o),i.coords=o,i.setTile(n),i}return Yh(n,t),n.prototype.setTile=function(t){t!==this.tile&&(this.tile&&this.tile.removeEventListener(P,this.sr),this.tile=t,this.textures.length=0,this.loaded=t.getState()===vt,this.loaded?this.os():t.addEventListener(P,this.sr))},n.prototype.os=function(){var t=this.Jo,n=t.getGL(),e=this.tile;if(e instanceof jo){var r=n.createTexture();return this.textures.push(r),this.bandCount=4,void function(t,n,e){Jh(t,n),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e)}(n,r,e.getImage())}var i=e.getData(),o=i instanceof Float32Array,s=this.size[0]*this.size[1];this.bandCount=i.byteLength/(o?4:1)/s;var a=Math.ceil(this.bandCount/4);if(1===a){r=n.createTexture();return this.textures.push(r),void Qh(t,r,i,this.size,this.bandCount)}for(var u=o?Float32Array:Uint8Array,c=new Array(a),f=0;f=s.minZoom;--w){if(this.xs(s,g,w,u))break}}this.helper.useProgram(this.ys),this.helper.prepareDraw(t,!d);for(var x=Object.keys(u).map(Number).sort(p),k=this.helper.getGL(),_=n.center[0],S=n.center[1],M=0,j=x.length;M4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return"vec"+t.length+"("+t.map(Rl).join(", ")+")"}function Pl(t){var n=Io(t).slice();return n.length<4&&n.push(1),Il(n.map((function(t,n){return n<3?t/255:t})))}function Dl(t,n){return void 0===t.stringLiteralsMap[n]&&(t.stringLiteralsMap[n]=Object.keys(t.stringLiteralsMap).length),t.stringLiteralsMap[n]}function Nl(t,n){return Rl(Dl(t,n))}function zl(t,n,e){if(Array.isArray(n)&&"string"==typeof n[0]){var r=El[n[0]];if(void 0===r)throw new Error("Unrecognized expression operator: "+JSON.stringify(n));return r.toGlsl(t,n.slice(1),e)}var i=Al(n);if((i&kl)>0)return Rl(n);if((i&Ml)>0)return n.toString();if((i&_l)>0&&(void 0===e||e==_l))return Nl(t,n.toString());if((i&Sl)>0&&(void 0===e||e==Sl))return Pl(n);if((i&jl)>0)return Il(n);throw new Error("Unexpected expression "+n+" (expected type "+e+")")}function Ll(t){if(!(Al(t)&kl))throw new Error("A numeric value was expected, got "+JSON.stringify(t)+" instead")}function Fl(t){for(var n=0;nn)throw new Error("At most "+n+" arguments were expected, got "+t.length+" instead")}function Vl(t){if(t.length%2!=0)throw new Error("An even amount of arguments was expected, got "+t+" instead")}function Zl(t,n){if(!Cl(n))throw new Error("Could not infer only one type from the following expression: "+JSON.stringify(t))}function Wl(t){return"u_var_"+t}function Hl(t){return{getReturnType:function(t){return Ml},toGlsl:function(n,e){Bl(e,2);for(var r=Tl,i=0;i"]={getReturnType:function(t){return Ml},toGlsl:function(t,n){return Bl(n,2),Fl(n),"("+zl(t,n[0])+" > "+zl(t,n[1])+")"}},El[">="]={getReturnType:function(t){return Ml},toGlsl:function(t,n){return Bl(n,2),Fl(n),"("+zl(t,n[0])+" >= "+zl(t,n[1])+")"}},El["<"]={getReturnType:function(t){return Ml},toGlsl:function(t,n){return Bl(n,2),Fl(n),"("+zl(t,n[0])+" < "+zl(t,n[1])+")"}},El["<="]={getReturnType:function(t){return Ml},toGlsl:function(t,n){return Bl(n,2),Fl(n),"("+zl(t,n[0])+" <= "+zl(t,n[1])+")"}},El["=="]=Hl("=="),El["!="]=Hl("!="),El["!"]={getReturnType:function(t){return Ml},toGlsl:function(t,n){return Bl(n,1),Ul(n[0]),"(!"+zl(t,n[0])+")"}},El.all=Kl("&&"),El.any=Kl("||"),El.between={getReturnType:function(t){return Ml},toGlsl:function(t,n){Bl(n,3),Fl(n);var e=zl(t,n[1]),r=zl(t,n[2]),i=zl(t,n[0]);return"("+i+" >= "+e+" && "+i+" <= "+r+")"}},El.array={getReturnType:function(t){return jl},toGlsl:function(t,n){ql(n,2),$l(n,4),Fl(n);var e=n.map((function(n){return zl(t,n,kl)}));return"vec"+n.length+"("+e.join(", ")+")"}},El.color={getReturnType:function(t){return Sl},toGlsl:function(t,n){ql(n,3),$l(n,4),Fl(n);var e=n;3===n.length&&e.push(1);var r=n.map((function(n,e){return zl(t,n,kl)+(e<3?" / 255.0":"")}));return"vec"+n.length+"("+r.join(", ")+")"}},El.interpolate={getReturnType:function(t){for(var n=Sl|kl,e=3;e=1;u-=2){a="("+o+" == "+zl(t,n[u])+" ? "+zl(t,n[u+1],i)+" : "+(a||s)+")"}return a}},El.case={getReturnType:function(t){for(var n=Tl,e=1;e=0;o-=2){a="("+zl(t,n[o])+" ? "+zl(t,n[o+1],i)+" : "+(a||s)+")"}return a}};var Xl=function(){function t(){this.uniforms=[],this.attributes=[],this.varyings=[],this.sizeExpression="vec2(1.0)",this.rotationExpression="0.0",this.offsetExpression="vec2(0.0)",this.colorExpression="vec4(1.0)",this.texCoordExpression="vec4(0.0, 0.0, 1.0, 1.0)",this.discardExpression="false",this.rotateWithView=!1}return t.prototype.addUniform=function(t){return this.uniforms.push(t),this},t.prototype.addAttribute=function(t){return this.attributes.push(t),this},t.prototype.addVarying=function(t,n,e){return this.varyings.push({name:t,type:n,expression:e}),this},t.prototype.setSizeExpression=function(t){return this.sizeExpression=t,this},t.prototype.setRotationExpression=function(t){return this.rotationExpression=t,this},t.prototype.setSymbolOffsetExpression=function(t){return this.offsetExpression=t,this},t.prototype.setColorExpression=function(t){return this.colorExpression=t,this},t.prototype.setTextureCoordinateExpression=function(t){return this.texCoordExpression=t,this},t.prototype.setFragmentDiscardExpression=function(t){return this.discardExpression=t,this},t.prototype.setSymbolRotateWithView=function(t){return this.rotateWithView=t,this},t.prototype.getSizeExpression=function(){return this.sizeExpression},t.prototype.getOffsetExpression=function(){return this.offsetExpression},t.prototype.getColorExpression=function(){return this.colorExpression},t.prototype.getTextureCoordinateExpression=function(){return this.texCoordExpression},t.prototype.getFragmentDiscardExpression=function(){return this.discardExpression},t.prototype.getSymbolVertexShader=function(t){var n=this.rotateWithView?"u_offsetScaleMatrix * u_offsetRotateMatrix":"u_offsetScaleMatrix",e=this.attributes,r=this.varyings;return t&&(e=e.concat("vec4 a_hitColor"),r=r.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),"precision mediump float;\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n"+this.uniforms.map((function(t){return"uniform "+t+";"})).join("\n")+"\nattribute vec2 a_position;\nattribute float a_index;\n"+e.map((function(t){return"attribute "+t+";"})).join("\n")+"\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n"+r.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")+"\nvoid main(void) {\n mat4 offsetMatrix = "+n+";\n vec2 halfSize = "+this.sizeExpression+" * 0.5;\n vec2 offset = "+this.offsetExpression+";\n float angle = "+this.rotationExpression+";\n float offsetX;\n float offsetY;\n if (a_index == 0.0) {\n offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n } else if (a_index == 1.0) {\n offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n } else if (a_index == 2.0) {\n offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n } else {\n offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n }\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n vec4 texCoord = "+this.texCoordExpression+";\n float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.p;\n float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.q;\n v_texCoord = vec2(u, v);\n u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n v = a_index == 2.0 || a_index == 3.0 ? 0.0 : 1.0;\n v_quadCoord = vec2(u, v);\n"+r.map((function(t){return" "+t.name+" = "+t.expression+";"})).join("\n")+"\n}"},t.prototype.getSymbolFragmentShader=function(t){var n=t?" if (gl_FragColor.a < 0.1) { discard; } gl_FragColor = v_hitColor;":"",e=this.varyings;return t&&(e=e.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),"precision mediump float;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n"+this.uniforms.map((function(t){return"uniform "+t+";"})).join("\n")+"\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n"+e.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")+"\nvoid main(void) {\n if ("+this.discardExpression+") { discard; }\n gl_FragColor = "+this.colorExpression+";\n gl_FragColor.rgb *= gl_FragColor.a;\n"+n+"\n}"},t}();function Yl(t){var n=t.symbol,e=void 0!==n.size?n.size:1,r=n.color||"white",i=n.textureCoord||[0,0,1,1],o=n.offset||[0,0],s=void 0!==n.opacity?n.opacity:1,a=void 0!==n.rotation?n.rotation:0,u={inFragmentShader:!1,variables:[],attributes:[],stringLiteralsMap:{}},c=zl(u,e,jl|kl),f=zl(u,o,jl),h=zl(u,i,jl),l=zl(u,a,kl),v={inFragmentShader:!0,variables:u.variables,attributes:[],stringLiteralsMap:u.stringLiteralsMap},d=zl(v,r,Sl),p=zl(v,s,kl),y="1.0",m="vec2("+zl(v,e,jl|kl)+").x";switch(n.symbolType){case"square":case"image":break;case"circle":y="(1.0-smoothstep(1.-4./"+m+",1.,dot(v_quadCoord-.5,v_quadCoord-.5)*4.))";break;case"triangle":var b="(v_quadCoord*2.-1.)",g="(atan("+b+".x,"+b+".y))";y="(1.0-smoothstep(.5-3./"+m+",.5,cos(floor(.5+"+g+"/2.094395102)*2.094395102-"+g+")*length("+b+")))";break;default:throw new Error("Unexpected symbol type: "+n.symbolType)}var w=(new Xl).setSizeExpression("vec2("+c+")").setRotationExpression(l).setSymbolOffsetExpression(f).setTextureCoordinateExpression(h).setSymbolRotateWithView(!!n.rotateWithView).setColorExpression("vec4("+d+".rgb, "+d+".a * "+p+" * "+y+")");if(t.filter){var x=zl(v,t.filter,Ml);w.setFragmentDiscardExpression("!"+x)}var k={};if(v.variables.forEach((function(n){var e=Wl(n);w.addUniform("float "+e),k[e]=function(){if(!t.variables||void 0===t.variables[n])throw new Error("The following variable is missing from the style: "+n);var e=t.variables[n];return"string"==typeof e&&(e=Dl(u,e)),void 0!==e?e:-9999999}})),"image"===n.symbolType&&n.src){var _=new Image;_.src=n.src,w.addUniform("sampler2D u_texture").setColorExpression(w.getColorExpression()+" * texture2D(u_texture, v_texCoord)"),k.u_texture=_}return v.attributes.forEach((function(t){-1===u.attributes.indexOf(t)&&u.attributes.push(t),w.addVarying("v_"+t,"float","a_"+t)})),u.attributes.forEach((function(t){w.addAttribute("float a_"+t)})),{builder:w,attributes:u.attributes.map((function(t){return{name:t,callback:function(n,e){var r=e[t];return"string"==typeof r&&(r=Dl(u,r)),void 0!==r?r:-9999999}}})),uniforms:k}}var Jl=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ql=function(t){function n(n){var e=t.call(this,{extent:n.extent,origin:n.origin,origins:n.origins,resolutions:n.resolutions,tileSize:n.tileSize,tileSizes:n.tileSizes,sizes:n.sizes})||this;return e.ks=n.matrixIds,e}return Jl(n,t),n.prototype.getMatrixId=function(t){return this.ks[t]},n.prototype.getMatrixIds=function(){return this.ks},n}(Nf),tv=Ql;function nv(t,n,e){var r=[],i=[],o=[],s=[],a=[],u=void 0!==e?e:[],c=lr(t.SupportedCRS),f=c.getMetersPerUnit(),h="ne"==c.getAxisOrientation().substr(0,2);return t.TileMatrix.sort((function(t,n){return n.ScaleDenominator-t.ScaleDenominator})),t.TileMatrix.forEach((function(n){if(!(u.length>0)||w(u,(function(e){return n.Identifier==e.TileMatrix||-1===n.Identifier.indexOf(":")&&t.Identifier+":"+n.Identifier===e.TileMatrix}))){i.push(n.Identifier);var e=28e-5*n.ScaleDenominator/f,c=n.TileWidth,l=n.TileHeight;h?o.push([n.TopLeftCorner[1],n.TopLeftCorner[0]]):o.push(n.TopLeftCorner),r.push(e),s.push(c==l?c:[c,l]),a.push([n.MatrixWidth,n.MatrixHeight])}})),new Ql({extent:n,origins:o,resolutions:r,matrixIds:i,tileSizes:s,sizes:a})}var ev=function(){function t(t){this._s=t.opacity,this.Ss=t.rotateWithView,this.Pr=t.rotation,this.Ms=t.scale,this.Ts=Ya(t.scale),this.Os=t.displacement}return t.prototype.clone=function(){var n=this.getScale();return new t({opacity:this.getOpacity(),scale:Array.isArray(n)?n.slice():n,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()})},t.prototype.getOpacity=function(){return this._s},t.prototype.getRotateWithView=function(){return this.Ss},t.prototype.getRotation=function(){return this.Pr},t.prototype.getScale=function(){return this.Ms},t.prototype.getScaleArray=function(){return this.Ts},t.prototype.getDisplacement=function(){return this.Os},t.prototype.getAnchor=function(){return r()},t.prototype.getImage=function(t){return r()},t.prototype.getHitDetectionImage=function(){return r()},t.prototype.getPixelRatio=function(t){return 1},t.prototype.getImageState=function(){return r()},t.prototype.getImageSize=function(){return r()},t.prototype.getOrigin=function(){return r()},t.prototype.getSize=function(){return r()},t.prototype.setOpacity=function(t){this._s=t},t.prototype.setRotateWithView=function(t){this.Ss=t},t.prototype.setRotation=function(t){this.Pr=t},t.prototype.setScale=function(t){this.Ms=t,this.Ts=Ya(t)},t.prototype.listenImageChange=function(t){r()},t.prototype.load=function(){r()},t.prototype.unlistenImageChange=function(t){r()},t}(),rv=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),iv=function(t){function n(n){var e=this,r=void 0!==n.rotateWithView&&n.rotateWithView;return(e=t.call(this,{opacity:1,rotateWithView:r,rotation:void 0!==n.rotation?n.rotation:0,scale:void 0!==n.scale?n.scale:1,displacement:void 0!==n.displacement?n.displacement:[0,0]})||this).Ut=void 0,e.Es=null,e.As=void 0!==n.fill?n.fill:null,e.mo=[0,0],e.Ht=n.points,e.Cs=void 0!==n.radius?n.radius:n.radius1,e.Rs=n.radius2,e.Kt=void 0!==n.angle?n.angle:0,e.Is=void 0!==n.stroke?n.stroke:null,e.mi=null,e.ns=null,e.Ps=null,e.render(),e}return rv(n,t),n.prototype.clone=function(){var t=this.getScale(),e=new n({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice()});return e.setOpacity(this.getOpacity()),e},n.prototype.getAnchor=function(){return this.mi},n.prototype.getAngle=function(){return this.Kt},n.prototype.getFill=function(){return this.As},n.prototype.getHitDetectionImage=function(){return this.Es||this.Ds(this.Ps),this.Es},n.prototype.getImage=function(t){var n=this.Ut[t];if(!n){var e=this.Ps,r=bo(e.size*t,e.size*t);this.Ns(e,r,t),n=r.canvas,this.Ut[t]=n}return n},n.prototype.getPixelRatio=function(t){return t},n.prototype.getImageSize=function(){return this.ns},n.prototype.getImageState=function(){return co},n.prototype.getOrigin=function(){return this.mo},n.prototype.getPoints=function(){return this.Ht},n.prototype.getRadius=function(){return this.Cs},n.prototype.getRadius2=function(){return this.Rs},n.prototype.getSize=function(){return this.ns},n.prototype.getStroke=function(){return this.Is},n.prototype.listenImageChange=function(t){},n.prototype.load=function(){},n.prototype.unlistenImageChange=function(t){},n.prototype.zs=function(t,n,e){if(0===n||this.Ht===1/0||"bevel"!==t&&"miter"!==t)return n;var r=this.Cs,i=void 0===this.Rs?r:this.Rs;if(r0,6);var l=void 0!==r.src?ao:co;return e.Gs=void 0!==r.color?Io(r.color):null,e.Ys=mv(c,h,f,e.qt,l,e.Gs),e.Js=void 0!==r.offset?r.offset:[0,0],e.Qs=void 0!==r.offsetOrigin?r.offsetOrigin:lv,e.mo=null,e.ns=void 0!==r.size?r.size:null,e}return gv(n,t),n.prototype.clone=function(){var t=this.getScale();return new n({anchor:this.mi.slice(),anchorOrigin:this.Hs,anchorXUnits:this.Ks,anchorYUnits:this.Xs,crossOrigin:this.qt,color:this.Gs&&this.Gs.slice?this.Gs.slice():this.Gs||void 0,src:this.getSrc(),offset:this.Js.slice(),offsetOrigin:this.Qs,size:null!==this.ns?this.ns.slice():void 0,opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},n.prototype.getAnchor=function(){if(this.Ws)return this.Ws;var t=this.mi,n=this.getSize();if(this.Ks==uv||this.Xs==uv){if(!n)return null;t=this.mi.slice(),this.Ks==uv&&(t[0]*=n[0]),this.Xs==uv&&(t[1]*=n[1])}if(this.Hs!=lv){if(!n)return null;t===this.mi&&(t=this.mi.slice()),this.Hs!=vv&&this.Hs!=hv||(t[0]=-t[0]+n[0]),this.Hs!=fv&&this.Hs!=hv||(t[1]=-t[1]+n[1])}var e=this.getDisplacement();return t[0]-=e[0],t[1]+=e[1],this.Ws=t,this.Ws},n.prototype.setAnchor=function(t){this.mi=t,this.Ws=null},n.prototype.getColor=function(){return this.Gs},n.prototype.getImage=function(t){return this.Ys.getImage(t)},n.prototype.getPixelRatio=function(t){return this.Ys.getPixelRatio(t)},n.prototype.getImageSize=function(){return this.Ys.getSize()},n.prototype.getImageState=function(){return this.Ys.getImageState()},n.prototype.getHitDetectionImage=function(){return this.Ys.getHitDetectionImage()},n.prototype.getOrigin=function(){if(this.mo)return this.mo;var t=this.Js;if(this.Qs!=lv){var n=this.getSize(),e=this.Ys.getSize();if(!n||!e)return null;t=t.slice(),this.Qs!=vv&&this.Qs!=hv||(t[0]=e[0]-n[0]-t[0]),this.Qs!=fv&&this.Qs!=hv||(t[1]=e[1]-n[1]-t[1])}return this.mo=t,this.mo},n.prototype.getSrc=function(){return this.Ys.getSrc()},n.prototype.getSize=function(){return this.ns?this.ns:this.Ys.getSize()},n.prototype.listenImageChange=function(t){this.Ys.addEventListener(P,t)},n.prototype.load=function(){this.Ys.load()},n.prototype.unlistenImageChange=function(t){this.Ys.removeEventListener(P,t)},n}(ev),xv=function(){function t(t){var n=t||{};this.Gs=void 0!==n.color?n.color:null,this.ta=n.lineCap,this.na=void 0!==n.lineDash?n.lineDash:null,this.ea=n.lineDashOffset,this.ra=n.lineJoin,this.ia=n.miterLimit,this.oa=n.width}return t.prototype.clone=function(){var n=this.getColor();return new t({color:Array.isArray(n)?n.slice():n||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},t.prototype.getColor=function(){return this.Gs},t.prototype.getLineCap=function(){return this.ta},t.prototype.getLineDash=function(){return this.na},t.prototype.getLineDashOffset=function(){return this.ea},t.prototype.getLineJoin=function(){return this.ra},t.prototype.getMiterLimit=function(){return this.ia},t.prototype.getWidth=function(){return this.oa},t.prototype.setColor=function(t){this.Gs=t},t.prototype.setLineCap=function(t){this.ta=t},t.prototype.setLineDash=function(t){this.na=t},t.prototype.setLineDashOffset=function(t){this.ea=t},t.prototype.setLineJoin=function(t){this.ra=t},t.prototype.setMiterLimit=function(t){this.ia=t},t.prototype.setWidth=function(t){this.oa=t},t}();function kv(t){return(kv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var _v=function(){function t(t){var n=t||{};this.Zr=null,this.sa=Ov,void 0!==n.geometry&&this.setGeometry(n.geometry),this.As=void 0!==n.fill?n.fill:null,this.Dt=void 0!==n.image?n.image:null,this.an=void 0!==n.renderer?n.renderer:null,this.aa=void 0!==n.hitDetectionRenderer?n.hitDetectionRenderer:null,this.Is=void 0!==n.stroke?n.stroke:null,this.Ji=void 0!==n.text?n.text:null,this.ua=n.zIndex}return t.prototype.clone=function(){var n=this.getGeometry();return n&&"object"===kv(n)&&(n=n.clone()),new t({geometry:n,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},t.prototype.getRenderer=function(){return this.an},t.prototype.setRenderer=function(t){this.an=t},t.prototype.setHitDetectionRenderer=function(t){this.aa=t},t.prototype.getHitDetectionRenderer=function(){return this.aa},t.prototype.getGeometry=function(){return this.Zr},t.prototype.getGeometryFunction=function(){return this.sa},t.prototype.getFill=function(){return this.As},t.prototype.setFill=function(t){this.As=t},t.prototype.getImage=function(){return this.Dt},t.prototype.setImage=function(t){this.Dt=t},t.prototype.getStroke=function(){return this.Is},t.prototype.setStroke=function(t){this.Is=t},t.prototype.getText=function(){return this.Ji},t.prototype.setText=function(t){this.Ji=t},t.prototype.getZIndex=function(){return this.ua},t.prototype.setGeometry=function(t){"function"==typeof t?this.sa=t:"string"==typeof t?this.sa=function(n){return n.get(t)}:t?void 0!==t&&(this.sa=function(){return t}):this.sa=Ov,this.Zr=t},t.prototype.setZIndex=function(t){this.ua=t},t}();function Sv(t){var n;if("function"==typeof t)n=t;else{var e;if(Array.isArray(t))e=t;else St("function"==typeof t.getZIndex,41),e=[t];n=function(){return e}}return n}var Mv=null;function jv(t,n){if(!Mv){var e=new av({color:"rgba(255,255,255,0.4)"}),r=new xv({color:"#3399CC",width:1.25});Mv=[new _v({image:new sv({fill:e,stroke:r,radius:5}),fill:e,stroke:r})]}return Mv}function Tv(){var t={},n=[255,255,255,1],e=[0,153,255,1];return t[Rt.POLYGON]=[new _v({fill:new av({color:[255,255,255,.5]})})],t[Rt.MULTI_POLYGON]=t[Rt.POLYGON],t[Rt.LINE_STRING]=[new _v({stroke:new xv({color:n,width:5})}),new _v({stroke:new xv({color:e,width:3})})],t[Rt.MULTI_LINE_STRING]=t[Rt.LINE_STRING],t[Rt.CIRCLE]=t[Rt.POLYGON].concat(t[Rt.LINE_STRING]),t[Rt.POINT]=[new _v({image:new sv({radius:6,fill:new av({color:e}),stroke:new xv({color:n,width:1.5})}),zIndex:1/0})],t[Rt.MULTI_POINT]=t[Rt.POINT],t[Rt.GEOMETRY_COLLECTION]=t[Rt.POLYGON].concat(t[Rt.LINE_STRING],t[Rt.POINT]),t}function Ov(t){return t.getGeometry()}var Ev=_v,Av="point",Cv="line",Rv=function(){function t(t){var n=t||{};this.ca=n.font,this.Pr=n.rotation,this.Ss=n.rotateWithView,this.Ms=n.scale,this.Ts=Ya(void 0!==n.scale?n.scale:1),this.Ji=n.text,this.fa=n.textAlign,this.ha=n.textBaseline,this.As=void 0!==n.fill?n.fill:new av({color:"#333"}),this.la=void 0!==n.maxAngle?n.maxAngle:Math.PI/4,this.va=void 0!==n.placement?n.placement:Av,this.da=!!n.overflow,this.Is=void 0!==n.stroke?n.stroke:null,this.pa=void 0!==n.offsetX?n.offsetX:0,this.ya=void 0!==n.offsetY?n.offsetY:0,this.ma=n.backgroundFill?n.backgroundFill:null,this.ba=n.backgroundStroke?n.backgroundStroke:null,this.Se=void 0===n.padding?null:n.padding}return t.prototype.clone=function(){var n=this.getScale();return new t({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(n)?n.slice():n,text:this.getText(),textAlign:this.getTextAlign(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()})},t.prototype.getOverflow=function(){return this.da},t.prototype.getFont=function(){return this.ca},t.prototype.getMaxAngle=function(){return this.la},t.prototype.getPlacement=function(){return this.va},t.prototype.getOffsetX=function(){return this.pa},t.prototype.getOffsetY=function(){return this.ya},t.prototype.getFill=function(){return this.As},t.prototype.getRotateWithView=function(){return this.Ss},t.prototype.getRotation=function(){return this.Pr},t.prototype.getScale=function(){return this.Ms},t.prototype.getScaleArray=function(){return this.Ts},t.prototype.getStroke=function(){return this.Is},t.prototype.getText=function(){return this.Ji},t.prototype.getTextAlign=function(){return this.fa},t.prototype.getTextBaseline=function(){return this.ha},t.prototype.getBackgroundFill=function(){return this.ma},t.prototype.getBackgroundStroke=function(){return this.ba},t.prototype.getPadding=function(){return this.Se},t.prototype.setOverflow=function(t){this.da=t},t.prototype.setFont=function(t){this.ca=t},t.prototype.setMaxAngle=function(t){this.la=t},t.prototype.setOffsetX=function(t){this.pa=t},t.prototype.setOffsetY=function(t){this.ya=t},t.prototype.setPlacement=function(t){this.va=t},t.prototype.setRotateWithView=function(t){this.Ss=t},t.prototype.setFill=function(t){this.As=t},t.prototype.setRotation=function(t){this.Pr=t},t.prototype.setScale=function(t){this.Ms=t,this.Ts=Ya(void 0!==t?t:1)},t.prototype.setStroke=function(t){this.Is=t},t.prototype.setText=function(t){this.Ji=t},t.prototype.setTextAlign=function(t){this.fa=t},t.prototype.setTextBaseline=function(t){this.ha=t},t.prototype.setBackgroundFill=function(t){this.ma=t},t.prototype.setBackgroundStroke=function(t){this.ba=t},t.prototype.setPadding=function(t){this.Se=t},t}(),Iv=function(){function t(t){this.ga,this.wa,this.xa,this.ka=void 0===t||t,this._a=0}return t.prototype.insertItem=function(t){var n={prev:void 0,next:void 0,data:t},e=this.xa;if(e){var r=e.next;n.prev=e,n.next=r,e.next=n,r&&(r.prev=n),e===this.wa&&(this.wa=n)}else this.ga=n,this.wa=n,this.ka&&(n.next=n,n.prev=n);this.xa=n,this._a++},t.prototype.removeItem=function(){var t=this.xa;if(t){var n=t.next,e=t.prev;n&&(n.prev=e),e&&(e.next=n),this.xa=n||e,this.ga===this.wa?(this.xa=void 0,this.ga=void 0,this.wa=void 0):this.ga===t?this.ga=this.xa:this.wa===t&&(this.wa=e?this.xa.prev:this.xa),this._a--}},t.prototype.firstItem=function(){if(this.xa=this.ga,this.xa)return this.xa.data},t.prototype.lastItem=function(){if(this.xa=this.wa,this.xa)return this.xa.data},t.prototype.nextItem=function(){if(this.xa&&this.xa.next)return this.xa=this.xa.next,this.xa.data},t.prototype.getNextItem=function(){if(this.xa&&this.xa.next)return this.xa.next.data},t.prototype.prevItem=function(){if(this.xa&&this.xa.prev)return this.xa=this.xa.prev,this.xa.data},t.prototype.getPrevItem=function(){if(this.xa&&this.xa.prev)return this.xa.prev.data},t.prototype.getCurrItem=function(){if(this.xa)return this.xa.data},t.prototype.setFirstItem=function(){this.ka&&this.xa&&(this.ga=this.xa,this.wa=this.xa.prev)},t.prototype.concat=function(t){if(t.xa){if(this.xa){var n=this.xa.next;this.xa.next=t.ga,t.ga.prev=this.xa,n.prev=t.wa,t.wa.next=n,this._a+=t._a}else this.xa=t.xa,this.ga=t.ga,this.wa=t.wa,this._a=t._a;t.xa=void 0,t.ga=void 0,t.wa=void 0,t._a=0}},t.prototype.getLength=function(){return this._a},t}(),Pv=e(7072),Dv=function(){function t(t){this.Sa=new Pv(t),this.Ma={}}return t.prototype.insert=function(t,n){var e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:n};this.Sa.insert(e),this.Ma[o(n)]=e},t.prototype.load=function(t,n){for(var e=new Array(n.length),r=0,i=n.length;rthis.Da/2){var n=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];n[0][0]-m>this.Da/2&&(n[0][0]-=this.Da),n[1][0]-m>this.Da/2&&(n[1][0]-=this.Da),n[2][0]-m>this.Da/2&&(n[2][0]-=this.Da);var e=Math.min(n[0][0],n[1][0],n[2][0]);Math.max(n[0][0],n[1][0],n[2][0])-e.5&&f<1,v=!1;if(u>0){if(this.Oa.isGlobal()&&this.Na)v=Jn(wn([t,n,e,r]))/this.Na>.25||v;!l&&this.Ta.isGlobal()&&f&&(v=f>.25||v)}if(!(!v&&this.Aa&&isFinite(c[0])&&isFinite(c[1])&&isFinite(c[2])&&isFinite(c[3]))||Qn(c,this.Aa)){var d=0;if(!(v||isFinite(i[0])&&isFinite(i[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(a[0])&&isFinite(a[1])))if(u>0)v=!0;else if(1!=(d=(isFinite(i[0])&&isFinite(i[1])?0:8)+(isFinite(o[0])&&isFinite(o[1])?0:4)+(isFinite(s[0])&&isFinite(s[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1))&&2!=d&&4!=d&&8!=d)return;if(u>0){if(!v){var p=[(t[0]+e[0])/2,(t[1]+e[1])/2],y=this.Ea(p),m=void 0;if(l)m=(pe(i[0],h)+pe(s[0],h))/2-pe(y[0],h);else m=(i[0]+s[0])/2-y[0];var b=(i[1]+s[1])/2-y[1];v=m*m+b*b>this.Ca}if(v){if(Math.abs(t[0]-e[0])<=Math.abs(t[1]-e[1])){var g=[(n[0]+e[0])/2,(n[1]+e[1])/2],w=this.Ea(g),x=[(r[0]+t[0])/2,(r[1]+t[1])/2],k=this.Ea(x);this.za(t,n,g,x,i,o,w,k,u-1),this.za(x,g,e,r,k,w,s,a,u-1)}else{var _=[(t[0]+n[0])/2,(t[1]+n[1])/2],S=this.Ea(_),M=[(e[0]+r[0])/2,(e[1]+r[1])/2],j=this.Ea(M);this.za(t,_,M,r,i,S,j,a,u-1),this.za(_,n,e,M,S,o,s,j,u-1)}return}}if(l){if(!this.Pa)return;this.Ia=!0}0==(11&d)&&this.La(t,e,r,i,s,a),0==(14&d)&&this.La(t,e,n,i,s,o),d&&(0==(13&d)&&this.La(n,r,t,o,a,i),0==(7&d)&&this.La(n,r,e,o,a,s))}},t.prototype.calculateSourceExtent=function(){var t=[1/0,1/0,-1/0,-1/0];return this.Ra.forEach((function(n,e,r){var i=n.source;Nn(t,i[0]),Nn(t,i[1]),Nn(t,i[2])})),t},t.prototype.getTriangles=function(){return this.Ra},t}(),Lv=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Fv=function(t){function n(n,e,r,i,o,s,a,u,c,f,h,l){var v=t.call(this,o,ht)||this;v.Fa=void 0!==h&&h,v.Ga=l,v.Rt=a,v.Ua=u,v.Ut=null,v.Ba=e,v.qa=i,v.$a=s||o,v.Va=[],v.Za=null,v.Wa=0;var d=i.getTileCoordExtent(v.$a),p=v.qa.getExtent(),y=v.Ba.getExtent(),m=p?Kn(d,p):d;if(0===Bn(m))return v.state=pt,v;var b=n.getExtent();b&&(y=y?Kn(y,b):b);var g=i.getResolution(v.$a[0]),w=If(n,r,m,g);if(!isFinite(w)||w<=0)return v.state=pt,v;var x=void 0!==f?f:.5;if(v.Ha=new zv(n,r,m,y,w*x,g),0===v.Ha.getTriangles().length)return v.state=pt,v;v.Wa=e.getZForResolution(w);var k=v.Ha.calculateSourceExtent();if(y&&(n.canWrapX()?(k[1]=ae(k[1],y[1],y[3]),k[3]=ae(k[3],y[1],y[3])):k=Kn(k,y)),Bn(k)){for(var _=e.getTileRangeForExtentAndZ(k,v.Wa),S=_.minX;S<=_.maxX;S++)for(var M=_.minY;M<=_.maxY;M++){var j=c(v.Wa,S,M,a);j&&v.Va.push(j)}0===v.Va.length&&(v.state=pt)}else v.state=pt;return v}return Lv(n,t),n.prototype.getImage=function(){return this.Ut},n.prototype.Ka=function(){var t=[];if(this.Va.forEach(function(n,e,r){n&&n.getState()==vt&&t.push({extent:this.Ba.getTileCoordExtent(n.tileCoord),image:n.getImage()})}.bind(this)),this.Va.length=0,0===t.length)this.state=dt;else{var n=this.$a[0],e=this.qa.getTileSize(n),r="number"==typeof e?e:e[0],i="number"==typeof e?e:e[1],o=this.qa.getResolution(n),s=this.Ba.getResolution(this.Wa),a=this.qa.getTileCoordExtent(this.$a);this.Ut=Pf(r,i,this.Rt,s,this.Ba.getExtent(),o,a,this.Ha,t,this.Ua,this.Fa,this.Ga),this.state=vt}this.changed()},n.prototype.load=function(){if(this.state==ht){this.state=lt,this.changed();var t=0;this.Za=[],this.Va.forEach(function(n,e,r){var i=n.getState();if(i==ht||i==lt){t++;var o=K(n,P,(function(e){var r=n.getState();r!=vt&&r!=dt&&r!=pt||(Y(o),0===--t&&(this.Xa(),this.Ka()))}),this);this.Za.push(o)}}.bind(this)),0===t?setTimeout(this.Ka.bind(this),0):this.Va.forEach((function(t,n,e){t.getState()==ht&&t.load()}))}},n.prototype.Xa=function(){this.Za.forEach(Y),this.Za=null},n}(xt),Gv="tileloadstart",Uv="tileloadend",Bv="tileloaderror",qv=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function $v(t){return t?Array.isArray(t)?function(n){return t}:"function"==typeof t?t:function(n){return[t]}:null}var Vv=function(t){function n(n){var e=t.call(this)||this;e.projection=lr(n.projection),e.Ya=$v(n.attributions),e.Ja=void 0===n.attributionsCollapsible||n.attributionsCollapsible,e.loading=!1,e.nn=void 0!==n.state?n.state:ss,e.Qa=void 0!==n.wrapX&&n.wrapX,e.viewResolver=null,e.viewRejector=null;var r=e;return e.tu=new Promise((function(t,n){r.viewResolver=t,r.viewRejector=n})),e}return qv(n,t),n.prototype.getAttributions=function(){return this.Ya},n.prototype.getAttributionsCollapsible=function(){return this.Ja},n.prototype.getProjection=function(){return this.projection},n.prototype.getResolutions=function(){return r()},n.prototype.getView=function(){return this.tu},n.prototype.getState=function(){return this.nn},n.prototype.getWrapX=function(){return this.Qa},n.prototype.getContextOptions=function(){},n.prototype.refresh=function(){this.changed()},n.prototype.setAttributions=function(t){this.Ya=$v(t),this.changed()},n.prototype.setState=function(t){this.nn=t,this.changed()},n}(it),Zv=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Wv=function(t){function n(n){var e=t.call(this,{attributions:n.attributions,attributionsCollapsible:n.attributionsCollapsible,projection:n.projection,state:n.state,wrapX:n.wrapX})||this;e.on,e.once,e.un,e.nu=void 0!==n.opaque&&n.opaque,e.eu=void 0!==n.tilePixelRatio?n.tilePixelRatio:1,e.tileGrid=void 0!==n.tileGrid?n.tileGrid:null;var r=n.tileGrid;return r&&Ya(r.getTileSize(r.getMinZoom()),[256,256]),e.tileCache=new Fc(n.cacheSize||0),e.tmpSize=[0,0],e.Oi=n.key||"",e.tileOptions={transition:n.transition},e.zDirection=n.zDirection?n.zDirection:0,e}return Zv(n,t),n.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},n.prototype.expireCache=function(t,n){var e=this.getTileCacheForProjection(t);e&&e.expireCache(n)},n.prototype.forEachLoadedTile=function(t,n,e,r){var i=this.getTileCacheForProjection(t);if(!i)return!1;for(var o,s,a,u=!0,c=e.minX;c<=e.maxX;++c)for(var f=e.minY;f<=e.maxY;++f)s=Rc(n,c,f),a=!1,i.containsKey(s)&&(a=(o=i.get(s)).getState()===vt)&&(a=!1!==r(o)),a||(u=!1);return u},n.prototype.getGutterForProjection=function(t){return 0},n.prototype.getKey=function(){return this.Oi},n.prototype.setKey=function(t){this.Oi!==t&&(this.Oi=t,this.changed())},n.prototype.getOpaque=function(t){return this.nu},n.prototype.getResolutions=function(){return this.tileGrid.getResolutions()},n.prototype.getTile=function(t,n,e,i,o){return r()},n.prototype.getTileGrid=function(){return this.tileGrid},n.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:zf(t)},n.prototype.getTileCacheForProjection=function(t){return St(wr(this.getProjection(),t),68),this.tileCache},n.prototype.getTilePixelRatio=function(t){return this.eu},n.prototype.getTilePixelSize=function(t,n,e){var r=this.getTileGridForProjection(e),i=this.getTilePixelRatio(n),o=Ya(r.getTileSize(t),this.tmpSize);return 1==i?o:Xa(o,i,this.tmpSize)},n.prototype.getTileCoordForTileUrlFunction=function(t,n){var e=void 0!==n?n:this.getProjection(),r=this.getTileGridForProjection(e);return this.getWrapX()&&e.isGlobal()&&(t=Lf(r,t,e)),zc(t,r)?t:null},n.prototype.clear=function(){this.tileCache.clear()},n.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},n.prototype.updateCacheSize=function(t,n){var e=this.getTileCacheForProjection(n);t>e.highWaterMark&&(e.highWaterMark=t)},n.prototype.useTile=function(t,n,e,r){},n}(Vv),Hv=function(t){function n(n,e){var r=t.call(this,n)||this;return r.tile=e,r}return Zv(n,t),n}(h),Kv=Wv,Xv=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Yv=function(t){function n(e){var r=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tilePixelRatio:e.tilePixelRatio,wrapX:e.wrapX,transition:e.transition,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this;return r.ru=r.tileUrlFunction===n.prototype.tileUrlFunction,r.tileLoadFunction=e.tileLoadFunction,e.tileUrlFunction&&(r.tileUrlFunction=e.tileUrlFunction),r.urls=null,e.urls?r.setUrls(e.urls):e.url&&r.setUrl(e.url),r.iu={},r}return Xv(n,t),n.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},n.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},n.prototype.getUrls=function(){return this.urls},n.prototype.handleTileChange=function(t){var n,e=t.target,r=o(e),i=e.getState();i==lt?(this.iu[r]=!0,n=Gv):r in this.iu&&(delete this.iu[r],n=i==dt?Bv:i==vt?Uv:void 0),null!=n&&this.dispatchEvent(new Hv(n,e))},n.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},n.prototype.setTileUrlFunction=function(t,n){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==n?this.setKey(n):this.changed()},n.prototype.setUrl=function(t){var n=Hf(t);this.urls=n,this.setUrls(n)},n.prototype.setUrls=function(t){this.urls=t;var n=t.join("\n");this.ru?this.setTileUrlFunction(Vf(t,this.tileGrid),n):this.setKey(n)},n.prototype.tileUrlFunction=function(t,n,e){},n.prototype.useTile=function(t,n,e){var r=Rc(t,n,e);this.tileCache.containsKey(r)&&this.tileCache.get(r)},n}(Kv),Jv=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function Qv(t,n){t.getImage().src=n}var td=function(t){function n(n){var e=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,opaque:n.opaque,projection:n.projection,state:n.state,tileGrid:n.tileGrid,tileLoadFunction:n.tileLoadFunction?n.tileLoadFunction:Qv,tilePixelRatio:n.tilePixelRatio,tileUrlFunction:n.tileUrlFunction,url:n.url,urls:n.urls,wrapX:n.wrapX,transition:n.transition,key:n.key,attributionsCollapsible:n.attributionsCollapsible,zDirection:n.zDirection})||this;return e.crossOrigin=void 0!==n.crossOrigin?n.crossOrigin:null,e.tileClass=void 0!==n.tileClass?n.tileClass:jo,e.tileCacheForProjection={},e.tileGridForProjection={},e.ou=n.reprojectionErrorThreshold,e.Ga=!1===n.imageSmoothing?Ef:void 0,e.su=!1,e}return Jv(n,t),n.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},n.prototype.expireCache=function(t,n){var e=this.getTileCacheForProjection(t);for(var r in this.tileCache.expireCache(this.tileCache==e?n:{}),this.tileCacheForProjection){var i=this.tileCacheForProjection[r];i.expireCache(i==e?n:{})}},n.prototype.getContextOptions=function(){return this.Ga},n.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!wr(this.getProjection(),t)?0:this.getGutter()},n.prototype.getGutter=function(){return 0},n.prototype.getKey=function(){return t.prototype.getKey.call(this)+(this.Ga?"\n"+JSON.stringify(this.Ga):"")},n.prototype.getOpaque=function(n){return!(this.getProjection()&&n&&!wr(this.getProjection(),n))&&t.prototype.getOpaque.call(this,n)},n.prototype.getTileGridForProjection=function(t){var n=this.getProjection();if(!this.tileGrid||n&&!wr(n,t)){var e=o(t);return e in this.tileGridForProjection||(this.tileGridForProjection[e]=zf(t)),this.tileGridForProjection[e]}return this.tileGrid},n.prototype.getTileCacheForProjection=function(t){var n=this.getProjection();if(!n||wr(n,t))return this.tileCache;var e=o(t);return e in this.tileCacheForProjection||(this.tileCacheForProjection[e]=new Fc(this.tileCache.highWaterMark)),this.tileCacheForProjection[e]},n.prototype.au=function(t,n,e,r,i,o){var s=[t,n,e],a=this.getTileCoordForTileUrlFunction(s,i),u=a?this.tileUrlFunction(a,r,i):void 0,c=new this.tileClass(s,void 0!==u?ht:pt,void 0!==u?u:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return c.key=o,c.addEventListener(P,this.handleTileChange.bind(this)),c},n.prototype.getTile=function(t,n,e,r,i){var o=this.getProjection();if(o&&i&&!wr(o,i)){var s=this.getTileCacheForProjection(i),a=[t,n,e],u=void 0,c=Ic(a);s.containsKey(c)&&(u=s.get(c));var f=this.getKey();if(u&&u.key==f)return u;var h=this.getTileGridForProjection(o),l=this.getTileGridForProjection(i),v=this.getTileCoordForTileUrlFunction(a,i),d=new Fv(o,h,i,l,a,v,this.getTilePixelRatio(r),this.getGutter(),function(t,n,e,r){return this.getTileInternal(t,n,e,r,o)}.bind(this),this.ou,this.su,this.Ga);return d.key=f,u?(d.interimTile=u,d.refreshInterimChain(),s.replace(c,d)):s.set(c,d),d}return this.getTileInternal(t,n,e,r,o||i)},n.prototype.getTileInternal=function(t,n,e,r,i){var o=null,s=Rc(t,n,e),a=this.getKey();if(this.tileCache.containsKey(s)){if((o=this.tileCache.get(s)).key!=a){var u=o;o=this.au(t,n,e,r,i,a),u.getState()==ht?o.interimTile=u.interimTile:o.interimTile=u,o.refreshInterimChain(),this.tileCache.replace(s,o)}}else o=this.au(t,n,e,r,i,a),this.tileCache.set(s,o);return o},n.prototype.setRenderReprojectionEdges=function(t){if(this.su!=t){for(var n in this.su=t,this.tileCacheForProjection)this.tileCacheForProjection[n].clear();this.changed()}},n.prototype.setTileGridForProjection=function(t,n){var e=lr(t);if(e){var r=o(e);r in this.tileGridForProjection||(this.tileGridForProjection[r]=n)}},n}(Yv),nd=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function ed(t){var n,e,r=t[0],i=new Array(r),o=1<>=1;return i.join("")}for(var rd=function(t){function n(n){var e=this,r=void 0!==n.hidpi&&n.hidpi;return(e=t.call(this,{cacheSize:n.cacheSize,crossOrigin:"anonymous",imageSmoothing:n.imageSmoothing,opaque:!0,projection:lr("EPSG:3857"),reprojectionErrorThreshold:n.reprojectionErrorThreshold,state:os,tileLoadFunction:n.tileLoadFunction,tilePixelRatio:r?2:1,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition,zDirection:n.zDirection})||this).uu=r,e.cu=void 0!==n.culture?n.culture:"en-us",e.fu=void 0!==n.maxZoom?n.maxZoom:-1,e.hu=n.key,e.lu=n.imagerySet,of("https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+e.lu+"?uriScheme=https&include=ImageryProviders&key="+e.hu+"&c="+e.cu,e.handleImageryMetadataResponse.bind(e),void 0,"jsonp"),e}return nd(n,t),n.prototype.getApiKey=function(){return this.hu},n.prototype.getImagerySet=function(){return this.lu},n.prototype.handleImageryMetadataResponse=function(t){if(200==t.statusCode&&"OK"==t.statusDescription&&"ValidCredentials"==t.authenticationResultCode&&1==t.resourceSets.length&&1==t.resourceSets[0].resources.length){var n=t.resourceSets[0].resources[0],e=-1==this.fu?n.zoomMax:this.fu,r=qf(this.getProjection()),i=this.uu?2:1,o=n.imageWidth==n.imageHeight?n.imageWidth/i:[n.imageWidth/i,n.imageHeight/i],s=Gf({extent:r,minZoom:n.zoomMin,maxZoom:e,tileSize:o});this.tileGrid=s;var a=this.cu,u=this.uu;if(this.tileUrlFunction=Zf(n.imageUrlSubdomains.map((function(t){var e=[0,0,0],r=n.imageUrl.replace("{subdomain}",t).replace("{culture}",a);return function(t,n,i){if(t){Cc(t[0],t[1],t[2],e);var o=r;return u&&(o+="&dpi=d1&device=mobile"),o.replace("{quadkey}",ed(e))}}}))),n.imageryProviders){var c=xr(lr("EPSG:4326"),this.getProjection());this.setAttributions(function(t){var e=[],r=t.viewState,i=this.getTileGrid(),o=i.getZForResolution(r.resolution,this.zDirection),s=i.getTileCoordForCoordAndZ(r.center,o)[0];return n.imageryProviders.map((function(n){for(var r=!1,i=n.coverageAreas,o=0,a=i.length;o=u.zoomMin&&s<=u.zoomMax){var f=u.bbox;if(Qn(ie([f[1],f[0],f[3],f[2]],c),t.extent)){r=!0;break}}}r&&e.push(n.attribution)})),e.push('Terms of Use'),e}.bind(this))}this.setState(ss)}else this.setState(as)},n}(td),id=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),od=function(t){function n(n){var e=n||{},r=void 0!==e.projection?e.projection:"EPSG:3857",i=void 0!==e.tileGrid?e.tileGrid:Gf({extent:qf(r),maxResolution:e.maxResolution,maxZoom:e.maxZoom,minZoom:e.minZoom,tileSize:e.tileSize});return t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,imageSmoothing:e.imageSmoothing,opaque:e.opaque,projection:r,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this}return id(n,t),n}(td),sd=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),ad=function(t){function n(n){var e=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,maxZoom:void 0!==n.maxZoom?n.maxZoom:18,minZoom:n.minZoom,projection:n.projection,transition:n.transition,wrapX:n.wrapX,zDirection:n.zDirection})||this;return e.vu=n.account,e.du=n.map||"",e.pu=n.config||{},e.yu={},e.mu(),e}return sd(n,t),n.prototype.getConfig=function(){return this.pu},n.prototype.updateConfig=function(t){O(this.pu,t),this.mu()},n.prototype.setConfig=function(t){this.pu=t||{},this.mu()},n.prototype.mu=function(){var t=JSON.stringify(this.pu);if(this.yu[t])this.bu(this.yu[t]);else{var n="https://"+this.vu+".carto.com/api/v1/map";this.du&&(n+="/named/"+this.du);var e=new XMLHttpRequest;e.addEventListener("load",this.gu.bind(this,t)),e.addEventListener("error",this.wu.bind(this)),e.open("POST",n),e.setRequestHeader("Content-type","application/json"),e.send(JSON.stringify(this.pu))}},n.prototype.gu=function(t,n){var e=n.target;if(!e.status||e.status>=200&&e.status<300){var r=void 0;try{r=JSON.parse(e.responseText)}catch(t){return void this.setState(as)}this.bu(r),this.yu[t]=r,this.setState(ss)}else this.setState(as)},n.prototype.wu=function(t){this.setState(as)},n.prototype.bu=function(t){var n="https://"+t.cdn_url.https+"/"+this.vu+"/api/v1/map/"+t.layergroupid+"/{z}/{x}/{y}.png";this.setUrl(n)},n}(od),ud="addfeature",cd="changefeature",fd="clear",hd="removefeature",ld="featuresloadstart",vd="featuresloadend",dd="featuresloaderror",pd=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),yd=function(t){function n(n,e,r){var i=t.call(this,n)||this;return i.feature=e,i.features=r,i}return pd(n,t),n}(h),md=function(t){function n(n){var e=this,r=n||{};(e=t.call(this,{attributions:r.attributions,projection:void 0,state:ss,wrapX:void 0===r.wrapX||r.wrapX})||this).on,e.once,e.un,e.B=j,e.Ci=r.format,e.xu=void 0===r.overlaps||r.overlaps,e.Ii=r.url,void 0!==r.loader?e.B=r.loader:void 0!==e.Ii&&(St(e.Ci,7),e.B=nf(e.Ii,e.Ci)),e.ku=void 0!==r.strategy?r.strategy:ef;var i,o,s=void 0===r.useSpatialIndex||r.useSpatialIndex;return e._u=s?new Dv:null,e.Su=new Dv,e.Mu=0,e.ju={},e.Tu={},e.Ou={},e.Eu={},e.Au=null,Array.isArray(r.features)?o=r.features:r.features&&(o=(i=r.features).getArray()),s||void 0!==i||(i=new ft(o)),void 0!==o&&e.addFeaturesInternal(o),void 0!==i&&e.Cu(i),e}return pd(n,t),n.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},n.prototype.addFeatureInternal=function(t){var n=o(t);if(this.Ru(n,t)){this.Iu(n,t);var e=t.getGeometry();if(e){var r=e.getExtent();this._u&&this._u.insert(r,t)}else this.ju[n]=t;this.dispatchEvent(new yd(ud,t))}else this.Au&&this.Au.remove(t)},n.prototype.Iu=function(t,n){this.Eu[t]=[K(n,P,this.Pu,this),K(n,l,this.Pu,this)]},n.prototype.Ru=function(t,n){var e=!0,r=n.getId();return void 0!==r&&(r.toString()in this.Tu?e=!1:this.Tu[r.toString()]=n),e&&(St(!(t in this.Ou),30),this.Ou[t]=n),e},n.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},n.prototype.addFeaturesInternal=function(t){for(var n=[],e=[],r=[],i=0,s=t.length;i0},n.prototype.refresh=function(){this.clear(!0),this.Su.clear(),t.prototype.refresh.call(this)},n.prototype.removeLoadedExtent=function(t){var n,e=this.Su;e.forEachInExtent(t,(function(e){if(In(e.extent,t))return n=e,!0})),n&&e.remove(n)},n.prototype.removeFeature=function(t){var n=o(t);n in this.ju?delete this.ju[n]:this._u&&this._u.remove(t),this.removeFeatureInternal(t),this.changed()},n.prototype.removeFeatureInternal=function(t){var n=o(t);this.Eu[n].forEach(Y),delete this.Eu[n];var e=t.getId();void 0!==e&&delete this.Tu[e.toString()],delete this.Ou[n],this.dispatchEvent(new yd(hd,t))},n.prototype.Du=function(t){var n=!1;for(var e in this.Tu)if(this.Tu[e]===t){delete this.Tu[e],n=!0;break}return n},n.prototype.setLoader=function(t){this.B=t},n.prototype.setUrl=function(t){St(this.Ci,7),this.Ii=t,this.setLoader(nf(t,this.Ci))},n}(Vv),bd=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),gd=function(t){function n(n){var e=t.call(this,{attributions:n.attributions,wrapX:n.wrapX})||this;return e.resolution=void 0,e.distance=void 0!==n.distance?n.distance:20,e.minDistance=n.minDistance||0,e.interpolationRatio=0,e.features=[],e.geometryFunction=n.geometryFunction||function(t){var n=t.getGeometry();return St(n.getType()==Rt.POINT,10),n},e.Nu=n.createCluster,e.source=null,e.zu=e.refresh.bind(e),e.updateDistance(e.distance,e.minDistance),e.setSource(n.source||null),e}return bd(n,t),n.prototype.clear=function(n){this.features.length=0,t.prototype.clear.call(this,n)},n.prototype.getDistance=function(){return this.distance},n.prototype.getSource=function(){return this.source},n.prototype.loadFeatures=function(t,n,e){this.source.loadFeatures(t,n,e),n!==this.resolution&&(this.resolution=n,this.refresh())},n.prototype.setDistance=function(t){this.updateDistance(t,this.minDistance)},n.prototype.setMinDistance=function(t){this.updateDistance(this.distance,t)},n.prototype.getMinDistance=function(){return this.minDistance},n.prototype.setSource=function(t){this.source&&this.source.removeEventListener(P,this.zu),this.source=t,t&&t.addEventListener(P,this.zu),this.refresh()},n.prototype.refresh=function(){this.clear(),this.cluster(),this.addFeatures(this.features)},n.prototype.updateDistance=function(t,n){var e=0===t?0:Math.min(n,t)/t,r=t!==this.distance||this.interpolationRatio!==e;this.distance=t,this.minDistance=n,this.interpolationRatio=e,r&&this.refresh()},n.prototype.cluster=function(){if(void 0!==this.resolution&&this.source)for(var t=[1/0,1/0,-1/0,-1/0],n=this.distance*this.resolution,e=this.source.getFeatures(),r={},i=0,s=e.length;i=0;--r){var i=this.geometryFunction(t[r]);i?He(e,i.getCoordinates()):t.splice(r,1)}nr(e,1/t.length);var o=Vn(n),s=this.interpolationRatio,a=new wi([e[0]*(1-s)+o[0]*s,e[1]*(1-s)+o[1]*s]);return this.Nu?this.Nu(a,t):new Tt({geometry:a,features:t})},n}(md),wd=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),xd=function(t){function n(n){var e=this,r=void 0===n.projection?"EPSG:3857":n.projection,i=n.tileGrid;return void 0===i&&r&&(i=Gf({extent:qf(r),maxResolution:n.maxResolution,maxZoom:n.maxZoom,minZoom:n.minZoom,tileSize:n.tileSize})),(e=t.call(this,{cacheSize:.1,projection:r,tileGrid:i,opaque:n.opaque,state:n.state,tilePixelRatio:n.tilePixelRatio,wrapX:n.wrapX,transition:n.transition})||this).iu={},e.B=n.loader,e.sr=e.sr.bind(e),e.bandCount=void 0===n.bandCount?4:n.bandCount,e}return wd(n,t),n.prototype.setLoader=function(t){this.B=t},n.prototype.getTile=function(t,n,e,r,i){var o=Rc(t,n,e);if(this.tileCache.containsKey(o))return this.tileCache.get(o);var s=this.B;var a=new _t(O({tileCoord:[t,n,e],loader:function(){return s(t,n,e)}},this.tileOptions));return a.key=this.getKey(),a.addEventListener(P,this.sr),this.tileCache.set(o,a),a},n.prototype.sr=function(t){var n,e=t.target,r=o(e),i=e.getState();i==lt?(this.iu[r]=!0,n=Gv):r in this.iu&&(delete this.iu[r],n=i==dt?Bv:i==vt?Uv:void 0),n&&this.dispatchEvent(new Hv(n,e))},n}(Kv),kd=new ArrayBuffer(4),_d=new Float32Array(kd),Sd=new Uint32Array(kd),Md=new Uint32Array(512),jd=new Uint32Array(512),Td=0;Td<256;++Td){var Od=Td-127;Od<-27?(Md[Td]=0,Md[256|Td]=32768,jd[Td]=24,jd[256|Td]=24):Od<-14?(Md[Td]=1024>>-Od-14,Md[256|Td]=1024>>-Od-14|32768,jd[Td]=-Od-1,jd[256|Td]=-Od-1):Od<=15?(Md[Td]=Od+15<<10,Md[256|Td]=Od+15<<10|32768,jd[Td]=13,jd[256|Td]=13):Od<128?(Md[Td]=31744,Md[256|Td]=64512,jd[Td]=24,jd[256|Td]=24):(Md[Td]=31744,Md[256|Td]=64512,jd[Td]=13,jd[256|Td]=13)}var Ed=new Uint32Array(2048),Ad=new Uint32Array(64),Cd=new Uint32Array(64);Ed[0]=0;for(var Rd=1;Rd<1024;++Rd){for(var Id=Rd<<13,Pd=0;0==(8388608&Id);)Pd-=8388608,Id<<=1;Id&=-8388609,Pd+=947912704,Ed[Rd]=Id|Pd}for(var Dd=1024;Dd<2048;++Dd)Ed[Dd]=939524096+(Dd-1024<<13);Ad[0]=0;for(var Nd=1;Nd<31;++Nd)Ad[Nd]=Nd<<23;Ad[31]=1199570944,Ad[32]=2147483648;for(var zd=33;zd<63;++zd)Ad[zd]=2147483648+(zd-32<<23);Ad[63]=3347054592,Cd[0]=0;for(var Ld=1;Ld<64;++Ld)Cd[Ld]=32===Ld?0:1024;function Fd(t){var n=t>>10;return Sd[0]=Ed[Cd[n]+(1023&t)]+Ad[n],_d[0]}var Gd=Reflect.getPrototypeOf(Uint8Array).prototype,Ud=Reflect.getOwnPropertyDescriptor(Gd,Symbol.toStringTag).get;function Bd(t){return void 0!==Ud.call(t)}var qd=Object.prototype.toString;function $d(t){return!!ArrayBuffer.isView(t)&&(!Bd(t)&&"[object DataView]"===qd.call(t))}function Vd(t,n){if(!$d(t))throw new TypeError("First argument to getFloat16 function must be a DataView");for(var e=arguments.length,r=new Array(e>2?e-2:0),i=2;i>24)/500+s,u=s-(t[i+2]<<24>>24)/200,c=void 0,f=void 0,h=void 0;f=-.9689*(a=.95047*(a*a*a>.008856?a*a*a:(a-16/116)/7.787))+1.8758*(s=1*(s*s*s>.008856?s*s*s:(s-16/116)/7.787))+.0415*(u=1.08883*(u*u*u>.008856?u*u*u:(u-16/116)/7.787)),h=.0557*a+-.204*s+1.057*u,c=(c=3.2406*a+-1.5372*s+-.4986*u)>.0031308?1.055*Math.pow(c,1/2.4)-.055:12.92*c,f=f>.0031308?1.055*Math.pow(f,1/2.4)-.055:12.92*f,h=h>.0031308?1.055*Math.pow(h,1/2.4)-.055:12.92*h,r[o]=255*Math.max(0,Math.min(1,c)),r[o+1]=255*Math.max(0,Math.min(1,f)),r[o+2]=255*Math.max(0,Math.min(1,h))}return r}function rp(t,n,e,r,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void e(t)}a.done?n(u):Promise.resolve(u).then(r,i)}function ip(t){return function(){var n=this,e=arguments;return new Promise((function(r,i){var o=t.apply(n,e);function s(t){rp(o,r,i,s,a,"next",t)}function a(t){rp(o,r,i,s,a,"throw",t)}s(void 0)}))}}var op=new Map;function sp(t,n){Array.isArray(t)||(t=[t]),t.forEach((function(t){return op.set(t,n)}))}function ap(t){return up.apply(this,arguments)}function up(){return(up=ip(regeneratorRuntime.mark((function t(n){var e,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=op.get(n.Compression)){t.next=3;break}throw new Error("Unknown compression method identifier: ".concat(n.Compression));case 3:return t.next=5,e();case 5:return r=t.sent,t.abrupt("return",new r(n));case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function cp(t,n,e){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return new(Object.getPrototypeOf(t).constructor)(n*e*r)}function fp(t,n,e,r,i){var o=n/r,s=e/i;return t.map((function(t){for(var a=cp(t,r,i),u=0;u5&&void 0!==arguments[5]?arguments[5]:"nearest";switch(o.toLowerCase()){case"nearest":return fp(t,n,e,r,i);case"bilinear":case"linear":return lp(t,n,e,r,i);default:throw new Error("Unsupported resampling method: '".concat(o,"'"))}}function dp(t,n,e,r,i,o){for(var s=n/r,a=e/i,u=cp(t,r,i,o),c=0;c6&&void 0!==arguments[6]?arguments[6]:"nearest";switch(s.toLowerCase()){case"nearest":return dp(t,n,e,r,i,o);case"bilinear":case"linear":return pp(t,n,e,r,i,o);default:throw new Error("Unsupported resampling method: '".concat(s,"'"))}}function mp(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==e)return;var r,i,o=[],s=!0,a=!1;try{for(e=e.call(t);!(s=(r=e.next()).done)&&(o.push(r.value),!n||o.length!==n);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==e.return||e.return()}finally{if(a)throw i}}return o}(t,n)||function(t,n){if(!t)return;if("string"==typeof t)return bp(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return bp(t,n)}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bp(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e>8-i-w&f;else if(w+i<=16)c[b]=a.getUint16(g)>>16-i-w&f;else if(w+i<=24){var x=a.getUint16(g)<<8|a.getUint8(g+2);c[b]=x>>24-i-w&f}else c[b]=a.getUint32(g)>>32-i-w&f}}return c.buffer}sp([void 0,1],(function(){return e.e(947).then(e.bind(e,6947)).then((function(t){return t.default}))})),sp(5,(function(){return e.e(25).then(e.bind(e,4025)).then((function(t){return t.default}))})),sp(6,(function(){throw new Error("old style JPEG compression is not supported.")})),sp(7,(function(){return e.e(410).then(e.bind(e,2410)).then((function(t){return t.default}))})),sp([8,32946],(function(){return Promise.all([e.e(760),e.e(998)]).then(e.bind(e,5998)).then((function(t){return t.default}))})),sp(32773,(function(){return e.e(949).then(e.bind(e,4949)).then((function(t){return t.default}))})),sp(34887,(function(){return Promise.all([e.e(760),e.e(830)]).then(e.bind(e,9830)).then((function(t){return t.default}))}));var jp=function(){function t(n,e,r,i,o,s){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.fileDirectory=n,this.geoKeys=e,this.dataView=r,this.littleEndian=i,this.tiles=o?{}:null,this.isTiled=!n.StripOffsets;var a=n.PlanarConfiguration;if(this.planarConfiguration=void 0===a?1:a,1!==this.planarConfiguration&&2!==this.planarConfiguration)throw new Error("Invalid planar configuration.");this.source=s}var n,e,r,i,o,s,a;return n=t,(e=[{key:"getFileDirectory",value:function(){return this.fileDirectory}},{key:"getGeoKeys",value:function(){return this.geoKeys}},{key:"getWidth",value:function(){return this.fileDirectory.ImageWidth}},{key:"getHeight",value:function(){return this.fileDirectory.ImageLength}},{key:"getSamplesPerPixel",value:function(){return void 0!==this.fileDirectory.SamplesPerPixel?this.fileDirectory.SamplesPerPixel:1}},{key:"getTileWidth",value:function(){return this.isTiled?this.fileDirectory.TileWidth:this.getWidth()}},{key:"getTileHeight",value:function(){return this.isTiled?this.fileDirectory.TileLength:void 0!==this.fileDirectory.RowsPerStrip?Math.min(this.fileDirectory.RowsPerStrip,this.getHeight()):this.getHeight()}},{key:"getBlockWidth",value:function(){return this.getTileWidth()}},{key:"getBlockHeight",value:function(t){return this.isTiled||(t+1)*this.getTileHeight()<=this.getHeight()?this.getTileHeight():this.getHeight()-t*this.getTileHeight()}},{key:"getBytesPerPixel",value:function(){for(var t=0,n=0;n=this.fileDirectory.BitsPerSample.length)throw new RangeError("Sample index ".concat(t," is out of range."));return Math.ceil(this.fileDirectory.BitsPerSample[t]/8)}},{key:"getReaderForSample",value:function(t){var n=this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1,e=this.fileDirectory.BitsPerSample[t];switch(n){case 1:if(e<=8)return DataView.prototype.getUint8;if(e<=16)return DataView.prototype.getUint16;if(e<=32)return DataView.prototype.getUint32;break;case 2:if(e<=8)return DataView.prototype.getInt8;if(e<=16)return DataView.prototype.getInt16;if(e<=32)return DataView.prototype.getInt32;break;case 3:switch(e){case 16:return function(t,n){return Vd(this,t,n)};case 32:return DataView.prototype.getFloat32;case 64:return DataView.prototype.getFloat64}}throw Error("Unsupported data format/bitsPerSample")}},{key:"getSampleFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1}},{key:"getBitsPerSample",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.fileDirectory.BitsPerSample[t]}},{key:"getArrayForSample",value:function(t,n){return _p(this.getSampleFormat(t),this.getBitsPerSample(t),n)}},{key:"getTileOrStrip",value:(a=wp(regeneratorRuntime.mark((function t(n,e,r,i,o){var s,a,u,c,f,h,l,v,d=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=Math.ceil(this.getWidth()/this.getTileWidth()),a=Math.ceil(this.getHeight()/this.getTileHeight()),c=this.tiles,1===this.planarConfiguration?u=e*s+n:2===this.planarConfiguration&&(u=r*s*a+e*s+n),this.isTiled?(f=this.fileDirectory.TileOffsets[u],h=this.fileDirectory.TileByteCounts[u]):(f=this.fileDirectory.StripOffsets[u],h=this.fileDirectory.StripByteCounts[u]),t.next=7,this.source.fetch([{offset:f,length:h}],o);case 7:return l=t.sent[0],null!==c&&c[u]?v=c[u]:(v=wp(regeneratorRuntime.mark((function t(){var n,r,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.decode(d.fileDirectory,l);case 2:return n=t.sent,r=d.getSampleFormat(),o=d.getBitsPerSample(),Sp(r,o)&&(n=Mp(n,r,d.planarConfiguration,d.getSamplesPerPixel(),o,d.getTileWidth(),d.getBlockHeight(e))),t.abrupt("return",n);case 7:case"end":return t.stop()}}),t)})))(),null!==c&&(c[u]=v)),t.t0=n,t.t1=e,t.t2=r,t.next=14,v;case 14:return t.t3=t.sent,t.abrupt("return",{x:t.t0,y:t.t1,sample:t.t2,data:t.t3});case 16:case"end":return t.stop()}}),t,this)}))),function(t,n,e,r,i){return a.apply(this,arguments)})},{key:"_readRaster",value:(s=wp(regeneratorRuntime.mark((function t(n,e,r,i,o,s,a,u,c){var f,h,l,v,d,p,y,m,b,g,w,x,k,_,S,M,j,T,O,E,A=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(f=this.getTileWidth(),h=this.getTileHeight(),l=this.getWidth(),v=this.getHeight(),d=Math.max(Math.floor(n[0]/f),0),p=Math.min(Math.ceil(n[2]/f),Math.ceil(l/f)),y=Math.max(Math.floor(n[1]/h),0),m=Math.min(Math.ceil(n[3]/h),Math.ceil(v/h)),b=n[2]-n[0],g=this.getBytesPerPixel(),w=[],x=[],k=0;k0&&void 0!==T[0]?T[0]:{},e=n.window,r=n.samples,i=void 0===r?[]:r,o=n.interleave,s=n.pool,a=void 0===s?null:s,u=n.width,c=n.height,f=n.resampleMethod,h=n.fillValue,l=n.signal,!((v=e||[0,0,this.getWidth(),this.getHeight()])[0]>v[2]||v[1]>v[3])){t.next=4;break}throw new Error("Invalid subsets");case 4:if(d=v[2]-v[0],p=v[3]-v[1],y=d*p,m=this.getSamplesPerPixel(),i&&i.length){t.next=12;break}for(b=0;b=m)){t.next=16;break}return t.abrupt("return",Promise.reject(new RangeError("Invalid sample index '".concat(i[g],"'."))));case 16:++g,t.next=13;break;case 19:if(o)x=this.fileDirectory.SampleFormat?Math.max.apply(null,this.fileDirectory.SampleFormat):1,k=Math.max.apply(null,this.fileDirectory.BitsPerSample),w=_p(x,k,y*i.length),h&&w.fill(h);else for(w=[],_=0;_0&&void 0!==O[0]?O[0]:{},e=n.window,r=n.interleave,i=void 0===r||r,o=n.pool,s=void 0===o?null:o,a=n.width,u=n.height,c=n.resampleMethod,f=n.enableAlpha,h=void 0!==f&&f,l=n.signal,!((v=e||[0,0,this.getWidth(),this.getHeight()])[0]>v[2]||v[1]>v[3])){t.next=4;break}throw new Error("Invalid subsets");case 4:if((d=this.fileDirectory.PhotometricInterpretation)!==Xd.Ie.RGB){t.next=9;break}if(p=[0,1,2],this.fileDirectory.ExtraSamples!==Xd.pd.Unspecified&&h)for(p=[],y=0;y0&&void 0!==arguments[0]?arguments[0]:null,n={};if(!this.fileDirectory.GDAL_METADATA)return null;var e=this.fileDirectory.GDAL_METADATA,r=Kd()(e,"Item");null!==t&&(r=r.filter((function(n){return Number(Wd()(n,"sample"))===t})));for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:null,n=this.fileDirectory.ModelPixelScale,e=this.fileDirectory.ModelTransformation;if(n)return[n[0],-n[1],n[2]];if(e)return[e[0],e[5],e[10]];if(t){var r=t.getResolution(),i=mp(r,3),o=i[0],s=i[1],a=i[2];return[o*t.getWidth()/this.getWidth(),s*t.getHeight()/this.getHeight(),a*t.getWidth()/this.getWidth()]}throw new Error("The image does not have an affine transformation.")}},{key:"pixelIsArea",value:function(){return 1===this.geoKeys.GTRasterTypeGeoKey}},{key:"getBoundingBox",value:function(){var t=this.getOrigin(),n=this.getResolution(),e=t[0],r=t[1],i=e+n[0]*this.getWidth(),o=r+n[1]*this.getHeight();return[Math.min(e,i),Math.min(r,o),Math.max(e,i),Math.max(r,o)]}}])&&xp(n.prototype,e),r&&xp(n,r),t}();function Tp(t,n){for(var e=0;e0,i=!0,o=0;o<8;o++){var s=this._dataView.getUint8(t+(n?o:7-o));r&&(i?0!==s&&(s=255&~(s-1),i=!1):s=255&~s),e+=s*Math.pow(256,o)}return r&&(e=-e),e}},{key:"getUint8",value:function(t,n){return this._dataView.getUint8(t,n)}},{key:"getInt8",value:function(t,n){return this._dataView.getInt8(t,n)}},{key:"getUint16",value:function(t,n){return this._dataView.getUint16(t,n)}},{key:"getInt16",value:function(t,n){return this._dataView.getInt16(t,n)}},{key:"getUint32",value:function(t,n){return this._dataView.getUint32(t,n)}},{key:"getInt32",value:function(t,n){return this._dataView.getInt32(t,n)}},{key:"getFloat16",value:function(t,n){return Vd(this._dataView,t,n)}},{key:"getFloat32",value:function(t,n){return this._dataView.getFloat32(t,n)}},{key:"getFloat64",value:function(t,n){return this._dataView.getFloat64(t,n)}}])&&Tp(n.prototype,e),r&&Tp(n,r),t}();function Ep(t,n){for(var e=0;e=t+n}},{key:"readUint8",value:function(t){return this._dataView.getUint8(t-this._sliceOffset,this._littleEndian)}},{key:"readInt8",value:function(t){return this._dataView.getInt8(t-this._sliceOffset,this._littleEndian)}},{key:"readUint16",value:function(t){return this._dataView.getUint16(t-this._sliceOffset,this._littleEndian)}},{key:"readInt16",value:function(t){return this._dataView.getInt16(t-this._sliceOffset,this._littleEndian)}},{key:"readUint32",value:function(t){return this._dataView.getUint32(t-this._sliceOffset,this._littleEndian)}},{key:"readInt32",value:function(t){return this._dataView.getInt32(t-this._sliceOffset,this._littleEndian)}},{key:"readFloat32",value:function(t){return this._dataView.getFloat32(t-this._sliceOffset,this._littleEndian)}},{key:"readFloat64",value:function(t){return this._dataView.getFloat64(t-this._sliceOffset,this._littleEndian)}},{key:"readUint64",value:function(t){var n,e=this.readUint32(t),r=this.readUint32(t+4);if(this._littleEndian){if(n=e+Math.pow(2,32)*r,!Number.isSafeInteger(n))throw new Error("".concat(n," exceeds MAX_SAFE_INTEGER. ")+"Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues");return n}if(n=Math.pow(2,32)*e+r,!Number.isSafeInteger(n))throw new Error("".concat(n," exceeds MAX_SAFE_INTEGER. ")+"Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues");return n}},{key:"readInt64",value:function(t){for(var n=0,e=(128&this._dataView.getUint8(t+(this._littleEndian?7:0)))>0,r=!0,i=0;i<8;i++){var o=this._dataView.getUint8(t+(this._littleEndian?i:7-i));e&&(r?0!==o&&(o=255&~(o-1),r=!1):o=255&~o),n+=o*Math.pow(256,i)}return e&&(n=-n),n}},{key:"readOffset",value:function(t){return this._bigTiff?this.readUint64(t):this.readUint32(t)}}])&&Ep(n.prototype,e),r&&Ep(n,r),t}();function Cp(t){return Pp(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Dp(t)||Ip()}function Rp(t,n){return Pp(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==e)return;var r,i,o=[],s=!0,a=!1;try{for(e=e.call(t);!(s=(r=e.next()).done)&&(o.push(r.value),!n||o.length!==n);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==e.return||e.return()}finally{if(a)throw i}}return o}(t,n)||Dp(t,n)||Ip()}function Ip(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Pp(t){if(Array.isArray(t))return t}function Dp(t,n){if(t){if("string"==typeof t)return Np(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Np(t,n):void 0}}function Np(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==e.return||e.return()}finally{if(a)throw o}}}}(t);try{for(r.s();!(n=r.n()).done;){var i=Rp(n.value,2),o=i[0],s=i[1];e[o.toLowerCase()]=s}}catch(t){r.e(t)}finally{r.f()}return e}function Fp(t){return Lp(t.split("\r\n").map((function(t){var n=t.split(":").map((function(t){return t.trim()}));return n[0]=n[0].toLowerCase(),n})))}function Gp(t){var n,e,r;if(t){var i=Rp(t.match(/bytes (\d+)-(\d+)\/(\d+)/),4);n=i[1],e=i[2],r=i[3],n=parseInt(n,10),e=parseInt(e,10),r=parseInt(r,10)}return{start:n,end:e,total:r}}function Up(t,n){for(var e=null,r=new TextDecoder("ascii"),i=[],o="--".concat(n),s="".concat(o,"--"),a=0;a<10;++a){r.decode(new Uint8Array(t,a,o.length))===o&&(e=a)}if(null===e)throw new Error("Could not find initial boundary");for(;e1&&void 0!==i[1]?i[1]:void 0,t.abrupt("return",Promise.all(n.map((function(t){return r.fetchSlice(t,e)}))));case 2:case"end":return t.stop()}}),t)}))),function(t){return s.apply(this,arguments)})},{key:"fetchSlice",value:(o=qp(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("fetching of slice ".concat(n," not possible, not implemented"));case 1:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})},{key:"fileSize",get:function(){return null}},{key:"close",value:(i=qp(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)})}])&&$p(n.prototype,e),r&&$p(n,r),t}(),Zp=e(6875),Wp=e.n(Zp);function Hp(t){return(Hp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Kp(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function Xp(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&ry(t,n)}function Yp(t){var n=ey();return function(){var e,r=iy(t);if(n){var i=iy(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return Jp(this,e)}}function Jp(t,n){if(n&&("object"===Hp(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return Qp(t)}function Qp(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ty(t){var n="function"==typeof Map?new Map:void 0;return(ty=function(t){if(null===t||(e=t,-1===Function.toString.call(e).indexOf("[native code]")))return t;var e;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,r)}function r(){return ny(t,arguments,iy(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),ry(r,t)})(t)}function ny(t,n,e){return(ny=ey()?Reflect.construct:function(t,n,e){var r=[null];r.push.apply(r,n);var i=new(Function.bind.apply(t,r));return e&&ry(i,e.prototype),i}).apply(null,arguments)}function ey(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function ry(t,n){return(ry=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function iy(t){return(iy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function oy(t,n,e,r,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void e(t)}a.done?n(u):Promise.resolve(u).then(r,i)}function sy(t){return function(){var n=this,e=arguments;return new Promise((function(r,i){var o=t.apply(n,e);function s(t){oy(o,r,i,s,a,"next",t)}function a(t){oy(o,r,i,s,a,"throw",t)}s(void 0)}))}}function ay(t){return uy.apply(this,arguments)}function uy(){return(uy=sy(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){return setTimeout(t,n)})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function cy(t,n){var e=Array.isArray(t)?t:Array.from(t),r=Array.isArray(n)?n:Array.from(n);return e.map((function(t,n){return[t,r[n]]}))}var fy=function(t){Xp(e,t);var n=Yp(e);function e(t){var r;return Kp(this,e),r=n.call(this,t),Error.captureStackTrace&&Error.captureStackTrace(Qp(r),e),r.name="AbortError",r}return e}(ty(Error)),hy=function(t){Xp(e,t);var n=Yp(e);function e(t,r){var i;return Kp(this,e),(i=n.call(this,r)).errors=t,i.message=r,i.name="AggregateError",i}return e}(ty(Error));function ly(t){return(ly="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function vy(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==e)return;var r,i,o=[],s=!0,a=!1;try{for(e=e.call(t);!(s=(r=e.next()).done)&&(o.push(r.value),!n||o.length!==n);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==e.return||e.return()}finally{if(a)throw i}}return o}(t,n)||py(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dy(t,n){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=py(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==e.return||e.return()}finally{if(a)throw o}}}}function py(t,n){if(t){if("string"==typeof t)return yy(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?yy(t,n):void 0}}function yy(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e2&&void 0!==arguments[2]?arguments[2]:null;_y(this,t),this.offset=n,this.length=e,this.data=r}return My(t,[{key:"top",get:function(){return this.offset+this.length}}]),t}(),Ty=function t(n,e,r){_y(this,t),this.offset=n,this.length=e,this.blockIds=r},Oy=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&gy(t,n)}(r,t);var n,e=wy(r);function r(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.blockSize,s=void 0===o?65536:o,a=i.cacheSize,u=void 0===a?100:a;return _y(this,r),(n=e.call(this)).source=t,n.blockSize=s,n.blockCache=new(Wp())({max:u}),n.blockRequests=new Map,n.blockIdsToFetch=new Set,n}return My(r,[{key:"fileSize",get:function(){return this.source.fileSize}},{key:"fetch",value:(n=by(regeneratorRuntime.mark((function t(n,e){var r,i,o,s,a,u,c,f,h,l,v,d,p,y,m,b,g,w,x,k,_,S,M,j,T,O,E,A,C,R,I,P,D,N,z,L,F,G;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=new Map,i=new Map,o=new Set,s=dy(n);try{for(s.s();!(a=s.n()).done;)for(u=a.value,c=u.offset,f=u.length,h=c+f,null!==(l=this.fileSize)&&(h=Math.min(h,l)),v=Math.floor(c/this.blockSize)*this.blockSize,d=v;d0)){t.next=65;break}this.fetchBlocks(e),A=dy(k),t.prev=44,A.s();case 46:if((C=A.n()).done){t.next=54;break}if(R=C.value,I=this.blockRequests.get(R)){t.next=51;break}throw new Error("Block ".concat(R," is not in the block requests"));case 51:i.set(R,I);case 52:t.next=46;break;case 54:t.next=59;break;case 56:t.prev=56,t.t1=t.catch(44),A.e(t.t1);case 59:return t.prev=59,A.f(),t.finish(59);case 62:return t.next=64,Promise.allSettled(Array.from(i.values()));case 64:x=t.sent;case 65:if(!x.some((function(t){return"rejected"===t.status}))){t.next=69;break}if(!e||!e.aborted){t.next=68;break}throw new fy("Request was aborted");case 68:throw new hy(x.filter((function(t){return"rejected"===t.status})).map((function(t){return t.reason})),"Request failed");case 69:P=x.map((function(t){return t.value})),D=new Map(cy(Array.from(i.keys()),P)),N=dy(r);try{for(N.s();!(z=N.n()).done;)L=vy(z.value,2),F=L[0],G=L[1],D.set(F,G)}catch(t){N.e(t)}finally{N.f()}return t.abrupt("return",this.readSliceData(n,D));case 74:case"end":return t.stop()}}),t,this,[[9,28,31,34],[44,56,59,62]])}))),function(t,e){return n.apply(this,arguments)})},{key:"fetchBlocks",value:function(t){var n=this;this.blockIdsToFetch.size>0&&function(){for(var e=n.groupBlocks(n.blockIdsToFetch),r=n.source.fetch(e,t),i=function(i){var o,s=dy(e[i].blockIds);try{var a=function(){var e=o.value,s=by(regeneratorRuntime.mark((function o(){var s,a,u,c,f,h;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,o.next=3,r;case 3:return o.t0=i,s=o.sent[o.t0],a=e*n.blockSize,u=a-s.offset,c=Math.min(u+n.blockSize,s.data.byteLength),f=s.data.slice(u,c),h=new jy(a,f.byteLength,f),n.blockCache.set(e,h),o.abrupt("return",h);case 14:throw o.prev=14,o.t1=o.catch(0),"AbortError"===o.t1.name&&(o.t1.signal=t),o.t1;case 18:return o.prev=18,n.blockRequests.delete(e),o.finish(18);case 21:case"end":return o.stop()}}),o,null,[[0,14,18,21]])})))();n.blockRequests.set(e,s)};for(s.s();!(o=s.n()).done;)a()}catch(t){s.e(t)}finally{s.f()}},o=0;o0&&(l=f),v=c.top-r<0?c.length-h:r-c.offset-h;var d=new Uint8Array(c.data,h,v);a.set(d,l)}return s}))}}]),r}(Vp);function Ey(t,n,e,r,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void e(t)}a.done?n(u):Promise.resolve(u).then(r,i)}function Ay(t){return function(){var n=this,e=arguments;return new Promise((function(r,i){var o=t.apply(n,e);function s(t){Ey(o,r,i,s,a,"next",t)}function a(t){Ey(o,r,i,s,a,"throw",t)}s(void 0)}))}}function Cy(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function Ry(t,n){for(var e=0;e=200&&this.status<=299}},{key:"status",get:function(){throw new Error("not implemented")}},{key:"getHeader",value:function(t){throw new Error("not implemented")}},{key:"getData",value:(n=Ay(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("not implemented");case 1:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})}]),t}(),Dy=function(){function t(n){Cy(this,t),this.url=n}var n;return Iy(t,[{key:"request",value:(n=Ay(regeneratorRuntime.mark((function t(){var n,e=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw(n=e.length>0&&void 0!==e[0]?e[0]:{}).headers,n.credentials,n.signal,new Error("request is not implemented");case 2:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})}]),t}();function Ny(t){return(Ny="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function zy(t,n,e,r,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void e(t)}a.done?n(u):Promise.resolve(u).then(r,i)}function Ly(t){return function(){var n=this,e=arguments;return new Promise((function(r,i){var o=t.apply(n,e);function s(t){zy(o,r,i,s,a,"next",t)}function a(t){zy(o,r,i,s,a,"throw",t)}s(void 0)}))}}function Fy(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function Gy(t,n){for(var e=0;e0&&void 0!==s[0]?s[0]:{},e=n.headers,r=n.credentials,i=n.signal,t.next=3,fetch(this.url,{headers:e,credentials:r,signal:i});case 3:return o=t.sent,t.abrupt("return",new Wy(o));case 5:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),r}(Dy);function Ky(t){return(Ky="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Xy(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==e)return;var r,i,o=[],s=!0,a=!1;try{for(e=e.call(t);!(s=(r=e.next()).done)&&(o.push(r.value),!n||o.length!==n);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==e.return||e.return()}finally{if(a)throw i}}return o}(t,n)||function(t,n){if(!t)return;if("string"==typeof t)return Yy(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Yy(t,n)}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yy(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e0&&void 0!==o[0]?o[0]:{},e=n.headers,r=n.signal,t.next=3,this.constructRequest(e,r);case 3:return i=t.sent,t.abrupt("return",i);case 5:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),r}(Dy),fm=e(1555),hm=e.n(fm),lm=e(2913),vm=e.n(lm),dm=e(8419),pm=e.n(dm);function ym(t){return(ym="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function mm(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function bm(t){for(var n=1;n0&&void 0!==o[0]?o[0]:{},e=n.headers,r=n.signal,t.next=3,this.constructRequest(e,r);case 3:return i=t.sent,t.abrupt("return",i);case 5:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),r}(Dy);function Rm(t){return(Rm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Im=["headers","credentials","maxRanges","allowFullFile"],Pm=["headers","maxRanges","allowFullFile"],Dm=["headers","maxRanges","allowFullFile"],Nm=["forceXHR"];function zm(t,n){if(null==t)return{};var e,r,i=function(t,n){if(null==t)return{};var e,r,i={},o=Object.keys(t);for(r=0;r=0||(i[e]=t[e]);return i}(t,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(i[e]=t[e])}return i}function Lm(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function Fm(t){for(var n=1;n=n.length)){t.next=4;break}return t.abrupt("return",this.fetchSlices(n,e));case 4:this.maxRanges>0&&n.length;case 5:return t.abrupt("return",Promise.all(n.map((function(t){return r.fetchSlice(t,e)}))));case 6:case"end":return t.stop()}}),t,this)}))),function(t,n){return s.apply(this,arguments)})},{key:"fetchSlices",value:(o=Bm(regeneratorRuntime.mark((function t(n,e){var r,i,o,s,a,u,c,f,h,l,v,d,p=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.client.request({headers:Fm(Fm({},this.headers),{},{Range:"bytes=".concat(n.map((function(t){var n=t.offset,e=t.length;return"".concat(n,"-").concat(n+e)})).join(","))}),signal:e});case 2:if((r=t.sent).ok){t.next=7;break}throw new Error("Error fetching data.");case 7:if(206!==r.status){t.next=32;break}if(y=r.getHeader("content-type"),m=void 0,m=Cp(y.split(";").map((function(t){return t.trim()}))),i={type:m[0],params:Lp(m.slice(1).map((function(t){return t.split("=")})))},o=i.params,"multipart/byteranges"!==i.type){t.next=18;break}return t.t0=Up,t.next=13,r.getData();case 13:return t.t1=t.sent,t.t2=o.boundary,s=(0,t.t0)(t.t1,t.t2),this._fileSize=s[0].fileSize||null,t.abrupt("return",s);case 18:return t.next=20,r.getData();case 20:if(a=t.sent,u=Gp(r.getHeader("content-range")),c=u.start,f=u.end,h=u.total,this._fileSize=h||null,l=[{data:a,offset:c,length:f-c}],!(n.length>1)){t.next=29;break}return t.next=27,Promise.all(n.slice(1).map((function(t){return p.fetchSlice(t,e)})));case 27:return v=t.sent,t.abrupt("return",l.concat(v));case 29:return t.abrupt("return",l);case 32:if(this.allowFullFile){t.next=34;break}throw new Error("Server responded with full file");case 34:return t.next=36,r.getData();case 36:return d=t.sent,this._fileSize=d.byteLength,t.abrupt("return",[{data:d,offset:0,length:d.byteLength}]);case 39:case"end":return t.stop()}var y,m}),t,this)}))),function(t,n){return o.apply(this,arguments)})},{key:"fetchSlice",value:(i=Bm(regeneratorRuntime.mark((function t(n,e){var r,i,o,s,a,u,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.offset,i=n.length,t.next=3,this.client.request({headers:Fm(Fm({},this.headers),{},{Range:"bytes=".concat(r,"-").concat(r+i)}),signal:e});case 3:if((o=t.sent).ok){t.next=8;break}throw new Error("Error fetching data.");case 8:if(206!==o.status){t.next=17;break}return t.next=11,o.getData();case 11:return s=t.sent,a=Gp(o.getHeader("content-range")),u=a.total,this._fileSize=u||null,t.abrupt("return",{data:s,offset:r,length:i});case 17:if(this.allowFullFile){t.next=19;break}throw new Error("Server responded with full file");case 19:return t.next=21,o.getData();case 21:return c=t.sent,this._fileSize=c.byteLength,t.abrupt("return",{data:c,offset:0,length:c.byteLength});case 24:case"end":return t.stop()}}),t,this)}))),function(t,n){return i.apply(this,arguments)})},{key:"fileSize",get:function(){return this._fileSize}}])&&qm(n.prototype,e),r&&qm(n,r),u}(Vp);function Km(t,n){var e=n.blockSize,r=n.cacheSize;return null===e?t:new Oy(t,e,r)}function Xm(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=n.headers,r=void 0===e?{}:e,i=n.credentials,o=n.maxRanges,s=void 0===o?0:o,a=n.allowFullFile,u=void 0!==a&&a,c=zm(n,Im),f=new Hy(t,i),h=new Hm(f,r,s,u);return Km(h,c)}function Ym(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=n.headers,r=void 0===e?{}:e,i=n.maxRanges,o=void 0===i?0:i,s=n.allowFullFile,a=void 0!==s&&s,u=zm(n,Pm),c=new cm(t),f=new Hm(c,r,o,a);return Km(f,u)}function Jm(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=n.headers,r=void 0===e?{}:e,i=n.maxRanges,o=void 0===i?0:i,s=n.allowFullFile,a=void 0!==s&&s,u=zm(n,Dm),c=new Cm(t),f=new Hm(c,r,o,a);return Km(f,u)}function Qm(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=n.forceXHR,r=void 0!==e&&e,i=zm(n,Nm);return"function"!=typeof fetch||r?"undefined"!=typeof XMLHttpRequest?Ym(t,i):Jm(t,i):Xm(t,i)}function tb(t){return(tb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function nb(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function eb(t){for(var n=1;nt.length)&&(n=t.length);for(var e=0,r=new Array(n);e0&&void 0!==G[0]?G[0]:{},e=n.window,r=n.width,i=n.height,o=n.resX,s=n.resY,a=n.bbox,t.next=5,this.getImage();case 5:return u=t.sent,c=u,t.next=9,this.getImageCount();case 9:if(f=t.sent,h=u.getBoundingBox(),!e||!a){t.next=13;break}throw new Error('Both "bbox" and "window" passed.');case 13:if(!r&&!i){t.next=24;break}if(e&&(l=u.getOrigin(),v=ib(l,2),d=v[0],p=v[1],y=u.getResolution(),m=ib(y,2),b=m[0],g=m[1],a=[d+e[0]*b,p+e[1]*g,d+e[2]*b,p+e[3]*g]),w=a||h,!r){t.next=20;break}if(!o){t.next=19;break}throw new Error("Both width and resX passed");case 19:o=(w[2]-w[0])/r;case 20:if(!i){t.next=24;break}if(!s){t.next=23;break}throw new Error("Both width and resY passed");case 23:s=(w[3]-w[1])/i;case 24:if(!o&&!s){t.next=48;break}x=[],k=0;case 27:if(!(kE||s&&s>A)){t.next=45;break}return t.abrupt("break",48);case 45:++T,t.next=38;break;case 48:return C=e,a&&(R=u.getOrigin(),I=ib(R,2),P=I[0],D=I[1],N=c.getResolution(u),z=ib(N,2),L=z[0],F=z[1],C=[Math.round((a[0]-P)/L),Math.round((a[1]-D)/F),Math.round((a[2]-P)/L),Math.round((a[3]-D)/F)],C=[Math.min(C[0],C[2]),Math.min(C[1],C[3]),Math.max(C[0],C[2]),Math.max(C[1],C[3])]),t.abrupt("return",c.readRasters(eb(eb({},n),{},{window:C})));case 51:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),t}(),Mb=function(t){fb(c,t);var n,e,r,i,o,s,a,u=hb(c);function c(t,n,e,r){var i,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return bb(this,c),(i=u.call(this)).source=t,i.littleEndian=n,i.bigTiff=e,i.firstIFDOffset=r,i.cache=o.cache||!1,i.ifdRequests=[],i.ghostValues=null,i}return cb(c,[{key:"getSlice",value:(a=ab(regeneratorRuntime.mark((function t(n,e){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.bigTiff?4048:1024,t.t0=Ap,t.next=4,this.source.fetch([{offset:n,length:void 0!==e?e:r}]);case 4:return t.t1=t.sent[0],t.t2=n,t.t3=this.littleEndian,t.t4=this.bigTiff,t.abrupt("return",new t.t0(t.t1,t.t2,t.t3,t.t4));case 9:case"end":return t.stop()}}),t,this)}))),function(t,n){return a.apply(this,arguments)})},{key:"parseFileDirectoryAt",value:(s=ab(regeneratorRuntime.mark((function t(n){var e,r,i,o,s,a,u,c,f,h,l,v,d,p,y,m,b,g,w,x;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.bigTiff?20:12,r=this.bigTiff?8:2,t.next=4,this.getSlice(n);case 4:if(i=t.sent,o=this.bigTiff?i.readUint64(n):i.readUint16(n),s=o*e+(this.bigTiff?16:6),i.covers(n,s)){t.next=11;break}return t.next=10,this.getSlice(n,s);case 10:i=t.sent;case 11:a={},u=n+(this.bigTiff?8:2),c=0;case 14:if(!(c0&&void 0!==r[0]?r[0]:0,t.next=3,this.requestIFD(n);case 3:return e=t.sent,t.abrupt("return",new jp(e.fileDirectory,e.geoKeyDirectory,this.dataView,this.littleEndian,this.cache,this.source));case 5:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"getImageCount",value:(r=ab(regeneratorRuntime.mark((function t(){var n,e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=0,e=!0;case 2:if(!e){t.next=18;break}return t.prev=3,t.next=6,this.requestIFD(n);case 6:++n,t.next=16;break;case 9:if(t.prev=9,t.t0=t.catch(3),!(t.t0 instanceof _b)){t.next=15;break}e=!1,t.next=16;break;case 15:throw t.t0;case 16:t.next=2;break;case 18:return t.abrupt("return",n);case 19:case"end":return t.stop()}}),t,this,[[3,9]])}))),function(){return r.apply(this,arguments)})},{key:"getGhostValues",value:(e=ab(regeneratorRuntime.mark((function t(){var n,e,r,i,o,s,a,u,c=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.bigTiff?16:8,!this.ghostValues){t.next=3;break}return t.abrupt("return",this.ghostValues);case 3:return r=(e="GDAL_STRUCTURAL_METADATA_SIZE=").length+100,t.next=7,this.getSlice(n,r);case 7:if(i=t.sent,e!==xb(i,Xd.sf.ASCII,e.length,n)){t.next=19;break}if(o=xb(i,Xd.sf.ASCII,r,n),s=o.split("\n")[0],!((a=Number(s.split("=")[1].split(" ")[0])+s.length)>r)){t.next=16;break}return t.next=15,this.getSlice(n,a);case 15:i=t.sent;case 16:u=xb(i,Xd.sf.ASCII,a,n),this.ghostValues={},u.split("\n").filter((function(t){return t.length>0})).map((function(t){return t.split("=")})).forEach((function(t){var n=ib(t,2),e=n[0],r=n[1];c.ghostValues[e]=r}));case 19:return t.abrupt("return",this.ghostValues);case 20:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"close",value:function(){return"function"==typeof this.source.close&&this.source.close()}}],[{key:"fromSource",value:(n=ab(regeneratorRuntime.mark((function t(n,e,r){var i,o,s,a,u,f,h;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.fetch([{offset:0,length:1024}],r);case 2:if(i=t.sent[0],o=new Op(i),18761!==(s=o.getUint16(0,0))){t.next=9;break}a=!0,t.next=14;break;case 9:if(19789!==s){t.next=13;break}a=!1,t.next=14;break;case 13:throw new TypeError("Invalid byte order value.");case 14:if(42!==(u=o.getUint16(2,a))){t.next=19;break}f=!1,t.next=27;break;case 19:if(43!==u){t.next=26;break}if(f=!0,8===o.getUint16(4,a)){t.next=24;break}throw new Error("Unsupported offset byte-size.");case 24:t.next=27;break;case 26:throw new TypeError("Invalid magic number.");case 27:return h=f?o.getUint64(8,a):o.getUint32(4,a),t.abrupt("return",new c(n,a,f,h,e));case 29:case"end":return t.stop()}}),t)}))),function(t,e,r){return n.apply(this,arguments)})}]),c}(Sb),jb=function(t){fb(o,t);var n,e,r,i=hb(o);function o(t,n){var e;return bb(this,o),(e=i.call(this)).mainFile=t,e.overviewFiles=n,e.imageFiles=[t].concat(n),e.fileDirectoriesPerFile=null,e.fileDirectoriesPerFileParsing=null,e.imageCount=null,e}return cb(o,[{key:"parseFileDirectoriesPerFile",value:(r=ab(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=[this.mainFile.parseFileDirectoryAt(this.mainFile.firstIFDOffset)].concat(this.overviewFiles.map((function(t){return t.parseFileDirectoryAt(t.firstIFDOffset)}))),t.next=3,Promise.all(n);case 3:return this.fileDirectoriesPerFile=t.sent,t.abrupt("return",this.fileDirectoriesPerFile);case 5:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"getImage",value:(e=ab(regeneratorRuntime.mark((function t(){var n,e,r,i,o,s,a,u=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=u.length>0&&void 0!==u[0]?u[0]:0,t.next=3,this.getImageCount();case 3:return t.next=5,this.parseFileDirectoriesPerFile();case 5:e=0,r=0,i=0;case 8:if(!(i1&&void 0!==i[1]?i[1]:{},r=i.length>2?i[2]:void 0,t.abrupt("return",Mb.fromSource(Qm(n,e),r));case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Ob(){return(Ob=ab(regeneratorRuntime.mark((function t(n){var e,r,i,o,s,a=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>1&&void 0!==a[1]?a[1]:[],r=a.length>2&&void 0!==a[2]?a[2]:{},i=a.length>3?a[3]:void 0,t.next=5,Mb.fromSource(Qm(n,r),i);case 5:return o=t.sent,t.next=8,Promise.all(e.map((function(t){return Mb.fromSource(Qm(t,r))})));case 8:return s=t.sent,t.abrupt("return",new jb(o,s));case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Eb=e(769),Ab=(Eb.registerSerializer,Eb.spawn),Cb=(Eb.BlobWorker,Eb.DefaultSerializer,Eb.Pool),Rb=(Eb.Thread,Eb.Transfer),Ib=Eb.Worker;function Pb(t,n,e,r,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void e(t)}a.done?n(u):Promise.resolve(u).then(r,i)}function Db(t){return function(){var n=this,e=arguments;return new Promise((function(r,i){var o=t.apply(n,e);function s(t){Pb(o,r,i,s,a,"next",t)}function a(t){Pb(o,r,i,s,a,"throw",t)}s(void 0)}))}}function Nb(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function zb(t,n){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:Lb,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Ib("./decoder.worker.js");Nb(this,t),this.pool=Cb((function(){return Ab(e)}),n)}var n,e,r,i;return n=t,(e=[{key:"decode",value:(i=Db(regeneratorRuntime.mark((function t(n,e){var r=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,i){r.pool.queue(function(){var r=Db(regeneratorRuntime.mark((function r(o){var s;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,o(n,Rb(e));case 3:s=r.sent,t(s),r.next=10;break;case 7:r.prev=7,r.t0=r.catch(0),i(r.t0);case 10:case"end":return r.stop()}}),r,null,[[0,7]])})));return function(t){return r.apply(this,arguments)}}())})));case 1:case"end":return t.stop()}}),t)}))),function(t,n){return i.apply(this,arguments)})},{key:"destroy",value:function(){this.pool.terminate(!0)}}])&&zb(n.prototype,e),r&&zb(n,r),t}(),Gb=new Blob(['function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function asyncGeneratorStep(e,t,r,n,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){asyncGeneratorStep(i,n,a,o,s,"next",e)}function s(e){asyncGeneratorStep(i,n,a,o,s,"throw",e)}o(void 0)}))}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var l=n.call(o,"catchLoc"),f=n.call(o,"finallyLoc");if(l&&f){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;D(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"===("undefined"==typeof globalThis?"undefined":_typeof(globalThis))?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}(runtime);var worker={},isObservable=function(e){return!!e&&("symbol"===_typeof(Symbol.observable)&&"function"==typeof e[Symbol.observable]?e===e[Symbol.observable]():"function"==typeof e["@@observable"]&&e===e["@@observable"]())},common$1={},serializers={};function extendSerializer(e,t){var r=e.deserialize.bind(e),n=e.serialize.bind(e);return{deserialize:function(e){return t.deserialize(e,r)},serialize:function(e){return t.serialize(e,n)}}}Object.defineProperty(serializers,"__esModule",{value:!0}),serializers.DefaultSerializer=serializers.extendSerializer=void 0,serializers.extendSerializer=extendSerializer;var DefaultErrorSerializer={deserialize:function(e){return Object.assign(Error(e.message),{name:e.name,stack:e.stack})},serialize:function(e){return{__error_marker:"$$error",message:e.message,name:e.name,stack:e.stack}}},isSerializedError=function(e){return e&&"object"===_typeof(e)&&"__error_marker"in e&&"$$error"===e.__error_marker};serializers.DefaultSerializer={deserialize:function(e){return isSerializedError(e)?DefaultErrorSerializer.deserialize(e):e},serialize:function(e){return e instanceof Error?DefaultErrorSerializer.serialize(e):e}},Object.defineProperty(common$1,"__esModule",{value:!0}),common$1.serialize=common$1.deserialize=common$1.registerSerializer=void 0;var serializers_1=serializers,registeredSerializer=serializers_1.DefaultSerializer;function registerSerializer(e){registeredSerializer=serializers_1.extendSerializer(registeredSerializer,e)}function deserialize(e){return registeredSerializer.deserialize(e)}function serialize(e){return registeredSerializer.serialize(e)}common$1.registerSerializer=registerSerializer,common$1.deserialize=deserialize,common$1.serialize=serialize;var transferable={},symbols={};Object.defineProperty(symbols,"__esModule",{value:!0}),symbols.$worker=symbols.$transferable=symbols.$terminate=symbols.$events=symbols.$errors=void 0,symbols.$errors=Symbol("thread.errors"),symbols.$events=Symbol("thread.events"),symbols.$terminate=Symbol("thread.terminate"),symbols.$transferable=Symbol("thread.transferable"),symbols.$worker=Symbol("thread.worker"),Object.defineProperty(transferable,"__esModule",{value:!0}),transferable.Transfer=transferable.isTransferDescriptor=void 0;var symbols_1=symbols;function isTransferable(e){return!(!e||"object"!==_typeof(e))}function isTransferDescriptor(e){return e&&"object"===_typeof(e)&&e[symbols_1.$transferable]}function Transfer$1(e,t){var r;if(!t){if(!isTransferable(e))throw Error();t=[e]}return _defineProperty(r={},symbols_1.$transferable,!0),_defineProperty(r,"send",e),_defineProperty(r,"transferables",t),r}transferable.isTransferDescriptor=isTransferDescriptor,transferable.Transfer=Transfer$1;var messages$1={},exports,MasterMessageType,WorkerMessageType;exports=messages$1,Object.defineProperty(exports,"__esModule",{value:!0}),exports.WorkerMessageType=exports.MasterMessageType=void 0,(MasterMessageType=exports.MasterMessageType||(exports.MasterMessageType={})).cancel="cancel",MasterMessageType.run="run",(WorkerMessageType=exports.WorkerMessageType||(exports.WorkerMessageType={})).error="error",WorkerMessageType.init="init",WorkerMessageType.result="result",WorkerMessageType.running="running",WorkerMessageType.uncaughtError="uncaughtError";var implementation$1={},implementation_browser={};Object.defineProperty(implementation_browser,"__esModule",{value:!0});var isWorkerRuntime$2=function(){var e="undefined"!=typeof self&&"undefined"!=typeof Window&&self instanceof Window;return!("undefined"==typeof self||!self.postMessage||e)},postMessageToMaster$2=function(e,t){self.postMessage(e,t)},subscribeToMasterMessages$2=function(e){var t=function(t){e(t.data)};return self.addEventListener("message",t),function(){self.removeEventListener("message",t)}};implementation_browser.default={isWorkerRuntime:isWorkerRuntime$2,postMessageToMaster:postMessageToMaster$2,subscribeToMasterMessages:subscribeToMasterMessages$2};var implementation_tinyWorker={};Object.defineProperty(implementation_tinyWorker,"__esModule",{value:!0}),"undefined"==typeof self&&(commonjsGlobal.self=commonjsGlobal);var isWorkerRuntime$1=function(){return!("undefined"==typeof self||!self.postMessage)},postMessageToMaster$1=function(e){self.postMessage(e)},muxingHandlerSetUp=!1,messageHandlers=new Set,subscribeToMasterMessages$1=function(e){muxingHandlerSetUp||(self.addEventListener("message",(function(e){messageHandlers.forEach((function(t){return t(e.data)}))})),muxingHandlerSetUp=!0),messageHandlers.add(e);return function(){return messageHandlers.delete(e)}};implementation_tinyWorker.default={isWorkerRuntime:isWorkerRuntime$1,postMessageToMaster:postMessageToMaster$1,subscribeToMasterMessages:subscribeToMasterMessages$1};var implementation_worker_threads={},worker_threads={},implementation;function selectImplementation(){return"function"==typeof __non_webpack_require__?__non_webpack_require__("worker_threads"):eval("require")("worker_threads")}function getImplementation(){return implementation||(implementation=selectImplementation()),implementation}Object.defineProperty(worker_threads,"__esModule",{value:!0}),worker_threads.default=getImplementation;var __importDefault$1=commonjsGlobal&&commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(implementation_worker_threads,"__esModule",{value:!0});var worker_threads_1=__importDefault$1(worker_threads);function assertMessagePort(e){if(!e)throw Error("Invariant violation: MessagePort to parent is not available.");return e}var isWorkerRuntime=function(){return!worker_threads_1.default().isMainThread},postMessageToMaster=function(e,t){assertMessagePort(worker_threads_1.default().parentPort).postMessage(e,t)},subscribeToMasterMessages=function(e){var t=worker_threads_1.default().parentPort;if(!t)throw Error("Invariant violation: MessagePort to parent is not available.");var r=function(t){e(t)};return assertMessagePort(t).on("message",r),function(){assertMessagePort(t).off("message",r)}};function testImplementation(){worker_threads_1.default()}implementation_worker_threads.default={isWorkerRuntime:isWorkerRuntime,postMessageToMaster:postMessageToMaster,subscribeToMasterMessages:subscribeToMasterMessages,testImplementation:testImplementation};var __importDefault=commonjsGlobal&&commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(implementation$1,"__esModule",{value:!0});var implementation_browser_1=__importDefault(implementation_browser),implementation_tiny_worker_1=__importDefault(implementation_tinyWorker),implementation_worker_threads_1=__importDefault(implementation_worker_threads),runningInNode="undefined"!=typeof process&&"browser"!==process.arch&&"pid"in process;function selectNodeImplementation(){try{return implementation_worker_threads_1.default.testImplementation(),implementation_worker_threads_1.default}catch(e){return implementation_tiny_worker_1.default}}implementation$1.default=runningInNode?selectNodeImplementation():implementation_browser_1.default,function(e){var t=commonjsGlobal&&commonjsGlobal.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}l((n=n.apply(e,t||[])).next())}))},r=commonjsGlobal&&commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.expose=e.isWorkerRuntime=e.Transfer=e.registerSerializer=void 0;var n=r(isObservable),a=common$1,i=transferable,o=messages$1,s=r(implementation$1),l=common$1;Object.defineProperty(e,"registerSerializer",{enumerable:!0,get:function(){return l.registerSerializer}});var f=transferable;Object.defineProperty(e,"Transfer",{enumerable:!0,get:function(){return f.Transfer}}),e.isWorkerRuntime=s.default.isWorkerRuntime;var c=!1,u=new Map,d=function(e){return e&&e.type===o.MasterMessageType.run},h=function(e){return n.default(e)||function(e){return e&&"object"===_typeof(e)&&"function"==typeof e.subscribe}(e)};function p(e){return i.isTransferDescriptor(e)?{payload:e.send,transferables:e.transferables}:{payload:e,transferables:void 0}}function m(e,t){var r=p(t),n=r.payload,i=r.transferables,l={type:o.WorkerMessageType.error,uid:e,error:a.serialize(n)};s.default.postMessageToMaster(l,i)}function g(e,t,r){var n=p(r),a=n.payload,i=n.transferables,l={type:o.WorkerMessageType.result,uid:e,complete:!!t||void 0,payload:a};s.default.postMessageToMaster(l,i)}function y(e,t){var r={type:o.WorkerMessageType.running,uid:e,resultType:t};s.default.postMessageToMaster(r)}function _(e){try{var t={type:o.WorkerMessageType.uncaughtError,error:a.serialize(e)};s.default.postMessageToMaster(t)}catch(t){console.error("Not reporting uncaught error back to master thread as it occured while reporting an uncaught error already.\\nLatest error:",t,"\\nOriginal error:",e)}}function b(e,r,n){return t(this,void 0,void 0,regeneratorRuntime.mark((function t(){var i,o,s,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0,i=r.apply(void 0,_toConsumableArray(n)),t.next=7;break;case 4:return t.prev=4,t.t0=t.catch(0),t.abrupt("return",m(e,t.t0));case 7:if(o=h(i)?"observable":"promise",y(e,o),!h(i)){t.next=14;break}s=i.subscribe((function(t){return g(e,!1,a.serialize(t))}),(function(t){m(e,a.serialize(t)),u.delete(e)}),(function(){g(e,!0),u.delete(e)})),u.set(e,s),t.next=24;break;case 14:return t.prev=14,t.next=17,i;case 17:l=t.sent,g(e,!0,a.serialize(l)),t.next=24;break;case 21:t.prev=21,t.t1=t.catch(14),m(e,a.serialize(t.t1));case 24:case"end":return t.stop()}}),t,null,[[0,4],[14,21]])})))}e.expose=function(e){if(!s.default.isWorkerRuntime())throw Error("expose() called in the master thread.");if(c)throw Error("expose() called more than once. This is not possible. Pass an object to expose() if you want to expose multiple functions.");if(c=!0,"function"==typeof e)s.default.subscribeToMasterMessages((function(t){d(t)&&!t.method&&b(t.uid,e,t.args.map(a.deserialize))})),t={type:o.WorkerMessageType.init,exposed:{type:"function"}},s.default.postMessageToMaster(t);else{if("object"!==_typeof(e)||!e)throw Error("Invalid argument passed to expose(). Expected a function or an object, got: ".concat(e));s.default.subscribeToMasterMessages((function(t){d(t)&&t.method&&b(t.uid,e[t.method],t.args.map(a.deserialize))})),function(e){var t={type:o.WorkerMessageType.init,exposed:{type:"module",methods:e}};s.default.postMessageToMaster(t)}(Object.keys(e).filter((function(t){return"function"==typeof e[t]})))}var t;s.default.subscribeToMasterMessages((function(e){if((n=e)&&n.type===o.MasterMessageType.cancel){var t=e.uid,r=u.get(t);r&&(r.unsubscribe(),u.delete(t))}var n}))},"undefined"!=typeof self&&"function"==typeof self.addEventListener&&s.default.isWorkerRuntime()&&(self.addEventListener("error",(function(e){setTimeout((function(){return _(e.error||e)}),250)})),self.addEventListener("unhandledrejection",(function(e){var t=e.reason;t&&"string"==typeof t.message&&setTimeout((function(){return _(t)}),250)}))),"undefined"!=typeof process&&"function"==typeof process.on&&s.default.isWorkerRuntime()&&(process.on("uncaughtException",(function(e){setTimeout((function(){return _(e)}),250)})),process.on("unhandledRejection",(function(e){e&&"string"==typeof e.message&&setTimeout((function(){return _(e)}),250)})))}(worker);var WorkerContext=getDefaultExportFromCjs(worker),expose=WorkerContext.expose;WorkerContext.registerSerializer;var Transfer=WorkerContext.Transfer,registry=new Map;function addDecoder(e,t){Array.isArray(e)||(e=[e]),e.forEach((function(e){return registry.set(e,t)}))}function getDecoder(e){return _getDecoder.apply(this,arguments)}function _getDecoder(){return(_getDecoder=_asyncToGenerator(regeneratorRuntime.mark((function e(t){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=registry.get(t.Compression)){e.next=3;break}throw new Error("Unknown compression method identifier: ".concat(t.Compression));case 3:return e.next=5,r();case 5:return n=e.sent,e.abrupt("return",new n(t));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function decode(e,t){return _decode.apply(this,arguments)}function _decode(){return(_decode=_asyncToGenerator(regeneratorRuntime.mark((function e(t,r){var n,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,getDecoder(t);case 2:return n=e.sent,e.next=5,n.decode(t,r);case 5:return a=e.sent,e.abrupt("return",Transfer(a));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function decodeRowAcc(e,t){var r=e.length-t,n=0;do{for(var a=t;a>0;a--)e[n+t]+=e[n],n++;r-=t}while(r>0)}function decodeRowFloatingPoint(e,t,r){for(var n=0,a=e.length,i=a/r;a>t;){for(var o=t;o>0;--o)e[n+t]+=e[n],++n;a-=t}for(var s=e.slice(),l=0;l=e.byteLength);++f){var c=void 0;if(2===t){switch(a[0]){case 8:c=new Uint8Array(e,f*l*r*s,l*r*s);break;case 16:c=new Uint16Array(e,f*l*r*s,l*r*s/2);break;case 32:c=new Uint32Array(e,f*l*r*s,l*r*s/4);break;default:throw new Error("Predictor 2 not allowed with ".concat(a[0]," bits per sample."))}decodeRowAcc(c,l)}else 3===t&&decodeRowFloatingPoint(c=new Uint8Array(e,f*l*r*s,l*r*s),l,s)}return e}addDecoder([void 0,1],(function(){return Promise.resolve().then((function(){return raw})).then((function(e){return e.default}))})),addDecoder(5,(function(){return Promise.resolve().then((function(){return lzw})).then((function(e){return e.default}))})),addDecoder(6,(function(){throw new Error("old style JPEG compression is not supported.")})),addDecoder(7,(function(){return Promise.resolve().then((function(){return jpeg})).then((function(e){return e.default}))})),addDecoder([8,32946],(function(){return Promise.resolve().then((function(){return deflate})).then((function(e){return e.default}))})),addDecoder(32773,(function(){return Promise.resolve().then((function(){return packbits})).then((function(e){return e.default}))})),addDecoder(34887,(function(){return Promise.resolve().then((function(){return lerc})).then((function(e){return e.default}))})),expose(decode);var BaseDecoder=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"decode",value:function(){var e=_asyncToGenerator(regeneratorRuntime.mark((function e(t,r){var n,a,i,o,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.decodeBlock(r);case 2:if(n=e.sent,1===(a=t.Predictor||1)){e.next=9;break}return i=!t.StripOffsets,o=i?t.TileWidth:t.ImageWidth,s=i?t.TileLength:t.RowsPerStrip||t.ImageLength,e.abrupt("return",applyPredictor(n,a,o,s,t.BitsPerSample,t.PlanarConfiguration));case 9:return e.abrupt("return",n);case 10:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()}]),e}(),RawDecoder=function(e){_inherits(r,BaseDecoder);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"decodeBlock",value:function(e){return e}}]),r}(),raw=Object.freeze({__proto__:null,default:RawDecoder}),MIN_BITS=9,CLEAR_CODE=256,EOI_CODE=257,MAX_BYTELENGTH=12;function getByte(e,t,r){var n=t%8,a=Math.floor(t/8),i=8-n,o=t+r-8*(a+1),s=8*(a+2)-(t+r),l=8*(a+2)-t;if(s=Math.max(0,s),a>=e.length)return console.warn("ran off the end of the buffer before finding EOI_CODE (end on input code)"),EOI_CODE;var f=e[a]&Math.pow(2,8-n)-1,c=f<<=r-i;if(a+1>>s;c+=u<<=Math.max(0,r-l)}if(o>8&&a+2>>d}return c}function appendReversed(e,t){for(var r=t.length-1;r>=0;r--)e.push(t[r]);return e}function decompress(e){for(var t=new Uint16Array(4093),r=new Uint8Array(4093),n=0;n<=257;n++)t[n]=4096,r[n]=n;var a=258,i=MIN_BITS,o=0;function s(){a=258,i=MIN_BITS}function l(e){var t=getByte(e,o,i);return o+=i,t}function f(e,n){return r[a]=n,t[a]=e,++a-1}function c(e){for(var n=[],a=e;4096!==a;a=t[a])n.push(r[a]);return n}var u=[];s();for(var d,h=new Uint8Array(e),p=l(h);p!==EOI_CODE;){if(p===CLEAR_CODE){for(s(),p=l(h);p===CLEAR_CODE;)p=l(h);if(p===EOI_CODE)break;if(p>CLEAR_CODE)throw new Error("corrupted code at scanline ".concat(p));appendReversed(u,c(p)),d=p}else if(p=Math.pow(2,i)&&(i===MAX_BYTELENGTH?d=void 0:i++),p=l(h)}return new Uint8Array(u)}var LZWDecoder=function(e){_inherits(r,BaseDecoder);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"decodeBlock",value:function(e){return decompress(e).buffer}}]),r}(),lzw=Object.freeze({__proto__:null,default:LZWDecoder}),dctZigZag=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),dctCos1=4017,dctSin1=799,dctCos3=3406,dctSin3=2276,dctCos6=1567,dctSin6=3784,dctSqrt2=5793,dctSqrt1d2=2896;function buildHuffmanTable(e,t){for(var r=0,n=[],a=16;a>0&&!e[a-1];)--a;n.push({children:[],index:0});for(var i,o=n[0],s=0;s0;)o=n.pop();for(o.index++,n.push(o);n.length<=s;)n.push(i={children:[],index:0}),o.children[o.index]=i.children,o=i;r++}s+10)return p--,h>>p&1;if(255===(h=e[d++])){var t=e[d++];if(t)throw new Error("unexpected marker: ".concat((h<<8|t).toString(16)))}return p=7,h>>>7}function g(e){for(var t,r=e;null!==(t=m());){if("number"==typeof(r=r[t]))return r;if("object"!==_typeof(r))throw new Error("invalid huffman sequence")}return null}function y(e){for(var t=e,r=0;t>0;){var n=m();if(null===n)return;r=r<<1|n,--t}return r}function _(e){var t=y(e);return t>=1<0)b--;else for(var r=i,n=o;r<=n;){var a=g(e.huffmanTableAC),s=15&a,f=a>>4;if(0===s){if(f<15){b=y(f)+(1<>4,0===u)a<15?(b=y(a)+(1<>4;if(0===o){if(s<15)break;a+=16}else t[dctZigZag[a+=s]]=_(o),a++}};var R,O,C=0;O=1===I?n[0].blocksPerLine*n[0].blocksPerColumn:f*r.mcusPerColumn;for(var P=a||O;C=65488&&R<=65495))break;d+=2}return d-u}function buildComponentData(e,t){var r=[],n=t.blocksPerLine,a=t.blocksPerColumn,i=n<<3,o=new Int32Array(64),s=new Uint8Array(64);function l(e,r,n){var a,i,o,s,l,f,c,u,d,h,p=t.quantizationTable,m=n;for(h=0;h<64;h++)m[h]=e[h]*p[h];for(h=0;h<8;++h){var g=8*h;0!==m[1+g]||0!==m[2+g]||0!==m[3+g]||0!==m[4+g]||0!==m[5+g]||0!==m[6+g]||0!==m[7+g]?(a=dctSqrt2*m[0+g]+128>>8,i=dctSqrt2*m[4+g]+128>>8,o=m[2+g],s=m[6+g],l=dctSqrt1d2*(m[1+g]-m[7+g])+128>>8,u=dctSqrt1d2*(m[1+g]+m[7+g])+128>>8,f=m[3+g]<<4,c=m[5+g]<<4,d=a-i+1>>1,a=a+i+1>>1,i=d,d=o*dctSin6+s*dctCos6+128>>8,o=o*dctCos6-s*dctSin6+128>>8,s=d,d=l-c+1>>1,l=l+c+1>>1,c=d,d=u+f+1>>1,f=u-f+1>>1,u=d,d=a-s+1>>1,a=a+s+1>>1,s=d,d=i-o+1>>1,i=i+o+1>>1,o=d,d=l*dctSin3+u*dctCos3+2048>>12,l=l*dctCos3-u*dctSin3+2048>>12,u=d,d=f*dctSin1+c*dctCos1+2048>>12,f=f*dctCos1-c*dctSin1+2048>>12,c=d,m[0+g]=a+u,m[7+g]=a-u,m[1+g]=i+c,m[6+g]=i-c,m[2+g]=o+f,m[5+g]=o-f,m[3+g]=s+l,m[4+g]=s-l):(d=dctSqrt2*m[0+g]+512>>10,m[0+g]=d,m[1+g]=d,m[2+g]=d,m[3+g]=d,m[4+g]=d,m[5+g]=d,m[6+g]=d,m[7+g]=d)}for(h=0;h<8;++h){var y=h;0!==m[8+y]||0!==m[16+y]||0!==m[24+y]||0!==m[32+y]||0!==m[40+y]||0!==m[48+y]||0!==m[56+y]?(a=dctSqrt2*m[0+y]+2048>>12,i=dctSqrt2*m[32+y]+2048>>12,o=m[16+y],s=m[48+y],l=dctSqrt1d2*(m[8+y]-m[56+y])+2048>>12,u=dctSqrt1d2*(m[8+y]+m[56+y])+2048>>12,f=m[24+y],c=m[40+y],d=a-i+1>>1,a=a+i+1>>1,i=d,d=o*dctSin6+s*dctCos6+2048>>12,o=o*dctCos6-s*dctSin6+2048>>12,s=d,d=l-c+1>>1,l=l+c+1>>1,c=d,d=u+f+1>>1,f=u-f+1>>1,u=d,d=a-s+1>>1,a=a+s+1>>1,s=d,d=i-o+1>>1,i=i+o+1>>1,o=d,d=l*dctSin3+u*dctCos3+2048>>12,l=l*dctCos3-u*dctSin3+2048>>12,u=d,d=f*dctSin1+c*dctCos1+2048>>12,f=f*dctCos1-c*dctSin1+2048>>12,c=d,m[0+y]=a+u,m[56+y]=a-u,m[8+y]=i+c,m[48+y]=i-c,m[16+y]=o+f,m[40+y]=o-f,m[24+y]=s+l,m[32+y]=s-l):(d=dctSqrt2*n[h+0]+8192>>14,m[0+y]=d,m[8+y]=d,m[16+y]=d,m[24+y]=d,m[32+y]=d,m[40+y]=d,m[48+y]=d,m[56+y]=d)}for(h=0;h<64;++h){var _=128+(m[h]+8>>4);r[h]=_<0?0:_>255?255:_}}for(var f=0;f>4==0)for(var u=0;u<64;u++){c[dctZigZag[u]]=e[t++]}else{if(f>>4!=1)throw new Error("DQT: invalid table spec");for(var d=0;d<64;d++){c[dctZigZag[d]]=r()}}this.quantizationTables[15&f]=c}break;case 65472:case 65473:case 65474:r();for(var h={extended:65473===o,progressive:65474===o,precision:e[t++],scanLines:r(),samplesPerLine:r(),components:{},componentsOrder:[]},p=e[t++],m=void 0,g=0;g>4,_=15&e[t+1],b=e[t+2];h.componentsOrder.push(m),h.components[m]={h:y,v:_,quantizationIdx:b},t+=3}n(h),this.frames.push(h);break;case 65476:for(var v=r(),w=2;w>4==0?this.huffmanTablesDC[15&k]=buildHuffmanTable(T,S):this.huffmanTablesAC[15&k]=buildHuffmanTable(T,S)}break;case 65501:r(),this.resetInterval=r();break;case 65498:r();for(var A=e[t++],M=[],I=this.frames[0],R=0;R>4],O.huffmanTableAC=this.huffmanTablesAC[15&C],M.push(O)}var P=e[t++],L=e[t++],U=e[t++],B=decodeScan(e,t,I,M,this.resetInterval,P,L,U>>4,15&U);t+=B;break;case 65535:255!==e[t]&&t--;break;default:if(255===e[t-3]&&e[t-2]>=192&&e[t-2]<=254){t-=3;break}throw new Error("unknown JPEG marker ".concat(o.toString(16)))}o=r()}}},{key:"getResult",value:function(){var e=this.frames;if(0===this.frames.length)throw new Error("no frames were decoded");this.frames.length>1&&console.warn("more than one frame is not supported");for(var t=0;t=0;)e[t]=0}var MIN_MATCH$1=3,MAX_MATCH$1=258,LENGTH_CODES$1=29,LITERALS$1=256,L_CODES$1=LITERALS$1+1+LENGTH_CODES$1,D_CODES$1=30,DIST_CODE_LEN=512,static_ltree=new Array(2*(L_CODES$1+2));zero$1(static_ltree);var static_dtree=new Array(2*D_CODES$1);zero$1(static_dtree);var _dist_code=new Array(DIST_CODE_LEN);zero$1(_dist_code);var _length_code=new Array(MAX_MATCH$1-MIN_MATCH$1+1);zero$1(_length_code);var base_length=new Array(LENGTH_CODES$1);zero$1(base_length);var base_dist=new Array(D_CODES$1);zero$1(base_dist);var adler32=function(e,t,r,n){for(var a=65535&e|0,i=e>>>16&65535|0,o=0;0!==r;){r-=o=r>2e3?2e3:r;do{i=i+(a=a+t[n++]|0)|0}while(--o);a%=65521,i%=65521}return a|i<<16|0},adler32_1=adler32,makeTable=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t},crcTable=new Uint32Array(makeTable()),crc32=function(e,t,r,n){var a=crcTable,i=n+r;e^=-1;for(var o=n;o>>8^a[255&(e^t[o])];return-1^e},crc32_1=crc32,messages={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},constants$2={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},_has=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!==_typeof(r))throw new TypeError(r+"must be non-object");for(var n in r)_has(r,n)&&(e[n]=r[n])}}return e},flattenChunks=function(e){for(var t=0,r=0,n=e.length;r=252?6:q>=248?5:q>=240?4:q>=224?3:q>=192?2:1;_utf8len[254]=_utf8len[254]=1;var string2buf=function(e){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);var t,r,n,a,i,o=e.length,s=0;for(a=0;a>>6,t[i++]=128|63&r):r<65536?(t[i++]=224|r>>>12,t[i++]=128|r>>>6&63,t[i++]=128|63&r):(t[i++]=240|r>>>18,t[i++]=128|r>>>12&63,t[i++]=128|r>>>6&63,t[i++]=128|63&r);return t},buf2binstring=function(e,t){if(t<65534&&e.subarray&&STR_APPLY_UIA_OK)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));for(var r="",n=0;n4)i[n++]=65533,r+=s-1;else{for(o&=2===s?31:3===s?15:7;s>1&&r1?i[n++]=65533:o<65536?i[n++]=o:(o-=65536,i[n++]=55296|o>>10&1023,i[n++]=56320|1023&o)}}}return buf2binstring(i,n)},utf8border=function(e,t){(t=t||e.length)>e.length&&(t=e.length);for(var r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+_utf8len[e[r]]>t?r:t},strings={string2buf:string2buf,buf2string:buf2string,utf8border:utf8border};function ZStream(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var zstream=ZStream,BAD$1=30,TYPE$1=12,inffast=function(e,t){var r,n,a,i,o,s,l,f,c,u,d,h,p,m,g,y,_,b,v,w,k,T,E,x,S=e.state;r=e.next_in,E=e.input,n=r+(e.avail_in-5),a=e.next_out,x=e.output,i=a-(t-e.avail_out),o=a+(e.avail_out-257),s=S.dmax,l=S.wsize,f=S.whave,c=S.wnext,u=S.window,d=S.hold,h=S.bits,p=S.lencode,m=S.distcode,g=(1<>>=b=_>>>24,h-=b,0===(b=_>>>16&255))x[a++]=65535&_;else{if(!(16&b)){if(0==(64&b)){_=p[(65535&_)+(d&(1<>>=b,h-=b),h<15&&(d+=E[r++]<>>=b=_>>>24,h-=b,!(16&(b=_>>>16&255))){if(0==(64&b)){_=m[(65535&_)+(d&(1<s){e.msg="invalid distance too far back",S.mode=BAD$1;break e}if(d>>>=b,h-=b,w>(b=a-i)){if((b=w-b)>f&&S.sane){e.msg="invalid distance too far back",S.mode=BAD$1;break e}if(k=0,T=u,0===c){if(k+=l-b,b2;)x[a++]=T[k++],x[a++]=T[k++],x[a++]=T[k++],v-=3;v&&(x[a++]=T[k++],v>1&&(x[a++]=T[k++]))}else{k=a-w;do{x[a++]=x[k++],x[a++]=x[k++],x[a++]=x[k++],v-=3}while(v>2);v&&(x[a++]=x[k++],v>1&&(x[a++]=x[k++]))}break}}break}}while(r>3,d&=(1<<(h-=v<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r=1&&0===I[w];w--);if(k>w&&(k=w),0===w)return a[i++]=20971520,a[i++]=20971520,s.bits=1,0;for(v=1;v0&&(e===CODES$1||1!==w))return-1;for(R[1]=0,_=1;_ENOUGH_LENS$1||e===DISTS$1&&S>ENOUGH_DISTS$1)return 1;for(;;){p=_-E,o[b]h?(m=O[C+o[b]],g=A[M+o[b]]):(m=96,g=0),l=1<<_-E,v=f=1<>E)+(f-=l)]=p<<24|m<<16|g|0}while(0!==f);for(l=1<<_-1;D&l;)l>>=1;if(0!==l?(D&=l-1,D+=l):D=0,b++,0==--I[_]){if(_===w)break;_=t[r+o[b]]}if(_>k&&(D&u)!==c){for(0===E&&(E=k),d+=v,x=1<<(T=_-E);T+EENOUGH_LENS$1||e===DISTS$1&&S>ENOUGH_DISTS$1)return 1;a[c=D&u]=k<<24|T<<16|d-i|0}}return 0!==D&&(a[d+D]=_-E<<24|64<<16|0),s.bits=k,0},inftrees=inflate_table,CODES=0,LENS=1,DISTS=2,Z_FINISH$1=constants$2.Z_FINISH,Z_BLOCK=constants$2.Z_BLOCK,Z_TREES=constants$2.Z_TREES,Z_OK$1=constants$2.Z_OK,Z_STREAM_END$1=constants$2.Z_STREAM_END,Z_NEED_DICT$1=constants$2.Z_NEED_DICT,Z_STREAM_ERROR$1=constants$2.Z_STREAM_ERROR,Z_DATA_ERROR$1=constants$2.Z_DATA_ERROR,Z_MEM_ERROR$1=constants$2.Z_MEM_ERROR,Z_BUF_ERROR=constants$2.Z_BUF_ERROR,Z_DEFLATED=constants$2.Z_DEFLATED,HEAD=1,FLAGS=2,TIME=3,OS=4,EXLEN=5,EXTRA=6,NAME=7,COMMENT=8,HCRC=9,DICTID=10,DICT=11,TYPE=12,TYPEDO=13,STORED=14,COPY_=15,COPY=16,TABLE=17,LENLENS=18,CODELENS=19,LEN_=20,LEN=21,LENEXT=22,DIST=23,DISTEXT=24,MATCH=25,LIT=26,CHECK=27,LENGTH=28,DONE=29,BAD=30,MEM=31,SYNC=32,ENOUGH_LENS=852,ENOUGH_DISTS=592,MAX_WBITS=15,DEF_WBITS=MAX_WBITS,zswap32=function(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)};function InflateState(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var inflateResetKeep=function(e){if(!e||!e.state)return Z_STREAM_ERROR$1;var t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=HEAD,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(ENOUGH_LENS),t.distcode=t.distdyn=new Int32Array(ENOUGH_DISTS),t.sane=1,t.back=-1,Z_OK$1},inflateReset=function(e){if(!e||!e.state)return Z_STREAM_ERROR$1;var t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,inflateResetKeep(e)},inflateReset2=function(e,t){var r;if(!e||!e.state)return Z_STREAM_ERROR$1;var n=e.state;return t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Z_STREAM_ERROR$1:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,inflateReset(e))},inflateInit2=function(e,t){if(!e)return Z_STREAM_ERROR$1;var r=new InflateState;e.state=r,r.window=null;var n=inflateReset2(e,t);return n!==Z_OK$1&&(e.state=null),n},inflateInit=function(e){return inflateInit2(e,DEF_WBITS)},virgin=!0,lenfix,distfix,fixedtables=function(e){if(virgin){lenfix=new Int32Array(512),distfix=new Int32Array(32);for(var t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(inftrees(LENS,e.lens,0,288,lenfix,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;inftrees(DISTS,e.lens,0,32,distfix,0,e.work,{bits:5}),virgin=!1}e.lencode=lenfix,e.lenbits=9,e.distcode=distfix,e.distbits=5},updatewindow=function(e,t,r,n){var a,i=e.state;return null===i.window&&(i.wsize=1<=i.wsize?(i.window.set(t.subarray(r-i.wsize,r),0),i.wnext=0,i.whave=i.wsize):((a=i.wsize-i.wnext)>n&&(a=n),i.window.set(t.subarray(r-n,r-n+a),i.wnext),(n-=a)?(i.window.set(t.subarray(r-n,r),0),i.wnext=n,i.whave=i.wsize):(i.wnext+=a,i.wnext===i.wsize&&(i.wnext=0),i.whave>>8&255,r.check=crc32_1(r.check,D,2,0),f=0,c=0,r.mode=FLAGS;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&f)<<8)+(f>>8))%31){e.msg="incorrect header check",r.mode=BAD;break}if((15&f)!==Z_DEFLATED){e.msg="unknown compression method",r.mode=BAD;break}if(c-=4,k=8+(15&(f>>>=4)),0===r.wbits)r.wbits=k;else if(k>r.wbits){e.msg="invalid window size",r.mode=BAD;break}r.dmax=1<>8&1),512&r.flags&&(D[0]=255&f,D[1]=f>>>8&255,r.check=crc32_1(r.check,D,2,0)),f=0,c=0,r.mode=TIME;case TIME:for(;c<32;){if(0===s)break e;s--,f+=n[i++]<>>8&255,D[2]=f>>>16&255,D[3]=f>>>24&255,r.check=crc32_1(r.check,D,4,0)),f=0,c=0,r.mode=OS;case OS:for(;c<16;){if(0===s)break e;s--,f+=n[i++]<>8),512&r.flags&&(D[0]=255&f,D[1]=f>>>8&255,r.check=crc32_1(r.check,D,2,0)),f=0,c=0,r.mode=EXLEN;case EXLEN:if(1024&r.flags){for(;c<16;){if(0===s)break e;s--,f+=n[i++]<>>8&255,r.check=crc32_1(r.check,D,2,0)),f=0,c=0}else r.head&&(r.head.extra=null);r.mode=EXTRA;case EXTRA:if(1024&r.flags&&((h=r.length)>s&&(h=s),h&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(i,i+h),k)),512&r.flags&&(r.check=crc32_1(r.check,n,h,i)),s-=h,i+=h,r.length-=h),r.length))break e;r.length=0,r.mode=NAME;case NAME:if(2048&r.flags){if(0===s)break e;h=0;do{k=n[i+h++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k))}while(k&&h>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=TYPE;break;case DICTID:for(;c<32;){if(0===s)break e;s--,f+=n[i++]<>>=7&c,c-=7&c,r.mode=CHECK;break}for(;c<3;){if(0===s)break e;s--,f+=n[i++]<>>=1)){case 0:r.mode=STORED;break;case 1:if(fixedtables(r),r.mode=LEN_,t===Z_TREES){f>>>=2,c-=2;break e}break;case 2:r.mode=TABLE;break;case 3:e.msg="invalid block type",r.mode=BAD}f>>>=2,c-=2;break;case STORED:for(f>>>=7&c,c-=7&c;c<32;){if(0===s)break e;s--,f+=n[i++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=BAD;break}if(r.length=65535&f,f=0,c=0,r.mode=COPY_,t===Z_TREES)break e;case COPY_:r.mode=COPY;case COPY:if(h=r.length){if(h>s&&(h=s),h>l&&(h=l),0===h)break e;a.set(n.subarray(i,i+h),o),s-=h,i+=h,l-=h,o+=h,r.length-=h;break}r.mode=TYPE;break;case TABLE:for(;c<14;){if(0===s)break e;s--,f+=n[i++]<>>=5,c-=5,r.ndist=1+(31&f),f>>>=5,c-=5,r.ncode=4+(15&f),f>>>=4,c-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=BAD;break}r.have=0,r.mode=LENLENS;case LENLENS:for(;r.have>>=3,c-=3}for(;r.have<19;)r.lens[A[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,E={bits:r.lenbits},T=inftrees(CODES,r.lens,0,19,r.lencode,0,r.work,E),r.lenbits=E.bits,T){e.msg="invalid code lengths set",r.mode=BAD;break}r.have=0,r.mode=CODELENS;case CODELENS:for(;r.have>>16&255,_=65535&S,!((g=S>>>24)<=c);){if(0===s)break e;s--,f+=n[i++]<>>=g,c-=g,r.lens[r.have++]=_;else{if(16===_){for(x=g+2;c>>=g,c-=g,0===r.have){e.msg="invalid bit length repeat",r.mode=BAD;break}k=r.lens[r.have-1],h=3+(3&f),f>>>=2,c-=2}else if(17===_){for(x=g+3;c>>=g)),f>>>=3,c-=3}else{for(x=g+7;c>>=g)),f>>>=7,c-=7}if(r.have+h>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=BAD;break}for(;h--;)r.lens[r.have++]=k}}if(r.mode===BAD)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=BAD;break}if(r.lenbits=9,E={bits:r.lenbits},T=inftrees(LENS,r.lens,0,r.nlen,r.lencode,0,r.work,E),r.lenbits=E.bits,T){e.msg="invalid literal/lengths set",r.mode=BAD;break}if(r.distbits=6,r.distcode=r.distdyn,E={bits:r.distbits},T=inftrees(DISTS,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,E),r.distbits=E.bits,T){e.msg="invalid distances set",r.mode=BAD;break}if(r.mode=LEN_,t===Z_TREES)break e;case LEN_:r.mode=LEN;case LEN:if(s>=6&&l>=258){e.next_out=o,e.avail_out=l,e.next_in=i,e.avail_in=s,r.hold=f,r.bits=c,inffast(e,d),o=e.next_out,a=e.output,l=e.avail_out,i=e.next_in,n=e.input,s=e.avail_in,f=r.hold,c=r.bits,r.mode===TYPE&&(r.back=-1);break}for(r.back=0;y=(S=r.lencode[f&(1<>>16&255,_=65535&S,!((g=S>>>24)<=c);){if(0===s)break e;s--,f+=n[i++]<>b)])>>>16&255,_=65535&S,!(b+(g=S>>>24)<=c);){if(0===s)break e;s--,f+=n[i++]<>>=b,c-=b,r.back+=b}if(f>>>=g,c-=g,r.back+=g,r.length=_,0===y){r.mode=LIT;break}if(32&y){r.back=-1,r.mode=TYPE;break}if(64&y){e.msg="invalid literal/length code",r.mode=BAD;break}r.extra=15&y,r.mode=LENEXT;case LENEXT:if(r.extra){for(x=r.extra;c>>=r.extra,c-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=DIST;case DIST:for(;y=(S=r.distcode[f&(1<>>16&255,_=65535&S,!((g=S>>>24)<=c);){if(0===s)break e;s--,f+=n[i++]<>b)])>>>16&255,_=65535&S,!(b+(g=S>>>24)<=c);){if(0===s)break e;s--,f+=n[i++]<>>=b,c-=b,r.back+=b}if(f>>>=g,c-=g,r.back+=g,64&y){e.msg="invalid distance code",r.mode=BAD;break}r.offset=_,r.extra=15&y,r.mode=DISTEXT;case DISTEXT:if(r.extra){for(x=r.extra;c>>=r.extra,c-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=BAD;break}r.mode=MATCH;case MATCH:if(0===l)break e;if(h=d-l,r.offset>h){if((h=r.offset-h)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=BAD;break}h>r.wnext?(h-=r.wnext,p=r.wsize-h):p=r.wnext-h,h>r.length&&(h=r.length),m=r.window}else m=a,p=o-r.offset,h=r.length;h>l&&(h=l),l-=h,r.length-=h;do{a[o++]=m[p++]}while(--h);0===r.length&&(r.mode=LEN);break;case LIT:if(0===l)break e;a[o++]=r.length,l--,r.mode=LEN;break;case CHECK:if(r.wrap){for(;c<32;){if(0===s)break e;s--,f|=n[i++]<=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;var r=inflate_1$2.inflateInit2(this.strm,t.windowBits);if(r!==Z_OK)throw new Error(messages[r]);if(this.header=new gzheader,inflate_1$2.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=strings.string2buf(t.dictionary):"[object ArrayBuffer]"===toString.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=inflate_1$2.inflateSetDictionary(this.strm,t.dictionary))!==Z_OK))throw new Error(messages[r])}function inflate$1(e,t){var r=new Inflate$1(t);if(r.push(e),r.err)throw r.msg||messages[r.err];return r.result}function inflateRaw$1(e,t){return(t=t||{}).raw=!0,inflate$1(e,t)}Inflate$1.prototype.push=function(e,t){var r,n,a,i=this.strm,o=this.options.chunkSize,s=this.options.dictionary;if(this.ended)return!1;for(n=t===~~t?t:!0===t?Z_FINISH:Z_NO_FLUSH,"[object ArrayBuffer]"===toString.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;){for(0===i.avail_out&&(i.output=new Uint8Array(o),i.next_out=0,i.avail_out=o),(r=inflate_1$2.inflate(i,n))===Z_NEED_DICT&&s&&((r=inflate_1$2.inflateSetDictionary(i,s))===Z_OK?r=inflate_1$2.inflate(i,n):r===Z_DATA_ERROR&&(r=Z_NEED_DICT));i.avail_in>0&&r===Z_STREAM_END&&i.state.wrap>0&&0!==e[i.next_in];)inflate_1$2.inflateReset(i),r=inflate_1$2.inflate(i,n);switch(r){case Z_STREAM_ERROR:case Z_DATA_ERROR:case Z_NEED_DICT:case Z_MEM_ERROR:return this.onEnd(r),this.ended=!0,!1}if(a=i.avail_out,i.next_out&&(0===i.avail_out||r===Z_STREAM_END))if("string"===this.options.to){var l=strings.utf8border(i.output,i.next_out),f=i.next_out-l,c=strings.buf2string(i.output,l);i.next_out=f,i.avail_out=o-f,f&&i.output.set(i.output.subarray(l,l+f),0),this.onData(c)}else this.onData(i.output.length===i.next_out?i.output:i.output.subarray(0,i.next_out));if(r!==Z_OK||0!==a){if(r===Z_STREAM_END)return r=inflate_1$2.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,!0;if(0===i.avail_in)break}}return!0},Inflate$1.prototype.onData=function(e){this.chunks.push(e)},Inflate$1.prototype.onEnd=function(e){e===Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=common.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Inflate_1$1=Inflate$1,inflate_2=inflate$1,inflateRaw_1$1=inflateRaw$1,ungzip$1=inflate$1,constants=constants$2,inflate_1$1={Inflate:Inflate_1$1,inflate:inflate_2,inflateRaw:inflateRaw_1$1,ungzip:ungzip$1,constants:constants},inflate=inflate_1$1.inflate,inflate_1=inflate,DeflateDecoder=function(e){_inherits(r,BaseDecoder);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"decodeBlock",value:function(e){return inflate_1(new Uint8Array(e)).buffer}}]),r}(),deflate=Object.freeze({__proto__:null,default:DeflateDecoder}),PackbitsDecoder=function(e){_inherits(r,BaseDecoder);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"decodeBlock",value:function(e){for(var t=new DataView(e),r=[],n=0;n>3],S<<=7&D),g=0;g>3]),128&S?(l&&(l[D]=1),m=m>(o=M.encoding<2?T[E++]:x)?o:m,s[D++]=o):(l&&(l[D]=0),s[D++]=n),S<<=1;D+=A}else if(M.encoding<2)for(y=0;y(o=T[E++])?o:m,s[D++]=o;D+=A}else for(m=m>x?x:m,y=0;y0){var o=new Uint8Array(Math.ceil(n.width*n.height/8)),s=(i=new DataView(e,t,n.mask.numBytes)).getInt16(0,!0),l=2,f=0;do{if(s>0)for(;s--;)o[f++]=i.getUint8(l++);else{var c=i.getUint8(l++);for(s=-s;s--;)o[f++]=c}s=i.getInt16(l,!0),l+=2}while(l0?1:0),p=d+(n.height%d>0?1:0);n.pixels.blocks=new Array(h*p);for(var m=0,g=0;g3)throw"Invalid block encoding ("+v.encoding+")";if(2!==v.encoding){if(0!==w&&2!==w){if(w>>=6,v.offsetType=w,2===w)v.offset=i.getInt8(1),_++;else if(1===w)v.offset=i.getInt16(1,!0),_+=2;else{if(0!==w)throw"Invalid block offset type";v.offset=i.getFloat32(1,!0),_+=4}if(1===v.encoding)if(w=i.getUint8(_),_++,v.bitsPerPixel=63&w,w>>=6,v.numValidPixelsType=w,2===w)v.numValidPixels=i.getUint8(_),_++;else if(1===w)v.numValidPixels=i.getUint16(_,!0),_+=2;else{if(0!==w)throw"Invalid valid pixel count type";v.numValidPixels=i.getUint32(_,!0),_+=4}}var k;if(t+=_,3!==v.encoding)if(0===v.encoding){var T=(n.pixels.numBytes-1)/4;if(T!==Math.floor(T))throw"uncompressed block has invalid length";k=new ArrayBuffer(4*T),new Uint8Array(k).set(new Uint8Array(e,t,4*T));var E=new Float32Array(k);v.rawData=E,t+=4*T}else if(1===v.encoding){var x=Math.ceil(v.numValidPixels*v.bitsPerPixel/8),S=Math.ceil(x/4);k=new ArrayBuffer(4*S),new Uint8Array(k).set(new Uint8Array(e,t,x)),v.stuffedData=new Uint32Array(k),t+=x}}else t++}return n.eofOffset=t,n},i=function(e,t,r,n,a,i,o){var s,l,f,c=(1<=t)l=f>>>d-t&c,d-=t;else{var m=t-d;l=(f&c)<>>(d=32-m)}i[s]=l=r?(f=c>>>m-r&h,m-=r):(f=(c&h)<<(u=r-m)&h,f+=(c=e[p++])>>>(m=32-u)),t[l]=a[f];else for(d=Math.ceil((s-i)/o),l=0;l=r?(f=c>>>m-r&h,m-=r):(f=(c&h)<<(u=r-m)&h,f+=(c=e[p++])>>>(m=32-u)),t[l]=f=t?(d=o>>>u-t&s,u-=t):(d=(o&s)<<(c=t-u)&s,d+=(o=e[l++])>>>(u=32-c)),h[f]=d=r?(f=c>>>m&d,p-=r,m+=r):(f=c>>>m&d,p=32-(u=r-p),f|=((c=e[h++])&(1<=r?(f=c>>>m&d,p-=r,m+=r):(f=c>>>m&d,p=32-(u=r-p),f|=((c=e[h++])&(1<=t?(d=o>>>h&s,u-=t,h+=t):(d=o>>>h&s,u=32-(c=t-u),d|=((o=e[l++])&(1<=r?(i=o>>>c-r&l,c-=r):(i=(o&l)<<(s=r-c)&l,i+=(o=e[f++])>>>(c=32-s)),t[a]=i;return t},u=function(e,t,r,n){var a,i,o,s,l=(1<=r?(i=o>>>u&l,c-=r,u+=r):(i=o>>>u&l,c=32-(s=r-c),i|=((o=e[f++])&(1<=359?359:a;a-=o;do{t+=e[i++]<<8,r+=t+=e[i++]}while(--o);t=(65535&t)+(t>>>16),r=(65535&r)+(r>>>16)}return 1&n&&(r+=t+=e[i]<<8),((r=(65535&r)+(r>>>16))<<16|(t=(65535&t)+(t>>>16)))>>>0},readHeaderInfo:function(e,t){var r=t.ptr,n=new Uint8Array(e,r,6),a={};if(a.fileIdentifierString=String.fromCharCode.apply(null,n),0!==a.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+a.fileIdentifierString;r+=6;var i,o=new DataView(e,r,8),s=o.getInt32(0,!0);if(a.fileVersion=s,r+=4,s>=3&&(a.checksum=o.getUint32(4,!0),r+=4),o=new DataView(e,r,12),a.height=o.getUint32(0,!0),a.width=o.getUint32(4,!0),r+=8,s>=4?(a.numDims=o.getUint32(8,!0),r+=4):a.numDims=1,o=new DataView(e,r,40),a.numValidPixel=o.getUint32(0,!0),a.microBlockSize=o.getInt32(4,!0),a.blobSize=o.getInt32(8,!0),a.imageType=o.getInt32(12,!0),a.maxZError=o.getFloat64(16,!0),a.zMin=o.getFloat64(24,!0),a.zMax=o.getFloat64(32,!0),r+=40,t.headerInfo=a,t.ptr=r,s>=3&&(i=s>=4?52:48,this.computeChecksumFletcher32(new Uint8Array(e,r-i,a.blobSize-14))!==a.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(e,t){var r=t.headerInfo,n=this.getDataTypeArray(r.imageType),a=r.numDims*this.getDataTypeSize(r.imageType),i=this.readSubArray(e,t.ptr,n,a),o=this.readSubArray(e,t.ptr+a,n,a);t.ptr+=2*a;var s,l=!0;for(s=0;s0){r=new Uint8Array(Math.ceil(o/8));var c=(l=new DataView(e,a,f.numBytes)).getInt16(0,!0),u=2,d=0,h=0;do{if(c>0)for(;c--;)r[d++]=l.getUint8(u++);else for(h=l.getUint8(u++),c=-c;c--;)r[d++]=h;c=l.getInt16(u,!0),u+=2}while(u>3],p<<=7&m):p=r[m>>3],128&p&&(n[m]=1);t.pixels.resultMask=n,f.bitset=r,a+=f.numBytes}return t.ptr=a,t.mask=f,!0},readDataOneSweep:function(e,t,r,n){var a,i=t.ptr,o=t.headerInfo,s=o.numDims,l=o.width*o.height,f=o.imageType,c=o.numValidPixel*d.getDataTypeSize(f)*s,u=t.pixels.resultMask;if(r===Uint8Array)a=new Uint8Array(e,i,c);else{var h=new ArrayBuffer(c);new Uint8Array(h).set(new Uint8Array(e,i,c)),a=new r(h)}if(a.length===l*s)t.pixels.resultPixels=n?d.swapDimensionOrder(a,l,s,r,!0):a;else{t.pixels.resultPixels=new r(l*s);var p=0,m=0,g=0,y=0;if(s>1){if(n){for(m=0;m=o)return!1;var s=new Uint32Array(o-i);d.decodeBits(e,t,s);var l,f,c,u,p=[];for(l=i;l0&&(p[f].second=_<>>32-u,32-v>=u?32===(v+=u)&&(v=0,_=b[++w]):(v+=u-32,_=b[++w],p[f].second|=_>>>32-v));var k=0,T=0,E=new h;for(l=0;l=r?r:k;var x,S,D,A,M,I=[];for(l=i;l0)if(x=[u,f],u<=T)for(S=p[f].second<=0;A--)S>>>A&1?(M.right||(M.right=new h),M=M.right):(M.left||(M.left=new h),M=M.left),0!==A||M.val||(M.val=x[1]);return{decodeLut:I,numBitsLUTQick:T,numBitsLUT:k,tree:E,stuffedData:b,srcPtr:w,bitPos:v}},readHuffman:function(e,t,r,n){var a,i,o,s,l,f,c,u,h,p=t.headerInfo.numDims,m=t.headerInfo.height,g=t.headerInfo.width,y=g*m,_=this.readHuffmanTree(e,t),b=_.decodeLut,v=_.tree,w=_.stuffedData,k=_.srcPtr,T=_.bitPos,E=_.numBitsLUTQick,x=_.numBitsLUT,S=0===t.headerInfo.imageType?128:0,D=t.pixels.resultMask,A=0;T>0&&(k++,T=0);var M,I=w[k],R=1===t.encodeMode,O=new r(y*p),C=O;if(p<2||R){for(M=0;M1&&(C=new r(O.buffer,y*M,y),A=0),t.headerInfo.numValidPixel===g*m)for(u=0,f=0;f>>32-E,32-T>>64-T-E),b[l])i=b[l][1],T+=b[l][0];else for(l=s=I<>>32-x,32-T>>64-T-x),a=v,h=0;h>>x-h-1&1?a.right:a.left).left&&!a.right){i=a.val,T=T+h+1;break}T>=32&&(T-=32,I=w[++k]),o=i-S,R?(o+=c>0?A:f>0?C[u-g]:A,o&=255,C[u]=o,A=o):C[u]=o}else for(u=0,f=0;f>>32-E,32-T>>64-T-E),b[l])i=b[l][1],T+=b[l][0];else for(l=s=I<>>32-x,32-T>>64-T-x),a=v,h=0;h>>x-h-1&1?a.right:a.left).left&&!a.right){i=a.val,T=T+h+1;break}T>=32&&(T-=32,I=w[++k]),o=i-S,R?(c>0&&D[u-1]?o+=A:f>0&&D[u-g]?o+=C[u-g]:o+=A,o&=255,C[u]=o,A=o):C[u]=o}}else for(u=0,f=0;f>>32-E,32-T>>64-T-E),b[l])i=b[l][1],T+=b[l][0];else for(l=s=I<>>32-x,32-T>>64-T-x),a=v,h=0;h>>x-h-1&1?a.right:a.left).left&&!a.right){i=a.val,T=T+h+1;break}T>=32&&(T-=32,I=w[++k]),o=i-S,C[u]=o}t.ptr=t.ptr+4*(k+1)+(T>0?4:0),t.pixels.resultPixels=O,p>1&&!n&&(t.pixels.resultPixels=d.swapDimensionOrder(O,y,p,r))},decodeBits:function(e,t,r,n,a){var i=t.headerInfo,d=i.fileVersion,h=0,p=e.byteLength-t.ptr>=5?5:e.byteLength-t.ptr,m=new DataView(e,t.ptr,p),g=m.getUint8(0);h++;var y=g>>6,_=0===y?4:3-y,b=(32&g)>0,v=31&g,w=0;if(1===_)w=m.getUint8(h),h++;else if(2===_)w=m.getUint16(h,!0),h+=2;else{if(4!==_)throw"Invalid valid pixel count type";w=m.getUint32(h,!0),h+=4}var k,T,E,x,S,D,A,M,I,R=2*i.maxZError,O=i.numDims>1?i.maxValues[a]:i.zMax;if(b){for(t.counter.lut++,M=m.getUint8(h),h++,x=Math.ceil((M-1)*v/8),S=Math.ceil(x/4),T=new ArrayBuffer(4*S),E=new Uint8Array(T),t.ptr+=h,E.set(new Uint8Array(e,t.ptr,x)),A=new Uint32Array(T),t.ptr+=x,I=0;M-1>>>I;)I++;x=Math.ceil(w*I/8),S=Math.ceil(x/4),T=new ArrayBuffer(4*S),(E=new Uint8Array(T)).set(new Uint8Array(e,t.ptr,x)),k=new Uint32Array(T),t.ptr+=x,D=d>=3?f(A,v,M-1,n,R,O):s(A,v,M-1,n,R,O),d>=3?l(k,r,I,w,D):o(k,r,I,w,D)}else t.counter.bitstuffer++,I=v,t.ptr+=h,I>0&&(x=Math.ceil(w*I/8),S=Math.ceil(x/4),T=new ArrayBuffer(4*S),(E=new Uint8Array(T)).set(new Uint8Array(e,t.ptr,x)),k=new Uint32Array(T),t.ptr+=x,d>=3?null==n?u(k,r,I,w):l(k,r,I,w,!1,n,R,O):null==n?c(k,r,I,w):o(k,r,I,w,!1,n,R,O))},readTiles:function(e,t,r,n){var a=t.headerInfo,i=a.width,o=a.height,s=i*o,l=a.microBlockSize,f=a.imageType,c=d.getDataTypeSize(f),u=Math.ceil(i/l),h=Math.ceil(o/l);t.pixels.numBlocksY=h,t.pixels.numBlocksX=u,t.pixels.ptr=0;var p,m,g,y,_,b,v,w,k,T,E=0,x=0,S=0,D=0,A=0,M=0,I=0,R=0,O=0,C=0,P=0,L=0,U=0,B=0,$=0,N=new r(l*l),z=o%l||l,Z=i%l||l,G=a.numDims,j=t.pixels.resultMask,V=t.pixels.resultPixels,F=a.fileVersion>=5?14:15,K=a.zMax;for(S=0;S1?(T=V,C=S*i*l+D*l,V=new r(t.pixels.resultPixels.buffer,s*w*c,s),K=a.maxValues[w]):T=null,I=e.byteLength-t.ptr,m={},$=0,R=(p=new DataView(e,t.ptr,Math.min(10,I))).getUint8(0),$++,k=a.fileVersion>=5?4&R:0,O=R>>6&255,(R>>2&F)!=(D*l>>3&F))throw"integrity issue";if(k&&0===w)throw"integrity issue";if((_=3&R)>3)throw t.ptr+=$,"Invalid block encoding ("+_+")";if(2!==_)if(0===_){if(k)throw"integrity issue";if(t.counter.uncompressed++,t.ptr+=$,L=(L=A*M*c)<(U=e.byteLength-t.ptr)?L:U,g=new ArrayBuffer(L%c==0?L:L+c-L%c),new Uint8Array(g).set(new Uint8Array(e,t.ptr,L)),y=new r(g),B=0,j)for(E=0;E1&&!n&&(t.pixels.resultPixels=d.swapDimensionOrder(t.pixels.resultPixels,s,G,r))},formatFileInfo:function(e){return{fileIdentifierString:e.headerInfo.fileIdentifierString,fileVersion:e.headerInfo.fileVersion,imageType:e.headerInfo.imageType,height:e.headerInfo.height,width:e.headerInfo.width,numValidPixel:e.headerInfo.numValidPixel,microBlockSize:e.headerInfo.microBlockSize,blobSize:e.headerInfo.blobSize,maxZError:e.headerInfo.maxZError,pixelType:d.getPixelType(e.headerInfo.imageType),eofOffset:e.eofOffset,mask:e.mask?{numBytes:e.mask.numBytes}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,maxValue:e.headerInfo.zMax,minValue:e.headerInfo.zMin,noDataValue:e.noDataValue}}},constructConstantSurface:function(e,t){var r=e.headerInfo.zMax,n=e.headerInfo.zMin,a=e.headerInfo.maxValues,i=e.headerInfo.numDims,o=e.headerInfo.height*e.headerInfo.width,s=0,l=0,f=0,c=e.pixels.resultMask,u=e.pixels.resultPixels;if(c)if(i>1){if(t)for(s=0;s1&&n!==r)if(t)for(s=0;s=-128&&t<=127;break;case 1:r=t>=0&&t<=255;break;case 2:r=t>=-32768&&t<=32767;break;case 3:r=t>=0&&t<=65536;break;case 4:r=t>=-2147483648&&t<=2147483647;break;case 5:r=t>=0&&t<=4294967296;break;case 6:r=t>=-34027999387901484e22&&t<=34027999387901484e22;break;case 7:r=t>=-17976931348623157e292&&t<=17976931348623157e292;break;default:r=!1}return r},getDataTypeSize:function(e){var t=0;switch(e){case 0:case 1:t=1;break;case 2:case 3:t=2;break;case 4:case 5:case 6:t=4;break;case 7:t=8;break;default:t=e}return t},getDataTypeUsed:function(e,t){var r=e;switch(e){case 2:case 4:r=e-t;break;case 3:case 5:r=e-2*t;break;case 6:r=0===t?e:1===t?2:1;break;case 7:r=0===t?e:e-2*t+1;break;default:r=e}return r},getOnePixel:function(e,t,r,n){var a=0;switch(r){case 0:a=n.getInt8(t);break;case 1:a=n.getUint8(t);break;case 2:a=n.getInt16(t,!0);break;case 3:a=n.getUint16(t,!0);break;case 4:a=n.getInt32(t,!0);break;case 5:a=n.getUInt32(t,!0);break;case 6:a=n.getFloat32(t,!0);break;case 7:a=n.getFloat64(t,!0);break;default:throw"the decoder does not understand this pixel type"}return a},swapDimensionOrder:function(e,t,r,n,a){var i=0,o=0,s=0,l=0,f=e;if(r>1)if(f=new n(t*r),a)for(i=0;i5)throw"unsupported lerc version 2."+o;d.readMask(e,a),i.numValidPixel===i.width*i.height||a.pixels.resultMask||(a.pixels.resultMask=t.maskData);var l=i.width*i.height;a.pixels.resultPixels=new s(l*i.numDims),a.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0};var f,c=!t.returnPixelInterleavedDims;if(0!==i.numValidPixel)if(i.zMax===i.zMin)d.constructConstantSurface(a,c);else if(o>=4&&d.checkMinMaxRanges(e,a))d.constructConstantSurface(a,c);else{var u=new DataView(e,a.ptr,2),h=u.getUint8(0);if(a.ptr++,h)d.readDataOneSweep(e,a,s,c);else if(o>1&&i.imageType<=1&&Math.abs(i.maxZError-.5)<1e-5){var p=u.getUint8(1);if(a.ptr++,a.encodeMode=p,p>2||o<4&&p>1)throw"Invalid Huffman flag "+p;p?d.readHuffman(e,a,s,c):d.readTiles(e,a,s,c)}else d.readTiles(e,a,s,c)}a.eofOffset=a.ptr,t.inputOffset?(f=a.headerInfo.blobSize+t.inputOffset-a.ptr,Math.abs(f)>=1&&(a.eofOffset=t.inputOffset+a.headerInfo.blobSize)):(f=a.headerInfo.blobSize-a.ptr,Math.abs(f)>=1&&(a.eofOffset=a.headerInfo.blobSize));var m={width:i.width,height:i.height,pixelData:a.pixels.resultPixels,minValue:i.zMin,maxValue:i.zMax,validPixelCount:i.numValidPixel,dimCount:i.numDims,dimStats:{minValues:i.minValues,maxValues:i.maxValues},maskData:a.pixels.resultMask};if(a.pixels.resultMask&&d.isValidPixelValue(i.imageType,r)){var g=a.pixels.resultMask;for(n=0;n1&&(f&&m.push(f),w.fileInfo.mask&&w.fileInfo.mask.numBytes>0&&v++),h++,b.pixels.push(w.pixelData),b.statistics.push({minValue:w.minValue,maxValue:w.maxValue,noDataValue:w.noDataValue,dimStats:w.dimStats})}if(n>1&&v>1){for(d=b.width*b.height,b.bandMasks=m,(f=new Uint8Array(d)).set(m[0]),c=1;ce*t)throw new Error(r)}function Jb(t){return t instanceof Int8Array?-128:t instanceof Int16Array?-32768:t instanceof Int32Array?-2147483648:t instanceof Float32Array?12e-39:0}function Qb(t){return t instanceof Int8Array?127:t instanceof Uint8Array||t instanceof Uint8ClampedArray?255:t instanceof Int16Array?32767:t instanceof Uint16Array?65535:t instanceof Int32Array?2147483647:t instanceof Uint32Array?4294967295:t instanceof Float32Array?34e37:255}var tg=function(t){function n(n){var e=t.call(this,{state:os,tileGrid:null,projection:null,opaque:n.opaque,transition:n.transition})||this;e.Lu=n.sources;var r=e.Lu.length;e.Fu=new Array(r),e.Gu=new Array(r),e.Uu,e.Bu,e.qu=!1!==n.normalize,e.$u=!1,e.V=null,e.Vu=n.convertToRGB?"readRGB":"readRasters",e.setKey(e.Lu.map((function(t){return t.url})).join(","));for(var i=e,o=new Array(r),s=0;sp.length&&(a=i.length-p.length);var x=i[i.length-1]/p[p.length-1];f.Gu[u]=x;var k=p.map((function(t){return t*x})),_="Resolution mismatch for source "+u+", got ["+k+"] but expected ["+i+"]";Yb(i.slice(a,i.length),k,.005,_,f.viewRejector)}else i=p,f.Gu[u]=1;r?Yb(r.slice(a,r.length),d,0,"Tile size mismatch for source "+u,f.viewRejector):r=d,f.Fu[u]=c.reverse()},f=this,h=0;h=0;--l){var y=Hb(p[l]);if(y){this.projection=y;break}}}this.Uu=o,this.Bu=s;t:for(h=0;hh||u>h;)c.push([Math.ceil(a/h),Math.ceil(u/h)]),h+=h;break;case ig:for(var l=a,v=u;l>h||v>h;)c.push([Math.ceil(l/h),Math.ceil(v/h)]),l>>=1,v>>=1;break;default:St(!1,53)}c.push([1,1]),c.reverse();for(var d=[s],p=[0],y=1,m=c.length;y1,r=e&&t.imageInfo.profile[1].supports?t.imageInfo.profile[1].supports:[],i=e&&t.imageInfo.profile[1].formats?t.imageInfo.profile[1].formats:[],o=e&&t.imageInfo.profile[1].qualities?t.imageInfo.profile[1].qualities:[];return{url:t.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),sizes:void 0===t.imageInfo.sizes?void 0:t.imageInfo.sizes.map((function(t){return[t.width,t.height]})),tileSize:void 0===t.imageInfo.tiles?void 0:[t.imageInfo.tiles.map((function(t){return t.width}))[0],t.imageInfo.tiles.map((function(t){return void 0===t.height?t.width:t.height}))[0]],resolutions:void 0===t.imageInfo.tiles?void 0:t.imageInfo.tiles.map((function(t){return t.scaleFactors}))[0],supports:ag(ag([],n.supports),r),formats:ag(ag([],n.formats),i),qualities:ag(ag([],n.qualities),o)}},pg[fg]=function(t){var n=t.getComplianceLevelSupportedFeatures(),e=void 0===t.imageInfo.extraFormats?n.formats:ag(ag([],n.formats),t.imageInfo.extraFormats),r=void 0!==t.imageInfo.preferredFormats&&Array.isArray(t.imageInfo.preferredFormats)&&t.imageInfo.preferredFormats.length>0?t.imageInfo.preferredFormats.filter((function(t){return y(["jpg","png","gif"],t)})).reduce((function(t,n){return void 0===t&&y(e,n)?n:t}),void 0):void 0;return{url:t.imageInfo.id,sizes:void 0===t.imageInfo.sizes?void 0:t.imageInfo.sizes.map((function(t){return[t.width,t.height]})),tileSize:void 0===t.imageInfo.tiles?void 0:[t.imageInfo.tiles.map((function(t){return t.width}))[0],t.imageInfo.tiles.map((function(t){return t.height}))[0]],resolutions:void 0===t.imageInfo.tiles?void 0:t.imageInfo.tiles.map((function(t){return t.scaleFactors}))[0],supports:void 0===t.imageInfo.extraFeatures?n.supports:ag(ag([],n.supports),t.imageInfo.extraFeatures),formats:e,qualities:void 0===t.imageInfo.extraQualities?n.qualities:ag(ag([],n.qualities),t.imageInfo.extraQualities),preferredFormat:r}};var yg=function(){function t(t){this.setImageInfo(t)}return t.prototype.setImageInfo=function(t){this.imageInfo="string"==typeof t?JSON.parse(t):t},t.prototype.getImageApiVersion=function(){if(void 0!==this.imageInfo){var t=this.imageInfo["@context"]||"ol-no-context";"string"==typeof t&&(t=[t]);for(var n=0;n0&&"string"==typeof this.imageInfo.profile[0]&&vg.test(this.imageInfo.profile[0]))return this.imageInfo.profile[0]}},t.prototype.getComplianceLevelFromProfile=function(t){var n=this.getComplianceLevelEntryFromProfile(t);if(void 0!==n){var e=n.match(/level[0-2](?:\.json)?$/g);return Array.isArray(e)?e[0].replace(".json",""):void 0}},t.prototype.getComplianceLevelSupportedFeatures=function(){if(void 0!==this.imageInfo){var t=this.getImageApiVersion(),n=this.getComplianceLevelFromProfile(t);return void 0===n?hg.none.none:hg[t][n]}},t.prototype.getTileSourceOptions=function(t){var n=t||{},e=this.getImageApiVersion();if(void 0!==e){var r=void 0===e?void 0:pg[e](this);if(void 0!==r)return{url:r.url,version:e,size:[this.imageInfo.width,this.imageInfo.height],sizes:r.sizes,format:void 0!==n.format&&y(r.formats,n.format)?n.format:void 0!==r.preferredFormat?r.preferredFormat:"jpg",supports:r.supports,quality:n.quality&&y(r.qualities,n.quality)?n.quality:y(r.qualities,"native")?"native":"default",resolutions:Array.isArray(r.resolutions)?r.resolutions.sort((function(t,n){return n-t})):void 0,tileSize:r.tileSize}}},t}(),mg=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function bg(t){return t.toLocaleString("en",{maximumFractionDigits:10})}var gg=function(t){function n(n){var e=this,r=n||{},i=r.url||"";i+=i.lastIndexOf("/")===i.length-1||""===i?"":"/";var o=r.version||cg,s=r.sizes||[],a=r.size;St(null!=a&&Array.isArray(a)&&2==a.length&&!isNaN(a[0])&&a[0]>0&&!isNaN(a[1])&&a[1]>0,60);var u,c,f,h=a[0],l=a[1],v=r.tileSize,d=r.tilePixelRatio||1,p=r.format||"jpg",m=r.quality||(r.version==ug?"native":"default"),b=r.resolutions||[],g=r.supports||[],w=r.extent||[0,-l,h,0],x=null!=s&&Array.isArray(s)&&s.length>0,k=void 0!==v&&("number"==typeof v&&Number.isInteger(v)&&v>0||Array.isArray(v)&&v.length>0),_=null!=g&&Array.isArray(g)&&(y(g,"regionByPx")||y(g,"regionByPct"))&&(y(g,"sizeByWh")||y(g,"sizeByH")||y(g,"sizeByW")||y(g,"sizeByPct"));if(b.sort((function(t,n){return n-t})),k||_)if(null!=v&&("number"==typeof v&&Number.isInteger(v)&&v>0?(u=v,c=v):Array.isArray(v)&&v.length>0&&((1==v.length||null==v[1]&&Number.isInteger(v[0]))&&(u=v[0],c=v[0]),2==v.length&&(Number.isInteger(v[0])&&Number.isInteger(v[1])?(u=v[0],c=v[1]):null==v[0]&&Number.isInteger(v[1])&&(u=v[1],c=v[1])))),void 0!==u&&void 0!==c||(u=Oa,c=Oa),0==b.length)for(var S=f=Math.max(Math.ceil(Math.log(h/u)/Math.LN2),Math.ceil(Math.log(l/c)/Math.LN2));S>=0;S--)b.push(Math.pow(2,S));else{var M=Math.max.apply(Math,b);f=Math.round(Math.log(M)/Math.LN2)}else if(u=h,c=l,b=[],x){s.sort((function(t,n){return t[0]-n[0]})),f=-1;var j=[];for(S=0;S0&&b[b.length-1]==T?j.push(S):(b.push(T),f++)}if(j.length>0)for(S=0;Sf)){var d=t[1],w=t[2],S=b[v];if(!(void 0===d||void 0===w||void 0===S||d<0||Math.ceil(h/S/u)<=d||w<0||Math.ceil(l/S/c)<=w)){if(_||k){var M=d*u*S,j=w*c*S,T=u*S,O=c*S,E=u,A=c;if(M+T>h&&(T=h-M),j+O>l&&(O=l-j),M+u*S>h&&(E=Math.floor((h-M+S-1)/S)),j+c*S>l&&(A=Math.floor((l-j+S-1)/S)),0==M&&T==h&&0==j&&O==l)r="full";else if(!_||y(g,"regionByPx"))r=M+","+j+","+T+","+O;else if(y(g,"regionByPct")){r="pct:"+bg(M/h*100)+","+bg(j/l*100)+","+bg(T/h*100)+","+bg(O/l*100)}o!=fg||_&&!y(g,"sizeByWh")?!_||y(g,"sizeByW")?a=E+",":y(g,"sizeByH")?a=","+A:y(g,"sizeByWh")?a=E+","+A:y(g,"sizeByPct")&&(a="pct:"+bg(100/S)):a=E+","+A}else if(r="full",x){var C=s[v][0],R=s[v][1];a=o==fg?C==h&&R==l?"max":C+","+R:C==h?"full":C+","}else a=o==fg?"max":"full";return i+r+"/"+a+"/0/"+m+"."+p}}},transition:r.transition})||this).zDirection=r.zDirection,e}return mg(n,t),n}(td),wg=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),xg=function(t){function n(n,e,r,i,o,s,a){var u=this,c=n.getExtent(),f=e.getExtent(),h=f?Kn(r,f):r,l=Rf(n,e,Vn(h),i),v=new zv(n,e,h,c,.5*l,i),d=s(v.calculateSourceExtent(),l,o),p=d?ao:ho,y=d?d.getPixelRatio():1;return(u=t.call(this,r,i,y,p)||this).Oa=e,u.Aa=c,u.Ha=v,u.ve=i,u.Ku=r,u.Xu=d,u.Yu=y,u.Ga=a,u.Ut=null,u.Ju=null,u}return wg(n,t),n.prototype.disposeInternal=function(){this.state==uo&&this.Qu(),t.prototype.disposeInternal.call(this)},n.prototype.getImage=function(){return this.Ut},n.prototype.getProjection=function(){return this.Oa},n.prototype.Ka=function(){var t=this.Xu.getState();if(t==co){var n=Jn(this.Ku)/this.ve,e=Hn(this.Ku)/this.ve;this.Ut=Pf(n,e,this.Yu,this.Xu.getResolution(),this.Aa,this.ve,this.Ku,this.Ha,[{extent:this.Xu.getExtent(),image:this.Xu.getImage()}],0,void 0,this.Ga)}this.state=t,this.changed()},n.prototype.load=function(){if(this.state==ao){this.state=uo,this.changed();var t=this.Xu.getState();t==co||t==fo?this.Ka():(this.Ju=K(this.Xu,P,(function(t){var n=this.Xu.getState();n!=co&&n!=fo||(this.Qu(),this.Ka())}),this),this.Xu.load())}},n.prototype.Qu=function(){Y(this.Ju),this.Ju=null},n}(so),kg=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),_g="imageloadstart",Sg="imageloadend",Mg="imageloaderror",jg=function(t){function n(n,e){var r=t.call(this,n)||this;return r.image=e,r}return kg(n,t),n}(h);function Tg(t,n){t.getImage().src=n}var Og=function(t){function n(n){var e=t.call(this,{attributions:n.attributions,projection:n.projection,state:n.state})||this;return e.on,e.once,e.un,e._e=void 0!==n.resolutions?n.resolutions:null,e.tc=null,e.ec=0,e.Ga=!1===n.imageSmoothing?Ef:void 0,e}return kg(n,t),n.prototype.getResolutions=function(){return this._e},n.prototype.getContextOptions=function(){return this.Ga},n.prototype.findNearestResolution=function(t){if(this._e){var n=m(this._e,t,0);t=this._e[n]}return t},n.prototype.getImage=function(t,n,e,r){var i=this.getProjection();if(i&&r&&!wr(i,r)){if(this.tc){if(this.ec==this.getRevision()&&wr(this.tc.getProjection(),r)&&this.tc.getResolution()==n&&In(this.tc.getExtent(),t))return this.tc;this.tc.dispose(),this.tc=null}return this.tc=new xg(i,r,t,n,e,function(t,n,e){return this.getImageInternal(t,n,e,i)}.bind(this),this.Ga),this.ec=this.getRevision(),this.tc}return i&&(r=i),this.getImageInternal(t,n,e,r)},n.prototype.getImageInternal=function(t,n,e,i){return r()},n.prototype.handleImageChange=function(t){var n=t.target;switch(n.getState()){case uo:this.loading=!0,this.dispatchEvent(new jg(_g,n));break;case co:this.loading=!1,this.dispatchEvent(new jg(Sg,n));break;case fo:this.loading=!1,this.dispatchEvent(new jg(Mg,n))}},n}(Vv),Eg=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ag=function(t){function n(n){var e=this,r=n||{};return(e=t.call(this,{attributions:r.attributions,imageSmoothing:r.imageSmoothing,projection:r.projection,resolutions:r.resolutions})||this).qt=void 0!==r.crossOrigin?r.crossOrigin:null,e.uu=void 0===r.hidpi||r.hidpi,e.Ii=r.url,e.zt=void 0!==r.imageLoadFunction?r.imageLoadFunction:Tg,e.rc=r.params||{},e.Dt=null,e.ic=[0,0],e.oc=0,e.sc=void 0!==r.ratio?r.ratio:1.5,e}return Eg(n,t),n.prototype.getParams=function(){return this.rc},n.prototype.getImageInternal=function(t,n,e,r){if(void 0===this.Ii)return null;n=this.findNearestResolution(n),e=this.uu?e:1;var i=this.Dt;if(i&&this.oc==this.getRevision()&&i.getResolution()==n&&i.getPixelRatio()==e&&Mn(i.getExtent(),t))return i;var o={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};O(o,this.rc);var s=((t=t.slice())[0]+t[2])/2,a=(t[1]+t[3])/2;if(1!=this.sc){var u=this.sc*Jn(t)/2,c=this.sc*Hn(t)/2;t[0]=s-u,t[1]=a-c,t[2]=s+u,t[3]=a+c}var f=n/e,h=Math.ceil(Jn(t)/f),l=Math.ceil(Hn(t)/f);t[0]=s-f*h/2,t[2]=s+f*h/2,t[1]=a-f*l/2,t[3]=a+f*l/2,this.ic[0]=h,this.ic[1]=l;var v=this.ac(t,this.ic,e,r,o);return this.Dt=new po(t,n,e,v,this.qt,this.zt),this.oc=this.getRevision(),this.Dt.addEventListener(P,this.handleImageChange.bind(this)),this.Dt},n.prototype.getImageLoadFunction=function(){return this.zt},n.prototype.ac=function(t,n,e,r,i){var o=r.getCode().split(/:(?=\d+$)/).pop();i.SIZE=n[0]+","+n[1],i.BBOX=t.join(","),i.BBOXSR=o,i.IMAGESR=o,i.DPI=Math.round(90*e);var s=this.Ii,a=s.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage");return a==s&&St(!1,50),Kf(a,i)},n.prototype.getUrl=function(){return this.Ii},n.prototype.setImageLoadFunction=function(t){this.Dt=null,this.zt=t,this.changed()},n.prototype.setUrl=function(t){t!=this.Ii&&(this.Ii=t,this.Dt=null,this.changed())},n.prototype.updateParams=function(t){O(this.rc,t),this.Dt=null,this.changed()},n}(Og),Cg=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Rg=function(t){function n(n){var e=this,r=n||{};return(e=t.call(this,{attributions:r.attributions,imageSmoothing:r.imageSmoothing,projection:r.projection,resolutions:r.resolutions,state:r.state})||this).uc=r.canvasFunction,e.Ut=null,e.oc=0,e.sc=void 0!==r.ratio?r.ratio:1.5,e}return Cg(n,t),n.prototype.getImageInternal=function(t,n,e,r){n=this.findNearestResolution(n);var i=this.Ut;if(i&&this.oc==this.getRevision()&&i.getResolution()==n&&i.getPixelRatio()==e&&Mn(i.getExtent(),t))return i;ee(t=t.slice(),this.sc);var o=[Jn(t)/n*e,Hn(t)/n*e],s=this.uc.call(this,t,n,e,o,r);return s&&(i=new mo(t,n,e,s)),this.Ut=i,this.oc=this.getRevision(),i},n}(Og),Ig=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();var Pg=function(t){function n(n){var e=t.call(this,{imageSmoothing:n.imageSmoothing,projection:n.projection,resolutions:n.resolutions})||this;return e.qt=void 0!==n.crossOrigin?n.crossOrigin:null,e.cc=void 0!==n.displayDpi?n.displayDpi:96,e.rc=n.params||{},e.Ii=n.url,e.zt=void 0!==n.imageLoadFunction?n.imageLoadFunction:Tg,e.uu=void 0===n.hidpi||n.hidpi,e.dt=void 0!==n.metersPerUnit?n.metersPerUnit:1,e.sc=void 0!==n.ratio?n.ratio:1,e.fc=void 0!==n.useOverlay&&n.useOverlay,e.Dt=null,e.oc=0,e}return Ig(n,t),n.prototype.getParams=function(){return this.rc},n.prototype.getImageInternal=function(t,n,e,r){n=this.findNearestResolution(n),e=this.uu?e:1;var i=this.Dt;if(i&&this.oc==this.getRevision()&&i.getResolution()==n&&i.getPixelRatio()==e&&Mn(i.getExtent(),t))return i;1!=this.sc&&ee(t=t.slice(),this.sc);var o=[Jn(t)/n*e,Hn(t)/n*e];if(void 0!==this.Ii){var s=this.getUrl(this.Ii,this.rc,t,o,r);(i=new po(t,n,e,s,this.qt,this.zt)).addEventListener(P,this.handleImageChange.bind(this))}else i=null;return this.Dt=i,this.oc=this.getRevision(),i},n.prototype.getImageLoadFunction=function(){return this.zt},n.prototype.updateParams=function(t){O(this.rc,t),this.changed()},n.prototype.getUrl=function(t,n,e,r,i){var o=function(t,n,e,r){var i=Jn(t),o=Hn(t),s=n[0],a=n[1],u=.0254/r;return a*i>s*o?i*e/(s*u):o*e/(a*u)}(e,r,this.dt,this.cc),s=Vn(e),a={OPERATION:this.fc?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol/source/ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this.cc,SETDISPLAYWIDTH:Math.round(r[0]),SETDISPLAYHEIGHT:Math.round(r[1]),SETVIEWSCALE:o,SETVIEWCENTERX:s[0],SETVIEWCENTERY:s[1]};return O(a,n),Kf(t,a)},n.prototype.setImageLoadFunction=function(t){this.Dt=null,this.zt=t,this.changed()},n}(Og),Dg=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ng=function(t){function n(n){var e=this,r=void 0!==n.crossOrigin?n.crossOrigin:null,i=void 0!==n.imageLoadFunction?n.imageLoadFunction:Tg;return(e=t.call(this,{attributions:n.attributions,imageSmoothing:n.imageSmoothing,projection:lr(n.projection)})||this).Ii=n.url,e.hc=n.imageExtent,e.Dt=new po(e.hc,void 0,1,e.Ii,r,i),e.ic=n.imageSize?n.imageSize:null,e.Dt.addEventListener(P,e.handleImageChange.bind(e)),e}return Dg(n,t),n.prototype.getImageExtent=function(){return this.hc},n.prototype.getImageInternal=function(t,n,e,r){return Qn(t,this.Dt.getExtent())?this.Dt:null},n.prototype.getUrl=function(){return this.Ii},n.prototype.handleImageChange=function(n){if(this.Dt.getState()==co){var e=this.Dt.getExtent(),r=this.Dt.getImage(),i=void 0,o=void 0;this.ic?(i=this.ic[0],o=this.ic[1]):(i=r.width,o=r.height);var s=Jn(e),a=Hn(e),u=s/i,c=a/o,f=i,h=o;if(u>c?f=Math.round(s/c):h=Math.round(a/u),f!==i||h!==o){var l=bo(f,h);O(l,this.getContextOptions());var v=l.canvas;l.drawImage(r,0,0,i,o,0,0,v.width,v.height),this.Dt.setImage(v)}}t.prototype.handleImageChange.call(this,n)},n}(Og),zg="carmentaserver",Lg="geoserver",Fg="mapserver",Gg="qgis",Ug=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Bg=[101,101],qg=function(t){function n(n){var e=this,r=n||{};return(e=t.call(this,{attributions:r.attributions,imageSmoothing:r.imageSmoothing,projection:r.projection,resolutions:r.resolutions})||this).qt=void 0!==r.crossOrigin?r.crossOrigin:null,e.Ii=r.url,e.zt=void 0!==r.imageLoadFunction?r.imageLoadFunction:Tg,e.rc=r.params||{},e.lc=!0,e.vc(),e.dc=r.serverType,e.uu=void 0===r.hidpi||r.hidpi,e.Dt=null,e.ic=[0,0],e.oc=0,e.sc=void 0!==r.ratio?r.ratio:1.5,e}return Ug(n,t),n.prototype.getFeatureInfoUrl=function(t,n,e,r){if(void 0!==this.Ii){var i=lr(e),o=this.getProjection();o&&o!==i&&(n=Rf(o,i,t,n),t=_r(t,i,o));var s=Wn(t,n,0,Bg),a={SERVICE:"WMS",VERSION:Of,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.rc.LAYERS};O(a,this.rc,r);var u=Math.floor((t[0]-s[0])/n),c=Math.floor((s[3]-t[1])/n);return a[this.lc?"I":"X"]=u,a[this.lc?"J":"Y"]=c,this.ac(s,Bg,1,o||i,a)}},n.prototype.getLegendUrl=function(t,n){if(void 0!==this.Ii){var e={SERVICE:"WMS",VERSION:Of,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===n||void 0===n.LAYER){var r=this.rc.LAYERS;if(!(!Array.isArray(r)||1===r.length))return;e.LAYER=r}if(void 0!==t){var i=this.getProjection()?this.getProjection().getMetersPerUnit():1;e.SCALE=t*i/28e-5}return O(e,n),Kf(this.Ii,e)}},n.prototype.getParams=function(){return this.rc},n.prototype.getImageInternal=function(t,n,e,r){if(void 0===this.Ii)return null;n=this.findNearestResolution(n),1==e||this.uu&&void 0!==this.dc||(e=1);var i=n/e,o=Vn(t),s=Wn(o,i,0,[Math.ceil(Jn(t)/i),Math.ceil(Hn(t)/i)]),a=Wn(o,i,0,[Math.ceil(this.sc*Jn(t)/i),Math.ceil(this.sc*Hn(t)/i)]),u=this.Dt;if(u&&this.oc==this.getRevision()&&u.getResolution()==n&&u.getPixelRatio()==e&&Mn(u.getExtent(),s))return u;var c={SERVICE:"WMS",VERSION:Of,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};O(c,this.rc),this.ic[0]=Math.round(Jn(a)/i),this.ic[1]=Math.round(Hn(a)/i);var f=this.ac(a,this.ic,e,r,c);return this.Dt=new po(a,n,e,f,this.qt,this.zt),this.oc=this.getRevision(),this.Dt.addEventListener(P,this.handleImageChange.bind(this)),this.Dt},n.prototype.getImageLoadFunction=function(){return this.zt},n.prototype.ac=function(t,n,e,r,i){if(St(void 0!==this.Ii,9),i[this.lc?"CRS":"SRS"]=r.getCode(),"STYLES"in this.rc||(i.STYLES=""),1!=e)switch(this.dc){case Lg:var o=90*e+.5|0;"FORMAT_OPTIONS"in i?i.FORMAT_OPTIONS+=";dpi:"+o:i.FORMAT_OPTIONS="dpi:"+o;break;case Fg:i.MAP_RESOLUTION=90*e;break;case zg:case Gg:i.DPI=90*e;break;default:St(!1,8)}i.WIDTH=n[0],i.HEIGHT=n[1];var s,a=r.getAxisOrientation();return s=this.lc&&"ne"==a.substr(0,2)?[t[1],t[0],t[3],t[2]]:t,i.BBOX=s.join(","),Kf(this.Ii,i)},n.prototype.getUrl=function(){return this.Ii},n.prototype.setImageLoadFunction=function(t){this.Dt=null,this.zt=t,this.changed()},n.prototype.setUrl=function(t){t!=this.Ii&&(this.Ii=t,this.Dt=null,this.changed())},n.prototype.updateParams=function(t){O(this.rc,t),this.vc(),this.Dt=null,this.changed()},n.prototype.vc=function(){var t=this.rc.VERSION||Of;this.lc=We(t,"1.3")>=0},n}(Og),$g={"image/png":!0,"image/jpeg":!0,"image/gif":!0,"image/webp":!0},Vg={"application/vnd.mapbox-vector-tile":!0,"application/geo+json":!0};function Zg(t,n){for(var e,r,i=0;il.maxTileCol||c.tileRowl.maxTileRow)return}O(c,E);var v=e.replace(/\{(\w+?)\}/g,(function(t,n){return c[n]}));return ff(A,v)}}}}function Kg(t){return cf(t.url).then((function(n){return function(t,n){var e,r=n.tileMatrixSetLimits;if("map"===n.dataType)e=Zg(n.links,t.mediaType);else{if("vector"!==n.dataType)throw new Error('Expected tileset data type to be "map" or "vector"');e=Wg(n.links,t.mediaType,t.supportedMediaTypes)}if(n.tileMatrixSet)return Hg(t,n.tileMatrixSet,e,r);if(!n.tileMatrixSetDefinition)throw new Error("Expected tileMatrixSetDefinition or tileMatrixSet");return cf(ff(t.url,n.tileMatrixSetDefinition)).then((function(n){return Hg(t,n,e,r)}))}(t,n)}))}var Xg=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Yg=function(t){function n(n){var e=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,imageSmoothing:n.imageSmoothing,projection:n.projection,reprojectionErrorThreshold:n.reprojectionErrorThreshold,state:os,tileLoadFunction:n.tileLoadFunction,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition})||this;return Kg({url:n.url,projection:e.getProjection(),mediaType:n.mediaType,context:n.context||null}).then(e.yc.bind(e)).catch(e.mc.bind(e)),e}return Xg(n,t),n.prototype.yc=function(t){this.tileGrid=t.grid,this.setTileUrlFunction(t.urlFunction,t.urlTemplate),this.setState(ss)},n.prototype.mc=function(t){console.error(t),this.setState(as)},n}(td),Jg=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Qg=function(t){function n(n){var e=this,r=n.projection||"EPSG:3857",i=n.extent||qf(r),o=n.tileGrid||Gf({extent:i,maxResolution:n.maxResolution,maxZoom:void 0!==n.maxZoom?n.maxZoom:22,minZoom:n.minZoom,tileSize:n.tileSize||512});return(e=t.call(this,{attributions:n.attributions,attributionsCollapsible:n.attributionsCollapsible,cacheSize:n.cacheSize,opaque:!1,projection:r,state:n.state,tileGrid:o,tileLoadFunction:n.tileLoadFunction?n.tileLoadFunction:tw,tileUrlFunction:n.tileUrlFunction,url:n.url,urls:n.urls,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition,zDirection:void 0===n.zDirection?1:n.zDirection})||this).Ci=n.format?n.format:null,e.sourceTileCache=new Fc(e.tileCache.highWaterMark),e.xu=null==n.overlaps||n.overlaps,e.tileClass=n.tileClass?n.tileClass:Wc,e.bc={},e}return Jg(n,t),n.prototype.getFeaturesInExtent=function(t){var n=[],e=this.tileCache;if(0===e.getCount())return n;var r=Dc(e.peekFirstKey())[0],i=this.tileGrid;return e.forEach((function(e){if(e.tileCoord[0]===r&&e.getState()===vt)for(var o=e.getSourceTiles(),s=0,a=o.length;s=.5&&j>=.5){var T=S[4],E=S[5],A=s.opacity,C=void 0;1!==A&&(C=b.globalAlpha,b.globalAlpha=A),b.drawImage(_,0,0,+_.width,+_.height,Math.round(T),Math.round(E),Math.round(M),Math.round(j)),1!==A&&(b.globalAlpha=C)}return this.postRender(b,t),w&&b.restore(),m!==g.style.transform&&(g.style.transform=m),this.container},n}(cw),lw=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),vw=function(t){function n(n){return t.call(this,n)||this}return lw(n,t),n.prototype.createRenderer=function(){return new hw(this)},n}(aw),dw="preload",pw="useInterimTilesOnError",yw=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),mw=function(t){function n(n){var e=this,r=n||{},i=O({},r);return delete i.preload,delete i.useInterimTilesOnError,(e=t.call(this,i)||this).on,e.once,e.un,e.setPreload(void 0!==r.preload?r.preload:0),e.setUseInterimTilesOnError(void 0===r.useInterimTilesOnError||r.useInterimTilesOnError),e}return yw(n,t),n.prototype.getPreload=function(){return this.get(dw)},n.prototype.setPreload=function(t){this.set(dw,t)},n.prototype.getUseInterimTilesOnError=function(){return this.get(pw)},n.prototype.setUseInterimTilesOnError=function(t){this.set(pw,t)},n}(fs),bw=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),gw=function(t){function n(n){var e=t.call(this,n)||this;return e.extentChanged=!0,e.gc=null,e.renderedPixelRatio,e.renderedProjection=null,e.renderedRevision,e.renderedTiles=[],e.wc=!1,e.tmpExtent=[1/0,1/0,-1/0,-1/0],e.xc=new Bc(0,0,0,0),e}return bw(n,t),n.prototype.isDrawableTile=function(t){var n=this.getLayer(),e=t.getState(),r=n.getUseInterimTilesOnError();return e==vt||e==pt||e==dt&&!r},n.prototype.getTile=function(t,n,e,r){var i=r.pixelRatio,o=r.viewState.projection,s=this.getLayer(),a=s.getSource().getTile(t,n,e,i,o);return a.getState()==dt&&(s.getUseInterimTilesOnError()?s.getPreload()>0&&(this.wc=!0):a.setState(vt)),this.isDrawableTile(a)||(a=a.getInterimTile()),a},n.prototype.loadedTileCallback=function(n,e,r){return!!this.isDrawableTile(r)&&t.prototype.loadedTileCallback.call(this,n,e,r)},n.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},n.prototype.renderFrame=function(t,n){var e=t.layerStatesArray[t.layerIndex],r=t.viewState,i=r.projection,s=r.resolution,a=r.center,u=r.rotation,c=t.pixelRatio,f=this.getLayer(),h=f.getSource(),l=h.getRevision(),v=h.getTileGridForProjection(i),d=v.getZForResolution(s,h.zDirection),y=v.getResolution(d),m=t.extent,b=e.extent&&Cr(e.extent,i);b&&(m=Kn(m,Cr(e.extent,i)));var g=h.getTilePixelRatio(c),w=Math.round(t.size[0]*g),x=Math.round(t.size[1]*g);if(u){var k=Math.round(Math.sqrt(w*w+x*x));w=k,x=k}var _=y*w/2/g,S=y*x/2/g,M=[a[0]-_,a[1]-S,a[0]+_,a[1]+S],j=v.getTileRangeForExtentAndZ(m,d),T={};T[d]={};var E=this.createLoadedTileFinder(h,i,T),A=this.tmpExtent,C=this.xc;this.wc=!1;for(var R=j.minX;R<=j.maxX;++R)for(var I=j.minY;I<=j.maxY;++I){var P=this.getTile(d,R,I,t);if(this.isDrawableTile(P)){var D=o(this);if(P.getState()==vt){T[d][P.tileCoord.toString()]=P;var N=P.inTransition(D);this.wc||!N&&-1!==this.renderedTiles.indexOf(P)||(this.wc=!0)}if(1===P.getAlpha(D,t.time))continue}var z=v.getTileCoordChildTileRange(P.tileCoord,C,A),L=!1;z&&(L=E(d+1,z)),L||v.forEachTileCoordParentTileRange(P.tileCoord,E,C,A)}var F=y/s;sn(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/g,1/g,u,-w/2,-x/2);var G=cn(this.pixelTransform);this.useContainer(n,G,e.opacity);var U=this.context,B=U.canvas;an(this.inversePixelTransform,this.pixelTransform),sn(this.tempTransform,w/2,x/2,F,F,0,-w/2,-x/2),B.width!=w||B.height!=x?(B.width=w,B.height=x):this.containerReused||U.clearRect(0,0,w,x),b&&this.clipUnrotated(U,t,b),O(U,h.getContextOptions()),this.preRender(U,t),this.renderedTiles.length=0;var q,$,V,Z=Object.keys(T).map(Number);Z.sort(p),1!==e.opacity||this.containerReused&&!h.getOpaque(t.viewState.projection)?(q=[],$=[]):Z=Z.reverse();for(var W=Z.length-1;W>=0;--W){var H=Z[W],K=h.getTilePixelSize(H,c,i),X=v.getResolution(H)/y,Y=K[0]*X*F,J=K[1]*X*F,Q=v.getTileCoordForCoordAndZ(Xn(M),H),tt=v.getTileCoordExtent(Q),nt=tn(this.tempTransform,[g*(tt[0]-M[0])/y,g*(M[3]-tt[3])/y]),et=g*h.getGutterForProjection(i),rt=T[H];for(var it in rt){var ot=(P=rt[it]).tileCoord,st=Q[1]-ot[1],at=Math.round(nt[0]-(st-1)*Y),ut=Q[2]-ot[2],ct=Math.round(nt[1]-(ut-1)*J),ft=at-(R=Math.round(nt[0]-st*Y)),ht=ct-(I=Math.round(nt[1]-ut*J)),lt=d===H;if(!(N=lt&&1!==P.getAlpha(o(this),t.time)))if(q){U.save(),V=[R,I,R+ft,I,R+ft,I+ht,R,I+ht];for(var dt=0,pt=q.length;dtthis._maxQueueLength;)this._queue.shift().callback(null,null)},n.prototype._dispatch=function(){if(!this._running&&0!==this._queue.length){var t=this._queue.shift();this._job=t;var n=t.inputs[0].width,e=t.inputs[0].height,r=t.inputs.map((function(t){return t.data.buffer})),i=this._workers.length;if(this._running=i,1!==i)for(var o=t.inputs[0].data.length,s=4*Math.ceil(o/4/i),a=0;aStamen Design, under CC BY 3.0.',iw],Bw={terrain:{extension:"jpg",opaque:!0},"terrain-background":{extension:"jpg",opaque:!0},"terrain-labels":{extension:"png",opaque:!1},"terrain-lines":{extension:"png",opaque:!1},"toner-background":{extension:"png",opaque:!0},toner:{extension:"png",opaque:!0},"toner-hybrid":{extension:"png",opaque:!1},"toner-labels":{extension:"png",opaque:!1},"toner-lines":{extension:"png",opaque:!1},"toner-lite":{extension:"png",opaque:!0},watercolor:{extension:"jpg",opaque:!0}},qw={terrain:{minZoom:0,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:0,maxZoom:18}},$w=function(t){function n(n){var e=n.layer.indexOf("-"),r=-1==e?n.layer:n.layer.slice(0,e),i=qw[r],o=Bw[n.layer],s=void 0!==n.url?n.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+n.layer+"/{z}/{x}/{y}."+o.extension;return t.call(this,{attributions:Uw,cacheSize:n.cacheSize,crossOrigin:"anonymous",imageSmoothing:n.imageSmoothing,maxZoom:null!=n.maxZoom?n.maxZoom:i.maxZoom,minZoom:null!=n.minZoom?n.minZoom:i.minZoom,opaque:o.opaque,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileLoadFunction:n.tileLoadFunction,transition:n.transition,url:s,wrapX:n.wrapX,zDirection:n.zDirection})||this}return Gw(n,t),n}(od),Vw=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Zw=function(t){function n(n){var e=this,r=n||{};return(e=t.call(this,{attributions:r.attributions,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,imageSmoothing:r.imageSmoothing,projection:r.projection,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileGrid:r.tileGrid,tileLoadFunction:r.tileLoadFunction,url:r.url,urls:r.urls,wrapX:void 0===r.wrapX||r.wrapX,transition:r.transition,zDirection:r.zDirection})||this).rc=r.params||{},e.uu=void 0===r.hidpi||r.hidpi,e.So=[1/0,1/0,-1/0,-1/0],e.setKey(e.Rc()),e}return Vw(n,t),n.prototype.Rc=function(){var t=0,n=[];for(var e in this.rc)n[t++]=e+"-"+this.rc[e];return n.join("/")},n.prototype.getParams=function(){return this.rc},n.prototype.ac=function(t,n,e,r,i,o){var s=this.urls;if(s){var a,u=i.getCode().split(/:(?=\d+$)/).pop();if(o.SIZE=n[0]+","+n[1],o.BBOX=e.join(","),o.BBOXSR=u,o.IMAGESR=u,o.DPI=Math.round(o.DPI?o.DPI*r:90*r),1==s.length)a=s[0];else a=s[pe(Nc(t),s.length)];return Kf(a.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"),o)}},n.prototype.getTilePixelRatio=function(t){return this.uu?t:1},n.prototype.updateParams=function(t){O(this.rc,t),this.setKey(this.Rc())},n.prototype.tileUrlFunction=function(t,n,e){var r=this.getTileGrid();if(r||(r=this.getTileGridForProjection(e)),!(r.getResolutions().length<=t[0])){1==n||this.uu||(n=1);var i=r.getTileCoordExtent(t,this.So),o=Ya(r.getTileSize(t[0]),this.tmpSize);1!=n&&(o=Xa(o,n,this.tmpSize));var s={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};return O(s,this.rc),this.ac(t,o,i,n,e,s)}},n}(td),Ww=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Hw=function(t){function n(n){var e=this,r=n||{};return e=t.call(this,{opaque:!1,projection:r.projection,tileGrid:r.tileGrid,wrapX:void 0===r.wrapX||r.wrapX,zDirection:r.zDirection,url:r.template||"z:{z} x:{x} y:{y}",tileLoadFunction:function(t,n){var r=t.getTileCoord()[0],i=Ya(e.tileGrid.getTileSize(r)),o=bo(i[0],i[1]);o.strokeStyle="grey",o.strokeRect(.5,.5,i[0]+.5,i[1]+.5),o.fillStyle="grey",o.strokeStyle="white",o.textAlign="center",o.textBaseline="middle",o.font="24px sans-serif",o.lineWidth=4,o.strokeText(n,i[0]/2,i[1]/2,i[0]),o.fillText(n,i[0]/2,i[1]/2,i[0]),t.setImage(o.canvas)}})||this}return Ww(n,t),n}(od),Kw=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Xw=function(t){function n(n){var e=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,imageSmoothing:n.imageSmoothing,projection:lr("EPSG:3857"),reprojectionErrorThreshold:n.reprojectionErrorThreshold,state:os,tileLoadFunction:n.tileLoadFunction,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition,zDirection:n.zDirection})||this;if(e.Ic=null,e.xo=n.tileSize,n.url)if(n.jsonp)of(n.url,e.handleTileJSONResponse.bind(e),e.handleTileJSONError.bind(e));else{var r=new XMLHttpRequest;r.addEventListener("load",e.Pc.bind(e)),r.addEventListener("error",e.Dc.bind(e)),r.open("GET",n.url),r.send()}else n.tileJSON?e.handleTileJSONResponse(n.tileJSON):St(!1,51);return e}return Kw(n,t),n.prototype.Pc=function(t){var n=t.target;if(!n.status||n.status>=200&&n.status<300){var e=void 0;try{e=JSON.parse(n.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(e)}else this.handleTileJSONError()},n.prototype.Dc=function(t){this.handleTileJSONError()},n.prototype.getTileJSON=function(){return this.Ic},n.prototype.handleTileJSONResponse=function(t){var n,e=lr("EPSG:4326"),r=this.getProjection();if(void 0!==t.bounds){var i=xr(e,r);n=ie(t.bounds,i)}var o=qf(r),s=t.minzoom||0,a=Gf({extent:o,maxZoom:t.maxzoom||22,minZoom:s,tileSize:this.xo});if(this.tileGrid=a,this.tileUrlFunction=Vf(t.tiles,a),void 0!==t.attribution&&!this.getAttributions()){var u=void 0!==n?n:o;this.setAttributions((function(n){return Qn(u,n.extent)?[t.attribution]:null}))}this.Ic=t,this.setState(ss)},n.prototype.handleTileJSONError=function(){this.setState(as)},n}(td),Yw=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Jw=function(t){function n(n){var e=this,r=n||{},i=r.params||{},o=!("TRANSPARENT"in i)||i.TRANSPARENT;return(e=t.call(this,{attributions:r.attributions,attributionsCollapsible:r.attributionsCollapsible,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,imageSmoothing:r.imageSmoothing,opaque:!o,projection:r.projection,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileClass:r.tileClass,tileGrid:r.tileGrid,tileLoadFunction:r.tileLoadFunction,url:r.url,urls:r.urls,wrapX:void 0===r.wrapX||r.wrapX,transition:r.transition,zDirection:r.zDirection})||this).Ua=void 0!==r.gutter?r.gutter:0,e.rc=i,e.lc=!0,e.dc=r.serverType,e.uu=void 0===r.hidpi||r.hidpi,e.So=[1/0,1/0,-1/0,-1/0],e.vc(),e.setKey(e.Rc()),e}return Yw(n,t),n.prototype.getFeatureInfoUrl=function(t,n,e,r){var i=lr(e),o=this.getProjection(),s=this.getTileGrid();s||(s=this.getTileGridForProjection(i));var a=s.getZForResolution(n,this.zDirection),u=s.getTileCoordForCoordAndZ(t,a);if(!(s.getResolutions().length<=u[0])){var c=s.getResolution(u[0]),f=s.getTileCoordExtent(u,this.So),h=Ya(s.getTileSize(u[0]),this.tmpSize),l=this.Ua;0!==l&&(h=Ha(h,l,this.tmpSize),f=xn(f,c*l,f)),o&&o!==i&&(c=Rf(o,i,t,c),f=Sr(f,i,o),t=_r(t,i,o));var v={SERVICE:"WMS",VERSION:Of,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.rc.LAYERS};O(v,this.rc,r);var d=Math.floor((t[0]-f[0])/c),p=Math.floor((f[3]-t[1])/c);return v[this.lc?"I":"X"]=d,v[this.lc?"J":"Y"]=p,this.ac(u,h,f,1,o||i,v)}},n.prototype.getLegendUrl=function(t,n){if(void 0!==this.urls[0]){var e={SERVICE:"WMS",VERSION:Of,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===n||void 0===n.LAYER){var r=this.rc.LAYERS;if(!(!Array.isArray(r)||1===r.length))return;e.LAYER=r}if(void 0!==t){var i=this.getProjection()?this.getProjection().getMetersPerUnit():1;e.SCALE=t*i/28e-5}return O(e,n),Kf(this.urls[0],e)}},n.prototype.getGutter=function(){return this.Ua},n.prototype.getParams=function(){return this.rc},n.prototype.ac=function(t,n,e,r,i,o){var s=this.urls;if(s){if(o.WIDTH=n[0],o.HEIGHT=n[1],o[this.lc?"CRS":"SRS"]=i.getCode(),"STYLES"in this.rc||(o.STYLES=""),1!=r)switch(this.dc){case Lg:var a=90*r+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+a:o.FORMAT_OPTIONS="dpi:"+a;break;case Fg:o.MAP_RESOLUTION=90*r;break;case zg:case Gg:o.DPI=90*r;break;default:St(!1,52)}var u,c=i.getAxisOrientation(),f=e;if(this.lc&&"ne"==c.substr(0,2)){var h=void 0;h=e[0],f[0]=e[1],f[1]=h,h=e[2],f[2]=e[3],f[3]=h}if(o.BBOX=f.join(","),1==s.length)u=s[0];else u=s[pe(Nc(t),s.length)];return Kf(u,o)}},n.prototype.getTilePixelRatio=function(t){return this.uu&&void 0!==this.dc?t:1},n.prototype.Rc=function(){var t=0,n=[];for(var e in this.rc)n[t++]=e+"-"+this.rc[e];return n.join("/")},n.prototype.updateParams=function(t){O(this.rc,t),this.vc(),this.setKey(this.Rc())},n.prototype.vc=function(){var t=this.rc.VERSION||Of;this.lc=We(t,"1.3")>=0},n.prototype.tileUrlFunction=function(t,n,e){var r=this.getTileGrid();if(r||(r=this.getTileGridForProjection(e)),!(r.getResolutions().length<=t[0])){1==n||this.uu&&void 0!==this.dc||(n=1);var i=r.getResolution(t[0]),o=r.getTileCoordExtent(t,this.So),s=Ya(r.getTileSize(t[0]),this.tmpSize),a=this.Ua;0!==a&&(s=Ha(s,a,this.tmpSize),o=xn(o,i*a,o)),1!=n&&(s=Xa(s,n,this.tmpSize));var u={SERVICE:"WMS",VERSION:Of,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return O(u,this.rc),this.ac(t,s,o,n,e,u)}},n}(td),Qw=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),tx=function(t){function n(n,e,r,i,o,s){var a=t.call(this,n,e)||this;return a.Pt=r,a.st=i,a.Nc=o,a.zc=null,a.Lc=null,a.q=null,a.Fc=s,a}return Qw(n,t),n.prototype.getImage=function(){return null},n.prototype.getData=function(t){if(!this.zc||!this.Lc)return null;var n=(t[0]-this.st[0])/(this.st[2]-this.st[0]),e=(t[1]-this.st[1])/(this.st[3]-this.st[1]),r=this.zc[Math.floor((1-e)*this.zc.length)];if("string"!=typeof r)return null;var i=r.charCodeAt(Math.floor(n*r.length));i>=93&&i--,i>=35&&i--;var o=null;if((i-=32)in this.Lc){var s=this.Lc[i];o=this.q&&s in this.q?this.q[s]:s}return o},n.prototype.forDataAtCoordinate=function(t,n,e){this.state==pt&&!0===e?(this.state=ht,X(this,P,(function(e){n(this.getData(t))}),this),this.Gc()):!0===e?setTimeout(function(){n(this.getData(t))}.bind(this),0):n(this.getData(t))},n.prototype.getKey=function(){return this.Pt},n.prototype.mc=function(){this.state=dt,this.changed()},n.prototype.Bt=function(t){this.zc=t.grid,this.Lc=t.keys,this.q=t.data,this.state=vt,this.changed()},n.prototype.Gc=function(){if(this.state==ht)if(this.state=lt,this.Fc)of(this.Pt,this.Bt.bind(this),this.mc.bind(this));else{var t=new XMLHttpRequest;t.addEventListener("load",this.Pc.bind(this)),t.addEventListener("error",this.Dc.bind(this)),t.open("GET",this.Pt),t.send()}},n.prototype.Pc=function(t){var n=t.target;if(!n.status||n.status>=200&&n.status<300){var e=void 0;try{e=JSON.parse(n.responseText)}catch(t){return void this.mc()}this.Bt(e)}else this.mc()},n.prototype.Dc=function(t){this.mc()},n.prototype.load=function(){this.Nc?this.Gc():this.setState(pt)},n}(xt),nx=function(t){function n(n){var e=t.call(this,{projection:lr("EPSG:3857"),state:os,zDirection:n.zDirection})||this;if(e.Nc=void 0===n.preemptive||n.preemptive,e.Uc=Wf,e.Bc=void 0,e.Fc=n.jsonp||!1,n.url)if(e.Fc)of(n.url,e.handleTileJSONResponse.bind(e),e.handleTileJSONError.bind(e));else{var r=new XMLHttpRequest;r.addEventListener("load",e.Pc.bind(e)),r.addEventListener("error",e.Dc.bind(e)),r.open("GET",n.url),r.send()}else n.tileJSON?e.handleTileJSONResponse(n.tileJSON):St(!1,51);return e}return Qw(n,t),n.prototype.Pc=function(t){var n=t.target;if(!n.status||n.status>=200&&n.status<300){var e=void 0;try{e=JSON.parse(n.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(e)}else this.handleTileJSONError()},n.prototype.Dc=function(t){this.handleTileJSONError()},n.prototype.getTemplate=function(){return this.Bc},n.prototype.forDataAtCoordinateAndResolution=function(t,n,e,r){if(this.tileGrid){var i=this.tileGrid.getZForResolution(n,this.zDirection),o=this.tileGrid.getTileCoordForCoordAndZ(t,i);this.getTile(o[0],o[1],o[2],1,this.getProjection()).forDataAtCoordinate(t,e,r)}else!0===r?setTimeout((function(){e(null)}),0):e(null)},n.prototype.handleTileJSONError=function(){this.setState(as)},n.prototype.handleTileJSONResponse=function(t){var n,e=lr("EPSG:4326"),r=this.getProjection();if(void 0!==t.bounds){var i=xr(e,r);n=ie(t.bounds,i)}var o=qf(r),s=t.minzoom||0,a=Gf({extent:o,maxZoom:t.maxzoom||22,minZoom:s});this.tileGrid=a,this.Bc=t.template;var u=t.grids;if(u){if(this.Uc=Vf(u,a),void 0!==t.attribution){var c=void 0!==n?n:o;this.setAttributions((function(n){return Qn(c,n.extent)?[t.attribution]:null}))}this.setState(ss)}else this.setState(as)},n.prototype.getTile=function(t,n,e,r,i){var o=Rc(t,n,e);if(this.tileCache.containsKey(o))return this.tileCache.get(o);var s=[t,n,e],a=this.getTileCoordForTileUrlFunction(s,i),u=this.Uc(a,r,i),c=new tx(s,void 0!==u?ht:pt,void 0!==u?u:"",this.tileGrid.getTileCoordExtent(s),this.Nc,this.Fc);return this.tileCache.set(o,c),c},n.prototype.useTile=function(t,n,e){var r=Rc(t,n,e);this.tileCache.containsKey(r)&&this.tileCache.get(r)},n}(Kv),ex="KVP",rx="REST",ix=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),ox=function(t){function n(n){var e=this,r=void 0!==n.requestEncoding?n.requestEncoding:ex,i=n.tileGrid,o=n.urls;return void 0===o&&void 0!==n.url&&(o=Hf(n.url)),(e=t.call(this,{attributions:n.attributions,attributionsCollapsible:n.attributionsCollapsible,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,imageSmoothing:n.imageSmoothing,projection:n.projection,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileClass:n.tileClass,tileGrid:i,tileLoadFunction:n.tileLoadFunction,tilePixelRatio:n.tilePixelRatio,urls:o,wrapX:void 0!==n.wrapX&&n.wrapX,transition:n.transition,zDirection:n.zDirection})||this).qc=void 0!==n.version?n.version:"1.0.0",e.Ci=void 0!==n.format?n.format:"image/jpeg",e.$c=void 0!==n.dimensions?n.dimensions:{},e.cs=n.layer,e.Vc=n.matrixSet,e.K=n.style,e.Zc=r,e.setKey(e.Wc()),o&&o.length>0&&(e.tileUrlFunction=Zf(o.map(e.createFromWMTSTemplate.bind(e)))),e}return ix(n,t),n.prototype.setUrls=function(t){this.urls=t;var n=t.join("\n");this.setTileUrlFunction(Zf(t.map(this.createFromWMTSTemplate.bind(this))),n)},n.prototype.getDimensions=function(){return this.$c},n.prototype.getFormat=function(){return this.Ci},n.prototype.getLayer=function(){return this.cs},n.prototype.getMatrixSet=function(){return this.Vc},n.prototype.getRequestEncoding=function(){return this.Zc},n.prototype.getStyle=function(){return this.K},n.prototype.getVersion=function(){return this.qc},n.prototype.Wc=function(){var t=0,n=[];for(var e in this.$c)n[t++]=e+"-"+this.$c[e];return n.join("/")},n.prototype.updateDimensions=function(t){O(this.$c,t),this.setKey(this.Wc())},n.prototype.createFromWMTSTemplate=function(t){var n=this.Zc,e={layer:this.cs,style:this.K,tilematrixset:this.Vc};n==ex&&O(e,{Service:"WMTS",Request:"GetTile",Version:this.qc,Format:this.Ci}),t=n==ex?Kf(t,e):t.replace(/\{(\w+?)\}/g,(function(t,n){return n.toLowerCase()in e?e[n.toLowerCase()]:t}));var r=this.tileGrid,i=this.$c;return function(e,o,s){if(e){var a={TileMatrix:r.getMatrixId(e[0]),TileCol:e[1],TileRow:e[2]};O(a,i);var u=t;return u=n==ex?Kf(u,a):u.replace(/\{(\w+?)\}/g,(function(t,n){return a[n]}))}}},n}(td);var sx=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),ax="renderOrder",ux=function(t){function n(n){var e=this,r=n||{},i=O({},r);return delete i.style,delete i.renderBuffer,delete i.updateWhileAnimating,delete i.updateWhileInteracting,(e=t.call(this,i)||this).Hc=void 0!==r.declutter&&r.declutter,e.Kc=void 0!==r.renderBuffer?r.renderBuffer:100,e.K=null,e.tt=void 0,e.setStyle(r.style),e.Xc=void 0!==r.updateWhileAnimating&&r.updateWhileAnimating,e.Yc=void 0!==r.updateWhileInteracting&&r.updateWhileInteracting,e}return sx(n,t),n.prototype.getDeclutter=function(){return this.Hc},n.prototype.getFeatures=function(n){return t.prototype.getFeatures.call(this,n)},n.prototype.getRenderBuffer=function(){return this.Kc},n.prototype.getRenderOrder=function(){return this.get(ax)},n.prototype.getStyle=function(){return this.K},n.prototype.getStyleFunction=function(){return this.tt},n.prototype.getUpdateWhileAnimating=function(){return this.Xc},n.prototype.getUpdateWhileInteracting=function(){return this.Yc},n.prototype.renderDeclutter=function(t){t.declutterTree||(t.declutterTree=new Pv(9)),this.getRenderer().renderDeclutter(t)},n.prototype.setRenderOrder=function(t){this.set(ax,t)},n.prototype.setStyle=function(t){this.K=void 0!==t?t:jv,this.tt=null===t?void 0:Sv(this.K),this.changed()},n}(fs),cx=new Blob(['var e="function"==typeof Object.assign?Object.assign:function(e,n){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1,o=arguments.length;rh&&(this.instructions.push([bx.CUSTOM,h,o,t,e,hi]),this.hitDetectionInstructions.push([bx.CUSTOM,h,o,t,r||e,hi]));break;case Rt.POINT:i=t.getFlatCoordinates(),this.coordinates.push(i[0],i[1]),o=this.coordinates.length,this.instructions.push([bx.CUSTOM,h,o,t,e]),this.hitDetectionInstructions.push([bx.CUSTOM,h,o,t,r||e])}this.endGeometry(n)},n.prototype.beginGeometry=function(t,n){this.xf=[bx.BEGIN_GEOMETRY,n,0,t],this.instructions.push(this.xf),this.kf=[bx.BEGIN_GEOMETRY,n,0,t],this.hitDetectionInstructions.push(this.kf)},n.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},n.prototype.reverseHitDetectionInstructions=function(){var t,n=this.hitDetectionInstructions;n.reverse();var e,r,i=n.length,o=-1;for(t=0;tthis.maxLineWidth&&(this.maxLineWidth=e.lineWidth,this._f=null)}else e.strokeStyle=void 0,e.lineCap=void 0,e.lineDash=null,e.lineDashOffset=void 0,e.lineJoin=void 0,e.lineWidth=void 0,e.miterLimit=void 0},n.prototype.createFill=function(t){var n=t.fillStyle,e=[bx.SET_FILL_STYLE,n];return"string"!=typeof n&&e.push(!0),e},n.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},n.prototype.createStroke=function(t){return[bx.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},n.prototype.updateFillStyle=function(t,n){var e=t.fillStyle;"string"==typeof e&&t.currentFillStyle==e||(void 0!==e&&this.instructions.push(n.call(this,t)),t.currentFillStyle=e)},n.prototype.updateStrokeStyle=function(t,n){var e=t.strokeStyle,r=t.lineCap,i=t.lineDash,o=t.lineDashOffset,s=t.lineJoin,a=t.lineWidth,u=t.miterLimit;(t.currentStrokeStyle!=e||t.currentLineCap!=r||i!=t.currentLineDash&&!x(t.currentLineDash,i)||t.currentLineDashOffset!=o||t.currentLineJoin!=s||t.currentLineWidth!=a||t.currentMiterLimit!=u)&&(void 0!==e&&n.call(this,t),t.currentStrokeStyle=e,t.currentLineCap=r,t.currentLineDash=i,t.currentLineDashOffset=o,t.currentLineJoin=s,t.currentLineWidth=a,t.currentMiterLimit=u)},n.prototype.endGeometry=function(t){this.xf[2]=this.instructions.length,this.xf=null,this.kf[2]=this.hitDetectionInstructions.length,this.kf=null;var n=[bx.END_GEOMETRY,t];this.instructions.push(n),this.hitDetectionInstructions.push(n)},n.prototype.getBufferedMaxExtent=function(){if(!this._f&&(this._f=kn(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;xn(this._f,t,this._f)}return this._f},n}(hf),xx=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),kx=function(t){function n(n,e,r,i){var o=t.call(this,n,e,r,i)||this;return o.Us=null,o.Dt=null,o.jf=void 0,o.Tf=void 0,o.Of=void 0,o.Ef=void 0,o._s=void 0,o.Af=void 0,o.Cf=void 0,o.Ss=void 0,o.Pr=void 0,o.Ms=void 0,o.oa=void 0,o.Rf=void 0,o}return xx(n,t),n.prototype.drawPoint=function(t,n){if(this.Dt){this.beginGeometry(t,n);var e=t.getFlatCoordinates(),r=t.getStride(),i=this.coordinates.length,o=this.appendFlatPointCoordinates(e,r);this.instructions.push([bx.DRAW_IMAGE,i,o,this.Dt,this.Tf*this.jf,this.Of*this.jf,Math.ceil(this.Ef*this.jf),this._s,this.Af,this.Cf,this.Ss,this.Pr,[this.Ms[0]*this.pixelRatio/this.jf,this.Ms[1]*this.pixelRatio/this.jf],Math.ceil(this.oa*this.jf),this.Rf]),this.hitDetectionInstructions.push([bx.DRAW_IMAGE,i,o,this.Us,this.Tf,this.Of,this.Ef,this._s,this.Af,this.Cf,this.Ss,this.Pr,this.Ms,this.oa,this.Rf]),this.endGeometry(n)}},n.prototype.drawMultiPoint=function(t,n){if(this.Dt){this.beginGeometry(t,n);var e=t.getFlatCoordinates(),r=t.getStride(),i=this.coordinates.length,o=this.appendFlatPointCoordinates(e,r);this.instructions.push([bx.DRAW_IMAGE,i,o,this.Dt,this.Tf*this.jf,this.Of*this.jf,Math.ceil(this.Ef*this.jf),this._s,this.Af,this.Cf,this.Ss,this.Pr,[this.Ms[0]*this.pixelRatio/this.jf,this.Ms[1]*this.pixelRatio/this.jf],Math.ceil(this.oa*this.jf),this.Rf]),this.hitDetectionInstructions.push([bx.DRAW_IMAGE,i,o,this.Us,this.Tf,this.Of,this.Ef,this._s,this.Af,this.Cf,this.Ss,this.Pr,this.Ms,this.oa,this.Rf]),this.endGeometry(n)}},n.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.Tf=void 0,this.Of=void 0,this.Us=null,this.Dt=null,this.jf=void 0,this.Ef=void 0,this.Ms=void 0,this._s=void 0,this.Af=void 0,this.Cf=void 0,this.Ss=void 0,this.Pr=void 0,this.oa=void 0,t.prototype.finish.call(this)},n.prototype.setImageStyle=function(t,n){var e=t.getAnchor(),r=t.getSize(),i=t.getHitDetectionImage(),o=t.getImage(this.pixelRatio),s=t.getOrigin();this.jf=t.getPixelRatio(this.pixelRatio),this.Tf=e[0],this.Of=e[1],this.Us=i,this.Dt=o,this.Ef=r[1],this._s=t.getOpacity(),this.Af=s[0]*this.jf,this.Cf=s[1]*this.jf,this.Ss=t.getRotateWithView(),this.Pr=t.getRotation(),this.Ms=t.getScaleArray(),this.oa=r[0],this.Rf=n},n}(wx),_x=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Sx=function(t){function n(n,e,r,i){return t.call(this,n,e,r,i)||this}return _x(n,t),n.prototype.If=function(t,n,e,r){var i=this.coordinates.length,o=this.appendFlatLineCoordinates(t,n,e,r,!1,!1),s=[bx.MOVE_TO_LINE_TO,i,o];return this.instructions.push(s),this.hitDetectionInstructions.push(s),e},n.prototype.drawLineString=function(t,n){var e=this.state,r=e.strokeStyle,i=e.lineWidth;if(void 0!==r&&void 0!==i){this.updateStrokeStyle(e,this.applyStroke),this.beginGeometry(t,n),this.hitDetectionInstructions.push([bx.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth,e.lineCap,e.lineJoin,e.miterLimit,Es,0],yx);var o=t.getFlatCoordinates(),s=t.getStride();this.If(o,0,o.length,s),this.hitDetectionInstructions.push(px),this.endGeometry(n)}},n.prototype.drawMultiLineString=function(t,n){var e=this.state,r=e.strokeStyle,i=e.lineWidth;if(void 0!==r&&void 0!==i){this.updateStrokeStyle(e,this.applyStroke),this.beginGeometry(t,n),this.hitDetectionInstructions.push([bx.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth,e.lineCap,e.lineJoin,e.miterLimit,e.lineDash,e.lineDashOffset],yx);for(var o=t.getEnds(),s=t.getFlatCoordinates(),a=t.getStride(),u=0,c=0,f=o.length;ct&&(m>y&&(y=m,d=b,p=o),m=0,b=o-i)),s=a,f=l,h=v),u=g,c=w}return(m+=a)>y?[b,o]:[d,p]}var Ox=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ex={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},Ax=function(t){function n(n,e,r,i){var o=t.call(this,n,e,r,i)||this;return o.Nf=null,o.Ji="",o.Qi=0,o.no=0,o.eo=void 0,o.ro=0,o.oo=null,o.fillStates={},o.so=null,o.strokeStates={},o.ao={},o.textStates={},o.zf="",o.Lf="",o.Ff="",o.Rf=void 0,o}return Ox(n,t),n.prototype.finish=function(){var n=t.prototype.finish.call(this);return n.textStates=this.textStates,n.fillStates=this.fillStates,n.strokeStates=this.strokeStates,n},n.prototype.drawText=function(t,n){var e=this.oo,r=this.so,i=this.ao;if(""!==this.Ji&&i&&(e||r)){var o=this.coordinates,s=o.length,a=t.getType(),u=null,c=t.getStride();if(i.placement!==Cv||a!=Rt.LINE_STRING&&a!=Rt.MULTI_LINE_STRING&&a!=Rt.POLYGON&&a!=Rt.MULTI_POLYGON){var f=i.overflow?null:[];switch(a){case Rt.POINT:case Rt.MULTI_POINT:u=t.getFlatCoordinates();break;case Rt.LINE_STRING:u=t.getFlatMidpoint();break;case Rt.CIRCLE:u=t.getCenter();break;case Rt.MULTI_LINE_STRING:u=t.getFlatMidpoints(),c=2;break;case Rt.POLYGON:u=t.getFlatInteriorPoint(),i.overflow||f.push(u[2]/this.resolution),c=3;break;case Rt.MULTI_POLYGON:var h=t.getFlatInteriorPoints();u=[];for(k=0,_=h.length;k<_;k+=3)i.overflow||f.push(h[k+2]/this.resolution),u.push(h[k],h[k+1]);if(0===u.length)return;c=2}if((A=this.appendFlatPointCoordinates(u,c))===s)return;if(f&&(A-s)/2!=u.length/c){var l=s/2;f=f.filter((function(t,n){var e=o[2*(l+n)]===u[n*c]&&o[2*(l+n)+1]===u[n*c+1];return e||--l,e}))}this.Gf(),(i.backgroundFill||i.backgroundStroke)&&(this.setFillStrokeStyle(i.backgroundFill,i.backgroundStroke),i.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),i.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,n);var v=i.padding;if(v!=Ds&&(i.scale[0]<0||i.scale[1]<0)){var d=i.padding[0],p=i.padding[1],y=i.padding[2],m=i.padding[3];i.scale[0]<0&&(p=-p,m=-m),i.scale[1]<0&&(d=-d,y=-y),v=[d,p,y,m]}var b=this.pixelRatio;this.instructions.push([bx.DRAW_IMAGE,s,A,null,NaN,NaN,NaN,1,0,0,this.eo,this.ro,[1,1],NaN,this.Rf,v==Ds?Ds:v.map((function(t){return t*b})),!!i.backgroundFill,!!i.backgroundStroke,this.Ji,this.zf,this.Ff,this.Lf,this.Qi,this.no,f]);var g=1/b;this.hitDetectionInstructions.push([bx.DRAW_IMAGE,s,A,null,NaN,NaN,NaN,1,0,0,this.eo,this.ro,[g,g],NaN,this.Rf,v,!!i.backgroundFill,!!i.backgroundStroke,this.Ji,this.zf,this.Ff,this.Lf,this.Qi,this.no,f]),this.endGeometry(n)}else{if(!Qn(this.getBufferedMaxExtent(),t.getExtent()))return;var w=void 0;if(u=t.getFlatCoordinates(),a==Rt.LINE_STRING)w=[u.length];else if(a==Rt.MULTI_LINE_STRING)w=t.getEnds();else if(a==Rt.POLYGON)w=t.getEnds().slice(0,1);else if(a==Rt.MULTI_POLYGON){var x=t.getEndss();w=[];for(var k=0,_=x.length;k<_;++k)w.push(x[k][0])}this.beginGeometry(t,n);for(var S=i.textAlign,M=0,j=void 0,T=0,O=w.length;TO[2]}else M=w>j;var E,A=Math.PI,C=[],R=k+r===n;if(y=0,m=_,l=t[n=k],v=t[n+1],R){b(),E=Math.atan2(v-p,l-d),M&&(E+=E>0?-A:A);var I=(j+w)/2,P=(T+x)/2;return C[0]=[I,P,(S-o)/2,E,i],C}for(var D=0,N=i.length;D0?-A:A),void 0!==E){var L=z-E;if(L+=L>A?-2*A:L<-A?2*A:0,Math.abs(L)>s)return null}E=z;for(var F=D,G=0;Dt?t-u:i,w=o+c>n?n-c:o,x=v[3]+g*h[0]+v[1],k=v[0]+w*h[1]+v[2],_=m-v[3],S=b-v[0];return(d||0!==f)&&(Nx[0]=_,Fx[0]=_,Nx[1]=S,zx[1]=S,zx[0]=_+x,Lx[0]=zx[0],Lx[1]=S+k,Fx[1]=Lx[1]),0!==f?(tn(y=sn([1,0,0,1,0,0],e,r,1,1,f,-e,-r),Nx),tn(y,zx),tn(y,Lx),tn(y,Fx),En(Math.min(Nx[0],zx[0],Lx[0],Fx[0]),Math.min(Nx[1],zx[1],Lx[1],Fx[1]),Math.max(Nx[0],zx[0],Lx[0],Fx[0]),Math.max(Nx[1],zx[1],Lx[1],Fx[1]),Dx)):En(Math.min(_,_+x),Math.min(S,S+k),Math.max(_,_+x),Math.max(S,S+k),Dx),l&&(m=Math.round(m),b=Math.round(b)),{drawImageX:m,drawImageY:b,drawImageW:g,drawImageH:w,originX:u,originY:c,declutterBox:{minX:Dx[0],minY:Dx[1],maxX:Dx[2],maxY:Dx[3],value:p},canvasTransform:y,scale:h}},t.prototype.Qf=function(t,n,e,r,i,o,s){var a=!(!o&&!s),u=r.declutterBox,c=t.canvas,f=s?s[2]*r.scale[0]/2:0;return u.minX-f<=c.width/n&&u.maxX+f>=0&&u.minY-f<=c.height/n&&u.maxY+f>=0&&(a&&this.Xf(t,Nx,zx,Lx,Fx,o,s),Hs(t,r.canvasTransform,i,e,r.originX,r.originY,r.drawImageW,r.drawImageH,r.drawImageX,r.drawImageY,r.scale)),!0},t.prototype.As=function(t){if(this.Zf){var n=tn(this.Hf,[0,0]),e=512*this.pixelRatio;t.save(),t.translate(n[0]%e,n[1]%e),t.rotate(this.Pi)}t.fill(),this.Zf&&t.restore()},t.prototype.Yf=function(t,n){t.strokeStyle=n[1],t.lineWidth=n[2],t.lineCap=n[3],t.lineJoin=n[4],t.miterLimit=n[5],t.setLineDash&&(t.lineDashOffset=n[7],t.setLineDash(n[6]))},t.prototype.th=function(t,n,e,r){var i=this.textStates[n],o=this.createLabel(t,n,r,e),s=this.strokeStates[e],a=this.pixelRatio,u=Bx(t,i.textAlign||Is),c=Ex[i.textBaseline||Ps],f=s&&s.lineWidth?s.lineWidth:0;return{label:o,anchorX:u*(o.width/a-2*i.scale[0])+2*(.5-u)*f,anchorY:c*o.height/a+2*(.5-c)*f}},t.prototype.nh=function(t,n,e,r,i,o,s,a){var u;this.uo&&x(e,this.Hf)?u=this.uo:(this.uo||(this.uo=[]),u=Nr(this.coordinates,0,this.coordinates.length,2,e,this.uo),Qt(this.Hf,e));for(var c,f,h,l,v,d,p,y,m,b,g,w,k,_,S,M,j=0,T=r.length,O=0,E=0,A=0,C=null,R=null,I=this.Wf,P=this.Pi,D=Math.round(1e12*Math.atan2(-e[1],e[0]))/1e12,N={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:P},z=this.instructions!=r||this.overlaps?0:200;jz&&(this.As(t),E=0),A>z&&(t.stroke(),A=0),E||A||(t.beginPath(),l=NaN,v=NaN),++j;break;case bx.CIRCLE:var F=u[O=L[1]],G=u[O+1],U=u[O+2]-F,B=u[O+3]-G,q=Math.sqrt(U*U+B*B);t.moveTo(F+q,G),t.arc(F,G,q,0,2*Math.PI,!0),++j;break;case bx.CLOSE_PATH:t.closePath(),++j;break;case bx.CUSTOM:O=L[1],c=L[2];var $=L[3],V=L[4],Z=6==L.length?L[5]:void 0;N.geometry=$,N.feature=k,j in I||(I[j]=[]);var W=I[j];Z?Z(u,O,c,2,W):(W[0]=u[O],W[1]=u[O+1],W.length=2),V(W,N),++j;break;case bx.DRAW_IMAGE:O=L[1],c=L[2],y=L[3],f=L[4],h=L[5];var H=L[6],K=L[7],X=L[8],Y=L[9],J=L[10],Q=L[11],tt=L[12],nt=L[13],et=L[14];if(!y&&L.length>=19){m=L[18],b=L[19],g=L[20],w=L[21];var rt=this.th(m,b,g,w);y=rt.label,L[3]=y;var it=L[22];f=(rt.anchorX-it)*this.pixelRatio,L[4]=f;var ot=L[23];h=(rt.anchorY-ot)*this.pixelRatio,L[5]=h,H=y.height,L[6]=H,nt=y.width,L[13]=nt}var st=void 0;L.length>24&&(st=L[24]);var at=void 0,ut=void 0,ct=void 0;L.length>16?(at=L[15],ut=L[16],ct=L[17]):(at=Ds,ut=!1,ct=!1),J&&D?Q+=P:J||D||(Q-=P);for(var ft=0;O0){if(!o||h!==yf&&h!==gf||-1!==o.indexOf(t)){var c=(l[a]-3)/4,v=r-c%s,d=r-(c/s|0),p=i(t,n,v*v+d*d);if(p)return p}f.clearRect(0,0,s,s);break}}var d,y,m,b,g,w=Object.keys(this.eh).map(Number);for(w.sort(p),d=w.length-1;d>=0;--d){var x=w[d].toString();for(m=this.eh[x],y=$x.length-1;y>=0;--y)if(void 0!==(b=m[h=$x[y]])&&(g=b.executeHitDetection(f,a,e,v,c)))return g}},t.prototype.getClipCoords=function(t){var n=this.qf;if(!n)return null;var e=n[0],r=n[1],i=n[2],o=n[3],s=[e,r,e,o,i,o,i,r];return Nr(s,0,8,2,t,s),s},t.prototype.isEmpty=function(){return C(this.eh)},t.prototype.execute=function(t,n,e,r,i,o,s){var a=Object.keys(this.eh).map(Number);a.sort(p),this.qf&&(t.save(),this.clip(t,e));var u,c,f,h,l,v,d=o||$x;for(s&&a.reverse(),u=0,c=a.length;ue)break;var a=r[s];a||(a=[],r[s]=a),a.push(4*((t+i)*n+(t+o))+3),i>0&&a.push(4*((t-i)*n+(t+o))+3),o>0&&(a.push(4*((t+i)*n+(t-o))+3),i>0&&a.push(4*((t-i)*n+(t-o))+3))}for(var u=[],c=(i=0,r.length);iv[2];)m=p*++y,c.push(this.getRenderTransform(r,i,o,Kx,f,h,m).slice()),d-=p}this.hh=Xx(e,c,this.lh,u.getStyleFunction(),a,i,o)}n(Yx(t,this.lh,this.hh))}.bind(this))},n.prototype.forEachFeatureAtCoordinate=function(t,n,e,r,i){var s=this;if(this.wh){var a,u=n.viewState.resolution,c=n.viewState.rotation,f=this.getLayer(),h={},l=function(t,n,e){var s=o(t),a=h[s];if(a){if(!0!==a&&eg[0]&&_[2]>g[2]&&b.push([_[0]-w,_[1],_[2]-w,_[3]])}if(!this.fh&&this.dh==f&&this.oc==l&&this.gh==d&&Mn(this.ph,y))return x(this.gc,m)||(this.hh=null,this.gc=m),this.mh=p,this.replayGroupChanged=!1,!0;this.wh=null,this.fh=!1;var S,M=new Rx(_f(f,h),y,f,h);this.getLayer().getDeclutter()&&(S=new Rx(_f(f,h),y,f,h));var j,T=Tr();if(T){for(var O=0,E=b.length;O0)n([]);else{var m=Xn(h.getTileCoordExtent(r.wrappedTileCoord)),b=[(l[0]-m[0])/f,(m[1]-l[1])/f],g=r.getSourceTiles().reduce((function(t,n){return t.concat(n.getFeatures())}),[]),w=r.hitDetectionImageData[s];if(!w&&!this.uh){var x=Ya(h.getTileSize(h.getZForResolution(f))),k=this.yh;w=Xx(x,[this.getRenderTransform(h.getTileCoordCenter(r.wrappedTileCoord),f,0,Kx,x[0]*Kx,x[1]*Kx,0)],g,i.getStyleFunction(),h.getTileCoordExtent(r.wrappedTileCoord),r.getReplayState(i).renderedResolution,k),r.hitDetectionImageData[s]=w}n(Yx(b,g,w))}}.bind(this))},n.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&void 0!==this.Mh&&t.changed()},n.prototype.ah=function(t){this.renderIfReadyAndVisible()},n.prototype.renderDeclutter=function(t){var n=this.context,e=n.globalAlpha;n.globalAlpha=this.getLayer().getOpacity();for(var r=t.viewHints,i=!(r[_a]||r[Sa]),s=this.renderedTiles,a=0,u=s.length;a=0;--h)f[h].execute(this.context,1,this.getTileRenderTransform(c,t),t.viewState.rotation,i,void 0,t.declutterTree)}n.globalAlpha=e},n.prototype.getTileRenderTransform=function(t,n){var e=n.pixelRatio,r=n.viewState,i=r.center,o=r.resolution,s=r.rotation,a=n.size,u=Math.round(a[0]*e),c=Math.round(a[1]*e),f=this.getLayer().getSource().getTileGridForProjection(n.viewState.projection),h=t.tileCoord,l=f.getTileCoordExtent(t.wrappedTileCoord),v=f.getTileCoordExtent(h,this.tmpExtent)[0]-l[0];return Yt(en(this.inversePixelTransform.slice(),1/e,1/e),this.getRenderTransform(i,o,s,e,u,c,v))},n.prototype.renderFrame=function(n,e){var r=n.viewHints,i=!(r[_a]||r[Sa]);t.prototype.renderFrame.call(this,n,e),this.Sh=n.pixelToCoordinateTransform.slice(),this.yh=n.viewState.rotation;var s=this.getLayer(),a=s.getRenderMode(),u=this.context,c=u.globalAlpha;u.globalAlpha=s.getOpacity();for(var f=ak[a],h=n.viewState.rotation,l=this.renderedTiles,v=[],d=[],p=l.length-1;p>=0;--p)for(var y=l[p],m=this.getTileRenderTransform(y,n),b=y.executorGroups[o(s)],g=!1,w=0,x=b.length;w1?s:2,x=o||new Array(w);for(p=0;p>1;i0&&y.length>0;)o=y.pop(),f=d.pop(),l=p.pop(),(u=o.toString())in m||(c.push(l[0],l[1]),m[u]=!0),s=y.pop(),h=d.pop(),v=p.pop(),fe((i=n(r=t(a=(o+s)/2)))[0],i[1],l[0],l[1],v[0],v[1])this.yl.length;)a=new Tt,this.yl.push(a);var c=r.getFeaturesCollection();c.clear();var f,h,l=0;for(f=0,h=this.Wh.length;fMath.PI/2);for(var y=jf(t),m=h;m<=l;++m){var b=this.Wh.length+this.Hh.length,g=void 0,w=void 0,x=void 0,k=void 0;if(this.rl)for(w=0,x=this.rl.length;w=a?(t[0]=s[0],t[2]=s[2]):o=!0);var u=[ae(n[0],this.qh,this.Uh),ae(n[1],this.$h,this.Bh)],c=this.Yh(u);isNaN(c[1])&&(c[1]=Math.abs(this.zh)>=Math.abs(this.Fh)?this.zh:this.Fh);var f,h,l,v,d=ae(c[0],this.Gh,this.Lh),p=ae(c[1],this.Fh,this.zh),y=this.Zh,m=t;o||(m=[ae(t[0],this.qh,this.Uh),ae(t[1],this.$h,this.Bh),ae(t[2],this.qh,this.Uh),ae(t[3],this.$h,this.Bh)]);var b=ie(m,this.Yh,void 0,8),g=b[3],w=b[2],x=b[1],k=b[0];if(o||(Sn(m,this.Qh)&&(k=this.Gh,x=this.Fh),Sn(m,this.tl)&&(w=this.Lh,x=this.Fh),Sn(m,this.nl)&&(k=this.Gh,g=this.zh),Sn(m,this.el)&&(w=this.Lh,g=this.zh),g=ae(g,p,this.zh),w=ae(w,d,this.Lh),x=ae(x,this.Fh,p),k=ae(k,this.Gh,d)),v=ae(d=Math.floor(d/i)*i,this.Gh,this.Lh),h=this.xl(v,x,g,r,t,0),f=0,o)for(;(v-=i)>=k&&f++r[o]&&(i=o,o=1);var s=Math.max(n[1],r[i]),a=Math.min(n[3],r[o]),u=ae(n[1]+Math.abs(n[1]-n[3])*this.ul,s,a),c=[r[i-1]+(r[o-1]-r[i-1])*(u-r[i])/(r[o]-r[i]),u],f=this.rl[e].geom;return f.setCoordinates(c),f},n.prototype.getMeridians=function(){return this.Wh},n.prototype.Sl=function(t,n,e,r,i){var o=kk(t,n,e,this.fe,r),s=this.Hh[i];return s?(s.setFlatCoordinates(Ot,o),s.changed()):s=new mk(o,Ot),s},n.prototype.jl=function(t,n,e){var r=t.getFlatCoordinates(),i=0,o=r.length-2;r[i]>r[o]&&(i=o,o=0);var s=Math.max(n[0],r[i]),a=Math.min(n[2],r[o]),u=ae(n[0]+Math.abs(n[0]-n[2])*this.cl,s,a),c=[u,r[i+1]+(r[o+1]-r[i+1])*(u-r[i])/(r[o]-r[i])],f=this.il[e].geom;return f.setCoordinates(c),f},n.prototype.getParallels=function(){return this.Hh},n.prototype.gl=function(t){var n=lr("EPSG:4326"),e=t.getWorldExtent();this.zh=e[3],this.Lh=e[2],this.Fh=e[1],this.Gh=e[0];var r=kr(t,n);if(this.Gh=Math.abs(this.Fh)?this.zh:this.Fh),this.fe=t},n}(gk),Tk=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ok="blur",Ek="gradient",Ak="radius",Ck=["#00f","#0ff","#0f0","#ff0","#f00"];var Rk=function(t){function n(n){var e=this,r=n||{},i=O({},r);delete i.gradient,delete i.radius,delete i.blur,delete i.weight,(e=t.call(this,i)||this).Ol=null,e.addChangeListener(Ek,e.El),e.setGradient(r.gradient?r.gradient:Ck),e.setBlur(void 0!==r.blur?r.blur:15),e.setRadius(void 0!==r.radius?r.radius:8);var o=r.weight?r.weight:"weight";return e.Al="string"==typeof o?function(t){return t.get(o)}:o,e.setRenderOrder(null),e}return Tk(n,t),n.prototype.getBlur=function(){return this.get(Ok)},n.prototype.getGradient=function(){return this.get(Ek)},n.prototype.getRadius=function(){return this.get(Ak)},n.prototype.El=function(){this.Ol=function(t){for(var n=1,e=256,r=bo(n,e),i=r.createLinearGradient(0,0,n,e),o=1/(t.length-1),s=0,a=t.length;s>3)?e.readString():2===t?e.readFloat():3===t?e.readDouble():4===t?e.readVarint64():5===t?e.readVarint():6===t?e.readSVarint():7===t?e.readBoolean():null;n.values.push(r)}}function Zk(t,n,e){if(1==t)n.id=e.readVarint();else if(2==t)for(var r=e.readVarint()+e.pos;e.pos>3}s--,1===o||2===o?(a+=t.readSVarint(),u+=t.readSVarint(),1===o&&c>f&&(r.push(c),f=c),e.push(a,u),c+=2):7===o?c>f&&(e.push(e[f],e[f+1]),c+=2):St(!1,59)}c>f&&(r.push(c),f=c)},n.prototype.zl=function(t,n,e){var r,i=n.type;if(0===i)return null;var o,s=n.properties;this.Dl?(o=s[this.Dl],delete s[this.Dl]):o=n.id,s[this.Pl]=n.layer.name;var a=[],u=[];this.Nl(t,n,a,u);var c=function(t,n){var e;1===t?e=1===n?Rt.POINT:Rt.MULTI_POINT:2===t?e=1===n?Rt.LINE_STRING:Rt.MULTI_LINE_STRING:3===t&&(e=Rt.POLYGON);return e}(i,u.length);if(this.Il===pk)(r=new this.Il(c,a,u,s,o)).transform(e.dataProjection);else{var f=void 0;if(c==Rt.POLYGON){for(var h=[],l=0,v=0,d=0,p=u.length;d1?new Uk(a,Ot,h):new Ui(a,Ot,u)}else f=c===Rt.POINT?new wi(a,Ot):c===Rt.LINE_STRING?new mk(a,Ot):c===Rt.POLYGON?new Ui(a,Ot,u):c===Rt.MULTI_POINT?new Fk(a,Ot):c===Rt.MULTI_LINE_STRING?new zk(a,Ot,u):null;r=new(0,this.Il),this.H&&r.setGeometryName(this.H);var m=Pk(f,!1,e);r.setGeometry(m),r.setId(o),r.setProperties(s,!0)}return r},n.prototype.getType=function(){return Kc},n.prototype.readFeatures=function(t,n){var e=this.Mc,r=this.adaptOptions(n),i=lr(r.dataProjection);i.setWorldExtent(r.extent),r.dataProjection=i;var o=new Bk(t),s=o.readFields($k,{}),a=[];for(var u in s)if(!e||-1!=e.indexOf(u)){var c=s[u],f=c?[0,0,c.extent,c.extent]:null;i.setExtent(f);for(var h=0,l=c.length;h=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==e.return||e.return()}finally{if(a)throw o}}}}function __(t,n){if(t){if("string"==typeof t)return S_(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?S_(t,n):void 0}}function S_(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{: }`. If specified as a string for a vector tile source, the same property is used across all its source layers."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster:{type:{required:!0,type:"enum",values:{raster:{doc:"A raster tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{doc:"A RGB-encoded raster DEM source"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},encoding:{type:"enum",values:{terrarium:{doc:"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info."},mapbox:{doc:"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info."}},default:"mapbox",doc:"The encoding used by this source. Mapbox Terrain RGB is used by default"},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{doc:"A GeoJSON data source."}},doc:"The data type of the GeoJSON source."},data:{type:"*",doc:"A URL to a GeoJSON file, or inline GeoJSON."},maxzoom:{type:"number",default:18,doc:"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},buffer:{type:"number",default:128,maximum:512,minimum:0,doc:"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance."},filter:{type:"*",doc:"An expression for filtering features prior to processing them for rendering."},tolerance:{type:"number",default:.375,doc:"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)."},cluster:{type:"boolean",default:!1,doc:"If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source with additional properties:\n * `cluster` Is `true` if the point is a cluster \n * `cluster_id` A unqiue id for the cluster to be used in conjunction with the [cluster inspection methods](https://www.mapbox.com/mapbox-gl-js/api/#geojsonsource#getclusterexpansionzoom)\n * `point_count` Number of original points grouped into this cluster\n * `point_count_abbreviated` An abbreviated point count"},clusterRadius:{type:"number",default:50,minimum:0,doc:"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile."},clusterMaxZoom:{type:"number",doc:"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered). Clusters are re-evaluated at integer zoom levels so setting clusterMaxZoom to 14 means the clusters will be displayed until z15."},clusterMinPoints:{type:"number",doc:"Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to `2`."},clusterProperties:{type:"*",doc:'An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{"property_name": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `"+"` or `"max"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\n\nExample: `{"sum": ["+", ["get", "scalerank"]]}`.\n\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `["accumulated"]` value, e.g.:\n`{"sum": [["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]}`'},lineMetrics:{type:"boolean",default:!1,doc:"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values."},generateId:{type:"boolean",default:!1,doc:"Whether to generate ids for the geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{: }`."}},source_video:{type:{required:!0,type:"enum",values:{video:{doc:"A video data source."}},doc:"The data type of the video source."},urls:{required:!0,type:"array",value:"string",doc:"URLs to video content in order of preferred format."},coordinates:{required:!0,doc:"Corners of video specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},source_image:{type:{required:!0,type:"enum",values:{image:{doc:"An image data source."}},doc:"The data type of the image source."},url:{required:!0,type:"string",doc:"URL that points to an image."},coordinates:{required:!0,doc:"Corners of image specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},layer:{id:{type:"string",doc:"Unique layer name.",required:!0},type:{type:"enum",values:{fill:{doc:"A filled polygon with an optional stroked border.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},line:{doc:"A stroked line.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},symbol:{doc:"An icon or a text label.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},circle:{doc:"A filled circle.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},heatmap:{doc:"A heatmap.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"fill-extrusion":{doc:"An extruded (3D) polygon.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},raster:{doc:"Raster map textures such as satellite imagery.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},hillshade:{doc:"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},background:{doc:"The background color or pattern of the map.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},sky:{doc:"A spherical dome around the map that is always rendered behind all other layers.","sdk-support":{"basic functionality":{js:"2.0.0"}}}},doc:"Rendering type of this layer.",required:!0},metadata:{type:"*",doc:"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},source:{type:"string",doc:"Name of a source description to be used for this layer. Required for all layer types except `background`."},"source-layer":{type:"string",doc:"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources."},minzoom:{type:"number",minimum:0,maximum:24,doc:"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden."},filter:{type:"filter",doc:"A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions."},layout:{type:"layout",doc:"Layout properties for the layer."},paint:{type:"paint",doc:"Default paint properties for this layer."}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],layout_background:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_sky:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"2.0.0"}},"property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"},"data-driven styling":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},"property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{doc:"A cap with a squared-off end which is drawn to the exact endpoint of the line."},round:{doc:"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},square:{doc:"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."}},default:"butt",doc:"The display of line endings.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{doc:"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."},round:{doc:"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},miter:{doc:"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."}},default:"miter",doc:"The display of lines when joining.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,doc:"Used to automatically convert miter joins to bevel joins for sharp angles.",requires:[{"line-join":"miter"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,doc:"Used to automatically convert round joins to miter joins for shallow angles.",requires:[{"line-join":"round"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{doc:"The label is placed at the point where the geometry is located."},line:{doc:"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries."},"line-center":{doc:"The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries."}},default:"point",doc:"Label placement relative to its geometry.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`line-center` value":{js:"0.47.0",android:"6.4.0",ios:"4.3.0",macos:"0.10.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",doc:"Distance between two symbol anchors.",requires:[{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,doc:"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.","sdk-support":{"basic functionality":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"},"data-driven styling":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},"viewport-y":{doc:"Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},source:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data."}},default:"auto",doc:"Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`.","sdk-support":{"basic functionality":{js:"0.49.0",android:"6.6.0",ios:"4.5.0",macos:"0.12.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,doc:"If true, the icon will be visible even if it collides with other previously drawn symbols.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the icon.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,doc:"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line."},viewport:{doc:"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",doc:"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{doc:"The icon is displayed at its intrinsic aspect ratio."},width:{doc:"The icon is scaled in the x-dimension to fit the width of the text."},height:{doc:"The icon is scaled in the y-dimension to fit the height of the text."},both:{doc:"The icon is scaled in both x- and y-dimensions."}},default:"none",doc:"Scales the icon to fit around the associated text.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"stretchable icons":{js:"1.6.0",android:"9.2.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",doc:"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",doc:"Name of image in sprite to use for drawing an image background.",tokens:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the icon clockwise.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the icon bounding box used for detecting symbol collisions.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,doc:"If true, the icon may be flipped to prevent it from being rendered upside-down.",requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],doc:"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{doc:"The center of the icon is placed closest to the anchor."},left:{doc:"The left side of the icon is placed closest to the anchor."},right:{doc:"The right side of the icon is placed closest to the anchor."},top:{doc:"The top of the icon is placed closest to the anchor."},bottom:{doc:"The bottom of the icon is placed closest to the anchor."},"top-left":{doc:"The top left corner of the icon is placed closest to the anchor."},"top-right":{doc:"The top right corner of the icon is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the icon is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the icon is placed closest to the anchor."}},default:"center",doc:"Part of the icon placed closest to the anchor.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{doc:"The icon is aligned to the plane of the map."},viewport:{doc:"The icon is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `icon-rotation-alignment`."}},default:"auto",doc:"Orientation of icon when map is pitched.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{doc:"The text is aligned to the plane of the map."},viewport:{doc:"The text is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `text-rotation-alignment`."}},default:"auto",doc:"Orientation of text when map is pitched.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line."},viewport:{doc:"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,doc:"Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],doc:"Font stack to use for displaying text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",doc:"Font size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",doc:"The maximum line width for text wrapping.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",doc:"Text leading value for multi-line text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{type:"number",default:0,units:"ems",doc:"Text tracking amount.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{doc:"The text is aligned towards the anchor position."},left:{doc:"The text is aligned to the left."},center:{doc:"The text is centered."},right:{doc:"The text is aligned to the right."}},default:"center",doc:"Text justification options.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},auto:{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,doc:"Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"},"data-driven styling":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},requires:["text-field",{"symbol-placement":["point"]}],doc:"To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dimensional `text-offset`.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},default:"center",doc:"Part of the text placed closest to the anchor.",requires:["text-field",{"!":"text-variable-anchor"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",doc:"Maximum angle change between adjacent characters.",requires:["text-field",{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{doc:"If a text's language supports horizontal writing mode, symbols with point placement would be laid out horizontally."},vertical:{doc:"If a text's language supports vertical writing mode, symbols with point placement would be laid out vertically."}},doc:"The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.",requires:["text-field",{"symbol-placement":["point"]}],"sdk-support":{"basic functionality":{js:"1.3.0",android:"8.3.0",ios:"5.3.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the text clockwise.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the text bounding box used for detecting symbol collisions.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,doc:"If true, the text may be flipped vertically to prevent it from being rendered upside-down.",requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{doc:"The text is not altered."},uppercase:{doc:"Forces all letters to be displayed in uppercase."},lowercase:{doc:"Forces all letters to be displayed in lowercase."}},default:"none",doc:"Specifies how to capitalize text, similar to the CSS `text-transform` property.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",doc:"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,doc:"If true, the text will be visible even if it collides with other previously drawn symbols.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,doc:"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.",requires:["text-field","icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},filter:{type:"array",value:"*",doc:"A filter selects specific features from a layer."},filter_operator:{type:"enum",values:{"==":{doc:'`["==", key, value]` equality: `feature[key] = value`'},"!=":{doc:'`["!=", key, value]` inequality: `feature[key] ≠ value`'},">":{doc:'`[">", key, value]` greater than: `feature[key] > value`'},">=":{doc:'`[">=", key, value]` greater than or equal: `feature[key] ≥ value`'},"<":{doc:'`["<", key, value]` less than: `feature[key] < value`'},"<=":{doc:'`["<=", key, value]` less than or equal: `feature[key] ≤ value`'},in:{doc:'`["in", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`'},"!in":{doc:'`["!in", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`'},all:{doc:'`["all", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`'},any:{doc:'`["any", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`'},none:{doc:'`["none", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`'},has:{doc:'`["has", key]` `feature[key]` exists'},"!has":{doc:'`["!has", key]` `feature[key]` does not exist'},within:{doc:'`["within", object]` feature geometry is within object geometry'}},doc:"The filter operator."},geometry_type:{type:"enum",values:{Point:{doc:"Filter to point geometries."},LineString:{doc:"Filter to line geometries."},Polygon:{doc:"Filter to polygon geometries."}},doc:"The geometry type for the filter to select."},function:{expression:{type:"expression",doc:"An expression."},stops:{type:"array",doc:"An array of stops.",value:"function_stop"},base:{type:"number",default:1,minimum:0,doc:"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly."},property:{type:"string",doc:"The name of a feature property to use as the function input.",default:"$zoom"},type:{type:"enum",values:{identity:{doc:"Return the input value as the output value."},exponential:{doc:"Generate an output by interpolating between stops just less than and just greater than the function input."},interval:{doc:"Return the output value of the stop just less than the function input."},categorical:{doc:"Return the output value of the stop equal to the function input."}},doc:"The interpolation strategy to use in function evaluation.",default:"exponential"},colorSpace:{type:"enum",values:{rgb:{doc:"Use the RGB color space to interpolate color values"},lab:{doc:"Use the LAB color space to interpolate color values."},hcl:{doc:"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually."}},doc:"The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.",default:"rgb"},default:{type:"*",required:!1,doc:"A value to serve as a fallback function result when a value isn't otherwise available. It is used in the following circumstances:\n* In categorical functions, when the feature value does not match any of the stop domain values.\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\n* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a `circle-color` property but the feature property value is not a string or not a valid color).\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\nIf no default is provided, the style property's default is used in these circumstances."}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2,doc:"Zoom level and value pair."},expression:{type:"array",value:"*",minimum:1,doc:"An expression defines a function that can be used for data-driven style properties or feature filters."},expression_name:{doc:"",type:"enum",values:{let:{doc:'Binds expressions to named variables, which can then be referenced in the result expression using ["var", "variable_name"].',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},var:{doc:'References variable bound using "let".',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},literal:{doc:"Provides a literal array or object value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},array:{doc:"Asserts that the input is an array (optionally with a specific item type and length). If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},at:{doc:"Retrieves an item from an array.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},in:{doc:"Determines whether an item exists in an array or a substring exists in a string.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.6.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"index-of":{doc:"Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},slice:{doc:"Returns an item from an array or a substring from a string from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},case:{doc:"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},match:{doc:'Selects the output for which the label value matches the input value, or the fallback value if no match is found. The input can be any expression (for example, `["get", "building_type"]`). Each label must be unique, and must be either:\n - a single literal value; or\n - an array of literal values, the values of which must be all strings or all numbers (for example `[100, 101]` or `["c", "b"]`).\n\nThe input matches if any of the values in the array matches using strict equality, similar to the `"in"` operator.\nIf the input type does not match the type of the labels, the result will be the fallback value.',group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},coalesce:{doc:"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},step:{doc:'Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},interpolate:{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array`, or `color`.\n\nInterpolation types:\n- `["linear"]`: Interpolates linearly between the pair of stops just less than and just greater than the input.\n- `["exponential", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\n- `["cubic-bezier", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"interpolate-hcl":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the Hue-Chroma-Luminance color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},"interpolate-lab":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the CIELAB color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},ln2:{doc:"Returns mathematical constant ln(2).",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},pi:{doc:"Returns the mathematical constant pi.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},e:{doc:"Returns the mathematical constant e.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},typeof:{doc:"Returns a string describing the type of the given value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},string:{doc:"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},number:{doc:"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},boolean:{doc:"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},object:{doc:"Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},collator:{doc:"Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.",group:"Types","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},format:{doc:'Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`\'image\'`](#types-image) expression. Strings may be followed by a style override object that supports the following properties:\n- `"text-font"`: Overrides the font stack specified by the root layout property.\n- `"text-color"`: Overrides the color specified by the root paint property.\n- `"font-scale"`: Applies a scaling factor on `text-size` as specified by the root layout property.',group:"Types","sdk-support":{"basic functionality":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-font":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"font-scale":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-color":{js:"1.3.0",android:"7.3.0",ios:"4.10.0",macos:"0.14.0"},image:{js:"1.6.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},image:{doc:"Returns an `image` type for use in `icon-image`, `*-pattern` entries and as a section in the `format` expression. If set, the `image` argument will check that the requested image exists in the style and will return either the resolved image name or `null`, depending on whether or not the image is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `image` argument.",group:"Types","sdk-support":{"basic functionality":{js:"1.4.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},"number-format":{doc:"Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.",group:"Types","sdk-support":{"basic functionality":{js:"0.54.0"}}},"to-string":{doc:'Converts the input value to a string. If the input is `null`, the result is `""`. If the input is a boolean, the result is `"true"` or `"false"`. If the input is a number, it is converted to a string as specified by the ["NumberToString" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `"rgba(r,g,b,a)"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-number":{doc:'Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the ["ToNumber Applied to the String Type" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-boolean":{doc:"Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-rgba":{doc:"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-color":{doc:"Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgb:{doc:"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgba:{doc:"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},get:{doc:"Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns null if the requested property is missing.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},has:{doc:"Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},length:{doc:"Gets the length of an array or string.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},properties:{doc:'Gets the feature properties object. Note that in some cases, it may be more efficient to use ["get", "property_name"] directly.',group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"feature-state":{doc:"Retrieves a property value from the current feature's state. Returns null if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. Features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. Note that [\"feature-state\"] can only be used with paint properties that support data-driven styling.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.46.0"}}},"geometry-type":{doc:"Gets the feature's geometry type: `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},id:{doc:"Gets the feature's id, if it has one.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},zoom:{doc:'Gets the current zoom level. Note that in style layout and paint properties, ["zoom"] may only appear as the input to a top-level "step" or "interpolate" expression.',group:"Zoom","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"heatmap-density":{doc:"Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.",group:"Heatmap","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"line-progress":{doc:"Gets the progress along a gradient line. Can only be used in the `line-gradient` property.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.6.0",macos:"0.12.0"}}},"sky-radial-progress":{doc:"Gets the distance of a point on the sky from the sun position. Returns 0 at sun position and 1 when the distance reaches `sky-gradient-radius`. Can only be used in the `sky-gradient` property.",group:"sky","sdk-support":{"basic functionality":{js:"2.0.0"}}},accumulated:{doc:"Gets the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.53.0"}}},"+":{doc:"Returns the sum of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"*":{doc:"Returns the product of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"-":{doc:"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"/":{doc:"Returns the result of floating point division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"%":{doc:"Returns the remainder after integer division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"^":{doc:"Returns the result of raising the first input to the power specified by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sqrt:{doc:"Returns the square root of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log10:{doc:"Returns the base-ten logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ln:{doc:"Returns the natural logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log2:{doc:"Returns the base-two logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sin:{doc:"Returns the sine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},cos:{doc:"Returns the cosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},tan:{doc:"Returns the tangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},asin:{doc:"Returns the arcsine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},acos:{doc:"Returns the arccosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},atan:{doc:"Returns the arctangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},min:{doc:"Returns the minimum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},max:{doc:"Returns the maximum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},round:{doc:'Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `["round", -1.5]` evaluates to -2.',group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},abs:{doc:"Returns the absolute value of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ceil:{doc:"Returns the smallest integer that is greater than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},floor:{doc:"Returns the largest integer that is less than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},distance:{doc:"Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJSON of type `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.",group:"Math","sdk-support":{"basic functionality":{android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}}},"==":{doc:"Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"!=":{doc:"Returns `true` if the input values are not equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">":{doc:"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<":{doc:"Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">=":{doc:"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<=":{doc:"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},all:{doc:"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},any:{doc:"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"!":{doc:"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},within:{doc:"Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported features for evaluation:\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.",group:"Decision","sdk-support":{"basic functionality":{js:"1.9.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"is-supported-script":{doc:"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in Mapbox GL JS).",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.6.0"}}},upcase:{doc:"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},downcase:{doc:"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},concat:{doc:"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"resolved-locale":{doc:"Returns the IETF language tag of the locale being used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}}}},fog:{range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"The start and end distance range in which fog fades from fully transparent to fully opaque. The distance to the point at the center of the map is defined as zero, so that negative range values are closer to the camera, and positive values are farther away.",example:[.5,10],"sdk-support":{"basic functionality":{js:"2.3.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The color of the fog. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.","sdk-support":{"basic functionality":{js:"2.3.0"}}},"horizon-blend":{type:"number","property-type":"data-constant",default:.1,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Horizon blend applies a smooth fade from the color of the fog to the color of the sky. A value of zero leaves a sharp transition from fog to sky. Increasing the value blends the color of fog into increasingly high angles of the sky.","sdk-support":{"basic functionality":{js:"2.3.0"}}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{doc:"The position of the light source is aligned to the rotation of the map."},viewport:{doc:"The position of the light source is aligned to the rotation of the viewport."}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},doc:"Whether extruded geometries are lit relative to the map or viewport.",example:"map","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).",example:[1.5,90,80],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Color tint for lighting extruded geometries.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},terrain:{source:{type:"string",doc:"Name of a source of `raster_dem` type to be used for terrain elevation.",required:!0,"sdk-support":{"basic functionality":{js:"2.0.0"}}},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value.","sdk-support":{"basic functionality":{js:"2.0.0"}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,doc:"Whether or not the fill should be antialiased.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",doc:"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.",transition:!0,requires:[{"!":"fill-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{doc:"The fill is translated relative to the map."},viewport:{doc:"The fill is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-translate`.",default:"map",requires:["fill-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",doc:"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{doc:"The fill extrusion is translated relative to the map."},viewport:{doc:"The fill extrusion is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-extrusion-translate`.",default:"map",requires:["fill-extrusion-translate"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude this layer.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.",transition:!0,requires:["fill-extrusion-height"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,doc:"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.",transition:!1,"sdk-support":{"basic functionality":{js:"0.50.0",ios:"4.7.0",macos:"0.13.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",doc:"The color with which the line will be drawn.",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.23.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{doc:"The line is translated relative to the map."},viewport:{doc:"The line is translated relative to the viewport."}},doc:"Controls the frame of reference for `line-translate`.",default:"map",requires:["line-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",doc:"Stroke thickness.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,doc:"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,doc:"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.12.1",android:"3.0.0",ios:"3.1.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Blur applied to the line, in pixels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",doc:"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",doc:'Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.',transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.4.0",macos:"0.11.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",doc:"Circle radius.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",doc:"The fill color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{doc:"The circle is translated relative to the map."},viewport:{doc:"The circle is translated relative to the viewport."}},doc:"Controls the frame of reference for `circle-translate`.",default:"map",requires:["circle-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{doc:"Circles are scaled according to their apparent distance to the camera."},viewport:{doc:"Circles are not scaled."}},default:"map",doc:"Controls the scaling behavior of the circle when the map is pitched.","sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{doc:"The circle is aligned to the plane of the map."},viewport:{doc:"The circle is aligned to the plane of the viewport."}},default:"viewport",doc:"Orientation of circle when map is pitched.","sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.","sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",doc:"The stroke color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",doc:"The opacity of the circle's stroke.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",doc:"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,doc:"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,doc:"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],doc:'Defines the color of each pixel based on its density value in a heatmap. Should be an expression that uses `["heatmap-density"]` as input.',transition:!1,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",doc:"The global opacity at which the heatmap layer will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{doc:"The opacity at which the icon will be drawn.",type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,doc:"The color of the icon. This can only be used with sdf icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the icon's halo. Icon halos can only be used with SDF icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the icon outline.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Fade out the halo towards the outside.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{doc:"Icons are translated relative to the map."},viewport:{doc:"Icons are translated relative to the viewport."}},doc:"Controls the frame of reference for `icon-translate`.",default:"map",requires:["icon-image","icon-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",doc:"The opacity at which the text will be drawn.",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",doc:"The color with which the text will be drawn.",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the text's halo, which helps it stand out from backgrounds.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The halo's fadeout distance towards the outside.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{doc:"The text is translated relative to the map."},viewport:{doc:"The text is translated relative to the viewport."}},doc:"Controls the frame of reference for `text-translate`.",default:"map",requires:["text-field","text-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",doc:"The opacity at which the image will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",doc:"Rotates hues around the color wheel.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the minimum brightness.",default:0,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the maximum brightness.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",doc:"Increase or reduce the saturation of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",doc:"Increase or reduce the contrast of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",doc:"The resampling/interpolation method to use for overscaling, also known as texture magnification filter",values:{linear:{doc:"(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled"},nearest:{doc:"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled"}},default:"linear","sdk-support":{"basic functionality":{js:"0.47.0",android:"6.3.0",ios:"4.2.0",macos:"0.9.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",doc:"Fade duration when a new tile is added.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,doc:"The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.",transition:!1,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{doc:"The hillshade illumination is relative to the north direction."},viewport:{doc:"The hillshade illumination is relative to the top of the viewport."}},default:"viewport",doc:"Direction of light source when map is rotated.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",default:.5,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",doc:"The shading color of areas that face away from the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",doc:"The shading color of areas that faces towards the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",doc:"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",doc:"The color with which the background will be drawn.",transition:!0,requires:[{"!":"background-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the background will be drawn.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{doc:"Renders the sky with a gradient that can be configured with `sky-gradient-radius` and `sky-gradient`."},atmosphere:{doc:"Renders the sky with a simulated atmospheric scattering algorithm, the sun direction can be attached to the light position or explicitly set through `sky-atmosphere-sun`."}},default:"atmosphere",doc:"The type of the sky","sdk-support":{"basic functionality":{js:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,doc:"Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0° is directly above, at zenith, and 90° at the horizon. When this property is ommitted, the sun center is directly inherited from the light position.","sdk-support":{"basic functionality":{js:"2.0.0"}},requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,doc:"Intensity of the sun as a light source in the atmosphere (on a scale from 0 to a 100). Setting higher values will brighten up the sky.","sdk-support":{"basic functionality":{js:"2.0.0"}},"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,doc:"Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0° is directly above, at zenith, and 90° at the horizon.","sdk-support":{"basic functionality":{js:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,doc:"The angular distance (measured in degrees) from `sky-gradient-center` up to which the gradient extends. A value of 180 causes the gradient to wrap around to the opposite direction from `sky-gradient-center`.","sdk-support":{"basic functionality":{js:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],doc:"Defines a radial color gradient with which to color the sky. The color values can be interpolated with an expression using `sky-radial-progress`. The range [0, 1] for the interpolant covers a radial distance (in degrees) of [0, `sky-gradient-radius`] centered at the position specified by `sky-gradient-center`.",transition:!1,requires:[{"sky-type":"gradient"}],"sdk-support":{"basic functionality":{js:"2.0.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",doc:"A color applied to the atmosphere sun halo. The alpha channel describes how strongly the sun halo is represented in an atmosphere sky layer.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0"}},"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",doc:"A color used to tweak the main atmospheric scattering coefficients. Using white applies the default coefficients giving the natural blue color to the atmosphere. This color affects how heavily the corresponding wavelength is represented during scattering. The alpha channel describes the density of the atmosphere, with 1 maximum density and 0 no density.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0"}},"property-type":"data-constant"},"sky-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire sky layer.",transition:!0,"sdk-support":{"basic functionality":{js:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds",doc:"Time allotted for transitions to complete."},delay:{type:"number",default:0,minimum:0,units:"milliseconds",doc:"Length of time before a transition begins."}},"property-type":{"data-driven":{type:"property-type",doc:"Property is interpolable and can be represented using a property expression."},"cross-faded":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms."},"cross-faded-data-driven":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms. It can be represented using a property expression."},"color-ramp":{type:"property-type",doc:"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation."},"data-constant":{type:"property-type",doc:"Property is interpolable but cannot be represented using a property expression."},constant:{type:"property-type",doc:"Property is constant across all zoom levels and property values."}},promoteId:{"*":{type:"string",doc:"A name of a feature property to use as ID for feature state."}}};var T_="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function O_(t){var n={exports:{}};return t(n,n.exports),n.exports}var E_=O_((function(t,n){!function(e){var r=n&&!n.nodeType&&n,i=t&&!t.nodeType&&t,o="object"==M_(T_)&&T_;o.global!==o&&o.window!==o&&o.self!==o||(e=o);var s,a,u=2147483647,c=36,f=/^xn--/,h=/[^\x20-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,v={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,p=String.fromCharCode;function y(t){throw RangeError(v[t])}function m(t,n){for(var e=t.length,r=[];e--;)r[e]=n(t[e]);return r}function b(t,n){var e=t.split("@"),r="";return e.length>1&&(r=e[0]+"@",t=e[1]),r+m((t=t.replace(l,".")).split("."),n).join(".")}function g(t){for(var n,e,r=[],i=0,o=t.length;i=55296&&n<=56319&&i65535&&(n+=p((t-=65536)>>>10&1023|55296),t=56320|1023&t),n+=p(t)})).join("")}function x(t,n){return t+22+75*(t<26)-((0!=n)<<5)}function k(t,n,e){var r=0;for(t=e?d(t/700):t>>1,t+=d(t/n);t>455;r+=c)t=d(t/35);return d(r+36*t/(t+38))}function _(t){var n,e,r,i,o,s,a,f,h,l,v,p=[],m=t.length,b=0,g=128,x=72;for((e=t.lastIndexOf("-"))<0&&(e=0),r=0;r=128&&y("not-basic"),p.push(t.charCodeAt(r));for(i=e>0?e+1:0;i=m&&y("invalid-input"),((f=(v=t.charCodeAt(i++))-48<10?v-22:v-65<26?v-65:v-97<26?v-97:c)>=c||f>d((u-b)/s))&&y("overflow"),b+=f*s,!(f<(h=a<=x?1:a>=x+26?26:a-x));a+=c)s>d(u/(l=c-h))&&y("overflow"),s*=l;x=k(b-o,n=p.length+1,0==o),d(b/n)>u-g&&y("overflow"),g+=d(b/n),b%=n,p.splice(b++,0,g)}return w(p)}function S(t){var n,e,r,i,o,s,a,f,h,l,v,m,b,w,_,S=[];for(m=(t=g(t)).length,n=128,e=0,o=72,s=0;s=n&&vd((u-e)/(b=r+1))&&y("overflow"),e+=(a-n)*b,n=a,s=0;su&&y("overflow"),v==n){for(f=e,h=c;!(f<(l=h<=o?1:h>=o+26?26:h-o));h+=c)_=f-l,w=c-l,S.push(p(x(l+_%w,0))),f=d(_/w);S.push(p(x(f,0))),o=k(e,b,r==i),e=0,++r}++e,++n}return S.join("")}if(s={version:"1.3.2",ucs2:{decode:g,encode:w},decode:_,encode:S,toASCII:function(t){return b(t,(function(t){return h.test(t)?"xn--"+S(t):t}))},toUnicode:function(t){return b(t,(function(t){return f.test(t)?_(t.slice(4).toLowerCase()):t}))}},r&&i)if(t.exports==r)i.exports=s;else for(a in s)s.hasOwnProperty(a)&&(r[a]=s[a]);else e.punycode=s}(T_)})),A_=function(t){return"string"==typeof t},C_=function(t){return"object"===M_(t)&&null!==t},R_=function(t){return null===t},I_=function(t){return null==t};function P_(t,n){return Object.prototype.hasOwnProperty.call(t,n)}var D_=function(t,n,e,r){n=n||"&",e=e||"=";var i={};if("string"!=typeof t||0===t.length)return i;var o=/\+/g;t=t.split(n);var s=1e3;r&&"number"==typeof r.maxKeys&&(s=r.maxKeys);var a=t.length;s>0&&a>s&&(a=s);for(var u=0;u=0?(c=v.substr(0,d),f=v.substr(d+1)):(c=v,f=""),h=decodeURIComponent(c),l=decodeURIComponent(f),P_(i,h)?Array.isArray(i[h])?i[h].push(l):i[h]=[i[h],l]:i[h]=l}return i},N_=function(t){switch(M_(t)){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}},z_=function(t,n,e,r){return n=n||"&",e=e||"=",null===t&&(t=void 0),"object"===M_(t)?Object.keys(t).map((function(r){var i=encodeURIComponent(N_(r))+e;return Array.isArray(t[r])?t[r].map((function(t){return i+encodeURIComponent(N_(t))})).join(n):i+encodeURIComponent(N_(t[r]))})).join(n):r?encodeURIComponent(N_(r))+e+encodeURIComponent(N_(t)):""},L_=O_((function(t,n){n.decode=n.parse=D_,n.encode=n.stringify=z_}));function F_(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var G_=/^([a-z0-9.+-]+:)/i,U_=/:[0-9]*$/,B_=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,q_=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),$_=["'"].concat(q_),V_=["%","/","?",";","#"].concat($_),Z_=["/","?","#"],W_=/^[+a-z0-9A-Z_-]{0,63}$/,H_=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,K_={javascript:!0,"javascript:":!0},X_={javascript:!0,"javascript:":!0},Y_={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function J_(t,n,e){if(t&&C_(t)&&t instanceof F_)return t;var r=new F_;return r.parse(t,n,e),r}F_.prototype.parse=function(t,n,e){if(!A_(t))throw new TypeError("Parameter 'url' must be a string, not "+M_(t));var r=t.indexOf("?"),i=-1!==r&&r127?w+="x":w+=g[x];if(!w.match(W_)){var _=m.slice(0,d),S=m.slice(d+1),M=g.match(H_);M&&(_.push(M[1]),S.unshift(M[2])),S.length&&(s="/"+S.join(".")+s),this.hostname=_.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),y||(this.hostname=E_.toASCII(this.hostname));var j=this.port?":"+this.port:"",T=this.hostname||"";this.host=T+j,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!K_[c])for(d=0,b=$_.length;d0)&&e.host.split("@"))&&(e.auth=M.shift(),e.host=e.hostname=M.shift());return e.search=t.search,e.query=t.query,R_(e.pathname)&&R_(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.href=e.format(),e}if(!g.length)return e.pathname=null,e.search?e.path="/"+e.search:e.path=null,e.href=e.format(),e;for(var x=g.slice(-1)[0],k=(e.host||t.host||g.length>1)&&("."===x||".."===x)||""===x,_=0,S=g.length;S>=0;S--)"."===(x=g[S])?g.splice(S,1):".."===x?(g.splice(S,1),_++):_&&(g.splice(S,1),_--);if(!m&&!b)for(;_--;_)g.unshift("..");!m||""===g[0]||g[0]&&"/"===g[0].charAt(0)||g.unshift(""),k&&"/"!==g.join("/").substr(-1)&&g.push("");var M,j=""===g[0]||g[0]&&"/"===g[0].charAt(0);w&&(e.hostname=e.host=j?"":g.length?g.shift():"",(M=!!(e.host&&e.host.indexOf("@")>0)&&e.host.split("@"))&&(e.auth=M.shift(),e.host=e.hostname=M.shift()));return(m=m||e.host&&g.length)&&!j&&g.unshift(""),g.length?e.pathname=g.join("/"):(e.pathname=null,e.path=null),R_(e.pathname)&&R_(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.auth=t.auth||e.auth,e.slashes=e.slashes||t.slashes,e.href=e.format(),e},F_.prototype.parseHost=function(){var t=this.host,n=U_.exec(t);n&&(":"!==(n=n[0])&&(this.port=n.substr(1)),t=t.substr(0,t.length-n.length)),t&&(this.hostname=t)};function Q_(t){for(var n=arguments.length,e=new Array(n>1?n-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:[];p_(this,t),this.parent=n,this.bindings={};var r,i=k_(e);try{for(i.s();!(r=i.n()).done;){var o=f_(r.value,2),s=o[0],a=o[1];this.bindings[s]=a}}catch(t){i.e(t)}finally{i.f()}}return d_(t,[{key:"concat",value:function(n){return new t(this,n)}},{key:"get",value:function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error("".concat(t," not found in scope."))}},{key:"has",value:function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}]),t}(),eS={kind:"null"},rS={kind:"number"},iS={kind:"string"},oS={kind:"boolean"},sS={kind:"color"},aS={kind:"object"},uS={kind:"value"},cS={kind:"collator"},fS={kind:"formatted"},hS={kind:"resolvedImage"};function lS(t,n){return{kind:"array",itemType:t,N:n}}function vS(t){if("array"===t.kind){var n=vS(t.itemType);return"number"==typeof t.N?"array<".concat(n,", ").concat(t.N,">"):"value"===t.itemType.kind?"array":"array<".concat(n,">")}return t.kind}var dS=[eS,rS,iS,oS,sS,fS,aS,lS(uS),hS];function pS(t,n){if("error"===n.kind)return null;if("array"===t.kind){if("array"===n.kind&&(0===n.N&&"value"===n.itemType.kind||!pS(t.itemType,n.itemType))&&("number"!=typeof t.N||t.N===n.N))return null}else{if(t.kind===n.kind)return null;if("value"===t.kind){var e,r=k_(dS);try{for(r.s();!(e=r.n()).done;){if(!pS(e.value,n))return null}}catch(t){r.e(t)}finally{r.f()}}}return"Expected ".concat(vS(t)," but found ").concat(vS(n)," instead.")}function yS(t,n){return n.some((function(n){return n.kind===t.kind}))}function mS(t,n){return n.some((function(n){return"null"===n?null===t:"array"===n?Array.isArray(t):"object"===n?t&&!Array.isArray(t)&&"object"===M_(t):n===M_(t)}))}var bS=O_((function(t,n){var e={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function r(t){return(t=Math.round(t))<0?0:t>255?255:t}function i(t){return t<0?0:t>1?1:t}function o(t){return"%"===t[t.length-1]?r(parseFloat(t)/100*255):r(parseInt(t))}function s(t){return"%"===t[t.length-1]?i(parseFloat(t)/100):i(parseFloat(t))}function a(t,n,e){return e<0?e+=1:e>1&&(e-=1),6*e<1?t+(n-t)*e*6:2*e<1?n:3*e<2?t+(n-t)*(2/3-e)*6:t}try{n.parseCSSColor=function(t){var n,i=t.replace(/ /g,"").toLowerCase();if(i in e)return e[i].slice();if("#"===i[0])return 4===i.length?(n=parseInt(i.substr(1),16))>=0&&n<=4095?[(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1]:null:7===i.length&&(n=parseInt(i.substr(1),16))>=0&&n<=16777215?[(16711680&n)>>16,(65280&n)>>8,255&n,1]:null;var u=i.indexOf("("),c=i.indexOf(")");if(-1!==u&&c+1===i.length){var f=i.substr(0,u),h=i.substr(u+1,c-(u+1)).split(","),l=1;switch(f){case"rgba":if(4!==h.length)return null;l=s(h.pop());case"rgb":return 3!==h.length?null:[o(h[0]),o(h[1]),o(h[2]),l];case"hsla":if(4!==h.length)return null;l=s(h.pop());case"hsl":if(3!==h.length)return null;var v=(parseFloat(h[0])%360+360)%360/360,d=s(h[1]),p=s(h[2]),y=p<=.5?p*(d+1):p+d-p*d,m=2*p-y;return[r(255*a(m,y,v+1/3)),r(255*a(m,y,v)),r(255*a(m,y,v-1/3)),l];default:return null}}return null}}catch(t){}})),gS=function(){function t(n,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;p_(this,t),this.r=n,this.g=e,this.b=r,this.a=i}return d_(t,[{key:"toString",value:function(){var t=f_(this.toArray(),4),n=t[0],e=t[1],r=t[2],i=t[3];return"rgba(".concat(Math.round(n),",").concat(Math.round(e),",").concat(Math.round(r),",").concat(i,")")}},{key:"toArray",value:function(){var t=this.r,n=this.g,e=this.b,r=this.a;return 0===r?[0,0,0,0]:[255*t/r,255*n/r,255*e/r,r]}}],[{key:"parse",value:function(n){if(n){if(n instanceof t)return n;if("string"==typeof n){var e=bS.parseCSSColor(n);if(e)return new t(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}}}]),t}();gS.black=new gS(0,0,0,1),gS.white=new gS(1,1,1,1),gS.transparent=new gS(0,0,0,0),gS.red=new gS(1,0,0,1),gS.blue=new gS(0,0,1,1);var wS=function(){function t(n,e,r){p_(this,t),this.sensitivity=n?e?"variant":"case":e?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}return d_(t,[{key:"compare",value:function(t,n){return this.collator.compare(t,n)}},{key:"resolvedLocale",value:function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}]),t}(),xS=function t(n,e,r,i,o){p_(this,t),this.text=n,this.image=e,this.scale=r,this.fontStack=i,this.textColor=o},kS=function(){function t(n){p_(this,t),this.sections=n}return d_(t,[{key:"isEmpty",value:function(){return 0===this.sections.length||!this.sections.some((function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length}))}},{key:"toString",value:function(){return 0===this.sections.length?"":this.sections.map((function(t){return t.text})).join("")}},{key:"serialize",value:function(){var t,n=["format"],e=k_(this.sections);try{for(e.s();!(t=e.n()).done;){var r=t.value;if(r.image)n.push(["image",r.image.name]);else{n.push(r.text);var i={};r.fontStack&&(i["text-font"]=["literal",r.fontStack.split(",")]),r.scale&&(i["font-scale"]=r.scale),r.textColor&&(i["text-color"]=["rgba"].concat(r.textColor.toArray())),n.push(i)}}}catch(t){e.e(t)}finally{e.f()}return n}}],[{key:"fromString",value:function(n){return new t([new xS(n,null,null,null,null)])}},{key:"factory",value:function(n){return n instanceof t?n:t.fromString(n)}}]),t}(),_S=function(){function t(n){p_(this,t),this.name=n.name,this.available=n.available}return d_(t,[{key:"toString",value:function(){return this.name}},{key:"serialize",value:function(){return["image",this.name]}}],[{key:"fromString",value:function(n){return n?new t({name:n,available:!1}):null}}]),t}();function SS(t,n,e,r){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof n&&n>=0&&n<=255&&"number"==typeof e&&e>=0&&e<=255?void 0===r||"number"==typeof r&&r>=0&&r<=1?null:"Invalid rgba value [".concat([t,n,e,r].join(", "),"]: 'a' must be between 0 and 1."):"Invalid rgba value [".concat(("number"==typeof r?[t,n,e,r]:[t,n,e]).join(", "),"]: 'r', 'g', and 'b' must be between 0 and 255.")}function MS(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof gS)return!0;if(t instanceof wS)return!0;if(t instanceof kS)return!0;if(t instanceof _S)return!0;if(Array.isArray(t)){var n,e=k_(t);try{for(e.s();!(n=e.n()).done;){if(!MS(n.value))return!1}}catch(t){e.e(t)}finally{e.f()}return!0}if("object"===M_(t)){for(var r in t)if(!MS(t[r]))return!1;return!0}return!1}function jS(t){if(null===t)return eS;if("string"==typeof t)return iS;if("boolean"==typeof t)return oS;if("number"==typeof t)return rS;if(t instanceof gS)return sS;if(t instanceof wS)return cS;if(t instanceof kS)return fS;if(t instanceof _S)return hS;if(Array.isArray(t)){var n,e,r=t.length,i=k_(t);try{for(i.s();!(e=i.n()).done;){var o=jS(e.value);if(n){if(n===o)continue;n=uS;break}n=o}}catch(t){i.e(t)}finally{i.f()}return lS(n||uS,r)}return aS}function TS(t){var n=M_(t);return null===t?"":"string"===n||"number"===n||"boolean"===n?String(t):t instanceof gS||t instanceof kS||t instanceof _S?t.toString():JSON.stringify(t)}var OS=function(){function t(n,e){p_(this,t),this.type=n,this.value=e}return d_(t,[{key:"evaluate",value:function(){return this.value}},{key:"eachChild",value:function(){}},{key:"outputDefined",value:function(){return!0}},{key:"serialize",value:function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof gS?["rgba"].concat(this.value.toArray()):this.value instanceof kS?this.value.serialize():this.value}}],[{key:"parse",value:function(n,e){if(2!==n.length)return e.error("'literal' expression requires exactly one argument, but found ".concat(n.length-1," instead."));if(!MS(n[1]))return e.error("invalid value");var r=n[1],i=jS(r),o=e.expectedType;return"array"!==i.kind||0!==i.N||!o||"array"!==o.kind||"number"==typeof o.N&&0!==o.N||(i=o),new t(i,r)}}]),t}(),ES=function(){function t(n){p_(this,t),this.name="ExpressionEvaluationError",this.message=n}return d_(t,[{key:"toJSON",value:function(){return this.message}}]),t}(),AS={string:iS,number:rS,boolean:oS,object:aS},CS=function(){function t(n,e){p_(this,t),this.type=n,this.args=e}return d_(t,[{key:"evaluate",value:function(t){for(var n=0;n1)&&n.push(r)}}return n.concat(this.args.map((function(t){return t.serialize()})))}}],[{key:"parse",value:function(n,e){if(n.length<2)return e.error("Expected at least one argument.");var r,i=1,o=n[0];if("array"===o){var s,a;if(n.length>2){var u=n[1];if("string"!=typeof u||!(u in AS)||"object"===u)return e.error('The item type argument of "array" must be one of string, number, boolean',1);s=AS[u],i++}else s=uS;if(n.length>3){if(null!==n[2]&&("number"!=typeof n[2]||n[2]<0||n[2]!==Math.floor(n[2])))return e.error('The length argument to "array" must be a positive integer literal',2);a=n[2],i++}r=lS(s,a)}else r=AS[o];for(var c=[];i-1),e}},{key:"eachChild",value:function(t){t(this.input)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){return["image",this.input.serialize()]}}],[{key:"parse",value:function(n,e){if(2!==n.length)return e.error("Expected two arguments.");var r=e.parse(n[1],1,iS);return r?new t(r):e.error("No image name provided.")}}]),t}(),PS={"to-boolean":oS,"to-color":sS,"to-number":rS,"to-string":iS},DS=function(){function t(n,e){p_(this,t),this.type=n,this.args=e}return d_(t,[{key:"evaluate",value:function(t){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(t));if("color"===this.type.kind){var n,e,r,i=k_(this.args);try{for(i.s();!(r=i.n()).done;){if(n=r.value.evaluate(t),e=null,n instanceof gS)return n;if("string"==typeof n){var o=t.parseColor(n);if(o)return o}else if(Array.isArray(n)&&!(e=n.length<3||n.length>4?"Invalid rbga value ".concat(JSON.stringify(n),": expected an array containing either three or four numeric values."):SS(n[0],n[1],n[2],n[3])))return new gS(n[0]/255,n[1]/255,n[2]/255,n[3])}}catch(t){i.e(t)}finally{i.f()}throw new ES(e||"Could not parse color from value '".concat("string"==typeof n?n:String(JSON.stringify(n)),"'"))}if("number"===this.type.kind){var s,a=null,u=k_(this.args);try{for(u.s();!(s=u.n()).done;){if(null===(a=s.value.evaluate(t)))return 0;var c=Number(a);if(!isNaN(c))return c}}catch(t){u.e(t)}finally{u.f()}throw new ES("Could not convert ".concat(JSON.stringify(a)," to number."))}return"formatted"===this.type.kind?kS.fromString(TS(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?_S.fromString(TS(this.args[0].evaluate(t))):TS(this.args[0].evaluate(t))}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"outputDefined",value:function(){return this.args.every((function(t){return t.outputDefined()}))}},{key:"serialize",value:function(){if("formatted"===this.type.kind)return new RS([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new IS(this.args[0]).serialize();var t=["to-".concat(this.type.kind)];return this.eachChild((function(n){t.push(n.serialize())})),t}}],[{key:"parse",value:function(n,e){if(n.length<2)return e.error("Expected at least one argument.");var r=n[0];if(("to-boolean"===r||"to-string"===r)&&2!==n.length)return e.error("Expected one argument.");for(var i=PS[r],o=[],s=1;s=n[2])&&(!(t[1]<=n[1])&&!(t[3]>=n[3])))}function qS(t,n){var e,r=(180+t[0])/360,i=(e=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360),o=Math.pow(2,n.z);return[Math.round(r*o*GS),Math.round(i*o*GS)]}function $S(t,n,e){var r=t[0]-n[0],i=t[1]-n[1],o=t[0]-e[0],s=t[1]-e[1];return r*s-o*i==0&&r*o<=0&&i*s<=0}function VS(t,n,e){return n[1]>t[1]!=e[1]>t[1]&&t[0]<(e[0]-n[0])*(t[1]-n[1])/(e[1]-n[1])+n[0]}function ZS(t,n){for(var e=!1,r=0,i=n.length;r0&&h<0||f<0&&h>0}function KS(t,n,e){var r,i,o,s,a,u,c,f,h,l=k_(e);try{for(l.s();!(r=l.n()).done;)for(var v=r.value,d=0;de[2]){var i=.5*r,o=t[0]-e[0]>i?-r:e[0]-t[0]>i?r:0;0===o&&(o=t[0]-e[2]>i?-r:e[2]-t[0]>i?r:0),t[0]+=o}US(n,t)}function nM(t,n,e,r){var i,o=Math.pow(2,r.z)*GS,s=[r.x*GS,r.y*GS],a=[],u=k_(t);try{for(u.s();!(i=u.n()).done;){var c,f=k_(i.value);try{for(f.s();!(c=f.n()).done;){var h=c.value,l=[h.x+s[0],h.y+s[1]];tM(l,n,e,o),a.push(l)}}catch(t){f.e(t)}finally{f.f()}}}catch(t){u.e(t)}finally{u.f()}return a}function eM(t,n,e,r){var i,o=Math.pow(2,r.z)*GS,s=[r.x*GS,r.y*GS],a=[],u=k_(t);try{for(u.s();!(i=u.n()).done;){var c,f=i.value,h=[],l=k_(f);try{for(l.s();!(c=l.n()).done;){var v=c.value,d=[v.x+s[0],v.y+s[1]];US(n,d),h.push(d)}}catch(t){l.e(t)}finally{l.f()}a.push(h)}}catch(t){u.e(t)}finally{u.f()}if(n[2]-n[0]<=o/2){!function(t){t[0]=t[1]=1/0,t[2]=t[3]=-1/0}(n);var p,y=k_(a);try{for(y.s();!(p=y.n()).done;){var m,b=k_(p.value);try{for(b.s();!(m=b.n()).done;){tM(m.value,n,e,o)}}catch(t){b.e(t)}finally{b.f()}}}catch(t){y.e(t)}finally{y.f()}}return a}var rM=function(){function t(n,e){p_(this,t),this.type=oS,this.geojson=n,this.geometries=e}return d_(t,[{key:"evaluate",value:function(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return function(t,n){var e=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if("Polygon"===n.type){var o=JS(n.coordinates,r,i),s=nM(t.geometry(),e,r,i);if(!BS(e,r))return!1;var a,u=k_(s);try{for(u.s();!(a=u.n()).done;)if(!ZS(a.value,o))return!1}catch(t){u.e(t)}finally{u.f()}}if("MultiPolygon"===n.type){var c=QS(n.coordinates,r,i),f=nM(t.geometry(),e,r,i);if(!BS(e,r))return!1;var h,l=k_(f);try{for(l.s();!(h=l.n()).done;)if(!WS(h.value,c))return!1}catch(t){l.e(t)}finally{l.f()}}return!0}(t,this.geometries);if("LineString"===t.geometryType())return function(t,n){var e=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],i=t.canonicalID();if("Polygon"===n.type){var o=JS(n.coordinates,r,i),s=eM(t.geometry(),e,r,i);if(!BS(e,r))return!1;var a,u=k_(s);try{for(u.s();!(a=u.n()).done;)if(!XS(a.value,o))return!1}catch(t){u.e(t)}finally{u.f()}}if("MultiPolygon"===n.type){var c=QS(n.coordinates,r,i),f=eM(t.geometry(),e,r,i);if(!BS(e,r))return!1;var h,l=k_(f);try{for(l.s();!(h=l.n()).done;)if(!YS(h.value,c))return!1}catch(t){l.e(t)}finally{l.f()}}return!0}(t,this.geometries)}return!1}},{key:"eachChild",value:function(){}},{key:"outputDefined",value:function(){return!0}},{key:"serialize",value:function(){return["within",this.geojson]}}],[{key:"parse",value:function(n,e){if(2!==n.length)return e.error("'within' expression requires exactly one argument, but found ".concat(n.length-1," instead."));if(MS(n[1])){var r=n[1];if("FeatureCollection"===r.type)for(var i=0;i=0)return!1;var e=!0;return t.eachChild((function(t){e&&!sM(t,n)&&(e=!1)})),e}var aM=function(){function t(n,e){p_(this,t),this.type=e.type,this.name=n,this.boundExpression=e}return d_(t,[{key:"evaluate",value:function(t){return this.boundExpression.evaluate(t)}},{key:"eachChild",value:function(){}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){return["var",this.name]}}],[{key:"parse",value:function(n,e){if(2!==n.length||"string"!=typeof n[1])return e.error("'var' expression requires exactly one string literal argument.");var r=n[1];return e.scope.has(r)?new t(r,e.scope.get(r)):e.error('Unknown variable "'.concat(r,'". Make sure "').concat(r,'" has been bound in an enclosing "let" expression before using it.'),1)}}]),t}(),uM=function(){function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new nS,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];p_(this,t),this.registry=n,this.path=e,this.key=e.map((function(t){return"[".concat(t,"]")})).join(""),this.scope=i,this.errors=o,this.expectedType=r}return d_(t,[{key:"parse",value:function(t,n,e,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return n?this.concat(n,e,r)._parse(t,i):this._parse(t,i)}},{key:"_parse",value:function(t,n){function e(t,n,e){return"assert"===e?new CS(n,[t]):"coerce"===e?new DS(n,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var r=t[0];if("string"!=typeof r)return this.error("Expression name must be a string, but found ".concat(M_(r),' instead. If you wanted a literal array, use ["literal", [...]].'),0),null;var i=this.registry[r];if(i){var o=i.parse(t,this);if(!o)return null;if(this.expectedType){var s=this.expectedType,a=o.type;if("string"!==s.kind&&"number"!==s.kind&&"boolean"!==s.kind&&"object"!==s.kind&&"array"!==s.kind||"value"!==a.kind)if("color"!==s.kind&&"formatted"!==s.kind&&"resolvedImage"!==s.kind||"value"!==a.kind&&"string"!==a.kind){if(this.checkSubtype(s,a))return null}else o=e(o,s,n.typeAnnotation||"coerce");else o=e(o,s,n.typeAnnotation||"assert")}if(!(o instanceof OS)&&"resolvedImage"!==o.type.kind&&cM(o)){var u=new zS;try{o=new OS(o.type,o.evaluate(u))}catch(t){return this.error(t.message),null}}return o}return this.error('Unknown expression "'.concat(r,'". If you wanted a literal array, use ["literal", [...]].'),0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"===M_(t)?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found ".concat(M_(t)," instead."))}},{key:"concat",value:function(n,e,r){var i="number"==typeof n?this.path.concat(n):this.path,o=r?this.scope.concat(r):this.scope;return new t(this.registry,i,e||null,o,this.errors)}},{key:"error",value:function(t){for(var n=arguments.length,e=new Array(n>1?n-1:0),r=1;rn))throw new ES("Input is not a number.");s=a-1}return 0}var hM=function(){function t(n,e,r){p_(this,t),this.type=n,this.input=e,this.labels=[],this.outputs=[];var i,o=k_(r);try{for(o.s();!(i=o.n()).done;){var s=f_(i.value,2),a=s[0],u=s[1];this.labels.push(a),this.outputs.push(u)}}catch(t){o.e(t)}finally{o.f()}}return d_(t,[{key:"evaluate",value:function(t){var n=this.labels,e=this.outputs;if(1===n.length)return e[0].evaluate(t);var r=this.input.evaluate(t);if(r<=n[0])return e[0].evaluate(t);var i=n.length;return r>=n[i-1]?e[i-1].evaluate(t):e[fM(n,r)].evaluate(t)}},{key:"eachChild",value:function(t){t(this.input);var n,e=k_(this.outputs);try{for(e.s();!(n=e.n()).done;){t(n.value)}}catch(t){e.e(t)}finally{e.f()}}},{key:"outputDefined",value:function(){return this.outputs.every((function(t){return t.outputDefined()}))}},{key:"serialize",value:function(){for(var t=["step",this.input.serialize()],n=0;n0&&t.push(this.labels[n]),t.push(this.outputs[n].serialize());return t}}],[{key:"parse",value:function(n,e){if(n.length-1<4)return e.error("Expected at least 4 arguments, but found only ".concat(n.length-1,"."));if((n.length-1)%2!=0)return e.error("Expected an even number of arguments.");var r=e.parse(n[1],1,rS);if(!r)return null;var i=[],o=null;e.expectedType&&"value"!==e.expectedType.kind&&(o=e.expectedType);for(var s=1;s=a)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',c);var h=e.parse(u,f,o);if(!h)return null;o=o||h.type,i.push([a,h])}return new t(o,r,i)}}]),t}(),lM=vM;function vM(t,n,e,r){this.cx=3*t,this.bx=3*(e-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*n,this.by=3*(r-n)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=e,this.p2y=r}function dM(t,n,e){return t*(1-e)+n*e}vM.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},vM.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},vM.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},vM.prototype.solveCurveX=function(t,n){var e,r,i,o,s;for(void 0===n&&(n=1e-6),i=t,s=0;s<8;s++){if(o=this.sampleCurveX(i)-t,Math.abs(o)(r=1))return r;for(;eo?e=i:r=i,i=.5*(r-e)+e}return i},vM.prototype.solve=function(t,n){return this.sampleCurveY(this.solveCurveX(t,n))};var pM=Object.freeze({__proto__:null,number:dM,color:function(t,n,e){return new gS(dM(t.r,n.r,e),dM(t.g,n.g,e),dM(t.b,n.b,e),dM(t.a,n.a,e))},array:function(t,n,e){return t.map((function(t,r){return dM(t,n[r],e)}))}}),yM=.95047,mM=1.08883,bM=4/29,gM=6/29,wM=3*gM*gM,xM=Math.PI/180,kM=180/Math.PI;function _M(t){return t>.008856451679035631?Math.pow(t,1/3):t/wM+bM}function SM(t){return t>gM?t*t*t:wM*(t-bM)}function MM(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function jM(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function TM(t){var n=jM(t.r),e=jM(t.g),r=jM(t.b),i=_M((.4124564*n+.3575761*e+.1804375*r)/yM),o=_M((.2126729*n+.7151522*e+.072175*r)/1);return{l:116*o-16,a:500*(i-o),b:200*(o-_M((.0193339*n+.119192*e+.9503041*r)/mM)),alpha:t.a}}function OM(t){var n=(t.l+16)/116,e=isNaN(t.a)?n:n+t.a/500,r=isNaN(t.b)?n:n-t.b/200;return n=1*SM(n),e=yM*SM(e),r=mM*SM(r),new gS(MM(3.2404542*e-1.5371385*n-.4985314*r),MM(-.969266*e+1.8760108*n+.041556*r),MM(.0556434*e-.2040259*n+1.0572252*r),t.alpha)}function EM(t,n,e){var r=n-t;return t+e*(r>180||r<-180?r-360*Math.round(r/360):r)}var AM={forward:TM,reverse:OM,interpolate:function(t,n,e){return{l:dM(t.l,n.l,e),a:dM(t.a,n.a,e),b:dM(t.b,n.b,e),alpha:dM(t.alpha,n.alpha,e)}}},CM={forward:function(t){var n=TM(t),e=n.l,r=n.a,i=n.b,o=Math.atan2(i,r)*kM;return{h:o<0?o+360:o,c:Math.sqrt(r*r+i*i),l:e,alpha:t.a}},reverse:function(t){var n=t.h*xM,e=t.c;return OM({l:t.l,a:Math.cos(n)*e,b:Math.sin(n)*e,alpha:t.alpha})},interpolate:function(t,n,e){return{h:EM(t.h,n.h,e),c:dM(t.c,n.c,e),l:dM(t.l,n.l,e),alpha:dM(t.alpha,n.alpha,e)}}},RM=function(){function t(n,e,r,i,o){p_(this,t),this.type=n,this.operator=e,this.interpolation=r,this.input=i,this.labels=[],this.outputs=[];var s,a=k_(o);try{for(a.s();!(s=a.n()).done;){var u=f_(s.value,2),c=u[0],f=u[1];this.labels.push(c),this.outputs.push(f)}}catch(t){a.e(t)}finally{a.f()}}return d_(t,[{key:"evaluate",value:function(n){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(n);var i=this.input.evaluate(n);if(i<=e[0])return r[0].evaluate(n);var o=e.length;if(i>=e[o-1])return r[o-1].evaluate(n);var s=fM(e,i),a=e[s],u=e[s+1],c=t.interpolationFactor(this.interpolation,i,a,u),f=r[s].evaluate(n),h=r[s+1].evaluate(n);return"interpolate"===this.operator?pM[this.type.kind.toLowerCase()](f,h,c):"interpolate-hcl"===this.operator?CM.reverse(CM.interpolate(CM.forward(f),CM.forward(h),c)):AM.reverse(AM.interpolate(AM.forward(f),AM.forward(h),c))}},{key:"eachChild",value:function(t){t(this.input);var n,e=k_(this.outputs);try{for(e.s();!(n=e.n()).done;){t(n.value)}}catch(t){e.e(t)}finally{e.f()}}},{key:"outputDefined",value:function(){return this.outputs.every((function(t){return t.outputDefined()}))}},{key:"serialize",value:function(){var t;t="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var n=[this.operator,t,this.input.serialize()],e=0;e1})))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);s={name:"cubic-bezier",controlPoints:f}}if(n.length-1<4)return e.error("Expected at least 4 arguments, but found only ".concat(n.length-1,"."));if((n.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(a=e.parse(a,2,rS)))return null;var h=[],l=null;"interpolate-hcl"===o||"interpolate-lab"===o?l=sS:e.expectedType&&"value"!==e.expectedType.kind&&(l=e.expectedType);for(var v=0;v=d)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',y);var b=e.parse(p,m,l);if(!b)return null;l=l||b.type,h.push([d,b])}return"number"===l.kind||"color"===l.kind||"array"===l.kind&&"number"===l.itemType.kind&&"number"==typeof l.N?new t(l,o,s,a,h):e.error("Type ".concat(vS(l)," is not interpolatable."))}}]),t}();function IM(t,n,e,r){var i=r-e,o=t-e;return 0===i?0:1===n?o/i:(Math.pow(n,o)-1)/(Math.pow(n,i)-1)}var PM=function(){function t(n,e){p_(this,t),this.type=n,this.args=e}return d_(t,[{key:"evaluate",value:function(t){var n,e,r=null,i=0,o=k_(this.args);try{for(o.s();!(e=o.n()).done;){var s=e.value;if(i++,(r=s.evaluate(t))&&r instanceof _S&&!r.available&&(n||(n=r.name),r=null,i===this.args.length&&(r=n)),null!==r)break}}catch(t){o.e(t)}finally{o.f()}return r}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"outputDefined",value:function(){return this.args.every((function(t){return t.outputDefined()}))}},{key:"serialize",value:function(){var t=["coalesce"];return this.eachChild((function(n){t.push(n.serialize())})),t}}],[{key:"parse",value:function(n,e){if(n.length<2)return e.error("Expectected at least one argument.");var r=null,i=e.expectedType;i&&"value"!==i.kind&&(r=i);var o,s=[],a=k_(n.slice(1));try{for(a.s();!(o=a.n()).done;){var u=o.value,c=e.parse(u,1+s.length,r,void 0,{typeAnnotation:"omit"});if(!c)return null;r=r||c.type,s.push(c)}}catch(t){a.e(t)}finally{a.f()}return new t(i&&s.some((function(t){return pS(i,t.type)}))?uS:r,s)}}]),t}(),DM=function(){function t(n,e){p_(this,t),this.type=e.type,this.bindings=[].concat(n),this.result=e}return d_(t,[{key:"evaluate",value:function(t){return this.result.evaluate(t)}},{key:"eachChild",value:function(t){var n,e=k_(this.bindings);try{for(e.s();!(n=e.n()).done;){t(n.value[1])}}catch(t){e.e(t)}finally{e.f()}t(this.result)}},{key:"outputDefined",value:function(){return this.result.outputDefined()}},{key:"serialize",value:function(){var t,n=["let"],e=k_(this.bindings);try{for(e.s();!(t=e.n()).done;){var r=f_(t.value,2),i=r[0],o=r[1];n.push(i,o.serialize())}}catch(t){e.e(t)}finally{e.f()}return n.push(this.result.serialize()),n}}],[{key:"parse",value:function(n,e){if(n.length<4)return e.error("Expected at least 3 arguments, but found ".concat(n.length-1," instead."));for(var r=[],i=1;i=e.length)throw new ES("Array index out of bounds: ".concat(n," > ").concat(e.length-1,"."));if(n!==Math.floor(n))throw new ES("Array index must be an integer, but found ".concat(n," instead."));return e[n]}},{key:"eachChild",value:function(t){t(this.index),t(this.input)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){return["at",this.index.serialize(),this.input.serialize()]}}],[{key:"parse",value:function(n,e){if(3!==n.length)return e.error("Expected 2 arguments, but found ".concat(n.length-1," instead."));var r=e.parse(n[1],1,rS),i=e.parse(n[2],2,lS(e.expectedType||uS));return r&&i?new t(i.type.itemType,r,i):null}}]),t}(),zM=function(){function t(n,e){p_(this,t),this.type=oS,this.needle=n,this.haystack=e}return d_(t,[{key:"evaluate",value:function(t){var n=this.needle.evaluate(t),e=this.haystack.evaluate(t);if(!e)return!1;if(!mS(n,["boolean","string","number","null"]))throw new ES("Expected first argument to be of type boolean, string, number or null, but found ".concat(vS(jS(n))," instead."));if(!mS(e,["string","array"]))throw new ES("Expected second argument to be of type array or string, but found ".concat(vS(jS(e))," instead."));return e.indexOf(n)>=0}},{key:"eachChild",value:function(t){t(this.needle),t(this.haystack)}},{key:"outputDefined",value:function(){return!0}},{key:"serialize",value:function(){return["in",this.needle.serialize(),this.haystack.serialize()]}}],[{key:"parse",value:function(n,e){if(3!==n.length)return e.error("Expected 2 arguments, but found ".concat(n.length-1," instead."));var r=e.parse(n[1],1,uS),i=e.parse(n[2],2,uS);return r&&i?yS(r.type,[oS,iS,rS,eS,uS])?new t(r,i):e.error("Expected first argument to be of type boolean, string, number or null, but found ".concat(vS(r.type)," instead")):null}}]),t}(),LM=function(){function t(n,e,r){p_(this,t),this.type=rS,this.needle=n,this.haystack=e,this.fromIndex=r}return d_(t,[{key:"evaluate",value:function(t){var n=this.needle.evaluate(t),e=this.haystack.evaluate(t);if(!mS(n,["boolean","string","number","null"]))throw new ES("Expected first argument to be of type boolean, string, number or null, but found ".concat(vS(jS(n))," instead."));if(!mS(e,["string","array"]))throw new ES("Expected second argument to be of type array or string, but found ".concat(vS(jS(e))," instead."));if(this.fromIndex){var r=this.fromIndex.evaluate(t);return e.indexOf(n,r)}return e.indexOf(n)}},{key:"eachChild",value:function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}],[{key:"parse",value:function(n,e){if(n.length<=2||n.length>=5)return e.error("Expected 3 or 4 arguments, but found ".concat(n.length-1," instead."));var r=e.parse(n[1],1,uS),i=e.parse(n[2],2,uS);if(!r||!i)return null;if(!yS(r.type,[oS,iS,rS,eS,uS]))return e.error("Expected first argument to be of type boolean, string, number or null, but found ".concat(vS(r.type)," instead"));if(4===n.length){var o=e.parse(n[3],3,rS);return o?new t(r,i,o):null}return new t(r,i)}}]),t}(),FM=function(){function t(n,e,r,i,o,s){p_(this,t),this.inputType=n,this.type=e,this.input=r,this.cases=i,this.outputs=o,this.otherwise=s}return d_(t,[{key:"evaluate",value:function(t){var n=this.input.evaluate(t);return(jS(n)===this.inputType&&this.outputs[this.cases[n]]||this.otherwise).evaluate(t)}},{key:"eachChild",value:function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}},{key:"outputDefined",value:function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()}},{key:"serialize",value:function(){var t,n=this,e=["match",this.input.serialize()],r=[],i={},o=k_(Object.keys(this.cases).sort());try{for(o.s();!(t=o.n()).done;){var s=t.value,a=i[this.cases[s]];void 0===a?(i[this.cases[s]]=r.length,r.push([this.cases[s],[s]])):r[a][1].push(s)}}catch(t){o.e(t)}finally{o.f()}for(var u=function(t){return"number"===n.inputType.kind?Number(t):t},c=0,f=r;cNumber.MAX_SAFE_INTEGER)return f.error("Branch labels must be integers no larger than ".concat(Number.MAX_SAFE_INTEGER,"."));if("number"==typeof v&&Math.floor(v)!==v)return f.error("Numeric branch labels must be integer values.");if(r){if(f.checkSubtype(r,jS(v)))return null}else r=jS(v);if(void 0!==o[String(v)])return f.error("Branch labels must be unique.");o[String(v)]=s.length}}catch(t){l.e(t)}finally{l.f()}var d=e.parse(c,a,i);if(!d)return null;i=i||d.type,s.push(d)}var p=e.parse(n[1],1,uS);if(!p)return null;var y=e.parse(n[n.length-1],n.length-1,i);return y?"value"!==p.type.kind&&e.concat(1).checkSubtype(r,p.type)?null:new t(r,i,p,o,s,y):null}}]),t}(),GM=function(){function t(n,e,r){p_(this,t),this.type=n,this.branches=e,this.otherwise=r}return d_(t,[{key:"evaluate",value:function(t){var n,e=k_(this.branches);try{for(e.s();!(n=e.n()).done;){var r=f_(n.value,2),i=r[0],o=r[1];if(i.evaluate(t))return o.evaluate(t)}}catch(t){e.e(t)}finally{e.f()}return this.otherwise.evaluate(t)}},{key:"eachChild",value:function(t){var n,e=k_(this.branches);try{for(e.s();!(n=e.n()).done;){var r=f_(n.value,2),i=r[0],o=r[1];t(i),t(o)}}catch(t){e.e(t)}finally{e.f()}t(this.otherwise)}},{key:"outputDefined",value:function(){return this.branches.every((function(t){var n=f_(t,2);n[0];return n[1].outputDefined()}))&&this.otherwise.outputDefined()}},{key:"serialize",value:function(){var t=["case"];return this.eachChild((function(n){t.push(n.serialize())})),t}}],[{key:"parse",value:function(n,e){if(n.length<4)return e.error("Expected at least 3 arguments, but found only ".concat(n.length-1,"."));if(n.length%2!=0)return e.error("Expected an odd number of arguments.");var r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(var i=[],o=1;o=5)return e.error("Expected 3 or 4 arguments, but found ".concat(n.length-1," instead."));var r=e.parse(n[1],1,uS),i=e.parse(n[2],2,rS);if(!r||!i)return null;if(!yS(r.type,[lS(uS),iS,uS]))return e.error("Expected first argument to be of type array or string, but found ".concat(vS(r.type)," instead"));if(4===n.length){var o=e.parse(n[3],3,rS);return o?new t(r.type,r,i,o):null}return new t(r.type,r,i)}}]),t}();function BM(t,n){return"=="===t||"!="===t?"boolean"===n.kind||"string"===n.kind||"number"===n.kind||"null"===n.kind||"value"===n.kind:"string"===n.kind||"number"===n.kind||"value"===n.kind}function qM(t,n,e,r){return 0===r.compare(n,e)}function $M(t,n,e){var r="=="!==t&&"!="!==t;return function(){function i(t,n,e){p_(this,i),this.type=oS,this.lhs=t,this.rhs=n,this.collator=e,this.hasUntypedArgument="value"===t.type.kind||"value"===n.type.kind}return d_(i,[{key:"evaluate",value:function(i){var o=this.lhs.evaluate(i),s=this.rhs.evaluate(i);if(r&&this.hasUntypedArgument){var a=jS(o),u=jS(s);if(a.kind!==u.kind||"string"!==a.kind&&"number"!==a.kind)throw new ES('Expected arguments for "'.concat(t,'" to be (string, string) or (number, number), but found (').concat(a.kind,", ").concat(u.kind,") instead."))}if(this.collator&&!r&&this.hasUntypedArgument){var c=jS(o),f=jS(s);if("string"!==c.kind||"string"!==f.kind)return n(i,o,s)}return this.collator?e(i,o,s,this.collator.evaluate(i)):n(i,o,s)}},{key:"eachChild",value:function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)}},{key:"outputDefined",value:function(){return!0}},{key:"serialize",value:function(){var n=[t];return this.eachChild((function(t){n.push(t.serialize())})),n}}],[{key:"parse",value:function(t,n){if(3!==t.length&&4!==t.length)return n.error("Expected two or three arguments.");var e=t[0],o=n.parse(t[1],1,uS);if(!o)return null;if(!BM(e,o.type))return n.concat(1).error('"'.concat(e,"\" comparisons are not supported for type '").concat(vS(o.type),"'."));var s=n.parse(t[2],2,uS);if(!s)return null;if(!BM(e,s.type))return n.concat(2).error('"'.concat(e,"\" comparisons are not supported for type '").concat(vS(s.type),"'."));if(o.type.kind!==s.type.kind&&"value"!==o.type.kind&&"value"!==s.type.kind)return n.error("Cannot compare types '".concat(vS(o.type),"' and '").concat(vS(s.type),"'."));r&&("value"===o.type.kind&&"value"!==s.type.kind?o=new CS(s.type,[o]):"value"!==o.type.kind&&"value"===s.type.kind&&(s=new CS(o.type,[s])));var a=null;if(4===t.length){if("string"!==o.type.kind&&"string"!==s.type.kind&&"value"!==o.type.kind&&"value"!==s.type.kind)return n.error("Cannot use collator to compare non-string types.");if(!(a=n.parse(t[3],3,cS)))return null}return new i(o,s,a)}}]),i}()}var VM=$M("==",(function(t,n,e){return n===e}),qM),ZM=$M("!=",(function(t,n,e){return n!==e}),(function(t,n,e,r){return!qM(0,n,e,r)})),WM=$M("<",(function(t,n,e){return n",(function(t,n,e){return n>e}),(function(t,n,e,r){return r.compare(n,e)>0})),KM=$M("<=",(function(t,n,e){return n<=e}),(function(t,n,e,r){return r.compare(n,e)<=0})),XM=$M(">=",(function(t,n,e){return n>=e}),(function(t,n,e,r){return r.compare(n,e)>=0})),YM=function(){function t(n,e,r,i,o){p_(this,t),this.type=iS,this.number=n,this.locale=e,this.currency=r,this.minFractionDigits=i,this.maxFractionDigits=o}return d_(t,[{key:"evaluate",value:function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}},{key:"eachChild",value:function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]}}],[{key:"parse",value:function(n,e){if(3!==n.length)return e.error("Expected two arguments.");var r=e.parse(n[1],1,rS);if(!r)return null;var i=n[2];if("object"!==M_(i)||Array.isArray(i))return e.error("NumberFormat options argument must be an object.");var o=null;if(i.locale&&!(o=e.parse(i.locale,1,iS)))return null;var s=null;if(i.currency&&!(s=e.parse(i.currency,1,iS)))return null;var a=null;if(i["min-fraction-digits"]&&!(a=e.parse(i["min-fraction-digits"],1,rS)))return null;var u=null;return i["max-fraction-digits"]&&!(u=e.parse(i["max-fraction-digits"],1,rS))?null:new t(r,o,s,a,u)}}]),t}(),JM={"==":VM,"!=":ZM,">":HM,"<":WM,">=":XM,"<=":KM,array:CS,at:NM,boolean:CS,case:GM,coalesce:PM,collator:FS,format:RS,image:IS,in:zM,"index-of":LM,interpolate:RM,"interpolate-hcl":RM,"interpolate-lab":RM,length:function(){function t(n){p_(this,t),this.type=rS,this.input=n}return d_(t,[{key:"evaluate",value:function(t){var n=this.input.evaluate(t);if("string"==typeof n)return n.length;if(Array.isArray(n))return n.length;throw new ES("Expected value to be of type string or array, but found ".concat(vS(jS(n))," instead."))}},{key:"eachChild",value:function(t){t(this.input)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){var t=["length"];return this.eachChild((function(n){t.push(n.serialize())})),t}}],[{key:"parse",value:function(n,e){if(2!==n.length)return e.error("Expected 1 argument, but found ".concat(n.length-1," instead."));var r=e.parse(n[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?e.error("Expected argument of type string or array, but found ".concat(vS(r.type)," instead.")):new t(r):null}}]),t}(),let:DM,literal:OS,match:FM,number:CS,"number-format":YM,object:CS,slice:UM,step:hM,string:CS,"to-boolean":DS,"to-color":DS,"to-number":DS,"to-string":DS,var:aM,within:rM};function QM(t,n){var e=f_(n,4),r=e[0],i=e[1],o=e[2],s=e[3];r=r.evaluate(t),i=i.evaluate(t),o=o.evaluate(t);var a=s?s.evaluate(t):1,u=SS(r,i,o,a);if(u)throw new ES(u);return new gS(r/255*a,i/255*a,o/255*a,a)}function tj(t,n){return t in n}function nj(t,n){var e=n[t];return void 0===e?null:e}function ej(t){return{type:t}}function rj(t){return{result:"success",value:t}}function ij(t){return{result:"error",value:t}}function oj(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function sj(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function aj(t){return!!t.expression&&t.expression.interpolated}function uj(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":M_(t)}function cj(t){return"object"===M_(t)&&null!==t&&!Array.isArray(t)}LS.register(JM,{error:[{kind:"error"},[iS],function(t,n){var e=f_(n,1)[0];throw new ES(e.evaluate(t))}],typeof:[iS,[uS],function(t,n){return vS(jS(f_(n,1)[0].evaluate(t)))}],"to-rgba":[lS(rS,4),[sS],function(t,n){return f_(n,1)[0].evaluate(t).toArray()}],rgb:[sS,[rS,rS,rS],QM],rgba:[sS,[rS,rS,rS,rS],QM],has:{type:oS,overloads:[[[iS],function(t,n){return tj(f_(n,1)[0].evaluate(t),t.properties())}],[[iS,aS],function(t,n){var e=f_(n,2),r=e[0],i=e[1];return tj(r.evaluate(t),i.evaluate(t))}]]},get:{type:uS,overloads:[[[iS],function(t,n){return nj(f_(n,1)[0].evaluate(t),t.properties())}],[[iS,aS],function(t,n){var e=f_(n,2),r=e[0],i=e[1];return nj(r.evaluate(t),i.evaluate(t))}]]},"feature-state":[uS,[iS],function(t,n){return nj(f_(n,1)[0].evaluate(t),t.featureState||{})}],properties:[aS,[],function(t){return t.properties()}],"geometry-type":[iS,[],function(t){return t.geometryType()}],id:[uS,[],function(t){return t.id()}],zoom:[rS,[],function(t){return t.globals.zoom}],"heatmap-density":[rS,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[rS,[],function(t){return t.globals.lineProgress||0}],"sky-radial-progress":[rS,[],function(t){return t.globals.skyRadialProgress||0}],accumulated:[uS,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[rS,ej(rS),function(t,n){var e,r=0,i=k_(n);try{for(i.s();!(e=i.n()).done;){r+=e.value.evaluate(t)}}catch(t){i.e(t)}finally{i.f()}return r}],"*":[rS,ej(rS),function(t,n){var e,r=1,i=k_(n);try{for(i.s();!(e=i.n()).done;){r*=e.value.evaluate(t)}}catch(t){i.e(t)}finally{i.f()}return r}],"-":{type:rS,overloads:[[[rS,rS],function(t,n){var e=f_(n,2),r=e[0],i=e[1];return r.evaluate(t)-i.evaluate(t)}],[[rS],function(t,n){return-f_(n,1)[0].evaluate(t)}]]},"/":[rS,[rS,rS],function(t,n){var e=f_(n,2),r=e[0],i=e[1];return r.evaluate(t)/i.evaluate(t)}],"%":[rS,[rS,rS],function(t,n){var e=f_(n,2),r=e[0],i=e[1];return r.evaluate(t)%i.evaluate(t)}],ln2:[rS,[],function(){return Math.LN2}],pi:[rS,[],function(){return Math.PI}],e:[rS,[],function(){return Math.E}],"^":[rS,[rS,rS],function(t,n){var e=f_(n,2),r=e[0],i=e[1];return Math.pow(r.evaluate(t),i.evaluate(t))}],sqrt:[rS,[rS],function(t,n){var e=f_(n,1)[0];return Math.sqrt(e.evaluate(t))}],log10:[rS,[rS],function(t,n){var e=f_(n,1)[0];return Math.log(e.evaluate(t))/Math.LN10}],ln:[rS,[rS],function(t,n){var e=f_(n,1)[0];return Math.log(e.evaluate(t))}],log2:[rS,[rS],function(t,n){var e=f_(n,1)[0];return Math.log(e.evaluate(t))/Math.LN2}],sin:[rS,[rS],function(t,n){var e=f_(n,1)[0];return Math.sin(e.evaluate(t))}],cos:[rS,[rS],function(t,n){var e=f_(n,1)[0];return Math.cos(e.evaluate(t))}],tan:[rS,[rS],function(t,n){var e=f_(n,1)[0];return Math.tan(e.evaluate(t))}],asin:[rS,[rS],function(t,n){var e=f_(n,1)[0];return Math.asin(e.evaluate(t))}],acos:[rS,[rS],function(t,n){var e=f_(n,1)[0];return Math.acos(e.evaluate(t))}],atan:[rS,[rS],function(t,n){var e=f_(n,1)[0];return Math.atan(e.evaluate(t))}],min:[rS,ej(rS),function(t,n){return Math.min.apply(Math,u_(n.map((function(n){return n.evaluate(t)}))))}],max:[rS,ej(rS),function(t,n){return Math.max.apply(Math,u_(n.map((function(n){return n.evaluate(t)}))))}],abs:[rS,[rS],function(t,n){var e=f_(n,1)[0];return Math.abs(e.evaluate(t))}],round:[rS,[rS],function(t,n){var e=f_(n,1)[0].evaluate(t);return e<0?-Math.round(-e):Math.round(e)}],floor:[rS,[rS],function(t,n){var e=f_(n,1)[0];return Math.floor(e.evaluate(t))}],ceil:[rS,[rS],function(t,n){var e=f_(n,1)[0];return Math.ceil(e.evaluate(t))}],"filter-==":[oS,[iS,uS],function(t,n){var e=f_(n,2),r=e[0],i=e[1];return t.properties()[r.value]===i.value}],"filter-id-==":[oS,[uS],function(t,n){var e=f_(n,1)[0];return t.id()===e.value}],"filter-type-==":[oS,[iS],function(t,n){var e=f_(n,1)[0];return t.geometryType()===e.value}],"filter-<":[oS,[iS,uS],function(t,n){var e=f_(n,2),r=e[0],i=e[1],o=t.properties()[r.value],s=i.value;return M_(o)===M_(s)&&o":[oS,[iS,uS],function(t,n){var e=f_(n,2),r=e[0],i=e[1],o=t.properties()[r.value],s=i.value;return M_(o)===M_(s)&&o>s}],"filter-id->":[oS,[uS],function(t,n){var e=f_(n,1)[0],r=t.id(),i=e.value;return M_(r)===M_(i)&&r>i}],"filter-<=":[oS,[iS,uS],function(t,n){var e=f_(n,2),r=e[0],i=e[1],o=t.properties()[r.value],s=i.value;return M_(o)===M_(s)&&o<=s}],"filter-id-<=":[oS,[uS],function(t,n){var e=f_(n,1)[0],r=t.id(),i=e.value;return M_(r)===M_(i)&&r<=i}],"filter->=":[oS,[iS,uS],function(t,n){var e=f_(n,2),r=e[0],i=e[1],o=t.properties()[r.value],s=i.value;return M_(o)===M_(s)&&o>=s}],"filter-id->=":[oS,[uS],function(t,n){var e=f_(n,1)[0],r=t.id(),i=e.value;return M_(r)===M_(i)&&r>=i}],"filter-has":[oS,[uS],function(t,n){return f_(n,1)[0].value in t.properties()}],"filter-has-id":[oS,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[oS,[lS(iS)],function(t,n){return f_(n,1)[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[oS,[lS(uS)],function(t,n){return f_(n,1)[0].value.indexOf(t.id())>=0}],"filter-in-small":[oS,[iS,lS(uS)],function(t,n){var e=f_(n,2),r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[oS,[iS,lS(uS)],function(t,n){var e=f_(n,2),r=e[0],i=e[1];return function(t,n,e,r){for(;e<=r;){var i=e+r>>1;if(n[i]===t)return!0;n[i]>t?r=i-1:e=i+1}return!1}(t.properties()[r.value],i.value,0,i.value.length-1)}],all:{type:oS,overloads:[[[oS,oS],function(t,n){var e=f_(n,2),r=e[0],i=e[1];return r.evaluate(t)&&i.evaluate(t)}],[ej(oS),function(t,n){var e,r=k_(n);try{for(r.s();!(e=r.n()).done;){if(!e.value.evaluate(t))return!1}}catch(t){r.e(t)}finally{r.f()}return!0}]]},any:{type:oS,overloads:[[[oS,oS],function(t,n){var e=f_(n,2),r=e[0],i=e[1];return r.evaluate(t)||i.evaluate(t)}],[ej(oS),function(t,n){var e,r=k_(n);try{for(r.s();!(e=r.n()).done;){if(e.value.evaluate(t))return!0}}catch(t){r.e(t)}finally{r.f()}return!1}]]},"!":[oS,[oS],function(t,n){return!f_(n,1)[0].evaluate(t)}],"is-supported-script":[oS,[iS],function(t,n){var e=f_(n,1)[0],r=t.globals&&t.globals.isSupportedScript;return!r||r(e.evaluate(t))}],upcase:[iS,[iS],function(t,n){return f_(n,1)[0].evaluate(t).toUpperCase()}],downcase:[iS,[iS],function(t,n){return f_(n,1)[0].evaluate(t).toLowerCase()}],concat:[iS,ej(uS),function(t,n){return n.map((function(n){return TS(n.evaluate(t))})).join("")}],"resolved-locale":[iS,[cS],function(t,n){return f_(n,1)[0].evaluate(t).resolvedLocale()}]});var fj=function(){function t(n,e){var r;p_(this,t),this.expression=n,this._warningHistory={},this._evaluator=new zS,this._defaultValue=e?"color"===(r=e).type&&cj(r.default)?new gS(0,0,0,0):"color"===r.type?gS.parse(r.default)||null:void 0===r.default?null:r.default:null,this._enumValues=e&&"enum"===e.type?e.values:null}return d_(t,[{key:"evaluateWithoutErrorHandling",value:function(t,n,e,r,i,o){return this._evaluator.globals=t,this._evaluator.feature=n,this._evaluator.featureState=e,this._evaluator.canonical=r,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)}},{key:"evaluate",value:function(t,n,e,r,i,o){this._evaluator.globals=t,this._evaluator.feature=n||null,this._evaluator.featureState=e||null,this._evaluator.canonical=r,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o||null;try{var s=this.expression.evaluate(this._evaluator);if(null==s||"number"==typeof s&&s!=s)return this._defaultValue;if(this._enumValues&&!(s in this._enumValues))throw new ES("Expected value to be one of ".concat(Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(", "),", but found ").concat(JSON.stringify(s)," instead."));return s}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}}}]),t}();function hj(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in JM}function lj(t,n){var e=new uM(JM,[],n?function(t){var n={color:sS,string:iS,number:rS,enum:iS,boolean:oS,formatted:fS,resolvedImage:hS};if("array"===t.type)return lS(n[t.value]||uS,t.length);return n[t.type]}(n):void 0),r=e.parse(t,void 0,void 0,void 0,n&&"string"===n.type?{typeAnnotation:"coerce"}:void 0);return r?rj(new fj(r,n)):ij(e.errors)}var vj=function(){function t(n,e){p_(this,t),this.kind=n,this._styleExpression=e,this.isStateDependent="constant"!==n&&!oM(e.expression)}return d_(t,[{key:"evaluateWithoutErrorHandling",value:function(t,n,e,r,i,o){return this._styleExpression.evaluateWithoutErrorHandling(t,n,e,r,i,o)}},{key:"evaluate",value:function(t,n,e,r,i,o){return this._styleExpression.evaluate(t,n,e,r,i,o)}}]),t}(),dj=function(){function t(n,e,r,i){p_(this,t),this.kind=n,this.zoomStops=r,this._styleExpression=e,this.isStateDependent="camera"!==n&&!oM(e.expression),this.interpolationType=i}return d_(t,[{key:"evaluateWithoutErrorHandling",value:function(t,n,e,r,i,o){return this._styleExpression.evaluateWithoutErrorHandling(t,n,e,r,i,o)}},{key:"evaluate",value:function(t,n,e,r,i,o){return this._styleExpression.evaluate(t,n,e,r,i,o)}},{key:"interpolationFactor",value:function(t,n,e){return this.interpolationType?RM.interpolationFactor(this.interpolationType,t,n,e):0}}]),t}();function pj(t,n){if("error"===(t=lj(t,n)).result)return t;var e=t.value.expression,r=iM(e);if(!r&&!oj(n))return ij([new tS("","data expressions not supported")]);var i=sM(e,["zoom"]);if(!i&&!sj(n))return ij([new tS("","zoom expressions not supported")]);var o=yj(e);if(!o&&!i)return ij([new tS("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof tS)return ij([o]);if(o instanceof RM&&!aj(n))return ij([new tS("",'"interpolate" expressions cannot be used with this property')]);if(!o)return rj(new vj(r?"constant":"source",t.value));var s=o instanceof RM?o.interpolation:void 0;return rj(new dj(r?"camera":"composite",t.value,o.labels,s))}function yj(t){var n=null;if(t instanceof DM)n=yj(t.result);else if(t instanceof PM){var e,r=k_(t.args);try{for(r.s();!(e=r.n()).done;){var i=e.value;if(n=yj(i))break}}catch(t){r.e(t)}finally{r.f()}}else(t instanceof hM||t instanceof RM)&&t.input instanceof LS&&"zoom"===t.input.name&&(n=t);return n instanceof tS||t.eachChild((function(t){var e=yj(t);e instanceof tS?n=e:!n&&e?n=new tS("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):n&&e&&n!==e&&(n=new tS("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),n}function mj(t){return"object"===M_(t)?["literal",t]:t}function bj(t,n){var e=t.stops;if(!e)return function(t,n){var e=["get",t.property];if(void 0===t.default)return"string"===n.type?["string",e]:e;if("enum"===n.type)return["match",e,Object.keys(n.values),e,t.default];var r=["color"===n.type?"to-color":n.type,e,mj(t.default)];return"array"===n.type&&r.splice(1,0,n.value,n.length||null),r}(t,n);var r=e&&"object"===M_(e[0][0]),i=r||void 0!==t.property,o=r||!i;return e=e.map((function(t){return!i&&n.tokens&&"string"==typeof t[1]?[t[0],Mj(t[1])]:[t[0],mj(t[1])]})),r?function(t,n,e){for(var r={},i={},o=[],s=0;s3&&void 0!==arguments[3]?arguments[3]:["zoom"],o=Sj(t,n),s=!1;if("interval"===o)r=["step",i],s=!0;else{if("exponential"!==o)throw new Error('Unknown zoom function type "'.concat(o,'"'));var a=void 0!==t.base?t.base:1;r=[gj(t),1===a?["linear"]:["exponential",a],i]}var u,c=k_(e);try{for(c.s();!(u=c.n()).done;){var f=u.value;_j(r,f[0],f[1],s)}}catch(t){c.e(t)}finally{c.f()}return kj(r),r}(t,n,e):xj(t,n,e)}function gj(t){switch(t.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function wj(t,n){var e,r,i=mj((e=t.default,r=n.default,void 0!==e?e:void 0!==r?r:void 0));return void 0===i&&"resolvedImage"===n.type?"":i}function xj(t,n,e){var r=Sj(t,n),i=["get",t.property];if("categorical"===r&&"boolean"==typeof e[0][0]){var o,s=["case"],a=k_(e);try{for(a.s();!(o=a.n()).done;){var u=o.value;s.push(["==",i,u[0]],u[1])}}catch(t){a.e(t)}finally{a.f()}return s.push(wj(t,n)),s}if("categorical"===r){var c,f=["match",i],h=k_(e);try{for(h.s();!(c=h.n()).done;){var l=c.value;_j(f,l[0],l[1],!1)}}catch(t){h.e(t)}finally{h.f()}return f.push(wj(t,n)),f}if("interval"===r){var v,d=["step",["number",i]],p=k_(e);try{for(p.s();!(v=p.n()).done;){var y=v.value;_j(d,y[0],y[1],!0)}}catch(t){p.e(t)}finally{p.f()}return kj(d),void 0===t.default?d:["case",["==",["typeof",i],"number"],d,mj(t.default)]}if("exponential"===r){var m,b=void 0!==t.base?t.base:1,g=[gj(t),1===b?["linear"]:["exponential",b],["number",i]],w=k_(e);try{for(w.s();!(m=w.n()).done;){var x=m.value;_j(g,x[0],x[1],!1)}}catch(t){w.e(t)}finally{w.f()}return void 0===t.default?g:["case",["==",["typeof",i],"number"],g,mj(t.default)]}throw new Error("Unknown property function type ".concat(r))}function kj(t){"step"===t[0]&&3===t.length&&(t.push(0),t.push(t[3]))}function _j(t,n,e,r){t.length>3&&n===t[t.length-2]||(r&&2===t.length||t.push(n),t.push(e))}function Sj(t,n){return t.type?t.type:n.expression.interpolated?"exponential":"interval"}function Mj(t){for(var n=["concat"],e=/{([^{}]+)}/g,r=0,i=e.exec(t);null!==i;i=e.exec(t)){var o=t.slice(r,e.lastIndex-i[0].length);r=e.lastIndex,o.length>0&&n.push(o),n.push(["get",i[1]])}if(1===n.length)return t;if(r=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":var n,e=k_(t.slice(1));try{for(e.s();!(n=e.n()).done;){var r=n.value;if(!jj(r)&&"boolean"!=typeof r)return!1}}catch(t){e.e(t)}finally{e.f()}return!0;default:return!0}}var Tj={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Oj(t){if(null==t)return{filter:function(){return!0},needGeometry:!1};jj(t)||(t=Cj(t));var n=lj(t,Tj);if("error"===n.result)throw new Error(n.value.map((function(t){return"".concat(t.key,": ").concat(t.message)})).join(", "));return{filter:function(t,e,r){return n.value.evaluate(t,e,{},r)},needGeometry:Aj(t)}}function Ej(t,n){return tn?1:0}function Aj(t){if(!Array.isArray(t))return!1;if("within"===t[0])return!0;for(var n=1;n"===e||"<="===e||">="===e?Rj(t[1],t[2],e):"any"===e?(n=t.slice(1),["any"].concat(n.map(Cj))):"all"===e?["all"].concat(t.slice(1).map(Cj)):"none"===e?["all"].concat(t.slice(1).map(Cj).map(Dj)):"in"===e?Ij(t[1],t.slice(2)):"!in"===e?Dj(Ij(t[1],t.slice(2))):"has"===e?Pj(t[1]):"!has"===e?Dj(Pj(t[1])):"within"!==e||t}function Rj(t,n,e){switch(t){case"$type":return["filter-type-".concat(e),n];case"$id":return["filter-id-".concat(e),n];default:return["filter-".concat(e),t,n]}}function Ij(t,n){if(0===n.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",n]];case"$id":return["filter-id-in",["literal",n]];default:return n.length>200&&!n.some((function(t){return M_(t)!==M_(n[0])}))?["filter-in-large",t,["literal",n.sort(Ej)]]:["filter-in-small",t,["literal",n]]}}function Pj(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Dj(t){return["!",t]}var Nj=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function zj(t,n){var e={};for(var r in t)"ref"!==r&&(e[r]=t[r]);return Nj.forEach((function(t){t in n&&(e[t]=n[t])})),e}var Lj=function t(n,e,r,i){p_(this,t),this.message=(n?"".concat(n,": "):"")+r,i&&(this.identifier=i),null!=e&&e.$l&&(this.line=e.$l)},Fj=function t(n){p_(this,t),this.error=n,this.message=n.message;var e=n.message.match(/line (\d+)/);this.line=e?parseInt(e[1],10):0};function Gj(t){var n=t.key,e=t.value;return e?[new Lj(n,e,"constants have been deprecated as of v8")]:[]}function Uj(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function Bj(t){if(Array.isArray(t))return t.map(Bj);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){var n={};for(var e in t)n[e]=Bj(t[e]);return n}return Uj(t)}function qj(t){var n=t.key,e=t.value,r=t.valueSpec||{},i=t.objectElementValidators||{},o=t.style,s=t.styleSpec,a=[],u=uj(e);if("object"!==u)return[new Lj(n,e,"object expected, ".concat(u," found"))];for(var c in e){var f=c.split(".")[0],h=r[f]||r["*"],l=void 0;if(i[f])l=i[f];else if(r[f])l=uT;else if(i["*"])l=i["*"];else{if(!r["*"]){a.push(new Lj(n,e[c],'unknown property "'.concat(c,'"')));continue}l=uT}a=a.concat(l({key:(n?"".concat(n,"."):n)+c,value:e[c],valueSpec:h,style:o,styleSpec:s,object:e,objectKey:c},e))}for(var v in r)i[v]||r[v].required&&void 0===r[v].default&&void 0===e[v]&&a.push(new Lj(n,e,'missing required property "'.concat(v,'"')));return a}function $j(t){var n=t.value,e=t.valueSpec,r=t.style,i=t.styleSpec,o=t.key,s=t.arrayElementValidator||uT;if("array"!==uj(n))return[new Lj(o,n,"array expected, ".concat(uj(n)," found"))];if(e.length&&n.length!==e.length)return[new Lj(o,n,"array length ".concat(e.length," expected, length ").concat(n.length," found"))];if(e["min-length"]&&n.lengtha)return[new Lj(n,e,"".concat(e," is greater than the maximum value ").concat(a))]}return[]}function Zj(t){var n,e,r,i=t.valueSpec,o=Uj(t.value.type),s={},a="categorical"!==o&&void 0===t.value.property,u=!a,c="array"===uj(t.value.stops)&&"array"===uj(t.value.stops[0])&&"object"===uj(t.value.stops[0][0]),f=qj({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===o)return[new Lj(t.key,t.value,'identity function may not have a "stops" property')];var n=[],e=t.value;n=n.concat($j({key:t.key,value:e,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:h})),"array"===uj(e)&&0===e.length&&n.push(new Lj(t.key,e,"array must have at least one stop"));return n},default:function(t){return uT({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&a&&f.push(new Lj(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||f.push(new Lj(t.key,t.value,'missing required property "stops"')),"exponential"===o&&t.valueSpec.expression&&!aj(t.valueSpec)&&f.push(new Lj(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(u&&!oj(t.valueSpec)?f.push(new Lj(t.key,t.value,"property functions not supported")):a&&!sj(t.valueSpec)&&f.push(new Lj(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!c||void 0!==t.value.property||f.push(new Lj(t.key,t.value,'"property" property is required')),f;function h(t){var n=[],o=t.value,a=t.key;if("array"!==uj(o))return[new Lj(a,o,"array expected, ".concat(uj(o)," found"))];if(2!==o.length)return[new Lj(a,o,"array length 2 expected, length ".concat(o.length," found"))];if(c){if("object"!==uj(o[0]))return[new Lj(a,o,"object expected, ".concat(uj(o[0])," found"))];if(void 0===o[0].zoom)return[new Lj(a,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new Lj(a,o,"object stop key must have value")];if(r&&r>Uj(o[0].zoom))return[new Lj(a,o[0].zoom,"stop zoom values must appear in ascending order")];Uj(o[0].zoom)!==r&&(r=Uj(o[0].zoom),e=void 0,s={}),n=n.concat(qj({key:"".concat(a,"[0]"),value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Vj,value:l}}))}else n=n.concat(l({key:"".concat(a,"[0]"),value:o[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},o));return hj(Bj(o[1]))?n.concat([new Lj("".concat(a,"[1]"),o[1],"expressions are not allowed in function stops.")]):n.concat(uT({key:"".concat(a,"[1]"),value:o[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function l(t,r){var a=uj(t.value),u=Uj(t.value),c=null!==t.value?t.value:r;if(n){if(a!==n)return[new Lj(t.key,c,"".concat(a," stop domain type must match previous stop domain type ").concat(n))]}else n=a;if("number"!==a&&"string"!==a&&"boolean"!==a)return[new Lj(t.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==a&&"categorical"!==o){var f="number expected, ".concat(a," found");return oj(i)&&void 0===o&&(f+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Lj(t.key,c,f)]}return"categorical"!==o||"number"!==a||isFinite(u)&&Math.floor(u)===u?"categorical"!==o&&"number"===a&&void 0!==e&&u":case">=":n.length>=2&&"$type"===Uj(n[1])&&o.push(new Lj(e,n,'"$type" cannot be use with operator "'.concat(n[0],'"')));case"==":case"!=":3!==n.length&&o.push(new Lj(e,n,'filter array for operator "'.concat(n[0],'" must have 3 elements')));case"in":case"!in":n.length>=2&&"string"!==(r=uj(n[1]))&&o.push(new Lj("".concat(e,"[1]"),n[1],"string expected, ".concat(r," found")));for(var s=2;s1&&void 0!==arguments[1]?arguments[1]:j_,e=[];return e=e.concat(uT({key:"",value:t,valueSpec:n.$root,styleSpec:n,style:t,objectElementValidators:{glyphs:cT,"*":function(){return[]}}})),t.constants&&(e=e.concat(Gj({key:"constants",value:t.constants,style:t,styleSpec:n}))),hT(e)}function hT(t){return[].concat(t).sort((function(t,n){return t.line-n.line}))}function lT(t){return function(){for(var n=arguments.length,e=new Array(n),r=0;rc&&M.push("'"+this.Zl[k]+"'");T=l.showPosition?"Parse error on line "+(a+1)+":\n"+l.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.Zl[b]||b)+"'":"Parse error on line "+(a+1)+": Unexpected "+(b==f?"end of input":"'"+(this.Zl[b]||b)+"'"),this.parseError(T,{text:l.match,token:this.Zl[b]||b,line:l.yylineno,loc:p,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+b);switch(w[0]){case 1:e.push(b),r.push(l.yytext),i.push(l.yylloc),e.push(w[1]),b=null,u=l.yyleng,s=l.yytext,a=l.yylineno,p=l.yylloc;break;case 2:if(_=this.Wl[w[1]][1],j.$=r[r.length-_],j._$={first_line:i[i.length-(_||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(_||1)].first_column,last_column:i[i.length-1].last_column},y&&(j._$.range=[i[i.length-(_||1)].range[0],i[i.length-1].range[1]]),void 0!==(x=this.performAction.apply(j,[s,u,a,v.yy,w[1],r,i].concat(h))))return x;_&&(e=e.slice(0,-1*_*2),r=r.slice(0,-1*_),i=i.slice(0,-1*_)),e.push(this.Wl[w[1]][0]),r.push(j.$),i.push(j._$),S=o[e[e.length-2]][e[e.length-1]],e.push(S);break;case 3:return!0}}return!0}},l={EOF:1,parseError:function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},setInput:function(t,n){return this.yy=n||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===r.length?this.yylloc.first_column:0)+r[r.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"},test_match:function(t,n){var e,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,n,e,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;on[0].length)){if(n=e,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,i[o])))return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?!1!==(t=this.test_match(n,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,n,e,r){switch(e){case 0:break;case 1:return 6;case 2:return n.yytext=n.yytext.substr(1,n.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};function v(){this.yy={}}return h.lexer=l,v.prototype=h,h.Parser=v,new v}();n.parser=e,n.Parser=e.Parser,n.parse=function(){return e.parse.apply(e,arguments)}}));function dT(t){if(t instanceof String||"string"==typeof t||t instanceof Buffer)try{return vT.parse(t.toString())}catch(t){throw new Fj(t)}return t}function pT(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:j_,e=t;try{e=dT(e)}catch(t){return[t]}return fT(e,n)}new Set(["vector","raster","raster-dem"]);var yT=hj,mT=pj,bT=bj,gT=cj;pT.parsed=pT,pT.latest=pT;var wT="function"==typeof Object.assign?Object.assign:function(t,n){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),r=1,i=arguments.length;r=.05){for(var e="",r=t.split("\n"),i=MT.slice(0,Math.round(n/.1)),o=0,s=r.length;o0&&(e+="\n"),e+=r[o].split("").join(i);return e}return t}function TT(){return ST||(ST=_T(1,1).getContext("2d")),ST}function OT(t,n){return TT().measureText(t).width+(t.length-1)*n}var ET={};function AT(t,n,e,r){if(-1!==t.indexOf("\n")){for(var i=t.split("\n"),o=[],s=0,a=i.length;s1){var h=TT();h.font=n;var l=h.measureText("M").width*e,v="";for(o=[],s=0,a=f.length;s1;++s){var y=o[s];if(OT(y,r)<.35*l){var m=s>0?OT(o[s-1],r):1/0,b=s.7*l&&OT(w,r)<.6*l){var x=g.split(" "),k=x.pop();OT(k,r)<.2*l&&(o[s]=x.join(" "),o[s+1]=k+" "+w),a-=1}}c=o.join("\n")}else c=t;c=jT(c,r),ET[u]=c}return c}zs&&K(zs,N,(function(){ET={}}));var CT,RT,IT=gT,PT=bT,DT=yT,NT=mT,zT={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},LT={center:[.5,.5],left:[0,.5],right:[1,.5],top:[.5,0],bottom:[.5,1],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bottom-right":[1,1]},FT={},GT={zoom:0},UT={};function BT(t,n,e,r,i){var o=t.id;UT[o]||(UT[o]={});var s=UT[o];if(!s[e]){var a=(t[n]||FT)[e],u=j_[n+"_"+t.type][e];void 0===a&&(a=u.default);var c=DT(a);if(!c&&IT(a)&&(a=PT(a,u),c=!0),c){var f=function(t,n){var e=NT(t,n);if("error"===e.result)throw new Error(e.value.map((function(t){return t.key+": "+t.message})).join(", "));return e.value}(a,u);s[e]=f.evaluate.bind(f)}else"color"==u.type&&(a=gS.parse(a)),s[e]=function(){return a}}return GT.zoom=r,s[e](GT,i)}var qT={};function $T(t,n){if(t){if(0===t.a||0===n)return;var e=t.a;return n=void 0===n?1:n,"rgba("+Math.round(255*t.r/e)+","+Math.round(255*t.g/e)+","+Math.round(255*t.b/e)+","+e*n+")"}return t}var VT=/^([^]*)\{(.*)\}([^]*)$/;function ZT(t,n){var e;do{if(e=t.match(VT)){var r=n[e[2]]||"";t=e[1]+r+e[3]}}while(e);return t}var WT=!1;function HT(t,n,e,r,i,o,s){if(void 0===r&&(r=kT),"string"==typeof n&&(n=JSON.parse(n)),8!=n.version)throw new Error("glStyle version 8 required.");var a,u;if(o)if("undefined"!=typeof Image){var c=new Image;c.crossOrigin="anonymous",c.onload=function(){a=c,u=[c.width,c.height],t.changed(),c.onload=null},c.src=o}else if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope){var f=self;f.postMessage({action:"loadImage",src:o}),f.addEventListener("message",(function(t){"imageLoaded"===t.data.action&&t.data.src===o&&(a=t.data.image,u=[a.width,a.height])}))}for(var h,l=function(t){t=t.slice();for(var n=Object.create(null),e=0;e=y.maxzoom)return"continue";var w=y.filter;if(!w||function(t,n,e,r){return t in qT||(qT[t]=Oj(n).filter),GT.zoom=r,qT[t](GT,e)}(m,w,l,c)){f=y;var x=void 0,k=void 0,O=void 0,E=void 0,A=void 0,C=void 0,R=p.index;if(3==h&&("fill"==y.type||"fill-extrusion"==y.type))if(k=BT(y,"paint",y.type+"-opacity",c,l),y.type+"-pattern"in g){var I=BT(y,"paint",y.type+"-pattern",c,l);if(I){var P="string"==typeof I?ZT(I,e):I.toString();if(a&&i&&i[P]){++d,(C=T[d])&&C.getFill()&&!C.getStroke()&&!C.getText()||(C=new Ev({fill:new av}),T[d]=C),O=C.getFill(),C.setZIndex(R);var D=j[ct=P+"."+k];if(!D)(lt=(ht=_T((ft=i[P]).width,ft.height)).getContext("2d")).globalAlpha=k,lt.drawImage(a,ft.x,ft.y,ft.width,ft.height,0,0,ft.width,ft.height),D=lt.createPattern(ht,"repeat"),j[ct]=D;O.setColor(D)}}}else(x=$T(BT(y,"paint",y.type+"-color",c,l),k))&&(y.type+"-outline-color"in g&&(A=$T(BT(y,"paint",y.type+"-outline-color",c,l),k)),A||(A=x),++d,(C=T[d])&&C.getFill()&&C.getStroke()&&!C.getText()||(C=new Ev({fill:new av,stroke:new xv}),T[d]=C),(O=C.getFill()).setColor(x),(E=C.getStroke()).setColor(A),E.setWidth(1),C.setZIndex(R));if(1!=h&&"line"==y.type){x=!("line-pattern"in g)&&"line-color"in g?$T(BT(y,"paint","line-color",c,l),BT(y,"paint","line-opacity",c,l)):void 0;var N=BT(y,"paint","line-width",c,l);x&&N>0&&(++d,(C=T[d])&&C.getStroke()&&!C.getFill()&&!C.getText()||(C=new Ev({stroke:new xv}),T[d]=C),(E=C.getStroke()).setLineCap(BT(y,"layout","line-cap",c,l)),E.setLineJoin(BT(y,"layout","line-join",c,l)),E.setMiterLimit(BT(y,"layout","line-miter-limit",c,l)),E.setColor(x),E.setWidth(N),E.setLineDash(g["line-dasharray"]?BT(y,"paint","line-dasharray",c,l).map((function(t){return t*N})):null),C.setZIndex(R))}var z=!1,L=null,F=0,G=void 0,U=void 0,B=void 0;if((1==h||2==h)&&"icon-image"in b){var q=BT(y,"layout","icon-image",c,l);if(q){G="string"==typeof q?ZT(q,e):q.toString();var $=void 0;if(a&&i&&i[G]){var V=BT(y,"layout","icon-rotation-alignment",c,l);if(2==h){var Z=t.getGeometry();if(Z.getFlatMidpoint||Z.getFlatMidpoints){var W=Z.getExtent();if(Math.sqrt(Math.max(Math.pow((W[2]-W[0])/n,2),Math.pow((W[3]-W[1])/n,2)))>150){var H="MultiLineString"===Z.getType()?Z.getFlatMidpoints():Z.getFlatMidpoint();if(RT||(RT=new pk("Point",CT=[NaN,NaN],[],{},null)),$=RT,CT[0]=H[0],CT[1]=H[1],"line"===(Rt=BT(y,"layout","symbol-placement",c,l))&&"map"===V)for(var K=Z.getStride(),X=Z.getFlatCoordinates(),Y=0,J=X.length-K;Y=rt&&H[0]<=ot&&H[1]>=it&&H[1]<=st){F=Math.atan2(tt-et,nt-Q);break}}}}}if(2!==h||$){var at=BT(y,"layout","icon-size",c,l),ut=void 0!==g["icon-color"]?BT(y,"paint","icon-color",c,l):null;if(!ut||0!==ut.a){var ct=G+"."+at;if(null!==ut&&(ct+="."+ut),!(U=M[ct])){var ft=i[G];if(null!==ut){var ht,lt;(lt=(ht=_T(ft.width,ft.height)).getContext("2d")).drawImage(a,ft.x,ft.y,ft.width,ft.height,0,0,ft.width,ft.height);for(var vt=lt.getImageData(0,0,ht.width,ht.height),dt=0,pt=vt.data.length;dt0?new xv({width:wt,color:bt}):void 0,fill:gt?new av({color:gt}):void 0}),M[xt]=U),C.setImage(U),L=C.getText(),C.setText(void 0),C.setGeometry(void 0),C.setZIndex(R),z=!0}var kt=void 0;if("text-field"in b)kt=ZT(BT(y,"layout","text-field",c,l).toString(),e).trim(),k=BT(y,"paint","text-opacity",c,l);if(kt&&k&&!B){z||(++d,(C=T[d])&&C.getText()&&!C.getFill()&&!C.getStroke()||(C=new Ev,T[d]=C),C.setImage(void 0),C.setGeometry(void 0)),C.getText()||C.setText(L||new Rv({padding:[2,2,2,2]})),L=C.getText();var _t=Math.round(BT(y,"layout","text-size",c,l)),St=BT(y,"layout","text-font",c,l),Mt=BT(y,"layout","text-line-height",c,l),jt=a_(s?s(St):St,_t,Mt),Tt=b["text-transform"];"uppercase"==Tt?kt=kt.toUpperCase():"lowercase"==Tt&&(kt=kt.toLowerCase());var Ot=BT(y,"layout","text-max-width",c,l),Et=BT(y,"layout","text-letter-spacing",c,l),At=2==h?jT(kt,Et):AT(kt,jt,Ot,Et);L.setText(At),L.setFont(jt),L.setRotation(xT(BT(y,"layout","text-rotate",c,l)));var Ct=BT(y,"layout","text-anchor",c,l),Rt=z||1==h?"point":BT(y,"layout","symbol-placement",c,l);L.setPlacement(Rt);var It=BT(y,"paint","text-halo-width",c,l),Pt=BT(y,"layout","text-offset",c,l),Dt=BT(y,"paint","text-translate",c,l),Nt=0,zt=0;if("point"==Rt){var Lt="center";-1!==Ct.indexOf("left")?(Lt="left",zt=It):-1!==Ct.indexOf("right")&&(Lt="right",zt=-It),L.setTextAlign(Lt);var Ft=BT(y,"layout","text-rotation-alignment",c,l);L.setRotateWithView("map"==Ft)}else L.setMaxAngle(xT(BT(y,"layout","text-max-angle",c,l))*kt.length/At.length),L.setTextAlign(),L.setRotateWithView(!1);var Gt="middle";0==Ct.indexOf("bottom")?(Gt="bottom",Nt=-It-.5*(Mt-1)*_t):0==Ct.indexOf("top")&&(Gt="top",Nt=It+.5*(Mt-1)*_t),L.setTextBaseline(Gt),L.setOffsetX(Pt[0]*_t+zt+Dt[0]),L.setOffsetY(Pt[1]*_t+Nt+Dt[1]),S.setColor($T(BT(y,"paint","text-color",c,l),k)),L.setFill(S);var Ut=$T(BT(y,"paint","text-halo-color",c,l),k);if(Ut){_.setColor(Ut),It*=2;var Bt=.5*_t;_.setWidth(It<=Bt?It:Bt),L.setStroke(_)}else L.setStroke(void 0);var qt=BT(y,"layout","text-padding",c,l),$t=L.getPadding();qt!==$t[0]&&($t[0]=qt,$t[1]=qt,$t[2]=qt,$t[3]=qt),C.setZIndex(R)}}},y=0,m=o.length;y-1?(T.length=d+1,WT&&("function"==typeof t.set?t.set("mapbox-layer",f):t.getProperties()["mapbox-layer"]=f),T):void 0}};return t.setStyle(O),t.set("mapbox-source",h),t.set("mapbox-layers",d),O}var KT=e(8338);function XT(t){return(XT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var YT,JT={},QT=/font-family: ?([^;]*);/,tO=/("|')/g;function nO(t){if(!YT){YT={};for(var n=document.styleSheets,e=0,r=n.length;e2?r[2]:""):t+e}function uO(t,n,e,r,i){return new Promise((function(o,s){if("object"!=XT(n)&&(n=JSON.parse(n)),8!=n.version)return s(new Error("glStyle version 8 required."));if(!(t instanceof gk||t instanceof Xk))return s(new Error("Can only apply to VectorLayer or VectorTileLayer"));var a,u,c;function f(){c||n.sprite&&!a?c?(t.setStyle(c),o()):s(new Error("Something went wrong trying to apply style.")):(c=HT(t,n,e,i,a,u,iO),t.getStyle()?o():s(new Error("Nothing to show for source ["+e+"]")))}if(n.sprite){var h=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"",l=aO(n.sprite,r,h+".json");fetch(l,{credentials:"same-origin"}).then((function(t){return t.ok||""===h?t:(l=aO(n.sprite,r,".json"),fetch(l,{credentials:"same-origin"}))})).then((function(t){if(t.ok)return t.json();s(new Error("Problem fetching sprite from "+l+": "+t.statusText))})).then((function(t){if(void 0===t)return s(new Error("No sprites found."));a=t,u=aO(n.sprite,r,h+".png"),f()})).catch((function(t){s(new Error("Sprites cannot be loaded: "+l+": "+t.message))}))}else f()}))}function cO(t){var n=t.bounds;if(n){var e=gr([n[0],n[1]]),r=gr([n[2],n[3]]);return[e[0],e[1],r[0],r[1]]}}function fO(t,n){t=wT({},t);var e=JSON.stringify(t),r=JT[e];return r||(r=new Xw({url:t.tiles?void 0:n,tileJSON:t.tiles?t:void 0}),JT[e]=r),new Promise((function(t){var e=r.on("change",(function(){var i=r.getState();if("ready"===i){var o=r.getTileJSON(),s=Array.isArray(o.tiles)?o.tiles:[o.tiles];if(n)for(var a=0,u=s.length;a1&&!t.variables)throw new Error("Missing variables in style (expected "+r.variables+")");for(var v=function(n){var e=r.variables[n];if(!(e in t.variables))throw new Error("Missing '"+e+"' in style variables");var i=Wl(e);h[i]=function(){var n=t.variables[e];return"string"==typeof n&&(n=Dl(r,n)),void 0!==n?n:-9999999}},d=0;d0){this.nv&&(this.nv.clear(),this.nv.addFeatures(h)),this.dispatchEvent(new AO(EO,t,h,o));break}}},n.prototype.iv=function(){var t=this.getMap();if(t){var n=this.target?this.target:t.getViewport();this.tv=[K(n,B,this.handleDrop,this),K(n,G,this.handleStop,this),K(n,U,this.handleStop,this),K(n,B,this.handleStop,this)]}},n.prototype.setActive=function(n){!this.getActive()&&n&&this.iv(),this.getActive()&&!n&&this.ov(),t.prototype.setActive.call(this,n)},n.prototype.setMap=function(n){this.ov(),t.prototype.setMap.call(this,n),this.getActive()&&this.iv()},n.prototype.rv=function(t,n,e){try{return t.readFeatures(n,e)}catch(t){return null}},n.prototype.ov=function(){this.tv&&(this.tv.forEach(Y),this.tv=null)},n.prototype.handleDrop=function(t){for(var n=t.dataTransfer.files,e=0,r=n.length;e1?1:-1;return n.endInteraction(this.Rr,e),this.ki=0,!1},n.prototype.handleDownEvent=function(t){return!!Cu(t)&&(!!this.qr(t)&&(t.map.getView().beginInteraction(),this.Vr=void 0,this.sv=void 0,!0))},n}(bu),PO=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),DO=function(t){function n(n,e,r){var i=t.call(this)||this;if(void 0!==r&&void 0===e)i.setFlatCoordinates(r,n);else{var o=e||0;i.setCenterAndRadius(n,o,r)}return i}return PO(n,t),n.prototype.clone=function(){var t=new n(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t},n.prototype.closestPointXY=function(t,n,e,r){var i=this.flatCoordinates,o=t-i[0],s=n-i[1],a=o*o+s*s;if(a=n[0]||(t[1]<=n[1]&&t[3]>=n[1]||Un(t,this.intersectsCoordinate.bind(this)))}return!1},n.prototype.setCenter=function(t){var n=this.stride,e=this.flatCoordinates[n]-this.flatCoordinates[0],r=t.slice();r[n]=r[0]+e;for(var i=1;i=this.gv?(this.cv=n.pixel,this.uv=!this.vv,e=!0):this.hv=void 0,this.uv&&void 0!==this.fv&&(clearTimeout(this.fv),this.fv=void 0));return this.vv&&n.type===ia.POINTERDRAG&&null!==this.xv?(this.Av(n.coordinate),r=!1):this.vv&&n.type===ia.POINTERDOWN?r=!1:e&&this.getPointerCount()<2?(r=n.type===ia.POINTERMOVE)&&this.vv?(this.$n(n),this.uv&&n.originalEvent.preventDefault()):("mouse"===n.originalEvent.pointerType||n.type===ia.POINTERDRAG&&void 0===this.fv)&&this.$n(n):n.type===ia.DBLCLICK&&(r=!1),t.prototype.handleEvent.call(this,n)&&r},n.prototype.handleDownEvent=function(t){return this.uv=!this.vv,this.vv?(this.cv=t.pixel,this.wv||this.Cv(t.coordinate),!0):this.qr(t)?(this.hv=Date.now(),this.fv=setTimeout(function(){this.$n(new ra(ia.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.gv),this.cv=t.pixel,!0):(this.hv=void 0,!1)},n.prototype.handleUpEvent=function(t){var n=!0;if(0===this.getPointerCount())if(this.fv&&(clearTimeout(this.fv),this.fv=void 0),this.$n(t),this.uv){var e=!this.wv;e&&this.Cv(t.coordinate),!e&&this.vv?this.finishDrawing():this.vv||e&&this.fi!==LO||(this.Rv(t.pixel)?this.bv(t)&&this.finishDrawing():this.Av(t.coordinate)),n=!1}else this.vv&&this.abortDrawing();return!n&&this.pv&&t.preventDefault(),n},n.prototype.$n=function(t){if(this.lv=t.originalEvent.pointerType,this.cv&&(!this.vv&&this.uv||this.vv&&!this.uv)){var n=this.cv,e=t.pixel,r=n[0]-e[0],i=n[1]-e[1],o=r*r+i*i;if(this.uv=this.vv?o>this.jv:o<=this.jv,!this.uv)return}this.wv?this.Iv(t.coordinate):this.Pv(t.coordinate.slice())},n.prototype.Rv=function(t){var n=!1;if(this.xv){var e=!1,r=[this.wv],i=this.fi;if(i===LO)n=!0;else if(i===UO)n=2===this._v.length;else if(i===FO)e=this._v.length>this.yv;else if(i===GO){var o=this._v;e=o[0].length>this.yv,r=[o[0][0],o[0][o[0].length-2]]}if(e)for(var s=this.getMap(),a=0,u=r.length;a=this.mv&&(this.vv?e.pop():n=!0),e.push(t.slice()),this.sa(e,r,i)):o===GO&&((e=this._v[0]).length>=this.mv&&(this.vv?e.pop():n=!0),e.push(t.slice()),n&&(this.wv=e[0]),this.sa(this._v,r,i)),this.Pv(t.slice()),this.Dv(),n&&this.finishDrawing()},n.prototype.removeLastPoint=function(){if(this.xv){var t,n=this.xv.getGeometry(),e=this.getMap().getView().getProjection(),r=this.fi;if(r===FO||r===UO){if((t=this._v).splice(-2,1),t.length>=2){this.wv=t[t.length-2].slice();var i=this.wv.slice();t[t.length-1]=i,this.Pv(i)}this.sa(t,n,e),n.getType()===Rt.POLYGON&&this.Sv&&this.Nv(n)}else if(r===GO){(t=this._v[0]).splice(-2,1);var o=this.Sv.getGeometry();if(t.length>=2){i=t[t.length-2].slice();t[t.length-1]=i,this.Pv(i)}o.setCoordinates(t),this.sa(this._v,n,e)}1===t.length&&this.abortDrawing(),this.Dv()}},n.prototype.finishDrawing=function(){var t=this.zv();if(t){var n=this._v,e=t.getGeometry(),r=this.getMap().getView().getProjection();this.fi===FO?(n.pop(),this.sa(n,e,r)):this.fi===GO&&(n[0].pop(),this.sa(n,e,r),n=e.getCoordinates()),this.Ah===Rt.MULTI_POINT?t.setGeometry(new Fk([n])):this.Ah===Rt.MULTI_LINE_STRING?t.setGeometry(new zk([n])):this.Ah===Rt.MULTI_POLYGON&&t.setGeometry(new Uk([n])),this.dispatchEvent(new VO(qO,t)),this.Ri&&this.Ri.push(t),this.nv&&this.nv.addFeature(t)}},n.prototype.zv=function(){this.wv=null;var t=this.xv;return this.xv=null,this.kv=null,this.Sv=null,this.Tv.getSource().clear(!0),t},n.prototype.abortDrawing=function(){var t=this.zv();t&&this.dispatchEvent(new VO($O,t))},n.prototype.appendCoordinates=function(t){var n,e=this.fi,r=!this.xv;if(r&&this.Cv(t[0]),e===FO||e===UO)n=this._v;else{if(e!==GO)return;n=this._v&&this._v.length?this._v[0]:[]}r&&n.shift(),n.pop();for(var i=0;ih?o[1]:o[0]),s}}return null},n.prototype.$n=function(t){var n=t.pixel,e=t.map,r=this.Vv(n,e);r||(r=e.getCoordinateFromPixelInternal(n)),this.Zv(r)},n.prototype.Wv=function(t){var n=this.Uv;return n?t?n.setGeometry(qi(t)):n.setGeometry(void 0):(n=new Tt(t?qi(t):{}),this.Uv=n,this.qv.getSource().addFeature(n)),n},n.prototype.Zv=function(t){var n=this.Bv;n?n.getGeometry().setCoordinates(t):(n=new Tt(new wi(t)),this.Bv=n,this.$v.getSource().addFeature(n));return n},n.prototype.handleEvent=function(n){return!n.originalEvent||!this.qr(n)||(n.type!=ia.POINTERMOVE||this.handlingDownUpSequence||this.$n(n),t.prototype.handleEvent.call(this,n),!1)},n.prototype.handleDownEvent=function(t){var n=t.pixel,e=t.map,r=this.getExtentInternal(),i=this.Vv(n,e),o=function(t){var n=null,e=null;return t[0]==r[0]?n=r[2]:t[0]==r[2]&&(n=r[0]),t[1]==r[1]?e=r[3]:t[1]==r[3]&&(e=r[1]),null!==n&&null!==e?[n,e]:null};if(i&&r){var s=i[0]==r[0]||i[0]==r[2]?i[0]:null,a=i[1]==r[1]||i[1]==r[3]?i[1]:null;null!==s&&null!==a?this.Lv=YO(o(i)):null!==s?this.Lv=JO(o([s,r[1]]),o([s,r[3]])):null!==a&&(this.Lv=JO(o([r[0],a]),o([r[2],a])))}else i=e.getCoordinateFromPixelInternal(n),this.setExtent([i[0],i[1],i[0],i[1]]),this.Lv=YO(i);return!0},n.prototype.handleDragEvent=function(t){if(this.Lv){var n=t.coordinate;this.setExtent(this.Lv(n)),this.Zv(n)}},n.prototype.handleUpEvent=function(t){this.Lv=null;var n=this.getExtentInternal();return n&&0!==Bn(n)||this.setExtent(null),!1},n.prototype.setMap=function(n){this.qv.setMap(n),this.$v.setMap(n),t.prototype.setMap.call(this,n)},n.prototype.getExtent=function(){return Ar(this.getExtentInternal(),this.getMap().getView().getProjection())},n.prototype.getExtentInternal=function(){return this.st},n.prototype.setExtent=function(t){this.st=t||null,this.Wv(t),this.dispatchEvent(new KO(this.st))},n}(bu);function tE(t){return(tE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var nE=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),eE=[0,0,0,0],rE=[],iE="modifystart",oE="modifyend",sE=function(t){function n(n,e,r){var i=t.call(this,n)||this;return i.features=e,i.mapBrowserEvent=r,i}return nE(n,t),n}(h);function aE(t,n){return t.index-n.index}function uE(t,n,e){var r=n.geometry;if(r.getType()===Rt.CIRCLE){var i=r;if(1===n.index){var o=Tr();o&&(i=i.clone().transform(o,e));var s=er(i.getCenter(),Er(t,e)),a=Math.sqrt(s)-i.getRadius();return a*a}}var u=Er(t,e);return rE[0]=Er(n.segment[0],e),rE[1]=Er(n.segment[1],e),ir(u,rE)}function cE(t,n,e){var r=n.geometry;if(r.getType()===Rt.CIRCLE&&1===n.index){var i=r,o=Tr();return o&&(i=i.clone().transform(o,e)),Or(i.getClosestPoint(Er(t,e)),e)}var s=Er(t,e);return rE[0]=Er(n.segment[0],e),rE[1]=Er(n.segment[1],e),Or(Xe(s,rE),e)}var fE=function(t){function n(n){var e,r,i=t.call(this,n)||this;if(i.on,i.once,i.un,i.Hv=i.Pu.bind(i),i.qr=n.condition?n.condition:Ru,i.Kv=function(t){return wu(t)&&Tu(t)},i.Xv=n.deleteCondition?n.deleteCondition:i.Kv,i.Yv=n.insertVertexCondition?n.insertVertexCondition:Su,i.Bv=null,i.Jv=null,i.Qv=[0,0],i.td=!1,i.ed=null,i.rd=new Dv,i.Fv=void 0!==n.pixelTolerance?n.pixelTolerance:10,i.Gv=!1,i.od=!1,i.sd=[],i.Tv=new gk({source:new md({useSpatialIndex:!1,wrapX:!!n.wrapX}),style:n.style?n.style:(e=Tv(),function(t,n){return e[Rt.POINT]}),updateWhileAnimating:!0,updateWhileInteracting:!0}),i.ad={Point:i.ud.bind(i),LineString:i.fd.bind(i),LinearRing:i.fd.bind(i),Polygon:i.hd.bind(i),MultiPoint:i.ld.bind(i),MultiLineString:i.vd.bind(i),MultiPolygon:i.dd.bind(i),Circle:i.yd.bind(i),GeometryCollection:i.md.bind(i)},i.nv=null,i.bd=null,n.features?r=n.features:n.source&&(i.nv=n.source,r=new ft(i.nv.getFeatures()),i.nv.addEventListener(ud,i.gd.bind(i)),i.nv.addEventListener(hd,i.wd.bind(i))),!r)throw new Error("The modify interaction requires features, a source or a layer");return n.hitDetection&&(i.bd=n.hitDetection),i.Ri=r,i.Ri.forEach(i.xd.bind(i)),i.Ri.addEventListener(ot,i.kd.bind(i)),i.Ri.addEventListener(st,i._d.bind(i)),i.Sd=null,i.zr=[0,0],i.Md=void 0===n.snapToPointer?!i.bd:n.snapToPointer,i}return nE(n,t),n.prototype.xd=function(t){var n=t.getGeometry();if(n){var e=this.ad[n.getType()];e&&e(t,n)}var r=this.getMap();r&&r.isRendered()&&this.getActive()&&this.jd(this.Qv,r),t.addEventListener(P,this.Hv)},n.prototype.Td=function(t,n){if(!this.ed){this.ed=new ft;for(var e=this.ed.getArray(),r=0,i=n.length;r=0;--r){for(var i=e[r],o=this.sd.length-1;o>=0;--o)this.sd[o][0]===i&&this.sd.splice(o,1);n.remove(i)}},n.prototype.setActive=function(n){this.Bv&&!n&&(this.Tv.getSource().removeFeature(this.Bv),this.Bv=null),t.prototype.setActive.call(this,n)},n.prototype.setMap=function(n){this.Tv.setMap(n),t.prototype.setMap.call(this,n)},n.prototype.getOverlay=function(){return this.Tv},n.prototype.gd=function(t){t.feature&&this.Ri.push(t.feature)},n.prototype.wd=function(t){t.feature&&this.Ri.remove(t.feature)},n.prototype.kd=function(t){this.xd(t.element)},n.prototype.Pu=function(t){if(!this.od){var n=t.target;this.Od(n),this.xd(n)}},n.prototype._d=function(t){var n=t.element;this.Od(n)},n.prototype.ud=function(t,n){var e=n.getCoordinates(),r={feature:t,geometry:n,segment:[e,e]};this.rd.insert(n.getExtent(),r)},n.prototype.ld=function(t,n){for(var e=n.getCoordinates(),r=0,i=e.length;r=0;--y)this.Rd(i[y],s)}return!!this.Bv},n.prototype.handleUpEvent=function(t){for(var n=this.sd.length-1;n>=0;--n){var e=this.sd[n][0],r=e.geometry;if(r.getType()===Rt.CIRCLE){var i=r.getCenter(),o=e.featureSegments[0],s=e.featureSegments[1];o.segment[0]=i,o.segment[1]=i,s.segment[0]=i,s.segment[1]=i,this.rd.update(Cn(i),o);var a=r,u=Tr();if(u){var c=t.map.getView().getProjection();a=$i(a=a.clone().transform(u,c)).transform(c,u)}this.rd.update(a.getExtent(),s)}else this.rd.update(wn(e.segment),e)}return this.ed&&(this.dispatchEvent(new sE(oE,this.ed,t)),this.ed=null),!1},n.prototype.$n=function(t){this.Qv=t.pixel,this.jd(t.pixel,t.map,t.coordinate)},n.prototype.jd=function(t,n,e){var r,i,s=this,a=e||n.getCoordinateFromPixel(t),u=n.getView().getProjection();if(this.bd){var c="object"===tE(this.bd)?function(t){return t===s.bd}:void 0;n.forEachFeatureAtPixel(t,(function(t,n,e){if((e=e||t.getGeometry()).getType()===Rt.POINT&&y(s.Ri.getArray(),t)){i=e;var o=e.getFlatCoordinates().slice(0,2);r=[{feature:t,geometry:e,segment:[o,o]}]}return!0}),{layerFilter:c})}if(!r){var f=Ar(xn(Cr(Cn(a,eE),u),n.getView().getResolution()*this.Fv,eE),u);r=this.rd.getInExtent(f)}if(r&&r.length>0){var h=r.sort((function(t,n){return uE(a,t,u)-uE(a,n,u)}))[0],l=h.segment,v=cE(a,h,u),d=n.getPixelFromCoordinate(v),p=rr(t,d);if(i||p<=this.Fv){var m={};if(m[o(l)]=!0,this.Md||(this.zr[0]=v[0]-a[0],this.zr[1]=v[1]-a[1]),h.geometry.getType()===Rt.CIRCLE&&1===h.index)this.Gv=!0,this.Ad(v,[h.feature],[h.geometry]);else{var b=n.getPixelFromCoordinate(l[0]),g=n.getPixelFromCoordinate(l[1]),w=er(d,b),x=er(d,g);p=Math.sqrt(Math.min(w,x)),this.Gv=p<=this.Fv,this.Gv&&(v=w>x?l[1]:l[0]),this.Ad(v,[h.feature],[h.geometry]);var k={};k[o(h.geometry)]=!0;for(var _=1,S=r.length;_=0;--i)h=o((f=(e=l[i])[0]).feature),f.depth&&(h+="-"+f.depth.join("-")),h in v||(v[h]={}),0===e[1]?(v[h].right=f,v[h].index=f.index):1==e[1]&&(v[h].left=f,v[h].index=f.index+1);for(h in v){switch(c=v[h].right,a=v[h].left,(u=(s=v[h].index)-1)<0&&(u=0),t=n=(r=(f=void 0!==a?a:c).geometry).getCoordinates(),d=!1,r.getType()){case Rt.MULTI_LINE_STRING:n[f.depth[0]].length>2&&(n[f.depth[0]].splice(s,1),d=!0);break;case Rt.LINE_STRING:n.length>2&&(n.splice(s,1),d=!0);break;case Rt.MULTI_POLYGON:t=t[f.depth[1]];case Rt.POLYGON:(t=t[f.depth[0]]).length>4&&(s==t.length-1&&(s=0),t.splice(s,1),d=!0,0===s&&(t.pop(),t.push(t[0]),u=t.length-1))}if(d){this.Cd(r,n);var p=[];if(void 0!==a&&(this.rd.remove(a),p.push(a.segment[0])),void 0!==c&&(this.rd.remove(c),p.push(c.segment[1])),void 0!==a&&void 0!==c){var y={depth:f.depth,feature:f.feature,geometry:f.geometry,index:u,segment:p};this.rd.insert(wn(y.segment),y)}this.Id(r,s,f.depth,-1),this.Bv&&(this.Tv.getSource().removeFeature(this.Bv),this.Bv=null),l.length=0}}return d},n.prototype.Cd=function(t,n){this.od=!0,t.setCoordinates(n),this.od=!1},n.prototype.Id=function(t,n,e,r){this.rd.forEachInExtent(t.getExtent(),(function(i){i.geometry===t&&(void 0===e||void 0===i.depth||x(i.depth,e))&&i.index>n&&(i.index+=r)}))},n}(bu),hE=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),lE="select",vE=function(t){function n(n,e,r,i){var o=t.call(this,n)||this;return o.selected=e,o.deselected=r,o.mapBrowserEvent=i,o}return hE(n,t),n}(h),dE={};var pE=function(t){function n(n){var e=t.call(this)||this;e.on,e.once,e.un;var r,i,o=n||{};if(e.Dd=e.xd.bind(e),e.Nd=e.Od.bind(e),e.qr=o.condition?o.condition:Tu,e.zd=o.addCondition?o.addCondition:ju,e.Ld=o.removeCondition?o.removeCondition:ju,e.Fd=o.toggleCondition?o.toggleCondition:Eu,e.Gd=!!o.multi&&o.multi,e.Ud=o.filter?o.filter:S,e.Bd=o.hitTolerance?o.hitTolerance:0,e.K=void 0!==o.style?o.style:(g((r=Tv())[Rt.POLYGON],r[Rt.LINE_STRING]),g(r[Rt.GEOMETRY_COLLECTION],r[Rt.LINE_STRING]),function(t){return t.getGeometry()?r[t.getGeometry().getType()]:null}),e.Ri=o.features||new ft,o.layers)if("function"==typeof o.layers)i=o.layers;else{var s=o.layers;i=function(t){return y(s,t)}}else i=S;return e.qd=i,e.$d={},e}return hE(n,t),n.prototype.Vd=function(t,n){this.$d[o(t)]=n},n.prototype.getFeatures=function(){return this.Ri},n.prototype.getHitTolerance=function(){return this.Bd},n.prototype.getLayer=function(t){return this.$d[o(t)]},n.prototype.setHitTolerance=function(t){this.Bd=t},n.prototype.setMap=function(n){this.getMap()&&this.K&&this.Ri.forEach(this.Zd.bind(this)),t.prototype.setMap.call(this,n),n?(this.Ri.addEventListener(ot,this.Dd),this.Ri.addEventListener(st,this.Nd),this.K&&this.Ri.forEach(this.Wd.bind(this))):(this.Ri.removeEventListener(ot,this.Dd),this.Ri.removeEventListener(st,this.Nd))},n.prototype.xd=function(t){var n=t.element;this.K&&this.Wd(n)},n.prototype.Od=function(t){var n=t.element;this.K&&this.Zd(n)},n.prototype.getStyle=function(){return this.K},n.prototype.Wd=function(t){var n=o(t);n in dE||(dE[n]=t.getStyle()),t.setStyle(this.K)},n.prototype.Zd=function(t){for(var e=this.getMap().getInteractions().getArray(),r=e.length-1;r>=0;--r){var i=e[r];if(i!==this&&i instanceof n&&i.getStyle()&&-1!==i.getFeatures().getArray().lastIndexOf(t))return void t.setStyle(i.getStyle())}var s=o(t);t.setStyle(dE[s]),delete dE[s]},n.prototype.Hd=function(t){delete this.$d[o(t)]},n.prototype.handleEvent=function(t){if(!this.qr(t))return!0;var n=this.zd(t),e=this.Ld(t),r=this.Fd(t),i=!n&&!e&&!r,o=t.map,s=this.getFeatures(),a=[],u=[];if(i){E(this.$d),o.forEachFeatureAtPixel(t.pixel,function(t,n){if(this.Ud(t,n))return u.push(t),this.Vd(t,n),!this.Gd}.bind(this),{layerFilter:this.qd,hitTolerance:this.Bd});for(var c=s.getLength()-1;c>=0;--c){var f=s.item(c),h=u.indexOf(f);h>-1?u.splice(h,1):(s.remove(f),a.push(f))}0!==u.length&&s.extend(u)}else{o.forEachFeatureAtPixel(t.pixel,function(t,i){if(this.Ud(t,i))return!n&&!r||y(s.getArray(),t)?(e||r)&&y(s.getArray(),t)&&(a.push(t),this.Hd(t)):(u.push(t),this.Vd(t,i)),!this.Gd}.bind(this),{layerFilter:this.qd,hitTolerance:this.Bd});for(var l=a.length-1;l>=0;--l)s.remove(a[l]);s.extend(u)}return(u.length>0||a.length>0)&&this.dispatchEvent(new vE(lE,u,a,t)),!0},n}(vu),yE=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}();function mE(t){return t.feature?t.feature:t.element?t.element:void 0}var bE=[],gE=function(t){function n(n){var e=this,r=n||{},i=r;return i.handleDownEvent||(i.handleDownEvent=S),i.stopDown||(i.stopDown=M),(e=t.call(this,i)||this).nv=r.source?r.source:null,e.Kd=void 0===r.vertex||r.vertex,e.Xd=void 0===r.edge||r.edge,e.Ri=r.features?r.features:null,e.Yd=[],e.Jd={},e.Qd={},e.tp={},e.Fv=void 0!==r.pixelTolerance?r.pixelTolerance:10,e.rd=new Dv,e.ad={Point:e.ud.bind(e),LineString:e.fd.bind(e),LinearRing:e.fd.bind(e),Polygon:e.hd.bind(e),MultiPoint:e.ld.bind(e),MultiLineString:e.vd.bind(e),MultiPolygon:e.dd.bind(e),GeometryCollection:e.md.bind(e),Circle:e.yd.bind(e)},e}return yE(n,t),n.prototype.addFeature=function(t,n){var e=void 0===n||n,r=o(t),i=t.getGeometry();if(i){var s=this.ad[i.getType()];s&&(this.Qd[r]=i.getExtent([1/0,1/0,-1/0,-1/0]),s(t,i))}e&&(this.Jd[r]=K(t,P,this.Pu,this))},n.prototype.np=function(t){this.addFeature(t)},n.prototype.ep=function(t){this.removeFeature(t)},n.prototype.rp=function(){var t;return this.Ri?t=this.Ri:this.nv&&(t=this.nv.getFeatures()),t},n.prototype.handleEvent=function(n){var e=this.snapTo(n.pixel,n.coordinate,n.map);return e.snapped&&(n.coordinate=e.vertex.slice(0,2),n.pixel=e.vertexPixel),t.prototype.handleEvent.call(this,n)},n.prototype.kd=function(t){var n=mE(t);this.addFeature(n)},n.prototype._d=function(t){var n=mE(t);this.removeFeature(n)},n.prototype.Pu=function(t){var n=t.target;if(this.handlingDownUpSequence){var e=o(n);e in this.tp||(this.tp[e]=n)}else this.ip(n)},n.prototype.handleUpEvent=function(t){var n=A(this.tp);return n.length&&(n.forEach(this.ip.bind(this)),this.tp={}),!1},n.prototype.removeFeature=function(t,n){var e=void 0===n||n,r=o(t),i=this.Qd[r];if(i){var s=this.rd,a=[];s.forEachInExtent(i,(function(n){t===n.feature&&a.push(n)}));for(var u=a.length-1;u>=0;--u)s.remove(a[u])}e&&(Y(this.Jd[r]),delete this.Jd[r])},n.prototype.setMap=function(n){var e=this.getMap(),r=this.Yd,i=this.rp();e&&(r.forEach(Y),r.length=0,i.forEach(this.ep.bind(this))),t.prototype.setMap.call(this,n),n&&(this.Ri?r.push(K(this.Ri,ot,this.kd,this),K(this.Ri,st,this._d,this)):this.nv&&r.push(K(this.nv,ud,this.kd,this),K(this.nv,hd,this._d,this)),i.forEach(this.np.bind(this)))},n.prototype.snapTo=function(t,n,e){var r=wn([e.getCoordinateFromPixel([t[0]-this.Fv,t[1]+this.Fv]),e.getCoordinateFromPixel([t[0]+this.Fv,t[1]-this.Fv])]),i=this.rd.getInExtent(r);this.Kd&&!this.Xd&&(i=i.filter((function(t){return t.feature.getGeometry().getType()!==Rt.CIRCLE})));var o=!1,s=null,a=null;if(0===i.length)return{snapped:o,vertex:s,vertexPixel:a};for(var u,c=e.getView().getProjection(),f=Er(n,c),h=1/0,l=0;lg?p[1]:p[0],a=e.getPixelFromCoordinate(s))}else if(this.Xd){var w=u.feature.getGeometry().getType()===Rt.CIRCLE;if(w){var x=u.feature.getGeometry(),k=Tr();k&&(x=x.clone().transform(k,c)),s=Or(Ke(f,x),c)}else bE[0]=Er(p[0],c),bE[1]=Er(p[1],c),s=Or(Xe(f,bE),c);if(rr(t,a=e.getPixelFromCoordinate(s))<=this.Fv&&(o=!0,this.Kd&&!w)){y=e.getPixelFromCoordinate(p[0]),m=e.getPixelFromCoordinate(p[1]),b=er(a,y),g=er(a,m);Math.sqrt(Math.min(b,g))<=this.Fv&&(s=b>g?p[1]:p[0],a=e.getPixelFromCoordinate(s))}}return o&&(a=[Math.round(a[0]),Math.round(a[1])]),{snapped:o,vertex:s,vertexPixel:a}},n.prototype.ip=function(t){this.removeFeature(t,!1),this.addFeature(t,!1)},n.prototype.yd=function(t,n){var e=this.getMap().getView().getProjection(),r=n,i=Tr();i&&(r=r.clone().transform(i,e));var o=$i(r);i&&o.transform(e,i);for(var s=o.getCoordinates()[0],a=0,u=s.length-1;a=0;e--){var c=o[e][0];if(Mn(new bi(c).getExtent(),new bi(a).getExtent())){o[e].push(a),u=!0;break}}u||o.push([a.reverse()])}return o}(o.rings,s);1===a.length?(i=Rt.POLYGON,t=O({},t,((e={}).rings=a[0],e))):(i=Rt.MULTI_POLYGON,t=O({},t,((r={}).rings=a,r)))}return Pk((0,OE[i])(t),!1,n)}function CE(t){var n=Ot;return!0===t.hasZ&&!0===t.hasM?n=Ct:!0===t.hasZ?n=Et:!0===t.hasM&&(n=At),n}function RE(t){var n=t.getLayout();return{hasZ:n===Et||n===Ct,hasM:n===At||n===Ct}}function IE(t,n){return(0,EE[t.getType()])(Pk(t,!0,n),n)}EE[Rt.POINT]=function(t,n){var e,r=t.getCoordinates(),i=t.getLayout();i===Et?e={x:r[0],y:r[1],z:r[2]}:i===At?e={x:r[0],y:r[1],m:r[2]}:i===Ct?e={x:r[0],y:r[1],z:r[2],m:r[3]}:i===Ot?e={x:r[0],y:r[1]}:St(!1,34);return e},EE[Rt.LINE_STRING]=function(t,n){var e=RE(t);return{hasZ:e.hasZ,hasM:e.hasM,paths:[t.getCoordinates()]}},EE[Rt.POLYGON]=function(t,n){var e=RE(t);return{hasZ:e.hasZ,hasM:e.hasM,rings:t.getCoordinates(!1)}},EE[Rt.MULTI_POINT]=function(t,n){var e=RE(t);return{hasZ:e.hasZ,hasM:e.hasM,points:t.getCoordinates()}},EE[Rt.MULTI_LINE_STRING]=function(t,n){var e=RE(t);return{hasZ:e.hasZ,hasM:e.hasM,paths:t.getCoordinates()}},EE[Rt.MULTI_POLYGON]=function(t,n){for(var e=RE(t),r=t.getCoordinates(!1),i=[],o=0;o=0;s--)i.push(r[o][s]);return{hasZ:e.hasZ,hasM:e.hasM,rings:i}};var PE=function(t){function n(n){var e=this,r=n||{};return(e=t.call(this)||this).H=r.geometryName,e}return TE(n,t),n.prototype.readFeatureFromObject=function(t,n,e){var r=t,i=AE(r.geometry,n),o=new Tt;if(this.H&&o.setGeometryName(this.H),o.setGeometry(i),r.attributes){o.setProperties(r.attributes,!0);var s=r.attributes[e];void 0!==s&&o.setId(s)}return o},n.prototype.readFeaturesFromObject=function(t,n){var e=n||{};if(t.features){for(var r=[],i=t.features,o=0,s=i.length;o0?e[0]:null},n.prototype.readFeatureFromNode=function(t,n){return null},n.prototype.readFeatures=function(t,n){if(t){if("string"==typeof t){var e=fh(t);return this.readFeaturesFromDocument(e,n)}return uh(t)?this.readFeaturesFromDocument(t,n):this.readFeaturesFromNode(t,n)}return[]},n.prototype.readFeaturesFromDocument=function(t,n){for(var e=[],r=t.firstChild;r;r=r.nextSibling)r.nodeType==Node.ELEMENT_NODE&&g(e,this.readFeaturesFromNode(r,n));return e},n.prototype.readFeaturesFromNode=function(t,n){return r()},n.prototype.readGeometry=function(t,n){if(t){if("string"==typeof t){var e=fh(t);return this.readGeometryFromDocument(e,n)}return uh(t)?this.readGeometryFromDocument(t,n):this.readGeometryFromNode(t,n)}return null},n.prototype.readGeometryFromDocument=function(t,n){return null},n.prototype.readGeometryFromNode=function(t,n){return null},n.prototype.readProjection=function(t){if(t){if("string"==typeof t){var n=fh(t);return this.readProjectionFromDocument(n)}return uh(t)?this.readProjectionFromDocument(t):this.readProjectionFromNode(t)}return null},n.prototype.readProjectionFromDocument=function(t){return this.dataProjection},n.prototype.readProjectionFromNode=function(t){return this.dataProjection},n.prototype.writeFeature=function(t,n){var e=this.writeFeatureNode(t,n);return this.fp.serializeToString(e)},n.prototype.writeFeatureNode=function(t,n){return null},n.prototype.writeFeatures=function(t,n){var e=this.writeFeaturesNode(t,n);return this.fp.serializeToString(e)},n.prototype.writeFeaturesNode=function(t,n){return null},n.prototype.writeGeometry=function(t,n){var e=this.writeGeometryNode(t,n);return this.fp.serializeToString(e)},n.prototype.writeGeometryNode=function(t,n){return null},n}(Ik),zE=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),LE="http://www.opengis.net/gml",FE=/^[\s\xa0]*$/,GE=function(t){function n(n){var e=t.call(this)||this,r=n||{};return e.featureType=r.featureType,e.featureNS=r.featureNS,e.srsName=r.srsName,e.schemaLocation="",e.FEATURE_COLLECTION_PARSERS={},e.FEATURE_COLLECTION_PARSERS[e.namespace]={featureMember:lh(e.readFeaturesInternal),featureMembers:vh(e.readFeaturesInternal)},e.supportedMediaTypes=["application/gml+xml"],e}return zE(n,t),n.prototype.readFeaturesInternal=function(t,n){var e=t.localName,r=null;if("FeatureCollection"==e)r=_h([],this.FEATURE_COLLECTION_PARSERS,t,n,this);else if("featureMembers"==e||"featureMember"==e||"member"==e){var i=n[0],o=i.featureType,s=i.featureNS;if(!o&&t.childNodes){o=[],s={};for(var a=0,u=t.childNodes.length;a0){i[a]={hp:i[a]};for(var c=0;c0:h===Rt.POINT||h===Rt.MULTI_POINT}}a&&(u=o.get("name"),(a=a&&!!u)&&u.search(/&[^&]+;/)>-1&&(IC||(IC=document.createElement("textarea")),IC.innerHTML=u,u=IC.value));var l=e;if(t?l=t:n&&(l=LC(n,e,r)),a){var v=function(t,n){var e=[0,0],r="start",i=t.getImage();if(i){var o=i.getSize();if(o&&2==o.length){var s=i.getScaleArray(),a=i.getAnchor();e[0]=s[0]*(o[0]-a[0]),e[1]=s[1]*(o[1]/2-a[1]),r="left"}}var u=t.getText();u?((u=u.clone()).setFont(u.getFont()||CC.getFont()),u.setScale(u.getScale()||CC.getScale()),u.setFill(u.getFill()||CC.getFill()),u.setStroke(u.getStroke()||EC)):u=CC.clone();return u.setText(n),u.setOffsetX(e[0]),u.setOffsetY(e[1]),u.setTextAlign(r),new Ev({image:i,text:u})}(l[0],u);return c.length>0?(v.setGeometry(new Qk(c)),[v,new Ev({geometry:l[0].getGeometry(),image:null,fill:l[0].getFill(),stroke:l[0].getStroke(),text:null})].concat(l.slice(1))):v}return l}}(e.Style,e.styleUrl,this.Rp,this.Dp,this.Np);r.setStyle(a)}return delete e.Style,r.setProperties(e,!0),r}},n.prototype.Gp=function(t,n){var e=t.getAttribute("id");if(null!==e){var r=vR.call(this,t,n);if(r){var i=void 0,o=t.baseURI;if(o&&"about:blank"!=o||(o=window.location.href),o)i=new URL("#"+e,o).href;else i="#"+e;this.Dp[i]=r}}},n.prototype.Up=function(t,n){var e=t.getAttribute("id");if(null!==e){var r=VC.call(this,t,n);if(r){var i,o=t.baseURI;if(o&&"about:blank"!=o||(o=window.location.href),o)i=new URL("#"+e,o).href;else i="#"+e;this.Dp[i]=r}}},n.prototype.readFeatureFromNode=function(t,n){if(!y(bC,t.namespaceURI))return null;var e=this.Fp(t,[this.getReadOptions(t,n)]);return e||null},n.prototype.readFeaturesFromNode=function(t,n){if(!y(bC,t.namespaceURI))return[];var e,r=t.localName;if("Document"==r||"Folder"==r)return(e=this.Lp(t,[this.getReadOptions(t,n)]))||[];if("Placemark"==r){var i=this.Fp(t,[this.getReadOptions(t,n)]);return i?[i]:[]}if("kml"==r){e=[];for(var o=t.firstElementChild;o;o=o.nextElementSibling){var s=this.readFeaturesFromNode(o,n);s&&g(e,s)}return e}return[]},n.prototype.readName=function(t){if(t){if("string"==typeof t){var n=fh(t);return this.readNameFromDocument(n)}return uh(t)?this.readNameFromDocument(t):this.readNameFromNode(t)}},n.prototype.readNameFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE){var e=this.readNameFromNode(n);if(e)return e}},n.prototype.readNameFromNode=function(t){for(var n=t.firstElementChild;n;n=n.nextElementSibling)if(y(bC,n.namespaceURI)&&"name"==n.localName)return KE(n);for(n=t.firstElementChild;n;n=n.nextElementSibling){var e=n.localName;if(y(bC,n.namespaceURI)&&("Document"==e||"Folder"==e||"Placemark"==e||"kml"==e)){var r=this.readNameFromNode(n);if(r)return r}}},n.prototype.readNetworkLinks=function(t){var n=[];if("string"==typeof t){var e=fh(t);g(n,this.readNetworkLinksFromDocument(e))}else uh(t)?g(n,this.readNetworkLinksFromDocument(t)):g(n,this.readNetworkLinksFromNode(t));return n},n.prototype.readNetworkLinksFromDocument=function(t){for(var n=[],e=t.firstChild;e;e=e.nextSibling)e.nodeType==Node.ELEMENT_NODE&&g(n,this.readNetworkLinksFromNode(e));return n},n.prototype.readNetworkLinksFromNode=function(t){for(var n=[],e=t.firstElementChild;e;e=e.nextElementSibling)if(y(bC,e.namespaceURI)&&"NetworkLink"==e.localName){var r=_h({},xC,e,[]);n.push(r)}for(e=t.firstElementChild;e;e=e.nextElementSibling){var i=e.localName;!y(bC,e.namespaceURI)||"Document"!=i&&"Folder"!=i&&"kml"!=i||g(n,this.readNetworkLinksFromNode(e))}return n},n.prototype.readRegion=function(t){var n=[];if("string"==typeof t){var e=fh(t);g(n,this.readRegionFromDocument(e))}else uh(t)?g(n,this.readRegionFromDocument(t)):g(n,this.readRegionFromNode(t));return n},n.prototype.readRegionFromDocument=function(t){for(var n=[],e=t.firstChild;e;e=e.nextSibling)e.nodeType==Node.ELEMENT_NODE&&g(n,this.readRegionFromNode(e));return n},n.prototype.readRegionFromNode=function(t){for(var n=[],e=t.firstElementChild;e;e=e.nextElementSibling)if(y(bC,e.namespaceURI)&&"Region"==e.localName){var r=_h({},_C,e,[]);n.push(r)}for(e=t.firstElementChild;e;e=e.nextElementSibling){var i=e.localName;!y(bC,e.namespaceURI)||"Document"!=i&&"Folder"!=i&&"kml"!=i||g(n,this.readRegionFromNode(e))}return n},n.prototype.writeFeaturesNode=function(t,n){n=this.adaptOptions(n);var e=oh(bC[4],"kml"),r="http://www.w3.org/2000/xmlns/";e.setAttributeNS(r,"xmlns:gx",mC[0]),e.setAttributeNS(r,"xmlns:xsi",ih),e.setAttributeNS(ih,"xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd");var i={node:e},o={};t.length>1?o.Document=t:1==t.length&&(o.Placemark=t[0]);var s=SC[e.namespaceURI],a=wh(o,s);return Mh(i,MC,gh,a,[n],s,this),e},n}(NE);function LC(t,n,e){return Array.isArray(t)?t:"string"==typeof t?LC(e[t],n,e):n}function FC(t){var n=sh(t,!1),e=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(n);if(e){var r=e[1];return[parseInt(r.substr(6,2),16),parseInt(r.substr(4,2),16),parseInt(r.substr(2,2),16),parseInt(r.substr(0,2),16)/255]}}function GC(t){var n=sh(t,!1),e=[];n=n.replace(/\s*,\s*/g,",");for(var r,i=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?),([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|,|$)(?:([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|$))?\s*/i;r=i.exec(n);){var o=parseFloat(r[1]),s=parseFloat(r[2]),a=r[3]?parseFloat(r[3]):0;e.push(o,s,a),n=n.substr(r[0].length)}if(""===n)return e}function UC(t){var n=sh(t,!1).trim(),e=t.baseURI;return e&&"about:blank"!=e||(e=window.location.href),e?new URL(n,e).href:n}function BC(t){var n=sh(t,!1).trim().replace(/^(?!.*#)/,"#"),e=t.baseURI;return e&&"about:blank"!=e||(e=window.location.href),e?new URL(n,e).href:n}function qC(t){return VE(t)}var $C=xh(bC,{Pair:function(t,n){var e=_h({},gR,t,n,this);if(!e)return;var r=e.key;if(r&&"normal"==r){var i=e.styleUrl;i&&(n[n.length-1]=i);var o=e.Style;o&&(n[n.length-1]=o)}}});function VC(t,n){return _h(void 0,$C,t,n,this)}var ZC=xh(bC,{Icon:ph((function(t,n){var e=_h({},nR,t,n);return e||null})),color:ph(FC),heading:ph(VE),hotSpot:ph((function(t){var n,e=t.getAttribute("xunits"),r=t.getAttribute("yunits");return n="insetPixels"!==e?"insetPixels"!==r?fv:lv:"insetPixels"!==r?hv:vv,{x:parseFloat(t.getAttribute("x")),xunits:gC[e],y:parseFloat(t.getAttribute("y")),yunits:gC[r],origin:n}})),scale:ph(qC)});var WC=xh(bC,{color:ph(FC),scale:ph(qC)});var HC=xh(bC,{color:ph(FC),width:ph(VE)});var KC=xh(bC,{color:ph(FC),fill:ph(BE),outline:ph(BE)});var XC=xh(bC,{coordinates:vh(GC)});function YC(t,n){return _h(null,XC,t,n)}var JC=xh(mC,{Track:lh(tR)});var QC=xh(bC,{when:function(t,n){var e=n[n.length-1].whens,r=sh(t,!1),i=Date.parse(r);e.push(isNaN(i)?0:i)}},xh(mC,{coord:function(t,n){var e=n[n.length-1].coordinates,r=sh(t,!1),i=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(r);if(i){var o=parseFloat(i[1]),s=parseFloat(i[2]),a=parseFloat(i[3]);e.push([o,s,a])}else e.push([])}}));function tR(t,n){var e=_h({coordinates:[],whens:[]},QC,t,n);if(e){for(var r=[],i=e.coordinates,o=e.whens,s=0,a=Math.min(i.length,o.length);s0){var r=n[n.length-1];r.push.apply(r,e)}},outerBoundaryIs:function(t,n){var e=_h(void 0,SR,t,n);if(e){n[n.length-1][0]=e}}});function hR(t,n){var e=_h({},iR,t,n),r=_h([null],fR,t,n);if(r&&r[0]){for(var i=r[0],o=[i.length],s=1,a=r.length;s0,f=u.href;f?r=f:c&&(r=pC);var h,l=fv,v=e.hotSpot;v?(i=[v.x,v.y],o=v.xunits,s=v.yunits,l=v.origin):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(r)&&(/pushpin/.test(r)?(i=hC,o=lC,s=vC):/arrow-reverse/.test(r)?(i=[54,42],o=lC,s=vC):/paddle/.test(r)&&(i=[32,1],o=lC,s=vC));var d,p=u.x,y=u.y;void 0!==p&&void 0!==y&&(h=[p,y]);var m,b=u.w,g=u.h;void 0!==b&&void 0!==g&&(d=[b,g]);var w=e.heading;void 0!==w&&(m=de(w));var x=e.scale,k=e.color;if(c){r==pC&&(d=dC);var _=new wv({anchor:i,anchorOrigin:l,anchorXUnits:o,anchorYUnits:s,crossOrigin:this.qt,offset:h,offsetOrigin:fv,rotation:m,scale:x,size:d,src:this.zp(r),color:k}),S=_.getScaleArray()[0],M=_.getSize();if(null===M){var j=_.getImageState();if(j===ao||j===uo){_.listenImageChange((function t(){var n=_.getImageState();if(n!==ao&&n!==uo){var e=_.getSize();if(e&&2==e.length){var r=DC(e);_.setScale(S*r)}_.unlistenImageChange(t)}})),j===ao&&_.load()}}else if(2==M.length){var T=DC(M);_.setScale(S*T)}a.imageStyle=_}else a.imageStyle=TC}},LabelStyle:function(t,n){var e=_h({},WC,t,n);if(e){var r=n[n.length-1],i=new Rv({fill:new av({color:"color"in e?e.color:fC}),scale:e.scale});r.textStyle=i}},LineStyle:function(t,n){var e=_h({},HC,t,n);if(e){var r=n[n.length-1],i=new xv({color:"color"in e?e.color:fC,width:"width"in e?e.width:1});r.strokeStyle=i}},PolyStyle:function(t,n){var e=_h({},KC,t,n);if(e){var r=n[n.length-1],i=new av({color:"color"in e?e.color:fC});r.fillStyle=i;var o=e.fill;void 0!==o&&(r.fill=o);var s=e.outline;void 0!==s&&(r.outline=s)}}});function vR(t,n){var e=_h({},lR,t,n,this);if(!e)return null;var r,i="fillStyle"in e?e.fillStyle:jC,o=e.fill;void 0===o||o||(i=null),"imageStyle"in e?e.imageStyle!=TC&&(r=e.imageStyle):r=OC;var s="textStyle"in e?e.textStyle:CC,a="strokeStyle"in e?e.strokeStyle:AC,u=e.outline;return void 0===u||u?[new Ev({fill:i,image:r,stroke:a,text:s,zIndex:void 0})]:[new Ev({geometry:function(t){var n=t.getGeometry(),e=n.getType();return e===Rt.GEOMETRY_COLLECTION?new Qk(n.getGeometriesArrayRecursive().filter((function(t){var n=t.getType();return n!==Rt.POLYGON&&n!==Rt.MULTI_POLYGON}))):e!==Rt.POLYGON&&e!==Rt.MULTI_POLYGON?n:void 0},fill:i,image:r,stroke:a,text:s,zIndex:void 0}),new Ev({geometry:function(t){var n=t.getGeometry(),e=n.getType();return e===Rt.GEOMETRY_COLLECTION?new Qk(n.getGeometriesArrayRecursive().filter((function(t){var n=t.getType();return n===Rt.POLYGON||n===Rt.MULTI_POLYGON}))):e===Rt.POLYGON||e===Rt.MULTI_POLYGON?n:void 0},fill:i,stroke:null,zIndex:void 0})]}function dR(t,n){var e,r,i,o=n.length,s=new Array(n.length),a=new Array(n.length),u=new Array(n.length);e=!1,r=!1,i=!1;for(var c=0;c0){var m=wh(i,s);Mh(r,KR,YR,[{names:s,values:m}],e)}var b=e[0],g=n.getGeometry();g&&(g=Pk(g,!0,b)),Mh(r,KR,GR,[g],e)}var QR=xh(bC,["extrude","tessellate","altitudeMode","coordinates"]),tI=xh(bC,{extrude:yh(XE),tessellate:yh(XE),altitudeMode:yh(nA),coordinates:yh((function(t,n,e){var r,i=e[e.length-1],o=i.layout,s=i.stride;o==Ot||o==At?r=2:o==Et||o==Ct?r=3:St(!1,34);var a=n.length,u="";if(a>0){u+=n[0];for(var c=1;c>1):i>>1}return n}function WI(t){for(var n="",e=0,r=t.length;e=32;)n=63+(32|31&t),e+=String.fromCharCode(n),t>>=5;return n=t+63,e+=String.fromCharCode(n)}var XI=function(t){function n(n){var e=t.call(this)||this,r=n||{};return e.dataProjection=lr("EPSG:4326"),e.Bp=r.factor?r.factor:1e5,e.qp=r.geometryLayout?r.geometryLayout:Ot,e}return GI(n,t),n.prototype.readFeatureFromText=function(t,n){var e=this.readGeometryFromText(t,n);return new Tt(e)},n.prototype.readFeaturesFromText=function(t,n){return[this.readFeatureFromText(t,n)]},n.prototype.readGeometryFromText=function(t,n){var e=$r(this.qp),r=BI(t,e,this.Bp);jE(r,0,r.length,e,r);var i=hi(r,0,r.length,e);return Pk(new mk(i,this.qp),!1,this.adaptOptions(n))},n.prototype.writeFeatureText=function(t,n){var e=t.getGeometry();return e?this.writeGeometryText(e,n):(St(!1,40),"")},n.prototype.writeFeaturesText=function(t,n){return this.writeFeatureText(t[0],n)},n.prototype.writeGeometryText=function(t,n){var e=(t=Pk(t,!0,this.adaptOptions(n))).getFlatCoordinates(),r=t.getStride();return jE(e,0,e.length,r,e),UI(e,r,this.Bp)},n}(QA),YI=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),JI=function(t){function n(n){var e=t.call(this)||this,r=n||{};return e.Pl=r.layerName,e.Mc=r.layers?r.layers:null,e.dataProjection=lr(r.dataProjection?r.dataProjection:"EPSG:4326"),e}return YI(n,t),n.prototype.readFeaturesFromObject=function(t,n){if("Topology"==t.type){var e=t,r=void 0,i=null,o=null;e.transform&&(i=(r=e.transform).scale,o=r.translate);var s=e.arcs;r&&function(t,n,e){for(var r=0,i=t.length;r0&&i.pop(),r=e>=0?n[e]:n[~e].slice().reverse(),i.push.apply(i,r);for(var a=0,u=i.length;a=2,57),r}return aP(n,t),n}(sP),cP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),fP=function(t){function n(n){return t.call(this,"And",Array.prototype.slice.call(arguments))||this}return cP(n,t),n}(uP),hP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),lP=function(t){function n(n,e,r){var i=t.call(this,"BBOX")||this;if(i.geometryName=n,i.extent=e,4!==e.length)throw new Error("Expected an extent with four values ([minX, minY, maxX, maxY])");return i.srsName=r,i}return hP(n,t),n}(sP),vP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),dP=function(t){function n(n,e,r,i){var o=t.call(this,n)||this;return o.geometryName=e||"the_geom",o.geometry=r,o.srsName=i,o}return vP(n,t),n}(sP),pP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),yP=function(t){function n(n,e,r){return t.call(this,"Contains",n,e,r)||this}return pP(n,t),n}(dP),mP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),bP=function(t){function n(n,e,r,i,o){var s=t.call(this,"DWithin",n,e,o)||this;return s.distance=r,s.unit=i,s}return mP(n,t),n}(dP),gP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),wP=function(t){function n(n,e,r){return t.call(this,"Disjoint",n,e,r)||this}return gP(n,t),n}(dP),xP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),kP=function(t){function n(n,e){var r=t.call(this,n)||this;return r.propertyName=e,r}return xP(n,t),n}(sP),_P=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),SP=function(t){function n(n,e,r){var i=t.call(this,"During",n)||this;return i.begin=e,i.end=r,i}return _P(n,t),n}(kP),MP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),jP=function(t){function n(n,e,r,i){var o=t.call(this,n,e)||this;return o.expression=r,o.matchCase=i,o}return MP(n,t),n}(kP),TP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),OP=function(t){function n(n,e,r){return t.call(this,"PropertyIsEqualTo",n,e,r)||this}return TP(n,t),n}(jP),EP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),AP=function(t){function n(n,e){return t.call(this,"PropertyIsGreaterThan",n,e)||this}return EP(n,t),n}(jP),CP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),RP=function(t){function n(n,e){return t.call(this,"PropertyIsGreaterThanOrEqualTo",n,e)||this}return CP(n,t),n}(jP),IP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),PP=function(t){function n(n,e,r){return t.call(this,"Intersects",n,e,r)||this}return IP(n,t),n}(dP),DP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),NP=function(t){function n(n,e,r){var i=t.call(this,"PropertyIsBetween",n)||this;return i.lowerBoundary=e,i.upperBoundary=r,i}return DP(n,t),n}(kP),zP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),LP=function(t){function n(n,e,r,i,o,s){var a=t.call(this,"PropertyIsLike",n)||this;return a.pattern=e,a.wildCard=void 0!==r?r:"*",a.singleChar=void 0!==i?i:".",a.escapeChar=void 0!==o?o:"!",a.matchCase=s,a}return zP(n,t),n}(kP),FP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),GP=function(t){function n(n){return t.call(this,"PropertyIsNull",n)||this}return FP(n,t),n}(kP),UP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),BP=function(t){function n(n,e){return t.call(this,"PropertyIsLessThan",n,e)||this}return UP(n,t),n}(jP),qP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),$P=function(t){function n(n,e){return t.call(this,"PropertyIsLessThanOrEqualTo",n,e)||this}return qP(n,t),n}(jP),VP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),ZP=function(t){function n(n){var e=t.call(this,"Not")||this;return e.condition=n,e}return VP(n,t),n}(sP),WP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),HP=function(t){function n(n,e,r){return t.call(this,"PropertyIsNotEqualTo",n,e,r)||this}return WP(n,t),n}(jP),KP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),XP=function(t){function n(n){return t.call(this,"Or",Array.prototype.slice.call(arguments))||this}return KP(n,t),n}(uP),YP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),JP=function(t){function n(n){var e=t.call(this,"ResourceId")||this;return e.rid=n,e}return YP(n,t),n}(sP),QP=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),tD=function(t){function n(n,e,r){return t.call(this,"Within",n,e,r)||this}return QP(n,t),n}(dP);function nD(t){var n=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(fP,n))}function eD(t,n,e){return new lP(t,n,e)}var rD=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),iD={"http://www.opengis.net/gml":{boundedBy:ph(UE.prototype.readGeometryElement,"bounds")},"http://www.opengis.net/wfs/2.0":{member:lh(UE.prototype.readFeaturesInternal)}},oD={"http://www.opengis.net/wfs":{totalInserted:ph(WE),totalUpdated:ph(WE),totalDeleted:ph(WE)},"http://www.opengis.net/wfs/2.0":{totalInserted:ph(WE),totalUpdated:ph(WE),totalDeleted:ph(WE)}},sD={"http://www.opengis.net/wfs":{TransactionSummary:ph(bD,"transactionSummary"),InsertResults:ph(kD,"insertIds")},"http://www.opengis.net/wfs/2.0":{TransactionSummary:ph(bD,"transactionSummary"),InsertResults:ph(kD,"insertIds")}},aD={"http://www.opengis.net/wfs":{PropertyName:yh(nA)},"http://www.opengis.net/wfs/2.0":{PropertyName:yh(nA)}},uD={"http://www.opengis.net/wfs":{Insert:yh(_D),Update:yh(TD),Delete:yh(jD),Property:yh(OD),Native:yh(ED)},"http://www.opengis.net/wfs/2.0":{Insert:yh(_D),Update:yh(TD),Delete:yh(jD),Property:yh(OD),Native:yh(ED)}},cD="feature",fD="http://www.w3.org/2000/xmlns/",hD={"2.0.0":"http://www.opengis.net/ogc/1.1","1.1.0":"http://www.opengis.net/ogc","1.0.0":"http://www.opengis.net/ogc"},lD={"2.0.0":"http://www.opengis.net/wfs/2.0","1.1.0":"http://www.opengis.net/wfs","1.0.0":"http://www.opengis.net/wfs"},vD={"2.0.0":"http://www.opengis.net/fes/2.0","1.1.0":"http://www.opengis.net/fes","1.0.0":"http://www.opengis.net/fes"},dD={"2.0.0":"http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd","1.1.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd","1.0.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd"},pD={"2.0.0":dA,"1.1.0":cA,"1.0.0":oA},yD=function(t){function n(n){var e=t.call(this)||this,r=n||{};return e.qc=r.version?r.version:"1.1.0",e.Vp=r.featureType,e.Zp=r.featureNS,e.Wp=r.gmlFormat?r.gmlFormat:new pD[e.qc],e.Hp=r.schemaLocation?r.schemaLocation:dD[e.qc],e}return rD(n,t),n.prototype.getFeatureType=function(){return this.Vp},n.prototype.setFeatureType=function(t){this.Vp=t},n.prototype.readFeaturesFromNode=function(t,n){var e={node:t};O(e,{featureType:this.Vp,featureNS:this.Zp}),O(e,this.getReadOptions(t,n||{}));var r=[e],i=_h([],"2.0.0"===this.qc?iD:this.Wp.FEATURE_COLLECTION_PARSERS,t,r,this.Wp);return i||(i=[]),i},n.prototype.readTransactionResponse=function(t){if(t){if("string"==typeof t){var n=fh(t);return this.readTransactionResponseFromDocument(n)}return uh(t)?this.readTransactionResponseFromDocument(t):this.readTransactionResponseFromNode(t)}},n.prototype.readFeatureCollectionMetadata=function(t){if(t){if("string"==typeof t){var n=fh(t);return this.readFeatureCollectionMetadataFromDocument(n)}return uh(t)?this.readFeatureCollectionMetadataFromDocument(t):this.readFeatureCollectionMetadataFromNode(t)}},n.prototype.readFeatureCollectionMetadataFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE)return this.readFeatureCollectionMetadataFromNode(n)},n.prototype.readFeatureCollectionMetadataFromNode=function(t){var n={},e=HE(t.getAttribute("numberOfFeatures"));return n.numberOfFeatures=e,_h(n,iD,t,[],this.Wp)},n.prototype.readTransactionResponseFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE)return this.readTransactionResponseFromNode(n)},n.prototype.readTransactionResponseFromNode=function(t){return _h({},sD,t,[])},n.prototype.writeGetFeature=function(t){var n=this,e=oh(lD[this.qc],"GetFeature");e.setAttribute("service","WFS"),e.setAttribute("version",this.qc),t.handle&&e.setAttribute("handle",t.handle),t.outputFormat&&e.setAttribute("outputFormat",t.outputFormat),void 0!==t.maxFeatures&&e.setAttribute("maxFeatures",String(t.maxFeatures)),t.resultType&&e.setAttribute("resultType",t.resultType),void 0!==t.startIndex&&e.setAttribute("startIndex",String(t.startIndex)),void 0!==t.count&&e.setAttribute("count",String(t.count)),void 0!==t.viewParams&&e.setAttribute("viewParams",t.viewParams),e.setAttributeNS(ih,"xsi:schemaLocation",this.Hp);var r={node:e};if(O(r,{version:this.qc,srsName:t.srsName,featureNS:t.featureNS?t.featureNS:this.Zp,featurePrefix:t.featurePrefix,propertyNames:t.propertyNames?t.propertyNames:[]}),St(Array.isArray(t.featureTypes),11),"string"==typeof t.featureTypes[0]){var i=t.filter;t.bbox&&(St(t.geometryName,12),i=this.combineBboxAndFilter(t.geometryName,t.bbox,t.srsName,i)),O(r,{geometryName:t.geometryName,filter:i}),WD(e,t.featureTypes,[r])}else t.featureTypes.forEach((function(i){var o=n.combineBboxAndFilter(i.geometryName,i.bbox,t.srsName,t.filter);O(r,{geometryName:i.geometryName,filter:o}),WD(e,[i.name],[r])}));return e},n.prototype.combineBboxAndFilter=function(t,n,e,r){var i=eD(t,n,e);return r?nD(r,i):i},n.prototype.writeTransaction=function(t,n,e,r){var i,o=[],s=r.version?r.version:this.qc,a=oh(lD[s],"Transaction");a.setAttribute("service","WFS"),a.setAttribute("version",s),r&&(i=r.gmlOptions?r.gmlOptions:{},r.handle&&a.setAttribute("handle",r.handle)),a.setAttributeNS(ih,"xsi:schemaLocation",dD[s]);var u=function(t,n,e,r){var i,o=r.featurePrefix?r.featurePrefix:cD;"1.0.0"===e?i=2:"1.1.0"===e?i=3:"2.0.0"===e&&(i=3.2);return O({node:t},{version:e,featureNS:r.featureNS,featureType:r.featureType,featurePrefix:o,gmlVersion:i,hasZ:r.hasZ,srsName:r.srsName},n)}(a,i,s,r);return t&&mD("Insert",t,o,u),n&&mD("Update",n,o,u),e&&mD("Delete",e,o,u),r.nativeElements&&mD("Native",r.nativeElements,o,u),a},n.prototype.readProjectionFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE)return this.readProjectionFromNode(n);return null},n.prototype.readProjectionFromNode=function(t){if(t.firstElementChild&&t.firstElementChild.firstElementChild)for(var n=(t=t.firstElementChild.firstElementChild).firstElementChild;n;n=n.nextElementSibling)if(0!==n.childNodes.length&&(1!==n.childNodes.length||3!==n.firstChild.nodeType)){var e=[{}];return this.Wp.readGeometryElement(n,e),lr(e.pop().srsName)}return null},n}(NE);function mD(t,n,e,r){Mh(r,uD,bh(t),n,e)}function bD(t,n){return _h({},oD,t,n)}var gD={"http://www.opengis.net/ogc":{FeatureId:lh((function(t,n){return t.getAttribute("fid")}))},"http://www.opengis.net/ogc/1.1":{FeatureId:lh((function(t,n){return t.getAttribute("fid")}))}};function wD(t,n){kh(gD,t,n)}var xD={"http://www.opengis.net/wfs":{Feature:wD},"http://www.opengis.net/wfs/2.0":{Feature:wD}};function kD(t,n){return _h([],xD,t,n)}function _D(t,n,e){var r=e[e.length-1],i=r.featureType,o=r.featureNS,s=r.gmlVersion,a=oh(o,i);t.appendChild(a),2===s?oA.prototype.writeFeatureElement(a,n,e):3===s?cA.prototype.writeFeatureElement(a,n,e):dA.prototype.writeFeatureElement(a,n,e)}function SD(t,n,e){var r=e[e.length-1].version,i=hD[r],o=oh(i,"Filter"),s=oh(i,"FeatureId");o.appendChild(s),s.setAttribute("fid",n),t.appendChild(o)}function MD(t,n){var e=(t=t||cD)+":";return 0===n.indexOf(e)?n:e+n}function jD(t,n,e){var r=e[e.length-1];St(void 0!==n.getId(),26);var i=r.featureType,o=r.featurePrefix,s=r.featureNS,a=MD(o,i);t.setAttribute("typeName",a),t.setAttributeNS(fD,"xmlns:"+o,s);var u=n.getId();void 0!==u&&SD(t,u,e)}function TD(t,n,e){var r=e[e.length-1];St(void 0!==n.getId(),27);var i=r.version,o=r.featureType,s=r.featurePrefix,a=r.featureNS,u=MD(s,o),c=n.getGeometryName();t.setAttribute("typeName",u),t.setAttributeNS(fD,"xmlns:"+s,a);var f=n.getId();if(void 0!==f){for(var h=n.getKeys(),l=[],v=0,d=h.length;v0,e=this.readUint32(n),r=Math.floor((268435455&e)/1e3),i=Boolean(2147483648&e)||1===r||3===r,o=Boolean(1073741824&e)||2===r||3===r,s=Boolean(536870912&e),a=(268435455&e)%1e3,u=["XY",i?"Z":"",o?"M":""].join(""),c=s?this.readUint32(n):null;if(void 0!==t&&t!==a)throw new Error("Unexpected WKB geometry type "+a);if(this.Yp){if(this.Jp!==n)throw new Error("Inconsistent endian");if(this.ey!==u)throw new Error("Inconsistent geometry layout");if(c&&this.ny!==c)throw new Error("Inconsistent coordinate system (SRID)")}else this.Jp=n,this.Qp=i,this.ty=o,this.ey=u,this.ny=c,this.Yp=!0;return a},t.prototype.readWkbPayload=function(t){switch(t){case YD:return this.readPoint();case JD:return this.readLineString();case QD:case sN:return this.readPolygon();case tN:return this.readMultiPoint();case nN:return this.readMultiLineString();case eN:case iN:case oN:return this.readMultiPolygon();case rN:return this.readGeometryCollection();default:throw new Error("Unsupported WKB geometry type "+t+" is found")}},t.prototype.readWkbBlock=function(t){return this.readWkbPayload(this.readWkbHeader(t))},t.prototype.readWkbCollection=function(t,n){for(var e=this.readUint32(),r=[],i=0;i=0&&(t+=this.iy?2147483648:1e3),this.ey.indexOf("M")>=0&&(t+=this.iy?1073741824:2e3),this.iy&&Number.isInteger(n)&&(t|=536870912),this.writeUint8(this.Jp?1:0),this.writeUint32(t),this.iy&&Number.isInteger(n)&&this.writeUint32(n)},t.prototype.writeMultiPoint=function(t,n){this.writeUint32(t.length);for(var e=0;e="a"&&t<="z"||t>="A"&&t<="Z"},t.prototype.xy=function(t,n){return t>="0"&&t<="9"||"."==t&&!(void 0!==n&&n)},t.prototype.ky=function(t){return" "==t||"\t"==t||"\r"==t||"\n"==t},t.prototype._y=function(){return this.wkt.charAt(++this.gy)},t.prototype.nextToken=function(){var t,n=this._y(),e=this.gy,r=n;if("("==n)t=yN;else if(","==n)t=gN;else if(")"==n)t=mN;else if(this.xy(n)||"-"==n)t=bN,r=this.Sy();else if(this.wy(n))t=pN,r=this.My();else{if(this.ky(n))return this.nextToken();if(""!==n)throw new Error("Unexpected character: "+n);t=wN}return{position:e,value:r,type:t}},t.prototype.Sy=function(){var t,n=this.gy,e=!1,r=!1;do{"."==t?e=!0:"e"!=t&&"E"!=t||(r=!0),t=this._y()}while(this.xy(t,e)||!r&&("e"==t||"E"==t)||r&&("-"==t||"+"==t));return parseFloat(this.wkt.substring(n,this.gy--))},t.prototype.My=function(){var t,n=this.gy;do{t=this._y()}while(this.wy(t));return this.wkt.substring(n,this.gy--).toUpperCase()},t}(),SN=function(){function t(t){this.jy=t,this.Ty={position:0,type:dN},this.ey=Ot}return t.prototype.Oy=function(){this.Ty=this.jy.nextToken()},t.prototype.isTokenType=function(t){return this.Ty.type==t},t.prototype.match=function(t){var n=this.isTokenType(t);return n&&this.Oy(),n},t.prototype.parse=function(){return this.Oy(),this.Ey()},t.prototype.Ay=function(){var t=Ot,n=this.Ty;if(this.isTokenType(pN)){var e=n.value;"Z"===e?t=Et:"M"===e?t=At:"ZM"===e&&(t=Ct),t!==Ot&&this.Oy()}return t},t.prototype.Cy=function(){if(this.match(yN)){var t=[];do{t.push(this.Ey())}while(this.match(gN));if(this.match(mN))return t}throw new Error(this.Ry())},t.prototype.Iy=function(){if(this.match(yN)){var t=this.Py();if(this.match(mN))return t}throw new Error(this.Ry())},t.prototype.Dy=function(){if(this.match(yN)){var t=this.Ny();if(this.match(mN))return t}throw new Error(this.Ry())},t.prototype.zy=function(){if(this.match(yN)){var t=this.Ly();if(this.match(mN))return t}throw new Error(this.Ry())},t.prototype.Fy=function(){if(this.match(yN)){var t=void 0;if(t=this.Ty.type==yN?this.Gy():this.Ny(),this.match(mN))return t}throw new Error(this.Ry())},t.prototype.Uy=function(){if(this.match(yN)){var t=this.Ly();if(this.match(mN))return t}throw new Error(this.Ry())},t.prototype.By=function(){if(this.match(yN)){var t=this.qy();if(this.match(mN))return t}throw new Error(this.Ry())},t.prototype.Py=function(){for(var t=[],n=this.ey.length,e=0;e0&&(n+=" "+r)}return 0===e.length?n+" "+vN:n+"("+e+")"}var CN=MN,RN=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),IN=[null,"http://www.opengis.net/wms"],PN=xh(IN,{Service:ph((function(t,n){return _h({},zN,t,n)})),Capability:ph((function(t,n){return _h({},DN,t,n)}))}),DN=xh(IN,{Request:ph((function(t,n){return _h({},VN,t,n)})),Exception:ph((function(t,n){return _h([],UN,t,n)})),Layer:ph((function(t,n){var e=_h({},BN,t,n);if(void 0===e.Layer)return Object.assign(e,JN(t,n));return e}))}),NN=function(t){function n(){var n=t.call(this)||this;return n.version=void 0,n}return RN(n,t),n.prototype.readFromNode=function(t){this.version=t.getAttribute("version").trim();var n=_h({version:this.version},PN,t,[]);return n||null},n}(wI),zN=xh(IN,{Name:ph(KE),Title:ph(KE),Abstract:ph(KE),KeywordList:ph(ez),OnlineResource:ph(xI),ContactInformation:ph((function(t,n){return _h({},LN,t,n)})),Fees:ph(KE),AccessConstraints:ph(KE),LayerLimit:ph(WE),MaxWidth:ph(WE),MaxHeight:ph(WE)}),LN=xh(IN,{ContactPersonPrimary:ph((function(t,n){return _h({},FN,t,n)})),ContactPosition:ph(KE),ContactAddress:ph((function(t,n){return _h({},GN,t,n)})),ContactVoiceTelephone:ph(KE),ContactFacsimileTelephone:ph(KE),ContactElectronicMailAddress:ph(KE)}),FN=xh(IN,{ContactPerson:ph(KE),ContactOrganization:ph(KE)}),GN=xh(IN,{AddressType:ph(KE),Address:ph(KE),City:ph(KE),StateOrProvince:ph(KE),PostCode:ph(KE),Country:ph(KE)}),UN=xh(IN,{Format:lh(KE)}),BN=xh(IN,{Name:ph(KE),Title:ph(KE),Abstract:ph(KE),KeywordList:ph(ez),CRS:dh(KE),EX_GeographicBoundingBox:ph((function(t,n){var e=_h({},$N,t,n);if(!e)return;var r=e.westBoundLongitude,i=e.southBoundLatitude,o=e.eastBoundLongitude,s=e.northBoundLatitude;if(void 0===r||void 0===i||void 0===o||void 0===s)return;return[r,i,o,s]})),BoundingBox:dh((function(t,n){var e=[ZE(t.getAttribute("minx")),ZE(t.getAttribute("miny")),ZE(t.getAttribute("maxx")),ZE(t.getAttribute("maxy"))],r=[ZE(t.getAttribute("resx")),ZE(t.getAttribute("resy"))];return{crs:t.getAttribute("CRS"),extent:e,res:r}})),Dimension:dh((function(t,n){return{name:t.getAttribute("name"),units:t.getAttribute("units"),unitSymbol:t.getAttribute("unitSymbol"),default:t.getAttribute("default"),multipleValues:qE(t.getAttribute("multipleValues")),nearestValue:qE(t.getAttribute("nearestValue")),current:qE(t.getAttribute("current")),values:KE(t)}})),Attribution:ph((function(t,n){return _h({},qN,t,n)})),AuthorityURL:dh((function(t,n){var e=QN(t,n);if(e)return e.name=t.getAttribute("name"),e;return})),Identifier:dh(KE),MetadataURL:dh((function(t,n){var e=QN(t,n);if(e)return e.type=t.getAttribute("type"),e;return})),DataURL:dh(QN),FeatureListURL:dh(QN),Style:dh((function(t,n){return _h({},KN,t,n)})),MinScaleDenominator:ph(VE),MaxScaleDenominator:ph(VE),Layer:dh(JN)}),qN=xh(IN,{Title:ph(KE),OnlineResource:ph(xI),LogoURL:ph(nz)}),$N=xh(IN,{westBoundLongitude:ph(VE),eastBoundLongitude:ph(VE),southBoundLatitude:ph(VE),northBoundLatitude:ph(VE)}),VN=xh(IN,{GetCapabilities:ph(tz),GetMap:ph(tz),GetFeatureInfo:ph(tz)}),ZN=xh(IN,{Format:dh(KE),DCPType:dh((function(t,n){return _h({},WN,t,n)}))}),WN=xh(IN,{HTTP:ph((function(t,n){return _h({},HN,t,n)}))}),HN=xh(IN,{Get:ph(QN),Post:ph(QN)}),KN=xh(IN,{Name:ph(KE),Title:ph(KE),Abstract:ph(KE),LegendURL:dh(nz),StyleSheetURL:ph(QN),StyleURL:ph(QN)}),XN=xh(IN,{Format:ph(KE),OnlineResource:ph(xI)}),YN=xh(IN,{Keyword:lh(KE)});function JN(t,n){var e=n[n.length-1],r=_h({},BN,t,n);if(r){var i=qE(t.getAttribute("queryable"));void 0===i&&(i=e.queryable),r.queryable=void 0!==i&&i;var o=HE(t.getAttribute("cascaded"));void 0===o&&(o=e.cascaded),r.cascaded=o;var s=qE(t.getAttribute("opaque"));void 0===s&&(s=e.opaque),r.opaque=void 0!==s&&s;var a=qE(t.getAttribute("noSubsets"));void 0===a&&(a=e.noSubsets),r.noSubsets=void 0!==a&&a;var u=ZE(t.getAttribute("fixedWidth"));u||(u=e.fixedWidth),r.fixedWidth=u;var c=ZE(t.getAttribute("fixedHeight"));c||(c=e.fixedHeight),r.fixedHeight=c;["Style","CRS","AuthorityURL"].forEach((function(t){if(t in e){var n=r[t]||[];r[t]=n.concat(e[t])}}));return["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"].forEach((function(t){if(!(t in r)){var n=e[t];r[t]=n}})),r}}function QN(t,n){return _h({},XN,t,n)}function tz(t,n){return _h({},ZN,t,n)}function nz(t,n){var e=QN(t,n);if(e){var r=[HE(t.getAttribute("width")),HE(t.getAttribute("height"))];return e.size=r,e}}function ez(t,n){return _h([],YN,t,n)}var rz=NN,iz=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),oz=function(t){function n(n){var e=t.call(this)||this,r=n||{};return e.Zp="http://mapserver.gis.umn.edu/mapserver",e.Wp=new oA,e.Mc=r.layers?r.layers:null,e}return iz(n,t),n.prototype.getLayers=function(){return this.Mc},n.prototype.setLayers=function(t){this.Mc=t},n.prototype.Wy=function(t,n){t.setAttribute("namespaceURI",this.Zp);var e=t.localName,r=[];if(0===t.childNodes.length)return r;if("msGMLOutput"==e)for(var i=0,o=t.childNodes.length;if*zz||c>h*zz?this.xm():Mn(o,r)||this.Sm()}}},n.prototype.xm=function(){var t=this.getMap(),n=this.pm,e=t.getSize(),r=t.getView().calculateExtentInternal(e),i=n.getView(),o=Math.log(7.5)/Math.LN2;ee(r,1/(Math.pow(2,o/2)*Lz)),i.fitInternal(qi(r))},n.prototype.Sm=function(){var t=this.getMap(),n=this.pm,e=t.getView();n.getView().setCenterInternal(e.getCenterInternal())},n.prototype.Mm=function(){var t=this.getMap(),n=this.pm;if(t.isRendered()&&n.isRendered()){var e=t.getSize(),r=t.getView(),i=n.getView(),o=this.Ss?0:-r.getRotation(),s=this.ym,a=this.ym.getElement(),u=r.getCenterInternal(),c=r.getResolution(),f=i.getResolution(),h=e[0]*c/f,l=e[1]*c/f;if(s.setPosition(u),a){a.style.width=h+"px",a.style.height=l+"px";var v="rotate("+o+"rad)";a.style.transform=v}}},n.prototype.km=function(){this.jm||(this.jm=X(this.pm,ha,(function(t){delete this.jm,this.Mm()}),this))},n.prototype.Mr=function(t){t.preventDefault(),this.Ar()},n.prototype.Ar=function(){this.element.classList.toggle(xs),this.mr?xo(this.kr,this._r):xo(this._r,this.kr),this.mr=!this.mr;var t=this.pm;if(!this.mr){if(t.isRendered())return this.vm=void 0,void t.render();t.updateSize(),this.xm(),this.km()}},n.prototype.getCollapsible=function(){return this.wr},n.prototype.setCollapsible=function(t){this.wr!==t&&(this.wr=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.mr&&this.Ar())},n.prototype.setCollapsed=function(t){this.wr&&this.mr!==t&&this.Ar()},n.prototype.getCollapsed=function(){return this.mr},n.prototype.getRotateWithView=function(){return this.Ss},n.prototype.setRotateWithView=function(t){this.Ss!==t&&(this.Ss=t,0!==this.getMap().getView().getRotation()&&(this.Ss?this.lm():this.pm.getView().setRotation(0),this.vm=void 0,this._m(),this.Mm()))},n.prototype.getOverviewMap=function(){return this.pm},n.prototype.render=function(t){this._m(),this.Mm()},n}(nu),Uz=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Bz="units",qz="degrees",$z="imperial",Vz="nautical",Zz="metric",Wz="us",Hz=[1,2,5],Kz=25.4/.28,Xz=function(t){function n(n){var e=this,r=n||{},i=void 0!==r.className?r.className:r.bar?"ol-scale-bar":"ol-scale-line";return(e=t.call(this,{element:document.createElement("div"),render:r.render,target:r.target})||this).on,e.once,e.un,e.Tm=document.createElement("div"),e.Tm.className=i+"-inner",e.element.className=i+" "+bs,e.element.appendChild(e.Tm),e.Om=null,e.Em=void 0!==r.minWidth?r.minWidth:64,e.yn=!1,e.Am=void 0,e.am="",e.addChangeListener(Bz,e.Cm),e.setUnits(r.units||Zz),e.Rm=r.bar||!1,e.Im=r.steps||4,e.Pm=r.text||!1,e.Dm=r.dpi||void 0,e}return Uz(n,t),n.prototype.getUnits=function(){return this.get(Bz)},n.prototype.Cm=function(){this.Er()},n.prototype.setUnits=function(t){this.set(Bz,t)},n.prototype.setDpi=function(t){this.Dm=t},n.prototype.Er=function(){var t=this.Om;if(t){var n=t.center,e=t.projection,r=this.getUnits(),i=r==qz?Lt.DEGREES:Lt.METERS,o=vr(e,t.resolution,n,i),s=this.Em*(this.Dm||Kz)/Kz,a=s*o,u="";if(r==qz){var c=Nt[Lt.DEGREES];(a*=c)=s)break;++d}v=this.Rm?this.createScaleBar(h,f,u):f.toFixed(l<0?-l:0)+" "+u,this.am!=v&&(this.Tm.innerHTML=v,this.am=v),this.Am!=h&&(this.Tm.style.width=h+"px",this.Am=h),this.yn||(this.element.style.display="",this.yn=!0)}else this.yn&&(this.element.style.display="none",this.yn=!1)},n.prototype.createScaleBar=function(t,n,e){for(var r="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),i=[],o=t/this.Im,s="#ffffff",a=0;a
'+this.createMarker("relative",a)+(a%2==0||2===this.Im?this.createStepText(a,t,!1,n,e):"")+""),a===this.Im-1&&i.push(this.createStepText(a+1,t,!0,n,e)),s="#ffffff"===s?"#000000":"#ffffff";return'
'+(this.Pm?'
'+r+"
":"")+i.join("")+"
"},n.prototype.createMarker=function(t,n){return'
'},n.prototype.createStepText=function(t,n,e,r,i){var o=(0===t?0:Math.round(r/this.Im*t*100)/100)+(0===t?"":" "+i);return'
'+o+"
"},n.prototype.getScaleForResolution=function(){var t=vr(this.Om.projection,this.Om.resolution,this.Om.center),n=this.Dm||Kz,e=this.Om.projection.getMetersPerUnit();return parseFloat(t.toString())*e*(1e3/25.4)*n},n.prototype.render=function(t){var n=t.frameState;this.Om=n?n.viewState:null,this.Er()},n}(nu),Yz=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),Jz=0,Qz=1,tL=function(t){function n(n){var e=this,r=n||{};(e=t.call(this,{element:document.createElement("div"),render:r.render})||this).On=[],e.Nm=void 0,e.zm=Jz,e.Tn,e.Lm=0,e.Fm=0,e.Gm,e.Um,e.Bm=null,e.qm=!1,e.Rr=void 0!==r.duration?r.duration:200;var i=void 0!==r.className?r.className:"ol-zoomslider",o=document.createElement("button");o.setAttribute("type","button"),o.className=i+"-thumb "+bs;var s=e.element;return s.className=i+" "+"ol-unselectable "+ws,s.appendChild(o),s.addEventListener(sa,e.$m.bind(e),!1),s.addEventListener(oa,e.Vm.bind(e),!1),s.addEventListener(aa,e.Zm.bind(e),!1),s.addEventListener(L,e.Wm.bind(e),!1),o.addEventListener(L,f,!1),e}return Yz(n,t),n.prototype.setMap=function(n){t.prototype.setMap.call(this,n),n&&n.render()},n.prototype.Hm=function(){var t=this.element,n=t.offsetWidth,e=t.offsetHeight;if(0===n&&0===e)return this.qm=!1;var r=getComputedStyle(t);n-=parseFloat(r.paddingRight)+parseFloat(r.paddingLeft),e-=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom);var i=t.firstElementChild,o=getComputedStyle(i),s=i.offsetWidth+parseFloat(o.marginRight)+parseFloat(o.marginLeft),a=i.offsetHeight+parseFloat(o.marginTop)+parseFloat(o.marginBottom);return this.Bm=[s,a],n>e?(this.zm=Qz,this.Fm=n-s):(this.zm=Jz,this.Lm=e-a),this.qm=!0},n.prototype.Wm=function(t){var n=this.getMap().getView(),e=this.Km(t.offsetX-this.Bm[0]/2,t.offsetY-this.Bm[1]/2),r=this.Xm(e),i=n.getConstrainedZoom(n.getZoomForResolution(r));n.animateInternal({zoom:i,duration:this.Rr,easing:mt})},n.prototype.$m=function(t){if(!this.Tn&&t.target===this.element.firstElementChild){var n=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.Gm=t.clientX-parseFloat(n.style.left),this.Um=t.clientY-parseFloat(n.style.top),this.Tn=!0,0===this.On.length){var e=this.Vm,r=this.Zm,i=this.getMap().getOwnerDocument();this.On.push(K(i,oa,e,this),K(i,aa,r,this))}}},n.prototype.Vm=function(t){if(this.Tn){var n=t.clientX-this.Gm,e=t.clientY-this.Um,r=this.Km(n,e);this.Nm=this.Xm(r),this.getMap().getView().setResolution(this.Nm)}},n.prototype.Zm=function(t){this.Tn&&(this.getMap().getView().endInteraction(),this.Tn=!1,this.Gm=void 0,this.Um=void 0,this.On.forEach(Y),this.On.length=0)},n.prototype.Ym=function(t){var n=this.Jm(t),e=this.element.firstElementChild;this.zm==Qz?e.style.left=this.Fm*n+"px":e.style.top=this.Lm*n+"px"},n.prototype.Km=function(t,n){return ae(this.zm===Qz?t/this.Fm:n/this.Lm,0,1)},n.prototype.Xm=function(t){return this.getMap().getView().getResolutionForValueFunction()(1-t)},n.prototype.Jm=function(t){return ae(1-this.getMap().getView().getValueForResolutionFunction()(t),0,1)},n.prototype.render=function(t){if(t.frameState&&(this.qm||this.Hm())){var n=t.frameState.viewState.resolution;this.Nm=n,this.Ym(n)}},n}(nu),nL=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(n,e)};return function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),eL=function(t){function n(n){var e=this,r=n||{};(e=t.call(this,{element:document.createElement("div"),target:r.target})||this).extent=r.extent?r.extent:null;var i=void 0!==r.className?r.className:"ol-zoom-extent",o=void 0!==r.label?r.label:"E",s=void 0!==r.tipLabel?r.tipLabel:"Fit to extent",a=document.createElement("button");a.setAttribute("type","button"),a.title=s,a.appendChild("string"==typeof o?document.createTextNode(o):o),a.addEventListener(L,e.Mr.bind(e),!1);var u=i+" "+"ol-unselectable "+ws,c=e.element;return c.className=u,c.appendChild(a),e}return nL(n,t),n.prototype.Mr=function(t){t.preventDefault(),this.handleZoomToExtent()},n.prototype.handleZoomToExtent=function(){var t=this.getMap().getView(),n=this.extent?this.extent:t.getProjection().getExtent();t.fitInternal(qi(n))},n}(nu),rL={};rL.AssertionError=c,rL.Collection=ft,rL.Collection.CollectionEvent=ct,rL.DataTile=_t,rL.Disposable=v,rL.Feature=Tt,rL.Feature.createStyleFunction=jt,rL.Geolocation=io,rL.Image=po,rL.Image.listenImage=vo,rL.ImageBase=so,rL.ImageCanvas=mo,rL.ImageTile=jo,rL.Kinetic=To,rL.Map=lc,rL.MapBrowserEvent=ra,rL.MapBrowserEventHandler=fa,rL.MapEvent=na,rL.Object=it,rL.Object.ObjectEvent=rt,rL.Observable=nt,rL.Observable.unByKey=tt,rL.Overlay=Ec,rL.PluggableMap=Qa,rL.Tile=xt,rL.TileCache=Fc,rL.TileQueue=xa,rL.TileQueue.getTilePriority=ka,rL.TileRange=Bc,rL.TileRange.createOrUpdate=Uc,rL.VectorRenderTile=Vc,rL.VectorTile=Wc,rL.View=Wa,rL.View.createCenterConstraint=Ba,rL.View.createResolutionConstraint=qa,rL.View.createRotationConstraint=$a,rL.View.isNoopAnimation=Va,rL.array={},rL.array.binarySearch=d,rL.array.equals=x,rL.array.extend=g,rL.array.find=w,rL.array.findIndex=k,rL.array.includes=y,rL.array.isSorted=_,rL.array.linearFindNearest=m,rL.array.numberSafeCompareFunction=p,rL.array.remove=function(t,n){var e=t.indexOf(n),r=e>-1;return r&&t.splice(e,1),r},rL.array.reverseSubArray=b,rL.array.stableSort=function(t,n){var e,r=t.length,i=Array(t.length);for(e=0;e3&&!!di(t,n,e,r)},rL.geom.flat.transform={},rL.geom.flat.transform.rotate=zr,rL.geom.flat.transform.scale=Lr,rL.geom.flat.transform.transform2D=Nr,rL.geom.flat.transform.translate=Fr,rL.has={},rL.has.DEVICE_PIXEL_RATIO=$t,rL.has.FIREFOX=Gt,rL.has.IMAGE_DECODE=Zt,rL.has.MAC=qt,rL.has.PASSIVE_EVENT_LISTENERS=Wt,rL.has.SAFARI=Ut,rL.has.WEBKIT=Bt,rL.has.WORKER_OFFSCREEN_CANVAS=Vt,rL.interaction={},rL.interaction.DoubleClickZoom=pu,rL.interaction.DragAndDrop=CO,rL.interaction.DragAndDrop.DragAndDropEvent=AO,rL.interaction.DragBox=Vu,rL.interaction.DragBox.DragBoxEvent=$u,rL.interaction.DragPan=Pu,rL.interaction.DragRotate=Nu,rL.interaction.DragRotateAndZoom=IO,rL.interaction.DragZoom=Wu,rL.interaction.Draw=ZO,rL.interaction.Draw.DrawEvent=VO,rL.interaction.Draw.createBox=function(){return function(t,n,e){var r=wn([t[0],t[t.length-1]].map((function(t){return Er(t,e)}))),i=[[qn(r),$n(r),Yn(r),Xn(r),qn(r)]],o=n;o?o.setCoordinates(i):o=new Ui(i);var s=Tr();return s&&o.transform(e,s),o}},rL.interaction.Draw.createRegularPolygon=function(t,n){return function(e,r,i){var o=Er(e[0],i),s=Er(e[e.length-1],i),a=Math.sqrt(er(o,s)),u=r||$i(new NO(o),t),c=n;if(!n&&0!==n){var f=s[0]-o[0],h=s[1]-o[1];c=Math.atan2(h,f)}Vi(u,o,a,c);var l=Tr();return l&&u.transform(i,l),u}},rL.interaction.Extent=QO,rL.interaction.Extent.ExtentEvent=KO,rL.interaction.Interaction=vu,rL.interaction.Interaction.pan=hu,rL.interaction.Interaction.zoomByDelta=lu,rL.interaction.KeyboardPan=Qu,rL.interaction.KeyboardZoom=nc,rL.interaction.Modify=fE,rL.interaction.Modify.ModifyEvent=sE,rL.interaction.MouseWheelZoom=oc,rL.interaction.PinchRotate=ac,rL.interaction.PinchZoom=cc,rL.interaction.Pointer=bu,rL.interaction.Pointer.centroid=mu,rL.interaction.Select=pE,rL.interaction.Select.SelectEvent=vE,rL.interaction.Snap=gE,rL.interaction.Translate=ME,rL.interaction.Translate.TranslateEvent=SE,rL.interaction.defaults=fc,rL.layer={},rL.layer.Base=Jo,rL.layer.BaseImage=aw,rL.layer.BaseTile=mw,rL.layer.BaseVector=ux,rL.layer.Graticule=jk,rL.layer.Group=Qs,rL.layer.Heatmap=Rk,rL.layer.Image=vw,rL.layer.Layer=fs,rL.layer.Layer.inView=cs,rL.layer.MapboxVector=wO,rL.layer.MapboxVector.getMapboxPath=vO,rL.layer.MapboxVector.normalizeGlyphsUrl=pO,rL.layer.MapboxVector.normalizeSourceUrl=mO,rL.layer.MapboxVector.normalizeSpriteUrl=dO,rL.layer.MapboxVector.normalizeStyleUrl=yO,rL.layer.Tile=_w,rL.layer.Vector=gk,rL.layer.VectorImage=kO,rL.layer.VectorTile=Xk,rL.layer.WebGLPoints=SO,rL.layer.WebGLTile=TO,rL.loadingstrategy={},rL.loadingstrategy.all=ef,rL.loadingstrategy.bbox=function(t,n){return[t]},rL.loadingstrategy.tile=function(t){return function(n,e,r){var i=t.getZForResolution(Ir(e,r)),o=t.getTileRangeForExtentAndZ(Cr(n,r),i),s=[],a=[i,0,0];for(a[1]=o.minX;a[1]<=o.maxX;++a[1])for(a[2]=o.minY;a[2]<=o.maxY;++a[2])s.push(Ar(t.getTileCoordExtent(a),r));return s}},rL.math={},rL.math.clamp=ae,rL.math.cosh=ue,rL.math.lerp=ye,rL.math.log2=ce,rL.math.modulo=pe,rL.math.solveLinearSystem=le,rL.math.squaredDistance=he,rL.math.squaredSegmentDistance=fe,rL.math.toDegrees=ve,rL.math.toRadians=de,rL.net={},rL.net.ClientError=uf,rL.net.ResponseError=af,rL.net.getJSON=cf,rL.net.jsonp=of,rL.net.overrideXHR=function(t){"undefined"!=typeof XMLHttpRequest&&(sf=XMLHttpRequest),global.XMLHttpRequest=t},rL.net.resolveUrl=ff,rL.net.restoreXHR=function(){global.XMLHttpRequest=sf},rL.obj={},rL.obj.assign=O,rL.obj.clear=E,rL.obj.getValues=A,rL.obj.isEmpty=C,rL.proj={},rL.proj.Projection=se,rL.proj.Units={},rL.proj.Units.METERS_PER_UNIT=Nt,rL.proj.Units.fromCode=Dt,rL.proj.addCommon=Dr,rL.proj.addCoordinateTransforms=br,rL.proj.addEquivalentProjections=dr,rL.proj.addEquivalentTransforms=pr,rL.proj.addProjection=fr,rL.proj.addProjections=hr,rL.proj.clearAllProjections=function(){Pe(),Le()},rL.proj.clearUserProjection=function(){Mr=null},rL.proj.cloneTransform=ur,rL.proj.createProjection=yr,rL.proj.createSafeCoordinateTransform=Pr,rL.proj.createTransformFromCoordinateTransform=mr,rL.proj.epsg3857={},rL.proj.epsg3857.EXTENT=we,rL.proj.epsg3857.HALF_SIZE=ge,rL.proj.epsg3857.MAX_SAFE_Y=ke,rL.proj.epsg3857.PROJECTIONS=Se,rL.proj.epsg3857.RADIUS=be,rL.proj.epsg3857.WORLD_EXTENT=xe,rL.proj.epsg3857.fromEPSG4326=Me,rL.proj.epsg3857.toEPSG4326=je,rL.proj.epsg4326={},rL.proj.epsg4326.EXTENT=Ee,rL.proj.epsg4326.METERS_PER_UNIT=Ae,rL.proj.epsg4326.PROJECTIONS=Re,rL.proj.epsg4326.RADIUS=Oe,rL.proj.equivalent=wr,rL.proj.fromLonLat=gr,rL.proj.fromUserCoordinate=Er,rL.proj.fromUserExtent=Cr,rL.proj.fromUserResolution=Ir,rL.proj.get=lr,rL.proj.getPointResolution=vr,rL.proj.getTransform=kr,rL.proj.getTransformFromProjections=xr,rL.proj.getUserProjection=Tr,rL.proj.identityTransform=cr,rL.proj.proj4={},rL.proj.proj4.register=function(t){var n,e,r=Object.keys(t.defs),i=r.length;for(n=0;n180)&&(e[0]=pe(r+180,360)-180),e},rL.proj.toUserCoordinate=Or,rL.proj.toUserExtent=Ar,rL.proj.toUserResolution=Rr,rL.proj.transform=_r,rL.proj.transformExtent=Sr,rL.proj.transformWithProjections=function(t,n,e){return xr(n,e)(t)},rL.proj.transforms={},rL.proj.transforms.add=Fe,rL.proj.transforms.clear=Le,rL.proj.transforms.get=Ge,rL.proj.transforms.remove=function(t,n){var e=t.getCode(),r=n.getCode(),i=ze[e][r];return delete ze[e][r],C(ze[e])&&delete ze[e],i},rL.proj.useGeographic=function(){jr("EPSG:4326")},rL.render={},rL.render.Box=Lu,rL.render.Event=ps,rL.render.Feature=pk,rL.render.VectorContext=hf,rL.render.canvas={},rL.render.canvas.Builder=wx,rL.render.canvas.BuilderGroup=Rx,rL.render.canvas.Executor=qx,rL.render.canvas.ExecutorGroup=Hx,rL.render.canvas.ExecutorGroup.getPixelIndexArray=Wx,rL.render.canvas.ImageBuilder=kx,rL.render.canvas.Immediate=vf,rL.render.canvas.Instruction={},rL.render.canvas.Instruction.beginPathInstruction=yx,rL.render.canvas.Instruction.closePathInstruction=mx,rL.render.canvas.Instruction.fillInstruction=dx,rL.render.canvas.Instruction.strokeInstruction=px,rL.render.canvas.LineStringBuilder=Sx,rL.render.canvas.PolygonBuilder=jx,rL.render.canvas.TextBuilder=Ax,rL.render.canvas.checkedFonts=Ns,rL.render.canvas.defaultFillStyle=Ts,rL.render.canvas.defaultFont=js,rL.render.canvas.defaultLineCap=Os,rL.render.canvas.defaultLineDash=Es,rL.render.canvas.defaultLineDashOffset=0,rL.render.canvas.defaultLineJoin=As,rL.render.canvas.defaultLineWidth=1,rL.render.canvas.defaultMiterLimit=Cs,rL.render.canvas.defaultPadding=Ds,rL.render.canvas.defaultStrokeStyle=Rs,rL.render.canvas.defaultTextAlign=Is,rL.render.canvas.defaultTextBaseline=Ps,rL.render.canvas.drawImageOrLabel=Hs,rL.render.canvas.hitdetect={},rL.render.canvas.hitdetect.HIT_DETECT_RESOLUTION=Kx,rL.render.canvas.hitdetect.createHitDetectionImageData=Xx,rL.render.canvas.hitdetect.hitDetect=Yx,rL.render.canvas.labelCache=zs,rL.render.canvas.measureAndCacheTextWidth=Zs,rL.render.canvas.measureTextHeight=qs,rL.render.canvas.measureTextWidth=Vs,rL.render.canvas.measureTextWidths=Ws,rL.render.canvas.registerFont=Bs,rL.render.canvas.rotateAtOffset=function(t,n,e,r){0!==n&&(t.translate(e,r),t.rotate(n),t.translate(-e,-r))},rL.render.canvas.textHeights=Us,rL.render.getRenderPixel=function(t,n){var e=n.slice(0);return tn(t.inversePixelTransform.slice(),e),e},rL.render.getVectorContext=jf,rL.render.toContext=function(t,n){var e=t.canvas,r=n||{},i=r.pixelRatio||$t,o=r.size;o&&(e.width=o[0]*i,e.height=o[1]*i,e.style.width=o[0]+"px",e.style.height=o[1]+"px");var s=[0,0,e.width,e.height],a=en([1,0,0,1,0,0],i,i);return new vf(t,i,s,a,0)},rL.renderer={},rL.renderer.Composite=Xs,rL.renderer.Layer=el,rL.renderer.Map=vs,rL.renderer.canvas={},rL.renderer.canvas.ImageLayer=hw,rL.renderer.canvas.Layer=cw,rL.renderer.canvas.TileLayer=xw,rL.renderer.canvas.VectorImageLayer=nk,rL.renderer.canvas.VectorLayer=Qx,rL.renderer.canvas.VectorTileLayer=uk,rL.renderer.vector={},rL.renderer.vector.defaultOrder=xf,rL.renderer.vector.getSquaredTolerance=kf,rL.renderer.vector.getTolerance=_f,rL.renderer.vector.renderFeature=Sf,rL.renderer.webgl={},rL.renderer.webgl.Layer=hl,rL.renderer.webgl.Layer.colorDecodeId=fl,rL.renderer.webgl.Layer.colorEncodeId=cl,rL.renderer.webgl.Layer.getBlankImageData=function(){var t=document.createElement("canvas").getContext("2d").createImageData(1,1);return t.data[0]=255,t.data[1]=255,t.data[2]=255,t.data[3]=255,t},rL.renderer.webgl.Layer.writePointFeatureToBuffers=function(t,n,e,r,i,o){var s=3+i,a=t[n+0],u=t[n+1],c=sl;c.length=i;for(var f=0;f1?k(e.TileMatrixSetLink,"projection"in n?function(t,e,r){var o=w(i,(function(n){return n.Identifier==t.TileMatrixSet})).SupportedCRS,s=lr(o),a=lr(n.projection);return s&&a?wr(s,a):o==n.projection}:function(t,e,r){return t.TileMatrixSet==n.matrixSet}):0)<0&&(r=0);var o=e.TileMatrixSetLink[r].TileMatrixSet,s=e.TileMatrixSetLink[r].TileMatrixSetLimits,a=e.Format[0];"format"in n&&(a=n.format),(r=k(e.Style,(function(t,e,r){return"style"in n?t.Title==n.style:t.isDefault})))<0&&(r=0);var u=e.Style[r].Identifier,c={};"Dimension"in e&&e.Dimension.forEach((function(t,n,e){var r=t.Identifier,i=t.Default;void 0===i&&(i=t.Value[0]),c[r]=i}));var f,h=w(t.Contents.TileMatrixSet,(function(t,n,e){return t.Identifier==o})),l=h.SupportedCRS;if(l&&(f=lr(l)),"projection"in n){var v=lr(n.projection);v&&(f&&!wr(v,f)||(f=v))}var d=!1,p="ne"==f.getAxisOrientation().substr(0,2),m=h.TileMatrix[0],b={MinTileCol:0,MinTileRow:0,MaxTileCol:m.MatrixWidth-1,MaxTileRow:m.MatrixHeight-1};if(s){b=s[s.length-1];var g=w(h.TileMatrix,(function(t){return t.Identifier===b.TileMatrix||h.Identifier+":"+t.Identifier===b.TileMatrix}));g&&(m=g)}var x=28e-5*m.ScaleDenominator/f.getMetersPerUnit(),_=p?[m.TopLeftCorner[1],m.TopLeftCorner[0]]:m.TopLeftCorner,S=m.TileWidth*x,M=m.TileHeight*x,j=h.BoundingBox,T=[_[0]+S*b.MinTileCol,_[1]-M*(1+b.MaxTileRow),_[0]+S*(1+b.MaxTileCol),_[1]-M*b.MinTileRow];if(void 0!==j&&!Mn(j,T)){var O=e.WGS84BoundingBox,E=lr("EPSG:4326").getExtent();if(T=j,O)d=O[0]===E[0]&&O[2]===E[2];else{var A=Sr(j,h.SupportedCRS,"EPSG:4326");d=A[0]-1e-10<=E[0]&&A[2]+1e-10>=E[2]}}var C=nv(h,T,s),R=[],I=n.requestEncoding;if(I=void 0!==I?I:"","OperationsMetadata"in t&&"GetTile"in t.OperationsMetadata)for(var P=t.OperationsMetadata.GetTile.DCP.HTTP.Get,D=0,N=P.length;D result for the + // current iteration. + result.value = unwrapped; + resolve(result); + }, function (error) { + // If a rejected Promise was yielded, throw the rejection back + // into the async generator function so it can be handled there. + return invoke("throw", error, resolve, reject); + }); + } + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new PromiseImpl(function (resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + return previousPromise = // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later + // invocations of the iterator. + callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); + } // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + + + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + define(AsyncIterator.prototype, asyncIteratorSymbol, function () { + return this; + }); + exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + + exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { + if (PromiseImpl === void 0) PromiseImpl = Promise; + var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); + return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function (result) { + return result.done ? result.value : iter.next(); + }); + }; + + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); + } + + if (state === GenStateCompleted) { + if (method === "throw") { + throw arg; + } // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + + + return doneResult(); + } + + context.method = method; + context.arg = arg; + + while (true) { + var delegate = context.delegate; + + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + + if (context.method === "next") { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = context.arg; + } else if (context.method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + + context.dispatchException(context.arg); + } else if (context.method === "return") { + context.abrupt("return", context.arg); + } + + state = GenStateExecuting; + var record = tryCatch(innerFn, self, context); + + if (record.type === "normal") { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done ? GenStateCompleted : GenStateSuspendedYield; + + if (record.arg === ContinueSentinel) { + continue; + } + + return { + value: record.arg, + done: context.done + }; + } else if (record.type === "throw") { + state = GenStateCompleted; // Dispatch the exception by looping back around to the + // context.dispatchException(context.arg) call above. + + context.method = "throw"; + context.arg = record.arg; + } + } + }; + } // Call delegate.iterator[context.method](context.arg) and handle the + // result, either by returning a { value, done } result from the + // delegate iterator, or by modifying context.method and context.arg, + // setting context.delegate to null, and returning the ContinueSentinel. + + + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + + if (method === undefined) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null; + + if (context.method === "throw") { + // Note: ["return"] must be used for ES3 parsing compatibility. + if (delegate.iterator["return"]) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = "return"; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); + + if (context.method === "throw") { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel; + } + } + + context.method = "throw"; + context.arg = new TypeError("The iterator does not provide a 'throw' method"); + } + + return ContinueSentinel; + } + + var record = tryCatch(method, delegate.iterator, context.arg); + + if (record.type === "throw") { + context.method = "throw"; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + + var info = record.arg; + + if (!info) { + context.method = "throw"; + context.arg = new TypeError("iterator result is not an object"); + context.delegate = null; + return ContinueSentinel; + } + + if (info.done) { + // Assign the result of the finished delegate to the temporary + // variable specified by delegate.resultName (see delegateYield). + context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield). + + context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the + // exception, let the outer generator proceed normally. If + // context.method was "next", forget context.arg since it has been + // "consumed" by the delegate iterator. If context.method was + // "return", allow the original .return call to continue in the + // outer generator. + + if (context.method !== "return") { + context.method = "next"; + context.arg = undefined; + } + } else { + // Re-yield the result returned by the delegate method. + return info; + } // The delegate iterator is finished, so forget it and continue with + // the outer generator. + + + context.delegate = null; + return ContinueSentinel; + } // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + + + defineIteratorMethods(Gp); + define(Gp, toStringTagSymbol, "Generator"); // A Generator should always return itself as the iterator object when the + // @@iterator function is called on it. Some browsers' implementations of the + // iterator prototype chain incorrectly implement this, causing the Generator + // object to not be returned from this call. This ensures that doesn't happen. + // See https://github.com/facebook/regenerator/issues/274 for more details. + + define(Gp, iteratorSymbol, function () { + return this; + }); + define(Gp, "toString", function () { + return "[object Generator]"; + }); + + function pushTryEntry(locs) { + var entry = { + tryLoc: locs[0] + }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal"; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ + tryLoc: "root" + }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + + exports.keys = function (object) { + var keys = []; + + for (var key in object) { + keys.push(key); + } + + keys.reverse(); // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + + return function next() { + while (keys.length) { + var key = keys.pop(); + + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + + + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === "function") { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, + next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined; + next.done = true; + return next; + }; + + return next.next = next; + } + } // Return an iterator with no values. + + + return { + next: doneResult + }; + } + + exports.values = values; + + function doneResult() { + return { + value: undefined, + done: true + }; + } + + Context.prototype = { + constructor: Context, + reset: function reset(skipTempReset) { + this.prev = 0; + this.next = 0; // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + this.method = "next"; + this.arg = undefined; + this.tryEntries.forEach(resetTryEntry); + + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + stop: function stop() { + this.done = true; + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + + if (rootRecord.type === "throw") { + throw rootRecord.arg; + } + + return this.rval; + }, + dispatchException: function dispatchException(exception) { + if (this.done) { + throw exception; + } + + var context = this; + + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; + + if (caught) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + context.method = "next"; + context.arg = undefined; + } + + return !!caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === "root") { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle("end"); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else { + throw new Error("try statement without catch or finally"); + } + } + } + }, + abrupt: function abrupt(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + + if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } + + if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.method = "next"; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + + return this.complete(record); + }, + complete: function complete(record, afterLoc) { + if (record.type === "throw") { + throw record.arg; + } + + if (record.type === "break" || record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = this.arg = record.arg; + this.method = "return"; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + finish: function finish(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + "catch": function _catch(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); + } + + return thrown; + } + } // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + + + throw new Error("illegal catch attempt"); + }, + delegateYield: function delegateYield(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; + + if (this.method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + this.arg = undefined; + } + + return ContinueSentinel; + } + }; // Regardless of whether this script is executing as a CommonJS module + // or not, return the runtime object so that we can declare the variable + // regeneratorRuntime in the outer scope, which allows this module to be + // injected easily by `bin/regenerator --include-runtime script.js`. + + return exports; +}( // If this script is executing as a CommonJS module, use module.exports +// as the regeneratorRuntime namespace. Otherwise create a new empty +// object. Either way, the resulting object will be used to initialize +// the regeneratorRuntime variable at the top of this file. +( false ? 0 : _typeof(module)) === "object" ? module.exports : {}); + +try { + regeneratorRuntime = runtime; +} catch (accidentalStrictMode) { + // This module should not be running in strict mode, so the above + // assignment should always work unless something is misconfigured. Just + // in case runtime.js accidentally runs in strict mode, in modern engines + // we can explicitly access globalThis. In older engines we can escape + // strict mode using a global Function call. This could conceivably fail + // if a Content Security Policy forbids using Function, but in that case + // the proper solution is to fix the accidental strict mode problem. If + // you've misconfigured your bundler to force strict mode and applied a + // CSP to forbid Function, and you're not willing to fix either of those + // problems, please detail your unique predicament in a GitHub issue. + if ((typeof globalThis === "undefined" ? "undefined" : _typeof(globalThis)) === "object") { + globalThis.regeneratorRuntime = runtime; + } else { + Function("r", "regeneratorRuntime = r")(runtime); + } +} + +/***/ }), +/* 1 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _ol_AssertionError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15); +/* harmony import */ var _ol_Collection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21); +/* harmony import */ var _ol_DataTile_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(33); +/* harmony import */ var _ol_Disposable_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(32); +/* harmony import */ var _ol_Feature_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(37); +/* harmony import */ var _ol_Geolocation_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(38); +/* harmony import */ var _ol_Image_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(59); +/* harmony import */ var _ol_ImageBase_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(61); +/* harmony import */ var _ol_ImageCanvas_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(62); +/* harmony import */ var _ol_ImageTile_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(63); +/* harmony import */ var _ol_Kinetic_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(65); +/* harmony import */ var _ol_Map_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(66); +/* harmony import */ var _ol_MapBrowserEvent_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(98); +/* harmony import */ var _ol_MapBrowserEventHandler_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(100); +/* harmony import */ var _ol_MapEvent_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(99); +/* harmony import */ var _ol_Object_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(24); +/* harmony import */ var _ol_Observable_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(26); +/* harmony import */ var _ol_Overlay_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(104); +/* harmony import */ var _ol_PluggableMap_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(87); +/* harmony import */ var _ol_Tile_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(35); +/* harmony import */ var _ol_TileCache_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(185); +/* harmony import */ var _ol_TileQueue_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(88); +/* harmony import */ var _ol_TileRange_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(188); +/* harmony import */ var _ol_VectorRenderTile_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(189); +/* harmony import */ var _ol_VectorTile_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(190); +/* harmony import */ var _ol_View_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(91); +/* harmony import */ var _ol_array_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(31); +/* harmony import */ var _ol_asserts_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(14); +/* harmony import */ var _ol_centerconstraint_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(94); +/* harmony import */ var _ol_color_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(86); +/* harmony import */ var _ol_colorlike_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(134); +/* harmony import */ var _ol_control_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(67); +/* harmony import */ var _ol_coordinate_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(17); +/* harmony import */ var _ol_css_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(69); +/* harmony import */ var _ol_dom_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(64); +/* harmony import */ var _ol_easing_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(36); +/* harmony import */ var _ol_events_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(28); +/* harmony import */ var _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(11); +/* harmony import */ var _ol_featureloader_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(165); +/* harmony import */ var _ol_functions_js__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__(30); +/* harmony import */ var _ol_has_js__WEBPACK_IMPORTED_MODULE_140__ = __webpack_require__(54); +/* harmony import */ var _ol_interaction_js__WEBPACK_IMPORTED_MODULE_161__ = __webpack_require__(111); +/* harmony import */ var _ol_loadingstrategy_js__WEBPACK_IMPORTED_MODULE_178__ = __webpack_require__(166); +/* harmony import */ var _ol_math_js__WEBPACK_IMPORTED_MODULE_179__ = __webpack_require__(9); +/* harmony import */ var _ol_net_js__WEBPACK_IMPORTED_MODULE_180__ = __webpack_require__(286); +/* harmony import */ var _ol_obj_js__WEBPACK_IMPORTED_MODULE_181__ = __webpack_require__(7); +/* harmony import */ var _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var _ol_render_js__WEBPACK_IMPORTED_MODULE_205__ = __webpack_require__(259); +/* harmony import */ var _ol_reproj_js__WEBPACK_IMPORTED_MODULE_222__ = __webpack_require__(293); +/* harmony import */ var _ol_resolutionconstraint_js__WEBPACK_IMPORTED_MODULE_224__ = __webpack_require__(95); +/* harmony import */ var _ol_rotationconstraint_js__WEBPACK_IMPORTED_MODULE_225__ = __webpack_require__(97); +/* harmony import */ var _ol_size_js__WEBPACK_IMPORTED_MODULE_226__ = __webpack_require__(102); +/* harmony import */ var _ol_sphere_js__WEBPACK_IMPORTED_MODULE_260__ = __webpack_require__(8); +/* harmony import */ var _ol_string_js__WEBPACK_IMPORTED_MODULE_261__ = __webpack_require__(18); +/* harmony import */ var _ol_tilecoord_js__WEBPACK_IMPORTED_MODULE_277__ = __webpack_require__(186); +/* harmony import */ var _ol_tilegrid_js__WEBPACK_IMPORTED_MODULE_281__ = __webpack_require__(287); +/* harmony import */ var _ol_tileurlfunction_js__WEBPACK_IMPORTED_MODULE_282__ = __webpack_require__(289); +/* harmony import */ var _ol_transform_js__WEBPACK_IMPORTED_MODULE_283__ = __webpack_require__(53); +/* harmony import */ var _ol_uri_js__WEBPACK_IMPORTED_MODULE_284__ = __webpack_require__(397); +/* harmony import */ var _ol_util_js__WEBPACK_IMPORTED_MODULE_285__ = __webpack_require__(16); +/* harmony import */ var _ol_webgl_js__WEBPACK_IMPORTED_MODULE_287__ = __webpack_require__(263); +/* harmony import */ var _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__ = __webpack_require__(197); +/* harmony import */ var _ol_webgl_Buffer_js__WEBPACK_IMPORTED_MODULE_288__ = __webpack_require__(267); +/* harmony import */ var _ol_webgl_Helper_js__WEBPACK_IMPORTED_MODULE_289__ = __webpack_require__(262); +/* harmony import */ var _ol_webgl_PostProcessingPass_js__WEBPACK_IMPORTED_MODULE_290__ = __webpack_require__(266); +/* harmony import */ var _ol_webgl_RenderTarget_js__WEBPACK_IMPORTED_MODULE_291__ = __webpack_require__(268); +/* harmony import */ var _ol_webgl_ShaderBuilder_js__WEBPACK_IMPORTED_MODULE_292__ = __webpack_require__(303); +/* harmony import */ var _ol_webgl_TileTexture_js__WEBPACK_IMPORTED_MODULE_293__ = __webpack_require__(306); +/* harmony import */ var _ol_vec_mat4_js__WEBPACK_IMPORTED_MODULE_286__ = __webpack_require__(265); +/* harmony import */ var _ol_tilegrid_TileGrid_js__WEBPACK_IMPORTED_MODULE_278__ = __webpack_require__(288); +/* harmony import */ var _ol_tilegrid_WMTS_js__WEBPACK_IMPORTED_MODULE_279__ = __webpack_require__(415); +/* harmony import */ var _ol_tilegrid_common_js__WEBPACK_IMPORTED_MODULE_280__ = __webpack_require__(96); +/* harmony import */ var _ol_style_Circle_js__WEBPACK_IMPORTED_MODULE_266__ = __webpack_require__(162); +/* harmony import */ var _ol_style_Fill_js__WEBPACK_IMPORTED_MODULE_267__ = __webpack_require__(160); +/* harmony import */ var _ol_style_Icon_js__WEBPACK_IMPORTED_MODULE_268__ = __webpack_require__(136); +/* harmony import */ var _ol_style_IconImage_js__WEBPACK_IMPORTED_MODULE_269__ = __webpack_require__(139); +/* harmony import */ var _ol_style_IconImageCache_js__WEBPACK_IMPORTED_MODULE_270__ = __webpack_require__(85); +/* harmony import */ var _ol_style_Image_js__WEBPACK_IMPORTED_MODULE_271__ = __webpack_require__(140); +/* harmony import */ var _ol_style_RegularShape_js__WEBPACK_IMPORTED_MODULE_272__ = __webpack_require__(163); +/* harmony import */ var _ol_style_Stroke_js__WEBPACK_IMPORTED_MODULE_273__ = __webpack_require__(161); +/* harmony import */ var _ol_style_Style_js__WEBPACK_IMPORTED_MODULE_274__ = __webpack_require__(159); +/* harmony import */ var _ol_style_Text_js__WEBPACK_IMPORTED_MODULE_275__ = __webpack_require__(209); +/* harmony import */ var _ol_style_expressions_js__WEBPACK_IMPORTED_MODULE_276__ = __webpack_require__(304); +/* harmony import */ var _ol_structs_LRUCache_js__WEBPACK_IMPORTED_MODULE_262__ = __webpack_require__(187); +/* harmony import */ var _ol_structs_LinkedList_js__WEBPACK_IMPORTED_MODULE_263__ = __webpack_require__(416); +/* harmony import */ var _ol_structs_PriorityQueue_js__WEBPACK_IMPORTED_MODULE_264__ = __webpack_require__(89); +/* harmony import */ var _ol_structs_RBush_js__WEBPACK_IMPORTED_MODULE_265__ = __webpack_require__(167); +/* harmony import */ var _ol_source_BingMaps_js__WEBPACK_IMPORTED_MODULE_227__ = __webpack_require__(310); +/* harmony import */ var _ol_source_CartoDB_js__WEBPACK_IMPORTED_MODULE_228__ = __webpack_require__(311); +/* harmony import */ var _ol_source_Cluster_js__WEBPACK_IMPORTED_MODULE_229__ = __webpack_require__(313); +/* harmony import */ var _ol_source_DataTile_js__WEBPACK_IMPORTED_MODULE_230__ = __webpack_require__(314); +/* harmony import */ var _ol_source_GeoTIFF_js__WEBPACK_IMPORTED_MODULE_231__ = __webpack_require__(315); +/* harmony import */ var _ol_source_IIIF_js__WEBPACK_IMPORTED_MODULE_232__ = __webpack_require__(393); +/* harmony import */ var _ol_source_Image_js__WEBPACK_IMPORTED_MODULE_233__ = __webpack_require__(395); +/* harmony import */ var _ol_source_ImageArcGISRest_js__WEBPACK_IMPORTED_MODULE_234__ = __webpack_require__(396); +/* harmony import */ var _ol_source_ImageCanvas_js__WEBPACK_IMPORTED_MODULE_235__ = __webpack_require__(398); +/* harmony import */ var _ol_source_ImageMapGuide_js__WEBPACK_IMPORTED_MODULE_236__ = __webpack_require__(399); +/* harmony import */ var _ol_source_ImageStatic_js__WEBPACK_IMPORTED_MODULE_237__ = __webpack_require__(400); +/* harmony import */ var _ol_source_ImageWMS_js__WEBPACK_IMPORTED_MODULE_238__ = __webpack_require__(401); +/* harmony import */ var _ol_source_OGCMapTile_js__WEBPACK_IMPORTED_MODULE_239__ = __webpack_require__(403); +/* harmony import */ var _ol_source_OGCVectorTile_js__WEBPACK_IMPORTED_MODULE_240__ = __webpack_require__(405); +/* harmony import */ var _ol_source_OSM_js__WEBPACK_IMPORTED_MODULE_241__ = __webpack_require__(406); +/* harmony import */ var _ol_source_Raster_js__WEBPACK_IMPORTED_MODULE_242__ = __webpack_require__(407); +/* harmony import */ var _ol_source_Source_js__WEBPACK_IMPORTED_MODULE_243__ = __webpack_require__(169); +/* harmony import */ var _ol_source_Stamen_js__WEBPACK_IMPORTED_MODULE_244__ = __webpack_require__(408); +/* harmony import */ var _ol_source_Tile_js__WEBPACK_IMPORTED_MODULE_245__ = __webpack_require__(297); +/* harmony import */ var _ol_source_TileArcGISRest_js__WEBPACK_IMPORTED_MODULE_246__ = __webpack_require__(409); +/* harmony import */ var _ol_source_TileDebug_js__WEBPACK_IMPORTED_MODULE_247__ = __webpack_require__(410); +/* harmony import */ var _ol_source_TileImage_js__WEBPACK_IMPORTED_MODULE_248__ = __webpack_require__(290); +/* harmony import */ var _ol_source_TileJSON_js__WEBPACK_IMPORTED_MODULE_249__ = __webpack_require__(285); +/* harmony import */ var _ol_source_TileWMS_js__WEBPACK_IMPORTED_MODULE_250__ = __webpack_require__(411); +/* harmony import */ var _ol_source_UTFGrid_js__WEBPACK_IMPORTED_MODULE_251__ = __webpack_require__(412); +/* harmony import */ var _ol_source_UrlTile_js__WEBPACK_IMPORTED_MODULE_252__ = __webpack_require__(295); +/* harmony import */ var _ol_source_Vector_js__WEBPACK_IMPORTED_MODULE_253__ = __webpack_require__(164); +/* harmony import */ var _ol_source_VectorTile_js__WEBPACK_IMPORTED_MODULE_254__ = __webpack_require__(298); +/* harmony import */ var _ol_source_WMTS_js__WEBPACK_IMPORTED_MODULE_255__ = __webpack_require__(413); +/* harmony import */ var _ol_source_XYZ_js__WEBPACK_IMPORTED_MODULE_256__ = __webpack_require__(312); +/* harmony import */ var _ol_source_Zoomify_js__WEBPACK_IMPORTED_MODULE_257__ = __webpack_require__(394); +/* harmony import */ var _ol_source_common_js__WEBPACK_IMPORTED_MODULE_258__ = __webpack_require__(291); +/* harmony import */ var _ol_source_ogcTileUtil_js__WEBPACK_IMPORTED_MODULE_259__ = __webpack_require__(404); +/* harmony import */ var _ol_reproj_Image_js__WEBPACK_IMPORTED_MODULE_219__ = __webpack_require__(309); +/* harmony import */ var _ol_reproj_Tile_js__WEBPACK_IMPORTED_MODULE_220__ = __webpack_require__(292); +/* harmony import */ var _ol_reproj_Triangulation_js__WEBPACK_IMPORTED_MODULE_221__ = __webpack_require__(294); +/* harmony import */ var _ol_reproj_common_js__WEBPACK_IMPORTED_MODULE_223__ = __webpack_require__(273); +/* harmony import */ var _ol_renderer_Composite_js__WEBPACK_IMPORTED_MODULE_206__ = __webpack_require__(81); +/* harmony import */ var _ol_renderer_Layer_js__WEBPACK_IMPORTED_MODULE_207__ = __webpack_require__(156); +/* harmony import */ var _ol_renderer_Map_js__WEBPACK_IMPORTED_MODULE_208__ = __webpack_require__(84); +/* harmony import */ var _ol_renderer_vector_js__WEBPACK_IMPORTED_MODULE_215__ = __webpack_require__(141); +/* harmony import */ var _ol_renderer_webgl_Layer_js__WEBPACK_IMPORTED_MODULE_216__ = __webpack_require__(270); +/* harmony import */ var _ol_renderer_webgl_PointsLayer_js__WEBPACK_IMPORTED_MODULE_217__ = __webpack_require__(261); +/* harmony import */ var _ol_renderer_webgl_TileLayer_js__WEBPACK_IMPORTED_MODULE_218__ = __webpack_require__(305); +/* harmony import */ var _ol_renderer_canvas_ImageLayer_js__WEBPACK_IMPORTED_MODULE_209__ = __webpack_require__(272); +/* harmony import */ var _ol_renderer_canvas_Layer_js__WEBPACK_IMPORTED_MODULE_210__ = __webpack_require__(155); +/* harmony import */ var _ol_renderer_canvas_TileLayer_js__WEBPACK_IMPORTED_MODULE_211__ = __webpack_require__(284); +/* harmony import */ var _ol_renderer_canvas_VectorImageLayer_js__WEBPACK_IMPORTED_MODULE_212__ = __webpack_require__(301); +/* harmony import */ var _ol_renderer_canvas_VectorLayer_js__WEBPACK_IMPORTED_MODULE_213__ = __webpack_require__(131); +/* harmony import */ var _ol_renderer_canvas_VectorTileLayer_js__WEBPACK_IMPORTED_MODULE_214__ = __webpack_require__(283); +/* harmony import */ var _ol_render_Box_js__WEBPACK_IMPORTED_MODULE_189__ = __webpack_require__(118); +/* harmony import */ var _ol_render_Event_js__WEBPACK_IMPORTED_MODULE_190__ = __webpack_require__(83); +/* harmony import */ var _ol_render_Feature_js__WEBPACK_IMPORTED_MODULE_191__ = __webpack_require__(213); +/* harmony import */ var _ol_render_VectorContext_js__WEBPACK_IMPORTED_MODULE_192__ = __webpack_require__(135); +/* harmony import */ var _ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_203__ = __webpack_require__(82); +/* harmony import */ var _ol_render_canvas_Builder_js__WEBPACK_IMPORTED_MODULE_193__ = __webpack_require__(146); +/* harmony import */ var _ol_render_canvas_BuilderGroup_js__WEBPACK_IMPORTED_MODULE_194__ = __webpack_require__(143); +/* harmony import */ var _ol_render_canvas_Executor_js__WEBPACK_IMPORTED_MODULE_195__ = __webpack_require__(153); +/* harmony import */ var _ol_render_canvas_ExecutorGroup_js__WEBPACK_IMPORTED_MODULE_196__ = __webpack_require__(152); +/* harmony import */ var _ol_render_canvas_ImageBuilder_js__WEBPACK_IMPORTED_MODULE_197__ = __webpack_require__(147); +/* harmony import */ var _ol_render_canvas_Immediate_js__WEBPACK_IMPORTED_MODULE_198__ = __webpack_require__(133); +/* harmony import */ var _ol_render_canvas_Instruction_js__WEBPACK_IMPORTED_MODULE_199__ = __webpack_require__(145); +/* harmony import */ var _ol_render_canvas_LineStringBuilder_js__WEBPACK_IMPORTED_MODULE_200__ = __webpack_require__(148); +/* harmony import */ var _ol_render_canvas_PolygonBuilder_js__WEBPACK_IMPORTED_MODULE_201__ = __webpack_require__(144); +/* harmony import */ var _ol_render_canvas_TextBuilder_js__WEBPACK_IMPORTED_MODULE_202__ = __webpack_require__(149); +/* harmony import */ var _ol_render_canvas_hitdetect_js__WEBPACK_IMPORTED_MODULE_204__ = __webpack_require__(132); +/* harmony import */ var _ol_proj_Projection_js__WEBPACK_IMPORTED_MODULE_182__ = __webpack_require__(4); +/* harmony import */ var _ol_proj_Units_js__WEBPACK_IMPORTED_MODULE_183__ = __webpack_require__(3); +/* harmony import */ var _ol_proj_epsg3857_js__WEBPACK_IMPORTED_MODULE_184__ = __webpack_require__(19); +/* harmony import */ var _ol_proj_epsg4326_js__WEBPACK_IMPORTED_MODULE_185__ = __webpack_require__(20); +/* harmony import */ var _ol_proj_proj4_js__WEBPACK_IMPORTED_MODULE_186__ = __webpack_require__(308); +/* harmony import */ var _ol_proj_projections_js__WEBPACK_IMPORTED_MODULE_187__ = __webpack_require__(5); +/* harmony import */ var _ol_proj_transforms_js__WEBPACK_IMPORTED_MODULE_188__ = __webpack_require__(6); +/* harmony import */ var _ol_layer_Base_js__WEBPACK_IMPORTED_MODULE_162__ = __webpack_require__(74); +/* harmony import */ var _ol_layer_BaseImage_js__WEBPACK_IMPORTED_MODULE_163__ = __webpack_require__(255); +/* harmony import */ var _ol_layer_BaseTile_js__WEBPACK_IMPORTED_MODULE_164__ = __webpack_require__(256); +/* harmony import */ var _ol_layer_BaseVector_js__WEBPACK_IMPORTED_MODULE_165__ = __webpack_require__(157); +/* harmony import */ var _ol_layer_Graticule_js__WEBPACK_IMPORTED_MODULE_166__ = __webpack_require__(258); +/* harmony import */ var _ol_layer_Group_js__WEBPACK_IMPORTED_MODULE_167__ = __webpack_require__(103); +/* harmony import */ var _ol_layer_Heatmap_js__WEBPACK_IMPORTED_MODULE_168__ = __webpack_require__(260); +/* harmony import */ var _ol_layer_Image_js__WEBPACK_IMPORTED_MODULE_169__ = __webpack_require__(271); +/* harmony import */ var _ol_layer_Layer_js__WEBPACK_IMPORTED_MODULE_170__ = __webpack_require__(70); +/* harmony import */ var _ol_layer_MapboxVector_js__WEBPACK_IMPORTED_MODULE_171__ = __webpack_require__(274); +/* harmony import */ var _ol_layer_Tile_js__WEBPACK_IMPORTED_MODULE_172__ = __webpack_require__(299); +/* harmony import */ var _ol_layer_Vector_js__WEBPACK_IMPORTED_MODULE_173__ = __webpack_require__(130); +/* harmony import */ var _ol_layer_VectorImage_js__WEBPACK_IMPORTED_MODULE_174__ = __webpack_require__(300); +/* harmony import */ var _ol_layer_VectorTile_js__WEBPACK_IMPORTED_MODULE_175__ = __webpack_require__(281); +/* harmony import */ var _ol_layer_WebGLPoints_js__WEBPACK_IMPORTED_MODULE_176__ = __webpack_require__(302); +/* harmony import */ var _ol_layer_WebGLTile_js__WEBPACK_IMPORTED_MODULE_177__ = __webpack_require__(307); +/* harmony import */ var _ol_interaction_DoubleClickZoom_js__WEBPACK_IMPORTED_MODULE_141__ = __webpack_require__(112); +/* harmony import */ var _ol_interaction_DragAndDrop_js__WEBPACK_IMPORTED_MODULE_142__ = __webpack_require__(115); +/* harmony import */ var _ol_interaction_DragBox_js__WEBPACK_IMPORTED_MODULE_143__ = __webpack_require__(117); +/* harmony import */ var _ol_interaction_DragPan_js__WEBPACK_IMPORTED_MODULE_144__ = __webpack_require__(121); +/* harmony import */ var _ol_interaction_DragRotate_js__WEBPACK_IMPORTED_MODULE_145__ = __webpack_require__(122); +/* harmony import */ var _ol_interaction_DragRotateAndZoom_js__WEBPACK_IMPORTED_MODULE_146__ = __webpack_require__(123); +/* harmony import */ var _ol_interaction_DragZoom_js__WEBPACK_IMPORTED_MODULE_147__ = __webpack_require__(124); +/* harmony import */ var _ol_interaction_Draw_js__WEBPACK_IMPORTED_MODULE_148__ = __webpack_require__(125); +/* harmony import */ var _ol_interaction_Extent_js__WEBPACK_IMPORTED_MODULE_149__ = __webpack_require__(174); +/* harmony import */ var _ol_interaction_Interaction_js__WEBPACK_IMPORTED_MODULE_150__ = __webpack_require__(113); +/* harmony import */ var _ol_interaction_KeyboardPan_js__WEBPACK_IMPORTED_MODULE_151__ = __webpack_require__(175); +/* harmony import */ var _ol_interaction_KeyboardZoom_js__WEBPACK_IMPORTED_MODULE_152__ = __webpack_require__(177); +/* harmony import */ var _ol_interaction_Modify_js__WEBPACK_IMPORTED_MODULE_153__ = __webpack_require__(178); +/* harmony import */ var _ol_interaction_MouseWheelZoom_js__WEBPACK_IMPORTED_MODULE_154__ = __webpack_require__(179); +/* harmony import */ var _ol_interaction_PinchRotate_js__WEBPACK_IMPORTED_MODULE_155__ = __webpack_require__(180); +/* harmony import */ var _ol_interaction_PinchZoom_js__WEBPACK_IMPORTED_MODULE_156__ = __webpack_require__(181); +/* harmony import */ var _ol_interaction_Pointer_js__WEBPACK_IMPORTED_MODULE_157__ = __webpack_require__(120); +/* harmony import */ var _ol_interaction_Select_js__WEBPACK_IMPORTED_MODULE_158__ = __webpack_require__(182); +/* harmony import */ var _ol_interaction_Snap_js__WEBPACK_IMPORTED_MODULE_159__ = __webpack_require__(183); +/* harmony import */ var _ol_interaction_Translate_js__WEBPACK_IMPORTED_MODULE_160__ = __webpack_require__(184); +/* harmony import */ var _ol_geom_Circle_js__WEBPACK_IMPORTED_MODULE_109__ = __webpack_require__(126); +/* harmony import */ var _ol_geom_Geometry_js__WEBPACK_IMPORTED_MODULE_110__ = __webpack_require__(52); +/* harmony import */ var _ol_geom_GeometryCollection_js__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__(204); +/* harmony import */ var _ol_geom_LineString_js__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__(127); +/* harmony import */ var _ol_geom_LinearRing_js__WEBPACK_IMPORTED_MODULE_113__ = __webpack_require__(55); +/* harmony import */ var _ol_geom_MultiLineString_js__WEBPACK_IMPORTED_MODULE_114__ = __webpack_require__(171); +/* harmony import */ var _ol_geom_MultiPoint_js__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__(170); +/* harmony import */ var _ol_geom_MultiPolygon_js__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(172); +/* harmony import */ var _ol_geom_Point_js__WEBPACK_IMPORTED_MODULE_117__ = __webpack_require__(47); +/* harmony import */ var _ol_geom_Polygon_js__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__(39); +/* harmony import */ var _ol_geom_SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__(49); +/* harmony import */ var _ol_geom_flat_area_js__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__(42); +/* harmony import */ var _ol_geom_flat_center_js__WEBPACK_IMPORTED_MODULE_121__ = __webpack_require__(173); +/* harmony import */ var _ol_geom_flat_closest_js__WEBPACK_IMPORTED_MODULE_122__ = __webpack_require__(40); +/* harmony import */ var _ol_geom_flat_contains_js__WEBPACK_IMPORTED_MODULE_123__ = __webpack_require__(41); +/* harmony import */ var _ol_geom_flat_deflate_js__WEBPACK_IMPORTED_MODULE_124__ = __webpack_require__(48); +/* harmony import */ var _ol_geom_flat_flip_js__WEBPACK_IMPORTED_MODULE_125__ = __webpack_require__(219); +/* harmony import */ var _ol_geom_flat_geodesic_js__WEBPACK_IMPORTED_MODULE_126__ = __webpack_require__(253); +/* harmony import */ var _ol_geom_flat_inflate_js__WEBPACK_IMPORTED_MODULE_127__ = __webpack_require__(45); +/* harmony import */ var _ol_geom_flat_interiorpoint_js__WEBPACK_IMPORTED_MODULE_128__ = __webpack_require__(46); +/* harmony import */ var _ol_geom_flat_interpolate_js__WEBPACK_IMPORTED_MODULE_129__ = __webpack_require__(128); +/* harmony import */ var _ol_geom_flat_intersectsextent_js__WEBPACK_IMPORTED_MODULE_130__ = __webpack_require__(57); +/* harmony import */ var _ol_geom_flat_length_js__WEBPACK_IMPORTED_MODULE_131__ = __webpack_require__(129); +/* harmony import */ var _ol_geom_flat_orient_js__WEBPACK_IMPORTED_MODULE_132__ = __webpack_require__(43); +/* harmony import */ var _ol_geom_flat_reverse_js__WEBPACK_IMPORTED_MODULE_133__ = __webpack_require__(44); +/* harmony import */ var _ol_geom_flat_segments_js__WEBPACK_IMPORTED_MODULE_134__ = __webpack_require__(58); +/* harmony import */ var _ol_geom_flat_simplify_js__WEBPACK_IMPORTED_MODULE_135__ = __webpack_require__(56); +/* harmony import */ var _ol_geom_flat_straightchunk_js__WEBPACK_IMPORTED_MODULE_136__ = __webpack_require__(151); +/* harmony import */ var _ol_geom_flat_textpath_js__WEBPACK_IMPORTED_MODULE_137__ = __webpack_require__(154); +/* harmony import */ var _ol_geom_flat_topology_js__WEBPACK_IMPORTED_MODULE_138__ = __webpack_require__(254); +/* harmony import */ var _ol_geom_flat_transform_js__WEBPACK_IMPORTED_MODULE_139__ = __webpack_require__(51); +/* harmony import */ var _ol_format_EsriJSON_js__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(191); +/* harmony import */ var _ol_format_Feature_js__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(193); +/* harmony import */ var _ol_format_GML_js__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(194); +/* harmony import */ var _ol_format_GML2_js__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(200); +/* harmony import */ var _ol_format_GML3_js__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(195); +/* harmony import */ var _ol_format_GML32_js__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(201); +/* harmony import */ var _ol_format_GMLBase_js__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(196); +/* harmony import */ var _ol_format_GPX_js__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(202); +/* harmony import */ var _ol_format_GeoJSON_js__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(203); +/* harmony import */ var _ol_format_IGC_js__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(205); +/* harmony import */ var _ol_format_IIIFInfo_js__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(207); +/* harmony import */ var _ol_format_JSONFeature_js__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(192); +/* harmony import */ var _ol_format_KML_js__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(208); +/* harmony import */ var _ol_format_MVT_js__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(210); +/* harmony import */ var _ol_format_OSMXML_js__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(214); +/* harmony import */ var _ol_format_OWS_js__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(215); +/* harmony import */ var _ol_format_Polyline_js__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(218); +/* harmony import */ var _ol_format_TextFeature_js__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(206); +/* harmony import */ var _ol_format_TopoJSON_js__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(220); +/* harmony import */ var _ol_format_WFS_js__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(221); +/* harmony import */ var _ol_format_WKB_js__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(248); +/* harmony import */ var _ol_format_WKT_js__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(249); +/* harmony import */ var _ol_format_WMSCapabilities_js__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(250); +/* harmony import */ var _ol_format_WMSGetFeatureInfo_js__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(251); +/* harmony import */ var _ol_format_WMTSCapabilities_js__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(252); +/* harmony import */ var _ol_format_XML_js__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(216); +/* harmony import */ var _ol_format_XMLFeature_js__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(198); +/* harmony import */ var _ol_format_filter_js__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__(222); +/* harmony import */ var _ol_format_xlink_js__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__(217); +/* harmony import */ var _ol_format_xsd_js__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__(199); +/* harmony import */ var _ol_format_filter_And_js__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(223); +/* harmony import */ var _ol_format_filter_Bbox_js__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(228); +/* harmony import */ var _ol_format_filter_Comparison_js__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(237); +/* harmony import */ var _ol_format_filter_ComparisonBinary_js__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(236); +/* harmony import */ var _ol_format_filter_Contains_js__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(229); +/* harmony import */ var _ol_format_filter_DWithin_js__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(234); +/* harmony import */ var _ol_format_filter_Disjoint_js__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(232); +/* harmony import */ var _ol_format_filter_During_js__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(246); +/* harmony import */ var _ol_format_filter_EqualTo_js__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(235); +/* harmony import */ var _ol_format_filter_Filter_js__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(225); +/* harmony import */ var _ol_format_filter_GreaterThan_js__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(241); +/* harmony import */ var _ol_format_filter_GreaterThanOrEqualTo_js__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(242); +/* harmony import */ var _ol_format_filter_Intersects_js__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(231); +/* harmony import */ var _ol_format_filter_IsBetween_js__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(244); +/* harmony import */ var _ol_format_filter_IsLike_js__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(245); +/* harmony import */ var _ol_format_filter_IsNull_js__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(243); +/* harmony import */ var _ol_format_filter_LessThan_js__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(239); +/* harmony import */ var _ol_format_filter_LessThanOrEqualTo_js__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(240); +/* harmony import */ var _ol_format_filter_LogicalNary_js__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(224); +/* harmony import */ var _ol_format_filter_Not_js__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(227); +/* harmony import */ var _ol_format_filter_NotEqualTo_js__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(238); +/* harmony import */ var _ol_format_filter_Or_js__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(226); +/* harmony import */ var _ol_format_filter_ResourceId_js__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(247); +/* harmony import */ var _ol_format_filter_Spatial_js__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__(230); +/* harmony import */ var _ol_format_filter_Within_js__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__(233); +/* harmony import */ var _ol_events_Event_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(22); +/* harmony import */ var _ol_events_Target_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(29); +/* harmony import */ var _ol_events_condition_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(119); +/* harmony import */ var _ol_control_Attribution_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(68); +/* harmony import */ var _ol_control_Control_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(75); +/* harmony import */ var _ol_control_FullScreen_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(77); +/* harmony import */ var _ol_control_MousePosition_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(78); +/* harmony import */ var _ol_control_OverviewMap_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(80); +/* harmony import */ var _ol_control_Rotate_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(106); +/* harmony import */ var _ol_control_ScaleLine_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(107); +/* harmony import */ var _ol_control_Zoom_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(108); +/* harmony import */ var _ol_control_ZoomSlider_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(109); +/* harmony import */ var _ol_control_ZoomToExtent_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(110); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +var ol = {}; +ol.AssertionError = _ol_AssertionError_js__WEBPACK_IMPORTED_MODULE_1__["default"]; +ol.Collection = _ol_Collection_js__WEBPACK_IMPORTED_MODULE_2__["default"]; +ol.Collection.CollectionEvent = _ol_Collection_js__WEBPACK_IMPORTED_MODULE_2__.CollectionEvent; +ol.DataTile = _ol_DataTile_js__WEBPACK_IMPORTED_MODULE_3__["default"]; +ol.Disposable = _ol_Disposable_js__WEBPACK_IMPORTED_MODULE_4__["default"]; +ol.Feature = _ol_Feature_js__WEBPACK_IMPORTED_MODULE_5__["default"]; +ol.Feature.createStyleFunction = _ol_Feature_js__WEBPACK_IMPORTED_MODULE_5__.createStyleFunction; +ol.Geolocation = _ol_Geolocation_js__WEBPACK_IMPORTED_MODULE_6__["default"]; +ol.Image = _ol_Image_js__WEBPACK_IMPORTED_MODULE_7__["default"]; +ol.Image.listenImage = _ol_Image_js__WEBPACK_IMPORTED_MODULE_7__.listenImage; +ol.ImageBase = _ol_ImageBase_js__WEBPACK_IMPORTED_MODULE_8__["default"]; +ol.ImageCanvas = _ol_ImageCanvas_js__WEBPACK_IMPORTED_MODULE_9__["default"]; +ol.ImageTile = _ol_ImageTile_js__WEBPACK_IMPORTED_MODULE_10__["default"]; +ol.Kinetic = _ol_Kinetic_js__WEBPACK_IMPORTED_MODULE_11__["default"]; +ol.Map = _ol_Map_js__WEBPACK_IMPORTED_MODULE_12__["default"]; +ol.MapBrowserEvent = _ol_MapBrowserEvent_js__WEBPACK_IMPORTED_MODULE_13__["default"]; +ol.MapBrowserEventHandler = _ol_MapBrowserEventHandler_js__WEBPACK_IMPORTED_MODULE_14__["default"]; +ol.MapEvent = _ol_MapEvent_js__WEBPACK_IMPORTED_MODULE_15__["default"]; +ol.Object = _ol_Object_js__WEBPACK_IMPORTED_MODULE_16__["default"]; +ol.Object.ObjectEvent = _ol_Object_js__WEBPACK_IMPORTED_MODULE_16__.ObjectEvent; +ol.Observable = _ol_Observable_js__WEBPACK_IMPORTED_MODULE_17__["default"]; +ol.Observable.unByKey = _ol_Observable_js__WEBPACK_IMPORTED_MODULE_17__.unByKey; +ol.Overlay = _ol_Overlay_js__WEBPACK_IMPORTED_MODULE_18__["default"]; +ol.PluggableMap = _ol_PluggableMap_js__WEBPACK_IMPORTED_MODULE_19__["default"]; +ol.Tile = _ol_Tile_js__WEBPACK_IMPORTED_MODULE_20__["default"]; +ol.TileCache = _ol_TileCache_js__WEBPACK_IMPORTED_MODULE_21__["default"]; +ol.TileQueue = _ol_TileQueue_js__WEBPACK_IMPORTED_MODULE_22__["default"]; +ol.TileQueue.getTilePriority = _ol_TileQueue_js__WEBPACK_IMPORTED_MODULE_22__.getTilePriority; +ol.TileRange = _ol_TileRange_js__WEBPACK_IMPORTED_MODULE_23__["default"]; +ol.TileRange.createOrUpdate = _ol_TileRange_js__WEBPACK_IMPORTED_MODULE_23__.createOrUpdate; +ol.VectorRenderTile = _ol_VectorRenderTile_js__WEBPACK_IMPORTED_MODULE_24__["default"]; +ol.VectorTile = _ol_VectorTile_js__WEBPACK_IMPORTED_MODULE_25__["default"]; +ol.View = _ol_View_js__WEBPACK_IMPORTED_MODULE_26__["default"]; +ol.View.createCenterConstraint = _ol_View_js__WEBPACK_IMPORTED_MODULE_26__.createCenterConstraint; +ol.View.createResolutionConstraint = _ol_View_js__WEBPACK_IMPORTED_MODULE_26__.createResolutionConstraint; +ol.View.createRotationConstraint = _ol_View_js__WEBPACK_IMPORTED_MODULE_26__.createRotationConstraint; +ol.View.isNoopAnimation = _ol_View_js__WEBPACK_IMPORTED_MODULE_26__.isNoopAnimation; +ol.array = {}; +ol.array.binarySearch = _ol_array_js__WEBPACK_IMPORTED_MODULE_27__.binarySearch; +ol.array.equals = _ol_array_js__WEBPACK_IMPORTED_MODULE_27__.equals; +ol.array.extend = _ol_array_js__WEBPACK_IMPORTED_MODULE_27__.extend; +ol.array.find = _ol_array_js__WEBPACK_IMPORTED_MODULE_27__.find; +ol.array.findIndex = _ol_array_js__WEBPACK_IMPORTED_MODULE_27__.findIndex; +ol.array.includes = _ol_array_js__WEBPACK_IMPORTED_MODULE_27__.includes; +ol.array.isSorted = _ol_array_js__WEBPACK_IMPORTED_MODULE_27__.isSorted; +ol.array.linearFindNearest = _ol_array_js__WEBPACK_IMPORTED_MODULE_27__.linearFindNearest; +ol.array.numberSafeCompareFunction = _ol_array_js__WEBPACK_IMPORTED_MODULE_27__.numberSafeCompareFunction; +ol.array.remove = _ol_array_js__WEBPACK_IMPORTED_MODULE_27__.remove; +ol.array.reverseSubArray = _ol_array_js__WEBPACK_IMPORTED_MODULE_27__.reverseSubArray; +ol.array.stableSort = _ol_array_js__WEBPACK_IMPORTED_MODULE_27__.stableSort; +ol.asserts = {}; +ol.asserts.assert = _ol_asserts_js__WEBPACK_IMPORTED_MODULE_28__.assert; +ol.centerconstraint = {}; +ol.centerconstraint.createExtent = _ol_centerconstraint_js__WEBPACK_IMPORTED_MODULE_29__.createExtent; +ol.centerconstraint.none = _ol_centerconstraint_js__WEBPACK_IMPORTED_MODULE_29__.none; +ol.color = {}; +ol.color.asArray = _ol_color_js__WEBPACK_IMPORTED_MODULE_30__.asArray; +ol.color.asString = _ol_color_js__WEBPACK_IMPORTED_MODULE_30__.asString; +ol.color.fromString = _ol_color_js__WEBPACK_IMPORTED_MODULE_30__.fromString; +ol.color.isStringColor = _ol_color_js__WEBPACK_IMPORTED_MODULE_30__.isStringColor; +ol.color.normalize = _ol_color_js__WEBPACK_IMPORTED_MODULE_30__.normalize; +ol.color.toString = _ol_color_js__WEBPACK_IMPORTED_MODULE_30__.toString; +ol.colorlike = {}; +ol.colorlike.asColorLike = _ol_colorlike_js__WEBPACK_IMPORTED_MODULE_31__.asColorLike; +ol.control = {}; +ol.control.Attribution = _ol_control_Attribution_js__WEBPACK_IMPORTED_MODULE_32__["default"]; +ol.control.Control = _ol_control_Control_js__WEBPACK_IMPORTED_MODULE_33__["default"]; +ol.control.FullScreen = _ol_control_FullScreen_js__WEBPACK_IMPORTED_MODULE_34__["default"]; +ol.control.MousePosition = _ol_control_MousePosition_js__WEBPACK_IMPORTED_MODULE_35__["default"]; +ol.control.OverviewMap = _ol_control_OverviewMap_js__WEBPACK_IMPORTED_MODULE_36__["default"]; +ol.control.Rotate = _ol_control_Rotate_js__WEBPACK_IMPORTED_MODULE_37__["default"]; +ol.control.ScaleLine = _ol_control_ScaleLine_js__WEBPACK_IMPORTED_MODULE_38__["default"]; +ol.control.Zoom = _ol_control_Zoom_js__WEBPACK_IMPORTED_MODULE_39__["default"]; +ol.control.ZoomSlider = _ol_control_ZoomSlider_js__WEBPACK_IMPORTED_MODULE_40__["default"]; +ol.control.ZoomToExtent = _ol_control_ZoomToExtent_js__WEBPACK_IMPORTED_MODULE_41__["default"]; +ol.control.defaults = _ol_control_js__WEBPACK_IMPORTED_MODULE_42__.defaults; +ol.coordinate = {}; +ol.coordinate.add = _ol_coordinate_js__WEBPACK_IMPORTED_MODULE_43__.add; +ol.coordinate.closestOnCircle = _ol_coordinate_js__WEBPACK_IMPORTED_MODULE_43__.closestOnCircle; +ol.coordinate.closestOnSegment = _ol_coordinate_js__WEBPACK_IMPORTED_MODULE_43__.closestOnSegment; +ol.coordinate.createStringXY = _ol_coordinate_js__WEBPACK_IMPORTED_MODULE_43__.createStringXY; +ol.coordinate.degreesToStringHDMS = _ol_coordinate_js__WEBPACK_IMPORTED_MODULE_43__.degreesToStringHDMS; +ol.coordinate.distance = _ol_coordinate_js__WEBPACK_IMPORTED_MODULE_43__.distance; +ol.coordinate.equals = _ol_coordinate_js__WEBPACK_IMPORTED_MODULE_43__.equals; +ol.coordinate.format = _ol_coordinate_js__WEBPACK_IMPORTED_MODULE_43__.format; +ol.coordinate.getWorldsAway = _ol_coordinate_js__WEBPACK_IMPORTED_MODULE_43__.getWorldsAway; +ol.coordinate.rotate = _ol_coordinate_js__WEBPACK_IMPORTED_MODULE_43__.rotate; +ol.coordinate.scale = _ol_coordinate_js__WEBPACK_IMPORTED_MODULE_43__.scale; +ol.coordinate.squaredDistance = _ol_coordinate_js__WEBPACK_IMPORTED_MODULE_43__.squaredDistance; +ol.coordinate.squaredDistanceToSegment = _ol_coordinate_js__WEBPACK_IMPORTED_MODULE_43__.squaredDistanceToSegment; +ol.coordinate.toStringHDMS = _ol_coordinate_js__WEBPACK_IMPORTED_MODULE_43__.toStringHDMS; +ol.coordinate.toStringXY = _ol_coordinate_js__WEBPACK_IMPORTED_MODULE_43__.toStringXY; +ol.coordinate.wrapX = _ol_coordinate_js__WEBPACK_IMPORTED_MODULE_43__.wrapX; +ol.css = {}; +ol.css.CLASS_COLLAPSED = _ol_css_js__WEBPACK_IMPORTED_MODULE_44__.CLASS_COLLAPSED; +ol.css.CLASS_CONTROL = _ol_css_js__WEBPACK_IMPORTED_MODULE_44__.CLASS_CONTROL; +ol.css.CLASS_HIDDEN = _ol_css_js__WEBPACK_IMPORTED_MODULE_44__.CLASS_HIDDEN; +ol.css.CLASS_SELECTABLE = _ol_css_js__WEBPACK_IMPORTED_MODULE_44__.CLASS_SELECTABLE; +ol.css.CLASS_UNSELECTABLE = _ol_css_js__WEBPACK_IMPORTED_MODULE_44__.CLASS_UNSELECTABLE; +ol.css.CLASS_UNSUPPORTED = _ol_css_js__WEBPACK_IMPORTED_MODULE_44__.CLASS_UNSUPPORTED; +ol.css.cssOpacity = _ol_css_js__WEBPACK_IMPORTED_MODULE_44__.cssOpacity; +ol.css.getFontParameters = _ol_css_js__WEBPACK_IMPORTED_MODULE_44__.getFontParameters; +ol.dom = {}; +ol.dom.createCanvasContext2D = _ol_dom_js__WEBPACK_IMPORTED_MODULE_45__.createCanvasContext2D; +ol.dom.outerHeight = _ol_dom_js__WEBPACK_IMPORTED_MODULE_45__.outerHeight; +ol.dom.outerWidth = _ol_dom_js__WEBPACK_IMPORTED_MODULE_45__.outerWidth; +ol.dom.removeChildren = _ol_dom_js__WEBPACK_IMPORTED_MODULE_45__.removeChildren; +ol.dom.removeNode = _ol_dom_js__WEBPACK_IMPORTED_MODULE_45__.removeNode; +ol.dom.replaceChildren = _ol_dom_js__WEBPACK_IMPORTED_MODULE_45__.replaceChildren; +ol.dom.replaceNode = _ol_dom_js__WEBPACK_IMPORTED_MODULE_45__.replaceNode; +ol.easing = {}; +ol.easing.easeIn = _ol_easing_js__WEBPACK_IMPORTED_MODULE_46__.easeIn; +ol.easing.easeOut = _ol_easing_js__WEBPACK_IMPORTED_MODULE_46__.easeOut; +ol.easing.inAndOut = _ol_easing_js__WEBPACK_IMPORTED_MODULE_46__.inAndOut; +ol.easing.linear = _ol_easing_js__WEBPACK_IMPORTED_MODULE_46__.linear; +ol.easing.upAndDown = _ol_easing_js__WEBPACK_IMPORTED_MODULE_46__.upAndDown; +ol.events = {}; +ol.events.Event = _ol_events_Event_js__WEBPACK_IMPORTED_MODULE_47__["default"]; +ol.events.Event.preventDefault = _ol_events_Event_js__WEBPACK_IMPORTED_MODULE_47__.preventDefault; +ol.events.Event.stopPropagation = _ol_events_Event_js__WEBPACK_IMPORTED_MODULE_47__.stopPropagation; +ol.events.Target = _ol_events_Target_js__WEBPACK_IMPORTED_MODULE_48__["default"]; +ol.events.condition = {}; +ol.events.condition.all = _ol_events_condition_js__WEBPACK_IMPORTED_MODULE_49__.all; +ol.events.condition.altKeyOnly = _ol_events_condition_js__WEBPACK_IMPORTED_MODULE_49__.altKeyOnly; +ol.events.condition.altShiftKeysOnly = _ol_events_condition_js__WEBPACK_IMPORTED_MODULE_49__.altShiftKeysOnly; +ol.events.condition.always = _ol_events_condition_js__WEBPACK_IMPORTED_MODULE_49__.always; +ol.events.condition.click = _ol_events_condition_js__WEBPACK_IMPORTED_MODULE_49__.click; +ol.events.condition.doubleClick = _ol_events_condition_js__WEBPACK_IMPORTED_MODULE_49__.doubleClick; +ol.events.condition.focus = _ol_events_condition_js__WEBPACK_IMPORTED_MODULE_49__.focus; +ol.events.condition.focusWithTabindex = _ol_events_condition_js__WEBPACK_IMPORTED_MODULE_49__.focusWithTabindex; +ol.events.condition.mouseActionButton = _ol_events_condition_js__WEBPACK_IMPORTED_MODULE_49__.mouseActionButton; +ol.events.condition.mouseOnly = _ol_events_condition_js__WEBPACK_IMPORTED_MODULE_49__.mouseOnly; +ol.events.condition.never = _ol_events_condition_js__WEBPACK_IMPORTED_MODULE_49__.never; +ol.events.condition.noModifierKeys = _ol_events_condition_js__WEBPACK_IMPORTED_MODULE_49__.noModifierKeys; +ol.events.condition.penOnly = _ol_events_condition_js__WEBPACK_IMPORTED_MODULE_49__.penOnly; +ol.events.condition.platformModifierKeyOnly = _ol_events_condition_js__WEBPACK_IMPORTED_MODULE_49__.platformModifierKeyOnly; +ol.events.condition.pointerMove = _ol_events_condition_js__WEBPACK_IMPORTED_MODULE_49__.pointerMove; +ol.events.condition.primaryAction = _ol_events_condition_js__WEBPACK_IMPORTED_MODULE_49__.primaryAction; +ol.events.condition.shiftKeyOnly = _ol_events_condition_js__WEBPACK_IMPORTED_MODULE_49__.shiftKeyOnly; +ol.events.condition.singleClick = _ol_events_condition_js__WEBPACK_IMPORTED_MODULE_49__.singleClick; +ol.events.condition.targetNotEditable = _ol_events_condition_js__WEBPACK_IMPORTED_MODULE_49__.targetNotEditable; +ol.events.condition.touchOnly = _ol_events_condition_js__WEBPACK_IMPORTED_MODULE_49__.touchOnly; +ol.events.listen = _ol_events_js__WEBPACK_IMPORTED_MODULE_50__.listen; +ol.events.listenOnce = _ol_events_js__WEBPACK_IMPORTED_MODULE_50__.listenOnce; +ol.events.unlistenByKey = _ol_events_js__WEBPACK_IMPORTED_MODULE_50__.unlistenByKey; +ol.extent = {}; +ol.extent.applyTransform = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.applyTransform; +ol.extent.approximatelyEquals = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.approximatelyEquals; +ol.extent.boundingExtent = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.boundingExtent; +ol.extent.buffer = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.buffer; +ol.extent.clone = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.clone; +ol.extent.closestSquaredDistanceXY = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.closestSquaredDistanceXY; +ol.extent.containsCoordinate = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.containsCoordinate; +ol.extent.containsExtent = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.containsExtent; +ol.extent.containsXY = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.containsXY; +ol.extent.coordinateRelationship = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.coordinateRelationship; +ol.extent.createEmpty = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.createEmpty; +ol.extent.createOrUpdate = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.createOrUpdate; +ol.extent.createOrUpdateEmpty = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.createOrUpdateEmpty; +ol.extent.createOrUpdateFromCoordinate = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.createOrUpdateFromCoordinate; +ol.extent.createOrUpdateFromCoordinates = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.createOrUpdateFromCoordinates; +ol.extent.createOrUpdateFromFlatCoordinates = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.createOrUpdateFromFlatCoordinates; +ol.extent.createOrUpdateFromRings = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.createOrUpdateFromRings; +ol.extent.equals = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.equals; +ol.extent.extend = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.extend; +ol.extent.extendCoordinate = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.extendCoordinate; +ol.extent.extendCoordinates = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.extendCoordinates; +ol.extent.extendFlatCoordinates = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.extendFlatCoordinates; +ol.extent.extendRings = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.extendRings; +ol.extent.extendXY = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.extendXY; +ol.extent.forEachCorner = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.forEachCorner; +ol.extent.getArea = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.getArea; +ol.extent.getBottomLeft = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.getBottomLeft; +ol.extent.getBottomRight = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.getBottomRight; +ol.extent.getCenter = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.getCenter; +ol.extent.getCorner = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.getCorner; +ol.extent.getEnlargedArea = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.getEnlargedArea; +ol.extent.getForViewAndSize = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.getForViewAndSize; +ol.extent.getHeight = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.getHeight; +ol.extent.getIntersection = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.getIntersection; +ol.extent.getIntersectionArea = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.getIntersectionArea; +ol.extent.getMargin = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.getMargin; +ol.extent.getSize = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.getSize; +ol.extent.getTopLeft = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.getTopLeft; +ol.extent.getTopRight = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.getTopRight; +ol.extent.getWidth = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.getWidth; +ol.extent.intersects = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.intersects; +ol.extent.intersectsSegment = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.intersectsSegment; +ol.extent.isEmpty = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.isEmpty; +ol.extent.returnOrUpdate = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.returnOrUpdate; +ol.extent.scaleFromCenter = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.scaleFromCenter; +ol.extent.wrapX = _ol_extent_js__WEBPACK_IMPORTED_MODULE_51__.wrapX; +ol.featureloader = {}; +ol.featureloader.loadFeaturesXhr = _ol_featureloader_js__WEBPACK_IMPORTED_MODULE_52__.loadFeaturesXhr; +ol.featureloader.setWithCredentials = _ol_featureloader_js__WEBPACK_IMPORTED_MODULE_52__.setWithCredentials; +ol.featureloader.xhr = _ol_featureloader_js__WEBPACK_IMPORTED_MODULE_52__.xhr; +ol.format = {}; +ol.format.EsriJSON = _ol_format_EsriJSON_js__WEBPACK_IMPORTED_MODULE_53__["default"]; +ol.format.Feature = _ol_format_Feature_js__WEBPACK_IMPORTED_MODULE_54__["default"]; +ol.format.Feature.transformExtentWithOptions = _ol_format_Feature_js__WEBPACK_IMPORTED_MODULE_54__.transformExtentWithOptions; +ol.format.Feature.transformGeometryWithOptions = _ol_format_Feature_js__WEBPACK_IMPORTED_MODULE_54__.transformGeometryWithOptions; +ol.format.GML = _ol_format_GML_js__WEBPACK_IMPORTED_MODULE_55__["default"]; +ol.format.GML2 = _ol_format_GML2_js__WEBPACK_IMPORTED_MODULE_56__["default"]; +ol.format.GML3 = _ol_format_GML3_js__WEBPACK_IMPORTED_MODULE_57__["default"]; +ol.format.GML32 = _ol_format_GML32_js__WEBPACK_IMPORTED_MODULE_58__["default"]; +ol.format.GMLBase = _ol_format_GMLBase_js__WEBPACK_IMPORTED_MODULE_59__["default"]; +ol.format.GMLBase.GMLNS = _ol_format_GMLBase_js__WEBPACK_IMPORTED_MODULE_59__.GMLNS; +ol.format.GPX = _ol_format_GPX_js__WEBPACK_IMPORTED_MODULE_60__["default"]; +ol.format.GeoJSON = _ol_format_GeoJSON_js__WEBPACK_IMPORTED_MODULE_61__["default"]; +ol.format.IGC = _ol_format_IGC_js__WEBPACK_IMPORTED_MODULE_62__["default"]; +ol.format.IIIFInfo = _ol_format_IIIFInfo_js__WEBPACK_IMPORTED_MODULE_63__["default"]; +ol.format.JSONFeature = _ol_format_JSONFeature_js__WEBPACK_IMPORTED_MODULE_64__["default"]; +ol.format.KML = _ol_format_KML_js__WEBPACK_IMPORTED_MODULE_65__["default"]; +ol.format.KML.getDefaultFillStyle = _ol_format_KML_js__WEBPACK_IMPORTED_MODULE_65__.getDefaultFillStyle; +ol.format.KML.getDefaultImageStyle = _ol_format_KML_js__WEBPACK_IMPORTED_MODULE_65__.getDefaultImageStyle; +ol.format.KML.getDefaultStrokeStyle = _ol_format_KML_js__WEBPACK_IMPORTED_MODULE_65__.getDefaultStrokeStyle; +ol.format.KML.getDefaultStyle = _ol_format_KML_js__WEBPACK_IMPORTED_MODULE_65__.getDefaultStyle; +ol.format.KML.getDefaultStyleArray = _ol_format_KML_js__WEBPACK_IMPORTED_MODULE_65__.getDefaultStyleArray; +ol.format.KML.getDefaultTextStyle = _ol_format_KML_js__WEBPACK_IMPORTED_MODULE_65__.getDefaultTextStyle; +ol.format.KML.readFlatCoordinates = _ol_format_KML_js__WEBPACK_IMPORTED_MODULE_65__.readFlatCoordinates; +ol.format.MVT = _ol_format_MVT_js__WEBPACK_IMPORTED_MODULE_66__["default"]; +ol.format.OSMXML = _ol_format_OSMXML_js__WEBPACK_IMPORTED_MODULE_67__["default"]; +ol.format.OWS = _ol_format_OWS_js__WEBPACK_IMPORTED_MODULE_68__["default"]; +ol.format.Polyline = _ol_format_Polyline_js__WEBPACK_IMPORTED_MODULE_69__["default"]; +ol.format.Polyline.decodeDeltas = _ol_format_Polyline_js__WEBPACK_IMPORTED_MODULE_69__.decodeDeltas; +ol.format.Polyline.decodeFloats = _ol_format_Polyline_js__WEBPACK_IMPORTED_MODULE_69__.decodeFloats; +ol.format.Polyline.decodeSignedIntegers = _ol_format_Polyline_js__WEBPACK_IMPORTED_MODULE_69__.decodeSignedIntegers; +ol.format.Polyline.decodeUnsignedIntegers = _ol_format_Polyline_js__WEBPACK_IMPORTED_MODULE_69__.decodeUnsignedIntegers; +ol.format.Polyline.encodeDeltas = _ol_format_Polyline_js__WEBPACK_IMPORTED_MODULE_69__.encodeDeltas; +ol.format.Polyline.encodeFloats = _ol_format_Polyline_js__WEBPACK_IMPORTED_MODULE_69__.encodeFloats; +ol.format.Polyline.encodeSignedIntegers = _ol_format_Polyline_js__WEBPACK_IMPORTED_MODULE_69__.encodeSignedIntegers; +ol.format.Polyline.encodeUnsignedInteger = _ol_format_Polyline_js__WEBPACK_IMPORTED_MODULE_69__.encodeUnsignedInteger; +ol.format.Polyline.encodeUnsignedIntegers = _ol_format_Polyline_js__WEBPACK_IMPORTED_MODULE_69__.encodeUnsignedIntegers; +ol.format.TextFeature = _ol_format_TextFeature_js__WEBPACK_IMPORTED_MODULE_70__["default"]; +ol.format.TopoJSON = _ol_format_TopoJSON_js__WEBPACK_IMPORTED_MODULE_71__["default"]; +ol.format.WFS = _ol_format_WFS_js__WEBPACK_IMPORTED_MODULE_72__["default"]; +ol.format.WFS.writeFilter = _ol_format_WFS_js__WEBPACK_IMPORTED_MODULE_72__.writeFilter; +ol.format.WKB = _ol_format_WKB_js__WEBPACK_IMPORTED_MODULE_73__["default"]; +ol.format.WKT = _ol_format_WKT_js__WEBPACK_IMPORTED_MODULE_74__["default"]; +ol.format.WMSCapabilities = _ol_format_WMSCapabilities_js__WEBPACK_IMPORTED_MODULE_75__["default"]; +ol.format.WMSGetFeatureInfo = _ol_format_WMSGetFeatureInfo_js__WEBPACK_IMPORTED_MODULE_76__["default"]; +ol.format.WMTSCapabilities = _ol_format_WMTSCapabilities_js__WEBPACK_IMPORTED_MODULE_77__["default"]; +ol.format.XML = _ol_format_XML_js__WEBPACK_IMPORTED_MODULE_78__["default"]; +ol.format.XMLFeature = _ol_format_XMLFeature_js__WEBPACK_IMPORTED_MODULE_79__["default"]; +ol.format.filter = {}; +ol.format.filter.And = _ol_format_filter_And_js__WEBPACK_IMPORTED_MODULE_80__["default"]; +ol.format.filter.Bbox = _ol_format_filter_Bbox_js__WEBPACK_IMPORTED_MODULE_81__["default"]; +ol.format.filter.Comparison = _ol_format_filter_Comparison_js__WEBPACK_IMPORTED_MODULE_82__["default"]; +ol.format.filter.ComparisonBinary = _ol_format_filter_ComparisonBinary_js__WEBPACK_IMPORTED_MODULE_83__["default"]; +ol.format.filter.Contains = _ol_format_filter_Contains_js__WEBPACK_IMPORTED_MODULE_84__["default"]; +ol.format.filter.DWithin = _ol_format_filter_DWithin_js__WEBPACK_IMPORTED_MODULE_85__["default"]; +ol.format.filter.Disjoint = _ol_format_filter_Disjoint_js__WEBPACK_IMPORTED_MODULE_86__["default"]; +ol.format.filter.During = _ol_format_filter_During_js__WEBPACK_IMPORTED_MODULE_87__["default"]; +ol.format.filter.EqualTo = _ol_format_filter_EqualTo_js__WEBPACK_IMPORTED_MODULE_88__["default"]; +ol.format.filter.Filter = _ol_format_filter_Filter_js__WEBPACK_IMPORTED_MODULE_89__["default"]; +ol.format.filter.GreaterThan = _ol_format_filter_GreaterThan_js__WEBPACK_IMPORTED_MODULE_90__["default"]; +ol.format.filter.GreaterThanOrEqualTo = _ol_format_filter_GreaterThanOrEqualTo_js__WEBPACK_IMPORTED_MODULE_91__["default"]; +ol.format.filter.Intersects = _ol_format_filter_Intersects_js__WEBPACK_IMPORTED_MODULE_92__["default"]; +ol.format.filter.IsBetween = _ol_format_filter_IsBetween_js__WEBPACK_IMPORTED_MODULE_93__["default"]; +ol.format.filter.IsLike = _ol_format_filter_IsLike_js__WEBPACK_IMPORTED_MODULE_94__["default"]; +ol.format.filter.IsNull = _ol_format_filter_IsNull_js__WEBPACK_IMPORTED_MODULE_95__["default"]; +ol.format.filter.LessThan = _ol_format_filter_LessThan_js__WEBPACK_IMPORTED_MODULE_96__["default"]; +ol.format.filter.LessThanOrEqualTo = _ol_format_filter_LessThanOrEqualTo_js__WEBPACK_IMPORTED_MODULE_97__["default"]; +ol.format.filter.LogicalNary = _ol_format_filter_LogicalNary_js__WEBPACK_IMPORTED_MODULE_98__["default"]; +ol.format.filter.Not = _ol_format_filter_Not_js__WEBPACK_IMPORTED_MODULE_99__["default"]; +ol.format.filter.NotEqualTo = _ol_format_filter_NotEqualTo_js__WEBPACK_IMPORTED_MODULE_100__["default"]; +ol.format.filter.Or = _ol_format_filter_Or_js__WEBPACK_IMPORTED_MODULE_101__["default"]; +ol.format.filter.ResourceId = _ol_format_filter_ResourceId_js__WEBPACK_IMPORTED_MODULE_102__["default"]; +ol.format.filter.Spatial = _ol_format_filter_Spatial_js__WEBPACK_IMPORTED_MODULE_103__["default"]; +ol.format.filter.Within = _ol_format_filter_Within_js__WEBPACK_IMPORTED_MODULE_104__["default"]; +ol.format.filter.and = _ol_format_filter_js__WEBPACK_IMPORTED_MODULE_105__.and; +ol.format.filter.bbox = _ol_format_filter_js__WEBPACK_IMPORTED_MODULE_105__.bbox; +ol.format.filter.between = _ol_format_filter_js__WEBPACK_IMPORTED_MODULE_105__.between; +ol.format.filter.contains = _ol_format_filter_js__WEBPACK_IMPORTED_MODULE_105__.contains; +ol.format.filter.disjoint = _ol_format_filter_js__WEBPACK_IMPORTED_MODULE_105__.disjoint; +ol.format.filter.during = _ol_format_filter_js__WEBPACK_IMPORTED_MODULE_105__.during; +ol.format.filter.dwithin = _ol_format_filter_js__WEBPACK_IMPORTED_MODULE_105__.dwithin; +ol.format.filter.equalTo = _ol_format_filter_js__WEBPACK_IMPORTED_MODULE_105__.equalTo; +ol.format.filter.greaterThan = _ol_format_filter_js__WEBPACK_IMPORTED_MODULE_105__.greaterThan; +ol.format.filter.greaterThanOrEqualTo = _ol_format_filter_js__WEBPACK_IMPORTED_MODULE_105__.greaterThanOrEqualTo; +ol.format.filter.intersects = _ol_format_filter_js__WEBPACK_IMPORTED_MODULE_105__.intersects; +ol.format.filter.isNull = _ol_format_filter_js__WEBPACK_IMPORTED_MODULE_105__.isNull; +ol.format.filter.lessThan = _ol_format_filter_js__WEBPACK_IMPORTED_MODULE_105__.lessThan; +ol.format.filter.lessThanOrEqualTo = _ol_format_filter_js__WEBPACK_IMPORTED_MODULE_105__.lessThanOrEqualTo; +ol.format.filter.like = _ol_format_filter_js__WEBPACK_IMPORTED_MODULE_105__.like; +ol.format.filter.not = _ol_format_filter_js__WEBPACK_IMPORTED_MODULE_105__.not; +ol.format.filter.notEqualTo = _ol_format_filter_js__WEBPACK_IMPORTED_MODULE_105__.notEqualTo; +ol.format.filter.or = _ol_format_filter_js__WEBPACK_IMPORTED_MODULE_105__.or; +ol.format.filter.resourceId = _ol_format_filter_js__WEBPACK_IMPORTED_MODULE_105__.resourceId; +ol.format.filter.within = _ol_format_filter_js__WEBPACK_IMPORTED_MODULE_105__.within; +ol.format.xlink = {}; +ol.format.xlink.readHref = _ol_format_xlink_js__WEBPACK_IMPORTED_MODULE_106__.readHref; +ol.format.xsd = {}; +ol.format.xsd.readBoolean = _ol_format_xsd_js__WEBPACK_IMPORTED_MODULE_107__.readBoolean; +ol.format.xsd.readBooleanString = _ol_format_xsd_js__WEBPACK_IMPORTED_MODULE_107__.readBooleanString; +ol.format.xsd.readDateTime = _ol_format_xsd_js__WEBPACK_IMPORTED_MODULE_107__.readDateTime; +ol.format.xsd.readDecimal = _ol_format_xsd_js__WEBPACK_IMPORTED_MODULE_107__.readDecimal; +ol.format.xsd.readDecimalString = _ol_format_xsd_js__WEBPACK_IMPORTED_MODULE_107__.readDecimalString; +ol.format.xsd.readNonNegativeIntegerString = _ol_format_xsd_js__WEBPACK_IMPORTED_MODULE_107__.readNonNegativeIntegerString; +ol.format.xsd.readPositiveInteger = _ol_format_xsd_js__WEBPACK_IMPORTED_MODULE_107__.readPositiveInteger; +ol.format.xsd.readString = _ol_format_xsd_js__WEBPACK_IMPORTED_MODULE_107__.readString; +ol.format.xsd.writeBooleanTextNode = _ol_format_xsd_js__WEBPACK_IMPORTED_MODULE_107__.writeBooleanTextNode; +ol.format.xsd.writeCDATASection = _ol_format_xsd_js__WEBPACK_IMPORTED_MODULE_107__.writeCDATASection; +ol.format.xsd.writeDateTimeTextNode = _ol_format_xsd_js__WEBPACK_IMPORTED_MODULE_107__.writeDateTimeTextNode; +ol.format.xsd.writeDecimalTextNode = _ol_format_xsd_js__WEBPACK_IMPORTED_MODULE_107__.writeDecimalTextNode; +ol.format.xsd.writeNonNegativeIntegerTextNode = _ol_format_xsd_js__WEBPACK_IMPORTED_MODULE_107__.writeNonNegativeIntegerTextNode; +ol.format.xsd.writeStringTextNode = _ol_format_xsd_js__WEBPACK_IMPORTED_MODULE_107__.writeStringTextNode; +ol.functions = {}; +ol.functions.FALSE = _ol_functions_js__WEBPACK_IMPORTED_MODULE_108__.FALSE; +ol.functions.TRUE = _ol_functions_js__WEBPACK_IMPORTED_MODULE_108__.TRUE; +ol.functions.VOID = _ol_functions_js__WEBPACK_IMPORTED_MODULE_108__.VOID; +ol.functions.memoizeOne = _ol_functions_js__WEBPACK_IMPORTED_MODULE_108__.memoizeOne; +ol.geom = {}; +ol.geom.Circle = _ol_geom_Circle_js__WEBPACK_IMPORTED_MODULE_109__["default"]; +ol.geom.Geometry = _ol_geom_Geometry_js__WEBPACK_IMPORTED_MODULE_110__["default"]; +ol.geom.GeometryCollection = _ol_geom_GeometryCollection_js__WEBPACK_IMPORTED_MODULE_111__["default"]; +ol.geom.LineString = _ol_geom_LineString_js__WEBPACK_IMPORTED_MODULE_112__["default"]; +ol.geom.LinearRing = _ol_geom_LinearRing_js__WEBPACK_IMPORTED_MODULE_113__["default"]; +ol.geom.MultiLineString = _ol_geom_MultiLineString_js__WEBPACK_IMPORTED_MODULE_114__["default"]; +ol.geom.MultiPoint = _ol_geom_MultiPoint_js__WEBPACK_IMPORTED_MODULE_115__["default"]; +ol.geom.MultiPolygon = _ol_geom_MultiPolygon_js__WEBPACK_IMPORTED_MODULE_116__["default"]; +ol.geom.Point = _ol_geom_Point_js__WEBPACK_IMPORTED_MODULE_117__["default"]; +ol.geom.Polygon = _ol_geom_Polygon_js__WEBPACK_IMPORTED_MODULE_118__["default"]; +ol.geom.Polygon.circular = _ol_geom_Polygon_js__WEBPACK_IMPORTED_MODULE_118__.circular; +ol.geom.Polygon.fromCircle = _ol_geom_Polygon_js__WEBPACK_IMPORTED_MODULE_118__.fromCircle; +ol.geom.Polygon.fromExtent = _ol_geom_Polygon_js__WEBPACK_IMPORTED_MODULE_118__.fromExtent; +ol.geom.Polygon.makeRegular = _ol_geom_Polygon_js__WEBPACK_IMPORTED_MODULE_118__.makeRegular; +ol.geom.SimpleGeometry = _ol_geom_SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_119__["default"]; +ol.geom.SimpleGeometry.getStrideForLayout = _ol_geom_SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_119__.getStrideForLayout; +ol.geom.SimpleGeometry.transformGeom2D = _ol_geom_SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_119__.transformGeom2D; +ol.geom.flat = {}; +ol.geom.flat.area = {}; +ol.geom.flat.area.linearRing = _ol_geom_flat_area_js__WEBPACK_IMPORTED_MODULE_120__.linearRing; +ol.geom.flat.area.linearRings = _ol_geom_flat_area_js__WEBPACK_IMPORTED_MODULE_120__.linearRings; +ol.geom.flat.area.linearRingss = _ol_geom_flat_area_js__WEBPACK_IMPORTED_MODULE_120__.linearRingss; +ol.geom.flat.center = {}; +ol.geom.flat.center.linearRingss = _ol_geom_flat_center_js__WEBPACK_IMPORTED_MODULE_121__.linearRingss; +ol.geom.flat.closest = {}; +ol.geom.flat.closest.arrayMaxSquaredDelta = _ol_geom_flat_closest_js__WEBPACK_IMPORTED_MODULE_122__.arrayMaxSquaredDelta; +ol.geom.flat.closest.assignClosestArrayPoint = _ol_geom_flat_closest_js__WEBPACK_IMPORTED_MODULE_122__.assignClosestArrayPoint; +ol.geom.flat.closest.assignClosestMultiArrayPoint = _ol_geom_flat_closest_js__WEBPACK_IMPORTED_MODULE_122__.assignClosestMultiArrayPoint; +ol.geom.flat.closest.assignClosestPoint = _ol_geom_flat_closest_js__WEBPACK_IMPORTED_MODULE_122__.assignClosestPoint; +ol.geom.flat.closest.maxSquaredDelta = _ol_geom_flat_closest_js__WEBPACK_IMPORTED_MODULE_122__.maxSquaredDelta; +ol.geom.flat.closest.multiArrayMaxSquaredDelta = _ol_geom_flat_closest_js__WEBPACK_IMPORTED_MODULE_122__.multiArrayMaxSquaredDelta; +ol.geom.flat.contains = {}; +ol.geom.flat.contains.linearRingContainsExtent = _ol_geom_flat_contains_js__WEBPACK_IMPORTED_MODULE_123__.linearRingContainsExtent; +ol.geom.flat.contains.linearRingContainsXY = _ol_geom_flat_contains_js__WEBPACK_IMPORTED_MODULE_123__.linearRingContainsXY; +ol.geom.flat.contains.linearRingsContainsXY = _ol_geom_flat_contains_js__WEBPACK_IMPORTED_MODULE_123__.linearRingsContainsXY; +ol.geom.flat.contains.linearRingssContainsXY = _ol_geom_flat_contains_js__WEBPACK_IMPORTED_MODULE_123__.linearRingssContainsXY; +ol.geom.flat.deflate = {}; +ol.geom.flat.deflate.deflateCoordinate = _ol_geom_flat_deflate_js__WEBPACK_IMPORTED_MODULE_124__.deflateCoordinate; +ol.geom.flat.deflate.deflateCoordinates = _ol_geom_flat_deflate_js__WEBPACK_IMPORTED_MODULE_124__.deflateCoordinates; +ol.geom.flat.deflate.deflateCoordinatesArray = _ol_geom_flat_deflate_js__WEBPACK_IMPORTED_MODULE_124__.deflateCoordinatesArray; +ol.geom.flat.deflate.deflateMultiCoordinatesArray = _ol_geom_flat_deflate_js__WEBPACK_IMPORTED_MODULE_124__.deflateMultiCoordinatesArray; +ol.geom.flat.flip = {}; +ol.geom.flat.flip.flipXY = _ol_geom_flat_flip_js__WEBPACK_IMPORTED_MODULE_125__.flipXY; +ol.geom.flat.geodesic = {}; +ol.geom.flat.geodesic.greatCircleArc = _ol_geom_flat_geodesic_js__WEBPACK_IMPORTED_MODULE_126__.greatCircleArc; +ol.geom.flat.geodesic.meridian = _ol_geom_flat_geodesic_js__WEBPACK_IMPORTED_MODULE_126__.meridian; +ol.geom.flat.geodesic.parallel = _ol_geom_flat_geodesic_js__WEBPACK_IMPORTED_MODULE_126__.parallel; +ol.geom.flat.inflate = {}; +ol.geom.flat.inflate.inflateCoordinates = _ol_geom_flat_inflate_js__WEBPACK_IMPORTED_MODULE_127__.inflateCoordinates; +ol.geom.flat.inflate.inflateCoordinatesArray = _ol_geom_flat_inflate_js__WEBPACK_IMPORTED_MODULE_127__.inflateCoordinatesArray; +ol.geom.flat.inflate.inflateMultiCoordinatesArray = _ol_geom_flat_inflate_js__WEBPACK_IMPORTED_MODULE_127__.inflateMultiCoordinatesArray; +ol.geom.flat.interiorpoint = {}; +ol.geom.flat.interiorpoint.getInteriorPointOfArray = _ol_geom_flat_interiorpoint_js__WEBPACK_IMPORTED_MODULE_128__.getInteriorPointOfArray; +ol.geom.flat.interiorpoint.getInteriorPointsOfMultiArray = _ol_geom_flat_interiorpoint_js__WEBPACK_IMPORTED_MODULE_128__.getInteriorPointsOfMultiArray; +ol.geom.flat.interpolate = {}; +ol.geom.flat.interpolate.interpolatePoint = _ol_geom_flat_interpolate_js__WEBPACK_IMPORTED_MODULE_129__.interpolatePoint; +ol.geom.flat.interpolate.lineStringCoordinateAtM = _ol_geom_flat_interpolate_js__WEBPACK_IMPORTED_MODULE_129__.lineStringCoordinateAtM; +ol.geom.flat.interpolate.lineStringsCoordinateAtM = _ol_geom_flat_interpolate_js__WEBPACK_IMPORTED_MODULE_129__.lineStringsCoordinateAtM; +ol.geom.flat.intersectsextent = {}; +ol.geom.flat.intersectsextent.intersectsLineString = _ol_geom_flat_intersectsextent_js__WEBPACK_IMPORTED_MODULE_130__.intersectsLineString; +ol.geom.flat.intersectsextent.intersectsLineStringArray = _ol_geom_flat_intersectsextent_js__WEBPACK_IMPORTED_MODULE_130__.intersectsLineStringArray; +ol.geom.flat.intersectsextent.intersectsLinearRing = _ol_geom_flat_intersectsextent_js__WEBPACK_IMPORTED_MODULE_130__.intersectsLinearRing; +ol.geom.flat.intersectsextent.intersectsLinearRingArray = _ol_geom_flat_intersectsextent_js__WEBPACK_IMPORTED_MODULE_130__.intersectsLinearRingArray; +ol.geom.flat.intersectsextent.intersectsLinearRingMultiArray = _ol_geom_flat_intersectsextent_js__WEBPACK_IMPORTED_MODULE_130__.intersectsLinearRingMultiArray; +ol.geom.flat.length = {}; +ol.geom.flat.length.lineStringLength = _ol_geom_flat_length_js__WEBPACK_IMPORTED_MODULE_131__.lineStringLength; +ol.geom.flat.length.linearRingLength = _ol_geom_flat_length_js__WEBPACK_IMPORTED_MODULE_131__.linearRingLength; +ol.geom.flat.orient = {}; +ol.geom.flat.orient.linearRingIsClockwise = _ol_geom_flat_orient_js__WEBPACK_IMPORTED_MODULE_132__.linearRingIsClockwise; +ol.geom.flat.orient.linearRingsAreOriented = _ol_geom_flat_orient_js__WEBPACK_IMPORTED_MODULE_132__.linearRingsAreOriented; +ol.geom.flat.orient.linearRingssAreOriented = _ol_geom_flat_orient_js__WEBPACK_IMPORTED_MODULE_132__.linearRingssAreOriented; +ol.geom.flat.orient.orientLinearRings = _ol_geom_flat_orient_js__WEBPACK_IMPORTED_MODULE_132__.orientLinearRings; +ol.geom.flat.orient.orientLinearRingsArray = _ol_geom_flat_orient_js__WEBPACK_IMPORTED_MODULE_132__.orientLinearRingsArray; +ol.geom.flat.reverse = {}; +ol.geom.flat.reverse.coordinates = _ol_geom_flat_reverse_js__WEBPACK_IMPORTED_MODULE_133__.coordinates; +ol.geom.flat.segments = {}; +ol.geom.flat.segments.forEach = _ol_geom_flat_segments_js__WEBPACK_IMPORTED_MODULE_134__.forEach; +ol.geom.flat.simplify = {}; +ol.geom.flat.simplify.douglasPeucker = _ol_geom_flat_simplify_js__WEBPACK_IMPORTED_MODULE_135__.douglasPeucker; +ol.geom.flat.simplify.douglasPeuckerArray = _ol_geom_flat_simplify_js__WEBPACK_IMPORTED_MODULE_135__.douglasPeuckerArray; +ol.geom.flat.simplify.douglasPeuckerMultiArray = _ol_geom_flat_simplify_js__WEBPACK_IMPORTED_MODULE_135__.douglasPeuckerMultiArray; +ol.geom.flat.simplify.quantize = _ol_geom_flat_simplify_js__WEBPACK_IMPORTED_MODULE_135__.quantize; +ol.geom.flat.simplify.quantizeArray = _ol_geom_flat_simplify_js__WEBPACK_IMPORTED_MODULE_135__.quantizeArray; +ol.geom.flat.simplify.quantizeMultiArray = _ol_geom_flat_simplify_js__WEBPACK_IMPORTED_MODULE_135__.quantizeMultiArray; +ol.geom.flat.simplify.radialDistance = _ol_geom_flat_simplify_js__WEBPACK_IMPORTED_MODULE_135__.radialDistance; +ol.geom.flat.simplify.simplifyLineString = _ol_geom_flat_simplify_js__WEBPACK_IMPORTED_MODULE_135__.simplifyLineString; +ol.geom.flat.simplify.snap = _ol_geom_flat_simplify_js__WEBPACK_IMPORTED_MODULE_135__.snap; +ol.geom.flat.straightchunk = {}; +ol.geom.flat.straightchunk.matchingChunk = _ol_geom_flat_straightchunk_js__WEBPACK_IMPORTED_MODULE_136__.matchingChunk; +ol.geom.flat.textpath = {}; +ol.geom.flat.textpath.drawTextOnPath = _ol_geom_flat_textpath_js__WEBPACK_IMPORTED_MODULE_137__.drawTextOnPath; +ol.geom.flat.topology = {}; +ol.geom.flat.topology.lineStringIsClosed = _ol_geom_flat_topology_js__WEBPACK_IMPORTED_MODULE_138__.lineStringIsClosed; +ol.geom.flat.transform = {}; +ol.geom.flat.transform.rotate = _ol_geom_flat_transform_js__WEBPACK_IMPORTED_MODULE_139__.rotate; +ol.geom.flat.transform.scale = _ol_geom_flat_transform_js__WEBPACK_IMPORTED_MODULE_139__.scale; +ol.geom.flat.transform.transform2D = _ol_geom_flat_transform_js__WEBPACK_IMPORTED_MODULE_139__.transform2D; +ol.geom.flat.transform.translate = _ol_geom_flat_transform_js__WEBPACK_IMPORTED_MODULE_139__.translate; +ol.has = {}; +ol.has.DEVICE_PIXEL_RATIO = _ol_has_js__WEBPACK_IMPORTED_MODULE_140__.DEVICE_PIXEL_RATIO; +ol.has.FIREFOX = _ol_has_js__WEBPACK_IMPORTED_MODULE_140__.FIREFOX; +ol.has.IMAGE_DECODE = _ol_has_js__WEBPACK_IMPORTED_MODULE_140__.IMAGE_DECODE; +ol.has.MAC = _ol_has_js__WEBPACK_IMPORTED_MODULE_140__.MAC; +ol.has.PASSIVE_EVENT_LISTENERS = _ol_has_js__WEBPACK_IMPORTED_MODULE_140__.PASSIVE_EVENT_LISTENERS; +ol.has.SAFARI = _ol_has_js__WEBPACK_IMPORTED_MODULE_140__.SAFARI; +ol.has.WEBKIT = _ol_has_js__WEBPACK_IMPORTED_MODULE_140__.WEBKIT; +ol.has.WORKER_OFFSCREEN_CANVAS = _ol_has_js__WEBPACK_IMPORTED_MODULE_140__.WORKER_OFFSCREEN_CANVAS; +ol.interaction = {}; +ol.interaction.DoubleClickZoom = _ol_interaction_DoubleClickZoom_js__WEBPACK_IMPORTED_MODULE_141__["default"]; +ol.interaction.DragAndDrop = _ol_interaction_DragAndDrop_js__WEBPACK_IMPORTED_MODULE_142__["default"]; +ol.interaction.DragAndDrop.DragAndDropEvent = _ol_interaction_DragAndDrop_js__WEBPACK_IMPORTED_MODULE_142__.DragAndDropEvent; +ol.interaction.DragBox = _ol_interaction_DragBox_js__WEBPACK_IMPORTED_MODULE_143__["default"]; +ol.interaction.DragBox.DragBoxEvent = _ol_interaction_DragBox_js__WEBPACK_IMPORTED_MODULE_143__.DragBoxEvent; +ol.interaction.DragPan = _ol_interaction_DragPan_js__WEBPACK_IMPORTED_MODULE_144__["default"]; +ol.interaction.DragRotate = _ol_interaction_DragRotate_js__WEBPACK_IMPORTED_MODULE_145__["default"]; +ol.interaction.DragRotateAndZoom = _ol_interaction_DragRotateAndZoom_js__WEBPACK_IMPORTED_MODULE_146__["default"]; +ol.interaction.DragZoom = _ol_interaction_DragZoom_js__WEBPACK_IMPORTED_MODULE_147__["default"]; +ol.interaction.Draw = _ol_interaction_Draw_js__WEBPACK_IMPORTED_MODULE_148__["default"]; +ol.interaction.Draw.DrawEvent = _ol_interaction_Draw_js__WEBPACK_IMPORTED_MODULE_148__.DrawEvent; +ol.interaction.Draw.createBox = _ol_interaction_Draw_js__WEBPACK_IMPORTED_MODULE_148__.createBox; +ol.interaction.Draw.createRegularPolygon = _ol_interaction_Draw_js__WEBPACK_IMPORTED_MODULE_148__.createRegularPolygon; +ol.interaction.Extent = _ol_interaction_Extent_js__WEBPACK_IMPORTED_MODULE_149__["default"]; +ol.interaction.Extent.ExtentEvent = _ol_interaction_Extent_js__WEBPACK_IMPORTED_MODULE_149__.ExtentEvent; +ol.interaction.Interaction = _ol_interaction_Interaction_js__WEBPACK_IMPORTED_MODULE_150__["default"]; +ol.interaction.Interaction.pan = _ol_interaction_Interaction_js__WEBPACK_IMPORTED_MODULE_150__.pan; +ol.interaction.Interaction.zoomByDelta = _ol_interaction_Interaction_js__WEBPACK_IMPORTED_MODULE_150__.zoomByDelta; +ol.interaction.KeyboardPan = _ol_interaction_KeyboardPan_js__WEBPACK_IMPORTED_MODULE_151__["default"]; +ol.interaction.KeyboardZoom = _ol_interaction_KeyboardZoom_js__WEBPACK_IMPORTED_MODULE_152__["default"]; +ol.interaction.Modify = _ol_interaction_Modify_js__WEBPACK_IMPORTED_MODULE_153__["default"]; +ol.interaction.Modify.ModifyEvent = _ol_interaction_Modify_js__WEBPACK_IMPORTED_MODULE_153__.ModifyEvent; +ol.interaction.MouseWheelZoom = _ol_interaction_MouseWheelZoom_js__WEBPACK_IMPORTED_MODULE_154__["default"]; +ol.interaction.PinchRotate = _ol_interaction_PinchRotate_js__WEBPACK_IMPORTED_MODULE_155__["default"]; +ol.interaction.PinchZoom = _ol_interaction_PinchZoom_js__WEBPACK_IMPORTED_MODULE_156__["default"]; +ol.interaction.Pointer = _ol_interaction_Pointer_js__WEBPACK_IMPORTED_MODULE_157__["default"]; +ol.interaction.Pointer.centroid = _ol_interaction_Pointer_js__WEBPACK_IMPORTED_MODULE_157__.centroid; +ol.interaction.Select = _ol_interaction_Select_js__WEBPACK_IMPORTED_MODULE_158__["default"]; +ol.interaction.Select.SelectEvent = _ol_interaction_Select_js__WEBPACK_IMPORTED_MODULE_158__.SelectEvent; +ol.interaction.Snap = _ol_interaction_Snap_js__WEBPACK_IMPORTED_MODULE_159__["default"]; +ol.interaction.Translate = _ol_interaction_Translate_js__WEBPACK_IMPORTED_MODULE_160__["default"]; +ol.interaction.Translate.TranslateEvent = _ol_interaction_Translate_js__WEBPACK_IMPORTED_MODULE_160__.TranslateEvent; +ol.interaction.defaults = _ol_interaction_js__WEBPACK_IMPORTED_MODULE_161__.defaults; +ol.layer = {}; +ol.layer.Base = _ol_layer_Base_js__WEBPACK_IMPORTED_MODULE_162__["default"]; +ol.layer.BaseImage = _ol_layer_BaseImage_js__WEBPACK_IMPORTED_MODULE_163__["default"]; +ol.layer.BaseTile = _ol_layer_BaseTile_js__WEBPACK_IMPORTED_MODULE_164__["default"]; +ol.layer.BaseVector = _ol_layer_BaseVector_js__WEBPACK_IMPORTED_MODULE_165__["default"]; +ol.layer.Graticule = _ol_layer_Graticule_js__WEBPACK_IMPORTED_MODULE_166__["default"]; +ol.layer.Group = _ol_layer_Group_js__WEBPACK_IMPORTED_MODULE_167__["default"]; +ol.layer.Heatmap = _ol_layer_Heatmap_js__WEBPACK_IMPORTED_MODULE_168__["default"]; +ol.layer.Image = _ol_layer_Image_js__WEBPACK_IMPORTED_MODULE_169__["default"]; +ol.layer.Layer = _ol_layer_Layer_js__WEBPACK_IMPORTED_MODULE_170__["default"]; +ol.layer.Layer.inView = _ol_layer_Layer_js__WEBPACK_IMPORTED_MODULE_170__.inView; +ol.layer.MapboxVector = _ol_layer_MapboxVector_js__WEBPACK_IMPORTED_MODULE_171__["default"]; +ol.layer.MapboxVector.getMapboxPath = _ol_layer_MapboxVector_js__WEBPACK_IMPORTED_MODULE_171__.getMapboxPath; +ol.layer.MapboxVector.normalizeGlyphsUrl = _ol_layer_MapboxVector_js__WEBPACK_IMPORTED_MODULE_171__.normalizeGlyphsUrl; +ol.layer.MapboxVector.normalizeSourceUrl = _ol_layer_MapboxVector_js__WEBPACK_IMPORTED_MODULE_171__.normalizeSourceUrl; +ol.layer.MapboxVector.normalizeSpriteUrl = _ol_layer_MapboxVector_js__WEBPACK_IMPORTED_MODULE_171__.normalizeSpriteUrl; +ol.layer.MapboxVector.normalizeStyleUrl = _ol_layer_MapboxVector_js__WEBPACK_IMPORTED_MODULE_171__.normalizeStyleUrl; +ol.layer.Tile = _ol_layer_Tile_js__WEBPACK_IMPORTED_MODULE_172__["default"]; +ol.layer.Vector = _ol_layer_Vector_js__WEBPACK_IMPORTED_MODULE_173__["default"]; +ol.layer.VectorImage = _ol_layer_VectorImage_js__WEBPACK_IMPORTED_MODULE_174__["default"]; +ol.layer.VectorTile = _ol_layer_VectorTile_js__WEBPACK_IMPORTED_MODULE_175__["default"]; +ol.layer.WebGLPoints = _ol_layer_WebGLPoints_js__WEBPACK_IMPORTED_MODULE_176__["default"]; +ol.layer.WebGLTile = _ol_layer_WebGLTile_js__WEBPACK_IMPORTED_MODULE_177__["default"]; +ol.loadingstrategy = {}; +ol.loadingstrategy.all = _ol_loadingstrategy_js__WEBPACK_IMPORTED_MODULE_178__.all; +ol.loadingstrategy.bbox = _ol_loadingstrategy_js__WEBPACK_IMPORTED_MODULE_178__.bbox; +ol.loadingstrategy.tile = _ol_loadingstrategy_js__WEBPACK_IMPORTED_MODULE_178__.tile; +ol.math = {}; +ol.math.clamp = _ol_math_js__WEBPACK_IMPORTED_MODULE_179__.clamp; +ol.math.cosh = _ol_math_js__WEBPACK_IMPORTED_MODULE_179__.cosh; +ol.math.lerp = _ol_math_js__WEBPACK_IMPORTED_MODULE_179__.lerp; +ol.math.log2 = _ol_math_js__WEBPACK_IMPORTED_MODULE_179__.log2; +ol.math.modulo = _ol_math_js__WEBPACK_IMPORTED_MODULE_179__.modulo; +ol.math.solveLinearSystem = _ol_math_js__WEBPACK_IMPORTED_MODULE_179__.solveLinearSystem; +ol.math.squaredDistance = _ol_math_js__WEBPACK_IMPORTED_MODULE_179__.squaredDistance; +ol.math.squaredSegmentDistance = _ol_math_js__WEBPACK_IMPORTED_MODULE_179__.squaredSegmentDistance; +ol.math.toDegrees = _ol_math_js__WEBPACK_IMPORTED_MODULE_179__.toDegrees; +ol.math.toRadians = _ol_math_js__WEBPACK_IMPORTED_MODULE_179__.toRadians; +ol.net = {}; +ol.net.ClientError = _ol_net_js__WEBPACK_IMPORTED_MODULE_180__.ClientError; +ol.net.ResponseError = _ol_net_js__WEBPACK_IMPORTED_MODULE_180__.ResponseError; +ol.net.getJSON = _ol_net_js__WEBPACK_IMPORTED_MODULE_180__.getJSON; +ol.net.jsonp = _ol_net_js__WEBPACK_IMPORTED_MODULE_180__.jsonp; +ol.net.overrideXHR = _ol_net_js__WEBPACK_IMPORTED_MODULE_180__.overrideXHR; +ol.net.resolveUrl = _ol_net_js__WEBPACK_IMPORTED_MODULE_180__.resolveUrl; +ol.net.restoreXHR = _ol_net_js__WEBPACK_IMPORTED_MODULE_180__.restoreXHR; +ol.obj = {}; +ol.obj.assign = _ol_obj_js__WEBPACK_IMPORTED_MODULE_181__.assign; +ol.obj.clear = _ol_obj_js__WEBPACK_IMPORTED_MODULE_181__.clear; +ol.obj.getValues = _ol_obj_js__WEBPACK_IMPORTED_MODULE_181__.getValues; +ol.obj.isEmpty = _ol_obj_js__WEBPACK_IMPORTED_MODULE_181__.isEmpty; +ol.proj = {}; +ol.proj.Projection = _ol_proj_Projection_js__WEBPACK_IMPORTED_MODULE_182__["default"]; +ol.proj.Units = {}; +ol.proj.Units.METERS_PER_UNIT = _ol_proj_Units_js__WEBPACK_IMPORTED_MODULE_183__.METERS_PER_UNIT; +ol.proj.Units.fromCode = _ol_proj_Units_js__WEBPACK_IMPORTED_MODULE_183__.fromCode; +ol.proj.addCommon = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.addCommon; +ol.proj.addCoordinateTransforms = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.addCoordinateTransforms; +ol.proj.addEquivalentProjections = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.addEquivalentProjections; +ol.proj.addEquivalentTransforms = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.addEquivalentTransforms; +ol.proj.addProjection = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.addProjection; +ol.proj.addProjections = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.addProjections; +ol.proj.clearAllProjections = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.clearAllProjections; +ol.proj.clearUserProjection = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.clearUserProjection; +ol.proj.cloneTransform = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.cloneTransform; +ol.proj.createProjection = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.createProjection; +ol.proj.createSafeCoordinateTransform = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.createSafeCoordinateTransform; +ol.proj.createTransformFromCoordinateTransform = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.createTransformFromCoordinateTransform; +ol.proj.epsg3857 = {}; +ol.proj.epsg3857.EXTENT = _ol_proj_epsg3857_js__WEBPACK_IMPORTED_MODULE_184__.EXTENT; +ol.proj.epsg3857.HALF_SIZE = _ol_proj_epsg3857_js__WEBPACK_IMPORTED_MODULE_184__.HALF_SIZE; +ol.proj.epsg3857.MAX_SAFE_Y = _ol_proj_epsg3857_js__WEBPACK_IMPORTED_MODULE_184__.MAX_SAFE_Y; +ol.proj.epsg3857.PROJECTIONS = _ol_proj_epsg3857_js__WEBPACK_IMPORTED_MODULE_184__.PROJECTIONS; +ol.proj.epsg3857.RADIUS = _ol_proj_epsg3857_js__WEBPACK_IMPORTED_MODULE_184__.RADIUS; +ol.proj.epsg3857.WORLD_EXTENT = _ol_proj_epsg3857_js__WEBPACK_IMPORTED_MODULE_184__.WORLD_EXTENT; +ol.proj.epsg3857.fromEPSG4326 = _ol_proj_epsg3857_js__WEBPACK_IMPORTED_MODULE_184__.fromEPSG4326; +ol.proj.epsg3857.toEPSG4326 = _ol_proj_epsg3857_js__WEBPACK_IMPORTED_MODULE_184__.toEPSG4326; +ol.proj.epsg4326 = {}; +ol.proj.epsg4326.EXTENT = _ol_proj_epsg4326_js__WEBPACK_IMPORTED_MODULE_185__.EXTENT; +ol.proj.epsg4326.METERS_PER_UNIT = _ol_proj_epsg4326_js__WEBPACK_IMPORTED_MODULE_185__.METERS_PER_UNIT; +ol.proj.epsg4326.PROJECTIONS = _ol_proj_epsg4326_js__WEBPACK_IMPORTED_MODULE_185__.PROJECTIONS; +ol.proj.epsg4326.RADIUS = _ol_proj_epsg4326_js__WEBPACK_IMPORTED_MODULE_185__.RADIUS; +ol.proj.equivalent = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.equivalent; +ol.proj.fromLonLat = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromLonLat; +ol.proj.fromUserCoordinate = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserCoordinate; +ol.proj.fromUserExtent = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserExtent; +ol.proj.fromUserResolution = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserResolution; +ol.proj.get = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.get; +ol.proj.getPointResolution = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.getPointResolution; +ol.proj.getTransform = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.getTransform; +ol.proj.getTransformFromProjections = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.getTransformFromProjections; +ol.proj.getUserProjection = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.getUserProjection; +ol.proj.identityTransform = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.identityTransform; +ol.proj.proj4 = {}; +ol.proj.proj4.register = _ol_proj_proj4_js__WEBPACK_IMPORTED_MODULE_186__.register; +ol.proj.projections = {}; +ol.proj.projections.add = _ol_proj_projections_js__WEBPACK_IMPORTED_MODULE_187__.add; +ol.proj.projections.clear = _ol_proj_projections_js__WEBPACK_IMPORTED_MODULE_187__.clear; +ol.proj.projections.get = _ol_proj_projections_js__WEBPACK_IMPORTED_MODULE_187__.get; +ol.proj.setUserProjection = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.setUserProjection; +ol.proj.toLonLat = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.toLonLat; +ol.proj.toUserCoordinate = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.toUserCoordinate; +ol.proj.toUserExtent = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.toUserExtent; +ol.proj.toUserResolution = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.toUserResolution; +ol.proj.transform = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.transform; +ol.proj.transformExtent = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.transformExtent; +ol.proj.transformWithProjections = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.transformWithProjections; +ol.proj.transforms = {}; +ol.proj.transforms.add = _ol_proj_transforms_js__WEBPACK_IMPORTED_MODULE_188__.add; +ol.proj.transforms.clear = _ol_proj_transforms_js__WEBPACK_IMPORTED_MODULE_188__.clear; +ol.proj.transforms.get = _ol_proj_transforms_js__WEBPACK_IMPORTED_MODULE_188__.get; +ol.proj.transforms.remove = _ol_proj_transforms_js__WEBPACK_IMPORTED_MODULE_188__.remove; +ol.proj.useGeographic = _ol_proj_js__WEBPACK_IMPORTED_MODULE_0__.useGeographic; +ol.render = {}; +ol.render.Box = _ol_render_Box_js__WEBPACK_IMPORTED_MODULE_189__["default"]; +ol.render.Event = _ol_render_Event_js__WEBPACK_IMPORTED_MODULE_190__["default"]; +ol.render.Feature = _ol_render_Feature_js__WEBPACK_IMPORTED_MODULE_191__["default"]; +ol.render.VectorContext = _ol_render_VectorContext_js__WEBPACK_IMPORTED_MODULE_192__["default"]; +ol.render.canvas = {}; +ol.render.canvas.Builder = _ol_render_canvas_Builder_js__WEBPACK_IMPORTED_MODULE_193__["default"]; +ol.render.canvas.BuilderGroup = _ol_render_canvas_BuilderGroup_js__WEBPACK_IMPORTED_MODULE_194__["default"]; +ol.render.canvas.Executor = _ol_render_canvas_Executor_js__WEBPACK_IMPORTED_MODULE_195__["default"]; +ol.render.canvas.ExecutorGroup = _ol_render_canvas_ExecutorGroup_js__WEBPACK_IMPORTED_MODULE_196__["default"]; +ol.render.canvas.ExecutorGroup.getPixelIndexArray = _ol_render_canvas_ExecutorGroup_js__WEBPACK_IMPORTED_MODULE_196__.getPixelIndexArray; +ol.render.canvas.ImageBuilder = _ol_render_canvas_ImageBuilder_js__WEBPACK_IMPORTED_MODULE_197__["default"]; +ol.render.canvas.Immediate = _ol_render_canvas_Immediate_js__WEBPACK_IMPORTED_MODULE_198__["default"]; +ol.render.canvas.Instruction = {}; +ol.render.canvas.Instruction.beginPathInstruction = _ol_render_canvas_Instruction_js__WEBPACK_IMPORTED_MODULE_199__.beginPathInstruction; +ol.render.canvas.Instruction.closePathInstruction = _ol_render_canvas_Instruction_js__WEBPACK_IMPORTED_MODULE_199__.closePathInstruction; +ol.render.canvas.Instruction.fillInstruction = _ol_render_canvas_Instruction_js__WEBPACK_IMPORTED_MODULE_199__.fillInstruction; +ol.render.canvas.Instruction.strokeInstruction = _ol_render_canvas_Instruction_js__WEBPACK_IMPORTED_MODULE_199__.strokeInstruction; +ol.render.canvas.LineStringBuilder = _ol_render_canvas_LineStringBuilder_js__WEBPACK_IMPORTED_MODULE_200__["default"]; +ol.render.canvas.PolygonBuilder = _ol_render_canvas_PolygonBuilder_js__WEBPACK_IMPORTED_MODULE_201__["default"]; +ol.render.canvas.TextBuilder = _ol_render_canvas_TextBuilder_js__WEBPACK_IMPORTED_MODULE_202__["default"]; +ol.render.canvas.checkedFonts = _ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_203__.checkedFonts; +ol.render.canvas.defaultFillStyle = _ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_203__.defaultFillStyle; +ol.render.canvas.defaultFont = _ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_203__.defaultFont; +ol.render.canvas.defaultLineCap = _ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_203__.defaultLineCap; +ol.render.canvas.defaultLineDash = _ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_203__.defaultLineDash; +ol.render.canvas.defaultLineDashOffset = _ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_203__.defaultLineDashOffset; +ol.render.canvas.defaultLineJoin = _ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_203__.defaultLineJoin; +ol.render.canvas.defaultLineWidth = _ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_203__.defaultLineWidth; +ol.render.canvas.defaultMiterLimit = _ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_203__.defaultMiterLimit; +ol.render.canvas.defaultPadding = _ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_203__.defaultPadding; +ol.render.canvas.defaultStrokeStyle = _ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_203__.defaultStrokeStyle; +ol.render.canvas.defaultTextAlign = _ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_203__.defaultTextAlign; +ol.render.canvas.defaultTextBaseline = _ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_203__.defaultTextBaseline; +ol.render.canvas.drawImageOrLabel = _ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_203__.drawImageOrLabel; +ol.render.canvas.hitdetect = {}; +ol.render.canvas.hitdetect.HIT_DETECT_RESOLUTION = _ol_render_canvas_hitdetect_js__WEBPACK_IMPORTED_MODULE_204__.HIT_DETECT_RESOLUTION; +ol.render.canvas.hitdetect.createHitDetectionImageData = _ol_render_canvas_hitdetect_js__WEBPACK_IMPORTED_MODULE_204__.createHitDetectionImageData; +ol.render.canvas.hitdetect.hitDetect = _ol_render_canvas_hitdetect_js__WEBPACK_IMPORTED_MODULE_204__.hitDetect; +ol.render.canvas.labelCache = _ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_203__.labelCache; +ol.render.canvas.measureAndCacheTextWidth = _ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_203__.measureAndCacheTextWidth; +ol.render.canvas.measureTextHeight = _ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_203__.measureTextHeight; +ol.render.canvas.measureTextWidth = _ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_203__.measureTextWidth; +ol.render.canvas.measureTextWidths = _ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_203__.measureTextWidths; +ol.render.canvas.registerFont = _ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_203__.registerFont; +ol.render.canvas.rotateAtOffset = _ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_203__.rotateAtOffset; +ol.render.canvas.textHeights = _ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_203__.textHeights; +ol.render.getRenderPixel = _ol_render_js__WEBPACK_IMPORTED_MODULE_205__.getRenderPixel; +ol.render.getVectorContext = _ol_render_js__WEBPACK_IMPORTED_MODULE_205__.getVectorContext; +ol.render.toContext = _ol_render_js__WEBPACK_IMPORTED_MODULE_205__.toContext; +ol.renderer = {}; +ol.renderer.Composite = _ol_renderer_Composite_js__WEBPACK_IMPORTED_MODULE_206__["default"]; +ol.renderer.Layer = _ol_renderer_Layer_js__WEBPACK_IMPORTED_MODULE_207__["default"]; +ol.renderer.Map = _ol_renderer_Map_js__WEBPACK_IMPORTED_MODULE_208__["default"]; +ol.renderer.canvas = {}; +ol.renderer.canvas.ImageLayer = _ol_renderer_canvas_ImageLayer_js__WEBPACK_IMPORTED_MODULE_209__["default"]; +ol.renderer.canvas.Layer = _ol_renderer_canvas_Layer_js__WEBPACK_IMPORTED_MODULE_210__["default"]; +ol.renderer.canvas.TileLayer = _ol_renderer_canvas_TileLayer_js__WEBPACK_IMPORTED_MODULE_211__["default"]; +ol.renderer.canvas.VectorImageLayer = _ol_renderer_canvas_VectorImageLayer_js__WEBPACK_IMPORTED_MODULE_212__["default"]; +ol.renderer.canvas.VectorLayer = _ol_renderer_canvas_VectorLayer_js__WEBPACK_IMPORTED_MODULE_213__["default"]; +ol.renderer.canvas.VectorTileLayer = _ol_renderer_canvas_VectorTileLayer_js__WEBPACK_IMPORTED_MODULE_214__["default"]; +ol.renderer.vector = {}; +ol.renderer.vector.defaultOrder = _ol_renderer_vector_js__WEBPACK_IMPORTED_MODULE_215__.defaultOrder; +ol.renderer.vector.getSquaredTolerance = _ol_renderer_vector_js__WEBPACK_IMPORTED_MODULE_215__.getSquaredTolerance; +ol.renderer.vector.getTolerance = _ol_renderer_vector_js__WEBPACK_IMPORTED_MODULE_215__.getTolerance; +ol.renderer.vector.renderFeature = _ol_renderer_vector_js__WEBPACK_IMPORTED_MODULE_215__.renderFeature; +ol.renderer.webgl = {}; +ol.renderer.webgl.Layer = _ol_renderer_webgl_Layer_js__WEBPACK_IMPORTED_MODULE_216__["default"]; +ol.renderer.webgl.Layer.colorDecodeId = _ol_renderer_webgl_Layer_js__WEBPACK_IMPORTED_MODULE_216__.colorDecodeId; +ol.renderer.webgl.Layer.colorEncodeId = _ol_renderer_webgl_Layer_js__WEBPACK_IMPORTED_MODULE_216__.colorEncodeId; +ol.renderer.webgl.Layer.getBlankImageData = _ol_renderer_webgl_Layer_js__WEBPACK_IMPORTED_MODULE_216__.getBlankImageData; +ol.renderer.webgl.Layer.writePointFeatureToBuffers = _ol_renderer_webgl_Layer_js__WEBPACK_IMPORTED_MODULE_216__.writePointFeatureToBuffers; +ol.renderer.webgl.PointsLayer = _ol_renderer_webgl_PointsLayer_js__WEBPACK_IMPORTED_MODULE_217__["default"]; +ol.renderer.webgl.TileLayer = _ol_renderer_webgl_TileLayer_js__WEBPACK_IMPORTED_MODULE_218__["default"]; +ol.renderer.webgl.TileLayer.Attributes = _ol_renderer_webgl_TileLayer_js__WEBPACK_IMPORTED_MODULE_218__.Attributes; +ol.renderer.webgl.TileLayer.Uniforms = _ol_renderer_webgl_TileLayer_js__WEBPACK_IMPORTED_MODULE_218__.Uniforms; +ol.reproj = {}; +ol.reproj.Image = _ol_reproj_Image_js__WEBPACK_IMPORTED_MODULE_219__["default"]; +ol.reproj.Tile = _ol_reproj_Tile_js__WEBPACK_IMPORTED_MODULE_220__["default"]; +ol.reproj.Triangulation = _ol_reproj_Triangulation_js__WEBPACK_IMPORTED_MODULE_221__["default"]; +ol.reproj.calculateSourceExtentResolution = _ol_reproj_js__WEBPACK_IMPORTED_MODULE_222__.calculateSourceExtentResolution; +ol.reproj.calculateSourceResolution = _ol_reproj_js__WEBPACK_IMPORTED_MODULE_222__.calculateSourceResolution; +ol.reproj.common = {}; +ol.reproj.common.ENABLE_RASTER_REPROJECTION = _ol_reproj_common_js__WEBPACK_IMPORTED_MODULE_223__.ENABLE_RASTER_REPROJECTION; +ol.reproj.common.ERROR_THRESHOLD = _ol_reproj_common_js__WEBPACK_IMPORTED_MODULE_223__.ERROR_THRESHOLD; +ol.reproj.render = _ol_reproj_js__WEBPACK_IMPORTED_MODULE_222__.render; +ol.resolutionconstraint = {}; +ol.resolutionconstraint.createMinMaxResolution = _ol_resolutionconstraint_js__WEBPACK_IMPORTED_MODULE_224__.createMinMaxResolution; +ol.resolutionconstraint.createSnapToPower = _ol_resolutionconstraint_js__WEBPACK_IMPORTED_MODULE_224__.createSnapToPower; +ol.resolutionconstraint.createSnapToResolutions = _ol_resolutionconstraint_js__WEBPACK_IMPORTED_MODULE_224__.createSnapToResolutions; +ol.rotationconstraint = {}; +ol.rotationconstraint.createSnapToN = _ol_rotationconstraint_js__WEBPACK_IMPORTED_MODULE_225__.createSnapToN; +ol.rotationconstraint.createSnapToZero = _ol_rotationconstraint_js__WEBPACK_IMPORTED_MODULE_225__.createSnapToZero; +ol.rotationconstraint.disable = _ol_rotationconstraint_js__WEBPACK_IMPORTED_MODULE_225__.disable; +ol.rotationconstraint.none = _ol_rotationconstraint_js__WEBPACK_IMPORTED_MODULE_225__.none; +ol.size = {}; +ol.size.buffer = _ol_size_js__WEBPACK_IMPORTED_MODULE_226__.buffer; +ol.size.hasArea = _ol_size_js__WEBPACK_IMPORTED_MODULE_226__.hasArea; +ol.size.scale = _ol_size_js__WEBPACK_IMPORTED_MODULE_226__.scale; +ol.size.toSize = _ol_size_js__WEBPACK_IMPORTED_MODULE_226__.toSize; +ol.source = {}; +ol.source.BingMaps = _ol_source_BingMaps_js__WEBPACK_IMPORTED_MODULE_227__["default"]; +ol.source.BingMaps.quadKey = _ol_source_BingMaps_js__WEBPACK_IMPORTED_MODULE_227__.quadKey; +ol.source.CartoDB = _ol_source_CartoDB_js__WEBPACK_IMPORTED_MODULE_228__["default"]; +ol.source.Cluster = _ol_source_Cluster_js__WEBPACK_IMPORTED_MODULE_229__["default"]; +ol.source.DataTile = _ol_source_DataTile_js__WEBPACK_IMPORTED_MODULE_230__["default"]; +ol.source.GeoTIFF = _ol_source_GeoTIFF_js__WEBPACK_IMPORTED_MODULE_231__["default"]; +ol.source.IIIF = _ol_source_IIIF_js__WEBPACK_IMPORTED_MODULE_232__["default"]; +ol.source.Image = _ol_source_Image_js__WEBPACK_IMPORTED_MODULE_233__["default"]; +ol.source.Image.ImageSourceEvent = _ol_source_Image_js__WEBPACK_IMPORTED_MODULE_233__.ImageSourceEvent; +ol.source.Image.defaultImageLoadFunction = _ol_source_Image_js__WEBPACK_IMPORTED_MODULE_233__.defaultImageLoadFunction; +ol.source.ImageArcGISRest = _ol_source_ImageArcGISRest_js__WEBPACK_IMPORTED_MODULE_234__["default"]; +ol.source.ImageCanvas = _ol_source_ImageCanvas_js__WEBPACK_IMPORTED_MODULE_235__["default"]; +ol.source.ImageMapGuide = _ol_source_ImageMapGuide_js__WEBPACK_IMPORTED_MODULE_236__["default"]; +ol.source.ImageStatic = _ol_source_ImageStatic_js__WEBPACK_IMPORTED_MODULE_237__["default"]; +ol.source.ImageWMS = _ol_source_ImageWMS_js__WEBPACK_IMPORTED_MODULE_238__["default"]; +ol.source.OGCMapTile = _ol_source_OGCMapTile_js__WEBPACK_IMPORTED_MODULE_239__["default"]; +ol.source.OGCVectorTile = _ol_source_OGCVectorTile_js__WEBPACK_IMPORTED_MODULE_240__["default"]; +ol.source.OSM = _ol_source_OSM_js__WEBPACK_IMPORTED_MODULE_241__["default"]; +ol.source.OSM.ATTRIBUTION = _ol_source_OSM_js__WEBPACK_IMPORTED_MODULE_241__.ATTRIBUTION; +ol.source.Raster = _ol_source_Raster_js__WEBPACK_IMPORTED_MODULE_242__["default"]; +ol.source.Raster.Processor = _ol_source_Raster_js__WEBPACK_IMPORTED_MODULE_242__.Processor; +ol.source.Raster.RasterSourceEvent = _ol_source_Raster_js__WEBPACK_IMPORTED_MODULE_242__.RasterSourceEvent; +ol.source.Raster.newImageData = _ol_source_Raster_js__WEBPACK_IMPORTED_MODULE_242__.newImageData; +ol.source.Source = _ol_source_Source_js__WEBPACK_IMPORTED_MODULE_243__["default"]; +ol.source.Stamen = _ol_source_Stamen_js__WEBPACK_IMPORTED_MODULE_244__["default"]; +ol.source.Tile = _ol_source_Tile_js__WEBPACK_IMPORTED_MODULE_245__["default"]; +ol.source.Tile.TileSourceEvent = _ol_source_Tile_js__WEBPACK_IMPORTED_MODULE_245__.TileSourceEvent; +ol.source.TileArcGISRest = _ol_source_TileArcGISRest_js__WEBPACK_IMPORTED_MODULE_246__["default"]; +ol.source.TileDebug = _ol_source_TileDebug_js__WEBPACK_IMPORTED_MODULE_247__["default"]; +ol.source.TileImage = _ol_source_TileImage_js__WEBPACK_IMPORTED_MODULE_248__["default"]; +ol.source.TileJSON = _ol_source_TileJSON_js__WEBPACK_IMPORTED_MODULE_249__["default"]; +ol.source.TileWMS = _ol_source_TileWMS_js__WEBPACK_IMPORTED_MODULE_250__["default"]; +ol.source.UTFGrid = _ol_source_UTFGrid_js__WEBPACK_IMPORTED_MODULE_251__["default"]; +ol.source.UTFGrid.CustomTile = _ol_source_UTFGrid_js__WEBPACK_IMPORTED_MODULE_251__.CustomTile; +ol.source.UrlTile = _ol_source_UrlTile_js__WEBPACK_IMPORTED_MODULE_252__["default"]; +ol.source.Vector = _ol_source_Vector_js__WEBPACK_IMPORTED_MODULE_253__["default"]; +ol.source.Vector.VectorSourceEvent = _ol_source_Vector_js__WEBPACK_IMPORTED_MODULE_253__.VectorSourceEvent; +ol.source.VectorTile = _ol_source_VectorTile_js__WEBPACK_IMPORTED_MODULE_254__["default"]; +ol.source.VectorTile.defaultLoadFunction = _ol_source_VectorTile_js__WEBPACK_IMPORTED_MODULE_254__.defaultLoadFunction; +ol.source.WMTS = _ol_source_WMTS_js__WEBPACK_IMPORTED_MODULE_255__["default"]; +ol.source.WMTS.optionsFromCapabilities = _ol_source_WMTS_js__WEBPACK_IMPORTED_MODULE_255__.optionsFromCapabilities; +ol.source.XYZ = _ol_source_XYZ_js__WEBPACK_IMPORTED_MODULE_256__["default"]; +ol.source.Zoomify = _ol_source_Zoomify_js__WEBPACK_IMPORTED_MODULE_257__["default"]; +ol.source.Zoomify.CustomTile = _ol_source_Zoomify_js__WEBPACK_IMPORTED_MODULE_257__.CustomTile; +ol.source.common = {}; +ol.source.common.DEFAULT_WMS_VERSION = _ol_source_common_js__WEBPACK_IMPORTED_MODULE_258__.DEFAULT_WMS_VERSION; +ol.source.common.IMAGE_SMOOTHING_DISABLED = _ol_source_common_js__WEBPACK_IMPORTED_MODULE_258__.IMAGE_SMOOTHING_DISABLED; +ol.source.ogcTileUtil = {}; +ol.source.ogcTileUtil.getMapTileUrlTemplate = _ol_source_ogcTileUtil_js__WEBPACK_IMPORTED_MODULE_259__.getMapTileUrlTemplate; +ol.source.ogcTileUtil.getTileSetInfo = _ol_source_ogcTileUtil_js__WEBPACK_IMPORTED_MODULE_259__.getTileSetInfo; +ol.source.ogcTileUtil.getVectorTileUrlTemplate = _ol_source_ogcTileUtil_js__WEBPACK_IMPORTED_MODULE_259__.getVectorTileUrlTemplate; +ol.sphere = {}; +ol.sphere.DEFAULT_RADIUS = _ol_sphere_js__WEBPACK_IMPORTED_MODULE_260__.DEFAULT_RADIUS; +ol.sphere.getArea = _ol_sphere_js__WEBPACK_IMPORTED_MODULE_260__.getArea; +ol.sphere.getDistance = _ol_sphere_js__WEBPACK_IMPORTED_MODULE_260__.getDistance; +ol.sphere.getLength = _ol_sphere_js__WEBPACK_IMPORTED_MODULE_260__.getLength; +ol.sphere.offset = _ol_sphere_js__WEBPACK_IMPORTED_MODULE_260__.offset; +ol.string = {}; +ol.string.compareVersions = _ol_string_js__WEBPACK_IMPORTED_MODULE_261__.compareVersions; +ol.string.padNumber = _ol_string_js__WEBPACK_IMPORTED_MODULE_261__.padNumber; +ol.structs = {}; +ol.structs.LRUCache = _ol_structs_LRUCache_js__WEBPACK_IMPORTED_MODULE_262__["default"]; +ol.structs.LinkedList = _ol_structs_LinkedList_js__WEBPACK_IMPORTED_MODULE_263__["default"]; +ol.structs.PriorityQueue = _ol_structs_PriorityQueue_js__WEBPACK_IMPORTED_MODULE_264__["default"]; +ol.structs.PriorityQueue.DROP = _ol_structs_PriorityQueue_js__WEBPACK_IMPORTED_MODULE_264__.DROP; +ol.structs.RBush = _ol_structs_RBush_js__WEBPACK_IMPORTED_MODULE_265__["default"]; +ol.style = {}; +ol.style.Circle = _ol_style_Circle_js__WEBPACK_IMPORTED_MODULE_266__["default"]; +ol.style.Fill = _ol_style_Fill_js__WEBPACK_IMPORTED_MODULE_267__["default"]; +ol.style.Icon = _ol_style_Icon_js__WEBPACK_IMPORTED_MODULE_268__["default"]; +ol.style.IconImage = _ol_style_IconImage_js__WEBPACK_IMPORTED_MODULE_269__["default"]; +ol.style.IconImage.get = _ol_style_IconImage_js__WEBPACK_IMPORTED_MODULE_269__.get; +ol.style.IconImageCache = _ol_style_IconImageCache_js__WEBPACK_IMPORTED_MODULE_270__["default"]; +ol.style.IconImageCache.shared = _ol_style_IconImageCache_js__WEBPACK_IMPORTED_MODULE_270__.shared; +ol.style.Image = _ol_style_Image_js__WEBPACK_IMPORTED_MODULE_271__["default"]; +ol.style.RegularShape = _ol_style_RegularShape_js__WEBPACK_IMPORTED_MODULE_272__["default"]; +ol.style.Stroke = _ol_style_Stroke_js__WEBPACK_IMPORTED_MODULE_273__["default"]; +ol.style.Style = _ol_style_Style_js__WEBPACK_IMPORTED_MODULE_274__["default"]; +ol.style.Style.createDefaultStyle = _ol_style_Style_js__WEBPACK_IMPORTED_MODULE_274__.createDefaultStyle; +ol.style.Style.createEditingStyle = _ol_style_Style_js__WEBPACK_IMPORTED_MODULE_274__.createEditingStyle; +ol.style.Style.toFunction = _ol_style_Style_js__WEBPACK_IMPORTED_MODULE_274__.toFunction; +ol.style.Text = _ol_style_Text_js__WEBPACK_IMPORTED_MODULE_275__["default"]; +ol.style.expressions = {}; +ol.style.expressions.Operators = _ol_style_expressions_js__WEBPACK_IMPORTED_MODULE_276__.Operators; +ol.style.expressions.arrayToGlsl = _ol_style_expressions_js__WEBPACK_IMPORTED_MODULE_276__.arrayToGlsl; +ol.style.expressions.colorToGlsl = _ol_style_expressions_js__WEBPACK_IMPORTED_MODULE_276__.colorToGlsl; +ol.style.expressions.expressionToGlsl = _ol_style_expressions_js__WEBPACK_IMPORTED_MODULE_276__.expressionToGlsl; +ol.style.expressions.getStringNumberEquivalent = _ol_style_expressions_js__WEBPACK_IMPORTED_MODULE_276__.getStringNumberEquivalent; +ol.style.expressions.getValueType = _ol_style_expressions_js__WEBPACK_IMPORTED_MODULE_276__.getValueType; +ol.style.expressions.isTypeUnique = _ol_style_expressions_js__WEBPACK_IMPORTED_MODULE_276__.isTypeUnique; +ol.style.expressions.numberToGlsl = _ol_style_expressions_js__WEBPACK_IMPORTED_MODULE_276__.numberToGlsl; +ol.style.expressions.stringToGlsl = _ol_style_expressions_js__WEBPACK_IMPORTED_MODULE_276__.stringToGlsl; +ol.style.expressions.uniformNameForVariable = _ol_style_expressions_js__WEBPACK_IMPORTED_MODULE_276__.uniformNameForVariable; +ol.tilecoord = {}; +ol.tilecoord.createOrUpdate = _ol_tilecoord_js__WEBPACK_IMPORTED_MODULE_277__.createOrUpdate; +ol.tilecoord.fromKey = _ol_tilecoord_js__WEBPACK_IMPORTED_MODULE_277__.fromKey; +ol.tilecoord.getCacheKeyForTileKey = _ol_tilecoord_js__WEBPACK_IMPORTED_MODULE_277__.getCacheKeyForTileKey; +ol.tilecoord.getKey = _ol_tilecoord_js__WEBPACK_IMPORTED_MODULE_277__.getKey; +ol.tilecoord.getKeyZXY = _ol_tilecoord_js__WEBPACK_IMPORTED_MODULE_277__.getKeyZXY; +ol.tilecoord.hash = _ol_tilecoord_js__WEBPACK_IMPORTED_MODULE_277__.hash; +ol.tilecoord.withinExtentAndZ = _ol_tilecoord_js__WEBPACK_IMPORTED_MODULE_277__.withinExtentAndZ; +ol.tilegrid = {}; +ol.tilegrid.TileGrid = _ol_tilegrid_TileGrid_js__WEBPACK_IMPORTED_MODULE_278__["default"]; +ol.tilegrid.WMTS = _ol_tilegrid_WMTS_js__WEBPACK_IMPORTED_MODULE_279__["default"]; +ol.tilegrid.WMTS.createFromCapabilitiesMatrixSet = _ol_tilegrid_WMTS_js__WEBPACK_IMPORTED_MODULE_279__.createFromCapabilitiesMatrixSet; +ol.tilegrid.common = {}; +ol.tilegrid.common.DEFAULT_MAX_ZOOM = _ol_tilegrid_common_js__WEBPACK_IMPORTED_MODULE_280__.DEFAULT_MAX_ZOOM; +ol.tilegrid.common.DEFAULT_TILE_SIZE = _ol_tilegrid_common_js__WEBPACK_IMPORTED_MODULE_280__.DEFAULT_TILE_SIZE; +ol.tilegrid.createForExtent = _ol_tilegrid_js__WEBPACK_IMPORTED_MODULE_281__.createForExtent; +ol.tilegrid.createForProjection = _ol_tilegrid_js__WEBPACK_IMPORTED_MODULE_281__.createForProjection; +ol.tilegrid.createXYZ = _ol_tilegrid_js__WEBPACK_IMPORTED_MODULE_281__.createXYZ; +ol.tilegrid.extentFromProjection = _ol_tilegrid_js__WEBPACK_IMPORTED_MODULE_281__.extentFromProjection; +ol.tilegrid.getForProjection = _ol_tilegrid_js__WEBPACK_IMPORTED_MODULE_281__.getForProjection; +ol.tilegrid.wrapX = _ol_tilegrid_js__WEBPACK_IMPORTED_MODULE_281__.wrapX; +ol.tileurlfunction = {}; +ol.tileurlfunction.createFromTemplate = _ol_tileurlfunction_js__WEBPACK_IMPORTED_MODULE_282__.createFromTemplate; +ol.tileurlfunction.createFromTemplates = _ol_tileurlfunction_js__WEBPACK_IMPORTED_MODULE_282__.createFromTemplates; +ol.tileurlfunction.createFromTileUrlFunctions = _ol_tileurlfunction_js__WEBPACK_IMPORTED_MODULE_282__.createFromTileUrlFunctions; +ol.tileurlfunction.expandUrl = _ol_tileurlfunction_js__WEBPACK_IMPORTED_MODULE_282__.expandUrl; +ol.tileurlfunction.nullTileUrlFunction = _ol_tileurlfunction_js__WEBPACK_IMPORTED_MODULE_282__.nullTileUrlFunction; +ol.transform = {}; +ol.transform.apply = _ol_transform_js__WEBPACK_IMPORTED_MODULE_283__.apply; +ol.transform.compose = _ol_transform_js__WEBPACK_IMPORTED_MODULE_283__.compose; +ol.transform.composeCssTransform = _ol_transform_js__WEBPACK_IMPORTED_MODULE_283__.composeCssTransform; +ol.transform.create = _ol_transform_js__WEBPACK_IMPORTED_MODULE_283__.create; +ol.transform.determinant = _ol_transform_js__WEBPACK_IMPORTED_MODULE_283__.determinant; +ol.transform.invert = _ol_transform_js__WEBPACK_IMPORTED_MODULE_283__.invert; +ol.transform.makeInverse = _ol_transform_js__WEBPACK_IMPORTED_MODULE_283__.makeInverse; +ol.transform.makeScale = _ol_transform_js__WEBPACK_IMPORTED_MODULE_283__.makeScale; +ol.transform.multiply = _ol_transform_js__WEBPACK_IMPORTED_MODULE_283__.multiply; +ol.transform.reset = _ol_transform_js__WEBPACK_IMPORTED_MODULE_283__.reset; +ol.transform.rotate = _ol_transform_js__WEBPACK_IMPORTED_MODULE_283__.rotate; +ol.transform.scale = _ol_transform_js__WEBPACK_IMPORTED_MODULE_283__.scale; +ol.transform.set = _ol_transform_js__WEBPACK_IMPORTED_MODULE_283__.set; +ol.transform.setFromArray = _ol_transform_js__WEBPACK_IMPORTED_MODULE_283__.setFromArray; +ol.transform.toString = _ol_transform_js__WEBPACK_IMPORTED_MODULE_283__.toString; +ol.transform.translate = _ol_transform_js__WEBPACK_IMPORTED_MODULE_283__.translate; +ol.uri = {}; +ol.uri.appendParams = _ol_uri_js__WEBPACK_IMPORTED_MODULE_284__.appendParams; +ol.util = {}; +ol.util.VERSION = _ol_util_js__WEBPACK_IMPORTED_MODULE_285__.VERSION; +ol.util.abstract = _ol_util_js__WEBPACK_IMPORTED_MODULE_285__.abstract; +ol.util.getUid = _ol_util_js__WEBPACK_IMPORTED_MODULE_285__.getUid; +ol.vec = {}; +ol.vec.mat4 = {}; +ol.vec.mat4.create = _ol_vec_mat4_js__WEBPACK_IMPORTED_MODULE_286__.create; +ol.vec.mat4.fromTransform = _ol_vec_mat4_js__WEBPACK_IMPORTED_MODULE_286__.fromTransform; +ol.webgl = {}; +ol.webgl.ARRAY_BUFFER = _ol_webgl_js__WEBPACK_IMPORTED_MODULE_287__.ARRAY_BUFFER; +ol.webgl.Buffer = _ol_webgl_Buffer_js__WEBPACK_IMPORTED_MODULE_288__["default"]; +ol.webgl.Buffer.getArrayClassForType = _ol_webgl_Buffer_js__WEBPACK_IMPORTED_MODULE_288__.getArrayClassForType; +ol.webgl.DYNAMIC_DRAW = _ol_webgl_js__WEBPACK_IMPORTED_MODULE_287__.DYNAMIC_DRAW; +ol.webgl.ELEMENT_ARRAY_BUFFER = _ol_webgl_js__WEBPACK_IMPORTED_MODULE_287__.ELEMENT_ARRAY_BUFFER; +ol.webgl.FLOAT = _ol_webgl_js__WEBPACK_IMPORTED_MODULE_287__.FLOAT; +ol.webgl.Helper = _ol_webgl_Helper_js__WEBPACK_IMPORTED_MODULE_289__["default"]; +ol.webgl.Helper.computeAttributesStride = _ol_webgl_Helper_js__WEBPACK_IMPORTED_MODULE_289__.computeAttributesStride; +ol.webgl.PostProcessingPass = _ol_webgl_PostProcessingPass_js__WEBPACK_IMPORTED_MODULE_290__["default"]; +ol.webgl.RenderTarget = _ol_webgl_RenderTarget_js__WEBPACK_IMPORTED_MODULE_291__["default"]; +ol.webgl.STATIC_DRAW = _ol_webgl_js__WEBPACK_IMPORTED_MODULE_287__.STATIC_DRAW; +ol.webgl.STREAM_DRAW = _ol_webgl_js__WEBPACK_IMPORTED_MODULE_287__.STREAM_DRAW; +ol.webgl.ShaderBuilder = {}; +ol.webgl.ShaderBuilder.ShaderBuilder = _ol_webgl_ShaderBuilder_js__WEBPACK_IMPORTED_MODULE_292__.ShaderBuilder; +ol.webgl.ShaderBuilder.parseLiteralStyle = _ol_webgl_ShaderBuilder_js__WEBPACK_IMPORTED_MODULE_292__.parseLiteralStyle; +ol.webgl.TileTexture = _ol_webgl_TileTexture_js__WEBPACK_IMPORTED_MODULE_293__["default"]; +ol.webgl.UNSIGNED_BYTE = _ol_webgl_js__WEBPACK_IMPORTED_MODULE_287__.UNSIGNED_BYTE; +ol.webgl.UNSIGNED_INT = _ol_webgl_js__WEBPACK_IMPORTED_MODULE_287__.UNSIGNED_INT; +ol.webgl.UNSIGNED_SHORT = _ol_webgl_js__WEBPACK_IMPORTED_MODULE_287__.UNSIGNED_SHORT; +ol.webgl.getContext = _ol_webgl_js__WEBPACK_IMPORTED_MODULE_287__.getContext; +ol.webgl.getSupportedExtensions = _ol_webgl_js__WEBPACK_IMPORTED_MODULE_287__.getSupportedExtensions; +ol.xml = {}; +ol.xml.OBJECT_PROPERTY_NODE_FACTORY = _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__.OBJECT_PROPERTY_NODE_FACTORY; +ol.xml.XML_SCHEMA_INSTANCE_URI = _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__.XML_SCHEMA_INSTANCE_URI; +ol.xml.createElementNS = _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__.createElementNS; +ol.xml.getAllTextContent = _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__.getAllTextContent; +ol.xml.getAllTextContent_ = _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__.getAllTextContent_; +ol.xml.getAttributeNS = _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__.getAttributeNS; +ol.xml.getDocument = _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__.getDocument; +ol.xml.getXMLSerializer = _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__.getXMLSerializer; +ol.xml.isDocument = _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__.isDocument; +ol.xml.makeArrayExtender = _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__.makeArrayExtender; +ol.xml.makeArrayPusher = _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__.makeArrayPusher; +ol.xml.makeArraySerializer = _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__.makeArraySerializer; +ol.xml.makeChildAppender = _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__.makeChildAppender; +ol.xml.makeObjectPropertyPusher = _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__.makeObjectPropertyPusher; +ol.xml.makeObjectPropertySetter = _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__.makeObjectPropertySetter; +ol.xml.makeReplacer = _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__.makeReplacer; +ol.xml.makeSequence = _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__.makeSequence; +ol.xml.makeSimpleNodeFactory = _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__.makeSimpleNodeFactory; +ol.xml.makeStructureNS = _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__.makeStructureNS; +ol.xml.parse = _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__.parse; +ol.xml.parseNode = _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__.parseNode; +ol.xml.pushParseAndPop = _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__.pushParseAndPop; +ol.xml.pushSerializeAndPop = _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__.pushSerializeAndPop; +ol.xml.registerDocument = _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__.registerDocument; +ol.xml.registerXMLSerializer = _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__.registerXMLSerializer; +ol.xml.serialize = _ol_xml_js__WEBPACK_IMPORTED_MODULE_294__.serialize; +/* harmony default export */ __webpack_exports__["default"] = (ol); + +/***/ }), +/* 2 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "METERS_PER_UNIT": function() { return /* reexport safe */ _proj_Units_js__WEBPACK_IMPORTED_MODULE_0__.METERS_PER_UNIT; }, +/* harmony export */ "Projection": function() { return /* reexport safe */ _proj_Projection_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }, +/* harmony export */ "cloneTransform": function() { return /* binding */ cloneTransform; }, +/* harmony export */ "identityTransform": function() { return /* binding */ identityTransform; }, +/* harmony export */ "addProjection": function() { return /* binding */ addProjection; }, +/* harmony export */ "addProjections": function() { return /* binding */ addProjections; }, +/* harmony export */ "get": function() { return /* binding */ get; }, +/* harmony export */ "getPointResolution": function() { return /* binding */ getPointResolution; }, +/* harmony export */ "addEquivalentProjections": function() { return /* binding */ addEquivalentProjections; }, +/* harmony export */ "addEquivalentTransforms": function() { return /* binding */ addEquivalentTransforms; }, +/* harmony export */ "clearAllProjections": function() { return /* binding */ clearAllProjections; }, +/* harmony export */ "createProjection": function() { return /* binding */ createProjection; }, +/* harmony export */ "createTransformFromCoordinateTransform": function() { return /* binding */ createTransformFromCoordinateTransform; }, +/* harmony export */ "addCoordinateTransforms": function() { return /* binding */ addCoordinateTransforms; }, +/* harmony export */ "fromLonLat": function() { return /* binding */ fromLonLat; }, +/* harmony export */ "toLonLat": function() { return /* binding */ toLonLat; }, +/* harmony export */ "equivalent": function() { return /* binding */ equivalent; }, +/* harmony export */ "getTransformFromProjections": function() { return /* binding */ getTransformFromProjections; }, +/* harmony export */ "getTransform": function() { return /* binding */ getTransform; }, +/* harmony export */ "transform": function() { return /* binding */ transform; }, +/* harmony export */ "transformExtent": function() { return /* binding */ transformExtent; }, +/* harmony export */ "transformWithProjections": function() { return /* binding */ transformWithProjections; }, +/* harmony export */ "setUserProjection": function() { return /* binding */ setUserProjection; }, +/* harmony export */ "clearUserProjection": function() { return /* binding */ clearUserProjection; }, +/* harmony export */ "getUserProjection": function() { return /* binding */ getUserProjection; }, +/* harmony export */ "useGeographic": function() { return /* binding */ useGeographic; }, +/* harmony export */ "toUserCoordinate": function() { return /* binding */ toUserCoordinate; }, +/* harmony export */ "fromUserCoordinate": function() { return /* binding */ fromUserCoordinate; }, +/* harmony export */ "toUserExtent": function() { return /* binding */ toUserExtent; }, +/* harmony export */ "fromUserExtent": function() { return /* binding */ fromUserExtent; }, +/* harmony export */ "toUserResolution": function() { return /* binding */ toUserResolution; }, +/* harmony export */ "fromUserResolution": function() { return /* binding */ fromUserResolution; }, +/* harmony export */ "createSafeCoordinateTransform": function() { return /* binding */ createSafeCoordinateTransform; }, +/* harmony export */ "addCommon": function() { return /* binding */ addCommon; } +/* harmony export */ }); +/* harmony import */ var _proj_Projection_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4); +/* harmony import */ var _proj_Units_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); +/* harmony import */ var _proj_epsg3857_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(19); +/* harmony import */ var _proj_epsg4326_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(20); +/* harmony import */ var _proj_projections_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5); +/* harmony import */ var _proj_transforms_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6); +/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(11); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9); +/* harmony import */ var _sphere_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8); +/* harmony import */ var _coordinate_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(17); +/** + * @module ol/proj + */ + +/** + * The ol/proj module stores: + * * a list of {@link module:ol/proj/Projection} + * objects, one for each projection supported by the application + * * a list of transform functions needed to convert coordinates in one projection + * into another. + * + * The static functions are the methods used to maintain these. + * Each transform function can handle not only simple coordinate pairs, but also + * large arrays of coordinates such as vector geometries. + * + * When loaded, the library adds projection objects for EPSG:4326 (WGS84 + * geographic coordinates) and EPSG:3857 (Web or Spherical Mercator, as used + * for example by Bing Maps or OpenStreetMap), together with the relevant + * transform functions. + * + * Additional transforms may be added by using the http://proj4js.org/ + * library (version 2.2 or later). You can use the full build supplied by + * Proj4js, or create a custom build to support those projections you need; see + * the Proj4js website for how to do this. You also need the Proj4js definitions + * for the required projections. These definitions can be obtained from + * https://epsg.io/, and are a JS function, so can be loaded in a script + * tag (as in the examples) or pasted into your application. + * + * After all required projection definitions are added to proj4's registry (by + * using `proj4.defs()`), simply call `register(proj4)` from the `ol/proj/proj4` + * package. Existing transforms are not changed by this function. See + * examples/wms-image-custom-proj for an example of this. + * + * Additional projection definitions can be registered with `proj4.defs()` any + * time. Just make sure to call `register(proj4)` again; for example, with user-supplied data where you don't + * know in advance what projections are needed, you can initially load minimal + * support and then load whichever are requested. + * + * Note that Proj4js does not support projection extents. If you want to add + * one for creating default tile grids, you can add it after the Projection + * object has been created with `setExtent`, for example, + * `get('EPSG:1234').setExtent(extent)`. + * + * In addition to Proj4js support, any transform functions can be added with + * {@link module:ol/proj.addCoordinateTransforms}. To use this, you must first create + * a {@link module:ol/proj/Projection} object for the new projection and add it with + * {@link module:ol/proj.addProjection}. You can then add the forward and inverse + * functions with {@link module:ol/proj.addCoordinateTransforms}. See + * examples/wms-custom-proj for an example of this. + * + * Note that if no transforms are needed and you only need to define the + * projection, just add a {@link module:ol/proj/Projection} with + * {@link module:ol/proj.addProjection}. See examples/wms-no-proj for an example of + * this. + */ + + + + + + + + + + +/** + * A projection as {@link module:ol/proj/Projection}, SRS identifier + * string or undefined. + * @typedef {Projection|string|undefined} ProjectionLike + * @api + */ + +/** + * A transform function accepts an array of input coordinate values, an optional + * output array, and an optional dimension (default should be 2). The function + * transforms the input coordinate values, populates the output array, and + * returns the output array. + * + * @typedef {function(Array, Array=, number=): Array} TransformFunction + * @api + */ + + + +/** + * @param {Array} input Input coordinate array. + * @param {Array} [opt_output] Output array of coordinate values. + * @param {number} [opt_dimension] Dimension. + * @return {Array} Output coordinate array (new array, same coordinate + * values). + */ + +function cloneTransform(input, opt_output, opt_dimension) { + var output; + + if (opt_output !== undefined) { + for (var i = 0, ii = input.length; i < ii; ++i) { + opt_output[i] = input[i]; + } + + output = opt_output; + } else { + output = input.slice(); + } + + return output; +} +/** + * @param {Array} input Input coordinate array. + * @param {Array} [opt_output] Output array of coordinate values. + * @param {number} [opt_dimension] Dimension. + * @return {Array} Input coordinate array (same array as input). + */ + +function identityTransform(input, opt_output, opt_dimension) { + if (opt_output !== undefined && input !== opt_output) { + for (var i = 0, ii = input.length; i < ii; ++i) { + opt_output[i] = input[i]; + } + + input = opt_output; + } + + return input; +} +/** + * Add a Projection object to the list of supported projections that can be + * looked up by their code. + * + * @param {Projection} projection Projection instance. + * @api + */ + +function addProjection(projection) { + (0,_proj_projections_js__WEBPACK_IMPORTED_MODULE_2__.add)(projection.getCode(), projection); + (0,_proj_transforms_js__WEBPACK_IMPORTED_MODULE_3__.add)(projection, projection, cloneTransform); +} +/** + * @param {Array} projections Projections. + */ + +function addProjections(projections) { + projections.forEach(addProjection); +} +/** + * Fetches a Projection object for the code specified. + * + * @param {ProjectionLike} projectionLike Either a code string which is + * a combination of authority and identifier such as "EPSG:4326", or an + * existing projection object, or undefined. + * @return {Projection} Projection object, or null if not in list. + * @api + */ + +function get(projectionLike) { + return typeof projectionLike === 'string' ? (0,_proj_projections_js__WEBPACK_IMPORTED_MODULE_2__.get)( + /** @type {string} */ + projectionLike) : + /** @type {Projection} */ + projectionLike || null; +} +/** + * Get the resolution of the point in degrees or distance units. + * For projections with degrees as the unit this will simply return the + * provided resolution. For other projections the point resolution is + * by default estimated by transforming the 'point' pixel to EPSG:4326, + * measuring its width and height on the normal sphere, + * and taking the average of the width and height. + * A custom function can be provided for a specific projection, either + * by setting the `getPointResolution` option in the + * {@link module:ol/proj/Projection~Projection} constructor or by using + * {@link module:ol/proj/Projection~Projection#setGetPointResolution} to change an existing + * projection object. + * @param {ProjectionLike} projection The projection. + * @param {number} resolution Nominal resolution in projection units. + * @param {import("./coordinate.js").Coordinate} point Point to find adjusted resolution at. + * @param {import("./proj/Units.js").default} [opt_units] Units to get the point resolution in. + * Default is the projection's units. + * @return {number} Point resolution. + * @api + */ + +function getPointResolution(projection, resolution, point, opt_units) { + projection = get(projection); + var pointResolution; + var getter = projection.getPointResolutionFunc(); + + if (getter) { + pointResolution = getter(resolution, point); + + if (opt_units && opt_units !== projection.getUnits()) { + var metersPerUnit = projection.getMetersPerUnit(); + + if (metersPerUnit) { + pointResolution = pointResolution * metersPerUnit / _proj_Units_js__WEBPACK_IMPORTED_MODULE_0__.METERS_PER_UNIT[opt_units]; + } + } + } else { + var units = projection.getUnits(); + + if (units == _proj_Units_js__WEBPACK_IMPORTED_MODULE_0__["default"].DEGREES && !opt_units || opt_units == _proj_Units_js__WEBPACK_IMPORTED_MODULE_0__["default"].DEGREES) { + pointResolution = resolution; + } else { + // Estimate point resolution by transforming the center pixel to EPSG:4326, + // measuring its width and height on the normal sphere, and taking the + // average of the width and height. + var toEPSG4326_1 = getTransformFromProjections(projection, get('EPSG:4326')); + + if (toEPSG4326_1 === identityTransform && units !== _proj_Units_js__WEBPACK_IMPORTED_MODULE_0__["default"].DEGREES) { + // no transform is available + pointResolution = resolution * projection.getMetersPerUnit(); + } else { + var vertices = [point[0] - resolution / 2, point[1], point[0] + resolution / 2, point[1], point[0], point[1] - resolution / 2, point[0], point[1] + resolution / 2]; + vertices = toEPSG4326_1(vertices, vertices, 2); + var width = (0,_sphere_js__WEBPACK_IMPORTED_MODULE_4__.getDistance)(vertices.slice(0, 2), vertices.slice(2, 4)); + var height = (0,_sphere_js__WEBPACK_IMPORTED_MODULE_4__.getDistance)(vertices.slice(4, 6), vertices.slice(6, 8)); + pointResolution = (width + height) / 2; + } + + var metersPerUnit = opt_units ? _proj_Units_js__WEBPACK_IMPORTED_MODULE_0__.METERS_PER_UNIT[opt_units] : projection.getMetersPerUnit(); + + if (metersPerUnit !== undefined) { + pointResolution /= metersPerUnit; + } + } + } + + return pointResolution; +} +/** + * Registers transformation functions that don't alter coordinates. Those allow + * to transform between projections with equal meaning. + * + * @param {Array} projections Projections. + * @api + */ + +function addEquivalentProjections(projections) { + addProjections(projections); + projections.forEach(function (source) { + projections.forEach(function (destination) { + if (source !== destination) { + (0,_proj_transforms_js__WEBPACK_IMPORTED_MODULE_3__.add)(source, destination, cloneTransform); + } + }); + }); +} +/** + * Registers transformation functions to convert coordinates in any projection + * in projection1 to any projection in projection2. + * + * @param {Array} projections1 Projections with equal + * meaning. + * @param {Array} projections2 Projections with equal + * meaning. + * @param {TransformFunction} forwardTransform Transformation from any + * projection in projection1 to any projection in projection2. + * @param {TransformFunction} inverseTransform Transform from any projection + * in projection2 to any projection in projection1.. + */ + +function addEquivalentTransforms(projections1, projections2, forwardTransform, inverseTransform) { + projections1.forEach(function (projection1) { + projections2.forEach(function (projection2) { + (0,_proj_transforms_js__WEBPACK_IMPORTED_MODULE_3__.add)(projection1, projection2, forwardTransform); + (0,_proj_transforms_js__WEBPACK_IMPORTED_MODULE_3__.add)(projection2, projection1, inverseTransform); + }); + }); +} +/** + * Clear all cached projections and transforms. + */ + +function clearAllProjections() { + (0,_proj_projections_js__WEBPACK_IMPORTED_MODULE_2__.clear)(); + (0,_proj_transforms_js__WEBPACK_IMPORTED_MODULE_3__.clear)(); +} +/** + * @param {Projection|string|undefined} projection Projection. + * @param {string} defaultCode Default code. + * @return {Projection} Projection. + */ + +function createProjection(projection, defaultCode) { + if (!projection) { + return get(defaultCode); + } else if (typeof projection === 'string') { + return get(projection); + } else { + return ( + /** @type {Projection} */ + projection + ); + } +} +/** + * Creates a {@link module:ol/proj~TransformFunction} from a simple 2D coordinate transform + * function. + * @param {function(import("./coordinate.js").Coordinate): import("./coordinate.js").Coordinate} coordTransform Coordinate + * transform. + * @return {TransformFunction} Transform function. + */ + +function createTransformFromCoordinateTransform(coordTransform) { + return ( + /** + * @param {Array} input Input. + * @param {Array} [opt_output] Output. + * @param {number} [opt_dimension] Dimension. + * @return {Array} Output. + */ + function (input, opt_output, opt_dimension) { + var length = input.length; + var dimension = opt_dimension !== undefined ? opt_dimension : 2; + var output = opt_output !== undefined ? opt_output : new Array(length); + + for (var i = 0; i < length; i += dimension) { + var point = coordTransform([input[i], input[i + 1]]); + output[i] = point[0]; + output[i + 1] = point[1]; + + for (var j = dimension - 1; j >= 2; --j) { + output[i + j] = input[i + j]; + } + } + + return output; + } + ); +} +/** + * Registers coordinate transform functions to convert coordinates between the + * source projection and the destination projection. + * The forward and inverse functions convert coordinate pairs; this function + * converts these into the functions used internally which also handle + * extents and coordinate arrays. + * + * @param {ProjectionLike} source Source projection. + * @param {ProjectionLike} destination Destination projection. + * @param {function(import("./coordinate.js").Coordinate): import("./coordinate.js").Coordinate} forward The forward transform + * function (that is, from the source projection to the destination + * projection) that takes a {@link module:ol/coordinate~Coordinate} as argument and returns + * the transformed {@link module:ol/coordinate~Coordinate}. + * @param {function(import("./coordinate.js").Coordinate): import("./coordinate.js").Coordinate} inverse The inverse transform + * function (that is, from the destination projection to the source + * projection) that takes a {@link module:ol/coordinate~Coordinate} as argument and returns + * the transformed {@link module:ol/coordinate~Coordinate}. + * @api + */ + +function addCoordinateTransforms(source, destination, forward, inverse) { + var sourceProj = get(source); + var destProj = get(destination); + (0,_proj_transforms_js__WEBPACK_IMPORTED_MODULE_3__.add)(sourceProj, destProj, createTransformFromCoordinateTransform(forward)); + (0,_proj_transforms_js__WEBPACK_IMPORTED_MODULE_3__.add)(destProj, sourceProj, createTransformFromCoordinateTransform(inverse)); +} +/** + * Transforms a coordinate from longitude/latitude to a different projection. + * @param {import("./coordinate.js").Coordinate} coordinate Coordinate as longitude and latitude, i.e. + * an array with longitude as 1st and latitude as 2nd element. + * @param {ProjectionLike} [opt_projection] Target projection. The + * default is Web Mercator, i.e. 'EPSG:3857'. + * @return {import("./coordinate.js").Coordinate} Coordinate projected to the target projection. + * @api + */ + +function fromLonLat(coordinate, opt_projection) { + return transform(coordinate, 'EPSG:4326', opt_projection !== undefined ? opt_projection : 'EPSG:3857'); +} +/** + * Transforms a coordinate to longitude/latitude. + * @param {import("./coordinate.js").Coordinate} coordinate Projected coordinate. + * @param {ProjectionLike} [opt_projection] Projection of the coordinate. + * The default is Web Mercator, i.e. 'EPSG:3857'. + * @return {import("./coordinate.js").Coordinate} Coordinate as longitude and latitude, i.e. an array + * with longitude as 1st and latitude as 2nd element. + * @api + */ + +function toLonLat(coordinate, opt_projection) { + var lonLat = transform(coordinate, opt_projection !== undefined ? opt_projection : 'EPSG:3857', 'EPSG:4326'); + var lon = lonLat[0]; + + if (lon < -180 || lon > 180) { + lonLat[0] = (0,_math_js__WEBPACK_IMPORTED_MODULE_5__.modulo)(lon + 180, 360) - 180; + } + + return lonLat; +} +/** + * Checks if two projections are the same, that is every coordinate in one + * projection does represent the same geographic point as the same coordinate in + * the other projection. + * + * @param {Projection} projection1 Projection 1. + * @param {Projection} projection2 Projection 2. + * @return {boolean} Equivalent. + * @api + */ + +function equivalent(projection1, projection2) { + if (projection1 === projection2) { + return true; + } + + var equalUnits = projection1.getUnits() === projection2.getUnits(); + + if (projection1.getCode() === projection2.getCode()) { + return equalUnits; + } else { + var transformFunc = getTransformFromProjections(projection1, projection2); + return transformFunc === cloneTransform && equalUnits; + } +} +/** + * Searches in the list of transform functions for the function for converting + * coordinates from the source projection to the destination projection. + * + * @param {Projection} sourceProjection Source Projection object. + * @param {Projection} destinationProjection Destination Projection + * object. + * @return {TransformFunction} Transform function. + */ + +function getTransformFromProjections(sourceProjection, destinationProjection) { + var sourceCode = sourceProjection.getCode(); + var destinationCode = destinationProjection.getCode(); + var transformFunc = (0,_proj_transforms_js__WEBPACK_IMPORTED_MODULE_3__.get)(sourceCode, destinationCode); + + if (!transformFunc) { + transformFunc = identityTransform; + } + + return transformFunc; +} +/** + * Given the projection-like objects, searches for a transformation + * function to convert a coordinates array from the source projection to the + * destination projection. + * + * @param {ProjectionLike} source Source. + * @param {ProjectionLike} destination Destination. + * @return {TransformFunction} Transform function. + * @api + */ + +function getTransform(source, destination) { + var sourceProjection = get(source); + var destinationProjection = get(destination); + return getTransformFromProjections(sourceProjection, destinationProjection); +} +/** + * Transforms a coordinate from source projection to destination projection. + * This returns a new coordinate (and does not modify the original). + * + * See {@link module:ol/proj.transformExtent} for extent transformation. + * See the transform method of {@link module:ol/geom/Geometry~Geometry} and its + * subclasses for geometry transforms. + * + * @param {import("./coordinate.js").Coordinate} coordinate Coordinate. + * @param {ProjectionLike} source Source projection-like. + * @param {ProjectionLike} destination Destination projection-like. + * @return {import("./coordinate.js").Coordinate} Coordinate. + * @api + */ + +function transform(coordinate, source, destination) { + var transformFunc = getTransform(source, destination); + return transformFunc(coordinate, undefined, coordinate.length); +} +/** + * Transforms an extent from source projection to destination projection. This + * returns a new extent (and does not modify the original). + * + * @param {import("./extent.js").Extent} extent The extent to transform. + * @param {ProjectionLike} source Source projection-like. + * @param {ProjectionLike} destination Destination projection-like. + * @param {number} [opt_stops] Number of stops per side used for the transform. + * By default only the corners are used. + * @return {import("./extent.js").Extent} The transformed extent. + * @api + */ + +function transformExtent(extent, source, destination, opt_stops) { + var transformFunc = getTransform(source, destination); + return (0,_extent_js__WEBPACK_IMPORTED_MODULE_6__.applyTransform)(extent, transformFunc, undefined, opt_stops); +} +/** + * Transforms the given point to the destination projection. + * + * @param {import("./coordinate.js").Coordinate} point Point. + * @param {Projection} sourceProjection Source projection. + * @param {Projection} destinationProjection Destination projection. + * @return {import("./coordinate.js").Coordinate} Point. + */ + +function transformWithProjections(point, sourceProjection, destinationProjection) { + var transformFunc = getTransformFromProjections(sourceProjection, destinationProjection); + return transformFunc(point); +} +/** + * @type {?Projection} + */ + +var userProjection = null; +/** + * Set the projection for coordinates supplied from and returned by API methods. + * Note that this method is not yet a part of the stable API. Support for user + * projections is not yet complete and should be considered experimental. + * @param {ProjectionLike} projection The user projection. + */ + +function setUserProjection(projection) { + userProjection = get(projection); +} +/** + * Clear the user projection if set. Note that this method is not yet a part of + * the stable API. Support for user projections is not yet complete and should + * be considered experimental. + */ + +function clearUserProjection() { + userProjection = null; +} +/** + * Get the projection for coordinates supplied from and returned by API methods. + * Note that this method is not yet a part of the stable API. Support for user + * projections is not yet complete and should be considered experimental. + * @return {?Projection} The user projection (or null if not set). + */ + +function getUserProjection() { + return userProjection; +} +/** + * Use geographic coordinates (WGS-84 datum) in API methods. Note that this + * method is not yet a part of the stable API. Support for user projections is + * not yet complete and should be considered experimental. + */ + +function useGeographic() { + setUserProjection('EPSG:4326'); +} +/** + * Return a coordinate transformed into the user projection. If no user projection + * is set, the original coordinate is returned. + * @param {Array} coordinate Input coordinate. + * @param {ProjectionLike} sourceProjection The input coordinate projection. + * @return {Array} The input coordinate in the user projection. + */ + +function toUserCoordinate(coordinate, sourceProjection) { + if (!userProjection) { + return coordinate; + } + + return transform(coordinate, sourceProjection, userProjection); +} +/** + * Return a coordinate transformed from the user projection. If no user projection + * is set, the original coordinate is returned. + * @param {Array} coordinate Input coordinate. + * @param {ProjectionLike} destProjection The destination projection. + * @return {Array} The input coordinate transformed. + */ + +function fromUserCoordinate(coordinate, destProjection) { + if (!userProjection) { + return coordinate; + } + + return transform(coordinate, userProjection, destProjection); +} +/** + * Return an extent transformed into the user projection. If no user projection + * is set, the original extent is returned. + * @param {import("./extent.js").Extent} extent Input extent. + * @param {ProjectionLike} sourceProjection The input extent projection. + * @return {import("./extent.js").Extent} The input extent in the user projection. + */ + +function toUserExtent(extent, sourceProjection) { + if (!userProjection) { + return extent; + } + + return transformExtent(extent, sourceProjection, userProjection); +} +/** + * Return an extent transformed from the user projection. If no user projection + * is set, the original extent is returned. + * @param {import("./extent.js").Extent} extent Input extent. + * @param {ProjectionLike} destProjection The destination projection. + * @return {import("./extent.js").Extent} The input extent transformed. + */ + +function fromUserExtent(extent, destProjection) { + if (!userProjection) { + return extent; + } + + return transformExtent(extent, userProjection, destProjection); +} +/** + * Return the resolution in user projection units per pixel. If no user projection + * is set, or source or user projection are missing units, the original resolution + * is returned. + * @param {number} resolution Resolution in input projection units per pixel. + * @param {ProjectionLike} sourceProjection The input projection. + * @return {number} Resolution in user projection units per pixel. + */ + +function toUserResolution(resolution, sourceProjection) { + if (!userProjection) { + return resolution; + } + + var sourceUnits = get(sourceProjection).getUnits(); + var userUnits = userProjection.getUnits(); + return sourceUnits && userUnits ? resolution * _proj_Units_js__WEBPACK_IMPORTED_MODULE_0__.METERS_PER_UNIT[sourceUnits] / _proj_Units_js__WEBPACK_IMPORTED_MODULE_0__.METERS_PER_UNIT[userUnits] : resolution; +} +/** + * Return the resolution in user projection units per pixel. If no user projection + * is set, or source or user projection are missing units, the original resolution + * is returned. + * @param {number} resolution Resolution in user projection units per pixel. + * @param {ProjectionLike} destProjection The destination projection. + * @return {number} Resolution in destination projection units per pixel. + */ + +function fromUserResolution(resolution, destProjection) { + if (!userProjection) { + return resolution; + } + + var sourceUnits = get(destProjection).getUnits(); + var userUnits = userProjection.getUnits(); + return sourceUnits && userUnits ? resolution * _proj_Units_js__WEBPACK_IMPORTED_MODULE_0__.METERS_PER_UNIT[userUnits] / _proj_Units_js__WEBPACK_IMPORTED_MODULE_0__.METERS_PER_UNIT[sourceUnits] : resolution; +} +/** + * Creates a safe coordinate transform function from a coordinate transform function. + * "Safe" means that it can handle wrapping of x-coordinates for global projections, + * and that coordinates exceeding the source projection validity extent's range will be + * clamped to the validity range. + * @param {Projection} sourceProj Source projection. + * @param {Projection} destProj Destination projection. + * @param {function(import("./coordinate.js").Coordinate): import("./coordinate.js").Coordinate} transform Transform function (source to destiation). + * @return {function(import("./coordinate.js").Coordinate): import("./coordinate.js").Coordinate} Safe transform function (source to destiation). + */ + +function createSafeCoordinateTransform(sourceProj, destProj, transform) { + return function (coord) { + var sourceX = coord[0]; + var sourceY = coord[1]; + var transformed, worldsAway; + + if (sourceProj.canWrapX()) { + var sourceExtent = sourceProj.getExtent(); + var sourceExtentWidth = (0,_extent_js__WEBPACK_IMPORTED_MODULE_6__.getWidth)(sourceExtent); + worldsAway = (0,_coordinate_js__WEBPACK_IMPORTED_MODULE_7__.getWorldsAway)(coord, sourceProj, sourceExtentWidth); + + if (worldsAway) { + // Move x to the real world + sourceX = sourceX - worldsAway * sourceExtentWidth; + } + + sourceX = (0,_math_js__WEBPACK_IMPORTED_MODULE_5__.clamp)(sourceX, sourceExtent[0], sourceExtent[2]); + sourceY = (0,_math_js__WEBPACK_IMPORTED_MODULE_5__.clamp)(sourceY, sourceExtent[1], sourceExtent[3]); + transformed = transform([sourceX, sourceY]); + } else { + transformed = transform(coord); + } + + if (worldsAway && destProj.canWrapX()) { + // Move transformed coordinate back to the offset world + transformed[0] += worldsAway * (0,_extent_js__WEBPACK_IMPORTED_MODULE_6__.getWidth)(destProj.getExtent()); + } + + return transformed; + }; +} +/** + * Add transforms to and from EPSG:4326 and EPSG:3857. This function is called + * by when this module is executed and should only need to be called again after + * `clearAllProjections()` is called (e.g. in tests). + */ + +function addCommon() { + // Add transformations that don't alter coordinates to convert within set of + // projections with equal meaning. + addEquivalentProjections(_proj_epsg3857_js__WEBPACK_IMPORTED_MODULE_8__.PROJECTIONS); + addEquivalentProjections(_proj_epsg4326_js__WEBPACK_IMPORTED_MODULE_9__.PROJECTIONS); // Add transformations to convert EPSG:4326 like coordinates to EPSG:3857 like + // coordinates and back. + + addEquivalentTransforms(_proj_epsg4326_js__WEBPACK_IMPORTED_MODULE_9__.PROJECTIONS, _proj_epsg3857_js__WEBPACK_IMPORTED_MODULE_8__.PROJECTIONS, _proj_epsg3857_js__WEBPACK_IMPORTED_MODULE_8__.fromEPSG4326, _proj_epsg3857_js__WEBPACK_IMPORTED_MODULE_8__.toEPSG4326); +} +addCommon(); + +/***/ }), +/* 3 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "fromCode": function() { return /* binding */ fromCode; }, +/* harmony export */ "METERS_PER_UNIT": function() { return /* binding */ METERS_PER_UNIT; } +/* harmony export */ }); +/** + * @module ol/proj/Units + */ + +/** + * Projection units: `'degrees'`, `'ft'`, `'m'`, `'pixels'`, `'tile-pixels'` or + * `'us-ft'`. + * @enum {string} + */ +var Units = { + /** + * Radians + * @api + */ + RADIANS: 'radians', + + /** + * Degrees + * @api + */ + DEGREES: 'degrees', + + /** + * Feet + * @api + */ + FEET: 'ft', + + /** + * Meters + * @api + */ + METERS: 'm', + + /** + * Pixels + * @api + */ + PIXELS: 'pixels', + + /** + * Tile Pixels + * @api + */ + TILE_PIXELS: 'tile-pixels', + + /** + * US Feet + * @api + */ + USFEET: 'us-ft' +}; +/** + * See http://duff.ess.washington.edu/data/raster/drg/docs/geotiff.txt + * @type {Object} + */ + +var unitByCode = { + '9001': Units.METERS, + '9002': Units.FEET, + '9003': Units.USFEET, + '9101': Units.RADIANS, + '9102': Units.DEGREES +}; +/** + * @param {number} code Unit code. + * @return {Units} Units. + */ + +function fromCode(code) { + return unitByCode[code]; +} +/** + * Meters per unit lookup table. + * @const + * @type {Object} + * @api + */ + +var METERS_PER_UNIT = {}; // use the radius of the Normal sphere + +METERS_PER_UNIT[Units.RADIANS] = 6370997 / (2 * Math.PI); +METERS_PER_UNIT[Units.DEGREES] = 2 * Math.PI * 6370997 / 360; +METERS_PER_UNIT[Units.FEET] = 0.3048; +METERS_PER_UNIT[Units.METERS] = 1; +METERS_PER_UNIT[Units.USFEET] = 1200 / 3937; +/* harmony default export */ __webpack_exports__["default"] = (Units); + +/***/ }), +/* 4 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Units_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); +/** + * @module ol/proj/Projection + */ + +/** + * @typedef {Object} Options + * @property {string} code The SRS identifier code, e.g. `EPSG:4326`. + * @property {import("./Units.js").default|string} [units] Units. Required unless a + * proj4 projection is defined for `code`. + * @property {import("../extent.js").Extent} [extent] The validity extent for the SRS. + * @property {string} [axisOrientation='enu'] The axis orientation as specified in Proj4. + * @property {boolean} [global=false] Whether the projection is valid for the whole globe. + * @property {number} [metersPerUnit] The meters per unit for the SRS. + * If not provided, the `units` are used to get the meters per unit from the {@link module:ol/proj/Units~METERS_PER_UNIT} + * lookup table. + * @property {import("../extent.js").Extent} [worldExtent] The world extent for the SRS. + * @property {function(number, import("../coordinate.js").Coordinate):number} [getPointResolution] + * Function to determine resolution at a point. The function is called with a + * `number` view resolution and a {@link module:ol/coordinate~Coordinate Coordinate} as arguments, and returns + * the `number` resolution in projection units at the passed coordinate. If this is `undefined`, + * the default {@link module:ol/proj.getPointResolution getPointResolution()} function will be used. + */ + +/** + * @classdesc + * Projection definition class. One of these is created for each projection + * supported in the application and stored in the {@link module:ol/proj} namespace. + * You can use these in applications, but this is not required, as API params + * and options use {@link module:ol/proj~ProjectionLike} which means the simple string + * code will suffice. + * + * You can use {@link module:ol/proj.get} to retrieve the object for a particular + * projection. + * + * The library includes definitions for `EPSG:4326` and `EPSG:3857`, together + * with the following aliases: + * * `EPSG:4326`: CRS:84, urn:ogc:def:crs:EPSG:6.6:4326, + * urn:ogc:def:crs:OGC:1.3:CRS84, urn:ogc:def:crs:OGC:2:84, + * http://www.opengis.net/gml/srs/epsg.xml#4326, + * urn:x-ogc:def:crs:EPSG:4326 + * * `EPSG:3857`: EPSG:102100, EPSG:102113, EPSG:900913, + * urn:ogc:def:crs:EPSG:6.18:3:3857, + * http://www.opengis.net/gml/srs/epsg.xml#3857 + * + * If you use [proj4js](https://github.com/proj4js/proj4js), aliases can + * be added using `proj4.defs()`. After all required projection definitions are + * added, call the {@link module:ol/proj/proj4.register} function. + * + * @api + */ + +var Projection = +/** @class */ +function () { + /** + * @param {Options} options Projection options. + */ + function Projection(options) { + /** + * @private + * @type {string} + */ + this.code_ = options.code; + /** + * Units of projected coordinates. When set to `TILE_PIXELS`, a + * `this.extent_` and `this.worldExtent_` must be configured properly for each + * tile. + * @private + * @type {import("./Units.js").default} + */ + + this.units_ = + /** @type {import("./Units.js").default} */ + options.units; + /** + * Validity extent of the projection in projected coordinates. For projections + * with `TILE_PIXELS` units, this is the extent of the tile in + * tile pixel space. + * @private + * @type {import("../extent.js").Extent} + */ + + this.extent_ = options.extent !== undefined ? options.extent : null; + /** + * Extent of the world in EPSG:4326. For projections with + * `TILE_PIXELS` units, this is the extent of the tile in + * projected coordinate space. + * @private + * @type {import("../extent.js").Extent} + */ + + this.worldExtent_ = options.worldExtent !== undefined ? options.worldExtent : null; + /** + * @private + * @type {string} + */ + + this.axisOrientation_ = options.axisOrientation !== undefined ? options.axisOrientation : 'enu'; + /** + * @private + * @type {boolean} + */ + + this.global_ = options.global !== undefined ? options.global : false; + /** + * @private + * @type {boolean} + */ + + this.canWrapX_ = !!(this.global_ && this.extent_); + /** + * @private + * @type {function(number, import("../coordinate.js").Coordinate):number|undefined} + */ + + this.getPointResolutionFunc_ = options.getPointResolution; + /** + * @private + * @type {import("../tilegrid/TileGrid.js").default} + */ + + this.defaultTileGrid_ = null; + /** + * @private + * @type {number|undefined} + */ + + this.metersPerUnit_ = options.metersPerUnit; + } + /** + * @return {boolean} The projection is suitable for wrapping the x-axis + */ + + + Projection.prototype.canWrapX = function () { + return this.canWrapX_; + }; + /** + * Get the code for this projection, e.g. 'EPSG:4326'. + * @return {string} Code. + * @api + */ + + + Projection.prototype.getCode = function () { + return this.code_; + }; + /** + * Get the validity extent for this projection. + * @return {import("../extent.js").Extent} Extent. + * @api + */ + + + Projection.prototype.getExtent = function () { + return this.extent_; + }; + /** + * Get the units of this projection. + * @return {import("./Units.js").default} Units. + * @api + */ + + + Projection.prototype.getUnits = function () { + return this.units_; + }; + /** + * Get the amount of meters per unit of this projection. If the projection is + * not configured with `metersPerUnit` or a units identifier, the return is + * `undefined`. + * @return {number|undefined} Meters. + * @api + */ + + + Projection.prototype.getMetersPerUnit = function () { + return this.metersPerUnit_ || _Units_js__WEBPACK_IMPORTED_MODULE_0__.METERS_PER_UNIT[this.units_]; + }; + /** + * Get the world extent for this projection. + * @return {import("../extent.js").Extent} Extent. + * @api + */ + + + Projection.prototype.getWorldExtent = function () { + return this.worldExtent_; + }; + /** + * Get the axis orientation of this projection. + * Example values are: + * enu - the default easting, northing, elevation. + * neu - northing, easting, up - useful for "lat/long" geographic coordinates, + * or south orientated transverse mercator. + * wnu - westing, northing, up - some planetary coordinate systems have + * "west positive" coordinate systems + * @return {string} Axis orientation. + * @api + */ + + + Projection.prototype.getAxisOrientation = function () { + return this.axisOrientation_; + }; + /** + * Is this projection a global projection which spans the whole world? + * @return {boolean} Whether the projection is global. + * @api + */ + + + Projection.prototype.isGlobal = function () { + return this.global_; + }; + /** + * Set if the projection is a global projection which spans the whole world + * @param {boolean} global Whether the projection is global. + * @api + */ + + + Projection.prototype.setGlobal = function (global) { + this.global_ = global; + this.canWrapX_ = !!(global && this.extent_); + }; + /** + * @return {import("../tilegrid/TileGrid.js").default} The default tile grid. + */ + + + Projection.prototype.getDefaultTileGrid = function () { + return this.defaultTileGrid_; + }; + /** + * @param {import("../tilegrid/TileGrid.js").default} tileGrid The default tile grid. + */ + + + Projection.prototype.setDefaultTileGrid = function (tileGrid) { + this.defaultTileGrid_ = tileGrid; + }; + /** + * Set the validity extent for this projection. + * @param {import("../extent.js").Extent} extent Extent. + * @api + */ + + + Projection.prototype.setExtent = function (extent) { + this.extent_ = extent; + this.canWrapX_ = !!(this.global_ && extent); + }; + /** + * Set the world extent for this projection. + * @param {import("../extent.js").Extent} worldExtent World extent + * [minlon, minlat, maxlon, maxlat]. + * @api + */ + + + Projection.prototype.setWorldExtent = function (worldExtent) { + this.worldExtent_ = worldExtent; + }; + /** + * Set the getPointResolution function (see {@link module:ol/proj.getPointResolution} + * for this projection. + * @param {function(number, import("../coordinate.js").Coordinate):number} func Function + * @api + */ + + + Projection.prototype.setGetPointResolution = function (func) { + this.getPointResolutionFunc_ = func; + }; + /** + * Get the custom point resolution function for this projection (if set). + * @return {function(number, import("../coordinate.js").Coordinate):number|undefined} The custom point + * resolution function (if set). + */ + + + Projection.prototype.getPointResolutionFunc = function () { + return this.getPointResolutionFunc_; + }; + + return Projection; +}(); + +/* harmony default export */ __webpack_exports__["default"] = (Projection); + +/***/ }), +/* 5 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "clear": function() { return /* binding */ clear; }, +/* harmony export */ "get": function() { return /* binding */ get; }, +/* harmony export */ "add": function() { return /* binding */ add; } +/* harmony export */ }); +/** + * @module ol/proj/projections + */ + +/** + * @type {Object} + */ +var cache = {}; +/** + * Clear the projections cache. + */ + +function clear() { + cache = {}; +} +/** + * Get a cached projection by code. + * @param {string} code The code for the projection. + * @return {import("./Projection.js").default} The projection (if cached). + */ + +function get(code) { + return cache[code] || cache[code.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/, 'EPSG:$3')] || null; +} +/** + * Add a projection to the cache. + * @param {string} code The projection code. + * @param {import("./Projection.js").default} projection The projection to cache. + */ + +function add(code, projection) { + cache[code] = projection; +} + +/***/ }), +/* 6 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "clear": function() { return /* binding */ clear; }, +/* harmony export */ "add": function() { return /* binding */ add; }, +/* harmony export */ "remove": function() { return /* binding */ remove; }, +/* harmony export */ "get": function() { return /* binding */ get; } +/* harmony export */ }); +/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7); +/** + * @module ol/proj/transforms + */ + +/** + * @private + * @type {!Object>} + */ + +var transforms = {}; +/** + * Clear the transform cache. + */ + +function clear() { + transforms = {}; +} +/** + * Registers a conversion function to convert coordinates from the source + * projection to the destination projection. + * + * @param {import("./Projection.js").default} source Source. + * @param {import("./Projection.js").default} destination Destination. + * @param {import("../proj.js").TransformFunction} transformFn Transform. + */ + +function add(source, destination, transformFn) { + var sourceCode = source.getCode(); + var destinationCode = destination.getCode(); + + if (!(sourceCode in transforms)) { + transforms[sourceCode] = {}; + } + + transforms[sourceCode][destinationCode] = transformFn; +} +/** + * Unregisters the conversion function to convert coordinates from the source + * projection to the destination projection. This method is used to clean up + * cached transforms during testing. + * + * @param {import("./Projection.js").default} source Source projection. + * @param {import("./Projection.js").default} destination Destination projection. + * @return {import("../proj.js").TransformFunction} transformFn The unregistered transform. + */ + +function remove(source, destination) { + var sourceCode = source.getCode(); + var destinationCode = destination.getCode(); + var transform = transforms[sourceCode][destinationCode]; + delete transforms[sourceCode][destinationCode]; + + if ((0,_obj_js__WEBPACK_IMPORTED_MODULE_0__.isEmpty)(transforms[sourceCode])) { + delete transforms[sourceCode]; + } + + return transform; +} +/** + * Get a transform given a source code and a destination code. + * @param {string} sourceCode The code for the source projection. + * @param {string} destinationCode The code for the destination projection. + * @return {import("../proj.js").TransformFunction|undefined} The transform function (if found). + */ + +function get(sourceCode, destinationCode) { + var transform; + + if (sourceCode in transforms && destinationCode in transforms[sourceCode]) { + transform = transforms[sourceCode][destinationCode]; + } + + return transform; +} + +/***/ }), +/* 7 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "assign": function() { return /* binding */ assign; }, +/* harmony export */ "clear": function() { return /* binding */ clear; }, +/* harmony export */ "getValues": function() { return /* binding */ getValues; }, +/* harmony export */ "isEmpty": function() { return /* binding */ isEmpty; } +/* harmony export */ }); +/** + * @module ol/obj + */ + +/** + * Polyfill for Object.assign(). Assigns enumerable and own properties from + * one or more source objects to a target object. + * See https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign. + * + * @param {!Object} target The target object. + * @param {...Object} var_sources The source object(s). + * @return {!Object} The modified target object. + */ +var assign = typeof Object.assign === 'function' ? Object.assign : function (target, var_sources) { + if (target === undefined || target === null) { + throw new TypeError('Cannot convert undefined or null to object'); + } + + var output = Object(target); + + for (var i = 1, ii = arguments.length; i < ii; ++i) { + var source = arguments[i]; + + if (source !== undefined && source !== null) { + for (var key in source) { + if (source.hasOwnProperty(key)) { + output[key] = source[key]; + } + } + } + } + + return output; +}; +/** + * Removes all properties from an object. + * @param {Object} object The object to clear. + */ + +function clear(object) { + for (var property in object) { + delete object[property]; + } +} +/** + * Polyfill for Object.values(). Get an array of property values from an object. + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values + * + * @param {!Object} object The object from which to get the values. + * @return {!Array} The property values. + * @template K,V + */ + +var getValues = typeof Object.values === 'function' ? Object.values : function (object) { + var values = []; + + for (var property in object) { + values.push(object[property]); + } + + return values; +}; +/** + * Determine if an object has any properties. + * @param {Object} object The object to check. + * @return {boolean} The object is empty. + */ + +function isEmpty(object) { + var property; + + for (property in object) { + return false; + } + + return !property; +} + +/***/ }), +/* 8 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "DEFAULT_RADIUS": function() { return /* binding */ DEFAULT_RADIUS; }, +/* harmony export */ "getDistance": function() { return /* binding */ getDistance; }, +/* harmony export */ "getLength": function() { return /* binding */ getLength; }, +/* harmony export */ "getArea": function() { return /* binding */ getArea; }, +/* harmony export */ "offset": function() { return /* binding */ offset; } +/* harmony export */ }); +/* harmony import */ var _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9); +/** + * @module ol/sphere + */ + + +/** + * Object literal with options for the {@link getLength} or {@link getArea} + * functions. + * @typedef {Object} SphereMetricOptions + * @property {import("./proj.js").ProjectionLike} [projection='EPSG:3857'] + * Projection of the geometry. By default, the geometry is assumed to be in + * Web Mercator. + * @property {number} [radius=6371008.8] Sphere radius. By default, the + * [mean Earth radius](https://en.wikipedia.org/wiki/Earth_radius#Mean_radius) + * for the WGS84 ellipsoid is used. + */ + +/** + * The mean Earth radius (1/3 * (2a + b)) for the WGS84 ellipsoid. + * https://en.wikipedia.org/wiki/Earth_radius#Mean_radius + * @type {number} + */ + +var DEFAULT_RADIUS = 6371008.8; +/** + * Get the great circle distance (in meters) between two geographic coordinates. + * @param {Array} c1 Starting coordinate. + * @param {Array} c2 Ending coordinate. + * @param {number} [opt_radius] The sphere radius to use. Defaults to the Earth's + * mean radius using the WGS84 ellipsoid. + * @return {number} The great circle distance between the points (in meters). + * @api + */ + +function getDistance(c1, c2, opt_radius) { + var radius = opt_radius || DEFAULT_RADIUS; + var lat1 = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.toRadians)(c1[1]); + var lat2 = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.toRadians)(c2[1]); + var deltaLatBy2 = (lat2 - lat1) / 2; + var deltaLonBy2 = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.toRadians)(c2[0] - c1[0]) / 2; + var a = Math.sin(deltaLatBy2) * Math.sin(deltaLatBy2) + Math.sin(deltaLonBy2) * Math.sin(deltaLonBy2) * Math.cos(lat1) * Math.cos(lat2); + return 2 * radius * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); +} +/** + * Get the cumulative great circle length of linestring coordinates (geographic). + * @param {Array} coordinates Linestring coordinates. + * @param {number} radius The sphere radius to use. + * @return {number} The length (in meters). + */ + +function getLengthInternal(coordinates, radius) { + var length = 0; + + for (var i = 0, ii = coordinates.length; i < ii - 1; ++i) { + length += getDistance(coordinates[i], coordinates[i + 1], radius); + } + + return length; +} +/** + * Get the spherical length of a geometry. This length is the sum of the + * great circle distances between coordinates. For polygons, the length is + * the sum of all rings. For points, the length is zero. For multi-part + * geometries, the length is the sum of the length of each part. + * @param {import("./geom/Geometry.js").default} geometry A geometry. + * @param {SphereMetricOptions} [opt_options] Options for the + * length calculation. By default, geometries are assumed to be in 'EPSG:3857'. + * You can change this by providing a `projection` option. + * @return {number} The spherical length (in meters). + * @api + */ + + +function getLength(geometry, opt_options) { + var options = opt_options || {}; + var radius = options.radius || DEFAULT_RADIUS; + var projection = options.projection || 'EPSG:3857'; + var type = geometry.getType(); + + if (type !== _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_1__["default"].GEOMETRY_COLLECTION) { + geometry = geometry.clone().transform(projection, 'EPSG:4326'); + } + + var length = 0; + var coordinates, coords, i, ii, j, jj; + + switch (type) { + case _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_1__["default"].POINT: + case _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_1__["default"].MULTI_POINT: + { + break; + } + + case _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_1__["default"].LINE_STRING: + case _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_1__["default"].LINEAR_RING: + { + coordinates = + /** @type {import("./geom/SimpleGeometry.js").default} */ + geometry.getCoordinates(); + length = getLengthInternal(coordinates, radius); + break; + } + + case _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_1__["default"].MULTI_LINE_STRING: + case _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_1__["default"].POLYGON: + { + coordinates = + /** @type {import("./geom/SimpleGeometry.js").default} */ + geometry.getCoordinates(); + + for (i = 0, ii = coordinates.length; i < ii; ++i) { + length += getLengthInternal(coordinates[i], radius); + } + + break; + } + + case _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_1__["default"].MULTI_POLYGON: + { + coordinates = + /** @type {import("./geom/SimpleGeometry.js").default} */ + geometry.getCoordinates(); + + for (i = 0, ii = coordinates.length; i < ii; ++i) { + coords = coordinates[i]; + + for (j = 0, jj = coords.length; j < jj; ++j) { + length += getLengthInternal(coords[j], radius); + } + } + + break; + } + + case _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_1__["default"].GEOMETRY_COLLECTION: + { + var geometries = + /** @type {import("./geom/GeometryCollection.js").default} */ + geometry.getGeometries(); + + for (i = 0, ii = geometries.length; i < ii; ++i) { + length += getLength(geometries[i], opt_options); + } + + break; + } + + default: + { + throw new Error('Unsupported geometry type: ' + type); + } + } + + return length; +} +/** + * Returns the spherical area for a list of coordinates. + * + * [Reference](https://trs.jpl.nasa.gov/handle/2014/40409) + * Robert. G. Chamberlain and William H. Duquette, "Some Algorithms for + * Polygons on a Sphere", JPL Publication 07-03, Jet Propulsion + * Laboratory, Pasadena, CA, June 2007 + * + * @param {Array} coordinates List of coordinates of a linear + * ring. If the ring is oriented clockwise, the area will be positive, + * otherwise it will be negative. + * @param {number} radius The sphere radius. + * @return {number} Area (in square meters). + */ + +function getAreaInternal(coordinates, radius) { + var area = 0; + var len = coordinates.length; + var x1 = coordinates[len - 1][0]; + var y1 = coordinates[len - 1][1]; + + for (var i = 0; i < len; i++) { + var x2 = coordinates[i][0]; + var y2 = coordinates[i][1]; + area += (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.toRadians)(x2 - x1) * (2 + Math.sin((0,_math_js__WEBPACK_IMPORTED_MODULE_0__.toRadians)(y1)) + Math.sin((0,_math_js__WEBPACK_IMPORTED_MODULE_0__.toRadians)(y2))); + x1 = x2; + y1 = y2; + } + + return area * radius * radius / 2.0; +} +/** + * Get the spherical area of a geometry. This is the area (in meters) assuming + * that polygon edges are segments of great circles on a sphere. + * @param {import("./geom/Geometry.js").default} geometry A geometry. + * @param {SphereMetricOptions} [opt_options] Options for the area + * calculation. By default, geometries are assumed to be in 'EPSG:3857'. + * You can change this by providing a `projection` option. + * @return {number} The spherical area (in square meters). + * @api + */ + + +function getArea(geometry, opt_options) { + var options = opt_options || {}; + var radius = options.radius || DEFAULT_RADIUS; + var projection = options.projection || 'EPSG:3857'; + var type = geometry.getType(); + + if (type !== _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_1__["default"].GEOMETRY_COLLECTION) { + geometry = geometry.clone().transform(projection, 'EPSG:4326'); + } + + var area = 0; + var coordinates, coords, i, ii, j, jj; + + switch (type) { + case _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_1__["default"].POINT: + case _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_1__["default"].MULTI_POINT: + case _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_1__["default"].LINE_STRING: + case _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_1__["default"].MULTI_LINE_STRING: + case _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_1__["default"].LINEAR_RING: + { + break; + } + + case _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_1__["default"].POLYGON: + { + coordinates = + /** @type {import("./geom/Polygon.js").default} */ + geometry.getCoordinates(); + area = Math.abs(getAreaInternal(coordinates[0], radius)); + + for (i = 1, ii = coordinates.length; i < ii; ++i) { + area -= Math.abs(getAreaInternal(coordinates[i], radius)); + } + + break; + } + + case _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_1__["default"].MULTI_POLYGON: + { + coordinates = + /** @type {import("./geom/SimpleGeometry.js").default} */ + geometry.getCoordinates(); + + for (i = 0, ii = coordinates.length; i < ii; ++i) { + coords = coordinates[i]; + area += Math.abs(getAreaInternal(coords[0], radius)); + + for (j = 1, jj = coords.length; j < jj; ++j) { + area -= Math.abs(getAreaInternal(coords[j], radius)); + } + } + + break; + } + + case _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_1__["default"].GEOMETRY_COLLECTION: + { + var geometries = + /** @type {import("./geom/GeometryCollection.js").default} */ + geometry.getGeometries(); + + for (i = 0, ii = geometries.length; i < ii; ++i) { + area += getArea(geometries[i], opt_options); + } + + break; + } + + default: + { + throw new Error('Unsupported geometry type: ' + type); + } + } + + return area; +} +/** + * Returns the coordinate at the given distance and bearing from `c1`. + * + * @param {import("./coordinate.js").Coordinate} c1 The origin point (`[lon, lat]` in degrees). + * @param {number} distance The great-circle distance between the origin + * point and the target point. + * @param {number} bearing The bearing (in radians). + * @param {number} [opt_radius] The sphere radius to use. Defaults to the Earth's + * mean radius using the WGS84 ellipsoid. + * @return {import("./coordinate.js").Coordinate} The target point. + */ + +function offset(c1, distance, bearing, opt_radius) { + var radius = opt_radius || DEFAULT_RADIUS; + var lat1 = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.toRadians)(c1[1]); + var lon1 = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.toRadians)(c1[0]); + var dByR = distance / radius; + var lat = Math.asin(Math.sin(lat1) * Math.cos(dByR) + Math.cos(lat1) * Math.sin(dByR) * Math.cos(bearing)); + var lon = lon1 + Math.atan2(Math.sin(bearing) * Math.sin(dByR) * Math.cos(lat1), Math.cos(dByR) - Math.sin(lat1) * Math.sin(lat)); + return [(0,_math_js__WEBPACK_IMPORTED_MODULE_0__.toDegrees)(lon), (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.toDegrees)(lat)]; +} + +/***/ }), +/* 9 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "clamp": function() { return /* binding */ clamp; }, +/* harmony export */ "cosh": function() { return /* binding */ cosh; }, +/* harmony export */ "log2": function() { return /* binding */ log2; }, +/* harmony export */ "squaredSegmentDistance": function() { return /* binding */ squaredSegmentDistance; }, +/* harmony export */ "squaredDistance": function() { return /* binding */ squaredDistance; }, +/* harmony export */ "solveLinearSystem": function() { return /* binding */ solveLinearSystem; }, +/* harmony export */ "toDegrees": function() { return /* binding */ toDegrees; }, +/* harmony export */ "toRadians": function() { return /* binding */ toRadians; }, +/* harmony export */ "modulo": function() { return /* binding */ modulo; }, +/* harmony export */ "lerp": function() { return /* binding */ lerp; } +/* harmony export */ }); +/** + * @module ol/math + */ + +/** + * Takes a number and clamps it to within the provided bounds. + * @param {number} value The input number. + * @param {number} min The minimum value to return. + * @param {number} max The maximum value to return. + * @return {number} The input number if it is within bounds, or the nearest + * number within the bounds. + */ +function clamp(value, min, max) { + return Math.min(Math.max(value, min), max); +} +/** + * Return the hyperbolic cosine of a given number. The method will use the + * native `Math.cosh` function if it is available, otherwise the hyperbolic + * cosine will be calculated via the reference implementation of the Mozilla + * developer network. + * + * @param {number} x X. + * @return {number} Hyperbolic cosine of x. + */ + +var cosh = function () { + // Wrapped in a iife, to save the overhead of checking for the native + // implementation on every invocation. + var cosh; + + if ('cosh' in Math) { + // The environment supports the native Math.cosh function, use it… + cosh = Math.cosh; + } else { + // … else, use the reference implementation of MDN: + cosh = function cosh(x) { + var y = + /** @type {Math} */ + Math.exp(x); + return (y + 1 / y) / 2; + }; + } + + return cosh; +}(); +/** + * Return the base 2 logarithm of a given number. The method will use the + * native `Math.log2` function if it is available, otherwise the base 2 + * logarithm will be calculated via the reference implementation of the + * Mozilla developer network. + * + * @param {number} x X. + * @return {number} Base 2 logarithm of x. + */ + +var log2 = function () { + // Wrapped in a iife, to save the overhead of checking for the native + // implementation on every invocation. + var log2; + + if ('log2' in Math) { + // The environment supports the native Math.log2 function, use it… + log2 = Math.log2; + } else { + // … else, use the reference implementation of MDN: + log2 = function log2(x) { + return Math.log(x) * Math.LOG2E; + }; + } + + return log2; +}(); +/** + * Returns the square of the closest distance between the point (x, y) and the + * line segment (x1, y1) to (x2, y2). + * @param {number} x X. + * @param {number} y Y. + * @param {number} x1 X1. + * @param {number} y1 Y1. + * @param {number} x2 X2. + * @param {number} y2 Y2. + * @return {number} Squared distance. + */ + +function squaredSegmentDistance(x, y, x1, y1, x2, y2) { + var dx = x2 - x1; + var dy = y2 - y1; + + if (dx !== 0 || dy !== 0) { + var t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy); + + if (t > 1) { + x1 = x2; + y1 = y2; + } else if (t > 0) { + x1 += dx * t; + y1 += dy * t; + } + } + + return squaredDistance(x, y, x1, y1); +} +/** + * Returns the square of the distance between the points (x1, y1) and (x2, y2). + * @param {number} x1 X1. + * @param {number} y1 Y1. + * @param {number} x2 X2. + * @param {number} y2 Y2. + * @return {number} Squared distance. + */ + +function squaredDistance(x1, y1, x2, y2) { + var dx = x2 - x1; + var dy = y2 - y1; + return dx * dx + dy * dy; +} +/** + * Solves system of linear equations using Gaussian elimination method. + * + * @param {Array>} mat Augmented matrix (n x n + 1 column) + * in row-major order. + * @return {Array} The resulting vector. + */ + +function solveLinearSystem(mat) { + var n = mat.length; + + for (var i = 0; i < n; i++) { + // Find max in the i-th column (ignoring i - 1 first rows) + var maxRow = i; + var maxEl = Math.abs(mat[i][i]); + + for (var r = i + 1; r < n; r++) { + var absValue = Math.abs(mat[r][i]); + + if (absValue > maxEl) { + maxEl = absValue; + maxRow = r; + } + } + + if (maxEl === 0) { + return null; // matrix is singular + } // Swap max row with i-th (current) row + + + var tmp = mat[maxRow]; + mat[maxRow] = mat[i]; + mat[i] = tmp; // Subtract the i-th row to make all the remaining rows 0 in the i-th column + + for (var j = i + 1; j < n; j++) { + var coef = -mat[j][i] / mat[i][i]; + + for (var k = i; k < n + 1; k++) { + if (i == k) { + mat[j][k] = 0; + } else { + mat[j][k] += coef * mat[i][k]; + } + } + } + } // Solve Ax=b for upper triangular matrix A (mat) + + + var x = new Array(n); + + for (var l = n - 1; l >= 0; l--) { + x[l] = mat[l][n] / mat[l][l]; + + for (var m = l - 1; m >= 0; m--) { + mat[m][n] -= mat[m][l] * x[l]; + } + } + + return x; +} +/** + * Converts radians to to degrees. + * + * @param {number} angleInRadians Angle in radians. + * @return {number} Angle in degrees. + */ + +function toDegrees(angleInRadians) { + return angleInRadians * 180 / Math.PI; +} +/** + * Converts degrees to radians. + * + * @param {number} angleInDegrees Angle in degrees. + * @return {number} Angle in radians. + */ + +function toRadians(angleInDegrees) { + return angleInDegrees * Math.PI / 180; +} +/** + * Returns the modulo of a / b, depending on the sign of b. + * + * @param {number} a Dividend. + * @param {number} b Divisor. + * @return {number} Modulo. + */ + +function modulo(a, b) { + var r = a % b; + return r * b < 0 ? r + b : r; +} +/** + * Calculates the linearly interpolated value of x between a and b. + * + * @param {number} a Number + * @param {number} b Number + * @param {number} x Value to be interpolated. + * @return {number} Interpolated value. + */ + +function lerp(a, b, x) { + return a + x * (b - a); +} + +/***/ }), +/* 10 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * @module ol/geom/GeometryType + */ + +/** + * The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`, + * `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`, + * `'GeometryCollection'`, `'Circle'`. + * @enum {string} + */ +/* harmony default export */ __webpack_exports__["default"] = ({ + POINT: 'Point', + LINE_STRING: 'LineString', + LINEAR_RING: 'LinearRing', + POLYGON: 'Polygon', + MULTI_POINT: 'MultiPoint', + MULTI_LINE_STRING: 'MultiLineString', + MULTI_POLYGON: 'MultiPolygon', + GEOMETRY_COLLECTION: 'GeometryCollection', + CIRCLE: 'Circle' +}); + +/***/ }), +/* 11 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "boundingExtent": function() { return /* binding */ boundingExtent; }, +/* harmony export */ "buffer": function() { return /* binding */ buffer; }, +/* harmony export */ "clone": function() { return /* binding */ clone; }, +/* harmony export */ "closestSquaredDistanceXY": function() { return /* binding */ closestSquaredDistanceXY; }, +/* harmony export */ "containsCoordinate": function() { return /* binding */ containsCoordinate; }, +/* harmony export */ "containsExtent": function() { return /* binding */ containsExtent; }, +/* harmony export */ "containsXY": function() { return /* binding */ containsXY; }, +/* harmony export */ "coordinateRelationship": function() { return /* binding */ coordinateRelationship; }, +/* harmony export */ "createEmpty": function() { return /* binding */ createEmpty; }, +/* harmony export */ "createOrUpdate": function() { return /* binding */ createOrUpdate; }, +/* harmony export */ "createOrUpdateEmpty": function() { return /* binding */ createOrUpdateEmpty; }, +/* harmony export */ "createOrUpdateFromCoordinate": function() { return /* binding */ createOrUpdateFromCoordinate; }, +/* harmony export */ "createOrUpdateFromCoordinates": function() { return /* binding */ createOrUpdateFromCoordinates; }, +/* harmony export */ "createOrUpdateFromFlatCoordinates": function() { return /* binding */ createOrUpdateFromFlatCoordinates; }, +/* harmony export */ "createOrUpdateFromRings": function() { return /* binding */ createOrUpdateFromRings; }, +/* harmony export */ "equals": function() { return /* binding */ equals; }, +/* harmony export */ "approximatelyEquals": function() { return /* binding */ approximatelyEquals; }, +/* harmony export */ "extend": function() { return /* binding */ extend; }, +/* harmony export */ "extendCoordinate": function() { return /* binding */ extendCoordinate; }, +/* harmony export */ "extendCoordinates": function() { return /* binding */ extendCoordinates; }, +/* harmony export */ "extendFlatCoordinates": function() { return /* binding */ extendFlatCoordinates; }, +/* harmony export */ "extendRings": function() { return /* binding */ extendRings; }, +/* harmony export */ "extendXY": function() { return /* binding */ extendXY; }, +/* harmony export */ "forEachCorner": function() { return /* binding */ forEachCorner; }, +/* harmony export */ "getArea": function() { return /* binding */ getArea; }, +/* harmony export */ "getBottomLeft": function() { return /* binding */ getBottomLeft; }, +/* harmony export */ "getBottomRight": function() { return /* binding */ getBottomRight; }, +/* harmony export */ "getCenter": function() { return /* binding */ getCenter; }, +/* harmony export */ "getCorner": function() { return /* binding */ getCorner; }, +/* harmony export */ "getEnlargedArea": function() { return /* binding */ getEnlargedArea; }, +/* harmony export */ "getForViewAndSize": function() { return /* binding */ getForViewAndSize; }, +/* harmony export */ "getHeight": function() { return /* binding */ getHeight; }, +/* harmony export */ "getIntersectionArea": function() { return /* binding */ getIntersectionArea; }, +/* harmony export */ "getIntersection": function() { return /* binding */ getIntersection; }, +/* harmony export */ "getMargin": function() { return /* binding */ getMargin; }, +/* harmony export */ "getSize": function() { return /* binding */ getSize; }, +/* harmony export */ "getTopLeft": function() { return /* binding */ getTopLeft; }, +/* harmony export */ "getTopRight": function() { return /* binding */ getTopRight; }, +/* harmony export */ "getWidth": function() { return /* binding */ getWidth; }, +/* harmony export */ "intersects": function() { return /* binding */ intersects; }, +/* harmony export */ "isEmpty": function() { return /* binding */ isEmpty; }, +/* harmony export */ "returnOrUpdate": function() { return /* binding */ returnOrUpdate; }, +/* harmony export */ "scaleFromCenter": function() { return /* binding */ scaleFromCenter; }, +/* harmony export */ "intersectsSegment": function() { return /* binding */ intersectsSegment; }, +/* harmony export */ "applyTransform": function() { return /* binding */ applyTransform; }, +/* harmony export */ "wrapX": function() { return /* binding */ wrapX; } +/* harmony export */ }); +/* harmony import */ var _extent_Corner_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13); +/* harmony import */ var _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12); +/* harmony import */ var _asserts_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14); +/** + * @module ol/extent + */ + + + +/** + * An array of numbers representing an extent: `[minx, miny, maxx, maxy]`. + * @typedef {Array} Extent + * @api + */ + +/** + * Build an extent that includes all given coordinates. + * + * @param {Array} coordinates Coordinates. + * @return {Extent} Bounding extent. + * @api + */ + +function boundingExtent(coordinates) { + var extent = createEmpty(); + + for (var i = 0, ii = coordinates.length; i < ii; ++i) { + extendCoordinate(extent, coordinates[i]); + } + + return extent; +} +/** + * @param {Array} xs Xs. + * @param {Array} ys Ys. + * @param {Extent} [opt_extent] Destination extent. + * @private + * @return {Extent} Extent. + */ + +function _boundingExtentXYs(xs, ys, opt_extent) { + var minX = Math.min.apply(null, xs); + var minY = Math.min.apply(null, ys); + var maxX = Math.max.apply(null, xs); + var maxY = Math.max.apply(null, ys); + return createOrUpdate(minX, minY, maxX, maxY, opt_extent); +} +/** + * Return extent increased by the provided value. + * @param {Extent} extent Extent. + * @param {number} value The amount by which the extent should be buffered. + * @param {Extent} [opt_extent] Extent. + * @return {Extent} Extent. + * @api + */ + + +function buffer(extent, value, opt_extent) { + if (opt_extent) { + opt_extent[0] = extent[0] - value; + opt_extent[1] = extent[1] - value; + opt_extent[2] = extent[2] + value; + opt_extent[3] = extent[3] + value; + return opt_extent; + } else { + return [extent[0] - value, extent[1] - value, extent[2] + value, extent[3] + value]; + } +} +/** + * Creates a clone of an extent. + * + * @param {Extent} extent Extent to clone. + * @param {Extent} [opt_extent] Extent. + * @return {Extent} The clone. + */ + +function clone(extent, opt_extent) { + if (opt_extent) { + opt_extent[0] = extent[0]; + opt_extent[1] = extent[1]; + opt_extent[2] = extent[2]; + opt_extent[3] = extent[3]; + return opt_extent; + } else { + return extent.slice(); + } +} +/** + * @param {Extent} extent Extent. + * @param {number} x X. + * @param {number} y Y. + * @return {number} Closest squared distance. + */ + +function closestSquaredDistanceXY(extent, x, y) { + var dx, dy; + + if (x < extent[0]) { + dx = extent[0] - x; + } else if (extent[2] < x) { + dx = x - extent[2]; + } else { + dx = 0; + } + + if (y < extent[1]) { + dy = extent[1] - y; + } else if (extent[3] < y) { + dy = y - extent[3]; + } else { + dy = 0; + } + + return dx * dx + dy * dy; +} +/** + * Check if the passed coordinate is contained or on the edge of the extent. + * + * @param {Extent} extent Extent. + * @param {import("./coordinate.js").Coordinate} coordinate Coordinate. + * @return {boolean} The coordinate is contained in the extent. + * @api + */ + +function containsCoordinate(extent, coordinate) { + return containsXY(extent, coordinate[0], coordinate[1]); +} +/** + * Check if one extent contains another. + * + * An extent is deemed contained if it lies completely within the other extent, + * including if they share one or more edges. + * + * @param {Extent} extent1 Extent 1. + * @param {Extent} extent2 Extent 2. + * @return {boolean} The second extent is contained by or on the edge of the + * first. + * @api + */ + +function containsExtent(extent1, extent2) { + return extent1[0] <= extent2[0] && extent2[2] <= extent1[2] && extent1[1] <= extent2[1] && extent2[3] <= extent1[3]; +} +/** + * Check if the passed coordinate is contained or on the edge of the extent. + * + * @param {Extent} extent Extent. + * @param {number} x X coordinate. + * @param {number} y Y coordinate. + * @return {boolean} The x, y values are contained in the extent. + * @api + */ + +function containsXY(extent, x, y) { + return extent[0] <= x && x <= extent[2] && extent[1] <= y && y <= extent[3]; +} +/** + * Get the relationship between a coordinate and extent. + * @param {Extent} extent The extent. + * @param {import("./coordinate.js").Coordinate} coordinate The coordinate. + * @return {import("./extent/Relationship.js").default} The relationship (bitwise compare with + * import("./extent/Relationship.js").Relationship). + */ + +function coordinateRelationship(extent, coordinate) { + var minX = extent[0]; + var minY = extent[1]; + var maxX = extent[2]; + var maxY = extent[3]; + var x = coordinate[0]; + var y = coordinate[1]; + var relationship = _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__["default"].UNKNOWN; + + if (x < minX) { + relationship = relationship | _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__["default"].LEFT; + } else if (x > maxX) { + relationship = relationship | _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__["default"].RIGHT; + } + + if (y < minY) { + relationship = relationship | _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__["default"].BELOW; + } else if (y > maxY) { + relationship = relationship | _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__["default"].ABOVE; + } + + if (relationship === _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__["default"].UNKNOWN) { + relationship = _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__["default"].INTERSECTING; + } + + return relationship; +} +/** + * Create an empty extent. + * @return {Extent} Empty extent. + * @api + */ + +function createEmpty() { + return [Infinity, Infinity, -Infinity, -Infinity]; +} +/** + * Create a new extent or update the provided extent. + * @param {number} minX Minimum X. + * @param {number} minY Minimum Y. + * @param {number} maxX Maximum X. + * @param {number} maxY Maximum Y. + * @param {Extent} [opt_extent] Destination extent. + * @return {Extent} Extent. + */ + +function createOrUpdate(minX, minY, maxX, maxY, opt_extent) { + if (opt_extent) { + opt_extent[0] = minX; + opt_extent[1] = minY; + opt_extent[2] = maxX; + opt_extent[3] = maxY; + return opt_extent; + } else { + return [minX, minY, maxX, maxY]; + } +} +/** + * Create a new empty extent or make the provided one empty. + * @param {Extent} [opt_extent] Extent. + * @return {Extent} Extent. + */ + +function createOrUpdateEmpty(opt_extent) { + return createOrUpdate(Infinity, Infinity, -Infinity, -Infinity, opt_extent); +} +/** + * @param {import("./coordinate.js").Coordinate} coordinate Coordinate. + * @param {Extent} [opt_extent] Extent. + * @return {Extent} Extent. + */ + +function createOrUpdateFromCoordinate(coordinate, opt_extent) { + var x = coordinate[0]; + var y = coordinate[1]; + return createOrUpdate(x, y, x, y, opt_extent); +} +/** + * @param {Array} coordinates Coordinates. + * @param {Extent} [opt_extent] Extent. + * @return {Extent} Extent. + */ + +function createOrUpdateFromCoordinates(coordinates, opt_extent) { + var extent = createOrUpdateEmpty(opt_extent); + return extendCoordinates(extent, coordinates); +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {number} end End. + * @param {number} stride Stride. + * @param {Extent} [opt_extent] Extent. + * @return {Extent} Extent. + */ + +function createOrUpdateFromFlatCoordinates(flatCoordinates, offset, end, stride, opt_extent) { + var extent = createOrUpdateEmpty(opt_extent); + return extendFlatCoordinates(extent, flatCoordinates, offset, end, stride); +} +/** + * @param {Array>} rings Rings. + * @param {Extent} [opt_extent] Extent. + * @return {Extent} Extent. + */ + +function createOrUpdateFromRings(rings, opt_extent) { + var extent = createOrUpdateEmpty(opt_extent); + return extendRings(extent, rings); +} +/** + * Determine if two extents are equivalent. + * @param {Extent} extent1 Extent 1. + * @param {Extent} extent2 Extent 2. + * @return {boolean} The two extents are equivalent. + * @api + */ + +function equals(extent1, extent2) { + return extent1[0] == extent2[0] && extent1[2] == extent2[2] && extent1[1] == extent2[1] && extent1[3] == extent2[3]; +} +/** + * Determine if two extents are approximately equivalent. + * @param {Extent} extent1 Extent 1. + * @param {Extent} extent2 Extent 2. + * @param {number} tolerance Tolerance in extent coordinate units. + * @return {boolean} The two extents differ by less than the tolerance. + */ + +function approximatelyEquals(extent1, extent2, tolerance) { + return Math.abs(extent1[0] - extent2[0]) < tolerance && Math.abs(extent1[2] - extent2[2]) < tolerance && Math.abs(extent1[1] - extent2[1]) < tolerance && Math.abs(extent1[3] - extent2[3]) < tolerance; +} +/** + * Modify an extent to include another extent. + * @param {Extent} extent1 The extent to be modified. + * @param {Extent} extent2 The extent that will be included in the first. + * @return {Extent} A reference to the first (extended) extent. + * @api + */ + +function extend(extent1, extent2) { + if (extent2[0] < extent1[0]) { + extent1[0] = extent2[0]; + } + + if (extent2[2] > extent1[2]) { + extent1[2] = extent2[2]; + } + + if (extent2[1] < extent1[1]) { + extent1[1] = extent2[1]; + } + + if (extent2[3] > extent1[3]) { + extent1[3] = extent2[3]; + } + + return extent1; +} +/** + * @param {Extent} extent Extent. + * @param {import("./coordinate.js").Coordinate} coordinate Coordinate. + */ + +function extendCoordinate(extent, coordinate) { + if (coordinate[0] < extent[0]) { + extent[0] = coordinate[0]; + } + + if (coordinate[0] > extent[2]) { + extent[2] = coordinate[0]; + } + + if (coordinate[1] < extent[1]) { + extent[1] = coordinate[1]; + } + + if (coordinate[1] > extent[3]) { + extent[3] = coordinate[1]; + } +} +/** + * @param {Extent} extent Extent. + * @param {Array} coordinates Coordinates. + * @return {Extent} Extent. + */ + +function extendCoordinates(extent, coordinates) { + for (var i = 0, ii = coordinates.length; i < ii; ++i) { + extendCoordinate(extent, coordinates[i]); + } + + return extent; +} +/** + * @param {Extent} extent Extent. + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {number} end End. + * @param {number} stride Stride. + * @return {Extent} Extent. + */ + +function extendFlatCoordinates(extent, flatCoordinates, offset, end, stride) { + for (; offset < end; offset += stride) { + extendXY(extent, flatCoordinates[offset], flatCoordinates[offset + 1]); + } + + return extent; +} +/** + * @param {Extent} extent Extent. + * @param {Array>} rings Rings. + * @return {Extent} Extent. + */ + +function extendRings(extent, rings) { + for (var i = 0, ii = rings.length; i < ii; ++i) { + extendCoordinates(extent, rings[i]); + } + + return extent; +} +/** + * @param {Extent} extent Extent. + * @param {number} x X. + * @param {number} y Y. + */ + +function extendXY(extent, x, y) { + extent[0] = Math.min(extent[0], x); + extent[1] = Math.min(extent[1], y); + extent[2] = Math.max(extent[2], x); + extent[3] = Math.max(extent[3], y); +} +/** + * This function calls `callback` for each corner of the extent. If the + * callback returns a truthy value the function returns that value + * immediately. Otherwise the function returns `false`. + * @param {Extent} extent Extent. + * @param {function(import("./coordinate.js").Coordinate): S} callback Callback. + * @return {S|boolean} Value. + * @template S + */ + +function forEachCorner(extent, callback) { + var val; + val = callback(getBottomLeft(extent)); + + if (val) { + return val; + } + + val = callback(getBottomRight(extent)); + + if (val) { + return val; + } + + val = callback(getTopRight(extent)); + + if (val) { + return val; + } + + val = callback(getTopLeft(extent)); + + if (val) { + return val; + } + + return false; +} +/** + * Get the size of an extent. + * @param {Extent} extent Extent. + * @return {number} Area. + * @api + */ + +function getArea(extent) { + var area = 0; + + if (!isEmpty(extent)) { + area = getWidth(extent) * getHeight(extent); + } + + return area; +} +/** + * Get the bottom left coordinate of an extent. + * @param {Extent} extent Extent. + * @return {import("./coordinate.js").Coordinate} Bottom left coordinate. + * @api + */ + +function getBottomLeft(extent) { + return [extent[0], extent[1]]; +} +/** + * Get the bottom right coordinate of an extent. + * @param {Extent} extent Extent. + * @return {import("./coordinate.js").Coordinate} Bottom right coordinate. + * @api + */ + +function getBottomRight(extent) { + return [extent[2], extent[1]]; +} +/** + * Get the center coordinate of an extent. + * @param {Extent} extent Extent. + * @return {import("./coordinate.js").Coordinate} Center. + * @api + */ + +function getCenter(extent) { + return [(extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2]; +} +/** + * Get a corner coordinate of an extent. + * @param {Extent} extent Extent. + * @param {import("./extent/Corner.js").default} corner Corner. + * @return {import("./coordinate.js").Coordinate} Corner coordinate. + */ + +function getCorner(extent, corner) { + var coordinate; + + if (corner === _extent_Corner_js__WEBPACK_IMPORTED_MODULE_1__["default"].BOTTOM_LEFT) { + coordinate = getBottomLeft(extent); + } else if (corner === _extent_Corner_js__WEBPACK_IMPORTED_MODULE_1__["default"].BOTTOM_RIGHT) { + coordinate = getBottomRight(extent); + } else if (corner === _extent_Corner_js__WEBPACK_IMPORTED_MODULE_1__["default"].TOP_LEFT) { + coordinate = getTopLeft(extent); + } else if (corner === _extent_Corner_js__WEBPACK_IMPORTED_MODULE_1__["default"].TOP_RIGHT) { + coordinate = getTopRight(extent); + } else { + (0,_asserts_js__WEBPACK_IMPORTED_MODULE_2__.assert)(false, 13); // Invalid corner + } + + return coordinate; +} +/** + * @param {Extent} extent1 Extent 1. + * @param {Extent} extent2 Extent 2. + * @return {number} Enlarged area. + */ + +function getEnlargedArea(extent1, extent2) { + var minX = Math.min(extent1[0], extent2[0]); + var minY = Math.min(extent1[1], extent2[1]); + var maxX = Math.max(extent1[2], extent2[2]); + var maxY = Math.max(extent1[3], extent2[3]); + return (maxX - minX) * (maxY - minY); +} +/** + * @param {import("./coordinate.js").Coordinate} center Center. + * @param {number} resolution Resolution. + * @param {number} rotation Rotation. + * @param {import("./size.js").Size} size Size. + * @param {Extent} [opt_extent] Destination extent. + * @return {Extent} Extent. + */ + +function getForViewAndSize(center, resolution, rotation, size, opt_extent) { + var dx = resolution * size[0] / 2; + var dy = resolution * size[1] / 2; + var cosRotation = Math.cos(rotation); + var sinRotation = Math.sin(rotation); + var xCos = dx * cosRotation; + var xSin = dx * sinRotation; + var yCos = dy * cosRotation; + var ySin = dy * sinRotation; + var x = center[0]; + var y = center[1]; + var x0 = x - xCos + ySin; + var x1 = x - xCos - ySin; + var x2 = x + xCos - ySin; + var x3 = x + xCos + ySin; + var y0 = y - xSin - yCos; + var y1 = y - xSin + yCos; + var y2 = y + xSin + yCos; + var y3 = y + xSin - yCos; + return createOrUpdate(Math.min(x0, x1, x2, x3), Math.min(y0, y1, y2, y3), Math.max(x0, x1, x2, x3), Math.max(y0, y1, y2, y3), opt_extent); +} +/** + * Get the height of an extent. + * @param {Extent} extent Extent. + * @return {number} Height. + * @api + */ + +function getHeight(extent) { + return extent[3] - extent[1]; +} +/** + * @param {Extent} extent1 Extent 1. + * @param {Extent} extent2 Extent 2. + * @return {number} Intersection area. + */ + +function getIntersectionArea(extent1, extent2) { + var intersection = getIntersection(extent1, extent2); + return getArea(intersection); +} +/** + * Get the intersection of two extents. + * @param {Extent} extent1 Extent 1. + * @param {Extent} extent2 Extent 2. + * @param {Extent} [opt_extent] Optional extent to populate with intersection. + * @return {Extent} Intersecting extent. + * @api + */ + +function getIntersection(extent1, extent2, opt_extent) { + var intersection = opt_extent ? opt_extent : createEmpty(); + + if (intersects(extent1, extent2)) { + if (extent1[0] > extent2[0]) { + intersection[0] = extent1[0]; + } else { + intersection[0] = extent2[0]; + } + + if (extent1[1] > extent2[1]) { + intersection[1] = extent1[1]; + } else { + intersection[1] = extent2[1]; + } + + if (extent1[2] < extent2[2]) { + intersection[2] = extent1[2]; + } else { + intersection[2] = extent2[2]; + } + + if (extent1[3] < extent2[3]) { + intersection[3] = extent1[3]; + } else { + intersection[3] = extent2[3]; + } + } else { + createOrUpdateEmpty(intersection); + } + + return intersection; +} +/** + * @param {Extent} extent Extent. + * @return {number} Margin. + */ + +function getMargin(extent) { + return getWidth(extent) + getHeight(extent); +} +/** + * Get the size (width, height) of an extent. + * @param {Extent} extent The extent. + * @return {import("./size.js").Size} The extent size. + * @api + */ + +function getSize(extent) { + return [extent[2] - extent[0], extent[3] - extent[1]]; +} +/** + * Get the top left coordinate of an extent. + * @param {Extent} extent Extent. + * @return {import("./coordinate.js").Coordinate} Top left coordinate. + * @api + */ + +function getTopLeft(extent) { + return [extent[0], extent[3]]; +} +/** + * Get the top right coordinate of an extent. + * @param {Extent} extent Extent. + * @return {import("./coordinate.js").Coordinate} Top right coordinate. + * @api + */ + +function getTopRight(extent) { + return [extent[2], extent[3]]; +} +/** + * Get the width of an extent. + * @param {Extent} extent Extent. + * @return {number} Width. + * @api + */ + +function getWidth(extent) { + return extent[2] - extent[0]; +} +/** + * Determine if one extent intersects another. + * @param {Extent} extent1 Extent 1. + * @param {Extent} extent2 Extent. + * @return {boolean} The two extents intersect. + * @api + */ + +function intersects(extent1, extent2) { + return extent1[0] <= extent2[2] && extent1[2] >= extent2[0] && extent1[1] <= extent2[3] && extent1[3] >= extent2[1]; +} +/** + * Determine if an extent is empty. + * @param {Extent} extent Extent. + * @return {boolean} Is empty. + * @api + */ + +function isEmpty(extent) { + return extent[2] < extent[0] || extent[3] < extent[1]; +} +/** + * @param {Extent} extent Extent. + * @param {Extent} [opt_extent] Extent. + * @return {Extent} Extent. + */ + +function returnOrUpdate(extent, opt_extent) { + if (opt_extent) { + opt_extent[0] = extent[0]; + opt_extent[1] = extent[1]; + opt_extent[2] = extent[2]; + opt_extent[3] = extent[3]; + return opt_extent; + } else { + return extent; + } +} +/** + * @param {Extent} extent Extent. + * @param {number} value Value. + */ + +function scaleFromCenter(extent, value) { + var deltaX = (extent[2] - extent[0]) / 2 * (value - 1); + var deltaY = (extent[3] - extent[1]) / 2 * (value - 1); + extent[0] -= deltaX; + extent[2] += deltaX; + extent[1] -= deltaY; + extent[3] += deltaY; +} +/** + * Determine if the segment between two coordinates intersects (crosses, + * touches, or is contained by) the provided extent. + * @param {Extent} extent The extent. + * @param {import("./coordinate.js").Coordinate} start Segment start coordinate. + * @param {import("./coordinate.js").Coordinate} end Segment end coordinate. + * @return {boolean} The segment intersects the extent. + */ + +function intersectsSegment(extent, start, end) { + var intersects = false; + var startRel = coordinateRelationship(extent, start); + var endRel = coordinateRelationship(extent, end); + + if (startRel === _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__["default"].INTERSECTING || endRel === _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__["default"].INTERSECTING) { + intersects = true; + } else { + var minX = extent[0]; + var minY = extent[1]; + var maxX = extent[2]; + var maxY = extent[3]; + var startX = start[0]; + var startY = start[1]; + var endX = end[0]; + var endY = end[1]; + var slope = (endY - startY) / (endX - startX); + var x = void 0, + y = void 0; + + if (!!(endRel & _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__["default"].ABOVE) && !(startRel & _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__["default"].ABOVE)) { + // potentially intersects top + x = endX - (endY - maxY) / slope; + intersects = x >= minX && x <= maxX; + } + + if (!intersects && !!(endRel & _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__["default"].RIGHT) && !(startRel & _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__["default"].RIGHT)) { + // potentially intersects right + y = endY - (endX - maxX) * slope; + intersects = y >= minY && y <= maxY; + } + + if (!intersects && !!(endRel & _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__["default"].BELOW) && !(startRel & _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__["default"].BELOW)) { + // potentially intersects bottom + x = endX - (endY - minY) / slope; + intersects = x >= minX && x <= maxX; + } + + if (!intersects && !!(endRel & _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__["default"].LEFT) && !(startRel & _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_0__["default"].LEFT)) { + // potentially intersects left + y = endY - (endX - minX) * slope; + intersects = y >= minY && y <= maxY; + } + } + + return intersects; +} +/** + * Apply a transform function to the extent. + * @param {Extent} extent Extent. + * @param {import("./proj.js").TransformFunction} transformFn Transform function. + * Called with `[minX, minY, maxX, maxY]` extent coordinates. + * @param {Extent} [opt_extent] Destination extent. + * @param {number} [opt_stops] Number of stops per side used for the transform. + * By default only the corners are used. + * @return {Extent} Extent. + * @api + */ + +function applyTransform(extent, transformFn, opt_extent, opt_stops) { + var coordinates = []; + + if (opt_stops > 1) { + var width = extent[2] - extent[0]; + var height = extent[3] - extent[1]; + + for (var i = 0; i < opt_stops; ++i) { + coordinates.push(extent[0] + width * i / opt_stops, extent[1], extent[2], extent[1] + height * i / opt_stops, extent[2] - width * i / opt_stops, extent[3], extent[0], extent[3] - height * i / opt_stops); + } + } else { + coordinates = [extent[0], extent[1], extent[2], extent[1], extent[2], extent[3], extent[0], extent[3]]; + } + + transformFn(coordinates, coordinates, 2); + var xs = []; + var ys = []; + + for (var i = 0, l = coordinates.length; i < l; i += 2) { + xs.push(coordinates[i]); + ys.push(coordinates[i + 1]); + } + + return _boundingExtentXYs(xs, ys, opt_extent); +} +/** + * Modifies the provided extent in-place to be within the real world + * extent. + * + * @param {Extent} extent Extent. + * @param {import("./proj/Projection.js").default} projection Projection + * @return {Extent} The extent within the real world extent. + */ + +function wrapX(extent, projection) { + var projectionExtent = projection.getExtent(); + var center = getCenter(extent); + + if (projection.canWrapX() && (center[0] < projectionExtent[0] || center[0] >= projectionExtent[2])) { + var worldWidth = getWidth(projectionExtent); + var worldsAway = Math.floor((center[0] - projectionExtent[0]) / worldWidth); + var offset = worldsAway * worldWidth; + extent[0] -= offset; + extent[2] -= offset; + } + + return extent; +} + +/***/ }), +/* 12 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * @module ol/extent/Relationship + */ + +/** + * Relationship to an extent. + * @enum {number} + */ +/* harmony default export */ __webpack_exports__["default"] = ({ + UNKNOWN: 0, + INTERSECTING: 1, + ABOVE: 2, + RIGHT: 4, + BELOW: 8, + LEFT: 16 +}); + +/***/ }), +/* 13 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * @module ol/extent/Corner + */ + +/** + * Extent corner. + * @enum {string} + */ +/* harmony default export */ __webpack_exports__["default"] = ({ + BOTTOM_LEFT: 'bottom-left', + BOTTOM_RIGHT: 'bottom-right', + TOP_LEFT: 'top-left', + TOP_RIGHT: 'top-right' +}); + +/***/ }), +/* 14 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "assert": function() { return /* binding */ assert; } +/* harmony export */ }); +/* harmony import */ var _AssertionError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15); +/** + * @module ol/asserts + */ + +/** + * @param {*} assertion Assertion we expected to be truthy. + * @param {number} errorCode Error code. + */ + +function assert(assertion, errorCode) { + if (!assertion) { + throw new _AssertionError_js__WEBPACK_IMPORTED_MODULE_0__["default"](errorCode); + } +} + +/***/ }), +/* 15 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/AssertionError + */ + + + +/** + * Error object thrown when an assertion failed. This is an ECMA-262 Error, + * extended with a `code` property. + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error. + */ + +var AssertionError = +/** @class */ +function (_super) { + __extends(AssertionError, _super); + /** + * @param {number} code Error code. + */ + + + function AssertionError(code) { + var _this = this; + + var path = _util_js__WEBPACK_IMPORTED_MODULE_0__.VERSION === 'latest' ? _util_js__WEBPACK_IMPORTED_MODULE_0__.VERSION : 'v' + _util_js__WEBPACK_IMPORTED_MODULE_0__.VERSION.split('-')[0]; + var message = 'Assertion failed. See https://openlayers.org/en/' + path + '/doc/errors/#' + code + ' for details.'; + _this = _super.call(this, message) || this; + /** + * Error code. The meaning of the code can be found on + * https://openlayers.org/en/latest/doc/errors/ (replace `latest` with + * the version found in the OpenLayers script's header comment if a version + * other than the latest is used). + * @type {number} + * @api + */ + + _this.code = code; + /** + * @type {string} + */ + + _this.name = 'AssertionError'; // Re-assign message, see https://github.com/Rich-Harris/buble/issues/40 + + _this.message = message; + return _this; + } + + return AssertionError; +}(Error); + +/* harmony default export */ __webpack_exports__["default"] = (AssertionError); + +/***/ }), +/* 16 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "abstract": function() { return /* binding */ abstract; }, +/* harmony export */ "getUid": function() { return /* binding */ getUid; }, +/* harmony export */ "VERSION": function() { return /* binding */ VERSION; } +/* harmony export */ }); +/** + * @module ol/util + */ + +/** + * @return {?} Any return. + */ +function abstract() { + return ( + /** @type {?} */ + function () { + throw new Error('Unimplemented abstract method.'); + }() + ); +} +/** + * Counter for getUid. + * @type {number} + * @private + */ + +var uidCounter_ = 0; +/** + * Gets a unique ID for an object. This mutates the object so that further calls + * with the same object as a parameter returns the same value. Unique IDs are generated + * as a strictly increasing sequence. Adapted from goog.getUid. + * + * @param {Object} obj The object to get the unique ID for. + * @return {string} The unique ID for the object. + * @api + */ + +function getUid(obj) { + return obj.ol_uid || (obj.ol_uid = String(++uidCounter_)); +} +/** + * OpenLayers version. + * @type {string} + */ + +var VERSION = '6.9.0'; + +/***/ }), +/* 17 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "add": function() { return /* binding */ add; }, +/* harmony export */ "closestOnCircle": function() { return /* binding */ closestOnCircle; }, +/* harmony export */ "closestOnSegment": function() { return /* binding */ closestOnSegment; }, +/* harmony export */ "createStringXY": function() { return /* binding */ createStringXY; }, +/* harmony export */ "degreesToStringHDMS": function() { return /* binding */ degreesToStringHDMS; }, +/* harmony export */ "format": function() { return /* binding */ format; }, +/* harmony export */ "equals": function() { return /* binding */ equals; }, +/* harmony export */ "rotate": function() { return /* binding */ rotate; }, +/* harmony export */ "scale": function() { return /* binding */ scale; }, +/* harmony export */ "squaredDistance": function() { return /* binding */ squaredDistance; }, +/* harmony export */ "distance": function() { return /* binding */ distance; }, +/* harmony export */ "squaredDistanceToSegment": function() { return /* binding */ squaredDistanceToSegment; }, +/* harmony export */ "toStringHDMS": function() { return /* binding */ toStringHDMS; }, +/* harmony export */ "toStringXY": function() { return /* binding */ toStringXY; }, +/* harmony export */ "wrapX": function() { return /* binding */ wrapX; }, +/* harmony export */ "getWorldsAway": function() { return /* binding */ getWorldsAway; } +/* harmony export */ }); +/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9); +/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18); +/** + * @module ol/coordinate + */ + + + +/** + * An array of numbers representing an xy coordinate. Example: `[16, 48]`. + * @typedef {Array} Coordinate + * @api + */ + +/** + * A function that takes a {@link module:ol/coordinate~Coordinate} and + * transforms it into a `{string}`. + * + * @typedef {function((Coordinate|undefined)): string} CoordinateFormat + * @api + */ + +/** + * Add `delta` to `coordinate`. `coordinate` is modified in place and returned + * by the function. + * + * Example: + * + * import {add} from 'ol/coordinate'; + * + * var coord = [7.85, 47.983333]; + * add(coord, [-2, 4]); + * // coord is now [5.85, 51.983333] + * + * @param {Coordinate} coordinate Coordinate. + * @param {Coordinate} delta Delta. + * @return {Coordinate} The input coordinate adjusted by + * the given delta. + * @api + */ + +function add(coordinate, delta) { + coordinate[0] += +delta[0]; + coordinate[1] += +delta[1]; + return coordinate; +} +/** + * Calculates the point closest to the passed coordinate on the passed circle. + * + * @param {Coordinate} coordinate The coordinate. + * @param {import("./geom/Circle.js").default} circle The circle. + * @return {Coordinate} Closest point on the circumference. + */ + +function closestOnCircle(coordinate, circle) { + var r = circle.getRadius(); + var center = circle.getCenter(); + var x0 = center[0]; + var y0 = center[1]; + var x1 = coordinate[0]; + var y1 = coordinate[1]; + var dx = x1 - x0; + var dy = y1 - y0; + + if (dx === 0 && dy === 0) { + dx = 1; + } + + var d = Math.sqrt(dx * dx + dy * dy); + var x = x0 + r * dx / d; + var y = y0 + r * dy / d; + return [x, y]; +} +/** + * Calculates the point closest to the passed coordinate on the passed segment. + * This is the foot of the perpendicular of the coordinate to the segment when + * the foot is on the segment, or the closest segment coordinate when the foot + * is outside the segment. + * + * @param {Coordinate} coordinate The coordinate. + * @param {Array} segment The two coordinates + * of the segment. + * @return {Coordinate} The foot of the perpendicular of + * the coordinate to the segment. + */ + +function closestOnSegment(coordinate, segment) { + var x0 = coordinate[0]; + var y0 = coordinate[1]; + var start = segment[0]; + var end = segment[1]; + var x1 = start[0]; + var y1 = start[1]; + var x2 = end[0]; + var y2 = end[1]; + var dx = x2 - x1; + var dy = y2 - y1; + var along = dx === 0 && dy === 0 ? 0 : (dx * (x0 - x1) + dy * (y0 - y1)) / (dx * dx + dy * dy || 0); + var x, y; + + if (along <= 0) { + x = x1; + y = y1; + } else if (along >= 1) { + x = x2; + y = y2; + } else { + x = x1 + along * dx; + y = y1 + along * dy; + } + + return [x, y]; +} +/** + * Returns a {@link module:ol/coordinate~CoordinateFormat} function that can be + * used to format + * a {Coordinate} to a string. + * + * Example without specifying the fractional digits: + * + * import {createStringXY} from 'ol/coordinate'; + * + * var coord = [7.85, 47.983333]; + * var stringifyFunc = createStringXY(); + * var out = stringifyFunc(coord); + * // out is now '8, 48' + * + * Example with explicitly specifying 2 fractional digits: + * + * import {createStringXY} from 'ol/coordinate'; + * + * var coord = [7.85, 47.983333]; + * var stringifyFunc = createStringXY(2); + * var out = stringifyFunc(coord); + * // out is now '7.85, 47.98' + * + * @param {number} [opt_fractionDigits] The number of digits to include + * after the decimal point. Default is `0`. + * @return {CoordinateFormat} Coordinate format. + * @api + */ + +function createStringXY(opt_fractionDigits) { + return ( + /** + * @param {Coordinate} coordinate Coordinate. + * @return {string} String XY. + */ + function (coordinate) { + return toStringXY(coordinate, opt_fractionDigits); + } + ); +} +/** + * @param {string} hemispheres Hemispheres. + * @param {number} degrees Degrees. + * @param {number} [opt_fractionDigits] The number of digits to include + * after the decimal point. Default is `0`. + * @return {string} String. + */ + +function degreesToStringHDMS(hemispheres, degrees, opt_fractionDigits) { + var normalizedDegrees = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.modulo)(degrees + 180, 360) - 180; + var x = Math.abs(3600 * normalizedDegrees); + var dflPrecision = opt_fractionDigits || 0; + var precision = Math.pow(10, dflPrecision); + var deg = Math.floor(x / 3600); + var min = Math.floor((x - deg * 3600) / 60); + var sec = x - deg * 3600 - min * 60; + sec = Math.ceil(sec * precision) / precision; + + if (sec >= 60) { + sec = 0; + min += 1; + } + + if (min >= 60) { + min = 0; + deg += 1; + } + + return deg + "\xB0 " + (0,_string_js__WEBPACK_IMPORTED_MODULE_1__.padNumber)(min, 2) + "\u2032 " + (0,_string_js__WEBPACK_IMPORTED_MODULE_1__.padNumber)(sec, 2, dflPrecision) + "\u2033" + (normalizedDegrees == 0 ? '' : ' ' + hemispheres.charAt(normalizedDegrees < 0 ? 1 : 0)); +} +/** + * Transforms the given {@link module:ol/coordinate~Coordinate} to a string + * using the given string template. The strings `{x}` and `{y}` in the template + * will be replaced with the first and second coordinate values respectively. + * + * Example without specifying the fractional digits: + * + * import {format} from 'ol/coordinate'; + * + * var coord = [7.85, 47.983333]; + * var template = 'Coordinate is ({x}|{y}).'; + * var out = format(coord, template); + * // out is now 'Coordinate is (8|48).' + * + * Example explicitly specifying the fractional digits: + * + * import {format} from 'ol/coordinate'; + * + * var coord = [7.85, 47.983333]; + * var template = 'Coordinate is ({x}|{y}).'; + * var out = format(coord, template, 2); + * // out is now 'Coordinate is (7.85|47.98).' + * + * @param {Coordinate} coordinate Coordinate. + * @param {string} template A template string with `{x}` and `{y}` placeholders + * that will be replaced by first and second coordinate values. + * @param {number} [opt_fractionDigits] The number of digits to include + * after the decimal point. Default is `0`. + * @return {string} Formatted coordinate. + * @api + */ + +function format(coordinate, template, opt_fractionDigits) { + if (coordinate) { + return template.replace('{x}', coordinate[0].toFixed(opt_fractionDigits)).replace('{y}', coordinate[1].toFixed(opt_fractionDigits)); + } else { + return ''; + } +} +/** + * @param {Coordinate} coordinate1 First coordinate. + * @param {Coordinate} coordinate2 Second coordinate. + * @return {boolean} The two coordinates are equal. + */ + +function equals(coordinate1, coordinate2) { + var equals = true; + + for (var i = coordinate1.length - 1; i >= 0; --i) { + if (coordinate1[i] != coordinate2[i]) { + equals = false; + break; + } + } + + return equals; +} +/** + * Rotate `coordinate` by `angle`. `coordinate` is modified in place and + * returned by the function. + * + * Example: + * + * import {rotate} from 'ol/coordinate'; + * + * var coord = [7.85, 47.983333]; + * var rotateRadians = Math.PI / 2; // 90 degrees + * rotate(coord, rotateRadians); + * // coord is now [-47.983333, 7.85] + * + * @param {Coordinate} coordinate Coordinate. + * @param {number} angle Angle in radian. + * @return {Coordinate} Coordinate. + * @api + */ + +function rotate(coordinate, angle) { + var cosAngle = Math.cos(angle); + var sinAngle = Math.sin(angle); + var x = coordinate[0] * cosAngle - coordinate[1] * sinAngle; + var y = coordinate[1] * cosAngle + coordinate[0] * sinAngle; + coordinate[0] = x; + coordinate[1] = y; + return coordinate; +} +/** + * Scale `coordinate` by `scale`. `coordinate` is modified in place and returned + * by the function. + * + * Example: + * + * import {scale as scaleCoordinate} from 'ol/coordinate'; + * + * var coord = [7.85, 47.983333]; + * var scale = 1.2; + * scaleCoordinate(coord, scale); + * // coord is now [9.42, 57.5799996] + * + * @param {Coordinate} coordinate Coordinate. + * @param {number} scale Scale factor. + * @return {Coordinate} Coordinate. + */ + +function scale(coordinate, scale) { + coordinate[0] *= scale; + coordinate[1] *= scale; + return coordinate; +} +/** + * @param {Coordinate} coord1 First coordinate. + * @param {Coordinate} coord2 Second coordinate. + * @return {number} Squared distance between coord1 and coord2. + */ + +function squaredDistance(coord1, coord2) { + var dx = coord1[0] - coord2[0]; + var dy = coord1[1] - coord2[1]; + return dx * dx + dy * dy; +} +/** + * @param {Coordinate} coord1 First coordinate. + * @param {Coordinate} coord2 Second coordinate. + * @return {number} Distance between coord1 and coord2. + */ + +function distance(coord1, coord2) { + return Math.sqrt(squaredDistance(coord1, coord2)); +} +/** + * Calculate the squared distance from a coordinate to a line segment. + * + * @param {Coordinate} coordinate Coordinate of the point. + * @param {Array} segment Line segment (2 + * coordinates). + * @return {number} Squared distance from the point to the line segment. + */ + +function squaredDistanceToSegment(coordinate, segment) { + return squaredDistance(coordinate, closestOnSegment(coordinate, segment)); +} +/** + * Format a geographic coordinate with the hemisphere, degrees, minutes, and + * seconds. + * + * Example without specifying fractional digits: + * + * import {toStringHDMS} from 'ol/coordinate'; + * + * var coord = [7.85, 47.983333]; + * var out = toStringHDMS(coord); + * // out is now '47° 58′ 60″ N 7° 50′ 60″ E' + * + * Example explicitly specifying 1 fractional digit: + * + * import {toStringHDMS} from 'ol/coordinate'; + * + * var coord = [7.85, 47.983333]; + * var out = toStringHDMS(coord, 1); + * // out is now '47° 58′ 60.0″ N 7° 50′ 60.0″ E' + * + * @param {Coordinate} coordinate Coordinate. + * @param {number} [opt_fractionDigits] The number of digits to include + * after the decimal point. Default is `0`. + * @return {string} Hemisphere, degrees, minutes and seconds. + * @api + */ + +function toStringHDMS(coordinate, opt_fractionDigits) { + if (coordinate) { + return degreesToStringHDMS('NS', coordinate[1], opt_fractionDigits) + ' ' + degreesToStringHDMS('EW', coordinate[0], opt_fractionDigits); + } else { + return ''; + } +} +/** + * Format a coordinate as a comma delimited string. + * + * Example without specifying fractional digits: + * + * import {toStringXY} from 'ol/coordinate'; + * + * var coord = [7.85, 47.983333]; + * var out = toStringXY(coord); + * // out is now '8, 48' + * + * Example explicitly specifying 1 fractional digit: + * + * import {toStringXY} from 'ol/coordinate'; + * + * var coord = [7.85, 47.983333]; + * var out = toStringXY(coord, 1); + * // out is now '7.8, 48.0' + * + * @param {Coordinate} coordinate Coordinate. + * @param {number} [opt_fractionDigits] The number of digits to include + * after the decimal point. Default is `0`. + * @return {string} XY. + * @api + */ + +function toStringXY(coordinate, opt_fractionDigits) { + return format(coordinate, '{x}, {y}', opt_fractionDigits); +} +/** + * Modifies the provided coordinate in-place to be within the real world + * extent. The lower projection extent boundary is inclusive, the upper one + * exclusive. + * + * @param {Coordinate} coordinate Coordinate. + * @param {import("./proj/Projection.js").default} projection Projection. + * @return {Coordinate} The coordinate within the real world extent. + */ + +function wrapX(coordinate, projection) { + if (projection.canWrapX()) { + var worldWidth = (0,_extent_js__WEBPACK_IMPORTED_MODULE_2__.getWidth)(projection.getExtent()); + var worldsAway = getWorldsAway(coordinate, projection, worldWidth); + + if (worldsAway) { + coordinate[0] -= worldsAway * worldWidth; + } + } + + return coordinate; +} +/** + * @param {Coordinate} coordinate Coordinate. + * @param {import("./proj/Projection.js").default} projection Projection. + * @param {number} [opt_sourceExtentWidth] Width of the source extent. + * @return {number} Offset in world widths. + */ + +function getWorldsAway(coordinate, projection, opt_sourceExtentWidth) { + var projectionExtent = projection.getExtent(); + var worldsAway = 0; + + if (projection.canWrapX() && (coordinate[0] < projectionExtent[0] || coordinate[0] > projectionExtent[2])) { + var sourceExtentWidth = opt_sourceExtentWidth || (0,_extent_js__WEBPACK_IMPORTED_MODULE_2__.getWidth)(projectionExtent); + worldsAway = Math.floor((coordinate[0] - projectionExtent[0]) / sourceExtentWidth); + } + + return worldsAway; +} + +/***/ }), +/* 18 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "padNumber": function() { return /* binding */ padNumber; }, +/* harmony export */ "compareVersions": function() { return /* binding */ compareVersions; } +/* harmony export */ }); +/** + * @module ol/string + */ + +/** + * @param {number} number Number to be formatted + * @param {number} width The desired width + * @param {number} [opt_precision] Precision of the output string (i.e. number of decimal places) + * @return {string} Formatted string + */ +function padNumber(number, width, opt_precision) { + var numberString = opt_precision !== undefined ? number.toFixed(opt_precision) : '' + number; + var decimal = numberString.indexOf('.'); + decimal = decimal === -1 ? numberString.length : decimal; + return decimal > width ? numberString : new Array(1 + width - decimal).join('0') + numberString; +} +/** + * Adapted from https://github.com/omichelsen/compare-versions/blob/master/index.js + * @param {string|number} v1 First version + * @param {string|number} v2 Second version + * @return {number} Value + */ + +function compareVersions(v1, v2) { + var s1 = ('' + v1).split('.'); + var s2 = ('' + v2).split('.'); + + for (var i = 0; i < Math.max(s1.length, s2.length); i++) { + var n1 = parseInt(s1[i] || '0', 10); + var n2 = parseInt(s2[i] || '0', 10); + + if (n1 > n2) { + return 1; + } + + if (n2 > n1) { + return -1; + } + } + + return 0; +} + +/***/ }), +/* 19 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "RADIUS": function() { return /* binding */ RADIUS; }, +/* harmony export */ "HALF_SIZE": function() { return /* binding */ HALF_SIZE; }, +/* harmony export */ "EXTENT": function() { return /* binding */ EXTENT; }, +/* harmony export */ "WORLD_EXTENT": function() { return /* binding */ WORLD_EXTENT; }, +/* harmony export */ "MAX_SAFE_Y": function() { return /* binding */ MAX_SAFE_Y; }, +/* harmony export */ "PROJECTIONS": function() { return /* binding */ PROJECTIONS; }, +/* harmony export */ "fromEPSG4326": function() { return /* binding */ fromEPSG4326; }, +/* harmony export */ "toEPSG4326": function() { return /* binding */ toEPSG4326; } +/* harmony export */ }); +/* harmony import */ var _Projection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4); +/* harmony import */ var _Units_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/proj/epsg3857 + */ + + + + + +/** + * Radius of WGS84 sphere + * + * @const + * @type {number} + */ + +var RADIUS = 6378137; +/** + * @const + * @type {number} + */ + +var HALF_SIZE = Math.PI * RADIUS; +/** + * @const + * @type {import("../extent.js").Extent} + */ + +var EXTENT = [-HALF_SIZE, -HALF_SIZE, HALF_SIZE, HALF_SIZE]; +/** + * @const + * @type {import("../extent.js").Extent} + */ + +var WORLD_EXTENT = [-180, -85, 180, 85]; +/** + * Maximum safe value in y direction + * @const + * @type {number} + */ + +var MAX_SAFE_Y = RADIUS * Math.log(Math.tan(Math.PI / 2)); +/** + * @classdesc + * Projection object for web/spherical Mercator (EPSG:3857). + */ + +var EPSG3857Projection = +/** @class */ +function (_super) { + __extends(EPSG3857Projection, _super); + /** + * @param {string} code Code. + */ + + + function EPSG3857Projection(code) { + return _super.call(this, { + code: code, + units: _Units_js__WEBPACK_IMPORTED_MODULE_0__["default"].METERS, + extent: EXTENT, + global: true, + worldExtent: WORLD_EXTENT, + getPointResolution: function getPointResolution(resolution, point) { + return resolution / (0,_math_js__WEBPACK_IMPORTED_MODULE_1__.cosh)(point[1] / RADIUS); + } + }) || this; + } + + return EPSG3857Projection; +}(_Projection_js__WEBPACK_IMPORTED_MODULE_2__["default"]); +/** + * Projections equal to EPSG:3857. + * + * @const + * @type {Array} + */ + + +var PROJECTIONS = [new EPSG3857Projection('EPSG:3857'), new EPSG3857Projection('EPSG:102100'), new EPSG3857Projection('EPSG:102113'), new EPSG3857Projection('EPSG:900913'), new EPSG3857Projection('http://www.opengis.net/def/crs/EPSG/0/3857'), new EPSG3857Projection('http://www.opengis.net/gml/srs/epsg.xml#3857')]; +/** + * Transformation from EPSG:4326 to EPSG:3857. + * + * @param {Array} input Input array of coordinate values. + * @param {Array} [opt_output] Output array of coordinate values. + * @param {number} [opt_dimension] Dimension (default is `2`). + * @return {Array} Output array of coordinate values. + */ + +function fromEPSG4326(input, opt_output, opt_dimension) { + var length = input.length; + var dimension = opt_dimension > 1 ? opt_dimension : 2; + var output = opt_output; + + if (output === undefined) { + if (dimension > 2) { + // preserve values beyond second dimension + output = input.slice(); + } else { + output = new Array(length); + } + } + + for (var i = 0; i < length; i += dimension) { + output[i] = HALF_SIZE * input[i] / 180; + var y = RADIUS * Math.log(Math.tan(Math.PI * (+input[i + 1] + 90) / 360)); + + if (y > MAX_SAFE_Y) { + y = MAX_SAFE_Y; + } else if (y < -MAX_SAFE_Y) { + y = -MAX_SAFE_Y; + } + + output[i + 1] = y; + } + + return output; +} +/** + * Transformation from EPSG:3857 to EPSG:4326. + * + * @param {Array} input Input array of coordinate values. + * @param {Array} [opt_output] Output array of coordinate values. + * @param {number} [opt_dimension] Dimension (default is `2`). + * @return {Array} Output array of coordinate values. + */ + +function toEPSG4326(input, opt_output, opt_dimension) { + var length = input.length; + var dimension = opt_dimension > 1 ? opt_dimension : 2; + var output = opt_output; + + if (output === undefined) { + if (dimension > 2) { + // preserve values beyond second dimension + output = input.slice(); + } else { + output = new Array(length); + } + } + + for (var i = 0; i < length; i += dimension) { + output[i] = 180 * input[i] / HALF_SIZE; + output[i + 1] = 360 * Math.atan(Math.exp(input[i + 1] / RADIUS)) / Math.PI - 90; + } + + return output; +} + +/***/ }), +/* 20 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "RADIUS": function() { return /* binding */ RADIUS; }, +/* harmony export */ "EXTENT": function() { return /* binding */ EXTENT; }, +/* harmony export */ "METERS_PER_UNIT": function() { return /* binding */ METERS_PER_UNIT; }, +/* harmony export */ "PROJECTIONS": function() { return /* binding */ PROJECTIONS; } +/* harmony export */ }); +/* harmony import */ var _Projection_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4); +/* harmony import */ var _Units_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/proj/epsg4326 + */ + + + + +/** + * Semi-major radius of the WGS84 ellipsoid. + * + * @const + * @type {number} + */ + +var RADIUS = 6378137; +/** + * Extent of the EPSG:4326 projection which is the whole world. + * + * @const + * @type {import("../extent.js").Extent} + */ + +var EXTENT = [-180, -90, 180, 90]; +/** + * @const + * @type {number} + */ + +var METERS_PER_UNIT = Math.PI * RADIUS / 180; +/** + * @classdesc + * Projection object for WGS84 geographic coordinates (EPSG:4326). + * + * Note that OpenLayers does not strictly comply with the EPSG definition. + * The EPSG registry defines 4326 as a CRS for Latitude,Longitude (y,x). + * OpenLayers treats EPSG:4326 as a pseudo-projection, with x,y coordinates. + */ + +var EPSG4326Projection = +/** @class */ +function (_super) { + __extends(EPSG4326Projection, _super); + /** + * @param {string} code Code. + * @param {string} [opt_axisOrientation] Axis orientation. + */ + + + function EPSG4326Projection(code, opt_axisOrientation) { + return _super.call(this, { + code: code, + units: _Units_js__WEBPACK_IMPORTED_MODULE_0__["default"].DEGREES, + extent: EXTENT, + axisOrientation: opt_axisOrientation, + global: true, + metersPerUnit: METERS_PER_UNIT, + worldExtent: EXTENT + }) || this; + } + + return EPSG4326Projection; +}(_Projection_js__WEBPACK_IMPORTED_MODULE_1__["default"]); +/** + * Projections equal to EPSG:4326. + * + * @const + * @type {Array} + */ + + +var PROJECTIONS = [new EPSG4326Projection('CRS:84'), new EPSG4326Projection('EPSG:4326', 'neu'), new EPSG4326Projection('urn:ogc:def:crs:OGC:1.3:CRS84'), new EPSG4326Projection('urn:ogc:def:crs:OGC:2:84'), new EPSG4326Projection('http://www.opengis.net/def/crs/OGC/1.3/CRS84', 'neu'), new EPSG4326Projection('http://www.opengis.net/gml/srs/epsg.xml#4326', 'neu'), new EPSG4326Projection('http://www.opengis.net/def/crs/EPSG/0/4326', 'neu')]; + +/***/ }), +/* 21 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "CollectionEvent": function() { return /* binding */ CollectionEvent; } +/* harmony export */ }); +/* harmony import */ var _AssertionError_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(15); +/* harmony import */ var _Object_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(24); +/* harmony import */ var _CollectionEventType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23); +/* harmony import */ var _events_Event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/Collection + */ + + + + + + +/** + * @enum {string} + * @private + */ + +var Property = { + LENGTH: 'length' +}; +/** + * @classdesc + * Events emitted by {@link module:ol/Collection~Collection} instances are instances of this + * type. + */ + +var CollectionEvent = +/** @class */ +function (_super) { + __extends(CollectionEvent, _super); + /** + * @param {import("./CollectionEventType.js").default} type Type. + * @param {*} [opt_element] Element. + * @param {number} [opt_index] The index of the added or removed element. + */ + + + function CollectionEvent(type, opt_element, opt_index) { + var _this = _super.call(this, type) || this; + /** + * The element that is added to or removed from the collection. + * @type {*} + * @api + */ + + + _this.element = opt_element; + /** + * The index of the added or removed element. + * @type {number} + * @api + */ + + _this.index = opt_index; + return _this; + } + + return CollectionEvent; +}(_events_Event_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + + +/*** + * @template Return + * @typedef {import("./Observable").OnSignature & + * import("./Observable").OnSignature & + * import("./Observable").OnSignature<'add'|'remove', CollectionEvent, Return> & + * import("./Observable").CombinedOnSignature} CollectionOnSignature + */ + +/** + * @typedef {Object} Options + * @property {boolean} [unique=false] Disallow the same item from being added to + * the collection twice. + */ + +/** + * @classdesc + * An expanded version of standard JS Array, adding convenience methods for + * manipulation. Add and remove changes to the Collection trigger a Collection + * event. Note that this does not cover changes to the objects _within_ the + * Collection; they trigger events on the appropriate object, not on the + * Collection as a whole. + * + * @fires CollectionEvent + * + * @template T + * @api + */ + +var Collection = +/** @class */ +function (_super) { + __extends(Collection, _super); + /** + * @param {Array} [opt_array] Array. + * @param {Options} [opt_options] Collection options. + */ + + + function Collection(opt_array, opt_options) { + var _this = _super.call(this) || this; + /*** + * @type {CollectionOnSignature} + */ + + + _this.on; + /*** + * @type {CollectionOnSignature} + */ + + _this.once; + /*** + * @type {CollectionOnSignature} + */ + + _this.un; + var options = opt_options || {}; + /** + * @private + * @type {boolean} + */ + + _this.unique_ = !!options.unique; + /** + * @private + * @type {!Array} + */ + + _this.array_ = opt_array ? opt_array : []; + + if (_this.unique_) { + for (var i = 0, ii = _this.array_.length; i < ii; ++i) { + _this.assertUnique_(_this.array_[i], i); + } + } + + _this.updateLength_(); + + return _this; + } + /** + * Remove all elements from the collection. + * @api + */ + + + Collection.prototype.clear = function () { + while (this.getLength() > 0) { + this.pop(); + } + }; + /** + * Add elements to the collection. This pushes each item in the provided array + * to the end of the collection. + * @param {!Array} arr Array. + * @return {Collection} This collection. + * @api + */ + + + Collection.prototype.extend = function (arr) { + for (var i = 0, ii = arr.length; i < ii; ++i) { + this.push(arr[i]); + } + + return this; + }; + /** + * Iterate over each element, calling the provided callback. + * @param {function(T, number, Array): *} f The function to call + * for every element. This function takes 3 arguments (the element, the + * index and the array). The return value is ignored. + * @api + */ + + + Collection.prototype.forEach = function (f) { + var array = this.array_; + + for (var i = 0, ii = array.length; i < ii; ++i) { + f(array[i], i, array); + } + }; + /** + * Get a reference to the underlying Array object. Warning: if the array + * is mutated, no events will be dispatched by the collection, and the + * collection's "length" property won't be in sync with the actual length + * of the array. + * @return {!Array} Array. + * @api + */ + + + Collection.prototype.getArray = function () { + return this.array_; + }; + /** + * Get the element at the provided index. + * @param {number} index Index. + * @return {T} Element. + * @api + */ + + + Collection.prototype.item = function (index) { + return this.array_[index]; + }; + /** + * Get the length of this collection. + * @return {number} The length of the array. + * @observable + * @api + */ + + + Collection.prototype.getLength = function () { + return this.get(Property.LENGTH); + }; + /** + * Insert an element at the provided index. + * @param {number} index Index. + * @param {T} elem Element. + * @api + */ + + + Collection.prototype.insertAt = function (index, elem) { + if (this.unique_) { + this.assertUnique_(elem); + } + + this.array_.splice(index, 0, elem); + this.updateLength_(); + this.dispatchEvent(new CollectionEvent(_CollectionEventType_js__WEBPACK_IMPORTED_MODULE_1__["default"].ADD, elem, index)); + }; + /** + * Remove the last element of the collection and return it. + * Return `undefined` if the collection is empty. + * @return {T|undefined} Element. + * @api + */ + + + Collection.prototype.pop = function () { + return this.removeAt(this.getLength() - 1); + }; + /** + * Insert the provided element at the end of the collection. + * @param {T} elem Element. + * @return {number} New length of the collection. + * @api + */ + + + Collection.prototype.push = function (elem) { + if (this.unique_) { + this.assertUnique_(elem); + } + + var n = this.getLength(); + this.insertAt(n, elem); + return this.getLength(); + }; + /** + * Remove the first occurrence of an element from the collection. + * @param {T} elem Element. + * @return {T|undefined} The removed element or undefined if none found. + * @api + */ + + + Collection.prototype.remove = function (elem) { + var arr = this.array_; + + for (var i = 0, ii = arr.length; i < ii; ++i) { + if (arr[i] === elem) { + return this.removeAt(i); + } + } + + return undefined; + }; + /** + * Remove the element at the provided index and return it. + * Return `undefined` if the collection does not contain this index. + * @param {number} index Index. + * @return {T|undefined} Value. + * @api + */ + + + Collection.prototype.removeAt = function (index) { + var prev = this.array_[index]; + this.array_.splice(index, 1); + this.updateLength_(); + this.dispatchEvent(new CollectionEvent(_CollectionEventType_js__WEBPACK_IMPORTED_MODULE_1__["default"].REMOVE, prev, index)); + return prev; + }; + /** + * Set the element at the provided index. + * @param {number} index Index. + * @param {T} elem Element. + * @api + */ + + + Collection.prototype.setAt = function (index, elem) { + var n = this.getLength(); + + if (index < n) { + if (this.unique_) { + this.assertUnique_(elem, index); + } + + var prev = this.array_[index]; + this.array_[index] = elem; + this.dispatchEvent(new CollectionEvent(_CollectionEventType_js__WEBPACK_IMPORTED_MODULE_1__["default"].REMOVE, prev, index)); + this.dispatchEvent(new CollectionEvent(_CollectionEventType_js__WEBPACK_IMPORTED_MODULE_1__["default"].ADD, elem, index)); + } else { + for (var j = n; j < index; ++j) { + this.insertAt(j, undefined); + } + + this.insertAt(index, elem); + } + }; + /** + * @private + */ + + + Collection.prototype.updateLength_ = function () { + this.set(Property.LENGTH, this.array_.length); + }; + /** + * @private + * @param {T} elem Element. + * @param {number} [opt_except] Optional index to ignore. + */ + + + Collection.prototype.assertUnique_ = function (elem, opt_except) { + for (var i = 0, ii = this.array_.length; i < ii; ++i) { + if (this.array_[i] === elem && i !== opt_except) { + throw new _AssertionError_js__WEBPACK_IMPORTED_MODULE_2__["default"](58); + } + } + }; + + return Collection; +}(_Object_js__WEBPACK_IMPORTED_MODULE_3__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (Collection); + +/***/ }), +/* 22 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "stopPropagation": function() { return /* binding */ stopPropagation; }, +/* harmony export */ "preventDefault": function() { return /* binding */ preventDefault; } +/* harmony export */ }); +/** + * @module ol/events/Event + */ + +/** + * @classdesc + * Stripped down implementation of the W3C DOM Level 2 Event interface. + * See https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-interface. + * + * This implementation only provides `type` and `target` properties, and + * `stopPropagation` and `preventDefault` methods. It is meant as base class + * for higher level events defined in the library, and works with + * {@link module:ol/events/Target~Target}. + */ +var BaseEvent = +/** @class */ +function () { + /** + * @param {string} type Type. + */ + function BaseEvent(type) { + /** + * @type {boolean} + */ + this.propagationStopped; + /** + * @type {boolean} + */ + + this.defaultPrevented; + /** + * The event type. + * @type {string} + * @api + */ + + this.type = type; + /** + * The event target. + * @type {Object} + * @api + */ + + this.target = null; + } + /** + * Prevent default. This means that no emulated `click`, `singleclick` or `doubleclick` events + * will be fired. + * @api + */ + + + BaseEvent.prototype.preventDefault = function () { + this.defaultPrevented = true; + }; + /** + * Stop event propagation. + * @api + */ + + + BaseEvent.prototype.stopPropagation = function () { + this.propagationStopped = true; + }; + + return BaseEvent; +}(); +/** + * @param {Event|import("./Event.js").default} evt Event + */ + + +function stopPropagation(evt) { + evt.stopPropagation(); +} +/** + * @param {Event|import("./Event.js").default} evt Event + */ + +function preventDefault(evt) { + evt.preventDefault(); +} +/* harmony default export */ __webpack_exports__["default"] = (BaseEvent); + +/***/ }), +/* 23 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * @module ol/CollectionEventType + */ + +/** + * @enum {string} + */ +/* harmony default export */ __webpack_exports__["default"] = ({ + /** + * Triggered when an item is added to the collection. + * @event module:ol/Collection.CollectionEvent#add + * @api + */ + ADD: 'add', + + /** + * Triggered when an item is removed from the collection. + * @event module:ol/Collection.CollectionEvent#remove + * @api + */ + REMOVE: 'remove' +}); + +/***/ }), +/* 24 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "ObjectEvent": function() { return /* binding */ ObjectEvent; } +/* harmony export */ }); +/* harmony import */ var _events_Event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22); +/* harmony import */ var _ObjectEventType_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25); +/* harmony import */ var _Observable_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(26); +/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7); +/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/Object + */ + + + + + + + +/** + * @classdesc + * Events emitted by {@link module:ol/Object~BaseObject} instances are instances of this type. + */ + +var ObjectEvent = +/** @class */ +function (_super) { + __extends(ObjectEvent, _super); + /** + * @param {string} type The event type. + * @param {string} key The property name. + * @param {*} oldValue The old value for `key`. + */ + + + function ObjectEvent(type, key, oldValue) { + var _this = _super.call(this, type) || this; + /** + * The name of the property whose value is changing. + * @type {string} + * @api + */ + + + _this.key = key; + /** + * The old value. To get the new value use `e.target.get(e.key)` where + * `e` is the event object. + * @type {*} + * @api + */ + + _this.oldValue = oldValue; + return _this; + } + + return ObjectEvent; +}(_events_Event_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + + +/*** + * @template Return + * @typedef {import("./Observable").OnSignature & + * import("./Observable").OnSignature & + * import("./Observable").CombinedOnSignature} ObjectOnSignature + */ + +/** + * @classdesc + * Abstract base class; normally only used for creating subclasses and not + * instantiated in apps. + * Most non-trivial classes inherit from this. + * + * This extends {@link module:ol/Observable} with observable + * properties, where each property is observable as well as the object as a + * whole. + * + * Classes that inherit from this have pre-defined properties, to which you can + * add your owns. The pre-defined properties are listed in this documentation as + * 'Observable Properties', and have their own accessors; for example, + * {@link module:ol/Map~Map} has a `target` property, accessed with + * `getTarget()` and changed with `setTarget()`. Not all properties are however + * settable. There are also general-purpose accessors `get()` and `set()`. For + * example, `get('target')` is equivalent to `getTarget()`. + * + * The `set` accessors trigger a change event, and you can monitor this by + * registering a listener. For example, {@link module:ol/View~View} has a + * `center` property, so `view.on('change:center', function(evt) {...});` would + * call the function whenever the value of the center property changes. Within + * the function, `evt.target` would be the view, so `evt.target.getCenter()` + * would return the new center. + * + * You can add your own observable properties with + * `object.set('prop', 'value')`, and retrieve that with `object.get('prop')`. + * You can listen for changes on that property value with + * `object.on('change:prop', listener)`. You can get a list of all + * properties with {@link module:ol/Object~BaseObject#getProperties}. + * + * Note that the observable properties are separate from standard JS properties. + * You can, for example, give your map object a title with + * `map.title='New title'` and with `map.set('title', 'Another title')`. The + * first will be a `hasOwnProperty`; the second will appear in + * `getProperties()`. Only the second is observable. + * + * Properties can be deleted by using the unset method. E.g. + * object.unset('foo'). + * + * @fires ObjectEvent + * @api + */ + +var BaseObject = +/** @class */ +function (_super) { + __extends(BaseObject, _super); + /** + * @param {Object} [opt_values] An object with key-value pairs. + */ + + + function BaseObject(opt_values) { + var _this = _super.call(this) || this; + /*** + * @type {ObjectOnSignature} + */ + + + _this.on; + /*** + * @type {ObjectOnSignature} + */ + + _this.once; + /*** + * @type {ObjectOnSignature} + */ + + _this.un; // Call {@link module:ol/util.getUid} to ensure that the order of objects' ids is + // the same as the order in which they were created. This also helps to + // ensure that object properties are always added in the same order, which + // helps many JavaScript engines generate faster code. + + (0,_util_js__WEBPACK_IMPORTED_MODULE_1__.getUid)(_this); + /** + * @private + * @type {Object} + */ + + _this.values_ = null; + + if (opt_values !== undefined) { + _this.setProperties(opt_values); + } + + return _this; + } + /** + * Gets a value. + * @param {string} key Key name. + * @return {*} Value. + * @api + */ + + + BaseObject.prototype.get = function (key) { + var value; + + if (this.values_ && this.values_.hasOwnProperty(key)) { + value = this.values_[key]; + } + + return value; + }; + /** + * Get a list of object property names. + * @return {Array} List of property names. + * @api + */ + + + BaseObject.prototype.getKeys = function () { + return this.values_ && Object.keys(this.values_) || []; + }; + /** + * Get an object of all property names and values. + * @return {Object} Object. + * @api + */ + + + BaseObject.prototype.getProperties = function () { + return this.values_ && (0,_obj_js__WEBPACK_IMPORTED_MODULE_2__.assign)({}, this.values_) || {}; + }; + /** + * @return {boolean} The object has properties. + */ + + + BaseObject.prototype.hasProperties = function () { + return !!this.values_; + }; + /** + * @param {string} key Key name. + * @param {*} oldValue Old value. + */ + + + BaseObject.prototype.notify = function (key, oldValue) { + var eventType; + eventType = "change:" + key; + this.dispatchEvent(new ObjectEvent(eventType, key, oldValue)); + eventType = _ObjectEventType_js__WEBPACK_IMPORTED_MODULE_3__["default"].PROPERTYCHANGE; + this.dispatchEvent(new ObjectEvent(eventType, key, oldValue)); + }; + /** + * @param {string} key Key name. + * @param {import("./events.js").Listener} listener Listener. + */ + + + BaseObject.prototype.addChangeListener = function (key, listener) { + this.addEventListener("change:" + key, listener); + }; + /** + * @param {string} key Key name. + * @param {import("./events.js").Listener} listener Listener. + */ + + + BaseObject.prototype.removeChangeListener = function (key, listener) { + this.removeEventListener("change:" + key, listener); + }; + /** + * Sets a value. + * @param {string} key Key name. + * @param {*} value Value. + * @param {boolean} [opt_silent] Update without triggering an event. + * @api + */ + + + BaseObject.prototype.set = function (key, value, opt_silent) { + var values = this.values_ || (this.values_ = {}); + + if (opt_silent) { + values[key] = value; + } else { + var oldValue = values[key]; + values[key] = value; + + if (oldValue !== value) { + this.notify(key, oldValue); + } + } + }; + /** + * Sets a collection of key-value pairs. Note that this changes any existing + * properties and adds new ones (it does not remove any existing properties). + * @param {Object} values Values. + * @param {boolean} [opt_silent] Update without triggering an event. + * @api + */ + + + BaseObject.prototype.setProperties = function (values, opt_silent) { + for (var key in values) { + this.set(key, values[key], opt_silent); + } + }; + /** + * Apply any properties from another object without triggering events. + * @param {BaseObject} source The source object. + * @protected + */ + + + BaseObject.prototype.applyProperties = function (source) { + if (!source.values_) { + return; + } + + (0,_obj_js__WEBPACK_IMPORTED_MODULE_2__.assign)(this.values_ || (this.values_ = {}), source.values_); + }; + /** + * Unsets a property. + * @param {string} key Key name. + * @param {boolean} [opt_silent] Unset without triggering an event. + * @api + */ + + + BaseObject.prototype.unset = function (key, opt_silent) { + if (this.values_ && key in this.values_) { + var oldValue = this.values_[key]; + delete this.values_[key]; + + if ((0,_obj_js__WEBPACK_IMPORTED_MODULE_2__.isEmpty)(this.values_)) { + this.values_ = null; + } + + if (!opt_silent) { + this.notify(key, oldValue); + } + } + }; + + return BaseObject; +}(_Observable_js__WEBPACK_IMPORTED_MODULE_4__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (BaseObject); + +/***/ }), +/* 25 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * @module ol/ObjectEventType + */ + +/** + * @enum {string} + */ +/* harmony default export */ __webpack_exports__["default"] = ({ + /** + * Triggered when a property is changed. + * @event module:ol/Object.ObjectEvent#propertychange + * @api + */ + PROPERTYCHANGE: 'propertychange' +}); +/** + * @typedef {'propertychange'} Types + */ + +/***/ }), +/* 26 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "unByKey": function() { return /* binding */ unByKey; } +/* harmony export */ }); +/* harmony import */ var _events_Target_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29); +/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27); +/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/Observable + */ + + + + + +/*** + * @template {string} Type + * @template {Event|import("./events/Event.js").default} EventClass + * @template Return + * @typedef {(type: Type, listener: (event: EventClass) => ?) => Return} OnSignature + */ + +/*** + * @template {string} Type + * @template Return + * @typedef {(type: Type[], listener: (event: Event|import("./events/Event").default) => ?) => Return extends void ? void : Return[]} CombinedOnSignature + */ + +/** + * @typedef {'change'|'error'} EventTypes + */ + +/*** + * @template Return + * @typedef {OnSignature & CombinedOnSignature} ObservableOnSignature + */ + +/** + * @classdesc + * Abstract base class; normally only used for creating subclasses and not + * instantiated in apps. + * An event target providing convenient methods for listener registration + * and unregistration. A generic `change` event is always available through + * {@link module:ol/Observable~Observable#changed}. + * + * @fires import("./events/Event.js").default + * @api + */ + +var Observable = +/** @class */ +function (_super) { + __extends(Observable, _super); + + function Observable() { + var _this = _super.call(this) || this; + + _this.on = + /** @type {ObservableOnSignature} */ + _this.onInternal; + _this.once = + /** @type {ObservableOnSignature} */ + _this.onceInternal; + _this.un = + /** @type {ObservableOnSignature} */ + _this.unInternal; + /** + * @private + * @type {number} + */ + + _this.revision_ = 0; + return _this; + } + /** + * Increases the revision counter and dispatches a 'change' event. + * @api + */ + + + Observable.prototype.changed = function () { + ++this.revision_; + this.dispatchEvent(_events_EventType_js__WEBPACK_IMPORTED_MODULE_0__["default"].CHANGE); + }; + /** + * Get the version number for this object. Each time the object is modified, + * its version number will be incremented. + * @return {number} Revision. + * @api + */ + + + Observable.prototype.getRevision = function () { + return this.revision_; + }; + /** + * @param {string|Array} type Type. + * @param {function((Event|import("./events/Event").default)): ?} listener Listener. + * @return {import("./events.js").EventsKey|Array} Event key. + * @protected + */ + + + Observable.prototype.onInternal = function (type, listener) { + if (Array.isArray(type)) { + var len = type.length; + var keys = new Array(len); + + for (var i = 0; i < len; ++i) { + keys[i] = (0,_events_js__WEBPACK_IMPORTED_MODULE_1__.listen)(this, type[i], listener); + } + + return keys; + } else { + return (0,_events_js__WEBPACK_IMPORTED_MODULE_1__.listen)(this, + /** @type {string} */ + type, listener); + } + }; + /** + * @param {string|Array} type Type. + * @param {function((Event|import("./events/Event").default)): ?} listener Listener. + * @return {import("./events.js").EventsKey|Array} Event key. + * @protected + */ + + + Observable.prototype.onceInternal = function (type, listener) { + var key; + + if (Array.isArray(type)) { + var len = type.length; + key = new Array(len); + + for (var i = 0; i < len; ++i) { + key[i] = (0,_events_js__WEBPACK_IMPORTED_MODULE_1__.listenOnce)(this, type[i], listener); + } + } else { + key = (0,_events_js__WEBPACK_IMPORTED_MODULE_1__.listenOnce)(this, + /** @type {string} */ + type, listener); + } + /** @type {Object} */ + + + listener.ol_key = key; + return key; + }; + /** + * Unlisten for a certain type of event. + * @param {string|Array} type Type. + * @param {function((Event|import("./events/Event").default)): ?} listener Listener. + * @protected + */ + + + Observable.prototype.unInternal = function (type, listener) { + var key = + /** @type {Object} */ + listener.ol_key; + + if (key) { + unByKey(key); + } else if (Array.isArray(type)) { + for (var i = 0, ii = type.length; i < ii; ++i) { + this.removeEventListener(type[i], listener); + } + } else { + this.removeEventListener(type, listener); + } + }; + + return Observable; +}(_events_Target_js__WEBPACK_IMPORTED_MODULE_2__["default"]); +/** + * Listen for a certain type of event. + * @function + * @param {string|Array} type The event type or array of event types. + * @param {function((Event|import("./events/Event").default)): ?} listener The listener function. + * @return {import("./events.js").EventsKey|Array} Unique key for the listener. If + * called with an array of event types as the first argument, the return + * will be an array of keys. + * @api + */ + + +Observable.prototype.on; +/** + * Listen once for a certain type of event. + * @function + * @param {string|Array} type The event type or array of event types. + * @param {function((Event|import("./events/Event").default)): ?} listener The listener function. + * @return {import("./events.js").EventsKey|Array} Unique key for the listener. If + * called with an array of event types as the first argument, the return + * will be an array of keys. + * @api + */ + +Observable.prototype.once; +/** + * Unlisten for a certain type of event. + * @function + * @param {string|Array} type The event type or array of event types. + * @param {function((Event|import("./events/Event").default)): ?} listener The listener function. + * @api + */ + +Observable.prototype.un; +/** + * Removes an event listener using the key returned by `on()` or `once()`. + * @param {import("./events.js").EventsKey|Array} key The key returned by `on()` + * or `once()` (or an array of keys). + * @api + */ + +function unByKey(key) { + if (Array.isArray(key)) { + for (var i = 0, ii = key.length; i < ii; ++i) { + (0,_events_js__WEBPACK_IMPORTED_MODULE_1__.unlistenByKey)(key[i]); + } + } else { + (0,_events_js__WEBPACK_IMPORTED_MODULE_1__.unlistenByKey)( + /** @type {import("./events.js").EventsKey} */ + key); + } +} +/* harmony default export */ __webpack_exports__["default"] = (Observable); + +/***/ }), +/* 27 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * @module ol/events/EventType + */ + +/** + * @enum {string} + * @const + */ +/* harmony default export */ __webpack_exports__["default"] = ({ + /** + * Generic change event. Triggered when the revision counter is increased. + * @event module:ol/events/Event~BaseEvent#change + * @api + */ + CHANGE: 'change', + + /** + * Generic error event. Triggered when an error occurs. + * @event module:ol/events/Event~BaseEvent#error + * @api + */ + ERROR: 'error', + BLUR: 'blur', + CLEAR: 'clear', + CONTEXTMENU: 'contextmenu', + CLICK: 'click', + DBLCLICK: 'dblclick', + DRAGENTER: 'dragenter', + DRAGOVER: 'dragover', + DROP: 'drop', + FOCUS: 'focus', + KEYDOWN: 'keydown', + KEYPRESS: 'keypress', + LOAD: 'load', + RESIZE: 'resize', + TOUCHMOVE: 'touchmove', + WHEEL: 'wheel' +}); + +/***/ }), +/* 28 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "listen": function() { return /* binding */ listen; }, +/* harmony export */ "listenOnce": function() { return /* binding */ listenOnce; }, +/* harmony export */ "unlistenByKey": function() { return /* binding */ unlistenByKey; } +/* harmony export */ }); +/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7); +/** + * @module ol/events + */ + +/** + * Key to use with {@link module:ol/Observable~Observable#unByKey}. + * @typedef {Object} EventsKey + * @property {ListenerFunction} listener Listener. + * @property {import("./events/Target.js").EventTargetLike} target Target. + * @property {string} type Type. + * @api + */ + +/** + * Listener function. This function is called with an event object as argument. + * When the function returns `false`, event propagation will stop. + * + * @typedef {function((Event|import("./events/Event.js").default)): (void|boolean)} ListenerFunction + * @api + */ + +/** + * @typedef {Object} ListenerObject + * @property {ListenerFunction} handleEvent HandleEvent listener function. + */ + +/** + * @typedef {ListenerFunction|ListenerObject} Listener + */ + +/** + * Registers an event listener on an event target. Inspired by + * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html + * + * This function efficiently binds a `listener` to a `this` object, and returns + * a key for use with {@link module:ol/events.unlistenByKey}. + * + * @param {import("./events/Target.js").EventTargetLike} target Event target. + * @param {string} type Event type. + * @param {ListenerFunction} listener Listener. + * @param {Object} [opt_this] Object referenced by the `this` keyword in the + * listener. Default is the `target`. + * @param {boolean} [opt_once] If true, add the listener as one-off listener. + * @return {EventsKey} Unique key for the listener. + */ + +function listen(target, type, _listener, opt_this, opt_once) { + if (opt_this && opt_this !== target) { + _listener = _listener.bind(opt_this); + } + + if (opt_once) { + var originalListener_1 = _listener; + + _listener = function listener() { + target.removeEventListener(type, _listener); + originalListener_1.apply(this, arguments); + }; + } + + var eventsKey = { + target: target, + type: type, + listener: _listener + }; + target.addEventListener(type, _listener); + return eventsKey; +} +/** + * Registers a one-off event listener on an event target. Inspired by + * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html + * + * This function efficiently binds a `listener` as self-unregistering listener + * to a `this` object, and returns a key for use with + * {@link module:ol/events.unlistenByKey} in case the listener needs to be + * unregistered before it is called. + * + * When {@link module:ol/events.listen} is called with the same arguments after this + * function, the self-unregistering listener will be turned into a permanent + * listener. + * + * @param {import("./events/Target.js").EventTargetLike} target Event target. + * @param {string} type Event type. + * @param {ListenerFunction} listener Listener. + * @param {Object} [opt_this] Object referenced by the `this` keyword in the + * listener. Default is the `target`. + * @return {EventsKey} Key for unlistenByKey. + */ + +function listenOnce(target, type, listener, opt_this) { + return listen(target, type, listener, opt_this, true); +} +/** + * Unregisters event listeners on an event target. Inspired by + * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html + * + * The argument passed to this function is the key returned from + * {@link module:ol/events.listen} or {@link module:ol/events.listenOnce}. + * + * @param {EventsKey} key The key. + */ + +function unlistenByKey(key) { + if (key && key.target) { + key.target.removeEventListener(key.type, key.listener); + (0,_obj_js__WEBPACK_IMPORTED_MODULE_0__.clear)(key); + } +} + +/***/ }), +/* 29 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Disposable_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(32); +/* harmony import */ var _Event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22); +/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30); +/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/events/Target + */ + + + + + + +/** + * @typedef {EventTarget|Target} EventTargetLike + */ + +/** + * @classdesc + * A simplified implementation of the W3C DOM Level 2 EventTarget interface. + * See https://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-EventTarget. + * + * There are two important simplifications compared to the specification: + * + * 1. The handling of `useCapture` in `addEventListener` and + * `removeEventListener`. There is no real capture model. + * 2. The handling of `stopPropagation` and `preventDefault` on `dispatchEvent`. + * There is no event target hierarchy. When a listener calls + * `stopPropagation` or `preventDefault` on an event object, it means that no + * more listeners after this one will be called. Same as when the listener + * returns false. + */ + +var Target = +/** @class */ +function (_super) { + __extends(Target, _super); + /** + * @param {*} [opt_target] Default event target for dispatched events. + */ + + + function Target(opt_target) { + var _this = _super.call(this) || this; + /** + * @private + * @type {*} + */ + + + _this.eventTarget_ = opt_target; + /** + * @private + * @type {Object} + */ + + _this.pendingRemovals_ = null; + /** + * @private + * @type {Object} + */ + + _this.dispatching_ = null; + /** + * @private + * @type {Object>} + */ + + _this.listeners_ = null; + return _this; + } + /** + * @param {string} type Type. + * @param {import("../events.js").Listener} listener Listener. + */ + + + Target.prototype.addEventListener = function (type, listener) { + if (!type || !listener) { + return; + } + + var listeners = this.listeners_ || (this.listeners_ = {}); + var listenersForType = listeners[type] || (listeners[type] = []); + + if (listenersForType.indexOf(listener) === -1) { + listenersForType.push(listener); + } + }; + /** + * Dispatches an event and calls all listeners listening for events + * of this type. The event parameter can either be a string or an + * Object with a `type` property. + * + * @param {import("./Event.js").default|string} event Event object. + * @return {boolean|undefined} `false` if anyone called preventDefault on the + * event object or if any of the listeners returned false. + * @api + */ + + + Target.prototype.dispatchEvent = function (event) { + /** @type {import("./Event.js").default|Event} */ + var evt = typeof event === 'string' ? new _Event_js__WEBPACK_IMPORTED_MODULE_0__["default"](event) : event; + var type = evt.type; + + if (!evt.target) { + evt.target = this.eventTarget_ || this; + } + + var listeners = this.listeners_ && this.listeners_[type]; + var propagate; + + if (listeners) { + var dispatching = this.dispatching_ || (this.dispatching_ = {}); + var pendingRemovals = this.pendingRemovals_ || (this.pendingRemovals_ = {}); + + if (!(type in dispatching)) { + dispatching[type] = 0; + pendingRemovals[type] = 0; + } + + ++dispatching[type]; + + for (var i = 0, ii = listeners.length; i < ii; ++i) { + if ('handleEvent' in listeners[i]) { + propagate = + /** @type {import("../events.js").ListenerObject} */ + listeners[i].handleEvent(evt); + } else { + propagate = + /** @type {import("../events.js").ListenerFunction} */ + listeners[i].call(this, evt); + } + + if (propagate === false || evt.propagationStopped) { + propagate = false; + break; + } + } + + --dispatching[type]; + + if (dispatching[type] === 0) { + var pr = pendingRemovals[type]; + delete pendingRemovals[type]; + + while (pr--) { + this.removeEventListener(type, _functions_js__WEBPACK_IMPORTED_MODULE_1__.VOID); + } + + delete dispatching[type]; + } + + return propagate; + } + }; + /** + * Clean up. + */ + + + Target.prototype.disposeInternal = function () { + this.listeners_ && (0,_obj_js__WEBPACK_IMPORTED_MODULE_2__.clear)(this.listeners_); + }; + /** + * Get the listeners for a specified event type. Listeners are returned in the + * order that they will be called in. + * + * @param {string} type Type. + * @return {Array|undefined} Listeners. + */ + + + Target.prototype.getListeners = function (type) { + return this.listeners_ && this.listeners_[type] || undefined; + }; + /** + * @param {string} [opt_type] Type. If not provided, + * `true` will be returned if this event target has any listeners. + * @return {boolean} Has listeners. + */ + + + Target.prototype.hasListener = function (opt_type) { + if (!this.listeners_) { + return false; + } + + return opt_type ? opt_type in this.listeners_ : Object.keys(this.listeners_).length > 0; + }; + /** + * @param {string} type Type. + * @param {import("../events.js").Listener} listener Listener. + */ + + + Target.prototype.removeEventListener = function (type, listener) { + var listeners = this.listeners_ && this.listeners_[type]; + + if (listeners) { + var index = listeners.indexOf(listener); + + if (index !== -1) { + if (this.pendingRemovals_ && type in this.pendingRemovals_) { + // make listener a no-op, and remove later in #dispatchEvent() + listeners[index] = _functions_js__WEBPACK_IMPORTED_MODULE_1__.VOID; + ++this.pendingRemovals_[type]; + } else { + listeners.splice(index, 1); + + if (listeners.length === 0) { + delete this.listeners_[type]; + } + } + } + } + }; + + return Target; +}(_Disposable_js__WEBPACK_IMPORTED_MODULE_3__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (Target); + +/***/ }), +/* 30 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "TRUE": function() { return /* binding */ TRUE; }, +/* harmony export */ "FALSE": function() { return /* binding */ FALSE; }, +/* harmony export */ "VOID": function() { return /* binding */ VOID; }, +/* harmony export */ "memoizeOne": function() { return /* binding */ memoizeOne; } +/* harmony export */ }); +/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(31); +/** + * @module ol/functions + */ + +/** + * Always returns true. + * @return {boolean} true. + */ + +function TRUE() { + return true; +} +/** + * Always returns false. + * @return {boolean} false. + */ + +function FALSE() { + return false; +} +/** + * A reusable function, used e.g. as a default for callbacks. + * + * @return {void} Nothing. + */ + +function VOID() {} +/** + * Wrap a function in another function that remembers the last return. If the + * returned function is called twice in a row with the same arguments and the same + * this object, it will return the value from the first call in the second call. + * + * @param {function(...any): ReturnType} fn The function to memoize. + * @return {function(...any): ReturnType} The memoized function. + * @template ReturnType + */ + +function memoizeOne(fn) { + var called = false; + /** @type {ReturnType} */ + + var lastResult; + /** @type {Array} */ + + var lastArgs; + var lastThis; + return function () { + var nextArgs = Array.prototype.slice.call(arguments); + + if (!called || this !== lastThis || !(0,_array_js__WEBPACK_IMPORTED_MODULE_0__.equals)(nextArgs, lastArgs)) { + called = true; + lastThis = this; + lastArgs = nextArgs; + lastResult = fn.apply(this, arguments); + } + + return lastResult; + }; +} + +/***/ }), +/* 31 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "binarySearch": function() { return /* binding */ binarySearch; }, +/* harmony export */ "numberSafeCompareFunction": function() { return /* binding */ numberSafeCompareFunction; }, +/* harmony export */ "includes": function() { return /* binding */ includes; }, +/* harmony export */ "linearFindNearest": function() { return /* binding */ linearFindNearest; }, +/* harmony export */ "reverseSubArray": function() { return /* binding */ reverseSubArray; }, +/* harmony export */ "extend": function() { return /* binding */ extend; }, +/* harmony export */ "remove": function() { return /* binding */ remove; }, +/* harmony export */ "find": function() { return /* binding */ find; }, +/* harmony export */ "equals": function() { return /* binding */ equals; }, +/* harmony export */ "stableSort": function() { return /* binding */ stableSort; }, +/* harmony export */ "findIndex": function() { return /* binding */ findIndex; }, +/* harmony export */ "isSorted": function() { return /* binding */ isSorted; } +/* harmony export */ }); +/** + * @module ol/array + */ + +/** + * 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. + * https://github.com/darkskyapp/binary-search + * + * @param {Array<*>} haystack Items to search through. + * @param {*} needle The item to look for. + * @param {Function} [opt_comparator] Comparator function. + * @return {number} The index of the item if found, -1 if not. + */ +function binarySearch(haystack, needle, opt_comparator) { + var mid, cmp; + var comparator = opt_comparator || numberSafeCompareFunction; + var low = 0; + var high = haystack.length; + var found = false; + + while (low < high) { + /* Note that "(low + high) >>> 1" may overflow, and results in a typecast + * to double (which gives the wrong results). */ + mid = low + (high - low >> 1); + cmp = +comparator(haystack[mid], needle); + + if (cmp < 0.0) { + /* Too low. */ + low = mid + 1; + } else { + /* Key found or too high */ + high = mid; + found = !cmp; + } + } + /* Key not found. */ + + + return found ? low : ~low; +} +/** + * Compare function for array sort that is safe for numbers. + * @param {*} a The first object to be compared. + * @param {*} b The second object to be compared. + * @return {number} A negative number, zero, or a positive number as the first + * argument is less than, equal to, or greater than the second. + */ + +function numberSafeCompareFunction(a, b) { + return a > b ? 1 : a < b ? -1 : 0; +} +/** + * Whether the array contains the given object. + * @param {Array<*>} arr The array to test for the presence of the element. + * @param {*} obj The object for which to test. + * @return {boolean} The object is in the array. + */ + +function includes(arr, obj) { + return arr.indexOf(obj) >= 0; +} +/** + * {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution} can use a function + * of this type to determine which nearest resolution to use. + * + * This function takes a `{number}` representing a value between two array entries, + * a `{number}` representing the value of the nearest higher entry and + * a `{number}` representing the value of the nearest lower entry + * as arguments and returns a `{number}`. If a negative number or zero is returned + * the lower value will be used, if a positive number is returned the higher value + * will be used. + * @typedef {function(number, number, number): number} NearestDirectionFunction + * @api + */ + +/** + * @param {Array} arr Array in descending order. + * @param {number} target Target. + * @param {number|NearestDirectionFunction} direction + * 0 means return the nearest, + * > 0 means return the largest nearest, + * < 0 means return the smallest nearest. + * @return {number} Index. + */ + +function linearFindNearest(arr, target, direction) { + var n = arr.length; + + if (arr[0] <= target) { + return 0; + } else if (target <= arr[n - 1]) { + return n - 1; + } else { + var i = void 0; + + if (direction > 0) { + for (i = 1; i < n; ++i) { + if (arr[i] < target) { + return i - 1; + } + } + } else if (direction < 0) { + for (i = 1; i < n; ++i) { + if (arr[i] <= target) { + return i; + } + } + } else { + for (i = 1; i < n; ++i) { + if (arr[i] == target) { + return i; + } else if (arr[i] < target) { + if (typeof direction === 'function') { + if (direction(target, arr[i - 1], arr[i]) > 0) { + return i - 1; + } else { + return i; + } + } else if (arr[i - 1] - target < target - arr[i]) { + return i - 1; + } else { + return i; + } + } + } + } + + return n - 1; + } +} +/** + * @param {Array<*>} arr Array. + * @param {number} begin Begin index. + * @param {number} end End index. + */ + +function reverseSubArray(arr, begin, end) { + while (begin < end) { + var tmp = arr[begin]; + arr[begin] = arr[end]; + arr[end] = tmp; + ++begin; + --end; + } +} +/** + * @param {Array} arr The array to modify. + * @param {!Array|VALUE} data The elements or arrays of elements to add to arr. + * @template VALUE + */ + +function extend(arr, data) { + var extension = Array.isArray(data) ? data : [data]; + var length = extension.length; + + for (var i = 0; i < length; i++) { + arr[arr.length] = extension[i]; + } +} +/** + * @param {Array} arr The array to modify. + * @param {VALUE} obj The element to remove. + * @template VALUE + * @return {boolean} If the element was removed. + */ + +function remove(arr, obj) { + var i = arr.indexOf(obj); + var found = i > -1; + + if (found) { + arr.splice(i, 1); + } + + return found; +} +/** + * @param {Array} arr The array to search in. + * @param {function(VALUE, number, ?) : boolean} func The function to compare. + * @template VALUE + * @return {VALUE|null} The element found or null. + */ + +function find(arr, func) { + var length = arr.length >>> 0; + var value; + + for (var i = 0; i < length; i++) { + value = arr[i]; + + if (func(value, i, arr)) { + return value; + } + } + + return null; +} +/** + * @param {Array|Uint8ClampedArray} arr1 The first array to compare. + * @param {Array|Uint8ClampedArray} arr2 The second array to compare. + * @return {boolean} Whether the two arrays are equal. + */ + +function equals(arr1, arr2) { + var len1 = arr1.length; + + if (len1 !== arr2.length) { + return false; + } + + for (var i = 0; i < len1; i++) { + if (arr1[i] !== arr2[i]) { + return false; + } + } + + return true; +} +/** + * Sort the passed array such that the relative order of equal elements is preserved. + * See https://en.wikipedia.org/wiki/Sorting_algorithm#Stability for details. + * @param {Array<*>} arr The array to sort (modifies original). + * @param {!function(*, *): number} compareFnc Comparison function. + * @api + */ + +function stableSort(arr, compareFnc) { + var length = arr.length; + var tmp = Array(arr.length); + var i; + + for (i = 0; i < length; i++) { + tmp[i] = { + index: i, + value: arr[i] + }; + } + + tmp.sort(function (a, b) { + return compareFnc(a.value, b.value) || a.index - b.index; + }); + + for (i = 0; i < arr.length; i++) { + arr[i] = tmp[i].value; + } +} +/** + * @param {Array<*>} arr The array to search in. + * @param {Function} func Comparison function. + * @return {number} Return index. + */ + +function findIndex(arr, func) { + var index; + var found = !arr.every(function (el, idx) { + index = idx; + return !func(el, idx, arr); + }); + return found ? index : -1; +} +/** + * @param {Array<*>} arr The array to test. + * @param {Function} [opt_func] Comparison function. + * @param {boolean} [opt_strict] Strictly sorted (default false). + * @return {boolean} Return index. + */ + +function isSorted(arr, opt_func, opt_strict) { + var compare = opt_func || numberSafeCompareFunction; + return arr.every(function (currentVal, index) { + if (index === 0) { + return true; + } + + var res = compare(arr[index - 1], currentVal); + return !(res > 0 || opt_strict && res === 0); + }); +} + +/***/ }), +/* 32 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * @module ol/Disposable + */ + +/** + * @classdesc + * Objects that need to clean up after themselves. + */ +var Disposable = +/** @class */ +function () { + function Disposable() { + /** + * The object has already been disposed. + * @type {boolean} + * @protected + */ + this.disposed = false; + } + /** + * Clean up. + */ + + + Disposable.prototype.dispose = function () { + if (!this.disposed) { + this.disposed = true; + this.disposeInternal(); + } + }; + /** + * Extension point for disposable objects. + * @protected + */ + + + Disposable.prototype.disposeInternal = function () {}; + + return Disposable; +}(); + +/* harmony default export */ __webpack_exports__["default"] = (Disposable); + +/***/ }), +/* 33 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Tile_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(35); +/* harmony import */ var _TileState_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(34); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/DataTile + */ + + + + +/** + * Data that can be used with a DataTile. For increased browser compatibility, use + * Uint8Array instead of Uint8ClampedArray where possible. + * @typedef {Uint8Array|Uint8ClampedArray|Float32Array|DataView} Data + */ + +/** + * @typedef {Object} Options + * @property {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate. + * @property {function() : Promise} loader Data loader. + * @property {number} [transition=250] A duration for tile opacity + * transitions in milliseconds. A duration of 0 disables the opacity transition. + * @api + */ + +var DataTile = +/** @class */ +function (_super) { + __extends(DataTile, _super); + /** + * @param {Options} options Tile options. + */ + + + function DataTile(options) { + var _this = this; + + var state = _TileState_js__WEBPACK_IMPORTED_MODULE_0__["default"].IDLE; + _this = _super.call(this, options.tileCoord, state, { + transition: options.transition + }) || this; + _this.loader_ = options.loader; + _this.data_ = null; + _this.error_ = null; + return _this; + } + /** + * Get the data for the tile. + * @return {Data} Tile data. + * @api + */ + + + DataTile.prototype.getData = function () { + return this.data_; + }; + /** + * Get any loading error. + * @return {Error} Loading error. + * @api + */ + + + DataTile.prototype.getError = function () { + return this.error_; + }; + /** + * Load not yet loaded URI. + * @api + */ + + + DataTile.prototype.load = function () { + this.state = _TileState_js__WEBPACK_IMPORTED_MODULE_0__["default"].LOADING; + this.changed(); + var self = this; + this.loader_().then(function (data) { + self.data_ = data; + self.state = _TileState_js__WEBPACK_IMPORTED_MODULE_0__["default"].LOADED; + self.changed(); + }).catch(function (error) { + self.error_ = error; + self.state = _TileState_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERROR; + self.changed(); + }); + }; + + return DataTile; +}(_Tile_js__WEBPACK_IMPORTED_MODULE_1__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (DataTile); + +/***/ }), +/* 34 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * @module ol/TileState + */ + +/** + * @enum {number} + */ +/* harmony default export */ __webpack_exports__["default"] = ({ + IDLE: 0, + LOADING: 1, + LOADED: 2, + + /** + * Indicates that tile loading failed + * @type {number} + */ + ERROR: 3, + EMPTY: 4 +}); + +/***/ }), +/* 35 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _events_Target_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29); +/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27); +/* harmony import */ var _TileState_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(34); +/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16); +/* harmony import */ var _easing_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(36); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/Tile + */ + + + + + + + +/** + * A function that takes an {@link module:ol/Tile} for the tile and a + * `{string}` for the url as arguments. The default is + * ```js + * source.setTileLoadFunction(function(tile, src) { + * tile.getImage().src = src; + * }); + * ``` + * For more fine grained control, the load function can use fetch or XMLHttpRequest and involve + * error handling: + * + * ```js + * import TileState from 'ol/TileState'; + * + * source.setTileLoadFunction(function(tile, src) { + * var xhr = new XMLHttpRequest(); + * xhr.responseType = 'blob'; + * xhr.addEventListener('loadend', function (evt) { + * var data = this.response; + * if (data !== undefined) { + * tile.getImage().src = URL.createObjectURL(data); + * } else { + * tile.setState(TileState.ERROR); + * } + * }); + * xhr.addEventListener('error', function () { + * tile.setState(TileState.ERROR); + * }); + * xhr.open('GET', src); + * xhr.send(); + * }); + * ``` + * + * @typedef {function(Tile, string): void} LoadFunction + * @api + */ + +/** + * {@link module:ol/source/Tile~Tile} sources use a function of this type to get + * the url that provides a tile for a given tile coordinate. + * + * This function takes an {@link module:ol/tilecoord~TileCoord} for the tile + * coordinate, a `{number}` representing the pixel ratio and a + * {@link module:ol/proj/Projection} for the projection as arguments + * and returns a `{string}` representing the tile URL, or undefined if no tile + * should be requested for the passed tile coordinate. + * + * @typedef {function(import("./tilecoord.js").TileCoord, number, + * import("./proj/Projection.js").default): (string|undefined)} UrlFunction + * @api + */ + +/** + * @typedef {Object} Options + * @property {number} [transition=250] A duration for tile opacity + * transitions in milliseconds. A duration of 0 disables the opacity transition. + * @api + */ + +/** + * @classdesc + * Base class for tiles. + * + * @abstract + */ + +var Tile = +/** @class */ +function (_super) { + __extends(Tile, _super); + /** + * @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate. + * @param {import("./TileState.js").default} state State. + * @param {Options} [opt_options] Tile options. + */ + + + function Tile(tileCoord, state, opt_options) { + var _this = _super.call(this) || this; + + var options = opt_options ? opt_options : {}; + /** + * @type {import("./tilecoord.js").TileCoord} + */ + + _this.tileCoord = tileCoord; + /** + * @protected + * @type {import("./TileState.js").default} + */ + + _this.state = state; + /** + * An "interim" tile for this tile. The interim tile may be used while this + * one is loading, for "smooth" transitions when changing params/dimensions + * on the source. + * @type {Tile} + */ + + _this.interimTile = null; + /** + * A key assigned to the tile. This is used by the tile source to determine + * if this tile can effectively be used, or if a new tile should be created + * and this one be used as an interim tile for this new tile. + * @type {string} + */ + + _this.key = ''; + /** + * The duration for the opacity transition. + * @type {number} + */ + + _this.transition_ = options.transition === undefined ? 250 : options.transition; + /** + * Lookup of start times for rendering transitions. If the start time is + * equal to -1, the transition is complete. + * @type {Object} + */ + + _this.transitionStarts_ = {}; + return _this; + } + /** + * @protected + */ + + + Tile.prototype.changed = function () { + this.dispatchEvent(_events_EventType_js__WEBPACK_IMPORTED_MODULE_0__["default"].CHANGE); + }; + /** + * Called by the tile cache when the tile is removed from the cache due to expiry + */ + + + Tile.prototype.release = function () {}; + /** + * @return {string} Key. + */ + + + Tile.prototype.getKey = function () { + return this.key + '/' + this.tileCoord; + }; + /** + * Get the interim tile most suitable for rendering using the chain of interim + * tiles. This corresponds to the most recent tile that has been loaded, if no + * such tile exists, the original tile is returned. + * @return {!Tile} Best tile for rendering. + */ + + + Tile.prototype.getInterimTile = function () { + if (!this.interimTile) { + //empty chain + return this; + } + + var tile = this.interimTile; // find the first loaded tile and return it. Since the chain is sorted in + // decreasing order of creation time, there is no need to search the remainder + // of the list (all those tiles correspond to older requests and will be + // cleaned up by refreshInterimChain) + + do { + if (tile.getState() == _TileState_js__WEBPACK_IMPORTED_MODULE_1__["default"].LOADED) { + // Show tile immediately instead of fading it in after loading, because + // the interim tile is in place already + this.transition_ = 0; + return tile; + } + + tile = tile.interimTile; + } while (tile); // we can not find a better tile + + + return this; + }; + /** + * Goes through the chain of interim tiles and discards sections of the chain + * that are no longer relevant. + */ + + + Tile.prototype.refreshInterimChain = function () { + if (!this.interimTile) { + return; + } + + var tile = this.interimTile; + var prev = + /** @type {Tile} */ + this; + + do { + if (tile.getState() == _TileState_js__WEBPACK_IMPORTED_MODULE_1__["default"].LOADED) { + //we have a loaded tile, we can discard the rest of the list + //we would could abort any LOADING tile request + //older than this tile (i.e. any LOADING tile following this entry in the chain) + tile.interimTile = null; + break; + } else if (tile.getState() == _TileState_js__WEBPACK_IMPORTED_MODULE_1__["default"].LOADING) { + //keep this LOADING tile any loaded tiles later in the chain are + //older than this tile, so we're still interested in the request + prev = tile; + } else if (tile.getState() == _TileState_js__WEBPACK_IMPORTED_MODULE_1__["default"].IDLE) { + //the head of the list is the most current tile, we don't need + //to start any other requests for this chain + prev.interimTile = tile.interimTile; + } else { + prev = tile; + } + + tile = prev.interimTile; + } while (tile); + }; + /** + * Get the tile coordinate for this tile. + * @return {import("./tilecoord.js").TileCoord} The tile coordinate. + * @api + */ + + + Tile.prototype.getTileCoord = function () { + return this.tileCoord; + }; + /** + * @return {import("./TileState.js").default} State. + */ + + + Tile.prototype.getState = function () { + return this.state; + }; + /** + * Sets the state of this tile. If you write your own {@link module:ol/Tile~LoadFunction tileLoadFunction} , + * it is important to set the state correctly to {@link module:ol/TileState~ERROR} + * when the tile cannot be loaded. Otherwise the tile cannot be removed from + * the tile queue and will block other requests. + * @param {import("./TileState.js").default} state State. + * @api + */ + + + Tile.prototype.setState = function (state) { + if (this.state !== _TileState_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERROR && this.state > state) { + throw new Error('Tile load sequence violation'); + } + + this.state = state; + this.changed(); + }; + /** + * Load the image or retry if loading previously failed. + * Loading is taken care of by the tile queue, and calling this method is + * only needed for preloading or for reloading in case of an error. + * @abstract + * @api + */ + + + Tile.prototype.load = function () { + (0,_util_js__WEBPACK_IMPORTED_MODULE_2__.abstract)(); + }; + /** + * Get the alpha value for rendering. + * @param {string} id An id for the renderer. + * @param {number} time The render frame time. + * @return {number} A number between 0 and 1. + */ + + + Tile.prototype.getAlpha = function (id, time) { + if (!this.transition_) { + return 1; + } + + var start = this.transitionStarts_[id]; + + if (!start) { + start = time; + this.transitionStarts_[id] = start; + } else if (start === -1) { + return 1; + } + + var delta = time - start + 1000 / 60; // avoid rendering at 0 + + if (delta >= this.transition_) { + return 1; + } + + return (0,_easing_js__WEBPACK_IMPORTED_MODULE_3__.easeIn)(delta / this.transition_); + }; + /** + * Determine if a tile is in an alpha transition. A tile is considered in + * transition if tile.getAlpha() has not yet been called or has been called + * and returned 1. + * @param {string} id An id for the renderer. + * @return {boolean} The tile is in transition. + */ + + + Tile.prototype.inTransition = function (id) { + if (!this.transition_) { + return false; + } + + return this.transitionStarts_[id] !== -1; + }; + /** + * Mark a transition as complete. + * @param {string} id An id for the renderer. + */ + + + Tile.prototype.endTransition = function (id) { + if (this.transition_) { + this.transitionStarts_[id] = -1; + } + }; + + return Tile; +}(_events_Target_js__WEBPACK_IMPORTED_MODULE_4__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (Tile); + +/***/ }), +/* 36 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "easeIn": function() { return /* binding */ easeIn; }, +/* harmony export */ "easeOut": function() { return /* binding */ easeOut; }, +/* harmony export */ "inAndOut": function() { return /* binding */ inAndOut; }, +/* harmony export */ "linear": function() { return /* binding */ linear; }, +/* harmony export */ "upAndDown": function() { return /* binding */ upAndDown; } +/* harmony export */ }); +/** + * @module ol/easing + */ + +/** + * Start slow and speed up. + * @param {number} t Input between 0 and 1. + * @return {number} Output between 0 and 1. + * @api + */ +function easeIn(t) { + return Math.pow(t, 3); +} +/** + * Start fast and slow down. + * @param {number} t Input between 0 and 1. + * @return {number} Output between 0 and 1. + * @api + */ + +function easeOut(t) { + return 1 - easeIn(1 - t); +} +/** + * Start slow, speed up, and then slow down again. + * @param {number} t Input between 0 and 1. + * @return {number} Output between 0 and 1. + * @api + */ + +function inAndOut(t) { + return 3 * t * t - 2 * t * t * t; +} +/** + * Maintain a constant speed over time. + * @param {number} t Input between 0 and 1. + * @return {number} Output between 0 and 1. + * @api + */ + +function linear(t) { + return t; +} +/** + * Start slow, speed up, and at the very end slow down again. This has the + * same general behavior as {@link module:ol/easing.inAndOut}, but the final + * slowdown is delayed. + * @param {number} t Input between 0 and 1. + * @return {number} Output between 0 and 1. + * @api + */ + +function upAndDown(t) { + if (t < 0.5) { + return inAndOut(2 * t); + } else { + return 1 - inAndOut(2 * (t - 0.5)); + } +} + +/***/ }), +/* 37 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "createStyleFunction": function() { return /* binding */ createStyleFunction; } +/* harmony export */ }); +/* harmony import */ var _Object_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(24); +/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27); +/* harmony import */ var _asserts_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14); +/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/Feature + */ + + + + + + +/** + * @typedef {typeof Feature|typeof import("./render/Feature.js").default} FeatureClass + */ + +/** + * @typedef {Feature|import("./render/Feature.js").default} FeatureLike + */ + +/*** + * @template Return + * @typedef {import("./Observable").OnSignature & + * import("./Observable").OnSignature & + * import("./Observable").CombinedOnSignature} FeatureOnSignature + */ + +/*** + * @template Geometry + * @typedef {Object & { geometry?: Geometry }} ObjectWithGeometry + */ + +/** + * @classdesc + * A vector object for geographic features with a geometry and other + * attribute properties, similar to the features in vector file formats like + * GeoJSON. + * + * Features can be styled individually with `setStyle`; otherwise they use the + * style of their vector layer. + * + * Note that attribute properties are set as {@link module:ol/Object} properties on + * the feature object, so they are observable, and have get/set accessors. + * + * Typically, a feature has a single geometry property. You can set the + * geometry using the `setGeometry` method and get it with `getGeometry`. + * It is possible to store more than one geometry on a feature using attribute + * properties. By default, the geometry used for rendering is identified by + * the property name `geometry`. If you want to use another geometry property + * for rendering, use the `setGeometryName` method to change the attribute + * property associated with the geometry for the feature. For example: + * + * ```js + * + * import Feature from 'ol/Feature'; + * import Polygon from 'ol/geom/Polygon'; + * import Point from 'ol/geom/Point'; + * + * var feature = new Feature({ + * geometry: new Polygon(polyCoords), + * labelPoint: new Point(labelCoords), + * name: 'My Polygon' + * }); + * + * // get the polygon geometry + * var poly = feature.getGeometry(); + * + * // Render the feature as a point using the coordinates from labelPoint + * feature.setGeometryName('labelPoint'); + * + * // get the point geometry + * var point = feature.getGeometry(); + * ``` + * + * @api + * @template {import("./geom/Geometry.js").default} Geometry + */ + +var Feature = +/** @class */ +function (_super) { + __extends(Feature, _super); + /** + * @param {Geometry|ObjectWithGeometry} [opt_geometryOrProperties] + * You may pass a Geometry object directly, or an object literal containing + * properties. If you pass an object literal, you may include a Geometry + * associated with a `geometry` key. + */ + + + function Feature(opt_geometryOrProperties) { + var _this = _super.call(this) || this; + /*** + * @type {FeatureOnSignature} + */ + + + _this.on; + /*** + * @type {FeatureOnSignature} + */ + + _this.once; + /*** + * @type {FeatureOnSignature} + */ + + _this.un; + /** + * @private + * @type {number|string|undefined} + */ + + _this.id_ = undefined; + /** + * @type {string} + * @private + */ + + _this.geometryName_ = 'geometry'; + /** + * User provided style. + * @private + * @type {import("./style/Style.js").StyleLike} + */ + + _this.style_ = null; + /** + * @private + * @type {import("./style/Style.js").StyleFunction|undefined} + */ + + _this.styleFunction_ = undefined; + /** + * @private + * @type {?import("./events.js").EventsKey} + */ + + _this.geometryChangeKey_ = null; + + _this.addChangeListener(_this.geometryName_, _this.handleGeometryChanged_); + + if (opt_geometryOrProperties) { + if (typeof + /** @type {?} */ + opt_geometryOrProperties.getSimplifiedGeometry === 'function') { + var geometry = + /** @type {Geometry} */ + opt_geometryOrProperties; + + _this.setGeometry(geometry); + } else { + /** @type {Object} */ + var properties = opt_geometryOrProperties; + + _this.setProperties(properties); + } + } + + return _this; + } + /** + * Clone this feature. If the original feature has a geometry it + * is also cloned. The feature id is not set in the clone. + * @return {Feature} The clone. + * @api + */ + + + Feature.prototype.clone = function () { + var clone = + /** @type {Feature} */ + new Feature(this.hasProperties() ? this.getProperties() : null); + clone.setGeometryName(this.getGeometryName()); + var geometry = this.getGeometry(); + + if (geometry) { + clone.setGeometry( + /** @type {Geometry} */ + geometry.clone()); + } + + var style = this.getStyle(); + + if (style) { + clone.setStyle(style); + } + + return clone; + }; + /** + * Get the feature's default geometry. A feature may have any number of named + * geometries. The "default" geometry (the one that is rendered by default) is + * set when calling {@link module:ol/Feature~Feature#setGeometry}. + * @return {Geometry|undefined} The default geometry for the feature. + * @api + * @observable + */ + + + Feature.prototype.getGeometry = function () { + return ( + /** @type {Geometry|undefined} */ + this.get(this.geometryName_) + ); + }; + /** + * Get the feature identifier. This is a stable identifier for the feature and + * is either set when reading data from a remote source or set explicitly by + * calling {@link module:ol/Feature~Feature#setId}. + * @return {number|string|undefined} Id. + * @api + */ + + + Feature.prototype.getId = function () { + return this.id_; + }; + /** + * Get the name of the feature's default geometry. By default, the default + * geometry is named `geometry`. + * @return {string} Get the property name associated with the default geometry + * for this feature. + * @api + */ + + + Feature.prototype.getGeometryName = function () { + return this.geometryName_; + }; + /** + * Get the feature's style. Will return what was provided to the + * {@link module:ol/Feature~Feature#setStyle} method. + * @return {import("./style/Style.js").StyleLike|undefined} The feature style. + * @api + */ + + + Feature.prototype.getStyle = function () { + return this.style_; + }; + /** + * Get the feature's style function. + * @return {import("./style/Style.js").StyleFunction|undefined} Return a function + * representing the current style of this feature. + * @api + */ + + + Feature.prototype.getStyleFunction = function () { + return this.styleFunction_; + }; + /** + * @private + */ + + + Feature.prototype.handleGeometryChange_ = function () { + this.changed(); + }; + /** + * @private + */ + + + Feature.prototype.handleGeometryChanged_ = function () { + if (this.geometryChangeKey_) { + (0,_events_js__WEBPACK_IMPORTED_MODULE_0__.unlistenByKey)(this.geometryChangeKey_); + this.geometryChangeKey_ = null; + } + + var geometry = this.getGeometry(); + + if (geometry) { + this.geometryChangeKey_ = (0,_events_js__WEBPACK_IMPORTED_MODULE_0__.listen)(geometry, _events_EventType_js__WEBPACK_IMPORTED_MODULE_1__["default"].CHANGE, this.handleGeometryChange_, this); + } + + this.changed(); + }; + /** + * Set the default geometry for the feature. This will update the property + * with the name returned by {@link module:ol/Feature~Feature#getGeometryName}. + * @param {Geometry|undefined} geometry The new geometry. + * @api + * @observable + */ + + + Feature.prototype.setGeometry = function (geometry) { + this.set(this.geometryName_, geometry); + }; + /** + * Set the style for the feature to override the layer style. This can be a + * single style object, an array of styles, or a function that takes a + * resolution and returns an array of styles. To unset the feature style, call + * `setStyle()` without arguments or a falsey value. + * @param {import("./style/Style.js").StyleLike} [opt_style] Style for this feature. + * @api + * @fires module:ol/events/Event~BaseEvent#event:change + */ + + + Feature.prototype.setStyle = function (opt_style) { + this.style_ = opt_style; + this.styleFunction_ = !opt_style ? undefined : createStyleFunction(opt_style); + this.changed(); + }; + /** + * Set the feature id. The feature id is considered stable and may be used when + * requesting features or comparing identifiers returned from a remote source. + * The feature id can be used with the + * {@link module:ol/source/Vector~VectorSource#getFeatureById} method. + * @param {number|string|undefined} id The feature id. + * @api + * @fires module:ol/events/Event~BaseEvent#event:change + */ + + + Feature.prototype.setId = function (id) { + this.id_ = id; + this.changed(); + }; + /** + * Set the property name to be used when getting the feature's default geometry. + * When calling {@link module:ol/Feature~Feature#getGeometry}, the value of the property with + * this name will be returned. + * @param {string} name The property name of the default geometry. + * @api + */ + + + Feature.prototype.setGeometryName = function (name) { + this.removeChangeListener(this.geometryName_, this.handleGeometryChanged_); + this.geometryName_ = name; + this.addChangeListener(this.geometryName_, this.handleGeometryChanged_); + this.handleGeometryChanged_(); + }; + + return Feature; +}(_Object_js__WEBPACK_IMPORTED_MODULE_2__["default"]); +/** + * Convert the provided object into a feature style function. Functions passed + * through unchanged. Arrays of Style or single style objects wrapped + * in a new feature style function. + * @param {!import("./style/Style.js").StyleFunction|!Array|!import("./style/Style.js").default} obj + * A feature style function, a single style, or an array of styles. + * @return {import("./style/Style.js").StyleFunction} A style function. + */ + + +function createStyleFunction(obj) { + if (typeof obj === 'function') { + return obj; + } else { + /** + * @type {Array} + */ + var styles_1; + + if (Array.isArray(obj)) { + styles_1 = obj; + } else { + (0,_asserts_js__WEBPACK_IMPORTED_MODULE_3__.assert)(typeof + /** @type {?} */ + obj.getZIndex === 'function', 41); // Expected an `import("./style/Style.js").Style` or an array of `import("./style/Style.js").Style` + + var style = + /** @type {import("./style/Style.js").default} */ + obj; + styles_1 = [style]; + } + + return function () { + return styles_1; + }; + } +} +/* harmony default export */ __webpack_exports__["default"] = (Feature); + +/***/ }), +/* 38 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _events_Event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22); +/* harmony import */ var _Object_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24); +/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27); +/* harmony import */ var _geom_Polygon_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(39); +/* harmony import */ var _proj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/Geolocation + */ + + + + + + + + +/** + * @enum {string} + */ + +var Property = { + ACCURACY: 'accuracy', + ACCURACY_GEOMETRY: 'accuracyGeometry', + ALTITUDE: 'altitude', + ALTITUDE_ACCURACY: 'altitudeAccuracy', + HEADING: 'heading', + POSITION: 'position', + PROJECTION: 'projection', + SPEED: 'speed', + TRACKING: 'tracking', + TRACKING_OPTIONS: 'trackingOptions' +}; +/** + * @classdesc + * Events emitted on Geolocation error. + */ + +var GeolocationError = +/** @class */ +function (_super) { + __extends(GeolocationError, _super); + /** + * @param {GeolocationPositionError} error error object. + */ + + + function GeolocationError(error) { + var _this = _super.call(this, _events_EventType_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERROR) || this; + /** + * @type {number} + */ + + + _this.code = error.code; + /** + * @type {string} + */ + + _this.message = error.message; + return _this; + } + + return GeolocationError; +}(_events_Event_js__WEBPACK_IMPORTED_MODULE_2__["default"]); +/** + * @typedef {Object} Options + * @property {boolean} [tracking=false] Start Tracking right after + * instantiation. + * @property {PositionOptions} [trackingOptions] Tracking options. + * See https://www.w3.org/TR/geolocation-API/#position_options_interface. + * @property {import("./proj.js").ProjectionLike} [projection] The projection the position + * is reported in. + */ + +/** + * @typedef {import("./ObjectEventType").Types|'change:accuracy'|'change:accuracyGeometry'|'change:altitude'| + * 'change:altitudeAccuracy'|'change:heading'|'change:position'|'change:projection'|'change:speed'|'change:tracking'| + * 'change:trackingOptions'} GeolocationObjectEventTypes + */ + +/*** + * @template Return + * @typedef {import("./Observable").OnSignature & + * import("./Observable").OnSignature & + * import("./Observable").OnSignature<'error', GeolocationError, Return> & + * import("./Observable").CombinedOnSignature} GeolocationOnSignature + */ + +/** + * @classdesc + * Helper class for providing HTML5 Geolocation capabilities. + * The [Geolocation API](https://www.w3.org/TR/geolocation-API/) + * is used to locate a user's position. + * + * To get notified of position changes, register a listener for the generic + * `change` event on your instance of {@link module:ol/Geolocation~Geolocation}. + * + * Example: + * + * var geolocation = new Geolocation({ + * // take the projection to use from the map's view + * projection: view.getProjection() + * }); + * // listen to changes in position + * geolocation.on('change', function(evt) { + * window.console.log(geolocation.getPosition()); + * }); + * + * @fires module:ol/events/Event~BaseEvent#event:error + * @api + */ + + +var Geolocation = +/** @class */ +function (_super) { + __extends(Geolocation, _super); + /** + * @param {Options} [opt_options] Options. + */ + + + function Geolocation(opt_options) { + var _this = _super.call(this) || this; + /*** + * @type {GeolocationOnSignature} + */ + + + _this.on; + /*** + * @type {GeolocationOnSignature} + */ + + _this.once; + /*** + * @type {GeolocationOnSignature} + */ + + _this.un; + var options = opt_options || {}; + /** + * The unprojected (EPSG:4326) device position. + * @private + * @type {?import("./coordinate.js").Coordinate} + */ + + _this.position_ = null; + /** + * @private + * @type {import("./proj.js").TransformFunction} + */ + + _this.transform_ = _proj_js__WEBPACK_IMPORTED_MODULE_0__.identityTransform; + /** + * @private + * @type {number|undefined} + */ + + _this.watchId_ = undefined; + + _this.addChangeListener(Property.PROJECTION, _this.handleProjectionChanged_); + + _this.addChangeListener(Property.TRACKING, _this.handleTrackingChanged_); + + if (options.projection !== undefined) { + _this.setProjection(options.projection); + } + + if (options.trackingOptions !== undefined) { + _this.setTrackingOptions(options.trackingOptions); + } + + _this.setTracking(options.tracking !== undefined ? options.tracking : false); + + return _this; + } + /** + * Clean up. + */ + + + Geolocation.prototype.disposeInternal = function () { + this.setTracking(false); + + _super.prototype.disposeInternal.call(this); + }; + /** + * @private + */ + + + Geolocation.prototype.handleProjectionChanged_ = function () { + var projection = this.getProjection(); + + if (projection) { + this.transform_ = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getTransformFromProjections)((0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.get)('EPSG:4326'), projection); + + if (this.position_) { + this.set(Property.POSITION, this.transform_(this.position_)); + } + } + }; + /** + * @private + */ + + + Geolocation.prototype.handleTrackingChanged_ = function () { + if ('geolocation' in navigator) { + var tracking = this.getTracking(); + + if (tracking && this.watchId_ === undefined) { + this.watchId_ = navigator.geolocation.watchPosition(this.positionChange_.bind(this), this.positionError_.bind(this), this.getTrackingOptions()); + } else if (!tracking && this.watchId_ !== undefined) { + navigator.geolocation.clearWatch(this.watchId_); + this.watchId_ = undefined; + } + } + }; + /** + * @private + * @param {GeolocationPosition} position position event. + */ + + + Geolocation.prototype.positionChange_ = function (position) { + var coords = position.coords; + this.set(Property.ACCURACY, coords.accuracy); + this.set(Property.ALTITUDE, coords.altitude === null ? undefined : coords.altitude); + this.set(Property.ALTITUDE_ACCURACY, coords.altitudeAccuracy === null ? undefined : coords.altitudeAccuracy); + this.set(Property.HEADING, coords.heading === null ? undefined : (0,_math_js__WEBPACK_IMPORTED_MODULE_3__.toRadians)(coords.heading)); + + if (!this.position_) { + this.position_ = [coords.longitude, coords.latitude]; + } else { + this.position_[0] = coords.longitude; + this.position_[1] = coords.latitude; + } + + var projectedPosition = this.transform_(this.position_); + this.set(Property.POSITION, projectedPosition); + this.set(Property.SPEED, coords.speed === null ? undefined : coords.speed); + var geometry = (0,_geom_Polygon_js__WEBPACK_IMPORTED_MODULE_4__.circular)(this.position_, coords.accuracy); + geometry.applyTransform(this.transform_); + this.set(Property.ACCURACY_GEOMETRY, geometry); + this.changed(); + }; + /** + * @private + * @param {GeolocationPositionError} error error object. + */ + + + Geolocation.prototype.positionError_ = function (error) { + this.dispatchEvent(new GeolocationError(error)); + }; + /** + * Get the accuracy of the position in meters. + * @return {number|undefined} The accuracy of the position measurement in + * meters. + * @observable + * @api + */ + + + Geolocation.prototype.getAccuracy = function () { + return ( + /** @type {number|undefined} */ + this.get(Property.ACCURACY) + ); + }; + /** + * Get a geometry of the position accuracy. + * @return {?import("./geom/Polygon.js").default} A geometry of the position accuracy. + * @observable + * @api + */ + + + Geolocation.prototype.getAccuracyGeometry = function () { + return ( + /** @type {?import("./geom/Polygon.js").default} */ + this.get(Property.ACCURACY_GEOMETRY) || null + ); + }; + /** + * Get the altitude associated with the position. + * @return {number|undefined} The altitude of the position in meters above mean + * sea level. + * @observable + * @api + */ + + + Geolocation.prototype.getAltitude = function () { + return ( + /** @type {number|undefined} */ + this.get(Property.ALTITUDE) + ); + }; + /** + * Get the altitude accuracy of the position. + * @return {number|undefined} The accuracy of the altitude measurement in + * meters. + * @observable + * @api + */ + + + Geolocation.prototype.getAltitudeAccuracy = function () { + return ( + /** @type {number|undefined} */ + this.get(Property.ALTITUDE_ACCURACY) + ); + }; + /** + * Get the heading as radians clockwise from North. + * Note: depending on the browser, the heading is only defined if the `enableHighAccuracy` + * is set to `true` in the tracking options. + * @return {number|undefined} The heading of the device in radians from north. + * @observable + * @api + */ + + + Geolocation.prototype.getHeading = function () { + return ( + /** @type {number|undefined} */ + this.get(Property.HEADING) + ); + }; + /** + * Get the position of the device. + * @return {import("./coordinate.js").Coordinate|undefined} The current position of the device reported + * in the current projection. + * @observable + * @api + */ + + + Geolocation.prototype.getPosition = function () { + return ( + /** @type {import("./coordinate.js").Coordinate|undefined} */ + this.get(Property.POSITION) + ); + }; + /** + * Get the projection associated with the position. + * @return {import("./proj/Projection.js").default|undefined} The projection the position is + * reported in. + * @observable + * @api + */ + + + Geolocation.prototype.getProjection = function () { + return ( + /** @type {import("./proj/Projection.js").default|undefined} */ + this.get(Property.PROJECTION) + ); + }; + /** + * Get the speed in meters per second. + * @return {number|undefined} The instantaneous speed of the device in meters + * per second. + * @observable + * @api + */ + + + Geolocation.prototype.getSpeed = function () { + return ( + /** @type {number|undefined} */ + this.get(Property.SPEED) + ); + }; + /** + * Determine if the device location is being tracked. + * @return {boolean} The device location is being tracked. + * @observable + * @api + */ + + + Geolocation.prototype.getTracking = function () { + return ( + /** @type {boolean} */ + this.get(Property.TRACKING) + ); + }; + /** + * Get the tracking options. + * See https://www.w3.org/TR/geolocation-API/#position-options. + * @return {PositionOptions|undefined} PositionOptions as defined by + * the [HTML5 Geolocation spec + * ](https://www.w3.org/TR/geolocation-API/#position_options_interface). + * @observable + * @api + */ + + + Geolocation.prototype.getTrackingOptions = function () { + return ( + /** @type {PositionOptions|undefined} */ + this.get(Property.TRACKING_OPTIONS) + ); + }; + /** + * Set the projection to use for transforming the coordinates. + * @param {import("./proj.js").ProjectionLike} projection The projection the position is + * reported in. + * @observable + * @api + */ + + + Geolocation.prototype.setProjection = function (projection) { + this.set(Property.PROJECTION, (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.get)(projection)); + }; + /** + * Enable or disable tracking. + * @param {boolean} tracking Enable tracking. + * @observable + * @api + */ + + + Geolocation.prototype.setTracking = function (tracking) { + this.set(Property.TRACKING, tracking); + }; + /** + * Set the tracking options. + * See http://www.w3.org/TR/geolocation-API/#position-options. + * @param {PositionOptions} options PositionOptions as defined by the + * [HTML5 Geolocation spec + * ](http://www.w3.org/TR/geolocation-API/#position_options_interface). + * @observable + * @api + */ + + + Geolocation.prototype.setTrackingOptions = function (options) { + this.set(Property.TRACKING_OPTIONS, options); + }; + + return Geolocation; +}(_Object_js__WEBPACK_IMPORTED_MODULE_5__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (Geolocation); + +/***/ }), +/* 39 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "circular": function() { return /* binding */ circular; }, +/* harmony export */ "fromExtent": function() { return /* binding */ fromExtent; }, +/* harmony export */ "fromCircle": function() { return /* binding */ fromCircle; }, +/* harmony export */ "makeRegular": function() { return /* binding */ makeRegular; } +/* harmony export */ }); +/* harmony import */ var _GeometryLayout_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(50); +/* harmony import */ var _GeometryType_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(10); +/* harmony import */ var _LinearRing_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(55); +/* harmony import */ var _Point_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(47); +/* harmony import */ var _SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(49); +/* harmony import */ var _flat_closest_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(40); +/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11); +/* harmony import */ var _flat_deflate_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(48); +/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(31); +/* harmony import */ var _flat_interiorpoint_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(46); +/* harmony import */ var _flat_inflate_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(45); +/* harmony import */ var _flat_intersectsextent_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(57); +/* harmony import */ var _flat_orient_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(43); +/* harmony import */ var _flat_area_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(42); +/* harmony import */ var _flat_contains_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(9); +/* harmony import */ var _flat_simplify_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(56); +/* harmony import */ var _sphere_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(8); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/geom/Polygon + */ + + + + + + + + + + + + + + + + + + + + +/** + * @classdesc + * Polygon geometry. + * + * @api + */ + +var Polygon = +/** @class */ +function (_super) { + __extends(Polygon, _super); + /** + * @param {!Array>|!Array} coordinates + * Array of linear rings that define the polygon. The first linear ring of the + * array defines the outer-boundary or surface of the polygon. Each subsequent + * linear ring defines a hole in the surface of the polygon. A linear ring is + * an array of vertices' coordinates where the first coordinate and the last are + * equivalent. (For internal use, flat coordinates in combination with + * `opt_layout` and `opt_ends` are also accepted.) + * @param {import("./GeometryLayout.js").default} [opt_layout] Layout. + * @param {Array} [opt_ends] Ends (for internal use with flat coordinates). + */ + + + function Polygon(coordinates, opt_layout, opt_ends) { + var _this = _super.call(this) || this; + /** + * @type {Array} + * @private + */ + + + _this.ends_ = []; + /** + * @private + * @type {number} + */ + + _this.flatInteriorPointRevision_ = -1; + /** + * @private + * @type {import("../coordinate.js").Coordinate} + */ + + _this.flatInteriorPoint_ = null; + /** + * @private + * @type {number} + */ + + _this.maxDelta_ = -1; + /** + * @private + * @type {number} + */ + + _this.maxDeltaRevision_ = -1; + /** + * @private + * @type {number} + */ + + _this.orientedRevision_ = -1; + /** + * @private + * @type {Array} + */ + + _this.orientedFlatCoordinates_ = null; + + if (opt_layout !== undefined && opt_ends) { + _this.setFlatCoordinates(opt_layout, + /** @type {Array} */ + coordinates); + + _this.ends_ = opt_ends; + } else { + _this.setCoordinates( + /** @type {Array>} */ + coordinates, opt_layout); + } + + return _this; + } + /** + * Append the passed linear ring to this polygon. + * @param {LinearRing} linearRing Linear ring. + * @api + */ + + + Polygon.prototype.appendLinearRing = function (linearRing) { + if (!this.flatCoordinates) { + this.flatCoordinates = linearRing.getFlatCoordinates().slice(); + } else { + (0,_array_js__WEBPACK_IMPORTED_MODULE_0__.extend)(this.flatCoordinates, linearRing.getFlatCoordinates()); + } + + this.ends_.push(this.flatCoordinates.length); + this.changed(); + }; + /** + * Make a complete copy of the geometry. + * @return {!Polygon} Clone. + * @api + */ + + + Polygon.prototype.clone = function () { + var polygon = new Polygon(this.flatCoordinates.slice(), this.layout, this.ends_.slice()); + polygon.applyProperties(this); + return polygon; + }; + /** + * @param {number} x X. + * @param {number} y Y. + * @param {import("../coordinate.js").Coordinate} closestPoint Closest point. + * @param {number} minSquaredDistance Minimum squared distance. + * @return {number} Minimum squared distance. + */ + + + Polygon.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) { + if (minSquaredDistance < (0,_extent_js__WEBPACK_IMPORTED_MODULE_1__.closestSquaredDistanceXY)(this.getExtent(), x, y)) { + return minSquaredDistance; + } + + if (this.maxDeltaRevision_ != this.getRevision()) { + this.maxDelta_ = Math.sqrt((0,_flat_closest_js__WEBPACK_IMPORTED_MODULE_2__.arrayMaxSquaredDelta)(this.flatCoordinates, 0, this.ends_, this.stride, 0)); + this.maxDeltaRevision_ = this.getRevision(); + } + + return (0,_flat_closest_js__WEBPACK_IMPORTED_MODULE_2__.assignClosestArrayPoint)(this.flatCoordinates, 0, this.ends_, this.stride, this.maxDelta_, true, x, y, closestPoint, minSquaredDistance); + }; + /** + * @param {number} x X. + * @param {number} y Y. + * @return {boolean} Contains (x, y). + */ + + + Polygon.prototype.containsXY = function (x, y) { + return (0,_flat_contains_js__WEBPACK_IMPORTED_MODULE_3__.linearRingsContainsXY)(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, x, y); + }; + /** + * Return the area of the polygon on projected plane. + * @return {number} Area (on projected plane). + * @api + */ + + + Polygon.prototype.getArea = function () { + return (0,_flat_area_js__WEBPACK_IMPORTED_MODULE_4__.linearRings)(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride); + }; + /** + * Get the coordinate array for this geometry. This array has the structure + * of a GeoJSON coordinate array for polygons. + * + * @param {boolean} [opt_right] Orient coordinates according to the right-hand + * rule (counter-clockwise for exterior and clockwise for interior rings). + * If `false`, coordinates will be oriented according to the left-hand rule + * (clockwise for exterior and counter-clockwise for interior rings). + * By default, coordinate orientation will depend on how the geometry was + * constructed. + * @return {Array>} Coordinates. + * @api + */ + + + Polygon.prototype.getCoordinates = function (opt_right) { + var flatCoordinates; + + if (opt_right !== undefined) { + flatCoordinates = this.getOrientedFlatCoordinates().slice(); + (0,_flat_orient_js__WEBPACK_IMPORTED_MODULE_5__.orientLinearRings)(flatCoordinates, 0, this.ends_, this.stride, opt_right); + } else { + flatCoordinates = this.flatCoordinates; + } + + return (0,_flat_inflate_js__WEBPACK_IMPORTED_MODULE_6__.inflateCoordinatesArray)(flatCoordinates, 0, this.ends_, this.stride); + }; + /** + * @return {Array} Ends. + */ + + + Polygon.prototype.getEnds = function () { + return this.ends_; + }; + /** + * @return {Array} Interior point. + */ + + + Polygon.prototype.getFlatInteriorPoint = function () { + if (this.flatInteriorPointRevision_ != this.getRevision()) { + var flatCenter = (0,_extent_js__WEBPACK_IMPORTED_MODULE_1__.getCenter)(this.getExtent()); + this.flatInteriorPoint_ = (0,_flat_interiorpoint_js__WEBPACK_IMPORTED_MODULE_7__.getInteriorPointOfArray)(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, flatCenter, 0); + this.flatInteriorPointRevision_ = this.getRevision(); + } + + return this.flatInteriorPoint_; + }; + /** + * Return an interior point of the polygon. + * @return {Point} Interior point as XYM coordinate, where M is the + * length of the horizontal intersection that the point belongs to. + * @api + */ + + + Polygon.prototype.getInteriorPoint = function () { + return new _Point_js__WEBPACK_IMPORTED_MODULE_8__["default"](this.getFlatInteriorPoint(), _GeometryLayout_js__WEBPACK_IMPORTED_MODULE_9__["default"].XYM); + }; + /** + * Return the number of rings of the polygon, this includes the exterior + * ring and any interior rings. + * + * @return {number} Number of rings. + * @api + */ + + + Polygon.prototype.getLinearRingCount = function () { + return this.ends_.length; + }; + /** + * Return the Nth linear ring of the polygon geometry. Return `null` if the + * given index is out of range. + * The exterior linear ring is available at index `0` and the interior rings + * at index `1` and beyond. + * + * @param {number} index Index. + * @return {LinearRing} Linear ring. + * @api + */ + + + Polygon.prototype.getLinearRing = function (index) { + if (index < 0 || this.ends_.length <= index) { + return null; + } + + return new _LinearRing_js__WEBPACK_IMPORTED_MODULE_10__["default"](this.flatCoordinates.slice(index === 0 ? 0 : this.ends_[index - 1], this.ends_[index]), this.layout); + }; + /** + * Return the linear rings of the polygon. + * @return {Array} Linear rings. + * @api + */ + + + Polygon.prototype.getLinearRings = function () { + var layout = this.layout; + var flatCoordinates = this.flatCoordinates; + var ends = this.ends_; + var linearRings = []; + var offset = 0; + + for (var i = 0, ii = ends.length; i < ii; ++i) { + var end = ends[i]; + var linearRing = new _LinearRing_js__WEBPACK_IMPORTED_MODULE_10__["default"](flatCoordinates.slice(offset, end), layout); + linearRings.push(linearRing); + offset = end; + } + + return linearRings; + }; + /** + * @return {Array} Oriented flat coordinates. + */ + + + Polygon.prototype.getOrientedFlatCoordinates = function () { + if (this.orientedRevision_ != this.getRevision()) { + var flatCoordinates = this.flatCoordinates; + + if ((0,_flat_orient_js__WEBPACK_IMPORTED_MODULE_5__.linearRingsAreOriented)(flatCoordinates, 0, this.ends_, this.stride)) { + this.orientedFlatCoordinates_ = flatCoordinates; + } else { + this.orientedFlatCoordinates_ = flatCoordinates.slice(); + this.orientedFlatCoordinates_.length = (0,_flat_orient_js__WEBPACK_IMPORTED_MODULE_5__.orientLinearRings)(this.orientedFlatCoordinates_, 0, this.ends_, this.stride); + } + + this.orientedRevision_ = this.getRevision(); + } + + return this.orientedFlatCoordinates_; + }; + /** + * @param {number} squaredTolerance Squared tolerance. + * @return {Polygon} Simplified Polygon. + * @protected + */ + + + Polygon.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) { + var simplifiedFlatCoordinates = []; + var simplifiedEnds = []; + simplifiedFlatCoordinates.length = (0,_flat_simplify_js__WEBPACK_IMPORTED_MODULE_11__.quantizeArray)(this.flatCoordinates, 0, this.ends_, this.stride, Math.sqrt(squaredTolerance), simplifiedFlatCoordinates, 0, simplifiedEnds); + return new Polygon(simplifiedFlatCoordinates, _GeometryLayout_js__WEBPACK_IMPORTED_MODULE_9__["default"].XY, simplifiedEnds); + }; + /** + * Get the type of this geometry. + * @return {import("./GeometryType.js").default} Geometry type. + * @api + */ + + + Polygon.prototype.getType = function () { + return _GeometryType_js__WEBPACK_IMPORTED_MODULE_12__["default"].POLYGON; + }; + /** + * Test if the geometry and the passed extent intersect. + * @param {import("../extent.js").Extent} extent Extent. + * @return {boolean} `true` if the geometry and the extent intersect. + * @api + */ + + + Polygon.prototype.intersectsExtent = function (extent) { + return (0,_flat_intersectsextent_js__WEBPACK_IMPORTED_MODULE_13__.intersectsLinearRingArray)(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, extent); + }; + /** + * Set the coordinates of the polygon. + * @param {!Array>} coordinates Coordinates. + * @param {import("./GeometryLayout.js").default} [opt_layout] Layout. + * @api + */ + + + Polygon.prototype.setCoordinates = function (coordinates, opt_layout) { + this.setLayout(opt_layout, coordinates, 2); + + if (!this.flatCoordinates) { + this.flatCoordinates = []; + } + + var ends = (0,_flat_deflate_js__WEBPACK_IMPORTED_MODULE_14__.deflateCoordinatesArray)(this.flatCoordinates, 0, coordinates, this.stride, this.ends_); + this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1]; + this.changed(); + }; + + return Polygon; +}(_SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_15__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (Polygon); +/** + * Create an approximation of a circle on the surface of a sphere. + * @param {import("../coordinate.js").Coordinate} center Center (`[lon, lat]` in degrees). + * @param {number} radius The great-circle distance from the center to + * the polygon vertices in meters. + * @param {number} [opt_n] Optional number of vertices for the resulting + * polygon. Default is `32`. + * @param {number} [opt_sphereRadius] Optional radius for the sphere (defaults to + * the Earth's mean radius using the WGS84 ellipsoid). + * @return {Polygon} The "circular" polygon. + * @api + */ + +function circular(center, radius, opt_n, opt_sphereRadius) { + var n = opt_n ? opt_n : 32; + /** @type {Array} */ + + var flatCoordinates = []; + + for (var i = 0; i < n; ++i) { + (0,_array_js__WEBPACK_IMPORTED_MODULE_0__.extend)(flatCoordinates, (0,_sphere_js__WEBPACK_IMPORTED_MODULE_16__.offset)(center, radius, 2 * Math.PI * i / n, opt_sphereRadius)); + } + + flatCoordinates.push(flatCoordinates[0], flatCoordinates[1]); + return new Polygon(flatCoordinates, _GeometryLayout_js__WEBPACK_IMPORTED_MODULE_9__["default"].XY, [flatCoordinates.length]); +} +/** + * Create a polygon from an extent. The layout used is `XY`. + * @param {import("../extent.js").Extent} extent The extent. + * @return {Polygon} The polygon. + * @api + */ + +function fromExtent(extent) { + var minX = extent[0]; + var minY = extent[1]; + var maxX = extent[2]; + var maxY = extent[3]; + var flatCoordinates = [minX, minY, minX, maxY, maxX, maxY, maxX, minY, minX, minY]; + return new Polygon(flatCoordinates, _GeometryLayout_js__WEBPACK_IMPORTED_MODULE_9__["default"].XY, [flatCoordinates.length]); +} +/** + * Create a regular polygon from a circle. + * @param {import("./Circle.js").default} circle Circle geometry. + * @param {number} [opt_sides] Number of sides of the polygon. Default is 32. + * @param {number} [opt_angle] Start angle for the first vertex of the polygon in + * counter-clockwise radians. 0 means East. Default is 0. + * @return {Polygon} Polygon geometry. + * @api + */ + +function fromCircle(circle, opt_sides, opt_angle) { + var sides = opt_sides ? opt_sides : 32; + var stride = circle.getStride(); + var layout = circle.getLayout(); + var center = circle.getCenter(); + var arrayLength = stride * (sides + 1); + var flatCoordinates = new Array(arrayLength); + + for (var i = 0; i < arrayLength; i += stride) { + flatCoordinates[i] = 0; + flatCoordinates[i + 1] = 0; + + for (var j = 2; j < stride; j++) { + flatCoordinates[i + j] = center[j]; + } + } + + var ends = [flatCoordinates.length]; + var polygon = new Polygon(flatCoordinates, layout, ends); + makeRegular(polygon, center, circle.getRadius(), opt_angle); + return polygon; +} +/** + * Modify the coordinates of a polygon to make it a regular polygon. + * @param {Polygon} polygon Polygon geometry. + * @param {import("../coordinate.js").Coordinate} center Center of the regular polygon. + * @param {number} radius Radius of the regular polygon. + * @param {number} [opt_angle] Start angle for the first vertex of the polygon in + * counter-clockwise radians. 0 means East. Default is 0. + */ + +function makeRegular(polygon, center, radius, opt_angle) { + var flatCoordinates = polygon.getFlatCoordinates(); + var stride = polygon.getStride(); + var sides = flatCoordinates.length / stride - 1; + var startAngle = opt_angle ? opt_angle : 0; + + for (var i = 0; i <= sides; ++i) { + var offset = i * stride; + var angle = startAngle + (0,_math_js__WEBPACK_IMPORTED_MODULE_17__.modulo)(i, sides) * 2 * Math.PI / sides; + flatCoordinates[offset] = center[0] + radius * Math.cos(angle); + flatCoordinates[offset + 1] = center[1] + radius * Math.sin(angle); + } + + polygon.changed(); +} + +/***/ }), +/* 40 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "maxSquaredDelta": function() { return /* binding */ maxSquaredDelta; }, +/* harmony export */ "arrayMaxSquaredDelta": function() { return /* binding */ arrayMaxSquaredDelta; }, +/* harmony export */ "multiArrayMaxSquaredDelta": function() { return /* binding */ multiArrayMaxSquaredDelta; }, +/* harmony export */ "assignClosestPoint": function() { return /* binding */ assignClosestPoint; }, +/* harmony export */ "assignClosestArrayPoint": function() { return /* binding */ assignClosestArrayPoint; }, +/* harmony export */ "assignClosestMultiArrayPoint": function() { return /* binding */ assignClosestMultiArrayPoint; } +/* harmony export */ }); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9); +/** + * @module ol/geom/flat/closest + */ + +/** + * Returns the point on the 2D line segment flatCoordinates[offset1] to + * flatCoordinates[offset2] that is closest to the point (x, y). Extra + * dimensions are linearly interpolated. + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset1 Offset 1. + * @param {number} offset2 Offset 2. + * @param {number} stride Stride. + * @param {number} x X. + * @param {number} y Y. + * @param {Array} closestPoint Closest point. + */ + +function assignClosest(flatCoordinates, offset1, offset2, stride, x, y, closestPoint) { + var x1 = flatCoordinates[offset1]; + var y1 = flatCoordinates[offset1 + 1]; + var dx = flatCoordinates[offset2] - x1; + var dy = flatCoordinates[offset2 + 1] - y1; + var offset; + + if (dx === 0 && dy === 0) { + offset = offset1; + } else { + var t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy); + + if (t > 1) { + offset = offset2; + } else if (t > 0) { + for (var i = 0; i < stride; ++i) { + closestPoint[i] = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.lerp)(flatCoordinates[offset1 + i], flatCoordinates[offset2 + i], t); + } + + closestPoint.length = stride; + return; + } else { + offset = offset1; + } + } + + for (var i = 0; i < stride; ++i) { + closestPoint[i] = flatCoordinates[offset + i]; + } + + closestPoint.length = stride; +} +/** + * Return the squared of the largest distance between any pair of consecutive + * coordinates. + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {number} end End. + * @param {number} stride Stride. + * @param {number} max Max squared delta. + * @return {number} Max squared delta. + */ + + +function maxSquaredDelta(flatCoordinates, offset, end, stride, max) { + var x1 = flatCoordinates[offset]; + var y1 = flatCoordinates[offset + 1]; + + for (offset += stride; offset < end; offset += stride) { + var x2 = flatCoordinates[offset]; + var y2 = flatCoordinates[offset + 1]; + var squaredDelta = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.squaredDistance)(x1, y1, x2, y2); + + if (squaredDelta > max) { + max = squaredDelta; + } + + x1 = x2; + y1 = y2; + } + + return max; +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {Array} ends Ends. + * @param {number} stride Stride. + * @param {number} max Max squared delta. + * @return {number} Max squared delta. + */ + +function arrayMaxSquaredDelta(flatCoordinates, offset, ends, stride, max) { + for (var i = 0, ii = ends.length; i < ii; ++i) { + var end = ends[i]; + max = maxSquaredDelta(flatCoordinates, offset, end, stride, max); + offset = end; + } + + return max; +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {Array>} endss Endss. + * @param {number} stride Stride. + * @param {number} max Max squared delta. + * @return {number} Max squared delta. + */ + +function multiArrayMaxSquaredDelta(flatCoordinates, offset, endss, stride, max) { + for (var i = 0, ii = endss.length; i < ii; ++i) { + var ends = endss[i]; + max = arrayMaxSquaredDelta(flatCoordinates, offset, ends, stride, max); + offset = ends[ends.length - 1]; + } + + return max; +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {number} end End. + * @param {number} stride Stride. + * @param {number} maxDelta Max delta. + * @param {boolean} isRing Is ring. + * @param {number} x X. + * @param {number} y Y. + * @param {Array} closestPoint Closest point. + * @param {number} minSquaredDistance Minimum squared distance. + * @param {Array} [opt_tmpPoint] Temporary point object. + * @return {number} Minimum squared distance. + */ + +function assignClosestPoint(flatCoordinates, offset, end, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, opt_tmpPoint) { + if (offset == end) { + return minSquaredDistance; + } + + var i, squaredDistance; + + if (maxDelta === 0) { + // All points are identical, so just test the first point. + squaredDistance = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.squaredDistance)(x, y, flatCoordinates[offset], flatCoordinates[offset + 1]); + + if (squaredDistance < minSquaredDistance) { + for (i = 0; i < stride; ++i) { + closestPoint[i] = flatCoordinates[offset + i]; + } + + closestPoint.length = stride; + return squaredDistance; + } else { + return minSquaredDistance; + } + } + + var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN]; + var index = offset + stride; + + while (index < end) { + assignClosest(flatCoordinates, index - stride, index, stride, x, y, tmpPoint); + squaredDistance = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.squaredDistance)(x, y, tmpPoint[0], tmpPoint[1]); + + if (squaredDistance < minSquaredDistance) { + minSquaredDistance = squaredDistance; + + for (i = 0; i < stride; ++i) { + closestPoint[i] = tmpPoint[i]; + } + + closestPoint.length = stride; + index += stride; + } else { + // Skip ahead multiple points, because we know that all the skipped + // points cannot be any closer than the closest point we have found so + // far. We know this because we know how close the current point is, how + // close the closest point we have found so far is, and the maximum + // distance between consecutive points. For example, if we're currently + // at distance 10, the best we've found so far is 3, and that the maximum + // distance between consecutive points is 2, then we'll need to skip at + // least (10 - 3) / 2 == 3 (rounded down) points to have any chance of + // finding a closer point. We use Math.max(..., 1) to ensure that we + // always advance at least one point, to avoid an infinite loop. + index += stride * Math.max((Math.sqrt(squaredDistance) - Math.sqrt(minSquaredDistance)) / maxDelta | 0, 1); + } + } + + if (isRing) { + // Check the closing segment. + assignClosest(flatCoordinates, end - stride, offset, stride, x, y, tmpPoint); + squaredDistance = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.squaredDistance)(x, y, tmpPoint[0], tmpPoint[1]); + + if (squaredDistance < minSquaredDistance) { + minSquaredDistance = squaredDistance; + + for (i = 0; i < stride; ++i) { + closestPoint[i] = tmpPoint[i]; + } + + closestPoint.length = stride; + } + } + + return minSquaredDistance; +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {Array} ends Ends. + * @param {number} stride Stride. + * @param {number} maxDelta Max delta. + * @param {boolean} isRing Is ring. + * @param {number} x X. + * @param {number} y Y. + * @param {Array} closestPoint Closest point. + * @param {number} minSquaredDistance Minimum squared distance. + * @param {Array} [opt_tmpPoint] Temporary point object. + * @return {number} Minimum squared distance. + */ + +function assignClosestArrayPoint(flatCoordinates, offset, ends, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, opt_tmpPoint) { + var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN]; + + for (var i = 0, ii = ends.length; i < ii; ++i) { + var end = ends[i]; + minSquaredDistance = assignClosestPoint(flatCoordinates, offset, end, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, tmpPoint); + offset = end; + } + + return minSquaredDistance; +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {Array>} endss Endss. + * @param {number} stride Stride. + * @param {number} maxDelta Max delta. + * @param {boolean} isRing Is ring. + * @param {number} x X. + * @param {number} y Y. + * @param {Array} closestPoint Closest point. + * @param {number} minSquaredDistance Minimum squared distance. + * @param {Array} [opt_tmpPoint] Temporary point object. + * @return {number} Minimum squared distance. + */ + +function assignClosestMultiArrayPoint(flatCoordinates, offset, endss, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, opt_tmpPoint) { + var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN]; + + for (var i = 0, ii = endss.length; i < ii; ++i) { + var ends = endss[i]; + minSquaredDistance = assignClosestArrayPoint(flatCoordinates, offset, ends, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, tmpPoint); + offset = ends[ends.length - 1]; + } + + return minSquaredDistance; +} + +/***/ }), +/* 41 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "linearRingContainsExtent": function() { return /* binding */ linearRingContainsExtent; }, +/* harmony export */ "linearRingContainsXY": function() { return /* binding */ linearRingContainsXY; }, +/* harmony export */ "linearRingsContainsXY": function() { return /* binding */ linearRingsContainsXY; }, +/* harmony export */ "linearRingssContainsXY": function() { return /* binding */ linearRingssContainsXY; } +/* harmony export */ }); +/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11); +/** + * @module ol/geom/flat/contains + */ + +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {number} end End. + * @param {number} stride Stride. + * @param {import("../../extent.js").Extent} extent Extent. + * @return {boolean} Contains extent. + */ + +function linearRingContainsExtent(flatCoordinates, offset, end, stride, extent) { + var outside = (0,_extent_js__WEBPACK_IMPORTED_MODULE_0__.forEachCorner)(extent, + /** + * @param {import("../../coordinate.js").Coordinate} coordinate Coordinate. + * @return {boolean} Contains (x, y). + */ + function (coordinate) { + return !linearRingContainsXY(flatCoordinates, offset, end, stride, coordinate[0], coordinate[1]); + }); + return !outside; +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {number} end End. + * @param {number} stride Stride. + * @param {number} x X. + * @param {number} y Y. + * @return {boolean} Contains (x, y). + */ + +function linearRingContainsXY(flatCoordinates, offset, end, stride, x, y) { + // https://geomalgorithms.com/a03-_inclusion.html + // Copyright 2000 softSurfer, 2012 Dan Sunday + // This code may be freely used and modified for any purpose + // providing that this copyright notice is included with it. + // SoftSurfer makes no warranty for this code, and cannot be held + // liable for any real or imagined damage resulting from its use. + // Users of this code must verify correctness for their application. + var wn = 0; + var x1 = flatCoordinates[end - stride]; + var y1 = flatCoordinates[end - stride + 1]; + + for (; offset < end; offset += stride) { + var x2 = flatCoordinates[offset]; + var y2 = flatCoordinates[offset + 1]; + + if (y1 <= y) { + if (y2 > y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) > 0) { + wn++; + } + } else if (y2 <= y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) < 0) { + wn--; + } + + x1 = x2; + y1 = y2; + } + + return wn !== 0; +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {Array} ends Ends. + * @param {number} stride Stride. + * @param {number} x X. + * @param {number} y Y. + * @return {boolean} Contains (x, y). + */ + +function linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y) { + if (ends.length === 0) { + return false; + } + + if (!linearRingContainsXY(flatCoordinates, offset, ends[0], stride, x, y)) { + return false; + } + + for (var i = 1, ii = ends.length; i < ii; ++i) { + if (linearRingContainsXY(flatCoordinates, ends[i - 1], ends[i], stride, x, y)) { + return false; + } + } + + return true; +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {Array>} endss Endss. + * @param {number} stride Stride. + * @param {number} x X. + * @param {number} y Y. + * @return {boolean} Contains (x, y). + */ + +function linearRingssContainsXY(flatCoordinates, offset, endss, stride, x, y) { + if (endss.length === 0) { + return false; + } + + for (var i = 0, ii = endss.length; i < ii; ++i) { + var ends = endss[i]; + + if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) { + return true; + } + + offset = ends[ends.length - 1]; + } + + return false; +} + +/***/ }), +/* 42 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "linearRing": function() { return /* binding */ linearRing; }, +/* harmony export */ "linearRings": function() { return /* binding */ linearRings; }, +/* harmony export */ "linearRingss": function() { return /* binding */ linearRingss; } +/* harmony export */ }); +/** + * @module ol/geom/flat/area + */ + +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {number} end End. + * @param {number} stride Stride. + * @return {number} Area. + */ +function linearRing(flatCoordinates, offset, end, stride) { + var twiceArea = 0; + var x1 = flatCoordinates[end - stride]; + var y1 = flatCoordinates[end - stride + 1]; + + for (; offset < end; offset += stride) { + var x2 = flatCoordinates[offset]; + var y2 = flatCoordinates[offset + 1]; + twiceArea += y1 * x2 - x1 * y2; + x1 = x2; + y1 = y2; + } + + return twiceArea / 2; +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {Array} ends Ends. + * @param {number} stride Stride. + * @return {number} Area. + */ + +function linearRings(flatCoordinates, offset, ends, stride) { + var area = 0; + + for (var i = 0, ii = ends.length; i < ii; ++i) { + var end = ends[i]; + area += linearRing(flatCoordinates, offset, end, stride); + offset = end; + } + + return area; +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {Array>} endss Endss. + * @param {number} stride Stride. + * @return {number} Area. + */ + +function linearRingss(flatCoordinates, offset, endss, stride) { + var area = 0; + + for (var i = 0, ii = endss.length; i < ii; ++i) { + var ends = endss[i]; + area += linearRings(flatCoordinates, offset, ends, stride); + offset = ends[ends.length - 1]; + } + + return area; +} + +/***/ }), +/* 43 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "linearRingIsClockwise": function() { return /* binding */ linearRingIsClockwise; }, +/* harmony export */ "linearRingsAreOriented": function() { return /* binding */ linearRingsAreOriented; }, +/* harmony export */ "linearRingssAreOriented": function() { return /* binding */ linearRingssAreOriented; }, +/* harmony export */ "orientLinearRings": function() { return /* binding */ orientLinearRings; }, +/* harmony export */ "orientLinearRingsArray": function() { return /* binding */ orientLinearRingsArray; } +/* harmony export */ }); +/* harmony import */ var _reverse_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44); +/** + * @module ol/geom/flat/orient + */ + +/** + * Is the linear ring oriented clockwise in a coordinate system with a bottom-left + * coordinate origin? For a coordinate system with a top-left coordinate origin, + * the ring's orientation is clockwise when this function returns false. + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {number} end End. + * @param {number} stride Stride. + * @return {boolean} Is clockwise. + */ + +function linearRingIsClockwise(flatCoordinates, offset, end, stride) { + // https://stackoverflow.com/q/1165647/clockwise-method#1165943 + // https://github.com/OSGeo/gdal/blob/master/gdal/ogr/ogrlinearring.cpp + var edge = 0; + var x1 = flatCoordinates[end - stride]; + var y1 = flatCoordinates[end - stride + 1]; + + for (; offset < end; offset += stride) { + var x2 = flatCoordinates[offset]; + var y2 = flatCoordinates[offset + 1]; + edge += (x2 - x1) * (y2 + y1); + x1 = x2; + y1 = y2; + } + + return edge === 0 ? undefined : edge > 0; +} +/** + * Determines if linear rings are oriented. By default, left-hand orientation + * is tested (first ring must be clockwise, remaining rings counter-clockwise). + * To test for right-hand orientation, use the `opt_right` argument. + * + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {Array} ends Array of end indexes. + * @param {number} stride Stride. + * @param {boolean} [opt_right] Test for right-hand orientation + * (counter-clockwise exterior ring and clockwise interior rings). + * @return {boolean} Rings are correctly oriented. + */ + +function linearRingsAreOriented(flatCoordinates, offset, ends, stride, opt_right) { + var right = opt_right !== undefined ? opt_right : false; + + for (var i = 0, ii = ends.length; i < ii; ++i) { + var end = ends[i]; + var isClockwise = linearRingIsClockwise(flatCoordinates, offset, end, stride); + + if (i === 0) { + if (right && isClockwise || !right && !isClockwise) { + return false; + } + } else { + if (right && !isClockwise || !right && isClockwise) { + return false; + } + } + + offset = end; + } + + return true; +} +/** + * Determines if linear rings are oriented. By default, left-hand orientation + * is tested (first ring must be clockwise, remaining rings counter-clockwise). + * To test for right-hand orientation, use the `opt_right` argument. + * + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {Array>} endss Array of array of end indexes. + * @param {number} stride Stride. + * @param {boolean} [opt_right] Test for right-hand orientation + * (counter-clockwise exterior ring and clockwise interior rings). + * @return {boolean} Rings are correctly oriented. + */ + +function linearRingssAreOriented(flatCoordinates, offset, endss, stride, opt_right) { + for (var i = 0, ii = endss.length; i < ii; ++i) { + var ends = endss[i]; + + if (!linearRingsAreOriented(flatCoordinates, offset, ends, stride, opt_right)) { + return false; + } + + if (ends.length) { + offset = ends[ends.length - 1]; + } + } + + return true; +} +/** + * Orient coordinates in a flat array of linear rings. By default, rings + * are oriented following the left-hand rule (clockwise for exterior and + * counter-clockwise for interior rings). To orient according to the + * right-hand rule, use the `opt_right` argument. + * + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {Array} ends Ends. + * @param {number} stride Stride. + * @param {boolean} [opt_right] Follow the right-hand rule for orientation. + * @return {number} End. + */ + +function orientLinearRings(flatCoordinates, offset, ends, stride, opt_right) { + var right = opt_right !== undefined ? opt_right : false; + + for (var i = 0, ii = ends.length; i < ii; ++i) { + var end = ends[i]; + var isClockwise = linearRingIsClockwise(flatCoordinates, offset, end, stride); + var reverse = i === 0 ? right && isClockwise || !right && !isClockwise : right && !isClockwise || !right && isClockwise; + + if (reverse) { + (0,_reverse_js__WEBPACK_IMPORTED_MODULE_0__.coordinates)(flatCoordinates, offset, end, stride); + } + + offset = end; + } + + return offset; +} +/** + * Orient coordinates in a flat array of linear rings. By default, rings + * are oriented following the left-hand rule (clockwise for exterior and + * counter-clockwise for interior rings). To orient according to the + * right-hand rule, use the `opt_right` argument. + * + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {Array>} endss Array of array of end indexes. + * @param {number} stride Stride. + * @param {boolean} [opt_right] Follow the right-hand rule for orientation. + * @return {number} End. + */ + +function orientLinearRingsArray(flatCoordinates, offset, endss, stride, opt_right) { + for (var i = 0, ii = endss.length; i < ii; ++i) { + offset = orientLinearRings(flatCoordinates, offset, endss[i], stride, opt_right); + } + + return offset; +} + +/***/ }), +/* 44 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "coordinates": function() { return /* binding */ coordinates; } +/* harmony export */ }); +/** + * @module ol/geom/flat/reverse + */ + +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {number} end End. + * @param {number} stride Stride. + */ +function coordinates(flatCoordinates, offset, end, stride) { + while (offset < end - stride) { + for (var i = 0; i < stride; ++i) { + var tmp = flatCoordinates[offset + i]; + flatCoordinates[offset + i] = flatCoordinates[end - stride + i]; + flatCoordinates[end - stride + i] = tmp; + } + + offset += stride; + end -= stride; + } +} + +/***/ }), +/* 45 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "inflateCoordinates": function() { return /* binding */ inflateCoordinates; }, +/* harmony export */ "inflateCoordinatesArray": function() { return /* binding */ inflateCoordinatesArray; }, +/* harmony export */ "inflateMultiCoordinatesArray": function() { return /* binding */ inflateMultiCoordinatesArray; } +/* harmony export */ }); +/** + * @module ol/geom/flat/inflate + */ + +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {number} end End. + * @param {number} stride Stride. + * @param {Array} [opt_coordinates] Coordinates. + * @return {Array} Coordinates. + */ +function inflateCoordinates(flatCoordinates, offset, end, stride, opt_coordinates) { + var coordinates = opt_coordinates !== undefined ? opt_coordinates : []; + var i = 0; + + for (var j = offset; j < end; j += stride) { + coordinates[i++] = flatCoordinates.slice(j, j + stride); + } + + coordinates.length = i; + return coordinates; +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {Array} ends Ends. + * @param {number} stride Stride. + * @param {Array>} [opt_coordinatess] Coordinatess. + * @return {Array>} Coordinatess. + */ + +function inflateCoordinatesArray(flatCoordinates, offset, ends, stride, opt_coordinatess) { + var coordinatess = opt_coordinatess !== undefined ? opt_coordinatess : []; + var i = 0; + + for (var j = 0, jj = ends.length; j < jj; ++j) { + var end = ends[j]; + coordinatess[i++] = inflateCoordinates(flatCoordinates, offset, end, stride, coordinatess[i]); + offset = end; + } + + coordinatess.length = i; + return coordinatess; +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {Array>} endss Endss. + * @param {number} stride Stride. + * @param {Array>>} [opt_coordinatesss] + * Coordinatesss. + * @return {Array>>} Coordinatesss. + */ + +function inflateMultiCoordinatesArray(flatCoordinates, offset, endss, stride, opt_coordinatesss) { + var coordinatesss = opt_coordinatesss !== undefined ? opt_coordinatesss : []; + var i = 0; + + for (var j = 0, jj = endss.length; j < jj; ++j) { + var ends = endss[j]; + coordinatesss[i++] = inflateCoordinatesArray(flatCoordinates, offset, ends, stride, coordinatesss[i]); + offset = ends[ends.length - 1]; + } + + coordinatesss.length = i; + return coordinatesss; +} + +/***/ }), +/* 46 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "getInteriorPointOfArray": function() { return /* binding */ getInteriorPointOfArray; }, +/* harmony export */ "getInteriorPointsOfMultiArray": function() { return /* binding */ getInteriorPointsOfMultiArray; } +/* harmony export */ }); +/* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41); +/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(31); +/** + * @module ol/geom/flat/interiorpoint + */ + + +/** + * Calculates a point that is likely to lie in the interior of the linear rings. + * Inspired by JTS's com.vividsolutions.jts.geom.Geometry#getInteriorPoint. + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {Array} ends Ends. + * @param {number} stride Stride. + * @param {Array} flatCenters Flat centers. + * @param {number} flatCentersOffset Flat center offset. + * @param {Array} [opt_dest] Destination. + * @return {Array} Destination point as XYM coordinate, where M is the + * length of the horizontal intersection that the point belongs to. + */ + +function getInteriorPointOfArray(flatCoordinates, offset, ends, stride, flatCenters, flatCentersOffset, opt_dest) { + var i, ii, x, x1, x2, y1, y2; + var y = flatCenters[flatCentersOffset + 1]; + /** @type {Array} */ + + var intersections = []; // Calculate intersections with the horizontal line + + for (var r = 0, rr = ends.length; r < rr; ++r) { + var end = ends[r]; + x1 = flatCoordinates[end - stride]; + y1 = flatCoordinates[end - stride + 1]; + + for (i = offset; i < end; i += stride) { + x2 = flatCoordinates[i]; + y2 = flatCoordinates[i + 1]; + + if (y <= y1 && y2 <= y || y1 <= y && y <= y2) { + x = (y - y1) / (y2 - y1) * (x2 - x1) + x1; + intersections.push(x); + } + + x1 = x2; + y1 = y2; + } + } // Find the longest segment of the horizontal line that has its center point + // inside the linear ring. + + + var pointX = NaN; + var maxSegmentLength = -Infinity; + intersections.sort(_array_js__WEBPACK_IMPORTED_MODULE_0__.numberSafeCompareFunction); + x1 = intersections[0]; + + for (i = 1, ii = intersections.length; i < ii; ++i) { + x2 = intersections[i]; + var segmentLength = Math.abs(x2 - x1); + + if (segmentLength > maxSegmentLength) { + x = (x1 + x2) / 2; + + if ((0,_contains_js__WEBPACK_IMPORTED_MODULE_1__.linearRingsContainsXY)(flatCoordinates, offset, ends, stride, x, y)) { + pointX = x; + maxSegmentLength = segmentLength; + } + } + + x1 = x2; + } + + if (isNaN(pointX)) { + // There is no horizontal line that has its center point inside the linear + // ring. Use the center of the the linear ring's extent. + pointX = flatCenters[flatCentersOffset]; + } + + if (opt_dest) { + opt_dest.push(pointX, y, maxSegmentLength); + return opt_dest; + } else { + return [pointX, y, maxSegmentLength]; + } +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {Array>} endss Endss. + * @param {number} stride Stride. + * @param {Array} flatCenters Flat centers. + * @return {Array} Interior points as XYM coordinates, where M is the + * length of the horizontal intersection that the point belongs to. + */ + +function getInteriorPointsOfMultiArray(flatCoordinates, offset, endss, stride, flatCenters) { + var interiorPoints = []; + + for (var i = 0, ii = endss.length; i < ii; ++i) { + var ends = endss[i]; + interiorPoints = getInteriorPointOfArray(flatCoordinates, offset, ends, stride, flatCenters, 2 * i, interiorPoints); + offset = ends[ends.length - 1]; + } + + return interiorPoints; +} + +/***/ }), +/* 47 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _GeometryType_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10); +/* harmony import */ var _SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(49); +/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11); +/* harmony import */ var _flat_deflate_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(48); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/geom/Point + */ + + + + + + + +/** + * @classdesc + * Point geometry. + * + * @api + */ + +var Point = +/** @class */ +function (_super) { + __extends(Point, _super); + /** + * @param {import("../coordinate.js").Coordinate} coordinates Coordinates. + * @param {import("./GeometryLayout.js").default} [opt_layout] Layout. + */ + + + function Point(coordinates, opt_layout) { + var _this = _super.call(this) || this; + + _this.setCoordinates(coordinates, opt_layout); + + return _this; + } + /** + * Make a complete copy of the geometry. + * @return {!Point} Clone. + * @api + */ + + + Point.prototype.clone = function () { + var point = new Point(this.flatCoordinates.slice(), this.layout); + point.applyProperties(this); + return point; + }; + /** + * @param {number} x X. + * @param {number} y Y. + * @param {import("../coordinate.js").Coordinate} closestPoint Closest point. + * @param {number} minSquaredDistance Minimum squared distance. + * @return {number} Minimum squared distance. + */ + + + Point.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) { + var flatCoordinates = this.flatCoordinates; + var squaredDistance = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.squaredDistance)(x, y, flatCoordinates[0], flatCoordinates[1]); + + if (squaredDistance < minSquaredDistance) { + var stride = this.stride; + + for (var i = 0; i < stride; ++i) { + closestPoint[i] = flatCoordinates[i]; + } + + closestPoint.length = stride; + return squaredDistance; + } else { + return minSquaredDistance; + } + }; + /** + * Return the coordinate of the point. + * @return {import("../coordinate.js").Coordinate} Coordinates. + * @api + */ + + + Point.prototype.getCoordinates = function () { + return !this.flatCoordinates ? [] : this.flatCoordinates.slice(); + }; + /** + * @param {import("../extent.js").Extent} extent Extent. + * @protected + * @return {import("../extent.js").Extent} extent Extent. + */ + + + Point.prototype.computeExtent = function (extent) { + return (0,_extent_js__WEBPACK_IMPORTED_MODULE_1__.createOrUpdateFromCoordinate)(this.flatCoordinates, extent); + }; + /** + * Get the type of this geometry. + * @return {import("./GeometryType.js").default} Geometry type. + * @api + */ + + + Point.prototype.getType = function () { + return _GeometryType_js__WEBPACK_IMPORTED_MODULE_2__["default"].POINT; + }; + /** + * Test if the geometry and the passed extent intersect. + * @param {import("../extent.js").Extent} extent Extent. + * @return {boolean} `true` if the geometry and the extent intersect. + * @api + */ + + + Point.prototype.intersectsExtent = function (extent) { + return (0,_extent_js__WEBPACK_IMPORTED_MODULE_1__.containsXY)(extent, this.flatCoordinates[0], this.flatCoordinates[1]); + }; + /** + * @param {!Array<*>} coordinates Coordinates. + * @param {import("./GeometryLayout.js").default} [opt_layout] Layout. + * @api + */ + + + Point.prototype.setCoordinates = function (coordinates, opt_layout) { + this.setLayout(opt_layout, coordinates, 0); + + if (!this.flatCoordinates) { + this.flatCoordinates = []; + } + + this.flatCoordinates.length = (0,_flat_deflate_js__WEBPACK_IMPORTED_MODULE_3__.deflateCoordinate)(this.flatCoordinates, 0, coordinates, this.stride); + this.changed(); + }; + + return Point; +}(_SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_4__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (Point); + +/***/ }), +/* 48 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "deflateCoordinate": function() { return /* binding */ deflateCoordinate; }, +/* harmony export */ "deflateCoordinates": function() { return /* binding */ deflateCoordinates; }, +/* harmony export */ "deflateCoordinatesArray": function() { return /* binding */ deflateCoordinatesArray; }, +/* harmony export */ "deflateMultiCoordinatesArray": function() { return /* binding */ deflateMultiCoordinatesArray; } +/* harmony export */ }); +/** + * @module ol/geom/flat/deflate + */ + +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {import("../../coordinate.js").Coordinate} coordinate Coordinate. + * @param {number} stride Stride. + * @return {number} offset Offset. + */ +function deflateCoordinate(flatCoordinates, offset, coordinate, stride) { + for (var i = 0, ii = coordinate.length; i < ii; ++i) { + flatCoordinates[offset++] = coordinate[i]; + } + + return offset; +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {Array} coordinates Coordinates. + * @param {number} stride Stride. + * @return {number} offset Offset. + */ + +function deflateCoordinates(flatCoordinates, offset, coordinates, stride) { + for (var i = 0, ii = coordinates.length; i < ii; ++i) { + var coordinate = coordinates[i]; + + for (var j = 0; j < stride; ++j) { + flatCoordinates[offset++] = coordinate[j]; + } + } + + return offset; +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {Array>} coordinatess Coordinatess. + * @param {number} stride Stride. + * @param {Array} [opt_ends] Ends. + * @return {Array} Ends. + */ + +function deflateCoordinatesArray(flatCoordinates, offset, coordinatess, stride, opt_ends) { + var ends = opt_ends ? opt_ends : []; + var i = 0; + + for (var j = 0, jj = coordinatess.length; j < jj; ++j) { + var end = deflateCoordinates(flatCoordinates, offset, coordinatess[j], stride); + ends[i++] = end; + offset = end; + } + + ends.length = i; + return ends; +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {Array>>} coordinatesss Coordinatesss. + * @param {number} stride Stride. + * @param {Array>} [opt_endss] Endss. + * @return {Array>} Endss. + */ + +function deflateMultiCoordinatesArray(flatCoordinates, offset, coordinatesss, stride, opt_endss) { + var endss = opt_endss ? opt_endss : []; + var i = 0; + + for (var j = 0, jj = coordinatesss.length; j < jj; ++j) { + var ends = deflateCoordinatesArray(flatCoordinates, offset, coordinatesss[j], stride, endss[i]); + endss[i++] = ends; + offset = ends[ends.length - 1]; + } + + endss.length = i; + return endss; +} + +/***/ }), +/* 49 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "getStrideForLayout": function() { return /* binding */ getStrideForLayout; }, +/* harmony export */ "transformGeom2D": function() { return /* binding */ transformGeom2D; } +/* harmony export */ }); +/* harmony import */ var _Geometry_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(52); +/* harmony import */ var _GeometryLayout_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50); +/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16); +/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11); +/* harmony import */ var _flat_transform_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(51); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/geom/SimpleGeometry + */ + + + + + + + +/** + * @classdesc + * Abstract base class; only used for creating subclasses; do not instantiate + * in apps, as cannot be rendered. + * + * @abstract + * @api + */ + +var SimpleGeometry = +/** @class */ +function (_super) { + __extends(SimpleGeometry, _super); + + function SimpleGeometry() { + var _this = _super.call(this) || this; + /** + * @protected + * @type {import("./GeometryLayout.js").default} + */ + + + _this.layout = _GeometryLayout_js__WEBPACK_IMPORTED_MODULE_0__["default"].XY; + /** + * @protected + * @type {number} + */ + + _this.stride = 2; + /** + * @protected + * @type {Array} + */ + + _this.flatCoordinates = null; + return _this; + } + /** + * @param {import("../extent.js").Extent} extent Extent. + * @protected + * @return {import("../extent.js").Extent} extent Extent. + */ + + + SimpleGeometry.prototype.computeExtent = function (extent) { + return (0,_extent_js__WEBPACK_IMPORTED_MODULE_1__.createOrUpdateFromFlatCoordinates)(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, extent); + }; + /** + * @abstract + * @return {Array<*>} Coordinates. + */ + + + SimpleGeometry.prototype.getCoordinates = function () { + return (0,_util_js__WEBPACK_IMPORTED_MODULE_2__.abstract)(); + }; + /** + * Return the first coordinate of the geometry. + * @return {import("../coordinate.js").Coordinate} First coordinate. + * @api + */ + + + SimpleGeometry.prototype.getFirstCoordinate = function () { + return this.flatCoordinates.slice(0, this.stride); + }; + /** + * @return {Array} Flat coordinates. + */ + + + SimpleGeometry.prototype.getFlatCoordinates = function () { + return this.flatCoordinates; + }; + /** + * Return the last coordinate of the geometry. + * @return {import("../coordinate.js").Coordinate} Last point. + * @api + */ + + + SimpleGeometry.prototype.getLastCoordinate = function () { + return this.flatCoordinates.slice(this.flatCoordinates.length - this.stride); + }; + /** + * Return the {@link module:ol/geom/GeometryLayout layout} of the geometry. + * @return {import("./GeometryLayout.js").default} Layout. + * @api + */ + + + SimpleGeometry.prototype.getLayout = function () { + return this.layout; + }; + /** + * Create a simplified version of this geometry using the Douglas Peucker algorithm. + * @param {number} squaredTolerance Squared tolerance. + * @return {SimpleGeometry} Simplified geometry. + */ + + + SimpleGeometry.prototype.getSimplifiedGeometry = function (squaredTolerance) { + if (this.simplifiedGeometryRevision !== this.getRevision()) { + this.simplifiedGeometryMaxMinSquaredTolerance = 0; + this.simplifiedGeometryRevision = this.getRevision(); + } // If squaredTolerance is negative or if we know that simplification will not + // have any effect then just return this. + + + if (squaredTolerance < 0 || this.simplifiedGeometryMaxMinSquaredTolerance !== 0 && squaredTolerance <= this.simplifiedGeometryMaxMinSquaredTolerance) { + return this; + } + + var simplifiedGeometry = this.getSimplifiedGeometryInternal(squaredTolerance); + var simplifiedFlatCoordinates = simplifiedGeometry.getFlatCoordinates(); + + if (simplifiedFlatCoordinates.length < this.flatCoordinates.length) { + return simplifiedGeometry; + } else { + // Simplification did not actually remove any coordinates. We now know + // that any calls to getSimplifiedGeometry with a squaredTolerance less + // than or equal to the current squaredTolerance will also not have any + // effect. This allows us to short circuit simplification (saving CPU + // cycles) and prevents the cache of simplified geometries from filling + // up with useless identical copies of this geometry (saving memory). + this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance; + return this; + } + }; + /** + * @param {number} squaredTolerance Squared tolerance. + * @return {SimpleGeometry} Simplified geometry. + * @protected + */ + + + SimpleGeometry.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) { + return this; + }; + /** + * @return {number} Stride. + */ + + + SimpleGeometry.prototype.getStride = function () { + return this.stride; + }; + /** + * @param {import("./GeometryLayout.js").default} layout Layout. + * @param {Array} flatCoordinates Flat coordinates. + */ + + + SimpleGeometry.prototype.setFlatCoordinates = function (layout, flatCoordinates) { + this.stride = getStrideForLayout(layout); + this.layout = layout; + this.flatCoordinates = flatCoordinates; + }; + /** + * @abstract + * @param {!Array<*>} coordinates Coordinates. + * @param {import("./GeometryLayout.js").default} [opt_layout] Layout. + */ + + + SimpleGeometry.prototype.setCoordinates = function (coordinates, opt_layout) { + (0,_util_js__WEBPACK_IMPORTED_MODULE_2__.abstract)(); + }; + /** + * @param {import("./GeometryLayout.js").default|undefined} layout Layout. + * @param {Array<*>} coordinates Coordinates. + * @param {number} nesting Nesting. + * @protected + */ + + + SimpleGeometry.prototype.setLayout = function (layout, coordinates, nesting) { + /** @type {number} */ + var stride; + + if (layout) { + stride = getStrideForLayout(layout); + } else { + for (var i = 0; i < nesting; ++i) { + if (coordinates.length === 0) { + this.layout = _GeometryLayout_js__WEBPACK_IMPORTED_MODULE_0__["default"].XY; + this.stride = 2; + return; + } else { + coordinates = + /** @type {Array} */ + coordinates[0]; + } + } + + stride = coordinates.length; + layout = getLayoutForStride(stride); + } + + this.layout = layout; + this.stride = stride; + }; + /** + * Apply a transform function to the coordinates of the geometry. + * The geometry is modified in place. + * If you do not want the geometry modified in place, first `clone()` it and + * then use this function on the clone. + * @param {import("../proj.js").TransformFunction} transformFn Transform function. + * Called with a flat array of geometry coordinates. + * @api + */ + + + SimpleGeometry.prototype.applyTransform = function (transformFn) { + if (this.flatCoordinates) { + transformFn(this.flatCoordinates, this.flatCoordinates, this.stride); + this.changed(); + } + }; + /** + * Rotate the geometry around a given coordinate. This modifies the geometry + * coordinates in place. + * @param {number} angle Rotation angle in counter-clockwise radians. + * @param {import("../coordinate.js").Coordinate} anchor The rotation center. + * @api + */ + + + SimpleGeometry.prototype.rotate = function (angle, anchor) { + var flatCoordinates = this.getFlatCoordinates(); + + if (flatCoordinates) { + var stride = this.getStride(); + (0,_flat_transform_js__WEBPACK_IMPORTED_MODULE_3__.rotate)(flatCoordinates, 0, flatCoordinates.length, stride, angle, anchor, flatCoordinates); + this.changed(); + } + }; + /** + * Scale the geometry (with an optional origin). This modifies the geometry + * coordinates in place. + * @param {number} sx The scaling factor in the x-direction. + * @param {number} [opt_sy] The scaling factor in the y-direction (defaults to sx). + * @param {import("../coordinate.js").Coordinate} [opt_anchor] The scale origin (defaults to the center + * of the geometry extent). + * @api + */ + + + SimpleGeometry.prototype.scale = function (sx, opt_sy, opt_anchor) { + var sy = opt_sy; + + if (sy === undefined) { + sy = sx; + } + + var anchor = opt_anchor; + + if (!anchor) { + anchor = (0,_extent_js__WEBPACK_IMPORTED_MODULE_1__.getCenter)(this.getExtent()); + } + + var flatCoordinates = this.getFlatCoordinates(); + + if (flatCoordinates) { + var stride = this.getStride(); + (0,_flat_transform_js__WEBPACK_IMPORTED_MODULE_3__.scale)(flatCoordinates, 0, flatCoordinates.length, stride, sx, sy, anchor, flatCoordinates); + this.changed(); + } + }; + /** + * Translate the geometry. This modifies the geometry coordinates in place. If + * instead you want a new geometry, first `clone()` this geometry. + * @param {number} deltaX Delta X. + * @param {number} deltaY Delta Y. + * @api + */ + + + SimpleGeometry.prototype.translate = function (deltaX, deltaY) { + var flatCoordinates = this.getFlatCoordinates(); + + if (flatCoordinates) { + var stride = this.getStride(); + (0,_flat_transform_js__WEBPACK_IMPORTED_MODULE_3__.translate)(flatCoordinates, 0, flatCoordinates.length, stride, deltaX, deltaY, flatCoordinates); + this.changed(); + } + }; + + return SimpleGeometry; +}(_Geometry_js__WEBPACK_IMPORTED_MODULE_4__["default"]); +/** + * @param {number} stride Stride. + * @return {import("./GeometryLayout.js").default} layout Layout. + */ + + +function getLayoutForStride(stride) { + var layout; + + if (stride == 2) { + layout = _GeometryLayout_js__WEBPACK_IMPORTED_MODULE_0__["default"].XY; + } else if (stride == 3) { + layout = _GeometryLayout_js__WEBPACK_IMPORTED_MODULE_0__["default"].XYZ; + } else if (stride == 4) { + layout = _GeometryLayout_js__WEBPACK_IMPORTED_MODULE_0__["default"].XYZM; + } + + return ( + /** @type {import("./GeometryLayout.js").default} */ + layout + ); +} +/** + * @param {import("./GeometryLayout.js").default} layout Layout. + * @return {number} Stride. + */ + + +function getStrideForLayout(layout) { + var stride; + + if (layout == _GeometryLayout_js__WEBPACK_IMPORTED_MODULE_0__["default"].XY) { + stride = 2; + } else if (layout == _GeometryLayout_js__WEBPACK_IMPORTED_MODULE_0__["default"].XYZ || layout == _GeometryLayout_js__WEBPACK_IMPORTED_MODULE_0__["default"].XYM) { + stride = 3; + } else if (layout == _GeometryLayout_js__WEBPACK_IMPORTED_MODULE_0__["default"].XYZM) { + stride = 4; + } + + return ( + /** @type {number} */ + stride + ); +} +/** + * @param {SimpleGeometry} simpleGeometry Simple geometry. + * @param {import("../transform.js").Transform} transform Transform. + * @param {Array} [opt_dest] Destination. + * @return {Array} Transformed flat coordinates. + */ + +function transformGeom2D(simpleGeometry, transform, opt_dest) { + var flatCoordinates = simpleGeometry.getFlatCoordinates(); + + if (!flatCoordinates) { + return null; + } else { + var stride = simpleGeometry.getStride(); + return (0,_flat_transform_js__WEBPACK_IMPORTED_MODULE_3__.transform2D)(flatCoordinates, 0, flatCoordinates.length, stride, transform, opt_dest); + } +} +/* harmony default export */ __webpack_exports__["default"] = (SimpleGeometry); + +/***/ }), +/* 50 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * @module ol/geom/GeometryLayout + */ + +/** + * The coordinate layout for geometries, indicating whether a 3rd or 4th z ('Z') + * or measure ('M') coordinate is available. Supported values are `'XY'`, + * `'XYZ'`, `'XYM'`, `'XYZM'`. + * @enum {string} + */ +/* harmony default export */ __webpack_exports__["default"] = ({ + XY: 'XY', + XYZ: 'XYZ', + XYM: 'XYM', + XYZM: 'XYZM' +}); + +/***/ }), +/* 51 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "transform2D": function() { return /* binding */ transform2D; }, +/* harmony export */ "rotate": function() { return /* binding */ rotate; }, +/* harmony export */ "scale": function() { return /* binding */ scale; }, +/* harmony export */ "translate": function() { return /* binding */ translate; } +/* harmony export */ }); +/** + * @module ol/geom/flat/transform + */ + +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {number} end End. + * @param {number} stride Stride. + * @param {import("../../transform.js").Transform} transform Transform. + * @param {Array} [opt_dest] Destination. + * @return {Array} Transformed coordinates. + */ +function transform2D(flatCoordinates, offset, end, stride, transform, opt_dest) { + var dest = opt_dest ? opt_dest : []; + var i = 0; + + for (var j = offset; j < end; j += stride) { + var x = flatCoordinates[j]; + var y = flatCoordinates[j + 1]; + dest[i++] = transform[0] * x + transform[2] * y + transform[4]; + dest[i++] = transform[1] * x + transform[3] * y + transform[5]; + } + + if (opt_dest && dest.length != i) { + dest.length = i; + } + + return dest; +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {number} end End. + * @param {number} stride Stride. + * @param {number} angle Angle. + * @param {Array} anchor Rotation anchor point. + * @param {Array} [opt_dest] Destination. + * @return {Array} Transformed coordinates. + */ + +function rotate(flatCoordinates, offset, end, stride, angle, anchor, opt_dest) { + var dest = opt_dest ? opt_dest : []; + var cos = Math.cos(angle); + var sin = Math.sin(angle); + var anchorX = anchor[0]; + var anchorY = anchor[1]; + var i = 0; + + for (var j = offset; j < end; j += stride) { + var deltaX = flatCoordinates[j] - anchorX; + var deltaY = flatCoordinates[j + 1] - anchorY; + dest[i++] = anchorX + deltaX * cos - deltaY * sin; + dest[i++] = anchorY + deltaX * sin + deltaY * cos; + + for (var k = j + 2; k < j + stride; ++k) { + dest[i++] = flatCoordinates[k]; + } + } + + if (opt_dest && dest.length != i) { + dest.length = i; + } + + return dest; +} +/** + * Scale the coordinates. + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {number} end End. + * @param {number} stride Stride. + * @param {number} sx Scale factor in the x-direction. + * @param {number} sy Scale factor in the y-direction. + * @param {Array} anchor Scale anchor point. + * @param {Array} [opt_dest] Destination. + * @return {Array} Transformed coordinates. + */ + +function scale(flatCoordinates, offset, end, stride, sx, sy, anchor, opt_dest) { + var dest = opt_dest ? opt_dest : []; + var anchorX = anchor[0]; + var anchorY = anchor[1]; + var i = 0; + + for (var j = offset; j < end; j += stride) { + var deltaX = flatCoordinates[j] - anchorX; + var deltaY = flatCoordinates[j + 1] - anchorY; + dest[i++] = anchorX + sx * deltaX; + dest[i++] = anchorY + sy * deltaY; + + for (var k = j + 2; k < j + stride; ++k) { + dest[i++] = flatCoordinates[k]; + } + } + + if (opt_dest && dest.length != i) { + dest.length = i; + } + + return dest; +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {number} end End. + * @param {number} stride Stride. + * @param {number} deltaX Delta X. + * @param {number} deltaY Delta Y. + * @param {Array} [opt_dest] Destination. + * @return {Array} Transformed coordinates. + */ + +function translate(flatCoordinates, offset, end, stride, deltaX, deltaY, opt_dest) { + var dest = opt_dest ? opt_dest : []; + var i = 0; + + for (var j = offset; j < end; j += stride) { + dest[i++] = flatCoordinates[j] + deltaX; + dest[i++] = flatCoordinates[j + 1] + deltaY; + + for (var k = j + 2; k < j + stride; ++k) { + dest[i++] = flatCoordinates[k]; + } + } + + if (opt_dest && dest.length != i) { + dest.length = i; + } + + return dest; +} + +/***/ }), +/* 52 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Object_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(24); +/* harmony import */ var _proj_Units_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3); +/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(16); +/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(53); +/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11); +/* harmony import */ var _proj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(30); +/* harmony import */ var _flat_transform_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(51); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/geom/Geometry + */ + + + + + + + + + + +/** + * @type {import("../transform.js").Transform} + */ + +var tmpTransform = (0,_transform_js__WEBPACK_IMPORTED_MODULE_1__.create)(); +/** + * @classdesc + * Abstract base class; normally only used for creating subclasses and not + * instantiated in apps. + * Base class for vector geometries. + * + * To get notified of changes to the geometry, register a listener for the + * generic `change` event on your geometry instance. + * + * @abstract + * @api + */ + +var Geometry = +/** @class */ +function (_super) { + __extends(Geometry, _super); + + function Geometry() { + var _this = _super.call(this) || this; + /** + * @private + * @type {import("../extent.js").Extent} + */ + + + _this.extent_ = (0,_extent_js__WEBPACK_IMPORTED_MODULE_2__.createEmpty)(); + /** + * @private + * @type {number} + */ + + _this.extentRevision_ = -1; + /** + * @protected + * @type {number} + */ + + _this.simplifiedGeometryMaxMinSquaredTolerance = 0; + /** + * @protected + * @type {number} + */ + + _this.simplifiedGeometryRevision = 0; + /** + * Get a transformed and simplified version of the geometry. + * @abstract + * @param {number} revision The geometry revision. + * @param {number} squaredTolerance Squared tolerance. + * @param {import("../proj.js").TransformFunction} [opt_transform] Optional transform function. + * @return {Geometry} Simplified geometry. + */ + + _this.simplifyTransformedInternal = (0,_functions_js__WEBPACK_IMPORTED_MODULE_3__.memoizeOne)(function (revision, squaredTolerance, opt_transform) { + if (!opt_transform) { + return this.getSimplifiedGeometry(squaredTolerance); + } + + var clone = this.clone(); + clone.applyTransform(opt_transform); + return clone.getSimplifiedGeometry(squaredTolerance); + }); + return _this; + } + /** + * Get a transformed and simplified version of the geometry. + * @abstract + * @param {number} squaredTolerance Squared tolerance. + * @param {import("../proj.js").TransformFunction} [opt_transform] Optional transform function. + * @return {Geometry} Simplified geometry. + */ + + + Geometry.prototype.simplifyTransformed = function (squaredTolerance, opt_transform) { + return this.simplifyTransformedInternal(this.getRevision(), squaredTolerance, opt_transform); + }; + /** + * Make a complete copy of the geometry. + * @abstract + * @return {!Geometry} Clone. + */ + + + Geometry.prototype.clone = function () { + return (0,_util_js__WEBPACK_IMPORTED_MODULE_4__.abstract)(); + }; + /** + * @abstract + * @param {number} x X. + * @param {number} y Y. + * @param {import("../coordinate.js").Coordinate} closestPoint Closest point. + * @param {number} minSquaredDistance Minimum squared distance. + * @return {number} Minimum squared distance. + */ + + + Geometry.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) { + return (0,_util_js__WEBPACK_IMPORTED_MODULE_4__.abstract)(); + }; + /** + * @param {number} x X. + * @param {number} y Y. + * @return {boolean} Contains (x, y). + */ + + + Geometry.prototype.containsXY = function (x, y) { + var coord = this.getClosestPoint([x, y]); + return coord[0] === x && coord[1] === y; + }; + /** + * Return the closest point of the geometry to the passed point as + * {@link module:ol/coordinate~Coordinate coordinate}. + * @param {import("../coordinate.js").Coordinate} point Point. + * @param {import("../coordinate.js").Coordinate} [opt_closestPoint] Closest point. + * @return {import("../coordinate.js").Coordinate} Closest point. + * @api + */ + + + Geometry.prototype.getClosestPoint = function (point, opt_closestPoint) { + var closestPoint = opt_closestPoint ? opt_closestPoint : [NaN, NaN]; + this.closestPointXY(point[0], point[1], closestPoint, Infinity); + return closestPoint; + }; + /** + * Returns true if this geometry includes the specified coordinate. If the + * coordinate is on the boundary of the geometry, returns false. + * @param {import("../coordinate.js").Coordinate} coordinate Coordinate. + * @return {boolean} Contains coordinate. + * @api + */ + + + Geometry.prototype.intersectsCoordinate = function (coordinate) { + return this.containsXY(coordinate[0], coordinate[1]); + }; + /** + * @abstract + * @param {import("../extent.js").Extent} extent Extent. + * @protected + * @return {import("../extent.js").Extent} extent Extent. + */ + + + Geometry.prototype.computeExtent = function (extent) { + return (0,_util_js__WEBPACK_IMPORTED_MODULE_4__.abstract)(); + }; + /** + * Get the extent of the geometry. + * @param {import("../extent.js").Extent} [opt_extent] Extent. + * @return {import("../extent.js").Extent} extent Extent. + * @api + */ + + + Geometry.prototype.getExtent = function (opt_extent) { + if (this.extentRevision_ != this.getRevision()) { + var extent = this.computeExtent(this.extent_); + + if (isNaN(extent[0]) || isNaN(extent[1])) { + (0,_extent_js__WEBPACK_IMPORTED_MODULE_2__.createOrUpdateEmpty)(extent); + } + + this.extentRevision_ = this.getRevision(); + } + + return (0,_extent_js__WEBPACK_IMPORTED_MODULE_2__.returnOrUpdate)(this.extent_, opt_extent); + }; + /** + * Rotate the geometry around a given coordinate. This modifies the geometry + * coordinates in place. + * @abstract + * @param {number} angle Rotation angle in radians. + * @param {import("../coordinate.js").Coordinate} anchor The rotation center. + * @api + */ + + + Geometry.prototype.rotate = function (angle, anchor) { + (0,_util_js__WEBPACK_IMPORTED_MODULE_4__.abstract)(); + }; + /** + * Scale the geometry (with an optional origin). This modifies the geometry + * coordinates in place. + * @abstract + * @param {number} sx The scaling factor in the x-direction. + * @param {number} [opt_sy] The scaling factor in the y-direction (defaults to sx). + * @param {import("../coordinate.js").Coordinate} [opt_anchor] The scale origin (defaults to the center + * of the geometry extent). + * @api + */ + + + Geometry.prototype.scale = function (sx, opt_sy, opt_anchor) { + (0,_util_js__WEBPACK_IMPORTED_MODULE_4__.abstract)(); + }; + /** + * Create a simplified version of this geometry. For linestrings, this uses + * the [Douglas Peucker](https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm) + * algorithm. For polygons, a quantization-based + * simplification is used to preserve topology. + * @param {number} tolerance The tolerance distance for simplification. + * @return {Geometry} A new, simplified version of the original geometry. + * @api + */ + + + Geometry.prototype.simplify = function (tolerance) { + return this.getSimplifiedGeometry(tolerance * tolerance); + }; + /** + * Create a simplified version of this geometry using the Douglas Peucker + * algorithm. + * See https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm. + * @abstract + * @param {number} squaredTolerance Squared tolerance. + * @return {Geometry} Simplified geometry. + */ + + + Geometry.prototype.getSimplifiedGeometry = function (squaredTolerance) { + return (0,_util_js__WEBPACK_IMPORTED_MODULE_4__.abstract)(); + }; + /** + * Get the type of this geometry. + * @abstract + * @return {import("./GeometryType.js").default} Geometry type. + */ + + + Geometry.prototype.getType = function () { + return (0,_util_js__WEBPACK_IMPORTED_MODULE_4__.abstract)(); + }; + /** + * Apply a transform function to the coordinates of the geometry. + * The geometry is modified in place. + * If you do not want the geometry modified in place, first `clone()` it and + * then use this function on the clone. + * @abstract + * @param {import("../proj.js").TransformFunction} transformFn Transform function. + * Called with a flat array of geometry coordinates. + */ + + + Geometry.prototype.applyTransform = function (transformFn) { + (0,_util_js__WEBPACK_IMPORTED_MODULE_4__.abstract)(); + }; + /** + * Test if the geometry and the passed extent intersect. + * @abstract + * @param {import("../extent.js").Extent} extent Extent. + * @return {boolean} `true` if the geometry and the extent intersect. + */ + + + Geometry.prototype.intersectsExtent = function (extent) { + return (0,_util_js__WEBPACK_IMPORTED_MODULE_4__.abstract)(); + }; + /** + * Translate the geometry. This modifies the geometry coordinates in place. If + * instead you want a new geometry, first `clone()` this geometry. + * @abstract + * @param {number} deltaX Delta X. + * @param {number} deltaY Delta Y. + * @api + */ + + + Geometry.prototype.translate = function (deltaX, deltaY) { + (0,_util_js__WEBPACK_IMPORTED_MODULE_4__.abstract)(); + }; + /** + * Transform each coordinate of the geometry from one coordinate reference + * system to another. The geometry is modified in place. + * For example, a line will be transformed to a line and a circle to a circle. + * If you do not want the geometry modified in place, first `clone()` it and + * then use this function on the clone. + * + * @param {import("../proj.js").ProjectionLike} source The current projection. Can be a + * string identifier or a {@link module:ol/proj/Projection~Projection} object. + * @param {import("../proj.js").ProjectionLike} destination The desired projection. Can be a + * string identifier or a {@link module:ol/proj/Projection~Projection} object. + * @return {Geometry} This geometry. Note that original geometry is + * modified in place. + * @api + */ + + + Geometry.prototype.transform = function (source, destination) { + /** @type {import("../proj/Projection.js").default} */ + var sourceProj = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.get)(source); + var transformFn = sourceProj.getUnits() == _proj_Units_js__WEBPACK_IMPORTED_MODULE_5__["default"].TILE_PIXELS ? function (inCoordinates, outCoordinates, stride) { + var pixelExtent = sourceProj.getExtent(); + var projectedExtent = sourceProj.getWorldExtent(); + var scale = (0,_extent_js__WEBPACK_IMPORTED_MODULE_2__.getHeight)(projectedExtent) / (0,_extent_js__WEBPACK_IMPORTED_MODULE_2__.getHeight)(pixelExtent); + (0,_transform_js__WEBPACK_IMPORTED_MODULE_1__.compose)(tmpTransform, projectedExtent[0], projectedExtent[3], scale, -scale, 0, 0, 0); + (0,_flat_transform_js__WEBPACK_IMPORTED_MODULE_6__.transform2D)(inCoordinates, 0, inCoordinates.length, stride, tmpTransform, outCoordinates); + return (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getTransform)(sourceProj, destination)(inCoordinates, outCoordinates, stride); + } : (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getTransform)(sourceProj, destination); + this.applyTransform(transformFn); + return this; + }; + + return Geometry; +}(_Object_js__WEBPACK_IMPORTED_MODULE_7__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (Geometry); + +/***/ }), +/* 53 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "create": function() { return /* binding */ create; }, +/* harmony export */ "reset": function() { return /* binding */ reset; }, +/* harmony export */ "multiply": function() { return /* binding */ multiply; }, +/* harmony export */ "set": function() { return /* binding */ set; }, +/* harmony export */ "setFromArray": function() { return /* binding */ setFromArray; }, +/* harmony export */ "apply": function() { return /* binding */ apply; }, +/* harmony export */ "rotate": function() { return /* binding */ rotate; }, +/* harmony export */ "scale": function() { return /* binding */ scale; }, +/* harmony export */ "makeScale": function() { return /* binding */ makeScale; }, +/* harmony export */ "translate": function() { return /* binding */ translate; }, +/* harmony export */ "compose": function() { return /* binding */ compose; }, +/* harmony export */ "composeCssTransform": function() { return /* binding */ composeCssTransform; }, +/* harmony export */ "invert": function() { return /* binding */ invert; }, +/* harmony export */ "makeInverse": function() { return /* binding */ makeInverse; }, +/* harmony export */ "determinant": function() { return /* binding */ determinant; }, +/* harmony export */ "toString": function() { return /* binding */ toString; } +/* harmony export */ }); +/* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(54); +/* harmony import */ var _asserts_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14); +/** + * @module ol/transform + */ + + +/** + * An array representing an affine 2d transformation for use with + * {@link module:ol/transform} functions. The array has 6 elements. + * @typedef {!Array} Transform + * @api + */ + +/** + * Collection of affine 2d transformation functions. The functions work on an + * array of 6 elements. The element order is compatible with the [SVGMatrix + * interface](https://developer.mozilla.org/en-US/docs/Web/API/SVGMatrix) and is + * a subset (elements a to f) of a 3×3 matrix: + * ``` + * [ a c e ] + * [ b d f ] + * [ 0 0 1 ] + * ``` + */ + +/** + * @private + * @type {Transform} + */ + +var tmp_ = new Array(6); +/** + * Create an identity transform. + * @return {!Transform} Identity transform. + */ + +function create() { + return [1, 0, 0, 1, 0, 0]; +} +/** + * Resets the given transform to an identity transform. + * @param {!Transform} transform Transform. + * @return {!Transform} Transform. + */ + +function reset(transform) { + return set(transform, 1, 0, 0, 1, 0, 0); +} +/** + * Multiply the underlying matrices of two transforms and return the result in + * the first transform. + * @param {!Transform} transform1 Transform parameters of matrix 1. + * @param {!Transform} transform2 Transform parameters of matrix 2. + * @return {!Transform} transform1 multiplied with transform2. + */ + +function multiply(transform1, transform2) { + var a1 = transform1[0]; + var b1 = transform1[1]; + var c1 = transform1[2]; + var d1 = transform1[3]; + var e1 = transform1[4]; + var f1 = transform1[5]; + var a2 = transform2[0]; + var b2 = transform2[1]; + var c2 = transform2[2]; + var d2 = transform2[3]; + var e2 = transform2[4]; + var f2 = transform2[5]; + transform1[0] = a1 * a2 + c1 * b2; + transform1[1] = b1 * a2 + d1 * b2; + transform1[2] = a1 * c2 + c1 * d2; + transform1[3] = b1 * c2 + d1 * d2; + transform1[4] = a1 * e2 + c1 * f2 + e1; + transform1[5] = b1 * e2 + d1 * f2 + f1; + return transform1; +} +/** + * Set the transform components a-f on a given transform. + * @param {!Transform} transform Transform. + * @param {number} a The a component of the transform. + * @param {number} b The b component of the transform. + * @param {number} c The c component of the transform. + * @param {number} d The d component of the transform. + * @param {number} e The e component of the transform. + * @param {number} f The f component of the transform. + * @return {!Transform} Matrix with transform applied. + */ + +function set(transform, a, b, c, d, e, f) { + transform[0] = a; + transform[1] = b; + transform[2] = c; + transform[3] = d; + transform[4] = e; + transform[5] = f; + return transform; +} +/** + * Set transform on one matrix from another matrix. + * @param {!Transform} transform1 Matrix to set transform to. + * @param {!Transform} transform2 Matrix to set transform from. + * @return {!Transform} transform1 with transform from transform2 applied. + */ + +function setFromArray(transform1, transform2) { + transform1[0] = transform2[0]; + transform1[1] = transform2[1]; + transform1[2] = transform2[2]; + transform1[3] = transform2[3]; + transform1[4] = transform2[4]; + transform1[5] = transform2[5]; + return transform1; +} +/** + * Transforms the given coordinate with the given transform returning the + * resulting, transformed coordinate. The coordinate will be modified in-place. + * + * @param {Transform} transform The transformation. + * @param {import("./coordinate.js").Coordinate|import("./pixel.js").Pixel} coordinate The coordinate to transform. + * @return {import("./coordinate.js").Coordinate|import("./pixel.js").Pixel} return coordinate so that operations can be + * chained together. + */ + +function apply(transform, coordinate) { + var x = coordinate[0]; + var y = coordinate[1]; + coordinate[0] = transform[0] * x + transform[2] * y + transform[4]; + coordinate[1] = transform[1] * x + transform[3] * y + transform[5]; + return coordinate; +} +/** + * Applies rotation to the given transform. + * @param {!Transform} transform Transform. + * @param {number} angle Angle in radians. + * @return {!Transform} The rotated transform. + */ + +function rotate(transform, angle) { + var cos = Math.cos(angle); + var sin = Math.sin(angle); + return multiply(transform, set(tmp_, cos, sin, -sin, cos, 0, 0)); +} +/** + * Applies scale to a given transform. + * @param {!Transform} transform Transform. + * @param {number} x Scale factor x. + * @param {number} y Scale factor y. + * @return {!Transform} The scaled transform. + */ + +function scale(transform, x, y) { + return multiply(transform, set(tmp_, x, 0, 0, y, 0, 0)); +} +/** + * Creates a scale transform. + * @param {!Transform} target Transform to overwrite. + * @param {number} x Scale factor x. + * @param {number} y Scale factor y. + * @return {!Transform} The scale transform. + */ + +function makeScale(target, x, y) { + return set(target, x, 0, 0, y, 0, 0); +} +/** + * Applies translation to the given transform. + * @param {!Transform} transform Transform. + * @param {number} dx Translation x. + * @param {number} dy Translation y. + * @return {!Transform} The translated transform. + */ + +function translate(transform, dx, dy) { + return multiply(transform, set(tmp_, 1, 0, 0, 1, dx, dy)); +} +/** + * Creates a composite transform given an initial translation, scale, rotation, and + * final translation (in that order only, not commutative). + * @param {!Transform} transform The transform (will be modified in place). + * @param {number} dx1 Initial translation x. + * @param {number} dy1 Initial translation y. + * @param {number} sx Scale factor x. + * @param {number} sy Scale factor y. + * @param {number} angle Rotation (in counter-clockwise radians). + * @param {number} dx2 Final translation x. + * @param {number} dy2 Final translation y. + * @return {!Transform} The composite transform. + */ + +function compose(transform, dx1, dy1, sx, sy, angle, dx2, dy2) { + var sin = Math.sin(angle); + var cos = Math.cos(angle); + transform[0] = sx * cos; + transform[1] = sy * sin; + transform[2] = -sx * sin; + transform[3] = sy * cos; + transform[4] = dx2 * sx * cos - dy2 * sx * sin + dx1; + transform[5] = dx2 * sy * sin + dy2 * sy * cos + dy1; + return transform; +} +/** + * Creates a composite transform given an initial translation, scale, rotation, and + * final translation (in that order only, not commutative). The resulting transform + * string can be applied as `transform` property of an HTMLElement's style. + * @param {number} dx1 Initial translation x. + * @param {number} dy1 Initial translation y. + * @param {number} sx Scale factor x. + * @param {number} sy Scale factor y. + * @param {number} angle Rotation (in counter-clockwise radians). + * @param {number} dx2 Final translation x. + * @param {number} dy2 Final translation y. + * @return {string} The composite css transform. + * @api + */ + +function composeCssTransform(dx1, dy1, sx, sy, angle, dx2, dy2) { + return toString(compose(create(), dx1, dy1, sx, sy, angle, dx2, dy2)); +} +/** + * Invert the given transform. + * @param {!Transform} source The source transform to invert. + * @return {!Transform} The inverted (source) transform. + */ + +function invert(source) { + return makeInverse(source, source); +} +/** + * Invert the given transform. + * @param {!Transform} target Transform to be set as the inverse of + * the source transform. + * @param {!Transform} source The source transform to invert. + * @return {!Transform} The inverted (target) transform. + */ + +function makeInverse(target, source) { + var det = determinant(source); + (0,_asserts_js__WEBPACK_IMPORTED_MODULE_0__.assert)(det !== 0, 32); // Transformation matrix cannot be inverted + + var a = source[0]; + var b = source[1]; + var c = source[2]; + var d = source[3]; + var e = source[4]; + var f = source[5]; + target[0] = d / det; + target[1] = -b / det; + target[2] = -c / det; + target[3] = a / det; + target[4] = (c * f - d * e) / det; + target[5] = -(a * f - b * e) / det; + return target; +} +/** + * Returns the determinant of the given matrix. + * @param {!Transform} mat Matrix. + * @return {number} Determinant. + */ + +function determinant(mat) { + return mat[0] * mat[3] - mat[1] * mat[2]; +} +/** + * @type {HTMLElement} + * @private + */ + +var transformStringDiv; +/** + * A rounded string version of the transform. This can be used + * for CSS transforms. + * @param {!Transform} mat Matrix. + * @return {string} The transform as a string. + */ + +function toString(mat) { + var transformString = 'matrix(' + mat.join(', ') + ')'; + + if (_has_js__WEBPACK_IMPORTED_MODULE_1__.WORKER_OFFSCREEN_CANVAS) { + return transformString; + } + + var node = transformStringDiv || (transformStringDiv = document.createElement('div')); + node.style.transform = transformString; + return node.style.transform; +} + +/***/ }), +/* 54 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "FIREFOX": function() { return /* binding */ FIREFOX; }, +/* harmony export */ "SAFARI": function() { return /* binding */ SAFARI; }, +/* harmony export */ "WEBKIT": function() { return /* binding */ WEBKIT; }, +/* harmony export */ "MAC": function() { return /* binding */ MAC; }, +/* harmony export */ "DEVICE_PIXEL_RATIO": function() { return /* binding */ DEVICE_PIXEL_RATIO; }, +/* harmony export */ "WORKER_OFFSCREEN_CANVAS": function() { return /* binding */ WORKER_OFFSCREEN_CANVAS; }, +/* harmony export */ "IMAGE_DECODE": function() { return /* binding */ IMAGE_DECODE; }, +/* harmony export */ "PASSIVE_EVENT_LISTENERS": function() { return /* binding */ PASSIVE_EVENT_LISTENERS; } +/* harmony export */ }); +/** + * @module ol/has + */ +var ua = typeof navigator !== 'undefined' && typeof navigator.userAgent !== 'undefined' ? navigator.userAgent.toLowerCase() : ''; +/** + * User agent string says we are dealing with Firefox as browser. + * @type {boolean} + */ + +var FIREFOX = ua.indexOf('firefox') !== -1; +/** + * User agent string says we are dealing with Safari as browser. + * @type {boolean} + */ + +var SAFARI = ua.indexOf('safari') !== -1 && ua.indexOf('chrom') == -1; +/** + * User agent string says we are dealing with a WebKit engine. + * @type {boolean} + */ + +var WEBKIT = ua.indexOf('webkit') !== -1 && ua.indexOf('edge') == -1; +/** + * User agent string says we are dealing with a Mac as platform. + * @type {boolean} + */ + +var MAC = ua.indexOf('macintosh') !== -1; +/** + * The ratio between physical pixels and device-independent pixels + * (dips) on the device (`window.devicePixelRatio`). + * @const + * @type {number} + * @api + */ + +var DEVICE_PIXEL_RATIO = typeof devicePixelRatio !== 'undefined' ? devicePixelRatio : 1; +/** + * The execution context is a worker with OffscreenCanvas available. + * @const + * @type {boolean} + */ + +var WORKER_OFFSCREEN_CANVAS = typeof WorkerGlobalScope !== 'undefined' && typeof OffscreenCanvas !== 'undefined' && self instanceof WorkerGlobalScope; //eslint-disable-line + +/** + * Image.prototype.decode() is supported. + * @type {boolean} + */ + +var IMAGE_DECODE = typeof Image !== 'undefined' && Image.prototype.decode; +/** + * @type {boolean} + */ + +var PASSIVE_EVENT_LISTENERS = function () { + var passive = false; + + try { + var options = Object.defineProperty({}, 'passive', { + get: function get() { + passive = true; + } + }); + window.addEventListener('_', null, options); + window.removeEventListener('_', null, options); + } catch (error) {// passive not supported + } + + return passive; +}(); + +/***/ }), +/* 55 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _GeometryLayout_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50); +/* harmony import */ var _GeometryType_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(10); +/* harmony import */ var _SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(49); +/* harmony import */ var _flat_closest_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(40); +/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11); +/* harmony import */ var _flat_deflate_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(48); +/* harmony import */ var _flat_simplify_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(56); +/* harmony import */ var _flat_inflate_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(45); +/* harmony import */ var _flat_area_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/geom/LinearRing + */ + + + + + + + + + + + +/** + * @classdesc + * Linear ring geometry. Only used as part of polygon; cannot be rendered + * on its own. + * + * @api + */ + +var LinearRing = +/** @class */ +function (_super) { + __extends(LinearRing, _super); + /** + * @param {Array|Array} coordinates Coordinates. + * For internal use, flat coordinates in combination with `opt_layout` are also accepted. + * @param {import("./GeometryLayout.js").default} [opt_layout] Layout. + */ + + + function LinearRing(coordinates, opt_layout) { + var _this = _super.call(this) || this; + /** + * @private + * @type {number} + */ + + + _this.maxDelta_ = -1; + /** + * @private + * @type {number} + */ + + _this.maxDeltaRevision_ = -1; + + if (opt_layout !== undefined && !Array.isArray(coordinates[0])) { + _this.setFlatCoordinates(opt_layout, + /** @type {Array} */ + coordinates); + } else { + _this.setCoordinates( + /** @type {Array} */ + coordinates, opt_layout); + } + + return _this; + } + /** + * Make a complete copy of the geometry. + * @return {!LinearRing} Clone. + * @api + */ + + + LinearRing.prototype.clone = function () { + return new LinearRing(this.flatCoordinates.slice(), this.layout); + }; + /** + * @param {number} x X. + * @param {number} y Y. + * @param {import("../coordinate.js").Coordinate} closestPoint Closest point. + * @param {number} minSquaredDistance Minimum squared distance. + * @return {number} Minimum squared distance. + */ + + + LinearRing.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) { + if (minSquaredDistance < (0,_extent_js__WEBPACK_IMPORTED_MODULE_0__.closestSquaredDistanceXY)(this.getExtent(), x, y)) { + return minSquaredDistance; + } + + if (this.maxDeltaRevision_ != this.getRevision()) { + this.maxDelta_ = Math.sqrt((0,_flat_closest_js__WEBPACK_IMPORTED_MODULE_1__.maxSquaredDelta)(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0)); + this.maxDeltaRevision_ = this.getRevision(); + } + + return (0,_flat_closest_js__WEBPACK_IMPORTED_MODULE_1__.assignClosestPoint)(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, this.maxDelta_, true, x, y, closestPoint, minSquaredDistance); + }; + /** + * Return the area of the linear ring on projected plane. + * @return {number} Area (on projected plane). + * @api + */ + + + LinearRing.prototype.getArea = function () { + return (0,_flat_area_js__WEBPACK_IMPORTED_MODULE_2__.linearRing)(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride); + }; + /** + * Return the coordinates of the linear ring. + * @return {Array} Coordinates. + * @api + */ + + + LinearRing.prototype.getCoordinates = function () { + return (0,_flat_inflate_js__WEBPACK_IMPORTED_MODULE_3__.inflateCoordinates)(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride); + }; + /** + * @param {number} squaredTolerance Squared tolerance. + * @return {LinearRing} Simplified LinearRing. + * @protected + */ + + + LinearRing.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) { + var simplifiedFlatCoordinates = []; + simplifiedFlatCoordinates.length = (0,_flat_simplify_js__WEBPACK_IMPORTED_MODULE_4__.douglasPeucker)(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, squaredTolerance, simplifiedFlatCoordinates, 0); + return new LinearRing(simplifiedFlatCoordinates, _GeometryLayout_js__WEBPACK_IMPORTED_MODULE_5__["default"].XY); + }; + /** + * Get the type of this geometry. + * @return {import("./GeometryType.js").default} Geometry type. + * @api + */ + + + LinearRing.prototype.getType = function () { + return _GeometryType_js__WEBPACK_IMPORTED_MODULE_6__["default"].LINEAR_RING; + }; + /** + * Test if the geometry and the passed extent intersect. + * @param {import("../extent.js").Extent} extent Extent. + * @return {boolean} `true` if the geometry and the extent intersect. + * @api + */ + + + LinearRing.prototype.intersectsExtent = function (extent) { + return false; + }; + /** + * Set the coordinates of the linear ring. + * @param {!Array} coordinates Coordinates. + * @param {import("./GeometryLayout.js").default} [opt_layout] Layout. + * @api + */ + + + LinearRing.prototype.setCoordinates = function (coordinates, opt_layout) { + this.setLayout(opt_layout, coordinates, 1); + + if (!this.flatCoordinates) { + this.flatCoordinates = []; + } + + this.flatCoordinates.length = (0,_flat_deflate_js__WEBPACK_IMPORTED_MODULE_7__.deflateCoordinates)(this.flatCoordinates, 0, coordinates, this.stride); + this.changed(); + }; + + return LinearRing; +}(_SimpleGeometry_js__WEBPACK_IMPORTED_MODULE_8__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (LinearRing); + +/***/ }), +/* 56 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "simplifyLineString": function() { return /* binding */ simplifyLineString; }, +/* harmony export */ "douglasPeucker": function() { return /* binding */ douglasPeucker; }, +/* harmony export */ "douglasPeuckerArray": function() { return /* binding */ douglasPeuckerArray; }, +/* harmony export */ "douglasPeuckerMultiArray": function() { return /* binding */ douglasPeuckerMultiArray; }, +/* harmony export */ "radialDistance": function() { return /* binding */ radialDistance; }, +/* harmony export */ "snap": function() { return /* binding */ snap; }, +/* harmony export */ "quantize": function() { return /* binding */ quantize; }, +/* harmony export */ "quantizeArray": function() { return /* binding */ quantizeArray; }, +/* harmony export */ "quantizeMultiArray": function() { return /* binding */ quantizeMultiArray; } +/* harmony export */ }); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9); +/** + * @module ol/geom/flat/simplify + */ +// Based on simplify-js https://github.com/mourner/simplify-js +// Copyright (c) 2012, Vladimir Agafonkin +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. + +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {number} end End. + * @param {number} stride Stride. + * @param {number} squaredTolerance Squared tolerance. + * @param {boolean} highQuality Highest quality. + * @param {Array} [opt_simplifiedFlatCoordinates] Simplified flat + * coordinates. + * @return {Array} Simplified line string. + */ + +function simplifyLineString(flatCoordinates, offset, end, stride, squaredTolerance, highQuality, opt_simplifiedFlatCoordinates) { + var simplifiedFlatCoordinates = opt_simplifiedFlatCoordinates !== undefined ? opt_simplifiedFlatCoordinates : []; + + if (!highQuality) { + end = radialDistance(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, 0); + flatCoordinates = simplifiedFlatCoordinates; + offset = 0; + stride = 2; + } + + simplifiedFlatCoordinates.length = douglasPeucker(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, 0); + return simplifiedFlatCoordinates; +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {number} end End. + * @param {number} stride Stride. + * @param {number} squaredTolerance Squared tolerance. + * @param {Array} simplifiedFlatCoordinates Simplified flat + * coordinates. + * @param {number} simplifiedOffset Simplified offset. + * @return {number} Simplified offset. + */ + +function douglasPeucker(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset) { + var n = (end - offset) / stride; + + if (n < 3) { + for (; offset < end; offset += stride) { + simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset]; + simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset + 1]; + } + + return simplifiedOffset; + } + /** @type {Array} */ + + + var markers = new Array(n); + markers[0] = 1; + markers[n - 1] = 1; + /** @type {Array} */ + + var stack = [offset, end - stride]; + var index = 0; + + while (stack.length > 0) { + var last = stack.pop(); + var first = stack.pop(); + var maxSquaredDistance = 0; + var x1 = flatCoordinates[first]; + var y1 = flatCoordinates[first + 1]; + var x2 = flatCoordinates[last]; + var y2 = flatCoordinates[last + 1]; + + for (var i = first + stride; i < last; i += stride) { + var x = flatCoordinates[i]; + var y = flatCoordinates[i + 1]; + var squaredDistance_1 = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.squaredSegmentDistance)(x, y, x1, y1, x2, y2); + + if (squaredDistance_1 > maxSquaredDistance) { + index = i; + maxSquaredDistance = squaredDistance_1; + } + } + + if (maxSquaredDistance > squaredTolerance) { + markers[(index - offset) / stride] = 1; + + if (first + stride < index) { + stack.push(first, index); + } + + if (index + stride < last) { + stack.push(index, last); + } + } + } + + for (var i = 0; i < n; ++i) { + if (markers[i]) { + simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset + i * stride]; + simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset + i * stride + 1]; + } + } + + return simplifiedOffset; +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {Array} ends Ends. + * @param {number} stride Stride. + * @param {number} squaredTolerance Squared tolerance. + * @param {Array} simplifiedFlatCoordinates Simplified flat + * coordinates. + * @param {number} simplifiedOffset Simplified offset. + * @param {Array} simplifiedEnds Simplified ends. + * @return {number} Simplified offset. + */ + +function douglasPeuckerArray(flatCoordinates, offset, ends, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds) { + for (var i = 0, ii = ends.length; i < ii; ++i) { + var end = ends[i]; + simplifiedOffset = douglasPeucker(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset); + simplifiedEnds.push(simplifiedOffset); + offset = end; + } + + return simplifiedOffset; +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {Array>} endss Endss. + * @param {number} stride Stride. + * @param {number} squaredTolerance Squared tolerance. + * @param {Array} simplifiedFlatCoordinates Simplified flat + * coordinates. + * @param {number} simplifiedOffset Simplified offset. + * @param {Array>} simplifiedEndss Simplified endss. + * @return {number} Simplified offset. + */ + +function douglasPeuckerMultiArray(flatCoordinates, offset, endss, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEndss) { + for (var i = 0, ii = endss.length; i < ii; ++i) { + var ends = endss[i]; + var simplifiedEnds = []; + simplifiedOffset = douglasPeuckerArray(flatCoordinates, offset, ends, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds); + simplifiedEndss.push(simplifiedEnds); + offset = ends[ends.length - 1]; + } + + return simplifiedOffset; +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {number} end End. + * @param {number} stride Stride. + * @param {number} squaredTolerance Squared tolerance. + * @param {Array} simplifiedFlatCoordinates Simplified flat + * coordinates. + * @param {number} simplifiedOffset Simplified offset. + * @return {number} Simplified offset. + */ + +function radialDistance(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset) { + if (end <= offset + stride) { + // zero or one point, no simplification possible, so copy and return + for (; offset < end; offset += stride) { + simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset]; + simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset + 1]; + } + + return simplifiedOffset; + } + + var x1 = flatCoordinates[offset]; + var y1 = flatCoordinates[offset + 1]; // copy first point + + simplifiedFlatCoordinates[simplifiedOffset++] = x1; + simplifiedFlatCoordinates[simplifiedOffset++] = y1; + var x2 = x1; + var y2 = y1; + + for (offset += stride; offset < end; offset += stride) { + x2 = flatCoordinates[offset]; + y2 = flatCoordinates[offset + 1]; + + if ((0,_math_js__WEBPACK_IMPORTED_MODULE_0__.squaredDistance)(x1, y1, x2, y2) > squaredTolerance) { + // copy point at offset + simplifiedFlatCoordinates[simplifiedOffset++] = x2; + simplifiedFlatCoordinates[simplifiedOffset++] = y2; + x1 = x2; + y1 = y2; + } + } + + if (x2 != x1 || y2 != y1) { + // copy last point + simplifiedFlatCoordinates[simplifiedOffset++] = x2; + simplifiedFlatCoordinates[simplifiedOffset++] = y2; + } + + return simplifiedOffset; +} +/** + * @param {number} value Value. + * @param {number} tolerance Tolerance. + * @return {number} Rounded value. + */ + +function snap(value, tolerance) { + return tolerance * Math.round(value / tolerance); +} +/** + * Simplifies a line string using an algorithm designed by Tim Schaub. + * Coordinates are snapped to the nearest value in a virtual grid and + * consecutive duplicate coordinates are discarded. This effectively preserves + * topology as the simplification of any subsection of a line string is + * independent of the rest of the line string. This means that, for examples, + * the common edge between two polygons will be simplified to the same line + * string independently in both polygons. This implementation uses a single + * pass over the coordinates and eliminates intermediate collinear points. + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {number} end End. + * @param {number} stride Stride. + * @param {number} tolerance Tolerance. + * @param {Array} simplifiedFlatCoordinates Simplified flat + * coordinates. + * @param {number} simplifiedOffset Simplified offset. + * @return {number} Simplified offset. + */ + +function quantize(flatCoordinates, offset, end, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset) { + // do nothing if the line is empty + if (offset == end) { + return simplifiedOffset; + } // snap the first coordinate (P1) + + + var x1 = snap(flatCoordinates[offset], tolerance); + var y1 = snap(flatCoordinates[offset + 1], tolerance); + offset += stride; // add the first coordinate to the output + + simplifiedFlatCoordinates[simplifiedOffset++] = x1; + simplifiedFlatCoordinates[simplifiedOffset++] = y1; // find the next coordinate that does not snap to the same value as the first + // coordinate (P2) + + var x2, y2; + + do { + x2 = snap(flatCoordinates[offset], tolerance); + y2 = snap(flatCoordinates[offset + 1], tolerance); + offset += stride; + + if (offset == end) { + // all coordinates snap to the same value, the line collapses to a point + // push the last snapped value anyway to ensure that the output contains + // at least two points + // FIXME should we really return at least two points anyway? + simplifiedFlatCoordinates[simplifiedOffset++] = x2; + simplifiedFlatCoordinates[simplifiedOffset++] = y2; + return simplifiedOffset; + } + } while (x2 == x1 && y2 == y1); + + while (offset < end) { + // snap the next coordinate (P3) + var x3 = snap(flatCoordinates[offset], tolerance); + var y3 = snap(flatCoordinates[offset + 1], tolerance); + offset += stride; // skip P3 if it is equal to P2 + + if (x3 == x2 && y3 == y2) { + continue; + } // calculate the delta between P1 and P2 + + + var dx1 = x2 - x1; + var dy1 = y2 - y1; // calculate the delta between P3 and P1 + + var dx2 = x3 - x1; + var dy2 = y3 - y1; // if P1, P2, and P3 are colinear and P3 is further from P1 than P2 is from + // P1 in the same direction then P2 is on the straight line between P1 and + // P3 + + if (dx1 * dy2 == dy1 * dx2 && (dx1 < 0 && dx2 < dx1 || dx1 == dx2 || dx1 > 0 && dx2 > dx1) && (dy1 < 0 && dy2 < dy1 || dy1 == dy2 || dy1 > 0 && dy2 > dy1)) { + // discard P2 and set P2 = P3 + x2 = x3; + y2 = y3; + continue; + } // either P1, P2, and P3 are not colinear, or they are colinear but P3 is + // between P3 and P1 or on the opposite half of the line to P2. add P2, + // and continue with P1 = P2 and P2 = P3 + + + simplifiedFlatCoordinates[simplifiedOffset++] = x2; + simplifiedFlatCoordinates[simplifiedOffset++] = y2; + x1 = x2; + y1 = y2; + x2 = x3; + y2 = y3; + } // add the last point (P2) + + + simplifiedFlatCoordinates[simplifiedOffset++] = x2; + simplifiedFlatCoordinates[simplifiedOffset++] = y2; + return simplifiedOffset; +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {Array} ends Ends. + * @param {number} stride Stride. + * @param {number} tolerance Tolerance. + * @param {Array} simplifiedFlatCoordinates Simplified flat + * coordinates. + * @param {number} simplifiedOffset Simplified offset. + * @param {Array} simplifiedEnds Simplified ends. + * @return {number} Simplified offset. + */ + +function quantizeArray(flatCoordinates, offset, ends, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds) { + for (var i = 0, ii = ends.length; i < ii; ++i) { + var end = ends[i]; + simplifiedOffset = quantize(flatCoordinates, offset, end, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset); + simplifiedEnds.push(simplifiedOffset); + offset = end; + } + + return simplifiedOffset; +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {Array>} endss Endss. + * @param {number} stride Stride. + * @param {number} tolerance Tolerance. + * @param {Array} simplifiedFlatCoordinates Simplified flat + * coordinates. + * @param {number} simplifiedOffset Simplified offset. + * @param {Array>} simplifiedEndss Simplified endss. + * @return {number} Simplified offset. + */ + +function quantizeMultiArray(flatCoordinates, offset, endss, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEndss) { + for (var i = 0, ii = endss.length; i < ii; ++i) { + var ends = endss[i]; + var simplifiedEnds = []; + simplifiedOffset = quantizeArray(flatCoordinates, offset, ends, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds); + simplifiedEndss.push(simplifiedEnds); + offset = ends[ends.length - 1]; + } + + return simplifiedOffset; +} + +/***/ }), +/* 57 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "intersectsLineString": function() { return /* binding */ intersectsLineString; }, +/* harmony export */ "intersectsLineStringArray": function() { return /* binding */ intersectsLineStringArray; }, +/* harmony export */ "intersectsLinearRing": function() { return /* binding */ intersectsLinearRing; }, +/* harmony export */ "intersectsLinearRingArray": function() { return /* binding */ intersectsLinearRingArray; }, +/* harmony export */ "intersectsLinearRingMultiArray": function() { return /* binding */ intersectsLinearRingMultiArray; } +/* harmony export */ }); +/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11); +/* harmony import */ var _segments_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58); +/* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41); +/** + * @module ol/geom/flat/intersectsextent + */ + + + +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {number} end End. + * @param {number} stride Stride. + * @param {import("../../extent.js").Extent} extent Extent. + * @return {boolean} True if the geometry and the extent intersect. + */ + +function intersectsLineString(flatCoordinates, offset, end, stride, extent) { + var coordinatesExtent = (0,_extent_js__WEBPACK_IMPORTED_MODULE_0__.extendFlatCoordinates)((0,_extent_js__WEBPACK_IMPORTED_MODULE_0__.createEmpty)(), flatCoordinates, offset, end, stride); + + if (!(0,_extent_js__WEBPACK_IMPORTED_MODULE_0__.intersects)(extent, coordinatesExtent)) { + return false; + } + + if ((0,_extent_js__WEBPACK_IMPORTED_MODULE_0__.containsExtent)(extent, coordinatesExtent)) { + return true; + } + + if (coordinatesExtent[0] >= extent[0] && coordinatesExtent[2] <= extent[2]) { + return true; + } + + if (coordinatesExtent[1] >= extent[1] && coordinatesExtent[3] <= extent[3]) { + return true; + } + + return (0,_segments_js__WEBPACK_IMPORTED_MODULE_1__.forEach)(flatCoordinates, offset, end, stride, + /** + * @param {import("../../coordinate.js").Coordinate} point1 Start point. + * @param {import("../../coordinate.js").Coordinate} point2 End point. + * @return {boolean} `true` if the segment and the extent intersect, + * `false` otherwise. + */ + function (point1, point2) { + return (0,_extent_js__WEBPACK_IMPORTED_MODULE_0__.intersectsSegment)(extent, point1, point2); + }); +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {Array} ends Ends. + * @param {number} stride Stride. + * @param {import("../../extent.js").Extent} extent Extent. + * @return {boolean} True if the geometry and the extent intersect. + */ + +function intersectsLineStringArray(flatCoordinates, offset, ends, stride, extent) { + for (var i = 0, ii = ends.length; i < ii; ++i) { + if (intersectsLineString(flatCoordinates, offset, ends[i], stride, extent)) { + return true; + } + + offset = ends[i]; + } + + return false; +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {number} end End. + * @param {number} stride Stride. + * @param {import("../../extent.js").Extent} extent Extent. + * @return {boolean} True if the geometry and the extent intersect. + */ + +function intersectsLinearRing(flatCoordinates, offset, end, stride, extent) { + if (intersectsLineString(flatCoordinates, offset, end, stride, extent)) { + return true; + } + + if ((0,_contains_js__WEBPACK_IMPORTED_MODULE_2__.linearRingContainsXY)(flatCoordinates, offset, end, stride, extent[0], extent[1])) { + return true; + } + + if ((0,_contains_js__WEBPACK_IMPORTED_MODULE_2__.linearRingContainsXY)(flatCoordinates, offset, end, stride, extent[0], extent[3])) { + return true; + } + + if ((0,_contains_js__WEBPACK_IMPORTED_MODULE_2__.linearRingContainsXY)(flatCoordinates, offset, end, stride, extent[2], extent[1])) { + return true; + } + + if ((0,_contains_js__WEBPACK_IMPORTED_MODULE_2__.linearRingContainsXY)(flatCoordinates, offset, end, stride, extent[2], extent[3])) { + return true; + } + + return false; +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {Array} ends Ends. + * @param {number} stride Stride. + * @param {import("../../extent.js").Extent} extent Extent. + * @return {boolean} True if the geometry and the extent intersect. + */ + +function intersectsLinearRingArray(flatCoordinates, offset, ends, stride, extent) { + if (!intersectsLinearRing(flatCoordinates, offset, ends[0], stride, extent)) { + return false; + } + + if (ends.length === 1) { + return true; + } + + for (var i = 1, ii = ends.length; i < ii; ++i) { + if ((0,_contains_js__WEBPACK_IMPORTED_MODULE_2__.linearRingContainsExtent)(flatCoordinates, ends[i - 1], ends[i], stride, extent)) { + if (!intersectsLineString(flatCoordinates, ends[i - 1], ends[i], stride, extent)) { + return false; + } + } + } + + return true; +} +/** + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {Array>} endss Endss. + * @param {number} stride Stride. + * @param {import("../../extent.js").Extent} extent Extent. + * @return {boolean} True if the geometry and the extent intersect. + */ + +function intersectsLinearRingMultiArray(flatCoordinates, offset, endss, stride, extent) { + for (var i = 0, ii = endss.length; i < ii; ++i) { + var ends = endss[i]; + + if (intersectsLinearRingArray(flatCoordinates, offset, ends, stride, extent)) { + return true; + } + + offset = ends[ends.length - 1]; + } + + return false; +} + +/***/ }), +/* 58 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "forEach": function() { return /* binding */ forEach; } +/* harmony export */ }); +/** + * @module ol/geom/flat/segments + */ + +/** + * This function calls `callback` for each segment of the flat coordinates + * array. If the callback returns a truthy value the function returns that + * value immediately. Otherwise the function returns `false`. + * @param {Array} flatCoordinates Flat coordinates. + * @param {number} offset Offset. + * @param {number} end End. + * @param {number} stride Stride. + * @param {function(import("../../coordinate.js").Coordinate, import("../../coordinate.js").Coordinate): T} callback Function + * called for each segment. + * @return {T|boolean} Value. + * @template T + */ +function forEach(flatCoordinates, offset, end, stride, callback) { + var ret; + offset += stride; + + for (; offset < end; offset += stride) { + ret = callback(flatCoordinates.slice(offset - stride, offset), flatCoordinates.slice(offset, offset + stride)); + + if (ret) { + return ret; + } + } + + return false; +} + +/***/ }), +/* 59 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "listenImage": function() { return /* binding */ listenImage; } +/* harmony export */ }); +/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(27); +/* harmony import */ var _ImageBase_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(61); +/* harmony import */ var _ImageState_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(60); +/* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(54); +/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11); +/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(28); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/Image + */ + + + + + + + + +/** + * A function that takes an {@link module:ol/Image~Image} for the image and a + * `{string}` for the src as arguments. It is supposed to make it so the + * underlying image {@link module:ol/Image~Image#getImage} is assigned the + * content specified by the src. If not specified, the default is + * + * function(image, src) { + * image.getImage().src = src; + * } + * + * Providing a custom `imageLoadFunction` can be useful to load images with + * post requests or - in general - through XHR requests, where the src of the + * image element would be set to a data URI when the content is loaded. + * + * @typedef {function(ImageWrapper, string): void} LoadFunction + * @api + */ + +var ImageWrapper = +/** @class */ +function (_super) { + __extends(ImageWrapper, _super); + /** + * @param {import("./extent.js").Extent} extent Extent. + * @param {number|undefined} resolution Resolution. + * @param {number} pixelRatio Pixel ratio. + * @param {string} src Image source URI. + * @param {?string} crossOrigin Cross origin. + * @param {LoadFunction} imageLoadFunction Image load function. + */ + + + function ImageWrapper(extent, resolution, pixelRatio, src, crossOrigin, imageLoadFunction) { + var _this = _super.call(this, extent, resolution, pixelRatio, _ImageState_js__WEBPACK_IMPORTED_MODULE_0__["default"].IDLE) || this; + /** + * @private + * @type {string} + */ + + + _this.src_ = src; + /** + * @private + * @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} + */ + + _this.image_ = new Image(); + + if (crossOrigin !== null) { + _this.image_.crossOrigin = crossOrigin; + } + /** + * @private + * @type {?function():void} + */ + + + _this.unlisten_ = null; + /** + * @protected + * @type {import("./ImageState.js").default} + */ + + _this.state = _ImageState_js__WEBPACK_IMPORTED_MODULE_0__["default"].IDLE; + /** + * @private + * @type {LoadFunction} + */ + + _this.imageLoadFunction_ = imageLoadFunction; + return _this; + } + /** + * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image. + * @api + */ + + + ImageWrapper.prototype.getImage = function () { + return this.image_; + }; + /** + * Tracks loading or read errors. + * + * @private + */ + + + ImageWrapper.prototype.handleImageError_ = function () { + this.state = _ImageState_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERROR; + this.unlistenImage_(); + this.changed(); + }; + /** + * Tracks successful image load. + * + * @private + */ + + + ImageWrapper.prototype.handleImageLoad_ = function () { + if (this.resolution === undefined) { + this.resolution = (0,_extent_js__WEBPACK_IMPORTED_MODULE_1__.getHeight)(this.extent) / this.image_.height; + } + + this.state = _ImageState_js__WEBPACK_IMPORTED_MODULE_0__["default"].LOADED; + this.unlistenImage_(); + this.changed(); + }; + /** + * Load the image or retry if loading previously failed. + * Loading is taken care of by the tile queue, and calling this method is + * only needed for preloading or for reloading in case of an error. + * @api + */ + + + ImageWrapper.prototype.load = function () { + if (this.state == _ImageState_js__WEBPACK_IMPORTED_MODULE_0__["default"].IDLE || this.state == _ImageState_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERROR) { + this.state = _ImageState_js__WEBPACK_IMPORTED_MODULE_0__["default"].LOADING; + this.changed(); + this.imageLoadFunction_(this, this.src_); + this.unlisten_ = listenImage(this.image_, this.handleImageLoad_.bind(this), this.handleImageError_.bind(this)); + } + }; + /** + * @param {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image. + */ + + + ImageWrapper.prototype.setImage = function (image) { + this.image_ = image; + this.resolution = (0,_extent_js__WEBPACK_IMPORTED_MODULE_1__.getHeight)(this.extent) / this.image_.height; + }; + /** + * Discards event handlers which listen for load completion or errors. + * + * @private + */ + + + ImageWrapper.prototype.unlistenImage_ = function () { + if (this.unlisten_) { + this.unlisten_(); + this.unlisten_ = null; + } + }; + + return ImageWrapper; +}(_ImageBase_js__WEBPACK_IMPORTED_MODULE_2__["default"]); +/** + * @param {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image element. + * @param {function():any} loadHandler Load callback function. + * @param {function():any} errorHandler Error callback function. + * @return {function():void} Callback to stop listening. + */ + + +function listenImage(image, loadHandler, errorHandler) { + var img = + /** @type {HTMLImageElement} */ + image; + + if (img.src && _has_js__WEBPACK_IMPORTED_MODULE_3__.IMAGE_DECODE) { + var promise = img.decode(); + var listening_1 = true; + + var unlisten = function unlisten() { + listening_1 = false; + }; + + promise.then(function () { + if (listening_1) { + loadHandler(); + } + }).catch(function (error) { + if (listening_1) { + // FIXME: Unconditionally call errorHandler() when this bug is fixed upstream: + // https://bugs.webkit.org/show_bug.cgi?id=198527 + if (error.name === 'EncodingError' && error.message === 'Invalid image type.') { + loadHandler(); + } else { + errorHandler(); + } + } + }); + return unlisten; + } + + var listenerKeys = [(0,_events_js__WEBPACK_IMPORTED_MODULE_4__.listenOnce)(img, _events_EventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].LOAD, loadHandler), (0,_events_js__WEBPACK_IMPORTED_MODULE_4__.listenOnce)(img, _events_EventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].ERROR, errorHandler)]; + return function unlisten() { + listenerKeys.forEach(_events_js__WEBPACK_IMPORTED_MODULE_4__.unlistenByKey); + }; +} +/* harmony default export */ __webpack_exports__["default"] = (ImageWrapper); + +/***/ }), +/* 60 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * @module ol/ImageState + */ + +/** + * @enum {number} + */ +/* harmony default export */ __webpack_exports__["default"] = ({ + IDLE: 0, + LOADING: 1, + LOADED: 2, + ERROR: 3, + EMPTY: 4 +}); + +/***/ }), +/* 61 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _events_Target_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29); +/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27); +/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/ImageBase + */ + + + + + +/** + * @abstract + */ + +var ImageBase = +/** @class */ +function (_super) { + __extends(ImageBase, _super); + /** + * @param {import("./extent.js").Extent} extent Extent. + * @param {number|undefined} resolution Resolution. + * @param {number} pixelRatio Pixel ratio. + * @param {import("./ImageState.js").default} state State. + */ + + + function ImageBase(extent, resolution, pixelRatio, state) { + var _this = _super.call(this) || this; + /** + * @protected + * @type {import("./extent.js").Extent} + */ + + + _this.extent = extent; + /** + * @private + * @type {number} + */ + + _this.pixelRatio_ = pixelRatio; + /** + * @protected + * @type {number|undefined} + */ + + _this.resolution = resolution; + /** + * @protected + * @type {import("./ImageState.js").default} + */ + + _this.state = state; + return _this; + } + /** + * @protected + */ + + + ImageBase.prototype.changed = function () { + this.dispatchEvent(_events_EventType_js__WEBPACK_IMPORTED_MODULE_0__["default"].CHANGE); + }; + /** + * @return {import("./extent.js").Extent} Extent. + */ + + + ImageBase.prototype.getExtent = function () { + return this.extent; + }; + /** + * @abstract + * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image. + */ + + + ImageBase.prototype.getImage = function () { + return (0,_util_js__WEBPACK_IMPORTED_MODULE_1__.abstract)(); + }; + /** + * @return {number} PixelRatio. + */ + + + ImageBase.prototype.getPixelRatio = function () { + return this.pixelRatio_; + }; + /** + * @return {number} Resolution. + */ + + + ImageBase.prototype.getResolution = function () { + return ( + /** @type {number} */ + this.resolution + ); + }; + /** + * @return {import("./ImageState.js").default} State. + */ + + + ImageBase.prototype.getState = function () { + return this.state; + }; + /** + * Load not yet loaded URI. + * @abstract + */ + + + ImageBase.prototype.load = function () { + (0,_util_js__WEBPACK_IMPORTED_MODULE_1__.abstract)(); + }; + + return ImageBase; +}(_events_Target_js__WEBPACK_IMPORTED_MODULE_2__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (ImageBase); + +/***/ }), +/* 62 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _ImageBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61); +/* harmony import */ var _ImageState_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(60); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/ImageCanvas + */ + + + + +/** + * A function that is called to trigger asynchronous canvas drawing. It is + * called with a "done" callback that should be called when drawing is done. + * If any error occurs during drawing, the "done" callback should be called with + * that error. + * + * @typedef {function(function(Error=): void): void} Loader + */ + +var ImageCanvas = +/** @class */ +function (_super) { + __extends(ImageCanvas, _super); + /** + * @param {import("./extent.js").Extent} extent Extent. + * @param {number} resolution Resolution. + * @param {number} pixelRatio Pixel ratio. + * @param {HTMLCanvasElement} canvas Canvas. + * @param {Loader} [opt_loader] Optional loader function to + * support asynchronous canvas drawing. + */ + + + function ImageCanvas(extent, resolution, pixelRatio, canvas, opt_loader) { + var _this = this; + + var state = opt_loader !== undefined ? _ImageState_js__WEBPACK_IMPORTED_MODULE_0__["default"].IDLE : _ImageState_js__WEBPACK_IMPORTED_MODULE_0__["default"].LOADED; + _this = _super.call(this, extent, resolution, pixelRatio, state) || this; + /** + * Optional canvas loader function. + * @type {?Loader} + * @private + */ + + _this.loader_ = opt_loader !== undefined ? opt_loader : null; + /** + * @private + * @type {HTMLCanvasElement} + */ + + _this.canvas_ = canvas; + /** + * @private + * @type {?Error} + */ + + _this.error_ = null; + return _this; + } + /** + * Get any error associated with asynchronous rendering. + * @return {?Error} Any error that occurred during rendering. + */ + + + ImageCanvas.prototype.getError = function () { + return this.error_; + }; + /** + * Handle async drawing complete. + * @param {Error} [err] Any error during drawing. + * @private + */ + + + ImageCanvas.prototype.handleLoad_ = function (err) { + if (err) { + this.error_ = err; + this.state = _ImageState_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERROR; + } else { + this.state = _ImageState_js__WEBPACK_IMPORTED_MODULE_0__["default"].LOADED; + } + + this.changed(); + }; + /** + * Load not yet loaded URI. + */ + + + ImageCanvas.prototype.load = function () { + if (this.state == _ImageState_js__WEBPACK_IMPORTED_MODULE_0__["default"].IDLE) { + this.state = _ImageState_js__WEBPACK_IMPORTED_MODULE_0__["default"].LOADING; + this.changed(); + this.loader_(this.handleLoad_.bind(this)); + } + }; + /** + * @return {HTMLCanvasElement} Canvas element. + */ + + + ImageCanvas.prototype.getImage = function () { + return this.canvas_; + }; + + return ImageCanvas; +}(_ImageBase_js__WEBPACK_IMPORTED_MODULE_1__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (ImageCanvas); + +/***/ }), +/* 63 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Tile_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(35); +/* harmony import */ var _TileState_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(34); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(64); +/* harmony import */ var _Image_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(59); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/ImageTile + */ + + + + + + + +var ImageTile = +/** @class */ +function (_super) { + __extends(ImageTile, _super); + /** + * @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate. + * @param {import("./TileState.js").default} state State. + * @param {string} src Image source URI. + * @param {?string} crossOrigin Cross origin. + * @param {import("./Tile.js").LoadFunction} tileLoadFunction Tile load function. + * @param {import("./Tile.js").Options} [opt_options] Tile options. + */ + + + function ImageTile(tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options) { + var _this = _super.call(this, tileCoord, state, opt_options) || this; + /** + * @private + * @type {?string} + */ + + + _this.crossOrigin_ = crossOrigin; + /** + * Image URI + * + * @private + * @type {string} + */ + + _this.src_ = src; + _this.key = src; + /** + * @private + * @type {HTMLImageElement|HTMLCanvasElement} + */ + + _this.image_ = new Image(); + + if (crossOrigin !== null) { + _this.image_.crossOrigin = crossOrigin; + } + /** + * @private + * @type {?function():void} + */ + + + _this.unlisten_ = null; + /** + * @private + * @type {import("./Tile.js").LoadFunction} + */ + + _this.tileLoadFunction_ = tileLoadFunction; + return _this; + } + /** + * Get the HTML image element for this tile (may be a Canvas, Image, or Video). + * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image. + * @api + */ + + + ImageTile.prototype.getImage = function () { + return this.image_; + }; + /** + * Sets an HTML image element for this tile (may be a Canvas or preloaded Image). + * @param {HTMLCanvasElement|HTMLImageElement} element Element. + */ + + + ImageTile.prototype.setImage = function (element) { + this.image_ = element; + this.state = _TileState_js__WEBPACK_IMPORTED_MODULE_0__["default"].LOADED; + this.unlistenImage_(); + this.changed(); + }; + /** + * Tracks loading or read errors. + * + * @private + */ + + + ImageTile.prototype.handleImageError_ = function () { + this.state = _TileState_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERROR; + this.unlistenImage_(); + this.image_ = getBlankImage(); + this.changed(); + }; + /** + * Tracks successful image load. + * + * @private + */ + + + ImageTile.prototype.handleImageLoad_ = function () { + var image = + /** @type {HTMLImageElement} */ + this.image_; + + if (image.naturalWidth && image.naturalHeight) { + this.state = _TileState_js__WEBPACK_IMPORTED_MODULE_0__["default"].LOADED; + } else { + this.state = _TileState_js__WEBPACK_IMPORTED_MODULE_0__["default"].EMPTY; + } + + this.unlistenImage_(); + this.changed(); + }; + /** + * Load not yet loaded URI. + * @api + */ + + + ImageTile.prototype.load = function () { + if (this.state == _TileState_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERROR) { + this.state = _TileState_js__WEBPACK_IMPORTED_MODULE_0__["default"].IDLE; + this.image_ = new Image(); + + if (this.crossOrigin_ !== null) { + this.image_.crossOrigin = this.crossOrigin_; + } + } + + if (this.state == _TileState_js__WEBPACK_IMPORTED_MODULE_0__["default"].IDLE) { + this.state = _TileState_js__WEBPACK_IMPORTED_MODULE_0__["default"].LOADING; + this.changed(); + this.tileLoadFunction_(this, this.src_); + this.unlisten_ = (0,_Image_js__WEBPACK_IMPORTED_MODULE_1__.listenImage)(this.image_, this.handleImageLoad_.bind(this), this.handleImageError_.bind(this)); + } + }; + /** + * Discards event handlers which listen for load completion or errors. + * + * @private + */ + + + ImageTile.prototype.unlistenImage_ = function () { + if (this.unlisten_) { + this.unlisten_(); + this.unlisten_ = null; + } + }; + + return ImageTile; +}(_Tile_js__WEBPACK_IMPORTED_MODULE_2__["default"]); +/** + * Get a 1-pixel blank image. + * @return {HTMLCanvasElement} Blank image. + */ + + +function getBlankImage() { + var ctx = (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.createCanvasContext2D)(1, 1); + ctx.fillStyle = 'rgba(0,0,0,0)'; + ctx.fillRect(0, 0, 1, 1); + return ctx.canvas; +} + +/* harmony default export */ __webpack_exports__["default"] = (ImageTile); + +/***/ }), +/* 64 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "createCanvasContext2D": function() { return /* binding */ createCanvasContext2D; }, +/* harmony export */ "outerWidth": function() { return /* binding */ outerWidth; }, +/* harmony export */ "outerHeight": function() { return /* binding */ outerHeight; }, +/* harmony export */ "replaceNode": function() { return /* binding */ replaceNode; }, +/* harmony export */ "removeNode": function() { return /* binding */ removeNode; }, +/* harmony export */ "removeChildren": function() { return /* binding */ removeChildren; }, +/* harmony export */ "replaceChildren": function() { return /* binding */ replaceChildren; } +/* harmony export */ }); +/* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(54); + +/** + * @module ol/dom + */ +//FIXME Move this function to the canvas module + +/** + * Create an html canvas element and returns its 2d context. + * @param {number} [opt_width] Canvas width. + * @param {number} [opt_height] Canvas height. + * @param {Array} [opt_canvasPool] Canvas pool to take existing canvas from. + * @param {CanvasRenderingContext2DSettings} [opt_Context2DSettings] CanvasRenderingContext2DSettings + * @return {CanvasRenderingContext2D} The context. + */ + +function createCanvasContext2D(opt_width, opt_height, opt_canvasPool, opt_Context2DSettings) { + /** @type {HTMLCanvasElement|OffscreenCanvas} */ + var canvas; + + if (opt_canvasPool && opt_canvasPool.length) { + canvas = opt_canvasPool.shift(); + } else if (_has_js__WEBPACK_IMPORTED_MODULE_0__.WORKER_OFFSCREEN_CANVAS) { + canvas = new OffscreenCanvas(opt_width || 300, opt_height || 300); + } else { + canvas = document.createElement('canvas'); + canvas.style.all = 'unset'; + } + + if (opt_width) { + canvas.width = opt_width; + } + + if (opt_height) { + canvas.height = opt_height; + } //FIXME Allow OffscreenCanvasRenderingContext2D as return type + + + return ( + /** @type {CanvasRenderingContext2D} */ + canvas.getContext('2d', opt_Context2DSettings) + ); +} +/** + * Get the current computed width for the given element including margin, + * padding and border. + * Equivalent to jQuery's `$(el).outerWidth(true)`. + * @param {!HTMLElement} element Element. + * @return {number} The width. + */ + +function outerWidth(element) { + var width = element.offsetWidth; + var style = getComputedStyle(element); + width += parseInt(style.marginLeft, 10) + parseInt(style.marginRight, 10); + return width; +} +/** + * Get the current computed height for the given element including margin, + * padding and border. + * Equivalent to jQuery's `$(el).outerHeight(true)`. + * @param {!HTMLElement} element Element. + * @return {number} The height. + */ + +function outerHeight(element) { + var height = element.offsetHeight; + var style = getComputedStyle(element); + height += parseInt(style.marginTop, 10) + parseInt(style.marginBottom, 10); + return height; +} +/** + * @param {Node} newNode Node to replace old node + * @param {Node} oldNode The node to be replaced + */ + +function replaceNode(newNode, oldNode) { + var parent = oldNode.parentNode; + + if (parent) { + parent.replaceChild(newNode, oldNode); + } +} +/** + * @param {Node} node The node to remove. + * @return {Node} The node that was removed or null. + */ + +function removeNode(node) { + return node && node.parentNode ? node.parentNode.removeChild(node) : null; +} +/** + * @param {Node} node The node to remove the children from. + */ + +function removeChildren(node) { + while (node.lastChild) { + node.removeChild(node.lastChild); + } +} +/** + * Transform the children of a parent node so they match the + * provided list of children. This function aims to efficiently + * remove, add, and reorder child nodes while maintaining a simple + * implementation (it is not guaranteed to minimize DOM operations). + * @param {Node} node The parent node whose children need reworking. + * @param {Array} children The desired children. + */ + +function replaceChildren(node, children) { + var oldChildren = node.childNodes; + + for (var i = 0; true; ++i) { + var oldChild = oldChildren[i]; + var newChild = children[i]; // check if our work is done + + if (!oldChild && !newChild) { + break; + } // check if children match + + + if (oldChild === newChild) { + continue; + } // check if a new child needs to be added + + + if (!oldChild) { + node.appendChild(newChild); + continue; + } // check if an old child needs to be removed + + + if (!newChild) { + node.removeChild(oldChild); + --i; + continue; + } // reorder + + + node.insertBefore(newChild, oldChild); + } +} + +/***/ }), +/* 65 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * @module ol/Kinetic + */ + +/** + * @classdesc + * Implementation of inertial deceleration for map movement. + * + * @api + */ +var Kinetic = +/** @class */ +function () { + /** + * @param {number} decay Rate of decay (must be negative). + * @param {number} minVelocity Minimum velocity (pixels/millisecond). + * @param {number} delay Delay to consider to calculate the kinetic + * initial values (milliseconds). + */ + function Kinetic(decay, minVelocity, delay) { + /** + * @private + * @type {number} + */ + this.decay_ = decay; + /** + * @private + * @type {number} + */ + + this.minVelocity_ = minVelocity; + /** + * @private + * @type {number} + */ + + this.delay_ = delay; + /** + * @private + * @type {Array} + */ + + this.points_ = []; + /** + * @private + * @type {number} + */ + + this.angle_ = 0; + /** + * @private + * @type {number} + */ + + this.initialVelocity_ = 0; + } + /** + * FIXME empty description for jsdoc + */ + + + Kinetic.prototype.begin = function () { + this.points_.length = 0; + this.angle_ = 0; + this.initialVelocity_ = 0; + }; + /** + * @param {number} x X. + * @param {number} y Y. + */ + + + Kinetic.prototype.update = function (x, y) { + this.points_.push(x, y, Date.now()); + }; + /** + * @return {boolean} Whether we should do kinetic animation. + */ + + + Kinetic.prototype.end = function () { + if (this.points_.length < 6) { + // at least 2 points are required (i.e. there must be at least 6 elements + // in the array) + return false; + } + + var delay = Date.now() - this.delay_; + var lastIndex = this.points_.length - 3; + + if (this.points_[lastIndex + 2] < delay) { + // the last tracked point is too old, which means that the user stopped + // panning before releasing the map + return false; + } // get the first point which still falls into the delay time + + + var firstIndex = lastIndex - 3; + + while (firstIndex > 0 && this.points_[firstIndex + 2] > delay) { + firstIndex -= 3; + } + + var duration = this.points_[lastIndex + 2] - this.points_[firstIndex + 2]; // we don't want a duration of 0 (divide by zero) + // we also make sure the user panned for a duration of at least one frame + // (1/60s) to compute sane displacement values + + if (duration < 1000 / 60) { + return false; + } + + var dx = this.points_[lastIndex] - this.points_[firstIndex]; + var dy = this.points_[lastIndex + 1] - this.points_[firstIndex + 1]; + this.angle_ = Math.atan2(dy, dx); + this.initialVelocity_ = Math.sqrt(dx * dx + dy * dy) / duration; + return this.initialVelocity_ > this.minVelocity_; + }; + /** + * @return {number} Total distance travelled (pixels). + */ + + + Kinetic.prototype.getDistance = function () { + return (this.minVelocity_ - this.initialVelocity_) / this.decay_; + }; + /** + * @return {number} Angle of the kinetic panning animation (radians). + */ + + + Kinetic.prototype.getAngle = function () { + return this.angle_; + }; + + return Kinetic; +}(); + +/* harmony default export */ __webpack_exports__["default"] = (Kinetic); + +/***/ }), +/* 66 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _renderer_Composite_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(81); +/* harmony import */ var _PluggableMap_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(87); +/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7); +/* harmony import */ var _control_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67); +/* harmony import */ var _interaction_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(111); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/Map + */ + + + + + + + +/** + * @classdesc + * The map is the core component of OpenLayers. For a map to render, a view, + * one or more layers, and a target container are needed: + * + * import Map from 'ol/Map'; + * import View from 'ol/View'; + * import TileLayer from 'ol/layer/Tile'; + * import OSM from 'ol/source/OSM'; + * + * var map = new Map({ + * view: new View({ + * center: [0, 0], + * zoom: 1 + * }), + * layers: [ + * new TileLayer({ + * source: new OSM() + * }) + * ], + * target: 'map' + * }); + * + * The above snippet creates a map using a {@link module:ol/layer/Tile} to + * display {@link module:ol/source/OSM~OSM} OSM data and render it to a DOM + * element with the id `map`. + * + * The constructor places a viewport container (with CSS class name + * `ol-viewport`) in the target element (see `getViewport()`), and then two + * further elements within the viewport: one with CSS class name + * `ol-overlaycontainer-stopevent` for controls and some overlays, and one with + * CSS class name `ol-overlaycontainer` for other overlays (see the `stopEvent` + * option of {@link module:ol/Overlay~Overlay} for the difference). The map + * itself is placed in a further element within the viewport. + * + * Layers are stored as a {@link module:ol/Collection~Collection} in + * layerGroups. A top-level group is provided by the library. This is what is + * accessed by `getLayerGroup` and `setLayerGroup`. Layers entered in the + * options are added to this group, and `addLayer` and `removeLayer` change the + * layer collection in the group. `getLayers` is a convenience function for + * `getLayerGroup().getLayers()`. Note that {@link module:ol/layer/Group~Group} + * is a subclass of {@link module:ol/layer/Base}, so layers entered in the + * options or added with `addLayer` can be groups, which can contain further + * groups, and so on. + * + * @api + */ + +var Map = +/** @class */ +function (_super) { + __extends(Map, _super); + /** + * @param {import("./PluggableMap.js").MapOptions} options Map options. + */ + + + function Map(options) { + var _this = this; + + options = (0,_obj_js__WEBPACK_IMPORTED_MODULE_0__.assign)({}, options); + + if (!options.controls) { + options.controls = (0,_control_js__WEBPACK_IMPORTED_MODULE_1__.defaults)(); + } + + if (!options.interactions) { + options.interactions = (0,_interaction_js__WEBPACK_IMPORTED_MODULE_2__.defaults)({ + onFocusOnly: true + }); + } + + _this = _super.call(this, options) || this; + return _this; + } + + Map.prototype.createRenderer = function () { + return new _renderer_Composite_js__WEBPACK_IMPORTED_MODULE_3__["default"](this); + }; + + return Map; +}(_PluggableMap_js__WEBPACK_IMPORTED_MODULE_4__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (Map); + +/***/ }), +/* 67 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "Attribution": function() { return /* reexport safe */ _control_Attribution_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }, +/* harmony export */ "Control": function() { return /* reexport safe */ _control_Control_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }, +/* harmony export */ "FullScreen": function() { return /* reexport safe */ _control_FullScreen_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }, +/* harmony export */ "MousePosition": function() { return /* reexport safe */ _control_MousePosition_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }, +/* harmony export */ "OverviewMap": function() { return /* reexport safe */ _control_OverviewMap_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }, +/* harmony export */ "Rotate": function() { return /* reexport safe */ _control_Rotate_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }, +/* harmony export */ "ScaleLine": function() { return /* reexport safe */ _control_ScaleLine_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }, +/* harmony export */ "Zoom": function() { return /* reexport safe */ _control_Zoom_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }, +/* harmony export */ "ZoomSlider": function() { return /* reexport safe */ _control_ZoomSlider_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }, +/* harmony export */ "ZoomToExtent": function() { return /* reexport safe */ _control_ZoomToExtent_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }, +/* harmony export */ "defaults": function() { return /* binding */ defaults; } +/* harmony export */ }); +/* harmony import */ var _control_Attribution_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68); +/* harmony import */ var _Collection_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(21); +/* harmony import */ var _control_Rotate_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(106); +/* harmony import */ var _control_Zoom_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(108); +/* harmony import */ var _control_Control_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(75); +/* harmony import */ var _control_FullScreen_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(77); +/* harmony import */ var _control_MousePosition_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(78); +/* harmony import */ var _control_OverviewMap_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(80); +/* harmony import */ var _control_ScaleLine_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(107); +/* harmony import */ var _control_ZoomSlider_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(109); +/* harmony import */ var _control_ZoomToExtent_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(110); +/** + * @module ol/control + */ + + + + + + + + + + + + + + +/** + * @typedef {Object} DefaultsOptions + * @property {boolean} [attribution=true] Include + * {@link module:ol/control/Attribution~Attribution}. + * @property {import("./control/Attribution.js").Options} [attributionOptions] + * Options for {@link module:ol/control/Attribution~Attribution}. + * @property {boolean} [rotate=true] Include + * {@link module:ol/control/Rotate~Rotate}. + * @property {import("./control/Rotate.js").Options} [rotateOptions] Options + * for {@link module:ol/control/Rotate~Rotate}. + * @property {boolean} [zoom] Include {@link module:ol/control/Zoom~Zoom}. + * @property {import("./control/Zoom.js").Options} [zoomOptions] Options for + * {@link module:ol/control/Zoom~Zoom}. + * @api + */ + +/** + * Set of controls included in maps by default. Unless configured otherwise, + * this returns a collection containing an instance of each of the following + * controls: + * * {@link module:ol/control/Zoom~Zoom} + * * {@link module:ol/control/Rotate~Rotate} + * * {@link module:ol/control/Attribution~Attribution} + * + * @param {DefaultsOptions} [opt_options] + * Defaults options. + * @return {Collection} + * Controls. + * @api + */ + +function defaults(opt_options) { + var options = opt_options ? opt_options : {}; + var controls = new _Collection_js__WEBPACK_IMPORTED_MODULE_10__["default"](); + var zoomControl = options.zoom !== undefined ? options.zoom : true; + + if (zoomControl) { + controls.push(new _control_Zoom_js__WEBPACK_IMPORTED_MODULE_7__["default"](options.zoomOptions)); + } + + var rotateControl = options.rotate !== undefined ? options.rotate : true; + + if (rotateControl) { + controls.push(new _control_Rotate_js__WEBPACK_IMPORTED_MODULE_5__["default"](options.rotateOptions)); + } + + var attributionControl = options.attribution !== undefined ? options.attribution : true; + + if (attributionControl) { + controls.push(new _control_Attribution_js__WEBPACK_IMPORTED_MODULE_0__["default"](options.attributionOptions)); + } + + return controls; +} + +/***/ }), +/* 68 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Control_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(75); +/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27); +/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(69); +/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(31); +/* harmony import */ var _layer_Layer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(70); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(64); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/control/Attribution + */ + + + + + + + + +/** + * @typedef {Object} Options + * @property {string} [className='ol-attribution'] CSS class name. + * @property {HTMLElement|string} [target] Specify a target if you + * want the control to be rendered outside of the map's + * viewport. + * @property {boolean} [collapsible] Specify if attributions can + * be collapsed. If not specified, sources control this behavior with their + * `attributionsCollapsible` setting. + * @property {boolean} [collapsed=true] Specify if attributions should + * be collapsed at startup. + * @property {string} [tipLabel='Attributions'] Text label to use for the button tip. + * @property {string|HTMLElement} [label='i'] Text label to use for the + * collapsed attributions button. + * Instead of text, also an element (e.g. a `span` element) can be used. + * @property {string} [expandClassName=className + '-expand'] CSS class name for the + * collapsed attributions button. + * @property {string|HTMLElement} [collapseLabel='›'] Text label to use + * for the expanded attributions button. + * Instead of text, also an element (e.g. a `span` element) can be used. + * @property {string} [collapseClassName=className + '-collapse'] CSS class name for the + * expanded attributions button. + * @property {function(import("../MapEvent.js").default):void} [render] Function called when + * the control should be re-rendered. This is called in a `requestAnimationFrame` + * callback. + */ + +/** + * @classdesc + * Control to show all the attributions associated with the layer sources + * in the map. This control is one of the default controls included in maps. + * By default it will show in the bottom right portion of the map, but this can + * be changed by using a css selector for `.ol-attribution`. + * + * @api + */ + +var Attribution = +/** @class */ +function (_super) { + __extends(Attribution, _super); + /** + * @param {Options} [opt_options] Attribution options. + */ + + + function Attribution(opt_options) { + var _this = this; + + var options = opt_options ? opt_options : {}; + _this = _super.call(this, { + element: document.createElement('div'), + render: options.render, + target: options.target + }) || this; + /** + * @private + * @type {HTMLElement} + */ + + _this.ulElement_ = document.createElement('ul'); + /** + * @private + * @type {boolean} + */ + + _this.collapsed_ = options.collapsed !== undefined ? options.collapsed : true; + /** + * @private + * @type {boolean} + */ + + _this.userCollapsed_ = _this.collapsed_; + /** + * @private + * @type {boolean} + */ + + _this.overrideCollapsible_ = options.collapsible !== undefined; + /** + * @private + * @type {boolean} + */ + + _this.collapsible_ = options.collapsible !== undefined ? options.collapsible : true; + + if (!_this.collapsible_) { + _this.collapsed_ = false; + } + + var className = options.className !== undefined ? options.className : 'ol-attribution'; + var tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Attributions'; + var expandClassName = options.expandClassName !== undefined ? options.expandClassName : className + '-expand'; + var collapseLabel = options.collapseLabel !== undefined ? options.collapseLabel : "\u203A"; + var collapseClassName = options.collapseClassName !== undefined ? options.collapseClassName : className + '-collpase'; + + if (typeof collapseLabel === 'string') { + /** + * @private + * @type {HTMLElement} + */ + _this.collapseLabel_ = document.createElement('span'); + _this.collapseLabel_.textContent = collapseLabel; + _this.collapseLabel_.className = collapseClassName; + } else { + _this.collapseLabel_ = collapseLabel; + } + + var label = options.label !== undefined ? options.label : 'i'; + + if (typeof label === 'string') { + /** + * @private + * @type {HTMLElement} + */ + _this.label_ = document.createElement('span'); + _this.label_.textContent = label; + _this.label_.className = expandClassName; + } else { + _this.label_ = label; + } + + var activeLabel = _this.collapsible_ && !_this.collapsed_ ? _this.collapseLabel_ : _this.label_; + /** + * @private + * @type {HTMLElement} + */ + + _this.toggleButton_ = document.createElement('button'); + + _this.toggleButton_.setAttribute('type', 'button'); + + _this.toggleButton_.setAttribute('aria-expanded', String(!_this.collapsed_)); + + _this.toggleButton_.title = tipLabel; + + _this.toggleButton_.appendChild(activeLabel); + + _this.toggleButton_.addEventListener(_events_EventType_js__WEBPACK_IMPORTED_MODULE_0__["default"].CLICK, _this.handleClick_.bind(_this), false); + + var cssClasses = className + ' ' + _css_js__WEBPACK_IMPORTED_MODULE_1__.CLASS_UNSELECTABLE + ' ' + _css_js__WEBPACK_IMPORTED_MODULE_1__.CLASS_CONTROL + (_this.collapsed_ && _this.collapsible_ ? ' ' + _css_js__WEBPACK_IMPORTED_MODULE_1__.CLASS_COLLAPSED : '') + (_this.collapsible_ ? '' : ' ol-uncollapsible'); + var element = _this.element; + element.className = cssClasses; + element.appendChild(_this.toggleButton_); + element.appendChild(_this.ulElement_); + /** + * A list of currently rendered resolutions. + * @type {Array} + * @private + */ + + _this.renderedAttributions_ = []; + /** + * @private + * @type {boolean} + */ + + _this.renderedVisible_ = true; + return _this; + } + /** + * Collect a list of visible attributions and set the collapsible state. + * @param {import("../PluggableMap.js").FrameState} frameState Frame state. + * @return {Array} Attributions. + * @private + */ + + + Attribution.prototype.collectSourceAttributions_ = function (frameState) { + /** + * Used to determine if an attribution already exists. + * @type {!Object} + */ + var lookup = {}; + /** + * A list of visible attributions. + * @type {Array} + */ + + var visibleAttributions = []; + var collapsible = true; + var layerStatesArray = frameState.layerStatesArray; + + for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) { + var layerState = layerStatesArray[i]; + + if (!(0,_layer_Layer_js__WEBPACK_IMPORTED_MODULE_2__.inView)(layerState, frameState.viewState)) { + continue; + } + + var source = + /** @type {import("../layer/Layer.js").default} */ + layerState.layer.getSource(); + + if (!source) { + continue; + } + + var attributionGetter = source.getAttributions(); + + if (!attributionGetter) { + continue; + } + + var attributions = attributionGetter(frameState); + + if (!attributions) { + continue; + } + + collapsible = collapsible && source.getAttributionsCollapsible() !== false; + + if (Array.isArray(attributions)) { + for (var j = 0, jj = attributions.length; j < jj; ++j) { + if (!(attributions[j] in lookup)) { + visibleAttributions.push(attributions[j]); + lookup[attributions[j]] = true; + } + } + } else { + if (!(attributions in lookup)) { + visibleAttributions.push(attributions); + lookup[attributions] = true; + } + } + } + + if (!this.overrideCollapsible_) { + this.setCollapsible(collapsible); + } + + return visibleAttributions; + }; + /** + * @private + * @param {?import("../PluggableMap.js").FrameState} frameState Frame state. + */ + + + Attribution.prototype.updateElement_ = function (frameState) { + if (!frameState) { + if (this.renderedVisible_) { + this.element.style.display = 'none'; + this.renderedVisible_ = false; + } + + return; + } + + var attributions = this.collectSourceAttributions_(frameState); + var visible = attributions.length > 0; + + if (this.renderedVisible_ != visible) { + this.element.style.display = visible ? '' : 'none'; + this.renderedVisible_ = visible; + } + + if ((0,_array_js__WEBPACK_IMPORTED_MODULE_3__.equals)(attributions, this.renderedAttributions_)) { + return; + } + + (0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.removeChildren)(this.ulElement_); // append the attributions + + for (var i = 0, ii = attributions.length; i < ii; ++i) { + var element = document.createElement('li'); + element.innerHTML = attributions[i]; + this.ulElement_.appendChild(element); + } + + this.renderedAttributions_ = attributions; + }; + /** + * @param {MouseEvent} event The event to handle + * @private + */ + + + Attribution.prototype.handleClick_ = function (event) { + event.preventDefault(); + this.handleToggle_(); + this.userCollapsed_ = this.collapsed_; + }; + /** + * @private + */ + + + Attribution.prototype.handleToggle_ = function () { + this.element.classList.toggle(_css_js__WEBPACK_IMPORTED_MODULE_1__.CLASS_COLLAPSED); + + if (this.collapsed_) { + (0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.replaceNode)(this.collapseLabel_, this.label_); + } else { + (0,_dom_js__WEBPACK_IMPORTED_MODULE_4__.replaceNode)(this.label_, this.collapseLabel_); + } + + this.collapsed_ = !this.collapsed_; + this.toggleButton_.setAttribute('aria-expanded', String(!this.collapsed_)); + }; + /** + * Return `true` if the attribution is collapsible, `false` otherwise. + * @return {boolean} True if the widget is collapsible. + * @api + */ + + + Attribution.prototype.getCollapsible = function () { + return this.collapsible_; + }; + /** + * Set whether the attribution should be collapsible. + * @param {boolean} collapsible True if the widget is collapsible. + * @api + */ + + + Attribution.prototype.setCollapsible = function (collapsible) { + if (this.collapsible_ === collapsible) { + return; + } + + this.collapsible_ = collapsible; + this.element.classList.toggle('ol-uncollapsible'); + + if (this.userCollapsed_) { + this.handleToggle_(); + } + }; + /** + * Collapse or expand the attribution according to the passed parameter. Will + * not do anything if the attribution isn't collapsible or if the current + * collapsed state is already the one requested. + * @param {boolean} collapsed True if the widget is collapsed. + * @api + */ + + + Attribution.prototype.setCollapsed = function (collapsed) { + this.userCollapsed_ = collapsed; + + if (!this.collapsible_ || this.collapsed_ === collapsed) { + return; + } + + this.handleToggle_(); + }; + /** + * Return `true` when the attribution is currently collapsed or `false` + * otherwise. + * @return {boolean} True if the widget is collapsed. + * @api + */ + + + Attribution.prototype.getCollapsed = function () { + return this.collapsed_; + }; + /** + * Update the attribution element. + * @param {import("../MapEvent.js").default} mapEvent Map event. + * @override + */ + + + Attribution.prototype.render = function (mapEvent) { + this.updateElement_(mapEvent.frameState); + }; + + return Attribution; +}(_Control_js__WEBPACK_IMPORTED_MODULE_5__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (Attribution); + +/***/ }), +/* 69 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "CLASS_HIDDEN": function() { return /* binding */ CLASS_HIDDEN; }, +/* harmony export */ "CLASS_SELECTABLE": function() { return /* binding */ CLASS_SELECTABLE; }, +/* harmony export */ "CLASS_UNSELECTABLE": function() { return /* binding */ CLASS_UNSELECTABLE; }, +/* harmony export */ "CLASS_UNSUPPORTED": function() { return /* binding */ CLASS_UNSUPPORTED; }, +/* harmony export */ "CLASS_CONTROL": function() { return /* binding */ CLASS_CONTROL; }, +/* harmony export */ "CLASS_COLLAPSED": function() { return /* binding */ CLASS_COLLAPSED; }, +/* harmony export */ "getFontParameters": function() { return /* binding */ getFontParameters; }, +/* harmony export */ "cssOpacity": function() { return /* binding */ cssOpacity; } +/* harmony export */ }); +/** + * @module ol/css + */ + +/** + * @typedef {Object} FontParameters + * @property {string} style Style. + * @property {string} variant Variant. + * @property {string} weight Weight. + * @property {string} size Size. + * @property {string} lineHeight LineHeight. + * @property {string} family Family. + * @property {Array} families Families. + */ + +/** + * The CSS class for hidden feature. + * + * @const + * @type {string} + */ +var CLASS_HIDDEN = 'ol-hidden'; +/** + * The CSS class that we'll give the DOM elements to have them selectable. + * + * @const + * @type {string} + */ + +var CLASS_SELECTABLE = 'ol-selectable'; +/** + * The CSS class that we'll give the DOM elements to have them unselectable. + * + * @const + * @type {string} + */ + +var CLASS_UNSELECTABLE = 'ol-unselectable'; +/** + * The CSS class for unsupported feature. + * + * @const + * @type {string} + */ + +var CLASS_UNSUPPORTED = 'ol-unsupported'; +/** + * The CSS class for controls. + * + * @const + * @type {string} + */ + +var CLASS_CONTROL = 'ol-control'; +/** + * The CSS class that we'll give the DOM elements that are collapsed, i.e. + * to those elements which usually can be expanded. + * + * @const + * @type {string} + */ + +var CLASS_COLLAPSED = 'ol-collapsed'; +/** + * From https://stackoverflow.com/questions/10135697/regex-to-parse-any-css-font + * @type {RegExp} + */ + +var fontRegEx = new RegExp(['^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)', '(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)', '(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)', '(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?', '(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))', '(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))', '?\\s*([-,\\"\\\'\\sa-z]+?)\\s*$'].join(''), 'i'); +var fontRegExMatchIndex = ['style', 'variant', 'weight', 'size', 'lineHeight', 'family']; +/** + * Get the list of font families from a font spec. Note that this doesn't work + * for font families that have commas in them. + * @param {string} fontSpec The CSS font property. + * @return {FontParameters} The font parameters (or null if the input spec is invalid). + */ + +var getFontParameters = function getFontParameters(fontSpec) { + var match = fontSpec.match(fontRegEx); + + if (!match) { + return null; + } + + var style = + /** @type {FontParameters} */ + { + lineHeight: 'normal', + size: '1.2em', + style: 'normal', + weight: 'normal', + variant: 'normal' + }; + + for (var i = 0, ii = fontRegExMatchIndex.length; i < ii; ++i) { + var value = match[i + 1]; + + if (value !== undefined) { + style[fontRegExMatchIndex[i]] = value; + } + } + + style.families = style.family.split(/,\s?/); + return style; +}; +/** + * @param {number} opacity Opacity (0..1). + * @return {string} CSS opacity. + */ + +function cssOpacity(opacity) { + return opacity === 1 ? '' : String(Math.round(opacity * 100) / 100); +} + +/***/ }), +/* 70 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "inView": function() { return /* binding */ inView; } +/* harmony export */ }); +/* harmony import */ var _Base_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(74); +/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(27); +/* harmony import */ var _Property_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71); +/* harmony import */ var _render_EventType_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(73); +/* harmony import */ var _source_State_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(72); +/* harmony import */ var _asserts_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(14); +/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7); +/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(28); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/layer/Layer + */ + + + + + + + + + + +/** + * @typedef {function(import("../PluggableMap.js").FrameState):HTMLElement} RenderFunction + */ + +/*** + * @template Return + * @typedef {import("../Observable").OnSignature & + * import("../Observable").OnSignature & + * import("../Observable").OnSignature & + * import("../Observable").CombinedOnSignature} LayerOnSignature + */ + +/** + * @template {import("../source/Source.js").default} SourceType + * @typedef {Object} Options + * @property {string} [className='ol-layer'] A CSS class name to set to the layer element. + * @property {number} [opacity=1] Opacity (0, 1). + * @property {boolean} [visible=true] Visibility. + * @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be + * rendered outside of this extent. + * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers + * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed + * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()` + * method was used. + * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be + * visible. + * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will + * be visible. + * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be + * visible. + * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will + * be visible. + * @property {SourceType} [source] Source for this layer. If not provided to the constructor, + * the source can be set by calling {@link module:ol/layer/Layer~Layer#setSource layer.setSource(source)} after + * construction. + * @property {import("../PluggableMap.js").default} [map] Map. + * @property {RenderFunction} [render] Render function. Takes the frame state as input and is expected to return an + * HTML element. Will overwrite the default rendering for the layer. + * @property {Object} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`. + */ + +/** + * @typedef {Object} State + * @property {import("./Layer.js").default} layer Layer. + * @property {number} opacity Opacity, the value is rounded to two digits to appear after the decimal point. + * @property {import("../source/State.js").default} sourceState SourceState. + * @property {boolean} visible Visible. + * @property {boolean} managed Managed. + * @property {import("../extent.js").Extent} [extent] Extent. + * @property {number} zIndex ZIndex. + * @property {number} maxResolution Maximum resolution. + * @property {number} minResolution Minimum resolution. + * @property {number} minZoom Minimum zoom. + * @property {number} maxZoom Maximum zoom. + */ + +/** + * @classdesc + * Base class from which all layer types are derived. This should only be instantiated + * in the case where a custom layer is be added to the map with a custom `render` function. + * Such a function can be specified in the `options` object, and is expected to return an HTML element. + * + * A visual representation of raster or vector map data. + * Layers group together those properties that pertain to how the data is to be + * displayed, irrespective of the source of that data. + * + * Layers are usually added to a map with {@link import("../PluggableMap.js").default#addLayer map.addLayer()}. Components + * like {@link module:ol/interaction/Draw~Draw} use unmanaged layers + * internally. These unmanaged layers are associated with the map using + * {@link module:ol/layer/Layer~Layer#setMap} instead. + * + * A generic `change` event is fired when the state of the source changes. + * + * Please note that for performance reasons several layers might get rendered to + * the same HTML element, which will cause {@link import("../PluggableMap.js").default#forEachLayerAtPixel map.forEachLayerAtPixel()} to + * give false positives. To avoid this, apply different `className` properties to the + * layers at creation time. + * + * @fires import("../render/Event.js").RenderEvent#prerender + * @fires import("../render/Event.js").RenderEvent#postrender + * + * @template {import("../source/Source.js").default} SourceType + * @api + */ + +var Layer = +/** @class */ +function (_super) { + __extends(Layer, _super); + /** + * @param {Options} options Layer options. + */ + + + function Layer(options) { + var _this = this; + + var baseOptions = (0,_obj_js__WEBPACK_IMPORTED_MODULE_0__.assign)({}, options); + delete baseOptions.source; + _this = _super.call(this, baseOptions) || this; + /*** + * @type {LayerOnSignature} + */ + + _this.on; + /*** + * @type {LayerOnSignature} + */ + + _this.once; + /*** + * @type {LayerOnSignature} + */ + + _this.un; + /** + * @private + * @type {?import("../events.js").EventsKey} + */ + + _this.mapPrecomposeKey_ = null; + /** + * @private + * @type {?import("../events.js").EventsKey} + */ + + _this.mapRenderKey_ = null; + /** + * @private + * @type {?import("../events.js").EventsKey} + */ + + _this.sourceChangeKey_ = null; + /** + * @private + * @type {import("../renderer/Layer.js").default} + */ + + _this.renderer_ = null; // Overwrite default render method with a custom one + + if (options.render) { + _this.render = options.render; + } + + if (options.map) { + _this.setMap(options.map); + } + + _this.addChangeListener(_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].SOURCE, _this.handleSourcePropertyChange_); + + var source = options.source ? + /** @type {SourceType} */ + options.source : null; + + _this.setSource(source); + + return _this; + } + /** + * @param {Array} [opt_array] Array of layers (to be modified in place). + * @return {Array} Array of layers. + */ + + + Layer.prototype.getLayersArray = function (opt_array) { + var array = opt_array ? opt_array : []; + array.push(this); + return array; + }; + /** + * @param {Array} [opt_states] Optional list of layer states (to be modified in place). + * @return {Array} List of layer states. + */ + + + Layer.prototype.getLayerStatesArray = function (opt_states) { + var states = opt_states ? opt_states : []; + states.push(this.getLayerState()); + return states; + }; + /** + * Get the layer source. + * @return {SourceType} The layer source (or `null` if not yet set). + * @observable + * @api + */ + + + Layer.prototype.getSource = function () { + return ( + /** @type {SourceType} */ + this.get(_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].SOURCE) || null + ); + }; + /** + * @return {import("../source/State.js").default} Source state. + */ + + + Layer.prototype.getSourceState = function () { + var source = this.getSource(); + return !source ? _source_State_js__WEBPACK_IMPORTED_MODULE_2__["default"].UNDEFINED : source.getState(); + }; + /** + * @private + */ + + + Layer.prototype.handleSourceChange_ = function () { + this.changed(); + }; + /** + * @private + */ + + + Layer.prototype.handleSourcePropertyChange_ = function () { + if (this.sourceChangeKey_) { + (0,_events_js__WEBPACK_IMPORTED_MODULE_3__.unlistenByKey)(this.sourceChangeKey_); + this.sourceChangeKey_ = null; + } + + var source = this.getSource(); + + if (source) { + this.sourceChangeKey_ = (0,_events_js__WEBPACK_IMPORTED_MODULE_3__.listen)(source, _events_EventType_js__WEBPACK_IMPORTED_MODULE_4__["default"].CHANGE, this.handleSourceChange_, this); + } + + this.changed(); + }; + /** + * @param {import("../pixel").Pixel} pixel Pixel. + * @return {Promise>} Promise that resolves with + * an array of features. + */ + + + Layer.prototype.getFeatures = function (pixel) { + if (!this.renderer_) { + return new Promise(function (resolve) { + return resolve([]); + }); + } + + return this.renderer_.getFeatures(pixel); + }; + /** + * In charge to manage the rendering of the layer. One layer type is + * bounded with one layer renderer. + * @param {?import("../PluggableMap.js").FrameState} frameState Frame state. + * @param {HTMLElement} target Target which the renderer may (but need not) use + * for rendering its content. + * @return {HTMLElement} The rendered element. + */ + + + Layer.prototype.render = function (frameState, target) { + var layerRenderer = this.getRenderer(); + + if (layerRenderer.prepareFrame(frameState)) { + return layerRenderer.renderFrame(frameState, target); + } + }; + /** + * Sets the layer to be rendered on top of other layers on a map. The map will + * not manage this layer in its layers collection, and the callback in + * {@link module:ol/Map~Map#forEachLayerAtPixel} will receive `null` as layer. This + * is useful for temporary layers. To remove an unmanaged layer from the map, + * use `#setMap(null)`. + * + * To add the layer to a map and have it managed by the map, use + * {@link module:ol/Map~Map#addLayer} instead. + * @param {import("../PluggableMap.js").default} map Map. + * @api + */ + + + Layer.prototype.setMap = function (map) { + if (this.mapPrecomposeKey_) { + (0,_events_js__WEBPACK_IMPORTED_MODULE_3__.unlistenByKey)(this.mapPrecomposeKey_); + this.mapPrecomposeKey_ = null; + } + + if (!map) { + this.changed(); + } + + if (this.mapRenderKey_) { + (0,_events_js__WEBPACK_IMPORTED_MODULE_3__.unlistenByKey)(this.mapRenderKey_); + this.mapRenderKey_ = null; + } + + if (map) { + this.mapPrecomposeKey_ = (0,_events_js__WEBPACK_IMPORTED_MODULE_3__.listen)(map, _render_EventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].PRECOMPOSE, function (evt) { + var renderEvent = + /** @type {import("../render/Event.js").default} */ + evt; + var layerStatesArray = renderEvent.frameState.layerStatesArray; + var layerState = this.getLayerState(false); // A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both. + + (0,_asserts_js__WEBPACK_IMPORTED_MODULE_6__.assert)(!layerStatesArray.some(function (arrayLayerState) { + return arrayLayerState.layer === layerState.layer; + }), 67); + layerStatesArray.push(layerState); + }, this); + this.mapRenderKey_ = (0,_events_js__WEBPACK_IMPORTED_MODULE_3__.listen)(this, _events_EventType_js__WEBPACK_IMPORTED_MODULE_4__["default"].CHANGE, map.render, map); + this.changed(); + } + }; + /** + * Set the layer source. + * @param {SourceType} source The layer source. + * @observable + * @api + */ + + + Layer.prototype.setSource = function (source) { + this.set(_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].SOURCE, source); + }; + /** + * Get the renderer for this layer. + * @return {import("../renderer/Layer.js").default} The layer renderer. + */ + + + Layer.prototype.getRenderer = function () { + if (!this.renderer_) { + this.renderer_ = this.createRenderer(); + } + + return this.renderer_; + }; + /** + * @return {boolean} The layer has a renderer. + */ + + + Layer.prototype.hasRenderer = function () { + return !!this.renderer_; + }; + /** + * Create a renderer for this layer. + * @return {import("../renderer/Layer.js").default} A layer renderer. + * @protected + */ + + + Layer.prototype.createRenderer = function () { + return null; + }; + /** + * Clean up. + */ + + + Layer.prototype.disposeInternal = function () { + if (this.renderer_) { + this.renderer_.dispose(); + delete this.renderer_; + } + + this.setSource(null); + + _super.prototype.disposeInternal.call(this); + }; + + return Layer; +}(_Base_js__WEBPACK_IMPORTED_MODULE_7__["default"]); +/** + * Return `true` if the layer is visible and if the provided view state + * has resolution and zoom levels that are in range of the layer's min/max. + * @param {State} layerState Layer state. + * @param {import("../View.js").State} viewState View state. + * @return {boolean} The layer is visible at the given view state. + */ + + +function inView(layerState, viewState) { + if (!layerState.visible) { + return false; + } + + var resolution = viewState.resolution; + + if (resolution < layerState.minResolution || resolution >= layerState.maxResolution) { + return false; + } + + var zoom = viewState.zoom; + return zoom > layerState.minZoom && zoom <= layerState.maxZoom; +} +/* harmony default export */ __webpack_exports__["default"] = (Layer); + +/***/ }), +/* 71 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * @module ol/layer/Property + */ + +/** + * @enum {string} + */ +/* harmony default export */ __webpack_exports__["default"] = ({ + OPACITY: 'opacity', + VISIBLE: 'visible', + EXTENT: 'extent', + Z_INDEX: 'zIndex', + MAX_RESOLUTION: 'maxResolution', + MIN_RESOLUTION: 'minResolution', + MAX_ZOOM: 'maxZoom', + MIN_ZOOM: 'minZoom', + SOURCE: 'source' +}); + +/***/ }), +/* 72 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * @module ol/source/State + */ + +/** + * @enum {string} + * State of the source, one of 'undefined', 'loading', 'ready' or 'error'. + */ +/* harmony default export */ __webpack_exports__["default"] = ({ + UNDEFINED: 'undefined', + LOADING: 'loading', + READY: 'ready', + ERROR: 'error' +}); + +/***/ }), +/* 73 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * @module ol/render/EventType + */ + +/** + * @enum {string} + */ +/* harmony default export */ __webpack_exports__["default"] = ({ + /** + * Triggered before a layer is rendered. + * @event module:ol/render/Event~RenderEvent#prerender + * @api + */ + PRERENDER: 'prerender', + + /** + * Triggered after a layer is rendered. + * @event module:ol/render/Event~RenderEvent#postrender + * @api + */ + POSTRENDER: 'postrender', + + /** + * Triggered before layers are rendered. + * The event object will not have a `context` set. + * @event module:ol/render/Event~RenderEvent#precompose + * @api + */ + PRECOMPOSE: 'precompose', + + /** + * Triggered after all layers are rendered. + * The event object will not have a `context` set. + * @event module:ol/render/Event~RenderEvent#postcompose + * @api + */ + POSTCOMPOSE: 'postcompose', + + /** + * Triggered when rendering is complete, i.e. all sources and tiles have + * finished loading for the current viewport, and all tiles are faded in. + * The event object will not have a `context` set. + * @event module:ol/render/Event~RenderEvent#rendercomplete + * @api + */ + RENDERCOMPLETE: 'rendercomplete' +}); +/** + * @typedef {'postrender'|'precompose'|'postcompose'|'rendercomplete'} MapRenderEventTypes + */ + +/** + * @typedef {'postrender'|'prerender'} LayerRenderEventTypes + */ + +/***/ }), +/* 74 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Object_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24); +/* harmony import */ var _Property_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71); +/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(16); +/* harmony import */ var _asserts_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14); +/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9); +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/layer/Base + */ + + + + + + + + +/** + * @typedef {import("../ObjectEventType").Types|'change:extent'|'change:maxResolution'|'change:maxZoom'| + * 'change:minResolution'|'change:minZoom'|'change:opacity'|'change:visible'|'change:zIndex'} BaseLayerObjectEventTypes + */ + +/*** + * @template Return + * @typedef {import("../Observable").OnSignature & + * import("../Observable").OnSignature & + * import("../Observable").CombinedOnSignature} BaseLayerOnSignature + */ + +/** + * @typedef {Object} Options + * @property {string} [className='ol-layer'] A CSS class name to set to the layer element. + * @property {number} [opacity=1] Opacity (0, 1). + * @property {boolean} [visible=true] Visibility. + * @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be + * rendered outside of this extent. + * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers + * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed + * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()` + * method was used. + * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be + * visible. + * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will + * be visible. + * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be + * visible. + * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will + * be visible. + * @property {Object} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`. + */ + +/** + * @classdesc + * Abstract base class; normally only used for creating subclasses and not + * instantiated in apps. + * Note that with {@link module:ol/layer/Base} and all its subclasses, any property set in + * the options is set as a {@link module:ol/Object} property on the layer object, so + * is observable, and has get/set accessors. + * + * @api + */ + +var BaseLayer = +/** @class */ +function (_super) { + __extends(BaseLayer, _super); + /** + * @param {Options} options Layer options. + */ + + + function BaseLayer(options) { + var _this = _super.call(this) || this; + /*** + * @type {BaseLayerOnSignature} + */ + + + _this.on; + /*** + * @type {BaseLayerOnSignature} + */ + + _this.once; + /*** + * @type {BaseLayerOnSignature} + */ + + _this.un; + /** + * @type {Object} + */ + + var properties = (0,_obj_js__WEBPACK_IMPORTED_MODULE_0__.assign)({}, options); + + if (_typeof(options.properties) === 'object') { + delete properties.properties; + (0,_obj_js__WEBPACK_IMPORTED_MODULE_0__.assign)(properties, options.properties); + } + + properties[_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].OPACITY] = options.opacity !== undefined ? options.opacity : 1; + (0,_asserts_js__WEBPACK_IMPORTED_MODULE_2__.assert)(typeof properties[_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].OPACITY] === 'number', 64); // Layer opacity must be a number + + properties[_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].VISIBLE] = options.visible !== undefined ? options.visible : true; + properties[_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].Z_INDEX] = options.zIndex; + properties[_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].MAX_RESOLUTION] = options.maxResolution !== undefined ? options.maxResolution : Infinity; + properties[_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].MIN_RESOLUTION] = options.minResolution !== undefined ? options.minResolution : 0; + properties[_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].MIN_ZOOM] = options.minZoom !== undefined ? options.minZoom : -Infinity; + properties[_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].MAX_ZOOM] = options.maxZoom !== undefined ? options.maxZoom : Infinity; + /** + * @type {string} + * @private + */ + + _this.className_ = properties.className !== undefined ? options.className : 'ol-layer'; + delete properties.className; + + _this.setProperties(properties); + /** + * @type {import("./Layer.js").State} + * @private + */ + + + _this.state_ = null; + return _this; + } + /** + * @return {string} CSS class name. + */ + + + BaseLayer.prototype.getClassName = function () { + return this.className_; + }; + /** + * This method is not meant to be called by layers or layer renderers because the state + * is incorrect if the layer is included in a layer group. + * + * @param {boolean} [opt_managed] Layer is managed. + * @return {import("./Layer.js").State} Layer state. + */ + + + BaseLayer.prototype.getLayerState = function (opt_managed) { + /** @type {import("./Layer.js").State} */ + var state = this.state_ || + /** @type {?} */ + { + layer: this, + managed: opt_managed === undefined ? true : opt_managed + }; + var zIndex = this.getZIndex(); + state.opacity = (0,_math_js__WEBPACK_IMPORTED_MODULE_3__.clamp)(Math.round(this.getOpacity() * 100) / 100, 0, 1); + state.sourceState = this.getSourceState(); + state.visible = this.getVisible(); + state.extent = this.getExtent(); + state.zIndex = zIndex === undefined && !state.managed ? Infinity : zIndex; + state.maxResolution = this.getMaxResolution(); + state.minResolution = Math.max(this.getMinResolution(), 0); + state.minZoom = this.getMinZoom(); + state.maxZoom = this.getMaxZoom(); + this.state_ = state; + return state; + }; + /** + * @abstract + * @param {Array} [opt_array] Array of layers (to be + * modified in place). + * @return {Array} Array of layers. + */ + + + BaseLayer.prototype.getLayersArray = function (opt_array) { + return (0,_util_js__WEBPACK_IMPORTED_MODULE_4__.abstract)(); + }; + /** + * @abstract + * @param {Array} [opt_states] Optional list of layer + * states (to be modified in place). + * @return {Array} List of layer states. + */ + + + BaseLayer.prototype.getLayerStatesArray = function (opt_states) { + return (0,_util_js__WEBPACK_IMPORTED_MODULE_4__.abstract)(); + }; + /** + * Return the {@link module:ol/extent~Extent extent} of the layer or `undefined` if it + * will be visible regardless of extent. + * @return {import("../extent.js").Extent|undefined} The layer extent. + * @observable + * @api + */ + + + BaseLayer.prototype.getExtent = function () { + return ( + /** @type {import("../extent.js").Extent|undefined} */ + this.get(_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].EXTENT) + ); + }; + /** + * Return the maximum resolution of the layer. + * @return {number} The maximum resolution of the layer. + * @observable + * @api + */ + + + BaseLayer.prototype.getMaxResolution = function () { + return ( + /** @type {number} */ + this.get(_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].MAX_RESOLUTION) + ); + }; + /** + * Return the minimum resolution of the layer. + * @return {number} The minimum resolution of the layer. + * @observable + * @api + */ + + + BaseLayer.prototype.getMinResolution = function () { + return ( + /** @type {number} */ + this.get(_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].MIN_RESOLUTION) + ); + }; + /** + * Return the minimum zoom level of the layer. + * @return {number} The minimum zoom level of the layer. + * @observable + * @api + */ + + + BaseLayer.prototype.getMinZoom = function () { + return ( + /** @type {number} */ + this.get(_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].MIN_ZOOM) + ); + }; + /** + * Return the maximum zoom level of the layer. + * @return {number} The maximum zoom level of the layer. + * @observable + * @api + */ + + + BaseLayer.prototype.getMaxZoom = function () { + return ( + /** @type {number} */ + this.get(_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].MAX_ZOOM) + ); + }; + /** + * Return the opacity of the layer (between 0 and 1). + * @return {number} The opacity of the layer. + * @observable + * @api + */ + + + BaseLayer.prototype.getOpacity = function () { + return ( + /** @type {number} */ + this.get(_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].OPACITY) + ); + }; + /** + * @abstract + * @return {import("../source/State.js").default} Source state. + */ + + + BaseLayer.prototype.getSourceState = function () { + return (0,_util_js__WEBPACK_IMPORTED_MODULE_4__.abstract)(); + }; + /** + * Return the visibility of the layer (`true` or `false`). + * @return {boolean} The visibility of the layer. + * @observable + * @api + */ + + + BaseLayer.prototype.getVisible = function () { + return ( + /** @type {boolean} */ + this.get(_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].VISIBLE) + ); + }; + /** + * Return the Z-index of the layer, which is used to order layers before + * rendering. The default Z-index is 0. + * @return {number} The Z-index of the layer. + * @observable + * @api + */ + + + BaseLayer.prototype.getZIndex = function () { + return ( + /** @type {number} */ + this.get(_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].Z_INDEX) + ); + }; + /** + * Set the extent at which the layer is visible. If `undefined`, the layer + * will be visible at all extents. + * @param {import("../extent.js").Extent|undefined} extent The extent of the layer. + * @observable + * @api + */ + + + BaseLayer.prototype.setExtent = function (extent) { + this.set(_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].EXTENT, extent); + }; + /** + * Set the maximum resolution at which the layer is visible. + * @param {number} maxResolution The maximum resolution of the layer. + * @observable + * @api + */ + + + BaseLayer.prototype.setMaxResolution = function (maxResolution) { + this.set(_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].MAX_RESOLUTION, maxResolution); + }; + /** + * Set the minimum resolution at which the layer is visible. + * @param {number} minResolution The minimum resolution of the layer. + * @observable + * @api + */ + + + BaseLayer.prototype.setMinResolution = function (minResolution) { + this.set(_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].MIN_RESOLUTION, minResolution); + }; + /** + * Set the maximum zoom (exclusive) at which the layer is visible. + * Note that the zoom levels for layer visibility are based on the + * view zoom level, which may be different from a tile source zoom level. + * @param {number} maxZoom The maximum zoom of the layer. + * @observable + * @api + */ + + + BaseLayer.prototype.setMaxZoom = function (maxZoom) { + this.set(_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].MAX_ZOOM, maxZoom); + }; + /** + * Set the minimum zoom (inclusive) at which the layer is visible. + * Note that the zoom levels for layer visibility are based on the + * view zoom level, which may be different from a tile source zoom level. + * @param {number} minZoom The minimum zoom of the layer. + * @observable + * @api + */ + + + BaseLayer.prototype.setMinZoom = function (minZoom) { + this.set(_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].MIN_ZOOM, minZoom); + }; + /** + * Set the opacity of the layer, allowed values range from 0 to 1. + * @param {number} opacity The opacity of the layer. + * @observable + * @api + */ + + + BaseLayer.prototype.setOpacity = function (opacity) { + (0,_asserts_js__WEBPACK_IMPORTED_MODULE_2__.assert)(typeof opacity === 'number', 64); // Layer opacity must be a number + + this.set(_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].OPACITY, opacity); + }; + /** + * Set the visibility of the layer (`true` or `false`). + * @param {boolean} visible The visibility of the layer. + * @observable + * @api + */ + + + BaseLayer.prototype.setVisible = function (visible) { + this.set(_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].VISIBLE, visible); + }; + /** + * Set Z-index of the layer, which is used to order layers before rendering. + * The default Z-index is 0. + * @param {number} zindex The z-index of the layer. + * @observable + * @api + */ + + + BaseLayer.prototype.setZIndex = function (zindex) { + this.set(_Property_js__WEBPACK_IMPORTED_MODULE_1__["default"].Z_INDEX, zindex); + }; + /** + * Clean up. + */ + + + BaseLayer.prototype.disposeInternal = function () { + if (this.state_) { + this.state_.layer = null; + this.state_ = null; + } + + _super.prototype.disposeInternal.call(this); + }; + + return BaseLayer; +}(_Object_js__WEBPACK_IMPORTED_MODULE_5__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (BaseLayer); + +/***/ }), +/* 75 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Object_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(24); +/* harmony import */ var _MapEventType_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(76); +/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(30); +/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/control/Control + */ + + + + + + + +/** + * @typedef {Object} Options + * @property {HTMLElement} [element] The element is the control's + * container element. This only needs to be specified if you're developing + * a custom control. + * @property {function(import("../MapEvent.js").default):void} [render] Function called when + * the control should be re-rendered. This is called in a `requestAnimationFrame` + * callback. + * @property {HTMLElement|string} [target] Specify a target if you want + * the control to be rendered outside of the map's viewport. + */ + +/** + * @classdesc + * A control is a visible widget with a DOM element in a fixed position on the + * screen. They can involve user input (buttons), or be informational only; + * the position is determined using CSS. By default these are placed in the + * container with CSS class name `ol-overlaycontainer-stopevent`, but can use + * any outside DOM element. + * + * This is the base class for controls. You can use it for simple custom + * controls by creating the element with listeners, creating an instance: + * ```js + * var myControl = new Control({element: myElement}); + * ``` + * and then adding this to the map. + * + * The main advantage of having this as a control rather than a simple separate + * DOM element is that preventing propagation is handled for you. Controls + * will also be objects in a {@link module:ol/Collection~Collection}, so you can use their methods. + * + * You can also extend this base for your own control class. See + * examples/custom-controls for an example of how to do this. + * + * @api + */ + +var Control = +/** @class */ +function (_super) { + __extends(Control, _super); + /** + * @param {Options} options Control options. + */ + + + function Control(options) { + var _this = _super.call(this) || this; + + var element = options.element; + + if (element && !options.target && !element.style.pointerEvents) { + element.style.pointerEvents = 'auto'; + } + /** + * @protected + * @type {HTMLElement} + */ + + + _this.element = element ? element : null; + /** + * @private + * @type {HTMLElement} + */ + + _this.target_ = null; + /** + * @private + * @type {import("../PluggableMap.js").default} + */ + + _this.map_ = null; + /** + * @protected + * @type {!Array} + */ + + _this.listenerKeys = []; + + if (options.render) { + _this.render = options.render; + } + + if (options.target) { + _this.setTarget(options.target); + } + + return _this; + } + /** + * Clean up. + */ + + + Control.prototype.disposeInternal = function () { + (0,_dom_js__WEBPACK_IMPORTED_MODULE_0__.removeNode)(this.element); + + _super.prototype.disposeInternal.call(this); + }; + /** + * Get the map associated with this control. + * @return {import("../PluggableMap.js").default|undefined} Map. + * @api + */ + + + Control.prototype.getMap = function () { + return this.map_; + }; + /** + * Remove the control from its current map and attach it to the new map. + * Subclasses may set up event handlers to get notified about changes to + * the map here. + * @param {import("../PluggableMap.js").default} [map] Map. + * @api + */ + + + Control.prototype.setMap = function (map) { + if (this.map_) { + (0,_dom_js__WEBPACK_IMPORTED_MODULE_0__.removeNode)(this.element); + } + + for (var i = 0, ii = this.listenerKeys.length; i < ii; ++i) { + (0,_events_js__WEBPACK_IMPORTED_MODULE_1__.unlistenByKey)(this.listenerKeys[i]); + } + + this.listenerKeys.length = 0; + this.map_ = map; + + if (this.map_) { + var target = this.target_ ? this.target_ : map.getOverlayContainerStopEvent(); + target.appendChild(this.element); + + if (this.render !== _functions_js__WEBPACK_IMPORTED_MODULE_2__.VOID) { + this.listenerKeys.push((0,_events_js__WEBPACK_IMPORTED_MODULE_1__.listen)(map, _MapEventType_js__WEBPACK_IMPORTED_MODULE_3__["default"].POSTRENDER, this.render, this)); + } + + map.render(); + } + }; + /** + * Renders the control. + * @param {import("../MapEvent.js").default} mapEvent Map event. + * @api + */ + + + Control.prototype.render = function (mapEvent) {}; + /** + * This function is used to set a target element for the control. It has no + * effect if it is called after the control has been added to the map (i.e. + * after `setMap` is called on the control). If no `target` is set in the + * options passed to the control constructor and if `setTarget` is not called + * then the control is added to the map's overlay container. + * @param {HTMLElement|string} target Target. + * @api + */ + + + Control.prototype.setTarget = function (target) { + this.target_ = typeof target === 'string' ? document.getElementById(target) : target; + }; + + return Control; +}(_Object_js__WEBPACK_IMPORTED_MODULE_4__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (Control); + +/***/ }), +/* 76 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * @module ol/MapEventType + */ + +/** + * @enum {string} + */ +/* harmony default export */ __webpack_exports__["default"] = ({ + /** + * Triggered after a map frame is rendered. + * @event module:ol/MapEvent~MapEvent#postrender + * @api + */ + POSTRENDER: 'postrender', + + /** + * Triggered when the map starts moving. + * @event module:ol/MapEvent~MapEvent#movestart + * @api + */ + MOVESTART: 'movestart', + + /** + * Triggered after the map is moved. + * @event module:ol/MapEvent~MapEvent#moveend + * @api + */ + MOVEEND: 'moveend' +}); +/*** + * @typedef {'postrender'|'movestart'|'moveend'} Types + */ + +/***/ }), +/* 77 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Control_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(75); +/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27); +/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(69); +/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(28); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(64); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/control/FullScreen + */ + + + + + + + +var events = ['fullscreenchange', 'webkitfullscreenchange', 'MSFullscreenChange']; +/** + * @enum {string} + */ + +var FullScreenEventType = { + /** + * Triggered after the map entered fullscreen. + * @event FullScreenEventType#enterfullscreen + * @api + */ + ENTERFULLSCREEN: 'enterfullscreen', + + /** + * Triggered after the map leave fullscreen. + * @event FullScreenEventType#leavefullscreen + * @api + */ + LEAVEFULLSCREEN: 'leavefullscreen' +}; +/*** + * @template Return + * @typedef {import("../Observable").OnSignature & + * import("../Observable").OnSignature & + * import("../Observable").CombinedOnSignature} FullScreenOnSignature + */ + +/** + * @typedef {Object} Options + * @property {string} [className='ol-full-screen'] CSS class name. + * @property {string|Text|HTMLElement} [label='\u2922'] Text label to use for the button. + * Instead of text, also an element (e.g. a `span` element) can be used. + * @property {string|Text|HTMLElement} [labelActive='\u00d7'] Text label to use for the + * button when full-screen is active. + * Instead of text, also an element (e.g. a `span` element) can be used. + * @property {string} [activeClassName=className + '-true'] CSS class name for the button + * when full-screen is active. + * @property {string} [inactiveClassName=className + '-false'] CSS class name for the button + * when full-screen is inactive. + * @property {string} [tipLabel='Toggle full-screen'] Text label to use for the button tip. + * @property {boolean} [keys=false] Full keyboard access. + * @property {HTMLElement|string} [target] Specify a target if you want the + * control to be rendered outside of the map's viewport. + * @property {HTMLElement|string} [source] The element to be displayed + * fullscreen. When not provided, the element containing the map viewport will + * be displayed fullscreen. + */ + +/** + * @classdesc + * Provides a button that when clicked fills up the full screen with the map. + * The full screen source element is by default the element containing the map viewport unless + * overridden by providing the `source` option. In which case, the dom + * element introduced using this parameter will be displayed in full screen. + * + * When in full screen mode, a close button is shown to exit full screen mode. + * The [Fullscreen API](https://www.w3.org/TR/fullscreen/) is used to + * toggle the map in full screen mode. + * + * @fires FullScreenEventType#enterfullscreen + * @fires FullScreenEventType#leavefullscreen + * @api + */ + +var FullScreen = +/** @class */ +function (_super) { + __extends(FullScreen, _super); + /** + * @param {Options} [opt_options] Options. + */ + + + function FullScreen(opt_options) { + var _this = this; + + var options = opt_options ? opt_options : {}; + _this = _super.call(this, { + element: document.createElement('div'), + target: options.target + }) || this; + /*** + * @type {FullScreenOnSignature} + */ + + _this.on; + /*** + * @type {FullScreenOnSignature} + */ + + _this.once; + /*** + * @type {FullScreenOnSignature} + */ + + _this.un; + /** + * @private + * @type {string} + */ + + _this.cssClassName_ = options.className !== undefined ? options.className : 'ol-full-screen'; + /** + * @private + * @type {Array} + */ + + _this.activeClassName_ = options.activeClassName !== undefined ? options.activeClassName.split(' ') : [_this.cssClassName_ + '-true']; + /** + * @private + * @type {Array} + */ + + _this.inactiveClassName_ = options.inactiveClassName !== undefined ? options.inactiveClassName.split(' ') : [_this.cssClassName_ + '-false']; + var label = options.label !== undefined ? options.label : "\u2922"; + /** + * @private + * @type {Text|HTMLElement} + */ + + _this.labelNode_ = typeof label === 'string' ? document.createTextNode(label) : label; + var labelActive = options.labelActive !== undefined ? options.labelActive : "\xD7"; + /** + * @private + * @type {Text|HTMLElement} + */ + + _this.labelActiveNode_ = typeof labelActive === 'string' ? document.createTextNode(labelActive) : labelActive; + /** + * @private + * @type {HTMLElement} + */ + + _this.button_ = document.createElement('button'); + var tipLabel = options.tipLabel ? options.tipLabel : 'Toggle full-screen'; + + _this.setClassName_(_this.button_, isFullScreen()); + + _this.button_.setAttribute('type', 'button'); + + _this.button_.title = tipLabel; + + _this.button_.appendChild(_this.labelNode_); + + _this.button_.addEventListener(_events_EventType_js__WEBPACK_IMPORTED_MODULE_0__["default"].CLICK, _this.handleClick_.bind(_this), false); + + var cssClasses = _this.cssClassName_ + ' ' + _css_js__WEBPACK_IMPORTED_MODULE_1__.CLASS_UNSELECTABLE + ' ' + _css_js__WEBPACK_IMPORTED_MODULE_1__.CLASS_CONTROL + ' ' + (!isFullScreenSupported() ? _css_js__WEBPACK_IMPORTED_MODULE_1__.CLASS_UNSUPPORTED : ''); + var element = _this.element; + element.className = cssClasses; + element.appendChild(_this.button_); + /** + * @private + * @type {boolean} + */ + + _this.keys_ = options.keys !== undefined ? options.keys : false; + /** + * @private + * @type {HTMLElement|string|undefined} + */ + + _this.source_ = options.source; + return _this; + } + /** + * @param {MouseEvent} event The event to handle + * @private + */ + + + FullScreen.prototype.handleClick_ = function (event) { + event.preventDefault(); + this.handleFullScreen_(); + }; + /** + * @private + */ + + + FullScreen.prototype.handleFullScreen_ = function () { + if (!isFullScreenSupported()) { + return; + } + + var map = this.getMap(); + + if (!map) { + return; + } + + if (isFullScreen()) { + exitFullScreen(); + } else { + var element = void 0; + + if (this.source_) { + element = typeof this.source_ === 'string' ? document.getElementById(this.source_) : this.source_; + } else { + element = map.getTargetElement(); + } + + if (this.keys_) { + requestFullScreenWithKeys(element); + } else { + requestFullScreen(element); + } + } + }; + /** + * @private + */ + + + FullScreen.prototype.handleFullScreenChange_ = function () { + var map = this.getMap(); + + if (isFullScreen()) { + this.setClassName_(this.button_, true); + (0,_dom_js__WEBPACK_IMPORTED_MODULE_2__.replaceNode)(this.labelActiveNode_, this.labelNode_); + this.dispatchEvent(FullScreenEventType.ENTERFULLSCREEN); + } else { + this.setClassName_(this.button_, false); + (0,_dom_js__WEBPACK_IMPORTED_MODULE_2__.replaceNode)(this.labelNode_, this.labelActiveNode_); + this.dispatchEvent(FullScreenEventType.LEAVEFULLSCREEN); + } + + if (map) { + map.updateSize(); + } + }; + /** + * @param {HTMLElement} element Target element + * @param {boolean} fullscreen True if fullscreen class name should be active + * @private + */ + + + FullScreen.prototype.setClassName_ = function (element, fullscreen) { + var _a, _b, _c; + + var activeClassName = this.activeClassName_; + var inactiveClassName = this.inactiveClassName_; + var nextClassName = fullscreen ? activeClassName : inactiveClassName; + + (_a = element.classList).remove.apply(_a, activeClassName); + + (_b = element.classList).remove.apply(_b, inactiveClassName); + + (_c = element.classList).add.apply(_c, nextClassName); + }; + /** + * Remove the control from its current map and attach it to the new map. + * Subclasses may set up event handlers to get notified about changes to + * the map here. + * @param {import("../PluggableMap.js").default} map Map. + * @api + */ + + + FullScreen.prototype.setMap = function (map) { + _super.prototype.setMap.call(this, map); + + if (map) { + for (var i = 0, ii = events.length; i < ii; ++i) { + this.listenerKeys.push((0,_events_js__WEBPACK_IMPORTED_MODULE_3__.listen)(document, events[i], this.handleFullScreenChange_, this)); + } + } + }; + + return FullScreen; +}(_Control_js__WEBPACK_IMPORTED_MODULE_4__["default"]); +/** + * @return {boolean} Fullscreen is supported by the current platform. + */ + + +function isFullScreenSupported() { + var body = document.body; + return !!(body['webkitRequestFullscreen'] || body['msRequestFullscreen'] && document['msFullscreenEnabled'] || body.requestFullscreen && document.fullscreenEnabled); +} +/** + * @return {boolean} Element is currently in fullscreen. + */ + + +function isFullScreen() { + return !!(document['webkitIsFullScreen'] || document['msFullscreenElement'] || document.fullscreenElement); +} +/** + * Request to fullscreen an element. + * @param {HTMLElement} element Element to request fullscreen + */ + + +function requestFullScreen(element) { + if (element.requestFullscreen) { + element.requestFullscreen(); + } else if (element['msRequestFullscreen']) { + element['msRequestFullscreen'](); + } else if (element['webkitRequestFullscreen']) { + element['webkitRequestFullscreen'](); + } +} +/** + * Request to fullscreen an element with keyboard input. + * @param {HTMLElement} element Element to request fullscreen + */ + + +function requestFullScreenWithKeys(element) { + if (element['webkitRequestFullscreen']) { + element['webkitRequestFullscreen'](); + } else { + requestFullScreen(element); + } +} +/** + * Exit fullscreen. + */ + + +function exitFullScreen() { + if (document.exitFullscreen) { + document.exitFullscreen(); + } else if (document['msExitFullscreen']) { + document['msExitFullscreen'](); + } else if (document['webkitExitFullscreen']) { + document['webkitExitFullscreen'](); + } +} + +/* harmony default export */ __webpack_exports__["default"] = (FullScreen); + +/***/ }), +/* 78 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Control_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(75); +/* harmony import */ var _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(79); +/* harmony import */ var _proj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28); +/** + * @module ol/control/MousePosition + */ +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); + + + + + +/** + * @type {string} + */ + +var PROJECTION = 'projection'; +/** + * @type {string} + */ + +var COORDINATE_FORMAT = 'coordinateFormat'; +/*** + * @template Return + * @typedef {import("../Observable").OnSignature & + * import("../Observable").OnSignature & + * import("../Observable").CombinedOnSignature} MousePositionOnSignature + */ + +/** + * @typedef {Object} Options + * @property {string} [className='ol-mouse-position'] CSS class name. + * @property {import("../coordinate.js").CoordinateFormat} [coordinateFormat] Coordinate format. + * @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection. + * @property {function(import("../MapEvent.js").default):void} [render] Function called when the + * control should be re-rendered. This is called in a `requestAnimationFrame` + * callback. + * @property {HTMLElement|string} [target] Specify a target if you want the + * control to be rendered outside of the map's viewport. + * @property {string|boolean} [placeholder] Markup to show when the mouse position is not + * available (e.g. when the pointer leaves the map viewport). By default, a non-breaking space + * is rendered when the mouse leaves the viewport. To render something else, provide a string + * to be used as the text content (e.g. 'no position' or '' for an empty string). Set the placeholder + * to `false` to retain the last position when the mouse leaves the viewport. In a future release, this + * will be the default behavior. + * @property {string} [undefinedHTML=' '] This option is deprecated. Use the `placeholder` option instead. + */ + +/** + * @classdesc + * A control to show the 2D coordinates of the mouse cursor. By default, these + * are in the view projection, but can be in any supported projection. + * By default the control is shown in the top right corner of the map, but this + * can be changed by using the css selector `.ol-mouse-position`. + * + * On touch devices, which usually do not have a mouse cursor, the coordinates + * of the currently touched position are shown. + * + * @api + */ + +var MousePosition = +/** @class */ +function (_super) { + __extends(MousePosition, _super); + /** + * @param {Options} [opt_options] Mouse position options. + */ + + + function MousePosition(opt_options) { + var _this = this; + + var options = opt_options ? opt_options : {}; + var element = document.createElement('div'); + element.className = options.className !== undefined ? options.className : 'ol-mouse-position'; + _this = _super.call(this, { + element: element, + render: options.render, + target: options.target + }) || this; + /*** + * @type {MousePositionOnSignature} + */ + + _this.on; + /*** + * @type {MousePositionOnSignature} + */ + + _this.once; + /*** + * @type {MousePositionOnSignature} + */ + + _this.un; + + _this.addChangeListener(PROJECTION, _this.handleProjectionChanged_); + + if (options.coordinateFormat) { + _this.setCoordinateFormat(options.coordinateFormat); + } + + if (options.projection) { + _this.setProjection(options.projection); + } + /** + * Change this to `false` when removing the deprecated `undefinedHTML` option. + * @type {boolean} + */ + + + var renderOnMouseOut = true; + /** + * @type {string} + */ + + var placeholder = ' '; + + if ('undefinedHTML' in options) { + // deprecated behavior + if (options.undefinedHTML !== undefined) { + placeholder = options.undefinedHTML; + } + + renderOnMouseOut = !!placeholder; + } else if ('placeholder' in options) { + if (options.placeholder === false) { + renderOnMouseOut = false; + } else { + placeholder = String(options.placeholder); + } + } + /** + * @private + * @type {string} + */ + + + _this.placeholder_ = placeholder; + /** + * @private + * @type {boolean} + */ + + _this.renderOnMouseOut_ = renderOnMouseOut; + /** + * @private + * @type {string} + */ + + _this.renderedHTML_ = element.innerHTML; + /** + * @private + * @type {?import("../proj/Projection.js").default} + */ + + _this.mapProjection_ = null; + /** + * @private + * @type {?import("../proj.js").TransformFunction} + */ + + _this.transform_ = null; + return _this; + } + /** + * @private + */ + + + MousePosition.prototype.handleProjectionChanged_ = function () { + this.transform_ = null; + }; + /** + * Return the coordinate format type used to render the current position or + * undefined. + * @return {import("../coordinate.js").CoordinateFormat|undefined} The format to render the current + * position in. + * @observable + * @api + */ + + + MousePosition.prototype.getCoordinateFormat = function () { + return ( + /** @type {import("../coordinate.js").CoordinateFormat|undefined} */ + this.get(COORDINATE_FORMAT) + ); + }; + /** + * Return the projection that is used to report the mouse position. + * @return {import("../proj/Projection.js").default|undefined} The projection to report mouse + * position in. + * @observable + * @api + */ + + + MousePosition.prototype.getProjection = function () { + return ( + /** @type {import("../proj/Projection.js").default|undefined} */ + this.get(PROJECTION) + ); + }; + /** + * @param {MouseEvent} event Browser event. + * @protected + */ + + + MousePosition.prototype.handleMouseMove = function (event) { + var map = this.getMap(); + this.updateHTML_(map.getEventPixel(event)); + }; + /** + * @param {Event} event Browser event. + * @protected + */ + + + MousePosition.prototype.handleMouseOut = function (event) { + this.updateHTML_(null); + }; + /** + * Remove the control from its current map and attach it to the new map. + * Subclasses may set up event handlers to get notified about changes to + * the map here. + * @param {import("../PluggableMap.js").default} map Map. + * @api + */ + + + MousePosition.prototype.setMap = function (map) { + _super.prototype.setMap.call(this, map); + + if (map) { + var viewport = map.getViewport(); + this.listenerKeys.push((0,_events_js__WEBPACK_IMPORTED_MODULE_1__.listen)(viewport, _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_2__["default"].POINTERMOVE, this.handleMouseMove, this)); + + if (this.renderOnMouseOut_) { + this.listenerKeys.push((0,_events_js__WEBPACK_IMPORTED_MODULE_1__.listen)(viewport, _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_2__["default"].POINTEROUT, this.handleMouseOut, this)); + } + + this.updateHTML_(null); + } + }; + /** + * Set the coordinate format type used to render the current position. + * @param {import("../coordinate.js").CoordinateFormat} format The format to render the current + * position in. + * @observable + * @api + */ + + + MousePosition.prototype.setCoordinateFormat = function (format) { + this.set(COORDINATE_FORMAT, format); + }; + /** + * Set the projection that is used to report the mouse position. + * @param {import("../proj.js").ProjectionLike} projection The projection to report mouse + * position in. + * @observable + * @api + */ + + + MousePosition.prototype.setProjection = function (projection) { + this.set(PROJECTION, (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.get)(projection)); + }; + /** + * @param {?import("../pixel.js").Pixel} pixel Pixel. + * @private + */ + + + MousePosition.prototype.updateHTML_ = function (pixel) { + var html = this.placeholder_; + + if (pixel && this.mapProjection_) { + if (!this.transform_) { + var projection = this.getProjection(); + + if (projection) { + this.transform_ = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getTransformFromProjections)(this.mapProjection_, projection); + } else { + this.transform_ = _proj_js__WEBPACK_IMPORTED_MODULE_0__.identityTransform; + } + } + + var map = this.getMap(); + var coordinate = map.getCoordinateFromPixelInternal(pixel); + + if (coordinate) { + var userProjection = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getUserProjection)(); + + if (userProjection) { + this.transform_ = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getTransformFromProjections)(this.mapProjection_, userProjection); + } + + this.transform_(coordinate, coordinate); + var coordinateFormat = this.getCoordinateFormat(); + + if (coordinateFormat) { + html = coordinateFormat(coordinate); + } else { + html = coordinate.toString(); + } + } + } + + if (!this.renderedHTML_ || html !== this.renderedHTML_) { + this.element.innerHTML = html; + this.renderedHTML_ = html; + } + }; + /** + * Update the projection. Rendering of the coordinates is done in + * `handleMouseMove` and `handleMouseUp`. + * @param {import("../MapEvent.js").default} mapEvent Map event. + * @override + */ + + + MousePosition.prototype.render = function (mapEvent) { + var frameState = mapEvent.frameState; + + if (!frameState) { + this.mapProjection_ = null; + } else { + if (this.mapProjection_ != frameState.viewState.projection) { + this.mapProjection_ = frameState.viewState.projection; + this.transform_ = null; + } + } + }; + + return MousePosition; +}(_Control_js__WEBPACK_IMPORTED_MODULE_3__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (MousePosition); + +/***/ }), +/* 79 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * @module ol/pointer/EventType + */ + +/** + * Constants for event names. + * @enum {string} + */ +/* harmony default export */ __webpack_exports__["default"] = ({ + POINTERMOVE: 'pointermove', + POINTERDOWN: 'pointerdown', + POINTERUP: 'pointerup', + POINTEROVER: 'pointerover', + POINTEROUT: 'pointerout', + POINTERENTER: 'pointerenter', + POINTERLEAVE: 'pointerleave', + POINTERCANCEL: 'pointercancel' +}); + +/***/ }), +/* 80 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _renderer_Composite_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81); +/* harmony import */ var _Control_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(75); +/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27); +/* harmony import */ var _MapEventType_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(76); +/* harmony import */ var _MapProperty_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90); +/* harmony import */ var _ObjectEventType_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(25); +/* harmony import */ var _Overlay_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(104); +/* harmony import */ var _OverlayPositioning_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(105); +/* harmony import */ var _PluggableMap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(87); +/* harmony import */ var _View_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(91); +/* harmony import */ var _ViewProperty_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(93); +/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(69); +/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(11); +/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(28); +/* harmony import */ var _geom_Polygon_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(39); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(64); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/control/OverviewMap + */ + + + + + + + + + + + + + + + + + + +/** + * Maximum width and/or height extent ratio that determines when the overview + * map should be zoomed out. + * @type {number} + */ + +var MAX_RATIO = 0.75; +/** + * Minimum width and/or height extent ratio that determines when the overview + * map should be zoomed in. + * @type {number} + */ + +var MIN_RATIO = 0.1; + +var ControlledMap = +/** @class */ +function (_super) { + __extends(ControlledMap, _super); + + function ControlledMap() { + return _super !== null && _super.apply(this, arguments) || this; + } + + ControlledMap.prototype.createRenderer = function () { + return new _renderer_Composite_js__WEBPACK_IMPORTED_MODULE_0__["default"](this); + }; + + return ControlledMap; +}(_PluggableMap_js__WEBPACK_IMPORTED_MODULE_1__["default"]); +/** + * @typedef {Object} Options + * @property {string} [className='ol-overviewmap'] CSS class name. + * @property {boolean} [collapsed=true] Whether the control should start collapsed or not (expanded). + * @property {string|HTMLElement} [collapseLabel='‹'] Text label to use for the + * expanded overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used. + * @property {boolean} [collapsible=true] Whether the control can be collapsed or not. + * @property {string|HTMLElement} [label='›'] Text label to use for the collapsed + * overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used. + * @property {Array|import("../Collection.js").default} [layers] + * Layers for the overview map. + * @property {function(import("../MapEvent.js").default):void} [render] Function called when the control + * should be re-rendered. This is called in a `requestAnimationFrame` callback. + * @property {boolean} [rotateWithView=false] Whether the control view should rotate with the main map view. + * @property {HTMLElement|string} [target] Specify a target if you want the control + * to be rendered outside of the map's viewport. + * @property {string} [tipLabel='Overview map'] Text label to use for the button tip. + * @property {View} [view] Custom view for the overview map (should use same projection as main map). If not provided, + * a default view with the same projection as the main map will be used. + */ + +/** + * Create a new control with a map acting as an overview map for another + * defined map. + * + * @api + */ + + +var OverviewMap = +/** @class */ +function (_super) { + __extends(OverviewMap, _super); + /** + * @param {Options} [opt_options] OverviewMap options. + */ + + + function OverviewMap(opt_options) { + var _this = this; + + var options = opt_options ? opt_options : {}; + _this = _super.call(this, { + element: document.createElement('div'), + render: options.render, + target: options.target + }) || this; + /** + * @private + */ + + _this.boundHandleRotationChanged_ = _this.handleRotationChanged_.bind(_this); + /** + * @type {boolean} + * @private + */ + + _this.collapsed_ = options.collapsed !== undefined ? options.collapsed : true; + /** + * @private + * @type {boolean} + */ + + _this.collapsible_ = options.collapsible !== undefined ? options.collapsible : true; + + if (!_this.collapsible_) { + _this.collapsed_ = false; + } + /** + * @private + * @type {boolean} + */ + + + _this.rotateWithView_ = options.rotateWithView !== undefined ? options.rotateWithView : false; + /** + * @private + * @type {import("../extent.js").Extent|undefined} + */ + + _this.viewExtent_ = undefined; + var className = options.className !== undefined ? options.className : 'ol-overviewmap'; + var tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Overview map'; + var collapseLabel = options.collapseLabel !== undefined ? options.collapseLabel : "\u2039"; + + if (typeof collapseLabel === 'string') { + /** + * @private + * @type {HTMLElement} + */ + _this.collapseLabel_ = document.createElement('span'); + _this.collapseLabel_.textContent = collapseLabel; + } else { + _this.collapseLabel_ = collapseLabel; + } + + var label = options.label !== undefined ? options.label : "\u203A"; + + if (typeof label === 'string') { + /** + * @private + * @type {HTMLElement} + */ + _this.label_ = document.createElement('span'); + _this.label_.textContent = label; + } else { + _this.label_ = label; + } + + var activeLabel = _this.collapsible_ && !_this.collapsed_ ? _this.collapseLabel_ : _this.label_; + var button = document.createElement('button'); + button.setAttribute('type', 'button'); + button.title = tipLabel; + button.appendChild(activeLabel); + button.addEventListener(_events_EventType_js__WEBPACK_IMPORTED_MODULE_2__["default"].CLICK, _this.handleClick_.bind(_this), false); + /** + * @type {HTMLElement} + * @private + */ + + _this.ovmapDiv_ = document.createElement('div'); + _this.ovmapDiv_.className = 'ol-overviewmap-map'; + /** + * Explicitly given view to be used instead of a view derived from the main map. + * @type {View} + * @private + */ + + _this.view_ = options.view; + /** + * @type {ControlledMap} + * @private + */ + + _this.ovmap_ = new ControlledMap({ + view: options.view + }); + var ovmap = _this.ovmap_; + + if (options.layers) { + options.layers.forEach(function (layer) { + ovmap.addLayer(layer); + }); + } + + var box = document.createElement('div'); + box.className = 'ol-overviewmap-box'; + box.style.boxSizing = 'border-box'; + /** + * @type {import("../Overlay.js").default} + * @private + */ + + _this.boxOverlay_ = new _Overlay_js__WEBPACK_IMPORTED_MODULE_3__["default"]({ + position: [0, 0], + positioning: _OverlayPositioning_js__WEBPACK_IMPORTED_MODULE_4__["default"].CENTER_CENTER, + element: box + }); + + _this.ovmap_.addOverlay(_this.boxOverlay_); + + var cssClasses = className + ' ' + _css_js__WEBPACK_IMPORTED_MODULE_5__.CLASS_UNSELECTABLE + ' ' + _css_js__WEBPACK_IMPORTED_MODULE_5__.CLASS_CONTROL + (_this.collapsed_ && _this.collapsible_ ? ' ' + _css_js__WEBPACK_IMPORTED_MODULE_5__.CLASS_COLLAPSED : '') + (_this.collapsible_ ? '' : ' ol-uncollapsible'); + var element = _this.element; + element.className = cssClasses; + element.appendChild(_this.ovmapDiv_); + element.appendChild(button); + /* Interactive map */ + + var scope = _this; + var overlay = _this.boxOverlay_; + + var overlayBox = _this.boxOverlay_.getElement(); + /* Functions definition */ + + + var computeDesiredMousePosition = function computeDesiredMousePosition(mousePosition) { + return { + clientX: mousePosition.clientX, + clientY: mousePosition.clientY + }; + }; + + var move = function move(event) { + var position = + /** @type {?} */ + computeDesiredMousePosition(event); + var coordinates = ovmap.getEventCoordinateInternal( + /** @type {MouseEvent} */ + position); + overlay.setPosition(coordinates); + }; + + var endMoving = function endMoving(event) { + var coordinates = ovmap.getEventCoordinateInternal(event); + scope.getMap().getView().setCenterInternal(coordinates); + window.removeEventListener('mousemove', move); + window.removeEventListener('mouseup', endMoving); + }; + /* Binding */ + + + overlayBox.addEventListener('mousedown', function () { + window.addEventListener('mousemove', move); + window.addEventListener('mouseup', endMoving); + }); + return _this; + } + /** + * Remove the control from its current map and attach it to the new map. + * Subclasses may set up event handlers to get notified about changes to + * the map here. + * @param {import("../PluggableMap.js").default} map Map. + * @api + */ + + + OverviewMap.prototype.setMap = function (map) { + var oldMap = this.getMap(); + + if (map === oldMap) { + return; + } + + if (oldMap) { + var oldView = oldMap.getView(); + + if (oldView) { + this.unbindView_(oldView); + } + + this.ovmap_.setTarget(null); + } + + _super.prototype.setMap.call(this, map); + + if (map) { + this.ovmap_.setTarget(this.ovmapDiv_); + this.listenerKeys.push((0,_events_js__WEBPACK_IMPORTED_MODULE_6__.listen)(map, _ObjectEventType_js__WEBPACK_IMPORTED_MODULE_7__["default"].PROPERTYCHANGE, this.handleMapPropertyChange_, this)); + var view = map.getView(); + + if (view) { + this.bindView_(view); + + if (view.isDef()) { + this.ovmap_.updateSize(); + this.resetExtent_(); + } + } + + if (!this.ovmap_.isRendered()) { + this.updateBoxAfterOvmapIsRendered_(); + } + } + }; + /** + * Handle map property changes. This only deals with changes to the map's view. + * @param {import("../Object.js").ObjectEvent} event The propertychange event. + * @private + */ + + + OverviewMap.prototype.handleMapPropertyChange_ = function (event) { + if (event.key === _MapProperty_js__WEBPACK_IMPORTED_MODULE_8__["default"].VIEW) { + var oldView = + /** @type {import("../View.js").default} */ + event.oldValue; + + if (oldView) { + this.unbindView_(oldView); + } + + var newView = this.getMap().getView(); + this.bindView_(newView); + } else if (!this.ovmap_.isRendered() && (event.key === _MapProperty_js__WEBPACK_IMPORTED_MODULE_8__["default"].TARGET || event.key === _MapProperty_js__WEBPACK_IMPORTED_MODULE_8__["default"].SIZE)) { + this.ovmap_.updateSize(); + } + }; + /** + * Register listeners for view property changes. + * @param {import("../View.js").default} view The view. + * @private + */ + + + OverviewMap.prototype.bindView_ = function (view) { + if (!this.view_) { + // Unless an explicit view definition was given, derive default from whatever main map uses. + var newView = new _View_js__WEBPACK_IMPORTED_MODULE_9__["default"]({ + projection: view.getProjection() + }); + this.ovmap_.setView(newView); + } + + view.addChangeListener(_ViewProperty_js__WEBPACK_IMPORTED_MODULE_10__["default"].ROTATION, this.boundHandleRotationChanged_); // Sync once with the new view + + this.handleRotationChanged_(); + }; + /** + * Unregister listeners for view property changes. + * @param {import("../View.js").default} view The view. + * @private + */ + + + OverviewMap.prototype.unbindView_ = function (view) { + view.removeChangeListener(_ViewProperty_js__WEBPACK_IMPORTED_MODULE_10__["default"].ROTATION, this.boundHandleRotationChanged_); + }; + /** + * Handle rotation changes to the main map. + * @private + */ + + + OverviewMap.prototype.handleRotationChanged_ = function () { + if (this.rotateWithView_) { + this.ovmap_.getView().setRotation(this.getMap().getView().getRotation()); + } + }; + /** + * Reset the overview map extent if the box size (width or + * height) is less than the size of the overview map size times minRatio + * or is greater than the size of the overview size times maxRatio. + * + * If the map extent was not reset, the box size can fits in the defined + * ratio sizes. This method then checks if is contained inside the overview + * map current extent. If not, recenter the overview map to the current + * main map center location. + * @private + */ + + + OverviewMap.prototype.validateExtent_ = function () { + var map = this.getMap(); + var ovmap = this.ovmap_; + + if (!map.isRendered() || !ovmap.isRendered()) { + return; + } + + var mapSize = + /** @type {import("../size.js").Size} */ + map.getSize(); + var view = map.getView(); + var extent = view.calculateExtentInternal(mapSize); + + if (this.viewExtent_ && (0,_extent_js__WEBPACK_IMPORTED_MODULE_11__.equals)(extent, this.viewExtent_)) { + // repeats of the same extent may indicate constraint conflicts leading to an endless cycle + return; + } + + this.viewExtent_ = extent; + var ovmapSize = + /** @type {import("../size.js").Size} */ + ovmap.getSize(); + var ovview = ovmap.getView(); + var ovextent = ovview.calculateExtentInternal(ovmapSize); + var topLeftPixel = ovmap.getPixelFromCoordinateInternal((0,_extent_js__WEBPACK_IMPORTED_MODULE_11__.getTopLeft)(extent)); + var bottomRightPixel = ovmap.getPixelFromCoordinateInternal((0,_extent_js__WEBPACK_IMPORTED_MODULE_11__.getBottomRight)(extent)); + var boxWidth = Math.abs(topLeftPixel[0] - bottomRightPixel[0]); + var boxHeight = Math.abs(topLeftPixel[1] - bottomRightPixel[1]); + var ovmapWidth = ovmapSize[0]; + var ovmapHeight = ovmapSize[1]; + + if (boxWidth < ovmapWidth * MIN_RATIO || boxHeight < ovmapHeight * MIN_RATIO || boxWidth > ovmapWidth * MAX_RATIO || boxHeight > ovmapHeight * MAX_RATIO) { + this.resetExtent_(); + } else if (!(0,_extent_js__WEBPACK_IMPORTED_MODULE_11__.containsExtent)(ovextent, extent)) { + this.recenter_(); + } + }; + /** + * Reset the overview map extent to half calculated min and max ratio times + * the extent of the main map. + * @private + */ + + + OverviewMap.prototype.resetExtent_ = function () { + if (MAX_RATIO === 0 || MIN_RATIO === 0) { + return; + } + + var map = this.getMap(); + var ovmap = this.ovmap_; + var mapSize = + /** @type {import("../size.js").Size} */ + map.getSize(); + var view = map.getView(); + var extent = view.calculateExtentInternal(mapSize); + var ovview = ovmap.getView(); // get how many times the current map overview could hold different + // box sizes using the min and max ratio, pick the step in the middle used + // to calculate the extent from the main map to set it to the overview map, + + var steps = Math.log(MAX_RATIO / MIN_RATIO) / Math.LN2; + var ratio = 1 / (Math.pow(2, steps / 2) * MIN_RATIO); + (0,_extent_js__WEBPACK_IMPORTED_MODULE_11__.scaleFromCenter)(extent, ratio); + ovview.fitInternal((0,_geom_Polygon_js__WEBPACK_IMPORTED_MODULE_12__.fromExtent)(extent)); + }; + /** + * Set the center of the overview map to the map center without changing its + * resolution. + * @private + */ + + + OverviewMap.prototype.recenter_ = function () { + var map = this.getMap(); + var ovmap = this.ovmap_; + var view = map.getView(); + var ovview = ovmap.getView(); + ovview.setCenterInternal(view.getCenterInternal()); + }; + /** + * Update the box using the main map extent + * @private + */ + + + OverviewMap.prototype.updateBox_ = function () { + var map = this.getMap(); + var ovmap = this.ovmap_; + + if (!map.isRendered() || !ovmap.isRendered()) { + return; + } + + var mapSize = + /** @type {import("../size.js").Size} */ + map.getSize(); + var view = map.getView(); + var ovview = ovmap.getView(); + var rotation = this.rotateWithView_ ? 0 : -view.getRotation(); + var overlay = this.boxOverlay_; + var box = this.boxOverlay_.getElement(); + var center = view.getCenterInternal(); + var resolution = view.getResolution(); + var ovresolution = ovview.getResolution(); + var width = mapSize[0] * resolution / ovresolution; + var height = mapSize[1] * resolution / ovresolution; // set position using center coordinates + + overlay.setPosition(center); // set box size calculated from map extent size and overview map resolution + + if (box) { + box.style.width = width + 'px'; + box.style.height = height + 'px'; + var transform = 'rotate(' + rotation + 'rad)'; + box.style.transform = transform; + } + }; + /** + * @private + */ + + + OverviewMap.prototype.updateBoxAfterOvmapIsRendered_ = function () { + if (this.ovmapPostrenderKey_) { + return; + } + + this.ovmapPostrenderKey_ = (0,_events_js__WEBPACK_IMPORTED_MODULE_6__.listenOnce)(this.ovmap_, _MapEventType_js__WEBPACK_IMPORTED_MODULE_13__["default"].POSTRENDER, function (event) { + delete this.ovmapPostrenderKey_; + this.updateBox_(); + }, this); + }; + /** + * @param {MouseEvent} event The event to handle + * @private + */ + + + OverviewMap.prototype.handleClick_ = function (event) { + event.preventDefault(); + this.handleToggle_(); + }; + /** + * @private + */ + + + OverviewMap.prototype.handleToggle_ = function () { + this.element.classList.toggle(_css_js__WEBPACK_IMPORTED_MODULE_5__.CLASS_COLLAPSED); + + if (this.collapsed_) { + (0,_dom_js__WEBPACK_IMPORTED_MODULE_14__.replaceNode)(this.collapseLabel_, this.label_); + } else { + (0,_dom_js__WEBPACK_IMPORTED_MODULE_14__.replaceNode)(this.label_, this.collapseLabel_); + } + + this.collapsed_ = !this.collapsed_; // manage overview map if it had not been rendered before and control + // is expanded + + var ovmap = this.ovmap_; + + if (!this.collapsed_) { + if (ovmap.isRendered()) { + this.viewExtent_ = undefined; + ovmap.render(); + return; + } + + ovmap.updateSize(); + this.resetExtent_(); + this.updateBoxAfterOvmapIsRendered_(); + } + }; + /** + * Return `true` if the overview map is collapsible, `false` otherwise. + * @return {boolean} True if the widget is collapsible. + * @api + */ + + + OverviewMap.prototype.getCollapsible = function () { + return this.collapsible_; + }; + /** + * Set whether the overview map should be collapsible. + * @param {boolean} collapsible True if the widget is collapsible. + * @api + */ + + + OverviewMap.prototype.setCollapsible = function (collapsible) { + if (this.collapsible_ === collapsible) { + return; + } + + this.collapsible_ = collapsible; + this.element.classList.toggle('ol-uncollapsible'); + + if (!collapsible && this.collapsed_) { + this.handleToggle_(); + } + }; + /** + * Collapse or expand the overview map according to the passed parameter. Will + * not do anything if the overview map isn't collapsible or if the current + * collapsed state is already the one requested. + * @param {boolean} collapsed True if the widget is collapsed. + * @api + */ + + + OverviewMap.prototype.setCollapsed = function (collapsed) { + if (!this.collapsible_ || this.collapsed_ === collapsed) { + return; + } + + this.handleToggle_(); + }; + /** + * Determine if the overview map is collapsed. + * @return {boolean} The overview map is collapsed. + * @api + */ + + + OverviewMap.prototype.getCollapsed = function () { + return this.collapsed_; + }; + /** + * Return `true` if the overview map view can rotate, `false` otherwise. + * @return {boolean} True if the control view can rotate. + * @api + */ + + + OverviewMap.prototype.getRotateWithView = function () { + return this.rotateWithView_; + }; + /** + * Set whether the overview map view should rotate with the main map view. + * @param {boolean} rotateWithView True if the control view should rotate. + * @api + */ + + + OverviewMap.prototype.setRotateWithView = function (rotateWithView) { + if (this.rotateWithView_ === rotateWithView) { + return; + } + + this.rotateWithView_ = rotateWithView; + + if (this.getMap().getView().getRotation() !== 0) { + if (this.rotateWithView_) { + this.handleRotationChanged_(); + } else { + this.ovmap_.getView().setRotation(0); + } + + this.viewExtent_ = undefined; + this.validateExtent_(); + this.updateBox_(); + } + }; + /** + * Return the overview map. + * @return {import("../PluggableMap.js").default} Overview map. + * @api + */ + + + OverviewMap.prototype.getOverviewMap = function () { + return this.ovmap_; + }; + /** + * Update the overview map element. + * @param {import("../MapEvent.js").default} mapEvent Map event. + * @override + */ + + + OverviewMap.prototype.render = function (mapEvent) { + this.validateExtent_(); + this.updateBox_(); + }; + + return OverviewMap; +}(_Control_js__WEBPACK_IMPORTED_MODULE_15__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (OverviewMap); + +/***/ }), +/* 81 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Map_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(84); +/* harmony import */ var _ObjectEventType_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25); +/* harmony import */ var _render_Event_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(83); +/* harmony import */ var _render_EventType_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(73); +/* harmony import */ var _source_State_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(72); +/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(69); +/* harmony import */ var _render_canvas_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(82); +/* harmony import */ var _layer_Layer_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(70); +/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(64); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/renderer/Composite + */ + + + + + + + + + + + + +/** + * @classdesc + * Canvas map renderer. + * @api + */ + +var CompositeMapRenderer = +/** @class */ +function (_super) { + __extends(CompositeMapRenderer, _super); + /** + * @param {import("../PluggableMap.js").default} map Map. + */ + + + function CompositeMapRenderer(map) { + var _this = _super.call(this, map) || this; + /** + * @type {import("../events.js").EventsKey} + */ + + + _this.fontChangeListenerKey_ = (0,_events_js__WEBPACK_IMPORTED_MODULE_0__.listen)(_render_canvas_js__WEBPACK_IMPORTED_MODULE_1__.checkedFonts, _ObjectEventType_js__WEBPACK_IMPORTED_MODULE_2__["default"].PROPERTYCHANGE, map.redrawText.bind(map)); + /** + * @private + * @type {HTMLDivElement} + */ + + _this.element_ = document.createElement('div'); + var style = _this.element_.style; + style.position = 'absolute'; + style.width = '100%'; + style.height = '100%'; + style.zIndex = '0'; + _this.element_.className = _css_js__WEBPACK_IMPORTED_MODULE_3__.CLASS_UNSELECTABLE + ' ol-layers'; + var container = map.getViewport(); + container.insertBefore(_this.element_, container.firstChild || null); + /** + * @private + * @type {Array} + */ + + _this.children_ = []; + /** + * @private + * @type {boolean} + */ + + _this.renderedVisible_ = true; + return _this; + } + /** + * @param {import("../render/EventType.js").default} type Event type. + * @param {import("../PluggableMap.js").FrameState} frameState Frame state. + */ + + + CompositeMapRenderer.prototype.dispatchRenderEvent = function (type, frameState) { + var map = this.getMap(); + + if (map.hasListener(type)) { + var event_1 = new _render_Event_js__WEBPACK_IMPORTED_MODULE_4__["default"](type, undefined, frameState); + map.dispatchEvent(event_1); + } + }; + + CompositeMapRenderer.prototype.disposeInternal = function () { + (0,_events_js__WEBPACK_IMPORTED_MODULE_0__.unlistenByKey)(this.fontChangeListenerKey_); + this.element_.parentNode.removeChild(this.element_); + + _super.prototype.disposeInternal.call(this); + }; + /** + * Render. + * @param {?import("../PluggableMap.js").FrameState} frameState Frame state. + */ + + + CompositeMapRenderer.prototype.renderFrame = function (frameState) { + if (!frameState) { + if (this.renderedVisible_) { + this.element_.style.display = 'none'; + this.renderedVisible_ = false; + } + + return; + } + + this.calculateMatrices2D(frameState); + this.dispatchRenderEvent(_render_EventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].PRECOMPOSE, frameState); + var layerStatesArray = frameState.layerStatesArray.sort(function (a, b) { + return a.zIndex - b.zIndex; + }); + var viewState = frameState.viewState; + this.children_.length = 0; + /** + * @type {Array} + */ + + var declutterLayers = []; + var previousElement = null; + + for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) { + var layerState = layerStatesArray[i]; + frameState.layerIndex = i; + + if (!(0,_layer_Layer_js__WEBPACK_IMPORTED_MODULE_6__.inView)(layerState, viewState) || layerState.sourceState != _source_State_js__WEBPACK_IMPORTED_MODULE_7__["default"].READY && layerState.sourceState != _source_State_js__WEBPACK_IMPORTED_MODULE_7__["default"].UNDEFINED) { + continue; + } + + var layer = layerState.layer; + var element = layer.render(frameState, previousElement); + + if (!element) { + continue; + } + + if (element !== previousElement) { + this.children_.push(element); + previousElement = element; + } + + if ('getDeclutter' in layer) { + declutterLayers.push( + /** @type {import("../layer/BaseVector.js").default} */ + layer); + } + } + + for (var i = declutterLayers.length - 1; i >= 0; --i) { + declutterLayers[i].renderDeclutter(frameState); + } + + (0,_dom_js__WEBPACK_IMPORTED_MODULE_8__.replaceChildren)(this.element_, this.children_); + this.dispatchRenderEvent(_render_EventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].POSTCOMPOSE, frameState); + + if (!this.renderedVisible_) { + this.element_.style.display = ''; + this.renderedVisible_ = true; + } + + this.scheduleExpireIconCache(frameState); + }; + /** + * @param {import("../pixel.js").Pixel} pixel Pixel. + * @param {import("../PluggableMap.js").FrameState} frameState FrameState. + * @param {number} hitTolerance Hit tolerance in pixels. + * @param {function(import("../layer/Layer.js").default, (Uint8ClampedArray|Uint8Array)): T} callback Layer + * callback. + * @param {function(import("../layer/Layer.js").default): boolean} layerFilter Layer filter + * function, only layers which are visible and for which this function + * returns `true` will be tested for features. By default, all visible + * layers will be tested. + * @return {T|undefined} Callback result. + * @template T + */ + + + CompositeMapRenderer.prototype.forEachLayerAtPixel = function (pixel, frameState, hitTolerance, callback, layerFilter) { + var viewState = frameState.viewState; + var layerStates = frameState.layerStatesArray; + var numLayers = layerStates.length; + + for (var i = numLayers - 1; i >= 0; --i) { + var layerState = layerStates[i]; + var layer = layerState.layer; + + if (layer.hasRenderer() && (0,_layer_Layer_js__WEBPACK_IMPORTED_MODULE_6__.inView)(layerState, viewState) && layerFilter(layer)) { + var layerRenderer = layer.getRenderer(); + var data = layerRenderer.getDataAtPixel(pixel, frameState, hitTolerance); + + if (data) { + var result = callback(layer, data); + + if (result) { + return result; + } + } + } + } + + return undefined; + }; + + return CompositeMapRenderer; +}(_Map_js__WEBPACK_IMPORTED_MODULE_9__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (CompositeMapRenderer); + +/***/ }), +/* 82 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "defaultFont": function() { return /* binding */ defaultFont; }, +/* harmony export */ "defaultFillStyle": function() { return /* binding */ defaultFillStyle; }, +/* harmony export */ "defaultLineCap": function() { return /* binding */ defaultLineCap; }, +/* harmony export */ "defaultLineDash": function() { return /* binding */ defaultLineDash; }, +/* harmony export */ "defaultLineDashOffset": function() { return /* binding */ defaultLineDashOffset; }, +/* harmony export */ "defaultLineJoin": function() { return /* binding */ defaultLineJoin; }, +/* harmony export */ "defaultMiterLimit": function() { return /* binding */ defaultMiterLimit; }, +/* harmony export */ "defaultStrokeStyle": function() { return /* binding */ defaultStrokeStyle; }, +/* harmony export */ "defaultTextAlign": function() { return /* binding */ defaultTextAlign; }, +/* harmony export */ "defaultTextBaseline": function() { return /* binding */ defaultTextBaseline; }, +/* harmony export */ "defaultPadding": function() { return /* binding */ defaultPadding; }, +/* harmony export */ "defaultLineWidth": function() { return /* binding */ defaultLineWidth; }, +/* harmony export */ "checkedFonts": function() { return /* binding */ checkedFonts; }, +/* harmony export */ "labelCache": function() { return /* binding */ labelCache; }, +/* harmony export */ "textHeights": function() { return /* binding */ textHeights; }, +/* harmony export */ "registerFont": function() { return /* binding */ registerFont; }, +/* harmony export */ "measureTextHeight": function() { return /* binding */ measureTextHeight; }, +/* harmony export */ "measureTextWidth": function() { return /* binding */ measureTextWidth; }, +/* harmony export */ "measureAndCacheTextWidth": function() { return /* binding */ measureAndCacheTextWidth; }, +/* harmony export */ "measureTextWidths": function() { return /* binding */ measureTextWidths; }, +/* harmony export */ "rotateAtOffset": function() { return /* binding */ rotateAtOffset; }, +/* harmony export */ "drawImageOrLabel": function() { return /* binding */ drawImageOrLabel; } +/* harmony export */ }); +/* harmony import */ var _Object_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24); +/* harmony import */ var _events_Target_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29); +/* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54); +/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(64); +/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(69); +/** + * @module ol/render/canvas + */ + + + + + + +/** + * @typedef {Object} FillState + * @property {import("../colorlike.js").ColorLike} fillStyle FillStyle. + */ + +/** + * @typedef Label + * @property {number} width Width. + * @property {number} height Height. + * @property {Array} contextInstructions ContextInstructions. + */ + +/** + * @typedef {Object} FillStrokeState + * @property {import("../colorlike.js").ColorLike} [currentFillStyle] Current FillStyle. + * @property {import("../colorlike.js").ColorLike} [currentStrokeStyle] Current StrokeStyle. + * @property {CanvasLineCap} [currentLineCap] Current LineCap. + * @property {Array} currentLineDash Current LineDash. + * @property {number} [currentLineDashOffset] Current LineDashOffset. + * @property {CanvasLineJoin} [currentLineJoin] Current LineJoin. + * @property {number} [currentLineWidth] Current LineWidth. + * @property {number} [currentMiterLimit] Current MiterLimit. + * @property {number} [lastStroke] Last stroke. + * @property {import("../colorlike.js").ColorLike} [fillStyle] FillStyle. + * @property {import("../colorlike.js").ColorLike} [strokeStyle] StrokeStyle. + * @property {CanvasLineCap} [lineCap] LineCap. + * @property {Array} lineDash LineDash. + * @property {number} [lineDashOffset] LineDashOffset. + * @property {CanvasLineJoin} [lineJoin] LineJoin. + * @property {number} [lineWidth] LineWidth. + * @property {number} [miterLimit] MiterLimit. + */ + +/** + * @typedef {Object} StrokeState + * @property {CanvasLineCap} lineCap LineCap. + * @property {Array} lineDash LineDash. + * @property {number} lineDashOffset LineDashOffset. + * @property {CanvasLineJoin} lineJoin LineJoin. + * @property {number} lineWidth LineWidth. + * @property {number} miterLimit MiterLimit. + * @property {import("../colorlike.js").ColorLike} strokeStyle StrokeStyle. + */ + +/** + * @typedef {Object} TextState + * @property {string} font Font. + * @property {string} [textAlign] TextAlign. + * @property {string} textBaseline TextBaseline. + * @property {string} [placement] Placement. + * @property {number} [maxAngle] MaxAngle. + * @property {boolean} [overflow] Overflow. + * @property {import("../style/Fill.js").default} [backgroundFill] BackgroundFill. + * @property {import("../style/Stroke.js").default} [backgroundStroke] BackgroundStroke. + * @property {import("../size.js").Size} [scale] Scale. + * @property {Array} [padding] Padding. + */ + +/** + * @typedef {Object} SerializableInstructions + * @property {Array<*>} instructions The rendering instructions. + * @property {Array<*>} hitDetectionInstructions The rendering hit detection instructions. + * @property {Array} coordinates The array of all coordinates. + * @property {!Object} [textStates] The text states (decluttering). + * @property {!Object} [fillStates] The fill states (decluttering). + * @property {!Object} [strokeStates] The stroke states (decluttering). + */ + +/** + * @typedef {Object} DeclutterImageWithText + */ + +/** + * @const + * @type {string} + */ + +var defaultFont = '10px sans-serif'; +/** + * @const + * @type {import("../colorlike.js").ColorLike} + */ + +var defaultFillStyle = '#000'; +/** + * @const + * @type {CanvasLineCap} + */ + +var defaultLineCap = 'round'; +/** + * @const + * @type {Array} + */ + +var defaultLineDash = []; +/** + * @const + * @type {number} + */ + +var defaultLineDashOffset = 0; +/** + * @const + * @type {CanvasLineJoin} + */ + +var defaultLineJoin = 'round'; +/** + * @const + * @type {number} + */ + +var defaultMiterLimit = 10; +/** + * @const + * @type {import("../colorlike.js").ColorLike} + */ + +var defaultStrokeStyle = '#000'; +/** + * @const + * @type {string} + */ + +var defaultTextAlign = 'center'; +/** + * @const + * @type {string} + */ + +var defaultTextBaseline = 'middle'; +/** + * @const + * @type {Array} + */ + +var defaultPadding = [0, 0, 0, 0]; +/** + * @const + * @type {number} + */ + +var defaultLineWidth = 1; +/** + * @type {BaseObject} + */ + +var checkedFonts = new _Object_js__WEBPACK_IMPORTED_MODULE_0__["default"](); +/** + * The label cache for text rendering. To change the default cache size of 2048 + * entries, use {@link module:ol/structs/LRUCache~LRUCache#setSize cache.setSize()}. + * Deprecated - there is no label cache any more. + * @type {?} + * @api + * @deprecated + */ + +var labelCache = new _events_Target_js__WEBPACK_IMPORTED_MODULE_1__["default"](); + +labelCache.setSize = function () { + console.warn('labelCache is deprecated.'); //eslint-disable-line +}; +/** + * @type {CanvasRenderingContext2D} + */ + + +var measureContext = null; +/** + * @type {string} + */ + +var measureFont; +/** + * @type {!Object} + */ + +var textHeights = {}; +/** + * Clears the label cache when a font becomes available. + * @param {string} fontSpec CSS font spec. + */ + +var registerFont = function () { + var retries = 100; + var size = '32px '; + var referenceFonts = ['monospace', 'serif']; + var len = referenceFonts.length; + var text = "wmytzilWMYTZIL@#/&?$%10\uF013"; + var interval, referenceWidth; + /** + * @param {string} fontStyle Css font-style + * @param {string} fontWeight Css font-weight + * @param {*} fontFamily Css font-family + * @return {boolean} Font with style and weight is available + */ + + function isAvailable(fontStyle, fontWeight, fontFamily) { + var available = true; + + for (var i = 0; i < len; ++i) { + var referenceFont = referenceFonts[i]; + referenceWidth = measureTextWidth(fontStyle + ' ' + fontWeight + ' ' + size + referenceFont, text); + + if (fontFamily != referenceFont) { + var width = measureTextWidth(fontStyle + ' ' + fontWeight + ' ' + size + fontFamily + ',' + referenceFont, text); // If width and referenceWidth are the same, then the fallback was used + // instead of the font we wanted, so the font is not available. + + available = available && width != referenceWidth; + } + } + + if (available) { + return true; + } + + return false; + } + + function check() { + var done = true; + var fonts = checkedFonts.getKeys(); + + for (var i = 0, ii = fonts.length; i < ii; ++i) { + var font = fonts[i]; + + if (checkedFonts.get(font) < retries) { + if (isAvailable.apply(this, font.split('\n'))) { + (0,_obj_js__WEBPACK_IMPORTED_MODULE_2__.clear)(textHeights); // Make sure that loaded fonts are picked up by Safari + + measureContext = null; + measureFont = undefined; + checkedFonts.set(font, retries); + } else { + checkedFonts.set(font, checkedFonts.get(font) + 1, true); + done = false; + } + } + } + + if (done) { + clearInterval(interval); + interval = undefined; + } + } + + return function (fontSpec) { + var font = (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.getFontParameters)(fontSpec); + + if (!font) { + return; + } + + var families = font.families; + + for (var i = 0, ii = families.length; i < ii; ++i) { + var family = families[i]; + var key = font.style + '\n' + font.weight + '\n' + family; + + if (checkedFonts.get(key) === undefined) { + checkedFonts.set(key, retries, true); + + if (!isAvailable(font.style, font.weight, family)) { + checkedFonts.set(key, 0, true); + + if (interval === undefined) { + interval = setInterval(check, 32); + } + } + } + } + }; +}(); +/** + * @param {string} font Font to use for measuring. + * @return {import("../size.js").Size} Measurement. + */ + +var measureTextHeight = function () { + /** + * @type {HTMLDivElement} + */ + var measureElement; + return function (fontSpec) { + var height = textHeights[fontSpec]; + + if (height == undefined) { + if (_has_js__WEBPACK_IMPORTED_MODULE_4__.WORKER_OFFSCREEN_CANVAS) { + var font = (0,_css_js__WEBPACK_IMPORTED_MODULE_3__.getFontParameters)(fontSpec); + var metrics = measureText(fontSpec, 'Žg'); + var lineHeight = isNaN(Number(font.lineHeight)) ? 1.2 : Number(font.lineHeight); + height = lineHeight * (metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent); + } else { + if (!measureElement) { + measureElement = document.createElement('div'); + measureElement.innerHTML = 'M'; + measureElement.style.minHeight = '0'; + measureElement.style.maxHeight = 'none'; + measureElement.style.height = 'auto'; + measureElement.style.padding = '0'; + measureElement.style.border = 'none'; + measureElement.style.position = 'absolute'; + measureElement.style.display = 'block'; + measureElement.style.left = '-99999px'; + } + + measureElement.style.font = fontSpec; + document.body.appendChild(measureElement); + height = measureElement.offsetHeight; + document.body.removeChild(measureElement); + } + + textHeights[fontSpec] = height; + } + + return height; + }; +}(); +/** + * @param {string} font Font. + * @param {string} text Text. + * @return {TextMetrics} Text metrics. + */ + +function measureText(font, text) { + if (!measureContext) { + measureContext = (0,_dom_js__WEBPACK_IMPORTED_MODULE_5__.createCanvasContext2D)(1, 1); + } + + if (font != measureFont) { + measureContext.font = font; + measureFont = measureContext.font; + } + + return measureContext.measureText(text); +} +/** + * @param {string} font Font. + * @param {string} text Text. + * @return {number} Width. + */ + + +function measureTextWidth(font, text) { + return measureText(font, text).width; +} +/** + * Measure text width using a cache. + * @param {string} font The font. + * @param {string} text The text to measure. + * @param {Object} cache A lookup of cached widths by text. + * @return {number} The text width. + */ + +function measureAndCacheTextWidth(font, text, cache) { + if (text in cache) { + return cache[text]; + } + + var width = measureTextWidth(font, text); + cache[text] = width; + return width; +} +/** + * @param {string} font Font to use for measuring. + * @param {Array} lines Lines to measure. + * @param {Array} widths Array will be populated with the widths of + * each line. + * @return {number} Width of the whole text. + */ + +function measureTextWidths(font, lines, widths) { + var numLines = lines.length; + var width = 0; + + for (var i = 0; i < numLines; ++i) { + var currentWidth = measureTextWidth(font, lines[i]); + width = Math.max(width, currentWidth); + widths.push(currentWidth); + } + + return width; +} +/** + * @param {CanvasRenderingContext2D} context Context. + * @param {number} rotation Rotation. + * @param {number} offsetX X offset. + * @param {number} offsetY Y offset. + */ + +function rotateAtOffset(context, rotation, offsetX, offsetY) { + if (rotation !== 0) { + context.translate(offsetX, offsetY); + context.rotate(rotation); + context.translate(-offsetX, -offsetY); + } +} +/** + * @param {CanvasRenderingContext2D} context Context. + * @param {import("../transform.js").Transform|null} transform Transform. + * @param {number} opacity Opacity. + * @param {Label|HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} labelOrImage Label. + * @param {number} originX Origin X. + * @param {number} originY Origin Y. + * @param {number} w Width. + * @param {number} h Height. + * @param {number} x X. + * @param {number} y Y. + * @param {import("../size.js").Size} scale Scale. + */ + +function drawImageOrLabel(context, transform, opacity, labelOrImage, originX, originY, w, h, x, y, scale) { + context.save(); + + if (opacity !== 1) { + context.globalAlpha *= opacity; + } + + if (transform) { + context.setTransform.apply(context, transform); + } + + if ( + /** @type {*} */ + labelOrImage.contextInstructions) { + // label + context.translate(x, y); + context.scale(scale[0], scale[1]); + executeLabelInstructions( + /** @type {Label} */ + labelOrImage, context); + } else if (scale[0] < 0 || scale[1] < 0) { + // flipped image + context.translate(x, y); + context.scale(scale[0], scale[1]); + context.drawImage( + /** @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} */ + labelOrImage, originX, originY, w, h, 0, 0, w, h); + } else { + // if image not flipped translate and scale can be avoided + context.drawImage( + /** @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} */ + labelOrImage, originX, originY, w, h, x, y, w * scale[0], h * scale[1]); + } + + context.restore(); +} +/** + * @param {Label} label Label. + * @param {CanvasRenderingContext2D} context Context. + */ + +function executeLabelInstructions(label, context) { + var contextInstructions = label.contextInstructions; + + for (var i = 0, ii = contextInstructions.length; i < ii; i += 2) { + if (Array.isArray(contextInstructions[i + 1])) { + context[contextInstructions[i]].apply(context, contextInstructions[i + 1]); + } else { + context[contextInstructions[i]] = contextInstructions[i + 1]; + } + } +} + +/***/ }), +/* 83 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _events_Event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22); +/** + * @module ol/render/Event + */ +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); + + + +var RenderEvent = +/** @class */ +function (_super) { + __extends(RenderEvent, _super); + /** + * @param {import("./EventType.js").default} type Type. + * @param {import("../transform.js").Transform} [opt_inversePixelTransform] Transform for + * CSS pixels to rendered pixels. + * @param {import("../PluggableMap.js").FrameState} [opt_frameState] Frame state. + * @param {?CanvasRenderingContext2D} [opt_context] Context. + */ + + + function RenderEvent(type, opt_inversePixelTransform, opt_frameState, opt_context) { + var _this = _super.call(this, type) || this; + /** + * Transform from CSS pixels (relative to the top-left corner of the map viewport) + * to rendered pixels on this event's `context`. Only available when a Canvas renderer is used, null otherwise. + * @type {import("../transform.js").Transform|undefined} + * @api + */ + + + _this.inversePixelTransform = opt_inversePixelTransform; + /** + * An object representing the current render frame state. + * @type {import("../PluggableMap.js").FrameState|undefined} + * @api + */ + + _this.frameState = opt_frameState; + /** + * Canvas context. Not available when the event is dispatched by the map. Only available + * when a Canvas renderer is used, null otherwise. + * @type {CanvasRenderingContext2D|null|undefined} + * @api + */ + + _this.context = opt_context; + return _this; + } + + return RenderEvent; +}(_events_Event_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (RenderEvent); + +/***/ }), +/* 84 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Disposable_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(32); +/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(30); +/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16); +/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(53); +/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(11); +/* harmony import */ var _style_IconImageCache_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(85); +/* harmony import */ var _layer_Layer_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(70); +/* harmony import */ var _coordinate_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/renderer/Map + */ + + + + + + + + + + +/** + * @typedef HitMatch + * @property {import("../Feature.js").FeatureLike} feature Feature. + * @property {import("../layer/Layer.js").default} layer Layer. + * @property {import("../geom/SimpleGeometry.js").default} geometry Geometry. + * @property {number} distanceSq Squared distance. + * @property {import("./vector.js").FeatureCallback} callback Callback. + * @template T + */ + +/** + * @abstract + */ + +var MapRenderer = +/** @class */ +function (_super) { + __extends(MapRenderer, _super); + /** + * @param {import("../PluggableMap.js").default} map Map. + */ + + + function MapRenderer(map) { + var _this = _super.call(this) || this; + /** + * @private + * @type {import("../PluggableMap.js").default} + */ + + + _this.map_ = map; + return _this; + } + /** + * @abstract + * @param {import("../render/EventType.js").default} type Event type. + * @param {import("../PluggableMap.js").FrameState} frameState Frame state. + */ + + + MapRenderer.prototype.dispatchRenderEvent = function (type, frameState) { + (0,_util_js__WEBPACK_IMPORTED_MODULE_0__.abstract)(); + }; + /** + * @param {import("../PluggableMap.js").FrameState} frameState FrameState. + * @protected + */ + + + MapRenderer.prototype.calculateMatrices2D = function (frameState) { + var viewState = frameState.viewState; + var coordinateToPixelTransform = frameState.coordinateToPixelTransform; + var pixelToCoordinateTransform = frameState.pixelToCoordinateTransform; + (0,_transform_js__WEBPACK_IMPORTED_MODULE_1__.compose)(coordinateToPixelTransform, frameState.size[0] / 2, frameState.size[1] / 2, 1 / viewState.resolution, -1 / viewState.resolution, -viewState.rotation, -viewState.center[0], -viewState.center[1]); + (0,_transform_js__WEBPACK_IMPORTED_MODULE_1__.makeInverse)(pixelToCoordinateTransform, coordinateToPixelTransform); + }; + /** + * @param {import("../coordinate.js").Coordinate} coordinate Coordinate. + * @param {import("../PluggableMap.js").FrameState} frameState FrameState. + * @param {number} hitTolerance Hit tolerance in pixels. + * @param {boolean} checkWrapped Check for wrapped geometries. + * @param {import("./vector.js").FeatureCallback} callback Feature callback. + * @param {S} thisArg Value to use as `this` when executing `callback`. + * @param {function(this: U, import("../layer/Layer.js").default): boolean} layerFilter Layer filter + * function, only layers which are visible and for which this function + * returns `true` will be tested for features. By default, all visible + * layers will be tested. + * @param {U} thisArg2 Value to use as `this` when executing `layerFilter`. + * @return {T|undefined} Callback result. + * @template S,T,U + */ + + + MapRenderer.prototype.forEachFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, checkWrapped, callback, thisArg, layerFilter, thisArg2) { + var result; + var viewState = frameState.viewState; + /** + * @param {boolean} managed Managed layer. + * @param {import("../Feature.js").FeatureLike} feature Feature. + * @param {import("../layer/Layer.js").default} layer Layer. + * @param {import("../geom/Geometry.js").default} geometry Geometry. + * @return {T|undefined} Callback result. + */ + + function forEachFeatureAtCoordinate(managed, feature, layer, geometry) { + return callback.call(thisArg, feature, managed ? layer : null, geometry); + } + + var projection = viewState.projection; + var translatedCoordinate = (0,_coordinate_js__WEBPACK_IMPORTED_MODULE_2__.wrapX)(coordinate.slice(), projection); + var offsets = [[0, 0]]; + + if (projection.canWrapX() && checkWrapped) { + var projectionExtent = projection.getExtent(); + var worldWidth = (0,_extent_js__WEBPACK_IMPORTED_MODULE_3__.getWidth)(projectionExtent); + offsets.push([-worldWidth, 0], [worldWidth, 0]); + } + + var layerStates = frameState.layerStatesArray; + var numLayers = layerStates.length; + var matches = + /** @type {Array>} */ + []; + var tmpCoord = []; + + for (var i = 0; i < offsets.length; i++) { + for (var j = numLayers - 1; j >= 0; --j) { + var layerState = layerStates[j]; + var layer = layerState.layer; + + if (layer.hasRenderer() && (0,_layer_Layer_js__WEBPACK_IMPORTED_MODULE_4__.inView)(layerState, viewState) && layerFilter.call(thisArg2, layer)) { + var layerRenderer = layer.getRenderer(); + var source = layer.getSource(); + + if (layerRenderer && source) { + var coordinates = source.getWrapX() ? translatedCoordinate : coordinate; + var callback_1 = forEachFeatureAtCoordinate.bind(null, layerState.managed); + tmpCoord[0] = coordinates[0] + offsets[i][0]; + tmpCoord[1] = coordinates[1] + offsets[i][1]; + result = layerRenderer.forEachFeatureAtCoordinate(tmpCoord, frameState, hitTolerance, callback_1, matches); + } + + if (result) { + return result; + } + } + } + } + + if (matches.length === 0) { + return undefined; + } + + var order = 1 / matches.length; + matches.forEach(function (m, i) { + return m.distanceSq += i * order; + }); + matches.sort(function (a, b) { + return a.distanceSq - b.distanceSq; + }); + matches.some(function (m) { + return result = m.callback(m.feature, m.layer, m.geometry); + }); + return result; + }; + /** + * @abstract + * @param {import("../pixel.js").Pixel} pixel Pixel. + * @param {import("../PluggableMap.js").FrameState} frameState FrameState. + * @param {number} hitTolerance Hit tolerance in pixels. + * @param {function(import("../layer/Layer.js").default, (Uint8ClampedArray|Uint8Array)): T} callback Layer + * callback. + * @param {function(import("../layer/Layer.js").default): boolean} layerFilter Layer filter + * function, only layers which are visible and for which this function + * returns `true` will be tested for features. By default, all visible + * layers will be tested. + * @return {T|undefined} Callback result. + * @template T + */ + + + MapRenderer.prototype.forEachLayerAtPixel = function (pixel, frameState, hitTolerance, callback, layerFilter) { + return (0,_util_js__WEBPACK_IMPORTED_MODULE_0__.abstract)(); + }; + /** + * @param {import("../coordinate.js").Coordinate} coordinate Coordinate. + * @param {import("../PluggableMap.js").FrameState} frameState FrameState. + * @param {number} hitTolerance Hit tolerance in pixels. + * @param {boolean} checkWrapped Check for wrapped geometries. + * @param {function(this: U, import("../layer/Layer.js").default): boolean} layerFilter Layer filter + * function, only layers which are visible and for which this function + * returns `true` will be tested for features. By default, all visible + * layers will be tested. + * @param {U} thisArg Value to use as `this` when executing `layerFilter`. + * @return {boolean} Is there a feature at the given coordinate? + * @template U + */ + + + MapRenderer.prototype.hasFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, checkWrapped, layerFilter, thisArg) { + var hasFeature = this.forEachFeatureAtCoordinate(coordinate, frameState, hitTolerance, checkWrapped, _functions_js__WEBPACK_IMPORTED_MODULE_5__.TRUE, this, layerFilter, thisArg); + return hasFeature !== undefined; + }; + /** + * @return {import("../PluggableMap.js").default} Map. + */ + + + MapRenderer.prototype.getMap = function () { + return this.map_; + }; + /** + * Render. + * @abstract + * @param {?import("../PluggableMap.js").FrameState} frameState Frame state. + */ + + + MapRenderer.prototype.renderFrame = function (frameState) { + (0,_util_js__WEBPACK_IMPORTED_MODULE_0__.abstract)(); + }; + /** + * @param {import("../PluggableMap.js").FrameState} frameState Frame state. + * @protected + */ + + + MapRenderer.prototype.scheduleExpireIconCache = function (frameState) { + if (_style_IconImageCache_js__WEBPACK_IMPORTED_MODULE_6__.shared.canExpireCache()) { + frameState.postRenderFunctions.push(expireIconCache); + } + }; + + return MapRenderer; +}(_Disposable_js__WEBPACK_IMPORTED_MODULE_7__["default"]); +/** + * @param {import("../PluggableMap.js").default} map Map. + * @param {import("../PluggableMap.js").FrameState} frameState Frame state. + */ + + +function expireIconCache(map, frameState) { + _style_IconImageCache_js__WEBPACK_IMPORTED_MODULE_6__.shared.expire(); +} + +/* harmony default export */ __webpack_exports__["default"] = (MapRenderer); + +/***/ }), +/* 85 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "shared": function() { return /* binding */ shared; } +/* harmony export */ }); +/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(86); +/** + * @module ol/style/IconImageCache + */ + +/** + * @classdesc + * Singleton class. Available through {@link module:ol/style/IconImageCache~shared}. + */ + +var IconImageCache = +/** @class */ +function () { + function IconImageCache() { + /** + * @type {!Object} + * @private + */ + this.cache_ = {}; + /** + * @type {number} + * @private + */ + + this.cacheSize_ = 0; + /** + * @type {number} + * @private + */ + + this.maxCacheSize_ = 32; + } + /** + * FIXME empty description for jsdoc + */ + + + IconImageCache.prototype.clear = function () { + this.cache_ = {}; + this.cacheSize_ = 0; + }; + /** + * @return {boolean} Can expire cache. + */ + + + IconImageCache.prototype.canExpireCache = function () { + return this.cacheSize_ > this.maxCacheSize_; + }; + /** + * FIXME empty description for jsdoc + */ + + + IconImageCache.prototype.expire = function () { + if (this.canExpireCache()) { + var i = 0; + + for (var key in this.cache_) { + var iconImage = this.cache_[key]; + + if ((i++ & 3) === 0 && !iconImage.hasListener()) { + delete this.cache_[key]; + --this.cacheSize_; + } + } + } + }; + /** + * @param {string} src Src. + * @param {?string} crossOrigin Cross origin. + * @param {import("../color.js").Color} color Color. + * @return {import("./IconImage.js").default} Icon image. + */ + + + IconImageCache.prototype.get = function (src, crossOrigin, color) { + var key = getKey(src, crossOrigin, color); + return key in this.cache_ ? this.cache_[key] : null; + }; + /** + * @param {string} src Src. + * @param {?string} crossOrigin Cross origin. + * @param {import("../color.js").Color} color Color. + * @param {import("./IconImage.js").default} iconImage Icon image. + */ + + + IconImageCache.prototype.set = function (src, crossOrigin, color, iconImage) { + var key = getKey(src, crossOrigin, color); + this.cache_[key] = iconImage; + ++this.cacheSize_; + }; + /** + * Set the cache size of the icon cache. Default is `32`. Change this value when + * your map uses more than 32 different icon images and you are not caching icon + * styles on the application level. + * @param {number} maxCacheSize Cache max size. + * @api + */ + + + IconImageCache.prototype.setSize = function (maxCacheSize) { + this.maxCacheSize_ = maxCacheSize; + this.expire(); + }; + + return IconImageCache; +}(); +/** + * @param {string} src Src. + * @param {?string} crossOrigin Cross origin. + * @param {import("../color.js").Color} color Color. + * @return {string} Cache key. + */ + + +function getKey(src, crossOrigin, color) { + var colorString = color ? (0,_color_js__WEBPACK_IMPORTED_MODULE_0__.asString)(color) : 'null'; + return crossOrigin + ':' + src + ':' + colorString; +} + +/* harmony default export */ __webpack_exports__["default"] = (IconImageCache); +/** + * The {@link module:ol/style/IconImageCache~IconImageCache} for + * {@link module:ol/style/Icon~Icon} images. + * @api + */ + +var shared = new IconImageCache(); + +/***/ }), +/* 86 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "asString": function() { return /* binding */ asString; }, +/* harmony export */ "fromString": function() { return /* binding */ fromString; }, +/* harmony export */ "asArray": function() { return /* binding */ asArray; }, +/* harmony export */ "normalize": function() { return /* binding */ normalize; }, +/* harmony export */ "toString": function() { return /* binding */ toString; }, +/* harmony export */ "isStringColor": function() { return /* binding */ isStringColor; } +/* harmony export */ }); +/* harmony import */ var _asserts_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9); +/** + * @module ol/color + */ + + +/** + * A color represented as a short array [red, green, blue, alpha]. + * red, green, and blue should be integers in the range 0..255 inclusive. + * alpha should be a float in the range 0..1 inclusive. If no alpha value is + * given then `1` will be used. + * @typedef {Array} Color + * @api + */ + +/** + * This RegExp matches # followed by 3, 4, 6, or 8 hex digits. + * @const + * @type {RegExp} + * @private + */ + +var HEX_COLOR_RE_ = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i; +/** + * Regular expression for matching potential named color style strings. + * @const + * @type {RegExp} + * @private + */ + +var NAMED_COLOR_RE_ = /^([a-z]*)$|^hsla?\(.*\)$/i; +/** + * Return the color as an rgba string. + * @param {Color|string} color Color. + * @return {string} Rgba string. + * @api + */ + +function asString(color) { + if (typeof color === 'string') { + return color; + } else { + return toString(color); + } +} +/** + * Return named color as an rgba string. + * @param {string} color Named color. + * @return {string} Rgb string. + */ + +function fromNamed(color) { + var el = document.createElement('div'); + el.style.color = color; + + if (el.style.color !== '') { + document.body.appendChild(el); + var rgb = getComputedStyle(el).color; + document.body.removeChild(el); + return rgb; + } else { + return ''; + } +} +/** + * @param {string} s String. + * @return {Color} Color. + */ + + +var fromString = function () { + // We maintain a small cache of parsed strings. To provide cheap LRU-like + // semantics, whenever the cache grows too large we simply delete an + // arbitrary 25% of the entries. + + /** + * @const + * @type {number} + */ + var MAX_CACHE_SIZE = 1024; + /** + * @type {Object} + */ + + var cache = {}; + /** + * @type {number} + */ + + var cacheSize = 0; + return ( + /** + * @param {string} s String. + * @return {Color} Color. + */ + function (s) { + var color; + + if (cache.hasOwnProperty(s)) { + color = cache[s]; + } else { + if (cacheSize >= MAX_CACHE_SIZE) { + var i = 0; + + for (var key in cache) { + if ((i++ & 3) === 0) { + delete cache[key]; + --cacheSize; + } + } + } + + color = fromStringInternal_(s); + cache[s] = color; + ++cacheSize; + } + + return color; + } + ); +}(); +/** + * Return the color as an array. This function maintains a cache of calculated + * arrays which means the result should not be modified. + * @param {Color|string} color Color. + * @return {Color} Color. + * @api + */ + +function asArray(color) { + if (Array.isArray(color)) { + return color; + } else { + return fromString(color); + } +} +/** + * @param {string} s String. + * @private + * @return {Color} Color. + */ + +function fromStringInternal_(s) { + var r, g, b, a, color; + + if (NAMED_COLOR_RE_.exec(s)) { + s = fromNamed(s); + } + + if (HEX_COLOR_RE_.exec(s)) { + // hex + var n = s.length - 1; // number of hex digits + + var d = // number of digits per channel + void 0; // number of digits per channel + + if (n <= 4) { + d = 1; + } else { + d = 2; + } + + var hasAlpha = n === 4 || n === 8; + r = parseInt(s.substr(1 + 0 * d, d), 16); + g = parseInt(s.substr(1 + 1 * d, d), 16); + b = parseInt(s.substr(1 + 2 * d, d), 16); + + if (hasAlpha) { + a = parseInt(s.substr(1 + 3 * d, d), 16); + } else { + a = 255; + } + + if (d == 1) { + r = (r << 4) + r; + g = (g << 4) + g; + b = (b << 4) + b; + + if (hasAlpha) { + a = (a << 4) + a; + } + } + + color = [r, g, b, a / 255]; + } else if (s.indexOf('rgba(') == 0) { + // rgba() + color = s.slice(5, -1).split(',').map(Number); + normalize(color); + } else if (s.indexOf('rgb(') == 0) { + // rgb() + color = s.slice(4, -1).split(',').map(Number); + color.push(1); + normalize(color); + } else { + (0,_asserts_js__WEBPACK_IMPORTED_MODULE_0__.assert)(false, 14); // Invalid color + } + + return color; +} +/** + * TODO this function is only used in the test, we probably shouldn't export it + * @param {Color} color Color. + * @return {Color} Clamped color. + */ + + +function normalize(color) { + color[0] = (0,_math_js__WEBPACK_IMPORTED_MODULE_1__.clamp)(color[0] + 0.5 | 0, 0, 255); + color[1] = (0,_math_js__WEBPACK_IMPORTED_MODULE_1__.clamp)(color[1] + 0.5 | 0, 0, 255); + color[2] = (0,_math_js__WEBPACK_IMPORTED_MODULE_1__.clamp)(color[2] + 0.5 | 0, 0, 255); + color[3] = (0,_math_js__WEBPACK_IMPORTED_MODULE_1__.clamp)(color[3], 0, 1); + return color; +} +/** + * @param {Color} color Color. + * @return {string} String. + */ + +function toString(color) { + var r = color[0]; + + if (r != (r | 0)) { + r = r + 0.5 | 0; + } + + var g = color[1]; + + if (g != (g | 0)) { + g = g + 0.5 | 0; + } + + var b = color[2]; + + if (b != (b | 0)) { + b = b + 0.5 | 0; + } + + var a = color[3] === undefined ? 1 : color[3]; + return 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; +} +/** + * @param {string} s String. + * @return {boolean} Whether the string is actually a valid color + */ + +function isStringColor(s) { + if (NAMED_COLOR_RE_.test(s)) { + s = fromNamed(s); + } + + return HEX_COLOR_RE_.test(s) || s.indexOf('rgba(') === 0 || s.indexOf('rgb(') === 0; +} + +/***/ }), +/* 87 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Object_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(24); +/* harmony import */ var _Collection_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21); +/* harmony import */ var _CollectionEventType_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(23); +/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(27); +/* harmony import */ var _layer_Group_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(103); +/* harmony import */ var _MapBrowserEvent_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(98); +/* harmony import */ var _MapBrowserEventHandler_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(100); +/* harmony import */ var _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(101); +/* harmony import */ var _MapEvent_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(99); +/* harmony import */ var _MapEventType_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(76); +/* harmony import */ var _MapProperty_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(90); +/* harmony import */ var _ObjectEventType_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(25); +/* harmony import */ var _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(79); +/* harmony import */ var _render_EventType_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(73); +/* harmony import */ var _TileQueue_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(88); +/* harmony import */ var _View_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(91); +/* harmony import */ var _ViewHint_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(92); +/* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(54); +/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(30); +/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53); +/* harmony import */ var _asserts_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(14); +/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(11); +/* harmony import */ var _proj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(102); +/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(28); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(64); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/PluggableMap + */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +/** + * State of the current frame. Only `pixelRatio`, `time` and `viewState` should + * be used in applications. + * @typedef {Object} FrameState + * @property {number} pixelRatio The pixel ratio of the frame. + * @property {number} time The time when rendering of the frame was requested. + * @property {import("./View.js").State} viewState The state of the current view. + * @property {boolean} animate Animate. + * @property {import("./transform.js").Transform} coordinateToPixelTransform CoordinateToPixelTransform. + * @property {import("rbush").default} declutterTree DeclutterTree. + * @property {null|import("./extent.js").Extent} extent Extent. + * @property {import("./extent.js").Extent} [nextExtent] Next extent during an animation series. + * @property {number} index Index. + * @property {Array} layerStatesArray LayerStatesArray. + * @property {number} layerIndex LayerIndex. + * @property {import("./transform.js").Transform} pixelToCoordinateTransform PixelToCoordinateTransform. + * @property {Array} postRenderFunctions PostRenderFunctions. + * @property {import("./size.js").Size} size Size. + * @property {TileQueue} tileQueue TileQueue. + * @property {!Object>} usedTiles UsedTiles. + * @property {Array} viewHints ViewHints. + * @property {!Object>} wantedTiles WantedTiles. + */ + +/** + * @typedef {function(PluggableMap, ?FrameState): any} PostRenderFunction + */ + +/** + * @typedef {Object} AtPixelOptions + * @property {undefined|function(import("./layer/Layer.js").default): boolean} [layerFilter] Layer filter + * function. The filter function will receive one argument, the + * {@link module:ol/layer/Layer layer-candidate} and it should return a boolean value. + * Only layers which are visible and for which this function returns `true` + * will be tested for features. By default, all visible layers will be tested. + * @property {number} [hitTolerance=0] Hit-detection tolerance in css pixels. Pixels + * inside the radius around the given position will be checked for features. + * @property {boolean} [checkWrapped=true] Check-Wrapped Will check for for wrapped geometries inside the range of + * +/- 1 world width. Works only if a projection is used that can be wrapped. + */ + +/** + * @typedef {Object} MapOptionsInternal + * @property {Collection} [controls] Controls. + * @property {Collection} [interactions] Interactions. + * @property {HTMLElement|Document} keyboardEventTarget KeyboardEventTarget. + * @property {Collection} overlays Overlays. + * @property {Object} values Values. + */ + +/** + * @typedef {import("./ObjectEventType").Types|'change:layergroup'|'change:size'|'change:target'|'change:view'} MapObjectEventTypes + */ + +/*** + * @template Return + * @typedef {import("./Observable").OnSignature & + * import("./Observable").OnSignature & + * import("./Observable").OnSignature & + * import("./Observable").OnSignature & + * import("./Observable").OnSignature & + * import("./Observable").CombinedOnSignature} PluggableMapOnSignature + */ + +/** + * Object literal with config options for the map. + * @typedef {Object} MapOptions + * @property {Collection|Array} [controls] + * Controls initially added to the map. If not specified, + * {@link module:ol/control.defaults} is used. + * @property {number} [pixelRatio=window.devicePixelRatio] The ratio between + * physical pixels and device-independent pixels (dips) on the device. + * @property {Collection|Array} [interactions] + * Interactions that are initially added to the map. If not specified, + * {@link module:ol/interaction.defaults} is used. + * @property {HTMLElement|Document|string} [keyboardEventTarget] The element to + * listen to keyboard events on. This determines when the `KeyboardPan` and + * `KeyboardZoom` interactions trigger. For example, if this option is set to + * `document` the keyboard interactions will always trigger. If this option is + * not specified, the element the library listens to keyboard events on is the + * map target (i.e. the user-provided div for the map). If this is not + * `document`, the target element needs to be focused for key events to be + * emitted, requiring that the target element has a `tabindex` attribute. + * @property {Array|Collection|LayerGroup} [layers] + * Layers. If this is not defined, a map with no layers will be rendered. Note + * that layers are rendered in the order supplied, so if you want, for example, + * a vector layer to appear on top of a tile layer, it must come after the tile + * layer. + * @property {number} [maxTilesLoading=16] Maximum number tiles to load + * simultaneously. + * @property {number} [moveTolerance=1] The minimum distance in pixels the + * cursor must move to be detected as a map move event instead of a click. + * Increasing this value can make it easier to click on the map. + * @property {Collection|Array} [overlays] + * Overlays initially added to the map. By default, no overlays are added. + * @property {HTMLElement|string} [target] The container for the map, either the + * element itself or the `id` of the element. If not specified at construction + * time, {@link module:ol/Map~Map#setTarget} must be called for the map to be + * rendered. If passed by element, the container can be in a secondary document. + * @property {View|Promise} [view] The map's view. No layer sources will be + * fetched unless this is specified at construction time or through + * {@link module:ol/Map~Map#setView}. + */ + +/** + * @fires import("./MapBrowserEvent.js").MapBrowserEvent + * @fires import("./MapEvent.js").MapEvent + * @fires import("./render/Event.js").default#precompose + * @fires import("./render/Event.js").default#postcompose + * @fires import("./render/Event.js").default#rendercomplete + * @api + */ + +var PluggableMap = +/** @class */ +function (_super) { + __extends(PluggableMap, _super); + /** + * @param {MapOptions} options Map options. + */ + + + function PluggableMap(options) { + var _this = _super.call(this) || this; + /*** + * @type {PluggableMapOnSignature} + */ + + + _this.on; + /*** + * @type {PluggableMapOnSignature} + */ + + _this.once; + /*** + * @type {PluggableMapOnSignature} + */ + + _this.un; + var optionsInternal = createOptionsInternal(options); + /** @private */ + + _this.boundHandleBrowserEvent_ = _this.handleBrowserEvent.bind(_this); + /** + * @type {number} + * @private + */ + + _this.maxTilesLoading_ = options.maxTilesLoading !== undefined ? options.maxTilesLoading : 16; + /** + * @private + * @type {number} + */ + + _this.pixelRatio_ = options.pixelRatio !== undefined ? options.pixelRatio : _has_js__WEBPACK_IMPORTED_MODULE_1__.DEVICE_PIXEL_RATIO; + /** + * @private + * @type {*} + */ + + _this.postRenderTimeoutHandle_; + /** + * @private + * @type {number|undefined} + */ + + _this.animationDelayKey_; + /** + * @private + */ + + _this.animationDelay_ = + /** @this {PluggableMap} */ + function () { + this.animationDelayKey_ = undefined; + this.renderFrame_(Date.now()); + }.bind(_this); + /** + * @private + * @type {import("./transform.js").Transform} + */ + + + _this.coordinateToPixelTransform_ = (0,_transform_js__WEBPACK_IMPORTED_MODULE_2__.create)(); + /** + * @private + * @type {import("./transform.js").Transform} + */ + + _this.pixelToCoordinateTransform_ = (0,_transform_js__WEBPACK_IMPORTED_MODULE_2__.create)(); + /** + * @private + * @type {number} + */ + + _this.frameIndex_ = 0; + /** + * @private + * @type {?FrameState} + */ + + _this.frameState_ = null; + /** + * The extent at the previous 'moveend' event. + * @private + * @type {import("./extent.js").Extent} + */ + + _this.previousExtent_ = null; + /** + * @private + * @type {?import("./events.js").EventsKey} + */ + + _this.viewPropertyListenerKey_ = null; + /** + * @private + * @type {?import("./events.js").EventsKey} + */ + + _this.viewChangeListenerKey_ = null; + /** + * @private + * @type {?Array} + */ + + _this.layerGroupPropertyListenerKeys_ = null; + /** + * @private + * @type {!HTMLElement} + */ + + _this.viewport_ = document.createElement('div'); + _this.viewport_.className = 'ol-viewport' + ('ontouchstart' in window ? ' ol-touch' : ''); + _this.viewport_.style.position = 'relative'; + _this.viewport_.style.overflow = 'hidden'; + _this.viewport_.style.width = '100%'; + _this.viewport_.style.height = '100%'; + /** + * @private + * @type {!HTMLElement} + */ + + _this.overlayContainer_ = document.createElement('div'); + _this.overlayContainer_.style.position = 'absolute'; + _this.overlayContainer_.style.zIndex = '0'; + _this.overlayContainer_.style.width = '100%'; + _this.overlayContainer_.style.height = '100%'; + _this.overlayContainer_.style.pointerEvents = 'none'; + _this.overlayContainer_.className = 'ol-overlaycontainer'; + + _this.viewport_.appendChild(_this.overlayContainer_); + /** + * @private + * @type {!HTMLElement} + */ + + + _this.overlayContainerStopEvent_ = document.createElement('div'); + _this.overlayContainerStopEvent_.style.position = 'absolute'; + _this.overlayContainerStopEvent_.style.zIndex = '0'; + _this.overlayContainerStopEvent_.style.width = '100%'; + _this.overlayContainerStopEvent_.style.height = '100%'; + _this.overlayContainerStopEvent_.style.pointerEvents = 'none'; + _this.overlayContainerStopEvent_.className = 'ol-overlaycontainer-stopevent'; + + _this.viewport_.appendChild(_this.overlayContainerStopEvent_); + /** + * @private + * @type {MapBrowserEventHandler} + */ + + + _this.mapBrowserEventHandler_ = null; + /** + * @private + * @type {number} + */ + + _this.moveTolerance_ = options.moveTolerance; + /** + * @private + * @type {HTMLElement|Document} + */ + + _this.keyboardEventTarget_ = optionsInternal.keyboardEventTarget; + /** + * @private + * @type {?Array} + */ + + _this.keyHandlerKeys_ = null; + /** + * @type {Collection} + * @protected + */ + + _this.controls = optionsInternal.controls || new _Collection_js__WEBPACK_IMPORTED_MODULE_3__["default"](); + /** + * @type {Collection} + * @protected + */ + + _this.interactions = optionsInternal.interactions || new _Collection_js__WEBPACK_IMPORTED_MODULE_3__["default"](); + /** + * @type {Collection} + * @private + */ + + _this.overlays_ = optionsInternal.overlays; + /** + * A lookup of overlays by id. + * @private + * @type {Object} + */ + + _this.overlayIdIndex_ = {}; + /** + * @type {import("./renderer/Map.js").default} + * @private + */ + + _this.renderer_ = null; + /** + * @type {undefined|function(Event): void} + * @private + */ + + _this.handleResize_; + /** + * @private + * @type {!Array} + */ + + _this.postRenderFunctions_ = []; + /** + * @private + * @type {TileQueue} + */ + + _this.tileQueue_ = new _TileQueue_js__WEBPACK_IMPORTED_MODULE_4__["default"](_this.getTilePriority.bind(_this), _this.handleTileChange_.bind(_this)); + + _this.addChangeListener(_MapProperty_js__WEBPACK_IMPORTED_MODULE_5__["default"].LAYERGROUP, _this.handleLayerGroupChanged_); + + _this.addChangeListener(_MapProperty_js__WEBPACK_IMPORTED_MODULE_5__["default"].VIEW, _this.handleViewChanged_); + + _this.addChangeListener(_MapProperty_js__WEBPACK_IMPORTED_MODULE_5__["default"].SIZE, _this.handleSizeChanged_); + + _this.addChangeListener(_MapProperty_js__WEBPACK_IMPORTED_MODULE_5__["default"].TARGET, _this.handleTargetChanged_); // setProperties will trigger the rendering of the map if the map + // is "defined" already. + + + _this.setProperties(optionsInternal.values); + + var map = _this; + + if (options.view && !(options.view instanceof _View_js__WEBPACK_IMPORTED_MODULE_6__["default"])) { + options.view.then(function (viewOptions) { + map.setView(new _View_js__WEBPACK_IMPORTED_MODULE_6__["default"](viewOptions)); + }); + } + + _this.controls.addEventListener(_CollectionEventType_js__WEBPACK_IMPORTED_MODULE_7__["default"].ADD, + /** + * @param {import("./Collection.js").CollectionEvent} event CollectionEvent. + */ + function (event) { + event.element.setMap(this); + }.bind(_this)); + + _this.controls.addEventListener(_CollectionEventType_js__WEBPACK_IMPORTED_MODULE_7__["default"].REMOVE, + /** + * @param {import("./Collection.js").CollectionEvent} event CollectionEvent. + */ + function (event) { + event.element.setMap(null); + }.bind(_this)); + + _this.interactions.addEventListener(_CollectionEventType_js__WEBPACK_IMPORTED_MODULE_7__["default"].ADD, + /** + * @param {import("./Collection.js").CollectionEvent} event CollectionEvent. + */ + function (event) { + event.element.setMap(this); + }.bind(_this)); + + _this.interactions.addEventListener(_CollectionEventType_js__WEBPACK_IMPORTED_MODULE_7__["default"].REMOVE, + /** + * @param {import("./Collection.js").CollectionEvent} event CollectionEvent. + */ + function (event) { + event.element.setMap(null); + }.bind(_this)); + + _this.overlays_.addEventListener(_CollectionEventType_js__WEBPACK_IMPORTED_MODULE_7__["default"].ADD, + /** + * @param {import("./Collection.js").CollectionEvent} event CollectionEvent. + */ + function (event) { + this.addOverlayInternal_( + /** @type {import("./Overlay.js").default} */ + event.element); + }.bind(_this)); + + _this.overlays_.addEventListener(_CollectionEventType_js__WEBPACK_IMPORTED_MODULE_7__["default"].REMOVE, + /** + * @param {import("./Collection.js").CollectionEvent} event CollectionEvent. + */ + function (event) { + var overlay = + /** @type {import("./Overlay.js").default} */ + event.element; + var id = overlay.getId(); + + if (id !== undefined) { + delete this.overlayIdIndex_[id.toString()]; + } + + event.element.setMap(null); + }.bind(_this)); + + _this.controls.forEach( + /** + * @param {import("./control/Control.js").default} control Control. + * @this {PluggableMap} + */ + function (control) { + control.setMap(this); + }.bind(_this)); + + _this.interactions.forEach( + /** + * @param {import("./interaction/Interaction.js").default} interaction Interaction. + * @this {PluggableMap} + */ + function (interaction) { + interaction.setMap(this); + }.bind(_this)); + + _this.overlays_.forEach(_this.addOverlayInternal_.bind(_this)); + + return _this; + } + /** + * @abstract + * @return {import("./renderer/Map.js").default} The map renderer + */ + + + PluggableMap.prototype.createRenderer = function () { + throw new Error('Use a map type that has a createRenderer method'); + }; + /** + * Add the given control to the map. + * @param {import("./control/Control.js").default} control Control. + * @api + */ + + + PluggableMap.prototype.addControl = function (control) { + this.getControls().push(control); + }; + /** + * Add the given interaction to the map. If you want to add an interaction + * at another point of the collection use `getInteraction()` and the methods + * available on {@link module:ol/Collection~Collection}. This can be used to + * stop the event propagation from the handleEvent function. The interactions + * get to handle the events in the reverse order of this collection. + * @param {import("./interaction/Interaction.js").default} interaction Interaction to add. + * @api + */ + + + PluggableMap.prototype.addInteraction = function (interaction) { + this.getInteractions().push(interaction); + }; + /** + * Adds the given layer to the top of this map. If you want to add a layer + * elsewhere in the stack, use `getLayers()` and the methods available on + * {@link module:ol/Collection~Collection}. + * @param {import("./layer/Base.js").default} layer Layer. + * @api + */ + + + PluggableMap.prototype.addLayer = function (layer) { + var layers = this.getLayerGroup().getLayers(); + layers.push(layer); + }; + /** + * Add the given overlay to the map. + * @param {import("./Overlay.js").default} overlay Overlay. + * @api + */ + + + PluggableMap.prototype.addOverlay = function (overlay) { + this.getOverlays().push(overlay); + }; + /** + * This deals with map's overlay collection changes. + * @param {import("./Overlay.js").default} overlay Overlay. + * @private + */ + + + PluggableMap.prototype.addOverlayInternal_ = function (overlay) { + var id = overlay.getId(); + + if (id !== undefined) { + this.overlayIdIndex_[id.toString()] = overlay; + } + + overlay.setMap(this); + }; + /** + * + * Clean up. + */ + + + PluggableMap.prototype.disposeInternal = function () { + this.setTarget(null); + + _super.prototype.disposeInternal.call(this); + }; + /** + * Detect features that intersect a pixel on the viewport, and execute a + * callback with each intersecting feature. Layers included in the detection can + * be configured through the `layerFilter` option in `opt_options`. + * @param {import("./pixel.js").Pixel} pixel Pixel. + * @param {function(import("./Feature.js").FeatureLike, import("./layer/Layer.js").default, import("./geom/SimpleGeometry.js").default): T} callback Feature callback. The callback will be + * called with two arguments. The first argument is one + * {@link module:ol/Feature feature} or + * {@link module:ol/render/Feature render feature} at the pixel, the second is + * the {@link module:ol/layer/Layer layer} of the feature and will be null for + * unmanaged layers. To stop detection, callback functions can return a + * truthy value. + * @param {AtPixelOptions} [opt_options] Optional options. + * @return {T|undefined} Callback result, i.e. the return value of last + * callback execution, or the first truthy callback return value. + * @template T + * @api + */ + + + PluggableMap.prototype.forEachFeatureAtPixel = function (pixel, callback, opt_options) { + if (!this.frameState_) { + return; + } + + var coordinate = this.getCoordinateFromPixelInternal(pixel); + opt_options = opt_options !== undefined ? opt_options : {}; + var hitTolerance = opt_options.hitTolerance !== undefined ? opt_options.hitTolerance : 0; + var layerFilter = opt_options.layerFilter !== undefined ? opt_options.layerFilter : _functions_js__WEBPACK_IMPORTED_MODULE_8__.TRUE; + var checkWrapped = opt_options.checkWrapped !== false; + return this.renderer_.forEachFeatureAtCoordinate(coordinate, this.frameState_, hitTolerance, checkWrapped, callback, null, layerFilter, null); + }; + /** + * Get all features that intersect a pixel on the viewport. + * @param {import("./pixel.js").Pixel} pixel Pixel. + * @param {AtPixelOptions} [opt_options] Optional options. + * @return {Array} The detected features or + * an empty array if none were found. + * @api + */ + + + PluggableMap.prototype.getFeaturesAtPixel = function (pixel, opt_options) { + var features = []; + this.forEachFeatureAtPixel(pixel, function (feature) { + features.push(feature); + }, opt_options); + return features; + }; + /** + * Detect layers that have a color value at a pixel on the viewport, and + * execute a callback with each matching layer. Layers included in the + * detection can be configured through `opt_layerFilter`. + * + * Note: this may give false positives unless the map layers have had different `className` + * properties assigned to them. + * + * @param {import("./pixel.js").Pixel} pixel Pixel. + * @param {function(this: S, import("./layer/Layer.js").default, (Uint8ClampedArray|Uint8Array)): T} callback + * Layer callback. This callback will receive two arguments: first is the + * {@link module:ol/layer/Layer layer}, second argument is an array representing + * [R, G, B, A] pixel values (0 - 255) and will be `null` for layer types + * that do not currently support this argument. To stop detection, callback + * functions can return a truthy value. + * @param {AtPixelOptions} [opt_options] Configuration options. + * @return {T|undefined} Callback result, i.e. the return value of last + * callback execution, or the first truthy callback return value. + * @template S,T + * @api + */ + + + PluggableMap.prototype.forEachLayerAtPixel = function (pixel, callback, opt_options) { + if (!this.frameState_) { + return; + } + + var options = opt_options || {}; + var hitTolerance = options.hitTolerance !== undefined ? options.hitTolerance : 0; + var layerFilter = options.layerFilter || _functions_js__WEBPACK_IMPORTED_MODULE_8__.TRUE; + return this.renderer_.forEachLayerAtPixel(pixel, this.frameState_, hitTolerance, callback, layerFilter); + }; + /** + * Detect if features intersect a pixel on the viewport. Layers included in the + * detection can be configured through `opt_layerFilter`. + * @param {import("./pixel.js").Pixel} pixel Pixel. + * @param {AtPixelOptions} [opt_options] Optional options. + * @return {boolean} Is there a feature at the given pixel? + * @api + */ + + + PluggableMap.prototype.hasFeatureAtPixel = function (pixel, opt_options) { + if (!this.frameState_) { + return false; + } + + var coordinate = this.getCoordinateFromPixelInternal(pixel); + opt_options = opt_options !== undefined ? opt_options : {}; + var layerFilter = opt_options.layerFilter !== undefined ? opt_options.layerFilter : _functions_js__WEBPACK_IMPORTED_MODULE_8__.TRUE; + var hitTolerance = opt_options.hitTolerance !== undefined ? opt_options.hitTolerance : 0; + var checkWrapped = opt_options.checkWrapped !== false; + return this.renderer_.hasFeatureAtCoordinate(coordinate, this.frameState_, hitTolerance, checkWrapped, layerFilter, null); + }; + /** + * Returns the coordinate in user projection for a browser event. + * @param {MouseEvent} event Event. + * @return {import("./coordinate.js").Coordinate} Coordinate. + * @api + */ + + + PluggableMap.prototype.getEventCoordinate = function (event) { + return this.getCoordinateFromPixel(this.getEventPixel(event)); + }; + /** + * Returns the coordinate in view projection for a browser event. + * @param {MouseEvent} event Event. + * @return {import("./coordinate.js").Coordinate} Coordinate. + */ + + + PluggableMap.prototype.getEventCoordinateInternal = function (event) { + return this.getCoordinateFromPixelInternal(this.getEventPixel(event)); + }; + /** + * Returns the map pixel position for a browser event relative to the viewport. + * @param {UIEvent} event Event. + * @return {import("./pixel.js").Pixel} Pixel. + * @api + */ + + + PluggableMap.prototype.getEventPixel = function (event) { + var viewportPosition = this.viewport_.getBoundingClientRect(); + var eventPosition = //FIXME Are we really calling this with a TouchEvent anywhere? + 'changedTouches' in event ? + /** @type {TouchEvent} */ + event.changedTouches[0] : + /** @type {MouseEvent} */ + event; + return [eventPosition.clientX - viewportPosition.left, eventPosition.clientY - viewportPosition.top]; + }; + /** + * Get the target in which this map is rendered. + * Note that this returns what is entered as an option or in setTarget: + * if that was an element, it returns an element; if a string, it returns that. + * @return {HTMLElement|string|undefined} The Element or id of the Element that the + * map is rendered in. + * @observable + * @api + */ + + + PluggableMap.prototype.getTarget = function () { + return ( + /** @type {HTMLElement|string|undefined} */ + this.get(_MapProperty_js__WEBPACK_IMPORTED_MODULE_5__["default"].TARGET) + ); + }; + /** + * Get the DOM element into which this map is rendered. In contrast to + * `getTarget` this method always return an `Element`, or `null` if the + * map has no target. + * @return {HTMLElement} The element that the map is rendered in. + * @api + */ + + + PluggableMap.prototype.getTargetElement = function () { + var target = this.getTarget(); + + if (target !== undefined) { + return typeof target === 'string' ? document.getElementById(target) : target; + } else { + return null; + } + }; + /** + * Get the coordinate for a given pixel. This returns a coordinate in the + * user projection. + * @param {import("./pixel.js").Pixel} pixel Pixel position in the map viewport. + * @return {import("./coordinate.js").Coordinate} The coordinate for the pixel position. + * @api + */ + + + PluggableMap.prototype.getCoordinateFromPixel = function (pixel) { + return (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.toUserCoordinate)(this.getCoordinateFromPixelInternal(pixel), this.getView().getProjection()); + }; + /** + * Get the coordinate for a given pixel. This returns a coordinate in the + * map view projection. + * @param {import("./pixel.js").Pixel} pixel Pixel position in the map viewport. + * @return {import("./coordinate.js").Coordinate} The coordinate for the pixel position. + */ + + + PluggableMap.prototype.getCoordinateFromPixelInternal = function (pixel) { + var frameState = this.frameState_; + + if (!frameState) { + return null; + } else { + return (0,_transform_js__WEBPACK_IMPORTED_MODULE_2__.apply)(frameState.pixelToCoordinateTransform, pixel.slice()); + } + }; + /** + * Get the map controls. Modifying this collection changes the controls + * associated with the map. + * @return {Collection} Controls. + * @api + */ + + + PluggableMap.prototype.getControls = function () { + return this.controls; + }; + /** + * Get the map overlays. Modifying this collection changes the overlays + * associated with the map. + * @return {Collection} Overlays. + * @api + */ + + + PluggableMap.prototype.getOverlays = function () { + return this.overlays_; + }; + /** + * Get an overlay by its identifier (the value returned by overlay.getId()). + * Note that the index treats string and numeric identifiers as the same. So + * `map.getOverlayById(2)` will return an overlay with id `'2'` or `2`. + * @param {string|number} id Overlay identifier. + * @return {import("./Overlay.js").default} Overlay. + * @api + */ + + + PluggableMap.prototype.getOverlayById = function (id) { + var overlay = this.overlayIdIndex_[id.toString()]; + return overlay !== undefined ? overlay : null; + }; + /** + * Get the map interactions. Modifying this collection changes the interactions + * associated with the map. + * + * Interactions are used for e.g. pan, zoom and rotate. + * @return {Collection} Interactions. + * @api + */ + + + PluggableMap.prototype.getInteractions = function () { + return this.interactions; + }; + /** + * Get the layergroup associated with this map. + * @return {LayerGroup} A layer group containing the layers in this map. + * @observable + * @api + */ + + + PluggableMap.prototype.getLayerGroup = function () { + return ( + /** @type {LayerGroup} */ + this.get(_MapProperty_js__WEBPACK_IMPORTED_MODULE_5__["default"].LAYERGROUP) + ); + }; + /** + * Clear any existing layers and add layers to the map. + * @param {Array|Collection} layers The layers to be added to the map. + * @api + */ + + + PluggableMap.prototype.setLayers = function (layers) { + var group = this.getLayerGroup(); + + if (layers instanceof _Collection_js__WEBPACK_IMPORTED_MODULE_3__["default"]) { + group.setLayers(layers); + return; + } + + var collection = group.getLayers(); + collection.clear(); + collection.extend(layers); + }; + /** + * Get the collection of layers associated with this map. + * @return {!Collection} Layers. + * @api + */ + + + PluggableMap.prototype.getLayers = function () { + var layers = this.getLayerGroup().getLayers(); + return layers; + }; + /** + * @return {boolean} Layers have sources that are still loading. + */ + + + PluggableMap.prototype.getLoading = function () { + var layerStatesArray = this.getLayerGroup().getLayerStatesArray(); + + for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) { + var layer = layerStatesArray[i].layer; + var source = + /** @type {import("./layer/Layer.js").default} */ + layer.getSource(); + + if (source && source.loading) { + return true; + } + } + + return false; + }; + /** + * Get the pixel for a coordinate. This takes a coordinate in the user + * projection and returns the corresponding pixel. + * @param {import("./coordinate.js").Coordinate} coordinate A map coordinate. + * @return {import("./pixel.js").Pixel} A pixel position in the map viewport. + * @api + */ + + + PluggableMap.prototype.getPixelFromCoordinate = function (coordinate) { + var viewCoordinate = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserCoordinate)(coordinate, this.getView().getProjection()); + return this.getPixelFromCoordinateInternal(viewCoordinate); + }; + /** + * Get the pixel for a coordinate. This takes a coordinate in the map view + * projection and returns the corresponding pixel. + * @param {import("./coordinate.js").Coordinate} coordinate A map coordinate. + * @return {import("./pixel.js").Pixel} A pixel position in the map viewport. + */ + + + PluggableMap.prototype.getPixelFromCoordinateInternal = function (coordinate) { + var frameState = this.frameState_; + + if (!frameState) { + return null; + } else { + return (0,_transform_js__WEBPACK_IMPORTED_MODULE_2__.apply)(frameState.coordinateToPixelTransform, coordinate.slice(0, 2)); + } + }; + /** + * Get the map renderer. + * @return {import("./renderer/Map.js").default} Renderer + */ + + + PluggableMap.prototype.getRenderer = function () { + return this.renderer_; + }; + /** + * Get the size of this map. + * @return {import("./size.js").Size|undefined} The size in pixels of the map in the DOM. + * @observable + * @api + */ + + + PluggableMap.prototype.getSize = function () { + return ( + /** @type {import("./size.js").Size|undefined} */ + this.get(_MapProperty_js__WEBPACK_IMPORTED_MODULE_5__["default"].SIZE) + ); + }; + /** + * Get the view associated with this map. A view manages properties such as + * center and resolution. + * @return {View} The view that controls this map. + * @observable + * @api + */ + + + PluggableMap.prototype.getView = function () { + return ( + /** @type {View} */ + this.get(_MapProperty_js__WEBPACK_IMPORTED_MODULE_5__["default"].VIEW) + ); + }; + /** + * Get the element that serves as the map viewport. + * @return {HTMLElement} Viewport. + * @api + */ + + + PluggableMap.prototype.getViewport = function () { + return this.viewport_; + }; + /** + * Get the element that serves as the container for overlays. Elements added to + * this container will let mousedown and touchstart events through to the map, + * so clicks and gestures on an overlay will trigger {@link module:ol/MapBrowserEvent~MapBrowserEvent} + * events. + * @return {!HTMLElement} The map's overlay container. + */ + + + PluggableMap.prototype.getOverlayContainer = function () { + return this.overlayContainer_; + }; + /** + * Get the element that serves as a container for overlays that don't allow + * event propagation. Elements added to this container won't let mousedown and + * touchstart events through to the map, so clicks and gestures on an overlay + * don't trigger any {@link module:ol/MapBrowserEvent~MapBrowserEvent}. + * @return {!HTMLElement} The map's overlay container that stops events. + */ + + + PluggableMap.prototype.getOverlayContainerStopEvent = function () { + return this.overlayContainerStopEvent_; + }; + /** + * @return {!Document} The document where the map is displayed. + */ + + + PluggableMap.prototype.getOwnerDocument = function () { + var targetElement = this.getTargetElement(); + return targetElement ? targetElement.ownerDocument : document; + }; + /** + * @param {import("./Tile.js").default} tile Tile. + * @param {string} tileSourceKey Tile source key. + * @param {import("./coordinate.js").Coordinate} tileCenter Tile center. + * @param {number} tileResolution Tile resolution. + * @return {number} Tile priority. + */ + + + PluggableMap.prototype.getTilePriority = function (tile, tileSourceKey, tileCenter, tileResolution) { + return (0,_TileQueue_js__WEBPACK_IMPORTED_MODULE_4__.getTilePriority)(this.frameState_, tile, tileSourceKey, tileCenter, tileResolution); + }; + /** + * @param {UIEvent} browserEvent Browser event. + * @param {string} [opt_type] Type. + */ + + + PluggableMap.prototype.handleBrowserEvent = function (browserEvent, opt_type) { + var type = opt_type || browserEvent.type; + var mapBrowserEvent = new _MapBrowserEvent_js__WEBPACK_IMPORTED_MODULE_9__["default"](type, this, browserEvent); + this.handleMapBrowserEvent(mapBrowserEvent); + }; + /** + * @param {MapBrowserEvent} mapBrowserEvent The event to handle. + */ + + + PluggableMap.prototype.handleMapBrowserEvent = function (mapBrowserEvent) { + if (!this.frameState_) { + // With no view defined, we cannot translate pixels into geographical + // coordinates so interactions cannot be used. + return; + } + + var originalEvent = + /** @type {PointerEvent} */ + mapBrowserEvent.originalEvent; + var eventType = originalEvent.type; + + if (eventType === _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_10__["default"].POINTERDOWN || eventType === _events_EventType_js__WEBPACK_IMPORTED_MODULE_11__["default"].WHEEL || eventType === _events_EventType_js__WEBPACK_IMPORTED_MODULE_11__["default"].KEYDOWN) { + var doc = this.getOwnerDocument(); + var rootNode = this.viewport_.getRootNode ? this.viewport_.getRootNode() : doc; + var target = + /** @type {Node} */ + originalEvent.target; + + if ( // Abort if the target is a child of the container for elements whose events are not meant + // to be handled by map interactions. + this.overlayContainerStopEvent_.contains(target) || // Abort if the event target is a child of the container that is no longer in the page. + // It's possible for the target to no longer be in the page if it has been removed in an + // event listener, this might happen in a Control that recreates it's content based on + // user interaction either manually or via a render in something like https://reactjs.org/ + !(rootNode === doc ? doc.documentElement : rootNode).contains(target)) { + return; + } + } + + mapBrowserEvent.frameState = this.frameState_; + + if (this.dispatchEvent(mapBrowserEvent) !== false) { + var interactionsArray = this.getInteractions().getArray().slice(); + + for (var i = interactionsArray.length - 1; i >= 0; i--) { + var interaction = interactionsArray[i]; + + if (interaction.getMap() !== this || !interaction.getActive() || !this.getTargetElement()) { + continue; + } + + var cont = interaction.handleEvent(mapBrowserEvent); + + if (!cont || mapBrowserEvent.propagationStopped) { + break; + } + } + } + }; + /** + * @protected + */ + + + PluggableMap.prototype.handlePostRender = function () { + var frameState = this.frameState_; // Manage the tile queue + // Image loads are expensive and a limited resource, so try to use them + // efficiently: + // * When the view is static we allow a large number of parallel tile loads + // to complete the frame as quickly as possible. + // * When animating or interacting, image loads can cause janks, so we reduce + // the maximum number of loads per frame and limit the number of parallel + // tile loads to remain reactive to view changes and to reduce the chance of + // loading tiles that will quickly disappear from view. + + var tileQueue = this.tileQueue_; + + if (!tileQueue.isEmpty()) { + var maxTotalLoading = this.maxTilesLoading_; + var maxNewLoads = maxTotalLoading; + + if (frameState) { + var hints = frameState.viewHints; + + if (hints[_ViewHint_js__WEBPACK_IMPORTED_MODULE_12__["default"].ANIMATING] || hints[_ViewHint_js__WEBPACK_IMPORTED_MODULE_12__["default"].INTERACTING]) { + var lowOnFrameBudget = Date.now() - frameState.time > 8; + maxTotalLoading = lowOnFrameBudget ? 0 : 8; + maxNewLoads = lowOnFrameBudget ? 0 : 2; + } + } + + if (tileQueue.getTilesLoading() < maxTotalLoading) { + tileQueue.reprioritize(); // FIXME only call if view has changed + + tileQueue.loadMoreTiles(maxTotalLoading, maxNewLoads); + } + } + + if (frameState && this.hasListener(_render_EventType_js__WEBPACK_IMPORTED_MODULE_13__["default"].RENDERCOMPLETE) && !frameState.animate && !this.tileQueue_.getTilesLoading() && !this.getLoading()) { + this.renderer_.dispatchRenderEvent(_render_EventType_js__WEBPACK_IMPORTED_MODULE_13__["default"].RENDERCOMPLETE, frameState); + } + + var postRenderFunctions = this.postRenderFunctions_; + + for (var i = 0, ii = postRenderFunctions.length; i < ii; ++i) { + postRenderFunctions[i](this, frameState); + } + + postRenderFunctions.length = 0; + }; + /** + * @private + */ + + + PluggableMap.prototype.handleSizeChanged_ = function () { + if (this.getView() && !this.getView().getAnimating()) { + this.getView().resolveConstraints(0); + } + + this.render(); + }; + /** + * @private + */ + + + PluggableMap.prototype.handleTargetChanged_ = function () { + // target may be undefined, null, a string or an Element. + // If it's a string we convert it to an Element before proceeding. + // If it's not now an Element we remove the viewport from the DOM. + // If it's an Element we append the viewport element to it. + var targetElement; + + if (this.getTarget()) { + targetElement = this.getTargetElement(); + } + + if (this.mapBrowserEventHandler_) { + for (var i = 0, ii = this.keyHandlerKeys_.length; i < ii; ++i) { + (0,_events_js__WEBPACK_IMPORTED_MODULE_14__.unlistenByKey)(this.keyHandlerKeys_[i]); + } + + this.keyHandlerKeys_ = null; + this.viewport_.removeEventListener(_events_EventType_js__WEBPACK_IMPORTED_MODULE_11__["default"].CONTEXTMENU, this.boundHandleBrowserEvent_); + this.viewport_.removeEventListener(_events_EventType_js__WEBPACK_IMPORTED_MODULE_11__["default"].WHEEL, this.boundHandleBrowserEvent_); + + if (this.handleResize_ !== undefined) { + removeEventListener(_events_EventType_js__WEBPACK_IMPORTED_MODULE_11__["default"].RESIZE, this.handleResize_, false); + this.handleResize_ = undefined; + } + + this.mapBrowserEventHandler_.dispose(); + this.mapBrowserEventHandler_ = null; + (0,_dom_js__WEBPACK_IMPORTED_MODULE_15__.removeNode)(this.viewport_); + } + + if (!targetElement) { + if (this.renderer_) { + clearTimeout(this.postRenderTimeoutHandle_); + this.postRenderTimeoutHandle_ = undefined; + this.postRenderFunctions_.length = 0; + this.renderer_.dispose(); + this.renderer_ = null; + } + + if (this.animationDelayKey_) { + cancelAnimationFrame(this.animationDelayKey_); + this.animationDelayKey_ = undefined; + } + } else { + targetElement.appendChild(this.viewport_); + + if (!this.renderer_) { + this.renderer_ = this.createRenderer(); + } + + this.mapBrowserEventHandler_ = new _MapBrowserEventHandler_js__WEBPACK_IMPORTED_MODULE_16__["default"](this, this.moveTolerance_); + + for (var key in _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_17__["default"]) { + this.mapBrowserEventHandler_.addEventListener(_MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_17__["default"][key], this.handleMapBrowserEvent.bind(this)); + } + + this.viewport_.addEventListener(_events_EventType_js__WEBPACK_IMPORTED_MODULE_11__["default"].CONTEXTMENU, this.boundHandleBrowserEvent_, false); + this.viewport_.addEventListener(_events_EventType_js__WEBPACK_IMPORTED_MODULE_11__["default"].WHEEL, this.boundHandleBrowserEvent_, _has_js__WEBPACK_IMPORTED_MODULE_1__.PASSIVE_EVENT_LISTENERS ? { + passive: false + } : false); + var keyboardEventTarget = !this.keyboardEventTarget_ ? targetElement : this.keyboardEventTarget_; + this.keyHandlerKeys_ = [(0,_events_js__WEBPACK_IMPORTED_MODULE_14__.listen)(keyboardEventTarget, _events_EventType_js__WEBPACK_IMPORTED_MODULE_11__["default"].KEYDOWN, this.handleBrowserEvent, this), (0,_events_js__WEBPACK_IMPORTED_MODULE_14__.listen)(keyboardEventTarget, _events_EventType_js__WEBPACK_IMPORTED_MODULE_11__["default"].KEYPRESS, this.handleBrowserEvent, this)]; + + if (!this.handleResize_) { + this.handleResize_ = this.updateSize.bind(this); + window.addEventListener(_events_EventType_js__WEBPACK_IMPORTED_MODULE_11__["default"].RESIZE, this.handleResize_, false); + } + } + + this.updateSize(); // updateSize calls setSize, so no need to call this.render + // ourselves here. + }; + /** + * @private + */ + + + PluggableMap.prototype.handleTileChange_ = function () { + this.render(); + }; + /** + * @private + */ + + + PluggableMap.prototype.handleViewPropertyChanged_ = function () { + this.render(); + }; + /** + * @private + */ + + + PluggableMap.prototype.handleViewChanged_ = function () { + if (this.viewPropertyListenerKey_) { + (0,_events_js__WEBPACK_IMPORTED_MODULE_14__.unlistenByKey)(this.viewPropertyListenerKey_); + this.viewPropertyListenerKey_ = null; + } + + if (this.viewChangeListenerKey_) { + (0,_events_js__WEBPACK_IMPORTED_MODULE_14__.unlistenByKey)(this.viewChangeListenerKey_); + this.viewChangeListenerKey_ = null; + } + + var view = this.getView(); + + if (view) { + this.updateViewportSize_(); + this.viewPropertyListenerKey_ = (0,_events_js__WEBPACK_IMPORTED_MODULE_14__.listen)(view, _ObjectEventType_js__WEBPACK_IMPORTED_MODULE_18__["default"].PROPERTYCHANGE, this.handleViewPropertyChanged_, this); + this.viewChangeListenerKey_ = (0,_events_js__WEBPACK_IMPORTED_MODULE_14__.listen)(view, _events_EventType_js__WEBPACK_IMPORTED_MODULE_11__["default"].CHANGE, this.handleViewPropertyChanged_, this); + view.resolveConstraints(0); + } + + this.render(); + }; + /** + * @private + */ + + + PluggableMap.prototype.handleLayerGroupChanged_ = function () { + if (this.layerGroupPropertyListenerKeys_) { + this.layerGroupPropertyListenerKeys_.forEach(_events_js__WEBPACK_IMPORTED_MODULE_14__.unlistenByKey); + this.layerGroupPropertyListenerKeys_ = null; + } + + var layerGroup = this.getLayerGroup(); + + if (layerGroup) { + this.layerGroupPropertyListenerKeys_ = [(0,_events_js__WEBPACK_IMPORTED_MODULE_14__.listen)(layerGroup, _ObjectEventType_js__WEBPACK_IMPORTED_MODULE_18__["default"].PROPERTYCHANGE, this.render, this), (0,_events_js__WEBPACK_IMPORTED_MODULE_14__.listen)(layerGroup, _events_EventType_js__WEBPACK_IMPORTED_MODULE_11__["default"].CHANGE, this.render, this)]; + } + + this.render(); + }; + /** + * @return {boolean} Is rendered. + */ + + + PluggableMap.prototype.isRendered = function () { + return !!this.frameState_; + }; + /** + * Requests an immediate render in a synchronous manner. + * @api + */ + + + PluggableMap.prototype.renderSync = function () { + if (this.animationDelayKey_) { + cancelAnimationFrame(this.animationDelayKey_); + } + + this.animationDelay_(); + }; + /** + * Redraws all text after new fonts have loaded + */ + + + PluggableMap.prototype.redrawText = function () { + var layerStates = this.getLayerGroup().getLayerStatesArray(); + + for (var i = 0, ii = layerStates.length; i < ii; ++i) { + var layer = layerStates[i].layer; + + if (layer.hasRenderer()) { + layer.getRenderer().handleFontsChanged(); + } + } + }; + /** + * Request a map rendering (at the next animation frame). + * @api + */ + + + PluggableMap.prototype.render = function () { + if (this.renderer_ && this.animationDelayKey_ === undefined) { + this.animationDelayKey_ = requestAnimationFrame(this.animationDelay_); + } + }; + /** + * Remove the given control from the map. + * @param {import("./control/Control.js").default} control Control. + * @return {import("./control/Control.js").default|undefined} The removed control (or undefined + * if the control was not found). + * @api + */ + + + PluggableMap.prototype.removeControl = function (control) { + return this.getControls().remove(control); + }; + /** + * Remove the given interaction from the map. + * @param {import("./interaction/Interaction.js").default} interaction Interaction to remove. + * @return {import("./interaction/Interaction.js").default|undefined} The removed interaction (or + * undefined if the interaction was not found). + * @api + */ + + + PluggableMap.prototype.removeInteraction = function (interaction) { + return this.getInteractions().remove(interaction); + }; + /** + * Removes the given layer from the map. + * @param {import("./layer/Base.js").default} layer Layer. + * @return {import("./layer/Base.js").default|undefined} The removed layer (or undefined if the + * layer was not found). + * @api + */ + + + PluggableMap.prototype.removeLayer = function (layer) { + var layers = this.getLayerGroup().getLayers(); + return layers.remove(layer); + }; + /** + * Remove the given overlay from the map. + * @param {import("./Overlay.js").default} overlay Overlay. + * @return {import("./Overlay.js").default|undefined} The removed overlay (or undefined + * if the overlay was not found). + * @api + */ + + + PluggableMap.prototype.removeOverlay = function (overlay) { + return this.getOverlays().remove(overlay); + }; + /** + * @param {number} time Time. + * @private + */ + + + PluggableMap.prototype.renderFrame_ = function (time) { + var _this = this; + + var size = this.getSize(); + var view = this.getView(); + var previousFrameState = this.frameState_; + /** @type {?FrameState} */ + + var frameState = null; + + if (size !== undefined && (0,_size_js__WEBPACK_IMPORTED_MODULE_19__.hasArea)(size) && view && view.isDef()) { + var viewHints = view.getHints(this.frameState_ ? this.frameState_.viewHints : undefined); + var viewState = view.getState(); + frameState = { + animate: false, + coordinateToPixelTransform: this.coordinateToPixelTransform_, + declutterTree: null, + extent: (0,_extent_js__WEBPACK_IMPORTED_MODULE_20__.getForViewAndSize)(viewState.center, viewState.resolution, viewState.rotation, size), + index: this.frameIndex_++, + layerIndex: 0, + layerStatesArray: this.getLayerGroup().getLayerStatesArray(), + pixelRatio: this.pixelRatio_, + pixelToCoordinateTransform: this.pixelToCoordinateTransform_, + postRenderFunctions: [], + size: size, + tileQueue: this.tileQueue_, + time: time, + usedTiles: {}, + viewState: viewState, + viewHints: viewHints, + wantedTiles: {} + }; + + if (viewState.nextCenter && viewState.nextResolution) { + var rotation = isNaN(viewState.nextRotation) ? viewState.rotation : viewState.nextRotation; + frameState.nextExtent = (0,_extent_js__WEBPACK_IMPORTED_MODULE_20__.getForViewAndSize)(viewState.nextCenter, viewState.nextResolution, rotation, size); + } + } + + this.frameState_ = frameState; + this.renderer_.renderFrame(frameState); + + if (frameState) { + if (frameState.animate) { + this.render(); + } + + Array.prototype.push.apply(this.postRenderFunctions_, frameState.postRenderFunctions); + + if (previousFrameState) { + var moveStart = !this.previousExtent_ || !(0,_extent_js__WEBPACK_IMPORTED_MODULE_20__.isEmpty)(this.previousExtent_) && !(0,_extent_js__WEBPACK_IMPORTED_MODULE_20__.equals)(frameState.extent, this.previousExtent_); + + if (moveStart) { + this.dispatchEvent(new _MapEvent_js__WEBPACK_IMPORTED_MODULE_21__["default"](_MapEventType_js__WEBPACK_IMPORTED_MODULE_22__["default"].MOVESTART, this, previousFrameState)); + this.previousExtent_ = (0,_extent_js__WEBPACK_IMPORTED_MODULE_20__.createOrUpdateEmpty)(this.previousExtent_); + } + } + + var idle = this.previousExtent_ && !frameState.viewHints[_ViewHint_js__WEBPACK_IMPORTED_MODULE_12__["default"].ANIMATING] && !frameState.viewHints[_ViewHint_js__WEBPACK_IMPORTED_MODULE_12__["default"].INTERACTING] && !(0,_extent_js__WEBPACK_IMPORTED_MODULE_20__.equals)(frameState.extent, this.previousExtent_); + + if (idle) { + this.dispatchEvent(new _MapEvent_js__WEBPACK_IMPORTED_MODULE_21__["default"](_MapEventType_js__WEBPACK_IMPORTED_MODULE_22__["default"].MOVEEND, this, frameState)); + (0,_extent_js__WEBPACK_IMPORTED_MODULE_20__.clone)(frameState.extent, this.previousExtent_); + } + } + + this.dispatchEvent(new _MapEvent_js__WEBPACK_IMPORTED_MODULE_21__["default"](_MapEventType_js__WEBPACK_IMPORTED_MODULE_22__["default"].POSTRENDER, this, frameState)); + + if (!this.postRenderTimeoutHandle_) { + this.postRenderTimeoutHandle_ = setTimeout(function () { + _this.postRenderTimeoutHandle_ = undefined; + + _this.handlePostRender(); + }, 0); + } + }; + /** + * Sets the layergroup of this map. + * @param {LayerGroup} layerGroup A layer group containing the layers in this map. + * @observable + * @api + */ + + + PluggableMap.prototype.setLayerGroup = function (layerGroup) { + this.set(_MapProperty_js__WEBPACK_IMPORTED_MODULE_5__["default"].LAYERGROUP, layerGroup); + }; + /** + * Set the size of this map. + * @param {import("./size.js").Size|undefined} size The size in pixels of the map in the DOM. + * @observable + * @api + */ + + + PluggableMap.prototype.setSize = function (size) { + this.set(_MapProperty_js__WEBPACK_IMPORTED_MODULE_5__["default"].SIZE, size); + }; + /** + * Set the target element to render this map into. + * @param {HTMLElement|string} [target] The Element or id of the Element + * that the map is rendered in. + * @observable + * @api + */ + + + PluggableMap.prototype.setTarget = function (target) { + this.set(_MapProperty_js__WEBPACK_IMPORTED_MODULE_5__["default"].TARGET, target); + }; + /** + * Set the view for this map. + * @param {View|Promise} view The view that controls this map. + * It is also possible to pass a promise that resolves to options for constructing a view. This + * alternative allows view properties to be resolved by sources or other components that load + * view-related metadata. + * @observable + * @api + */ + + + PluggableMap.prototype.setView = function (view) { + if (!view || view instanceof _View_js__WEBPACK_IMPORTED_MODULE_6__["default"]) { + this.set(_MapProperty_js__WEBPACK_IMPORTED_MODULE_5__["default"].VIEW, view); + return; + } + + this.set(_MapProperty_js__WEBPACK_IMPORTED_MODULE_5__["default"].VIEW, new _View_js__WEBPACK_IMPORTED_MODULE_6__["default"]()); + var map = this; + view.then(function (viewOptions) { + map.setView(new _View_js__WEBPACK_IMPORTED_MODULE_6__["default"](viewOptions)); + }); + }; + /** + * Force a recalculation of the map viewport size. This should be called when + * third-party code changes the size of the map viewport. + * @api + */ + + + PluggableMap.prototype.updateSize = function () { + var targetElement = this.getTargetElement(); + var size = undefined; + + if (targetElement) { + var computedStyle = getComputedStyle(targetElement); + var width = targetElement.offsetWidth - parseFloat(computedStyle['borderLeftWidth']) - parseFloat(computedStyle['paddingLeft']) - parseFloat(computedStyle['paddingRight']) - parseFloat(computedStyle['borderRightWidth']); + var height = targetElement.offsetHeight - parseFloat(computedStyle['borderTopWidth']) - parseFloat(computedStyle['paddingTop']) - parseFloat(computedStyle['paddingBottom']) - parseFloat(computedStyle['borderBottomWidth']); + + if (!isNaN(width) && !isNaN(height)) { + size = [width, height]; + + if (!(0,_size_js__WEBPACK_IMPORTED_MODULE_19__.hasArea)(size) && !!(targetElement.offsetWidth || targetElement.offsetHeight || targetElement.getClientRects().length)) { + // eslint-disable-next-line + console.warn("No map visible because the map container's width or height are 0."); + } + } + } + + this.setSize(size); + this.updateViewportSize_(); + }; + /** + * Recomputes the viewport size and save it on the view object (if any) + * @private + */ + + + PluggableMap.prototype.updateViewportSize_ = function () { + var view = this.getView(); + + if (view) { + var size = undefined; + var computedStyle = getComputedStyle(this.viewport_); + + if (computedStyle.width && computedStyle.height) { + size = [parseInt(computedStyle.width, 10), parseInt(computedStyle.height, 10)]; + } + + view.setViewportSize(size); + } + }; + + return PluggableMap; +}(_Object_js__WEBPACK_IMPORTED_MODULE_23__["default"]); +/** + * @param {MapOptions} options Map options. + * @return {MapOptionsInternal} Internal map options. + */ + + +function createOptionsInternal(options) { + /** + * @type {HTMLElement|Document} + */ + var keyboardEventTarget = null; + + if (options.keyboardEventTarget !== undefined) { + keyboardEventTarget = typeof options.keyboardEventTarget === 'string' ? document.getElementById(options.keyboardEventTarget) : options.keyboardEventTarget; + } + /** + * @type {Object} + */ + + + var values = {}; + var layerGroup = options.layers && typeof + /** @type {?} */ + options.layers.getLayers === 'function' ? + /** @type {LayerGroup} */ + options.layers : new _layer_Group_js__WEBPACK_IMPORTED_MODULE_24__["default"]({ + layers: + /** @type {Collection} */ + options.layers + }); + values[_MapProperty_js__WEBPACK_IMPORTED_MODULE_5__["default"].LAYERGROUP] = layerGroup; + values[_MapProperty_js__WEBPACK_IMPORTED_MODULE_5__["default"].TARGET] = options.target; + values[_MapProperty_js__WEBPACK_IMPORTED_MODULE_5__["default"].VIEW] = options.view instanceof _View_js__WEBPACK_IMPORTED_MODULE_6__["default"] ? options.view : new _View_js__WEBPACK_IMPORTED_MODULE_6__["default"](); + var controls; + + if (options.controls !== undefined) { + if (Array.isArray(options.controls)) { + controls = new _Collection_js__WEBPACK_IMPORTED_MODULE_3__["default"](options.controls.slice()); + } else { + (0,_asserts_js__WEBPACK_IMPORTED_MODULE_25__.assert)(typeof + /** @type {?} */ + options.controls.getArray === 'function', 47); // Expected `controls` to be an array or an `import("./Collection.js").Collection` + + controls = + /** @type {Collection} */ + options.controls; + } + } + + var interactions; + + if (options.interactions !== undefined) { + if (Array.isArray(options.interactions)) { + interactions = new _Collection_js__WEBPACK_IMPORTED_MODULE_3__["default"](options.interactions.slice()); + } else { + (0,_asserts_js__WEBPACK_IMPORTED_MODULE_25__.assert)(typeof + /** @type {?} */ + options.interactions.getArray === 'function', 48); // Expected `interactions` to be an array or an `import("./Collection.js").Collection` + + interactions = + /** @type {Collection} */ + options.interactions; + } + } + + var overlays; + + if (options.overlays !== undefined) { + if (Array.isArray(options.overlays)) { + overlays = new _Collection_js__WEBPACK_IMPORTED_MODULE_3__["default"](options.overlays.slice()); + } else { + (0,_asserts_js__WEBPACK_IMPORTED_MODULE_25__.assert)(typeof + /** @type {?} */ + options.overlays.getArray === 'function', 49); // Expected `overlays` to be an array or an `import("./Collection.js").Collection` + + overlays = options.overlays; + } + } else { + overlays = new _Collection_js__WEBPACK_IMPORTED_MODULE_3__["default"](); + } + + return { + controls: controls, + interactions: interactions, + keyboardEventTarget: keyboardEventTarget, + overlays: overlays, + values: values + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (PluggableMap); + +/***/ }), +/* 88 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "getTilePriority": function() { return /* binding */ getTilePriority; } +/* harmony export */ }); +/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27); +/* harmony import */ var _structs_PriorityQueue_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(89); +/* harmony import */ var _TileState_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(34); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/TileQueue + */ + + + + + +/** + * @typedef {function(import("./Tile.js").default, string, import("./coordinate.js").Coordinate, number): number} PriorityFunction + */ + +var TileQueue = +/** @class */ +function (_super) { + __extends(TileQueue, _super); + /** + * @param {PriorityFunction} tilePriorityFunction Tile priority function. + * @param {function(): ?} tileChangeCallback Function called on each tile change event. + */ + + + function TileQueue(tilePriorityFunction, tileChangeCallback) { + var _this = _super.call(this, + /** + * @param {Array} element Element. + * @return {number} Priority. + */ + function (element) { + return tilePriorityFunction.apply(null, element); + }, + /** + * @param {Array} element Element. + * @return {string} Key. + */ + function (element) { + return ( + /** @type {import("./Tile.js").default} */ + element[0].getKey() + ); + }) || this; + /** @private */ + + + _this.boundHandleTileChange_ = _this.handleTileChange.bind(_this); + /** + * @private + * @type {function(): ?} + */ + + _this.tileChangeCallback_ = tileChangeCallback; + /** + * @private + * @type {number} + */ + + _this.tilesLoading_ = 0; + /** + * @private + * @type {!Object} + */ + + _this.tilesLoadingKeys_ = {}; + return _this; + } + /** + * @param {Array} element Element. + * @return {boolean} The element was added to the queue. + */ + + + TileQueue.prototype.enqueue = function (element) { + var added = _super.prototype.enqueue.call(this, element); + + if (added) { + var tile = element[0]; + tile.addEventListener(_events_EventType_js__WEBPACK_IMPORTED_MODULE_0__["default"].CHANGE, this.boundHandleTileChange_); + } + + return added; + }; + /** + * @return {number} Number of tiles loading. + */ + + + TileQueue.prototype.getTilesLoading = function () { + return this.tilesLoading_; + }; + /** + * @param {import("./events/Event.js").default} event Event. + * @protected + */ + + + TileQueue.prototype.handleTileChange = function (event) { + var tile = + /** @type {import("./Tile.js").default} */ + event.target; + var state = tile.getState(); + + if (state === _TileState_js__WEBPACK_IMPORTED_MODULE_1__["default"].LOADED || state === _TileState_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERROR || state === _TileState_js__WEBPACK_IMPORTED_MODULE_1__["default"].EMPTY) { + tile.removeEventListener(_events_EventType_js__WEBPACK_IMPORTED_MODULE_0__["default"].CHANGE, this.boundHandleTileChange_); + var tileKey = tile.getKey(); + + if (tileKey in this.tilesLoadingKeys_) { + delete this.tilesLoadingKeys_[tileKey]; + --this.tilesLoading_; + } + + this.tileChangeCallback_(); + } + }; + /** + * @param {number} maxTotalLoading Maximum number tiles to load simultaneously. + * @param {number} maxNewLoads Maximum number of new tiles to load. + */ + + + TileQueue.prototype.loadMoreTiles = function (maxTotalLoading, maxNewLoads) { + var newLoads = 0; + var state, tile, tileKey; + + while (this.tilesLoading_ < maxTotalLoading && newLoads < maxNewLoads && this.getCount() > 0) { + tile = + /** @type {import("./Tile.js").default} */ + this.dequeue()[0]; + tileKey = tile.getKey(); + state = tile.getState(); + + if (state === _TileState_js__WEBPACK_IMPORTED_MODULE_1__["default"].IDLE && !(tileKey in this.tilesLoadingKeys_)) { + this.tilesLoadingKeys_[tileKey] = true; + ++this.tilesLoading_; + ++newLoads; + tile.load(); + } + } + }; + + return TileQueue; +}(_structs_PriorityQueue_js__WEBPACK_IMPORTED_MODULE_2__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (TileQueue); +/** + * @param {import('./PluggableMap.js').FrameState} frameState Frame state. + * @param {import("./Tile.js").default} tile Tile. + * @param {string} tileSourceKey Tile source key. + * @param {import("./coordinate.js").Coordinate} tileCenter Tile center. + * @param {number} tileResolution Tile resolution. + * @return {number} Tile priority. + */ + +function getTilePriority(frameState, tile, tileSourceKey, tileCenter, tileResolution) { + // Filter out tiles at higher zoom levels than the current zoom level, or that + // are outside the visible extent. + if (!frameState || !(tileSourceKey in frameState.wantedTiles)) { + return _structs_PriorityQueue_js__WEBPACK_IMPORTED_MODULE_2__.DROP; + } + + if (!frameState.wantedTiles[tileSourceKey][tile.getKey()]) { + return _structs_PriorityQueue_js__WEBPACK_IMPORTED_MODULE_2__.DROP; + } // Prioritize the highest zoom level tiles closest to the focus. + // Tiles at higher zoom levels are prioritized using Math.log(tileResolution). + // Within a zoom level, tiles are prioritized by the distance in pixels between + // the center of the tile and the center of the viewport. The factor of 65536 + // means that the prioritization should behave as desired for tiles up to + // 65536 * Math.log(2) = 45426 pixels from the focus. + + + var center = frameState.viewState.center; + var deltaX = tileCenter[0] - center[0]; + var deltaY = tileCenter[1] - center[1]; + return 65536 * Math.log(tileResolution) + Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution; +} + +/***/ }), +/* 89 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "DROP": function() { return /* binding */ DROP; } +/* harmony export */ }); +/* harmony import */ var _asserts_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14); +/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7); +/** + * @module ol/structs/PriorityQueue + */ + + +/** + * @type {number} + */ + +var DROP = Infinity; +/** + * @classdesc + * Priority queue. + * + * The implementation is inspired from the Closure Library's Heap class and + * Python's heapq module. + * + * See https://github.com/google/closure-library/blob/master/closure/goog/structs/heap.js + * and https://hg.python.org/cpython/file/2.7/Lib/heapq.py. + * + * @template T + */ + +var PriorityQueue = +/** @class */ +function () { + /** + * @param {function(T): number} priorityFunction Priority function. + * @param {function(T): string} keyFunction Key function. + */ + function PriorityQueue(priorityFunction, keyFunction) { + /** + * @type {function(T): number} + * @private + */ + this.priorityFunction_ = priorityFunction; + /** + * @type {function(T): string} + * @private + */ + + this.keyFunction_ = keyFunction; + /** + * @type {Array} + * @private + */ + + this.elements_ = []; + /** + * @type {Array} + * @private + */ + + this.priorities_ = []; + /** + * @type {!Object} + * @private + */ + + this.queuedElements_ = {}; + } + /** + * FIXME empty description for jsdoc + */ + + + PriorityQueue.prototype.clear = function () { + this.elements_.length = 0; + this.priorities_.length = 0; + (0,_obj_js__WEBPACK_IMPORTED_MODULE_0__.clear)(this.queuedElements_); + }; + /** + * Remove and return the highest-priority element. O(log N). + * @return {T} Element. + */ + + + PriorityQueue.prototype.dequeue = function () { + var elements = this.elements_; + var priorities = this.priorities_; + var element = elements[0]; + + if (elements.length == 1) { + elements.length = 0; + priorities.length = 0; + } else { + elements[0] = elements.pop(); + priorities[0] = priorities.pop(); + this.siftUp_(0); + } + + var elementKey = this.keyFunction_(element); + delete this.queuedElements_[elementKey]; + return element; + }; + /** + * Enqueue an element. O(log N). + * @param {T} element Element. + * @return {boolean} The element was added to the queue. + */ + + + PriorityQueue.prototype.enqueue = function (element) { + (0,_asserts_js__WEBPACK_IMPORTED_MODULE_1__.assert)(!(this.keyFunction_(element) in this.queuedElements_), 31); // Tried to enqueue an `element` that was already added to the queue + + var priority = this.priorityFunction_(element); + + if (priority != DROP) { + this.elements_.push(element); + this.priorities_.push(priority); + this.queuedElements_[this.keyFunction_(element)] = true; + this.siftDown_(0, this.elements_.length - 1); + return true; + } + + return false; + }; + /** + * @return {number} Count. + */ + + + PriorityQueue.prototype.getCount = function () { + return this.elements_.length; + }; + /** + * Gets the index of the left child of the node at the given index. + * @param {number} index The index of the node to get the left child for. + * @return {number} The index of the left child. + * @private + */ + + + PriorityQueue.prototype.getLeftChildIndex_ = function (index) { + return index * 2 + 1; + }; + /** + * Gets the index of the right child of the node at the given index. + * @param {number} index The index of the node to get the right child for. + * @return {number} The index of the right child. + * @private + */ + + + PriorityQueue.prototype.getRightChildIndex_ = function (index) { + return index * 2 + 2; + }; + /** + * Gets the index of the parent of the node at the given index. + * @param {number} index The index of the node to get the parent for. + * @return {number} The index of the parent. + * @private + */ + + + PriorityQueue.prototype.getParentIndex_ = function (index) { + return index - 1 >> 1; + }; + /** + * Make this a heap. O(N). + * @private + */ + + + PriorityQueue.prototype.heapify_ = function () { + var i; + + for (i = (this.elements_.length >> 1) - 1; i >= 0; i--) { + this.siftUp_(i); + } + }; + /** + * @return {boolean} Is empty. + */ + + + PriorityQueue.prototype.isEmpty = function () { + return this.elements_.length === 0; + }; + /** + * @param {string} key Key. + * @return {boolean} Is key queued. + */ + + + PriorityQueue.prototype.isKeyQueued = function (key) { + return key in this.queuedElements_; + }; + /** + * @param {T} element Element. + * @return {boolean} Is queued. + */ + + + PriorityQueue.prototype.isQueued = function (element) { + return this.isKeyQueued(this.keyFunction_(element)); + }; + /** + * @param {number} index The index of the node to move down. + * @private + */ + + + PriorityQueue.prototype.siftUp_ = function (index) { + var elements = this.elements_; + var priorities = this.priorities_; + var count = elements.length; + var element = elements[index]; + var priority = priorities[index]; + var startIndex = index; + + while (index < count >> 1) { + var lIndex = this.getLeftChildIndex_(index); + var rIndex = this.getRightChildIndex_(index); + var smallerChildIndex = rIndex < count && priorities[rIndex] < priorities[lIndex] ? rIndex : lIndex; + elements[index] = elements[smallerChildIndex]; + priorities[index] = priorities[smallerChildIndex]; + index = smallerChildIndex; + } + + elements[index] = element; + priorities[index] = priority; + this.siftDown_(startIndex, index); + }; + /** + * @param {number} startIndex The index of the root. + * @param {number} index The index of the node to move up. + * @private + */ + + + PriorityQueue.prototype.siftDown_ = function (startIndex, index) { + var elements = this.elements_; + var priorities = this.priorities_; + var element = elements[index]; + var priority = priorities[index]; + + while (index > startIndex) { + var parentIndex = this.getParentIndex_(index); + + if (priorities[parentIndex] > priority) { + elements[index] = elements[parentIndex]; + priorities[index] = priorities[parentIndex]; + index = parentIndex; + } else { + break; + } + } + + elements[index] = element; + priorities[index] = priority; + }; + /** + * FIXME empty description for jsdoc + */ + + + PriorityQueue.prototype.reprioritize = function () { + var priorityFunction = this.priorityFunction_; + var elements = this.elements_; + var priorities = this.priorities_; + var index = 0; + var n = elements.length; + var element, i, priority; + + for (i = 0; i < n; ++i) { + element = elements[i]; + priority = priorityFunction(element); + + if (priority == DROP) { + delete this.queuedElements_[this.keyFunction_(element)]; + } else { + priorities[index] = priority; + elements[index++] = element; + } + } + + elements.length = index; + priorities.length = index; + this.heapify_(); + }; + + return PriorityQueue; +}(); + +/* harmony default export */ __webpack_exports__["default"] = (PriorityQueue); + +/***/ }), +/* 90 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * @module ol/MapProperty + */ + +/** + * @enum {string} + */ +/* harmony default export */ __webpack_exports__["default"] = ({ + LAYERGROUP: 'layergroup', + SIZE: 'size', + TARGET: 'target', + VIEW: 'view' +}); + +/***/ }), +/* 91 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "createCenterConstraint": function() { return /* binding */ createCenterConstraint; }, +/* harmony export */ "createResolutionConstraint": function() { return /* binding */ createResolutionConstraint; }, +/* harmony export */ "createRotationConstraint": function() { return /* binding */ createRotationConstraint; }, +/* harmony export */ "isNoopAnimation": function() { return /* binding */ isNoopAnimation; } +/* harmony export */ }); +/* harmony import */ var _Object_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(24); +/* harmony import */ var _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(10); +/* harmony import */ var _proj_Units_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(3); +/* harmony import */ var _ViewHint_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(92); +/* harmony import */ var _ViewProperty_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(93); +/* harmony import */ var _tilegrid_common_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(96); +/* harmony import */ var _proj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(30); +/* harmony import */ var _coordinate_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(17); +/* harmony import */ var _asserts_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(14); +/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7); +/* harmony import */ var _centerconstraint_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(94); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9); +/* harmony import */ var _resolutionconstraint_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(95); +/* harmony import */ var _rotationconstraint_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(97); +/* harmony import */ var _easing_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(36); +/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(11); +/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(31); +/* harmony import */ var _geom_Polygon_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(39); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/View + */ + + + + + + + + + + + + + + + + + + + + + + + + +/** + * An animation configuration + * + * @typedef {Object} Animation + * @property {import("./coordinate.js").Coordinate} [sourceCenter] Source center. + * @property {import("./coordinate.js").Coordinate} [targetCenter] Target center. + * @property {number} [sourceResolution] Source resolution. + * @property {number} [targetResolution] Target resolution. + * @property {number} [sourceRotation] Source rotation. + * @property {number} [targetRotation] Target rotation. + * @property {import("./coordinate.js").Coordinate} [anchor] Anchor. + * @property {number} start Start. + * @property {number} duration Duration. + * @property {boolean} complete Complete. + * @property {function(number):number} easing Easing. + * @property {function(boolean):void} callback Callback. + */ + +/** + * @typedef {Object} Constraints + * @property {import("./centerconstraint.js").Type} center Center. + * @property {import("./resolutionconstraint.js").Type} resolution Resolution. + * @property {import("./rotationconstraint.js").Type} rotation Rotation. + */ + +/** + * @typedef {Object} FitOptions + * @property {import("./size.js").Size} [size] The size in pixels of the box to fit + * the extent into. Default is the current size of the first map in the DOM that + * uses this view, or `[100, 100]` if no such map is found. + * @property {!Array} [padding=[0, 0, 0, 0]] Padding (in pixels) to be + * cleared inside the view. Values in the array are top, right, bottom and left + * padding. + * @property {boolean} [nearest=false] If the view `constrainResolution` option is `true`, + * get the nearest extent instead of the closest that actually fits the view. + * @property {number} [minResolution=0] Minimum resolution that we zoom to. + * @property {number} [maxZoom] Maximum zoom level that we zoom to. If + * `minResolution` is given, this property is ignored. + * @property {number} [duration] The duration of the animation in milliseconds. + * By default, there is no animation to the target extent. + * @property {function(number):number} [easing] The easing function used during + * the animation (defaults to {@link module:ol/easing.inAndOut}). + * The function will be called for each frame with a number representing a + * fraction of the animation's duration. The function should return a number + * between 0 and 1 representing the progress toward the destination state. + * @property {function(boolean):void} [callback] Function called when the view is in + * its final position. The callback will be called with `true` if the animation + * series completed on its own or `false` if it was cancelled. + */ + +/** + * @typedef {Object} ViewOptions + * @property {import("./coordinate.js").Coordinate} [center] The initial center for + * the view. If a user projection is not set, the coordinate system for the center is + * specified with the `projection` option. Layer sources will not be fetched if this + * is not set, but the center can be set later with {@link #setCenter}. + * @property {boolean|number} [constrainRotation=true] Rotation constraint. + * `false` means no constraint. `true` means no constraint, but snap to zero + * near zero. A number constrains the rotation to that number of values. For + * example, `4` will constrain the rotation to 0, 90, 180, and 270 degrees. + * @property {boolean} [enableRotation=true] Enable rotation. + * If `false`, a rotation constraint that always sets the rotation to zero is + * used. The `constrainRotation` option has no effect if `enableRotation` is + * `false`. + * @property {import("./extent.js").Extent} [extent] The extent that constrains the + * view, in other words, nothing outside of this extent can be visible on the map. + * @property {boolean} [constrainOnlyCenter=false] If true, the extent + * constraint will only apply to the view center and not the whole extent. + * @property {boolean} [smoothExtentConstraint=true] If true, the extent + * constraint will be applied smoothly, i.e. allow the view to go slightly outside + * of the given `extent`. + * @property {number} [maxResolution] The maximum resolution used to determine + * the resolution constraint. It is used together with `minResolution` (or + * `maxZoom`) and `zoomFactor`. If unspecified it is calculated in such a way + * that the projection's validity extent fits in a 256x256 px tile. If the + * projection is Spherical Mercator (the default) then `maxResolution` defaults + * to `40075016.68557849 / 256 = 156543.03392804097`. + * @property {number} [minResolution] The minimum resolution used to determine + * the resolution constraint. It is used together with `maxResolution` (or + * `minZoom`) and `zoomFactor`. If unspecified it is calculated assuming 29 + * zoom levels (with a factor of 2). If the projection is Spherical Mercator + * (the default) then `minResolution` defaults to + * `40075016.68557849 / 256 / Math.pow(2, 28) = 0.0005831682455839253`. + * @property {number} [maxZoom=28] The maximum zoom level used to determine the + * resolution constraint. It is used together with `minZoom` (or + * `maxResolution`) and `zoomFactor`. Note that if `minResolution` is also + * provided, it is given precedence over `maxZoom`. + * @property {number} [minZoom=0] The minimum zoom level used to determine the + * resolution constraint. It is used together with `maxZoom` (or + * `minResolution`) and `zoomFactor`. Note that if `maxResolution` is also + * provided, it is given precedence over `minZoom`. + * @property {boolean} [multiWorld=false] If `false` the view is constrained so + * only one world is visible, and you cannot pan off the edge. If `true` the map + * may show multiple worlds at low zoom levels. Only used if the `projection` is + * global. Note that if `extent` is also provided it is given precedence. + * @property {boolean} [constrainResolution=false] If true, the view will always + * animate to the closest zoom level after an interaction; false means + * intermediary zoom levels are allowed. + * @property {boolean} [smoothResolutionConstraint=true] If true, the resolution + * min/max values will be applied smoothly, i. e. allow the view to exceed slightly + * the given resolution or zoom bounds. + * @property {boolean} [showFullExtent=false] Allow the view to be zoomed out to + * show the full configured extent. By default, when a view is configured with an + * extent, users will not be able to zoom out so the viewport exceeds the extent in + * either dimension. This means the full extent may not be visible if the viewport + * is taller or wider than the aspect ratio of the configured extent. If + * showFullExtent is true, the user will be able to zoom out so that the viewport + * exceeds the height or width of the configured extent, but not both, allowing the + * full extent to be shown. + * @property {import("./proj.js").ProjectionLike} [projection='EPSG:3857'] The + * projection. The default is Spherical Mercator. + * @property {number} [resolution] The initial resolution for the view. The + * units are `projection` units per pixel (e.g. meters per pixel). An + * alternative to setting this is to set `zoom`. Layer sources will not be + * fetched if neither this nor `zoom` are defined, but they can be set later + * with {@link #setZoom} or {@link #setResolution}. + * @property {Array} [resolutions] Resolutions that determine the + * zoom levels if specified. The index in the array corresponds to the zoom level, + * therefore the resolution values have to be in descending order. It also constrains + * the resolution by the minimum and maximum value. If set the `maxResolution`, + * `minResolution`, `minZoom`, `maxZoom`, and `zoomFactor` options are ignored. + * @property {number} [rotation=0] The initial rotation for the view in radians + * (positive rotation clockwise, 0 means North). + * @property {number} [zoom] Only used if `resolution` is not defined. Zoom + * level used to calculate the initial resolution for the view. + * @property {number} [zoomFactor=2] The zoom factor used to compute the + * corresponding resolution. + * @property {!Array} [padding=[0, 0, 0, 0]] Padding (in css pixels). + * If the map viewport is partially covered with other content (overlays) along + * its edges, this setting allows to shift the center of the viewport away from + * that content. The order of the values is top, right, bottom, left. + */ + +/** + * @typedef {Object} AnimationOptions + * @property {import("./coordinate.js").Coordinate} [center] The center of the view at the end of + * the animation. + * @property {number} [zoom] The zoom level of the view at the end of the + * animation. This takes precedence over `resolution`. + * @property {number} [resolution] The resolution of the view at the end + * of the animation. If `zoom` is also provided, this option will be ignored. + * @property {number} [rotation] The rotation of the view at the end of + * the animation. + * @property {import("./coordinate.js").Coordinate} [anchor] Optional anchor to remain fixed + * during a rotation or resolution animation. + * @property {number} [duration=1000] The duration of the animation in milliseconds. + * @property {function(number):number} [easing] The easing function used + * during the animation (defaults to {@link module:ol/easing.inAndOut}). + * The function will be called for each frame with a number representing a + * fraction of the animation's duration. The function should return a number + * between 0 and 1 representing the progress toward the destination state. + */ + +/** + * @typedef {Object} State + * @property {import("./coordinate.js").Coordinate} center Center. + * @property {import("./proj/Projection.js").default} projection Projection. + * @property {number} resolution Resolution. + * @property {import("./coordinate.js").Coordinate} [nextCenter] The next center during an animation series. + * @property {number} [nextResolution] The next resolution during an animation series. + * @property {number} [nextRotation] The next rotation during an animation series. + * @property {number} rotation Rotation. + * @property {number} zoom Zoom. + */ + +/** + * Default min zoom level for the map view. + * @type {number} + */ + +var DEFAULT_MIN_ZOOM = 0; +/** + * @typedef {import("./ObjectEventType").Types|'change:center'|'change:resolution'|'change:rotation'} ViewObjectEventTypes + */ + +/*** + * @template Return + * @typedef {import("./Observable").OnSignature & + * import("./Observable").OnSignature & + * import("./Observable").CombinedOnSignature} ViewOnSignature + */ + +/** + * @classdesc + * A View object represents a simple 2D view of the map. + * + * This is the object to act upon to change the center, resolution, + * and rotation of the map. + * + * A View has a `projection`. The projection determines the + * coordinate system of the center, and its units determine the units of the + * resolution (projection units per pixel). The default projection is + * Spherical Mercator (EPSG:3857). + * + * ### The view states + * + * A View is determined by three states: `center`, `resolution`, + * and `rotation`. Each state has a corresponding getter and setter, e.g. + * `getCenter` and `setCenter` for the `center` state. + * + * The `zoom` state is actually not saved on the view: all computations + * internally use the `resolution` state. Still, the `setZoom` and `getZoom` + * methods are available, as well as `getResolutionForZoom` and + * `getZoomForResolution` to switch from one system to the other. + * + * ### The constraints + * + * `setCenter`, `setResolution` and `setRotation` can be used to change the + * states of the view, but any constraint defined in the constructor will + * be applied along the way. + * + * A View object can have a *resolution constraint*, a *rotation constraint* + * and a *center constraint*. + * + * The *resolution constraint* typically restricts min/max values and + * snaps to specific resolutions. It is determined by the following + * options: `resolutions`, `maxResolution`, `maxZoom` and `zoomFactor`. + * If `resolutions` is set, the other three options are ignored. See + * documentation for each option for more information. By default, the view + * only has a min/max restriction and allow intermediary zoom levels when + * pinch-zooming for example. + * + * The *rotation constraint* snaps to specific angles. It is determined + * by the following options: `enableRotation` and `constrainRotation`. + * By default rotation is allowed and its value is snapped to zero when approaching the + * horizontal. + * + * The *center constraint* is determined by the `extent` option. By + * default the view center is not constrained at all. + * + * ### Changing the view state + * + * It is important to note that `setZoom`, `setResolution`, `setCenter` and + * `setRotation` are subject to the above mentioned constraints. As such, it + * may sometimes not be possible to know in advance the resulting state of the + * View. For example, calling `setResolution(10)` does not guarantee that + * `getResolution()` will return `10`. + * + * A consequence of this is that, when applying a delta on the view state, one + * should use `adjustCenter`, `adjustRotation`, `adjustZoom` and `adjustResolution` + * rather than the corresponding setters. This will let view do its internal + * computations. Besides, the `adjust*` methods also take an `opt_anchor` + * argument which allows specifying an origin for the transformation. + * + * ### Interacting with the view + * + * View constraints are usually only applied when the view is *at rest*, meaning that + * no interaction or animation is ongoing. As such, if the user puts the view in a + * state that is not equivalent to a constrained one (e.g. rotating the view when + * the snap angle is 0), an animation will be triggered at the interaction end to + * put back the view to a stable state; + * + * @api + */ + +var View = +/** @class */ +function (_super) { + __extends(View, _super); + /** + * @param {ViewOptions} [opt_options] View options. + */ + + + function View(opt_options) { + var _this = _super.call(this) || this; + /*** + * @type {ViewOnSignature} + */ + + + _this.on; + /*** + * @type {ViewOnSignature} + */ + + _this.once; + /*** + * @type {ViewOnSignature} + */ + + _this.un; + var options = (0,_obj_js__WEBPACK_IMPORTED_MODULE_1__.assign)({}, opt_options); + /** + * @private + * @type {Array} + */ + + _this.hints_ = [0, 0]; + /** + * @private + * @type {Array>} + */ + + _this.animations_ = []; + /** + * @private + * @type {number|undefined} + */ + + _this.updateAnimationKey_; + /** + * @private + * @const + * @type {import("./proj/Projection.js").default} + */ + + _this.projection_ = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.createProjection)(options.projection, 'EPSG:3857'); + /** + * @private + * @type {import("./size.js").Size} + */ + + _this.viewportSize_ = [100, 100]; + /** + * @private + * @type {import("./coordinate.js").Coordinate|undefined} + */ + + _this.targetCenter_ = null; + /** + * @private + * @type {number|undefined} + */ + + _this.targetResolution_; + /** + * @private + * @type {number|undefined} + */ + + _this.targetRotation_; + /** + * @private + * @type {import("./coordinate.js").Coordinate} + */ + + _this.nextCenter_ = null; + /** + * @private + * @type {number} + */ + + _this.nextResolution_; + /** + * @private + * @type {number} + */ + + _this.nextRotation_; + /** + * @private + * @type {import("./coordinate.js").Coordinate|undefined} + */ + + _this.cancelAnchor_ = undefined; + + if (options.center) { + options.center = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserCoordinate)(options.center, _this.projection_); + } + + if (options.extent) { + options.extent = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserExtent)(options.extent, _this.projection_); + } + + _this.applyOptions_(options); + + return _this; + } + /** + * Set up the view with the given options. + * @param {ViewOptions} options View options. + */ + + + View.prototype.applyOptions_ = function (options) { + /** + * @type {Object} + */ + var properties = {}; + var resolutionConstraintInfo = createResolutionConstraint(options); + /** + * @private + * @type {number} + */ + + this.maxResolution_ = resolutionConstraintInfo.maxResolution; + /** + * @private + * @type {number} + */ + + this.minResolution_ = resolutionConstraintInfo.minResolution; + /** + * @private + * @type {number} + */ + + this.zoomFactor_ = resolutionConstraintInfo.zoomFactor; + /** + * @private + * @type {Array|undefined} + */ + + this.resolutions_ = options.resolutions; + /** + * @type {Array|undefined} + * @private + */ + + this.padding_ = options.padding; + /** + * @private + * @type {number} + */ + + this.minZoom_ = resolutionConstraintInfo.minZoom; + var centerConstraint = createCenterConstraint(options); + var resolutionConstraint = resolutionConstraintInfo.constraint; + var rotationConstraint = createRotationConstraint(options); + /** + * @private + * @type {Constraints} + */ + + this.constraints_ = { + center: centerConstraint, + resolution: resolutionConstraint, + rotation: rotationConstraint + }; + this.setRotation(options.rotation !== undefined ? options.rotation : 0); + this.setCenterInternal(options.center !== undefined ? options.center : null); + + if (options.resolution !== undefined) { + this.setResolution(options.resolution); + } else if (options.zoom !== undefined) { + this.setZoom(options.zoom); + } + + this.setProperties(properties); + /** + * @private + * @type {ViewOptions} + */ + + this.options_ = options; + }; + + Object.defineProperty(View.prototype, "padding", { + /** + * Padding (in css pixels). + * If the map viewport is partially covered with other content (overlays) along + * its edges, this setting allows to shift the center of the viewport away from that + * content. The order of the values in the array is top, right, bottom, left. + * The default is no padding, which is equivalent to `[0, 0, 0, 0]`. + * @type {Array|undefined} + * @api + */ + get: function get() { + return this.padding_; + }, + set: function set(padding) { + var oldPadding = this.padding_; + this.padding_ = padding; + var center = this.getCenter(); + + if (center) { + var newPadding = padding || [0, 0, 0, 0]; + oldPadding = oldPadding || [0, 0, 0, 0]; + var resolution = this.getResolution(); + var offsetX = resolution / 2 * (newPadding[3] - oldPadding[3] + oldPadding[1] - newPadding[1]); + var offsetY = resolution / 2 * (newPadding[0] - oldPadding[0] + oldPadding[2] - newPadding[2]); + this.setCenterInternal([center[0] + offsetX, center[1] - offsetY]); + } + }, + enumerable: false, + configurable: true + }); + /** + * Get an updated version of the view options used to construct the view. The + * current resolution (or zoom), center, and rotation are applied to any stored + * options. The provided options can be used to apply new min/max zoom or + * resolution limits. + * @param {ViewOptions} newOptions New options to be applied. + * @return {ViewOptions} New options updated with the current view state. + */ + + View.prototype.getUpdatedOptions_ = function (newOptions) { + var options = (0,_obj_js__WEBPACK_IMPORTED_MODULE_1__.assign)({}, this.options_); // preserve resolution (or zoom) + + if (options.resolution !== undefined) { + options.resolution = this.getResolution(); + } else { + options.zoom = this.getZoom(); + } // preserve center + + + options.center = this.getCenterInternal(); // preserve rotation + + options.rotation = this.getRotation(); + return (0,_obj_js__WEBPACK_IMPORTED_MODULE_1__.assign)({}, options, newOptions); + }; + /** + * Animate the view. The view's center, zoom (or resolution), and rotation + * can be animated for smooth transitions between view states. For example, + * to animate the view to a new zoom level: + * + * view.animate({zoom: view.getZoom() + 1}); + * + * By default, the animation lasts one second and uses in-and-out easing. You + * can customize this behavior by including `duration` (in milliseconds) and + * `easing` options (see {@link module:ol/easing}). + * + * To chain together multiple animations, call the method with multiple + * animation objects. For example, to first zoom and then pan: + * + * view.animate({zoom: 10}, {center: [0, 0]}); + * + * If you provide a function as the last argument to the animate method, it + * will get called at the end of an animation series. The callback will be + * called with `true` if the animation series completed on its own or `false` + * if it was cancelled. + * + * Animations are cancelled by user interactions (e.g. dragging the map) or by + * calling `view.setCenter()`, `view.setResolution()`, or `view.setRotation()` + * (or another method that calls one of these). + * + * @param {...(AnimationOptions|function(boolean): void)} var_args Animation + * options. Multiple animations can be run in series by passing multiple + * options objects. To run multiple animations in parallel, call the method + * multiple times. An optional callback can be provided as a final + * argument. The callback will be called with a boolean indicating whether + * the animation completed without being cancelled. + * @api + */ + + + View.prototype.animate = function (var_args) { + if (this.isDef() && !this.getAnimating()) { + this.resolveConstraints(0); + } + + var args = new Array(arguments.length); + + for (var i = 0; i < args.length; ++i) { + var options = arguments[i]; + + if (options.center) { + options = (0,_obj_js__WEBPACK_IMPORTED_MODULE_1__.assign)({}, options); + options.center = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserCoordinate)(options.center, this.getProjection()); + } + + if (options.anchor) { + options = (0,_obj_js__WEBPACK_IMPORTED_MODULE_1__.assign)({}, options); + options.anchor = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserCoordinate)(options.anchor, this.getProjection()); + } + + args[i] = options; + } + + this.animateInternal.apply(this, args); + }; + /** + * @param {...(AnimationOptions|function(boolean): void)} var_args Animation options. + */ + + + View.prototype.animateInternal = function (var_args) { + var animationCount = arguments.length; + var callback; + + if (animationCount > 1 && typeof arguments[animationCount - 1] === 'function') { + callback = arguments[animationCount - 1]; + --animationCount; + } + + var i = 0; + + for (; i < animationCount && !this.isDef(); ++i) { + // if view properties are not yet set, shortcut to the final state + var state = arguments[i]; + + if (state.center) { + this.setCenterInternal(state.center); + } + + if (state.zoom !== undefined) { + this.setZoom(state.zoom); + } else if (state.resolution) { + this.setResolution(state.resolution); + } + + if (state.rotation !== undefined) { + this.setRotation(state.rotation); + } + } + + if (i === animationCount) { + if (callback) { + animationCallback(callback, true); + } + + return; + } + + var start = Date.now(); + var center = this.targetCenter_.slice(); + var resolution = this.targetResolution_; + var rotation = this.targetRotation_; + var series = []; + + for (; i < animationCount; ++i) { + var options = + /** @type {AnimationOptions} */ + arguments[i]; + var animation = { + start: start, + complete: false, + anchor: options.anchor, + duration: options.duration !== undefined ? options.duration : 1000, + easing: options.easing || _easing_js__WEBPACK_IMPORTED_MODULE_2__.inAndOut, + callback: callback + }; + + if (options.center) { + animation.sourceCenter = center; + animation.targetCenter = options.center.slice(); + center = animation.targetCenter; + } + + if (options.zoom !== undefined) { + animation.sourceResolution = resolution; + animation.targetResolution = this.getResolutionForZoom(options.zoom); + resolution = animation.targetResolution; + } else if (options.resolution) { + animation.sourceResolution = resolution; + animation.targetResolution = options.resolution; + resolution = animation.targetResolution; + } + + if (options.rotation !== undefined) { + animation.sourceRotation = rotation; + var delta = (0,_math_js__WEBPACK_IMPORTED_MODULE_3__.modulo)(options.rotation - rotation + Math.PI, 2 * Math.PI) - Math.PI; + animation.targetRotation = rotation + delta; + rotation = animation.targetRotation; + } // check if animation is a no-op + + + if (isNoopAnimation(animation)) { + animation.complete = true; // we still push it onto the series for callback handling + } else { + start += animation.duration; + } + + series.push(animation); + } + + this.animations_.push(series); + this.setHint(_ViewHint_js__WEBPACK_IMPORTED_MODULE_4__["default"].ANIMATING, 1); + this.updateAnimations_(); + }; + /** + * Determine if the view is being animated. + * @return {boolean} The view is being animated. + * @api + */ + + + View.prototype.getAnimating = function () { + return this.hints_[_ViewHint_js__WEBPACK_IMPORTED_MODULE_4__["default"].ANIMATING] > 0; + }; + /** + * Determine if the user is interacting with the view, such as panning or zooming. + * @return {boolean} The view is being interacted with. + * @api + */ + + + View.prototype.getInteracting = function () { + return this.hints_[_ViewHint_js__WEBPACK_IMPORTED_MODULE_4__["default"].INTERACTING] > 0; + }; + /** + * Cancel any ongoing animations. + * @api + */ + + + View.prototype.cancelAnimations = function () { + this.setHint(_ViewHint_js__WEBPACK_IMPORTED_MODULE_4__["default"].ANIMATING, -this.hints_[_ViewHint_js__WEBPACK_IMPORTED_MODULE_4__["default"].ANIMATING]); + var anchor; + + for (var i = 0, ii = this.animations_.length; i < ii; ++i) { + var series = this.animations_[i]; + + if (series[0].callback) { + animationCallback(series[0].callback, false); + } + + if (!anchor) { + for (var j = 0, jj = series.length; j < jj; ++j) { + var animation = series[j]; + + if (!animation.complete) { + anchor = animation.anchor; + break; + } + } + } + } + + this.animations_.length = 0; + this.cancelAnchor_ = anchor; + this.nextCenter_ = null; + this.nextResolution_ = NaN; + this.nextRotation_ = NaN; + }; + /** + * Update all animations. + */ + + + View.prototype.updateAnimations_ = function () { + if (this.updateAnimationKey_ !== undefined) { + cancelAnimationFrame(this.updateAnimationKey_); + this.updateAnimationKey_ = undefined; + } + + if (!this.getAnimating()) { + return; + } + + var now = Date.now(); + var more = false; + + for (var i = this.animations_.length - 1; i >= 0; --i) { + var series = this.animations_[i]; + var seriesComplete = true; + + for (var j = 0, jj = series.length; j < jj; ++j) { + var animation = series[j]; + + if (animation.complete) { + continue; + } + + var elapsed = now - animation.start; + var fraction = animation.duration > 0 ? elapsed / animation.duration : 1; + + if (fraction >= 1) { + animation.complete = true; + fraction = 1; + } else { + seriesComplete = false; + } + + var progress = animation.easing(fraction); + + if (animation.sourceCenter) { + var x0 = animation.sourceCenter[0]; + var y0 = animation.sourceCenter[1]; + var x1 = animation.targetCenter[0]; + var y1 = animation.targetCenter[1]; + this.nextCenter_ = animation.targetCenter; + var x = x0 + progress * (x1 - x0); + var y = y0 + progress * (y1 - y0); + this.targetCenter_ = [x, y]; + } + + if (animation.sourceResolution && animation.targetResolution) { + var resolution = progress === 1 ? animation.targetResolution : animation.sourceResolution + progress * (animation.targetResolution - animation.sourceResolution); + + if (animation.anchor) { + var size = this.getViewportSize_(this.getRotation()); + var constrainedResolution = this.constraints_.resolution(resolution, 0, size, true); + this.targetCenter_ = this.calculateCenterZoom(constrainedResolution, animation.anchor); + } + + this.nextResolution_ = animation.targetResolution; + this.targetResolution_ = resolution; + this.applyTargetState_(true); + } + + if (animation.sourceRotation !== undefined && animation.targetRotation !== undefined) { + var rotation = progress === 1 ? (0,_math_js__WEBPACK_IMPORTED_MODULE_3__.modulo)(animation.targetRotation + Math.PI, 2 * Math.PI) - Math.PI : animation.sourceRotation + progress * (animation.targetRotation - animation.sourceRotation); + + if (animation.anchor) { + var constrainedRotation = this.constraints_.rotation(rotation, true); + this.targetCenter_ = this.calculateCenterRotate(constrainedRotation, animation.anchor); + } + + this.nextRotation_ = animation.targetRotation; + this.targetRotation_ = rotation; + } + + this.applyTargetState_(true); + more = true; + + if (!animation.complete) { + break; + } + } + + if (seriesComplete) { + this.animations_[i] = null; + this.setHint(_ViewHint_js__WEBPACK_IMPORTED_MODULE_4__["default"].ANIMATING, -1); + this.nextCenter_ = null; + this.nextResolution_ = NaN; + this.nextRotation_ = NaN; + var callback = series[0].callback; + + if (callback) { + animationCallback(callback, true); + } + } + } // prune completed series + + + this.animations_ = this.animations_.filter(Boolean); + + if (more && this.updateAnimationKey_ === undefined) { + this.updateAnimationKey_ = requestAnimationFrame(this.updateAnimations_.bind(this)); + } + }; + /** + * @param {number} rotation Target rotation. + * @param {import("./coordinate.js").Coordinate} anchor Rotation anchor. + * @return {import("./coordinate.js").Coordinate|undefined} Center for rotation and anchor. + */ + + + View.prototype.calculateCenterRotate = function (rotation, anchor) { + var center; + var currentCenter = this.getCenterInternal(); + + if (currentCenter !== undefined) { + center = [currentCenter[0] - anchor[0], currentCenter[1] - anchor[1]]; + (0,_coordinate_js__WEBPACK_IMPORTED_MODULE_5__.rotate)(center, rotation - this.getRotation()); + (0,_coordinate_js__WEBPACK_IMPORTED_MODULE_5__.add)(center, anchor); + } + + return center; + }; + /** + * @param {number} resolution Target resolution. + * @param {import("./coordinate.js").Coordinate} anchor Zoom anchor. + * @return {import("./coordinate.js").Coordinate|undefined} Center for resolution and anchor. + */ + + + View.prototype.calculateCenterZoom = function (resolution, anchor) { + var center; + var currentCenter = this.getCenterInternal(); + var currentResolution = this.getResolution(); + + if (currentCenter !== undefined && currentResolution !== undefined) { + var x = anchor[0] - resolution * (anchor[0] - currentCenter[0]) / currentResolution; + var y = anchor[1] - resolution * (anchor[1] - currentCenter[1]) / currentResolution; + center = [x, y]; + } + + return center; + }; + /** + * Returns the current viewport size. + * @private + * @param {number} [opt_rotation] Take into account the rotation of the viewport when giving the size + * @return {import("./size.js").Size} Viewport size or `[100, 100]` when no viewport is found. + */ + + + View.prototype.getViewportSize_ = function (opt_rotation) { + var size = this.viewportSize_; + + if (opt_rotation) { + var w = size[0]; + var h = size[1]; + return [Math.abs(w * Math.cos(opt_rotation)) + Math.abs(h * Math.sin(opt_rotation)), Math.abs(w * Math.sin(opt_rotation)) + Math.abs(h * Math.cos(opt_rotation))]; + } else { + return size; + } + }; + /** + * Stores the viewport size on the view. The viewport size is not read every time from the DOM + * to avoid performance hit and layout reflow. + * This should be done on map size change. + * Note: the constraints are not resolved during an animation to avoid stopping it + * @param {import("./size.js").Size} [opt_size] Viewport size; if undefined, [100, 100] is assumed + */ + + + View.prototype.setViewportSize = function (opt_size) { + this.viewportSize_ = Array.isArray(opt_size) ? opt_size.slice() : [100, 100]; + + if (!this.getAnimating()) { + this.resolveConstraints(0); + } + }; + /** + * Get the view center. + * @return {import("./coordinate.js").Coordinate|undefined} The center of the view. + * @observable + * @api + */ + + + View.prototype.getCenter = function () { + var center = this.getCenterInternal(); + + if (!center) { + return center; + } + + return (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.toUserCoordinate)(center, this.getProjection()); + }; + /** + * Get the view center without transforming to user projection. + * @return {import("./coordinate.js").Coordinate|undefined} The center of the view. + */ + + + View.prototype.getCenterInternal = function () { + return ( + /** @type {import("./coordinate.js").Coordinate|undefined} */ + this.get(_ViewProperty_js__WEBPACK_IMPORTED_MODULE_6__["default"].CENTER) + ); + }; + /** + * @return {Constraints} Constraints. + */ + + + View.prototype.getConstraints = function () { + return this.constraints_; + }; + /** + * @return {boolean} Resolution constraint is set + */ + + + View.prototype.getConstrainResolution = function () { + return this.options_.constrainResolution; + }; + /** + * @param {Array} [opt_hints] Destination array. + * @return {Array} Hint. + */ + + + View.prototype.getHints = function (opt_hints) { + if (opt_hints !== undefined) { + opt_hints[0] = this.hints_[0]; + opt_hints[1] = this.hints_[1]; + return opt_hints; + } else { + return this.hints_.slice(); + } + }; + /** + * Calculate the extent for the current view state and the passed size. + * The size is the pixel dimensions of the box into which the calculated extent + * should fit. In most cases you want to get the extent of the entire map, + * that is `map.getSize()`. + * @param {import("./size.js").Size} [opt_size] Box pixel size. If not provided, the size + * of the map that uses this view will be used. + * @return {import("./extent.js").Extent} Extent. + * @api + */ + + + View.prototype.calculateExtent = function (opt_size) { + var extent = this.calculateExtentInternal(opt_size); + return (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.toUserExtent)(extent, this.getProjection()); + }; + /** + * @param {import("./size.js").Size} [opt_size] Box pixel size. If not provided, + * the map's last known viewport size will be used. + * @return {import("./extent.js").Extent} Extent. + */ + + + View.prototype.calculateExtentInternal = function (opt_size) { + var size = opt_size || this.getViewportSizeMinusPadding_(); + var center = + /** @type {!import("./coordinate.js").Coordinate} */ + this.getCenterInternal(); + (0,_asserts_js__WEBPACK_IMPORTED_MODULE_7__.assert)(center, 1); // The view center is not defined + + var resolution = + /** @type {!number} */ + this.getResolution(); + (0,_asserts_js__WEBPACK_IMPORTED_MODULE_7__.assert)(resolution !== undefined, 2); // The view resolution is not defined + + var rotation = + /** @type {!number} */ + this.getRotation(); + (0,_asserts_js__WEBPACK_IMPORTED_MODULE_7__.assert)(rotation !== undefined, 3); // The view rotation is not defined + + return (0,_extent_js__WEBPACK_IMPORTED_MODULE_8__.getForViewAndSize)(center, resolution, rotation, size); + }; + /** + * Get the maximum resolution of the view. + * @return {number} The maximum resolution of the view. + * @api + */ + + + View.prototype.getMaxResolution = function () { + return this.maxResolution_; + }; + /** + * Get the minimum resolution of the view. + * @return {number} The minimum resolution of the view. + * @api + */ + + + View.prototype.getMinResolution = function () { + return this.minResolution_; + }; + /** + * Get the maximum zoom level for the view. + * @return {number} The maximum zoom level. + * @api + */ + + + View.prototype.getMaxZoom = function () { + return ( + /** @type {number} */ + this.getZoomForResolution(this.minResolution_) + ); + }; + /** + * Set a new maximum zoom level for the view. + * @param {number} zoom The maximum zoom level. + * @api + */ + + + View.prototype.setMaxZoom = function (zoom) { + this.applyOptions_(this.getUpdatedOptions_({ + maxZoom: zoom + })); + }; + /** + * Get the minimum zoom level for the view. + * @return {number} The minimum zoom level. + * @api + */ + + + View.prototype.getMinZoom = function () { + return ( + /** @type {number} */ + this.getZoomForResolution(this.maxResolution_) + ); + }; + /** + * Set a new minimum zoom level for the view. + * @param {number} zoom The minimum zoom level. + * @api + */ + + + View.prototype.setMinZoom = function (zoom) { + this.applyOptions_(this.getUpdatedOptions_({ + minZoom: zoom + })); + }; + /** + * Set whether the view should allow intermediary zoom levels. + * @param {boolean} enabled Whether the resolution is constrained. + * @api + */ + + + View.prototype.setConstrainResolution = function (enabled) { + this.applyOptions_(this.getUpdatedOptions_({ + constrainResolution: enabled + })); + }; + /** + * Get the view projection. + * @return {import("./proj/Projection.js").default} The projection of the view. + * @api + */ + + + View.prototype.getProjection = function () { + return this.projection_; + }; + /** + * Get the view resolution. + * @return {number|undefined} The resolution of the view. + * @observable + * @api + */ + + + View.prototype.getResolution = function () { + return ( + /** @type {number|undefined} */ + this.get(_ViewProperty_js__WEBPACK_IMPORTED_MODULE_6__["default"].RESOLUTION) + ); + }; + /** + * Get the resolutions for the view. This returns the array of resolutions + * passed to the constructor of the View, or undefined if none were given. + * @return {Array|undefined} The resolutions of the view. + * @api + */ + + + View.prototype.getResolutions = function () { + return this.resolutions_; + }; + /** + * Get the resolution for a provided extent (in map units) and size (in pixels). + * @param {import("./extent.js").Extent} extent Extent. + * @param {import("./size.js").Size} [opt_size] Box pixel size. + * @return {number} The resolution at which the provided extent will render at + * the given size. + * @api + */ + + + View.prototype.getResolutionForExtent = function (extent, opt_size) { + return this.getResolutionForExtentInternal((0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserExtent)(extent, this.getProjection()), opt_size); + }; + /** + * Get the resolution for a provided extent (in map units) and size (in pixels). + * @param {import("./extent.js").Extent} extent Extent. + * @param {import("./size.js").Size} [opt_size] Box pixel size. + * @return {number} The resolution at which the provided extent will render at + * the given size. + */ + + + View.prototype.getResolutionForExtentInternal = function (extent, opt_size) { + var size = opt_size || this.getViewportSizeMinusPadding_(); + var xResolution = (0,_extent_js__WEBPACK_IMPORTED_MODULE_8__.getWidth)(extent) / size[0]; + var yResolution = (0,_extent_js__WEBPACK_IMPORTED_MODULE_8__.getHeight)(extent) / size[1]; + return Math.max(xResolution, yResolution); + }; + /** + * Return a function that returns a value between 0 and 1 for a + * resolution. Exponential scaling is assumed. + * @param {number} [opt_power] Power. + * @return {function(number): number} Resolution for value function. + */ + + + View.prototype.getResolutionForValueFunction = function (opt_power) { + var power = opt_power || 2; + var maxResolution = this.getConstrainedResolution(this.maxResolution_); + var minResolution = this.minResolution_; + var max = Math.log(maxResolution / minResolution) / Math.log(power); + return ( + /** + * @param {number} value Value. + * @return {number} Resolution. + */ + function (value) { + var resolution = maxResolution / Math.pow(power, value * max); + return resolution; + } + ); + }; + /** + * Get the view rotation. + * @return {number} The rotation of the view in radians. + * @observable + * @api + */ + + + View.prototype.getRotation = function () { + return ( + /** @type {number} */ + this.get(_ViewProperty_js__WEBPACK_IMPORTED_MODULE_6__["default"].ROTATION) + ); + }; + /** + * Return a function that returns a resolution for a value between + * 0 and 1. Exponential scaling is assumed. + * @param {number} [opt_power] Power. + * @return {function(number): number} Value for resolution function. + */ + + + View.prototype.getValueForResolutionFunction = function (opt_power) { + var logPower = Math.log(opt_power || 2); + var maxResolution = this.getConstrainedResolution(this.maxResolution_); + var minResolution = this.minResolution_; + var max = Math.log(maxResolution / minResolution) / logPower; + return ( + /** + * @param {number} resolution Resolution. + * @return {number} Value. + */ + function (resolution) { + var value = Math.log(maxResolution / resolution) / logPower / max; + return value; + } + ); + }; + /** + * Returns the size of the viewport minus padding. + * @private + * @param {number} [opt_rotation] Take into account the rotation of the viewport when giving the size + * @return {import("./size.js").Size} Viewport size reduced by the padding. + */ + + + View.prototype.getViewportSizeMinusPadding_ = function (opt_rotation) { + var size = this.getViewportSize_(opt_rotation); + var padding = this.padding_; + + if (padding) { + size = [size[0] - padding[1] - padding[3], size[1] - padding[0] - padding[2]]; + } + + return size; + }; + /** + * @return {State} View state. + */ + + + View.prototype.getState = function () { + var projection = this.getProjection(); + var resolution = this.getResolution(); + var rotation = this.getRotation(); + var center = + /** @type {import("./coordinate.js").Coordinate} */ + this.getCenterInternal(); + var padding = this.padding_; + + if (padding) { + var reducedSize = this.getViewportSizeMinusPadding_(); + center = calculateCenterOn(center, this.getViewportSize_(), [reducedSize[0] / 2 + padding[3], reducedSize[1] / 2 + padding[0]], resolution, rotation); + } + + return { + center: center.slice(0), + projection: projection !== undefined ? projection : null, + resolution: resolution, + nextCenter: this.nextCenter_, + nextResolution: this.nextResolution_, + nextRotation: this.nextRotation_, + rotation: rotation, + zoom: this.getZoom() + }; + }; + /** + * Get the current zoom level. This method may return non-integer zoom levels + * if the view does not constrain the resolution, or if an interaction or + * animation is underway. + * @return {number|undefined} Zoom. + * @api + */ + + + View.prototype.getZoom = function () { + var zoom; + var resolution = this.getResolution(); + + if (resolution !== undefined) { + zoom = this.getZoomForResolution(resolution); + } + + return zoom; + }; + /** + * Get the zoom level for a resolution. + * @param {number} resolution The resolution. + * @return {number|undefined} The zoom level for the provided resolution. + * @api + */ + + + View.prototype.getZoomForResolution = function (resolution) { + var offset = this.minZoom_ || 0; + var max, zoomFactor; + + if (this.resolutions_) { + var nearest = (0,_array_js__WEBPACK_IMPORTED_MODULE_9__.linearFindNearest)(this.resolutions_, resolution, 1); + offset = nearest; + max = this.resolutions_[nearest]; + + if (nearest == this.resolutions_.length - 1) { + zoomFactor = 2; + } else { + zoomFactor = max / this.resolutions_[nearest + 1]; + } + } else { + max = this.maxResolution_; + zoomFactor = this.zoomFactor_; + } + + return offset + Math.log(max / resolution) / Math.log(zoomFactor); + }; + /** + * Get the resolution for a zoom level. + * @param {number} zoom Zoom level. + * @return {number} The view resolution for the provided zoom level. + * @api + */ + + + View.prototype.getResolutionForZoom = function (zoom) { + if (this.resolutions_) { + if (this.resolutions_.length <= 1) { + return 0; + } + + var baseLevel = (0,_math_js__WEBPACK_IMPORTED_MODULE_3__.clamp)(Math.floor(zoom), 0, this.resolutions_.length - 2); + var zoomFactor = this.resolutions_[baseLevel] / this.resolutions_[baseLevel + 1]; + return this.resolutions_[baseLevel] / Math.pow(zoomFactor, (0,_math_js__WEBPACK_IMPORTED_MODULE_3__.clamp)(zoom - baseLevel, 0, 1)); + } else { + return this.maxResolution_ / Math.pow(this.zoomFactor_, zoom - this.minZoom_); + } + }; + /** + * Fit the given geometry or extent based on the given map size and border. + * The size is pixel dimensions of the box to fit the extent into. + * In most cases you will want to use the map size, that is `map.getSize()`. + * Takes care of the map angle. + * @param {import("./geom/SimpleGeometry.js").default|import("./extent.js").Extent} geometryOrExtent The geometry or + * extent to fit the view to. + * @param {FitOptions} [opt_options] Options. + * @api + */ + + + View.prototype.fit = function (geometryOrExtent, opt_options) { + /** @type {import("./geom/SimpleGeometry.js").default} */ + var geometry; + (0,_asserts_js__WEBPACK_IMPORTED_MODULE_7__.assert)(Array.isArray(geometryOrExtent) || typeof + /** @type {?} */ + geometryOrExtent.getSimplifiedGeometry === 'function', 24); // Invalid extent or geometry provided as `geometry` + + if (Array.isArray(geometryOrExtent)) { + (0,_asserts_js__WEBPACK_IMPORTED_MODULE_7__.assert)(!(0,_extent_js__WEBPACK_IMPORTED_MODULE_8__.isEmpty)(geometryOrExtent), 25); // Cannot fit empty extent provided as `geometry` + + var extent = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserExtent)(geometryOrExtent, this.getProjection()); + geometry = (0,_geom_Polygon_js__WEBPACK_IMPORTED_MODULE_10__.fromExtent)(extent); + } else if (geometryOrExtent.getType() === _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_11__["default"].CIRCLE) { + var extent = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserExtent)(geometryOrExtent.getExtent(), this.getProjection()); + geometry = (0,_geom_Polygon_js__WEBPACK_IMPORTED_MODULE_10__.fromExtent)(extent); + geometry.rotate(this.getRotation(), (0,_extent_js__WEBPACK_IMPORTED_MODULE_8__.getCenter)(extent)); + } else { + var userProjection = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getUserProjection)(); + + if (userProjection) { + geometry = + /** @type {import("./geom/SimpleGeometry.js").default} */ + geometryOrExtent.clone().transform(userProjection, this.getProjection()); + } else { + geometry = geometryOrExtent; + } + } + + this.fitInternal(geometry, opt_options); + }; + /** + * Calculate rotated extent + * @param {import("./geom/SimpleGeometry.js").default} geometry The geometry. + * @return {import("./extent").Extent} The rotated extent for the geometry. + */ + + + View.prototype.rotatedExtentForGeometry = function (geometry) { + var rotation = this.getRotation(); + var cosAngle = Math.cos(rotation); + var sinAngle = Math.sin(-rotation); + var coords = geometry.getFlatCoordinates(); + var stride = geometry.getStride(); + var minRotX = +Infinity; + var minRotY = +Infinity; + var maxRotX = -Infinity; + var maxRotY = -Infinity; + + for (var i = 0, ii = coords.length; i < ii; i += stride) { + var rotX = coords[i] * cosAngle - coords[i + 1] * sinAngle; + var rotY = coords[i] * sinAngle + coords[i + 1] * cosAngle; + minRotX = Math.min(minRotX, rotX); + minRotY = Math.min(minRotY, rotY); + maxRotX = Math.max(maxRotX, rotX); + maxRotY = Math.max(maxRotY, rotY); + } + + return [minRotX, minRotY, maxRotX, maxRotY]; + }; + /** + * @param {import("./geom/SimpleGeometry.js").default} geometry The geometry. + * @param {FitOptions} [opt_options] Options. + */ + + + View.prototype.fitInternal = function (geometry, opt_options) { + var options = opt_options || {}; + var size = options.size; + + if (!size) { + size = this.getViewportSizeMinusPadding_(); + } + + var padding = options.padding !== undefined ? options.padding : [0, 0, 0, 0]; + var nearest = options.nearest !== undefined ? options.nearest : false; + var minResolution; + + if (options.minResolution !== undefined) { + minResolution = options.minResolution; + } else if (options.maxZoom !== undefined) { + minResolution = this.getResolutionForZoom(options.maxZoom); + } else { + minResolution = 0; + } + + var rotatedExtent = this.rotatedExtentForGeometry(geometry); // calculate resolution + + var resolution = this.getResolutionForExtentInternal(rotatedExtent, [size[0] - padding[1] - padding[3], size[1] - padding[0] - padding[2]]); + resolution = isNaN(resolution) ? minResolution : Math.max(resolution, minResolution); + resolution = this.getConstrainedResolution(resolution, nearest ? 0 : 1); // calculate center + + var rotation = this.getRotation(); + var sinAngle = Math.sin(rotation); + var cosAngle = Math.cos(rotation); + var centerRot = (0,_extent_js__WEBPACK_IMPORTED_MODULE_8__.getCenter)(rotatedExtent); + centerRot[0] += (padding[1] - padding[3]) / 2 * resolution; + centerRot[1] += (padding[0] - padding[2]) / 2 * resolution; + var centerX = centerRot[0] * cosAngle - centerRot[1] * sinAngle; + var centerY = centerRot[1] * cosAngle + centerRot[0] * sinAngle; + var center = this.getConstrainedCenter([centerX, centerY], resolution); + var callback = options.callback ? options.callback : _functions_js__WEBPACK_IMPORTED_MODULE_12__.VOID; + + if (options.duration !== undefined) { + this.animateInternal({ + resolution: resolution, + center: center, + duration: options.duration, + easing: options.easing + }, callback); + } else { + this.targetResolution_ = resolution; + this.targetCenter_ = center; + this.applyTargetState_(false, true); + animationCallback(callback, true); + } + }; + /** + * Center on coordinate and view position. + * @param {import("./coordinate.js").Coordinate} coordinate Coordinate. + * @param {import("./size.js").Size} size Box pixel size. + * @param {import("./pixel.js").Pixel} position Position on the view to center on. + * @api + */ + + + View.prototype.centerOn = function (coordinate, size, position) { + this.centerOnInternal((0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserCoordinate)(coordinate, this.getProjection()), size, position); + }; + /** + * @param {import("./coordinate.js").Coordinate} coordinate Coordinate. + * @param {import("./size.js").Size} size Box pixel size. + * @param {import("./pixel.js").Pixel} position Position on the view to center on. + */ + + + View.prototype.centerOnInternal = function (coordinate, size, position) { + this.setCenterInternal(calculateCenterOn(coordinate, size, position, this.getResolution(), this.getRotation())); + }; + /** + * Calculates the shift between map and viewport center. + * @param {import("./coordinate.js").Coordinate} center Center. + * @param {number} resolution Resolution. + * @param {number} rotation Rotation. + * @param {import("./size.js").Size} size Size. + * @return {Array|undefined} Center shift. + */ + + + View.prototype.calculateCenterShift = function (center, resolution, rotation, size) { + var centerShift; + var padding = this.padding_; + + if (padding && center) { + var reducedSize = this.getViewportSizeMinusPadding_(-rotation); + var shiftedCenter = calculateCenterOn(center, size, [reducedSize[0] / 2 + padding[3], reducedSize[1] / 2 + padding[0]], resolution, rotation); + centerShift = [center[0] - shiftedCenter[0], center[1] - shiftedCenter[1]]; + } + + return centerShift; + }; + /** + * @return {boolean} Is defined. + */ + + + View.prototype.isDef = function () { + return !!this.getCenterInternal() && this.getResolution() !== undefined; + }; + /** + * Adds relative coordinates to the center of the view. Any extent constraint will apply. + * @param {import("./coordinate.js").Coordinate} deltaCoordinates Relative value to add. + * @api + */ + + + View.prototype.adjustCenter = function (deltaCoordinates) { + var center = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.toUserCoordinate)(this.targetCenter_, this.getProjection()); + this.setCenter([center[0] + deltaCoordinates[0], center[1] + deltaCoordinates[1]]); + }; + /** + * Adds relative coordinates to the center of the view. Any extent constraint will apply. + * @param {import("./coordinate.js").Coordinate} deltaCoordinates Relative value to add. + */ + + + View.prototype.adjustCenterInternal = function (deltaCoordinates) { + var center = this.targetCenter_; + this.setCenterInternal([center[0] + deltaCoordinates[0], center[1] + deltaCoordinates[1]]); + }; + /** + * Multiply the view resolution by a ratio, optionally using an anchor. Any resolution + * constraint will apply. + * @param {number} ratio The ratio to apply on the view resolution. + * @param {import("./coordinate.js").Coordinate} [opt_anchor] The origin of the transformation. + * @api + */ + + + View.prototype.adjustResolution = function (ratio, opt_anchor) { + var anchor = opt_anchor && (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserCoordinate)(opt_anchor, this.getProjection()); + this.adjustResolutionInternal(ratio, anchor); + }; + /** + * Multiply the view resolution by a ratio, optionally using an anchor. Any resolution + * constraint will apply. + * @param {number} ratio The ratio to apply on the view resolution. + * @param {import("./coordinate.js").Coordinate} [opt_anchor] The origin of the transformation. + */ + + + View.prototype.adjustResolutionInternal = function (ratio, opt_anchor) { + var isMoving = this.getAnimating() || this.getInteracting(); + var size = this.getViewportSize_(this.getRotation()); + var newResolution = this.constraints_.resolution(this.targetResolution_ * ratio, 0, size, isMoving); + + if (opt_anchor) { + this.targetCenter_ = this.calculateCenterZoom(newResolution, opt_anchor); + } + + this.targetResolution_ *= ratio; + this.applyTargetState_(); + }; + /** + * Adds a value to the view zoom level, optionally using an anchor. Any resolution + * constraint will apply. + * @param {number} delta Relative value to add to the zoom level. + * @param {import("./coordinate.js").Coordinate} [opt_anchor] The origin of the transformation. + * @api + */ + + + View.prototype.adjustZoom = function (delta, opt_anchor) { + this.adjustResolution(Math.pow(this.zoomFactor_, -delta), opt_anchor); + }; + /** + * Adds a value to the view rotation, optionally using an anchor. Any rotation + * constraint will apply. + * @param {number} delta Relative value to add to the zoom rotation, in radians. + * @param {import("./coordinate.js").Coordinate} [opt_anchor] The rotation center. + * @api + */ + + + View.prototype.adjustRotation = function (delta, opt_anchor) { + if (opt_anchor) { + opt_anchor = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserCoordinate)(opt_anchor, this.getProjection()); + } + + this.adjustRotationInternal(delta, opt_anchor); + }; + /** + * @param {number} delta Relative value to add to the zoom rotation, in radians. + * @param {import("./coordinate.js").Coordinate} [opt_anchor] The rotation center. + */ + + + View.prototype.adjustRotationInternal = function (delta, opt_anchor) { + var isMoving = this.getAnimating() || this.getInteracting(); + var newRotation = this.constraints_.rotation(this.targetRotation_ + delta, isMoving); + + if (opt_anchor) { + this.targetCenter_ = this.calculateCenterRotate(newRotation, opt_anchor); + } + + this.targetRotation_ += delta; + this.applyTargetState_(); + }; + /** + * Set the center of the current view. Any extent constraint will apply. + * @param {import("./coordinate.js").Coordinate|undefined} center The center of the view. + * @observable + * @api + */ + + + View.prototype.setCenter = function (center) { + this.setCenterInternal((0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserCoordinate)(center, this.getProjection())); + }; + /** + * Set the center using the view projection (not the user projection). + * @param {import("./coordinate.js").Coordinate|undefined} center The center of the view. + */ + + + View.prototype.setCenterInternal = function (center) { + this.targetCenter_ = center; + this.applyTargetState_(); + }; + /** + * @param {import("./ViewHint.js").default} hint Hint. + * @param {number} delta Delta. + * @return {number} New value. + */ + + + View.prototype.setHint = function (hint, delta) { + this.hints_[hint] += delta; + this.changed(); + return this.hints_[hint]; + }; + /** + * Set the resolution for this view. Any resolution constraint will apply. + * @param {number|undefined} resolution The resolution of the view. + * @observable + * @api + */ + + + View.prototype.setResolution = function (resolution) { + this.targetResolution_ = resolution; + this.applyTargetState_(); + }; + /** + * Set the rotation for this view. Any rotation constraint will apply. + * @param {number} rotation The rotation of the view in radians. + * @observable + * @api + */ + + + View.prototype.setRotation = function (rotation) { + this.targetRotation_ = rotation; + this.applyTargetState_(); + }; + /** + * Zoom to a specific zoom level. Any resolution constrain will apply. + * @param {number} zoom Zoom level. + * @api + */ + + + View.prototype.setZoom = function (zoom) { + this.setResolution(this.getResolutionForZoom(zoom)); + }; + /** + * Recompute rotation/resolution/center based on target values. + * Note: we have to compute rotation first, then resolution and center considering that + * parameters can influence one another in case a view extent constraint is present. + * @param {boolean} [opt_doNotCancelAnims] Do not cancel animations. + * @param {boolean} [opt_forceMoving] Apply constraints as if the view is moving. + * @private + */ + + + View.prototype.applyTargetState_ = function (opt_doNotCancelAnims, opt_forceMoving) { + var isMoving = this.getAnimating() || this.getInteracting() || opt_forceMoving; // compute rotation + + var newRotation = this.constraints_.rotation(this.targetRotation_, isMoving); + var size = this.getViewportSize_(newRotation); + var newResolution = this.constraints_.resolution(this.targetResolution_, 0, size, isMoving); + var newCenter = this.constraints_.center(this.targetCenter_, newResolution, size, isMoving, this.calculateCenterShift(this.targetCenter_, newResolution, newRotation, size)); + + if (this.get(_ViewProperty_js__WEBPACK_IMPORTED_MODULE_6__["default"].ROTATION) !== newRotation) { + this.set(_ViewProperty_js__WEBPACK_IMPORTED_MODULE_6__["default"].ROTATION, newRotation); + } + + if (this.get(_ViewProperty_js__WEBPACK_IMPORTED_MODULE_6__["default"].RESOLUTION) !== newResolution) { + this.set(_ViewProperty_js__WEBPACK_IMPORTED_MODULE_6__["default"].RESOLUTION, newResolution); + } + + if (!this.get(_ViewProperty_js__WEBPACK_IMPORTED_MODULE_6__["default"].CENTER) || !(0,_coordinate_js__WEBPACK_IMPORTED_MODULE_5__.equals)(this.get(_ViewProperty_js__WEBPACK_IMPORTED_MODULE_6__["default"].CENTER), newCenter)) { + this.set(_ViewProperty_js__WEBPACK_IMPORTED_MODULE_6__["default"].CENTER, newCenter); + } + + if (this.getAnimating() && !opt_doNotCancelAnims) { + this.cancelAnimations(); + } + + this.cancelAnchor_ = undefined; + }; + /** + * If any constraints need to be applied, an animation will be triggered. + * This is typically done on interaction end. + * Note: calling this with a duration of 0 will apply the constrained values straight away, + * without animation. + * @param {number} [opt_duration] The animation duration in ms. + * @param {number} [opt_resolutionDirection] Which direction to zoom. + * @param {import("./coordinate.js").Coordinate} [opt_anchor] The origin of the transformation. + */ + + + View.prototype.resolveConstraints = function (opt_duration, opt_resolutionDirection, opt_anchor) { + var duration = opt_duration !== undefined ? opt_duration : 200; + var direction = opt_resolutionDirection || 0; + var newRotation = this.constraints_.rotation(this.targetRotation_); + var size = this.getViewportSize_(newRotation); + var newResolution = this.constraints_.resolution(this.targetResolution_, direction, size); + var newCenter = this.constraints_.center(this.targetCenter_, newResolution, size, false, this.calculateCenterShift(this.targetCenter_, newResolution, newRotation, size)); + + if (duration === 0 && !this.cancelAnchor_) { + this.targetResolution_ = newResolution; + this.targetRotation_ = newRotation; + this.targetCenter_ = newCenter; + this.applyTargetState_(); + return; + } + + var anchor = opt_anchor || (duration === 0 ? this.cancelAnchor_ : undefined); + this.cancelAnchor_ = undefined; + + if (this.getResolution() !== newResolution || this.getRotation() !== newRotation || !this.getCenterInternal() || !(0,_coordinate_js__WEBPACK_IMPORTED_MODULE_5__.equals)(this.getCenterInternal(), newCenter)) { + if (this.getAnimating()) { + this.cancelAnimations(); + } + + this.animateInternal({ + rotation: newRotation, + center: newCenter, + resolution: newResolution, + duration: duration, + easing: _easing_js__WEBPACK_IMPORTED_MODULE_2__.easeOut, + anchor: anchor + }); + } + }; + /** + * Notify the View that an interaction has started. + * The view state will be resolved to a stable one if needed + * (depending on its constraints). + * @api + */ + + + View.prototype.beginInteraction = function () { + this.resolveConstraints(0); + this.setHint(_ViewHint_js__WEBPACK_IMPORTED_MODULE_4__["default"].INTERACTING, 1); + }; + /** + * Notify the View that an interaction has ended. The view state will be resolved + * to a stable one if needed (depending on its constraints). + * @param {number} [opt_duration] Animation duration in ms. + * @param {number} [opt_resolutionDirection] Which direction to zoom. + * @param {import("./coordinate.js").Coordinate} [opt_anchor] The origin of the transformation. + * @api + */ + + + View.prototype.endInteraction = function (opt_duration, opt_resolutionDirection, opt_anchor) { + var anchor = opt_anchor && (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.fromUserCoordinate)(opt_anchor, this.getProjection()); + this.endInteractionInternal(opt_duration, opt_resolutionDirection, anchor); + }; + /** + * Notify the View that an interaction has ended. The view state will be resolved + * to a stable one if needed (depending on its constraints). + * @param {number} [opt_duration] Animation duration in ms. + * @param {number} [opt_resolutionDirection] Which direction to zoom. + * @param {import("./coordinate.js").Coordinate} [opt_anchor] The origin of the transformation. + */ + + + View.prototype.endInteractionInternal = function (opt_duration, opt_resolutionDirection, opt_anchor) { + this.setHint(_ViewHint_js__WEBPACK_IMPORTED_MODULE_4__["default"].INTERACTING, -1); + this.resolveConstraints(opt_duration, opt_resolutionDirection, opt_anchor); + }; + /** + * Get a valid position for the view center according to the current constraints. + * @param {import("./coordinate.js").Coordinate|undefined} targetCenter Target center position. + * @param {number} [opt_targetResolution] Target resolution. If not supplied, the current one will be used. + * This is useful to guess a valid center position at a different zoom level. + * @return {import("./coordinate.js").Coordinate|undefined} Valid center position. + */ + + + View.prototype.getConstrainedCenter = function (targetCenter, opt_targetResolution) { + var size = this.getViewportSize_(this.getRotation()); + return this.constraints_.center(targetCenter, opt_targetResolution || this.getResolution(), size); + }; + /** + * Get a valid zoom level according to the current view constraints. + * @param {number|undefined} targetZoom Target zoom. + * @param {number} [opt_direction=0] Indicate which resolution should be used + * by a renderer if the view resolution does not match any resolution of the tile source. + * If 0, the nearest resolution will be used. If 1, the nearest lower resolution + * will be used. If -1, the nearest higher resolution will be used. + * @return {number|undefined} Valid zoom level. + */ + + + View.prototype.getConstrainedZoom = function (targetZoom, opt_direction) { + var targetRes = this.getResolutionForZoom(targetZoom); + return this.getZoomForResolution(this.getConstrainedResolution(targetRes, opt_direction)); + }; + /** + * Get a valid resolution according to the current view constraints. + * @param {number|undefined} targetResolution Target resolution. + * @param {number} [opt_direction=0] Indicate which resolution should be used + * by a renderer if the view resolution does not match any resolution of the tile source. + * If 0, the nearest resolution will be used. If 1, the nearest lower resolution + * will be used. If -1, the nearest higher resolution will be used. + * @return {number|undefined} Valid resolution. + */ + + + View.prototype.getConstrainedResolution = function (targetResolution, opt_direction) { + var direction = opt_direction || 0; + var size = this.getViewportSize_(this.getRotation()); + return this.constraints_.resolution(targetResolution, direction, size); + }; + + return View; +}(_Object_js__WEBPACK_IMPORTED_MODULE_13__["default"]); +/** + * @param {Function} callback Callback. + * @param {*} returnValue Return value. + */ + + +function animationCallback(callback, returnValue) { + setTimeout(function () { + callback(returnValue); + }, 0); +} +/** + * @param {ViewOptions} options View options. + * @return {import("./centerconstraint.js").Type} The constraint. + */ + + +function createCenterConstraint(options) { + if (options.extent !== undefined) { + var smooth = options.smoothExtentConstraint !== undefined ? options.smoothExtentConstraint : true; + return (0,_centerconstraint_js__WEBPACK_IMPORTED_MODULE_14__.createExtent)(options.extent, options.constrainOnlyCenter, smooth); + } + + var projection = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.createProjection)(options.projection, 'EPSG:3857'); + + if (options.multiWorld !== true && projection.isGlobal()) { + var extent = projection.getExtent().slice(); + extent[0] = -Infinity; + extent[2] = Infinity; + return (0,_centerconstraint_js__WEBPACK_IMPORTED_MODULE_14__.createExtent)(extent, false, false); + } + + return _centerconstraint_js__WEBPACK_IMPORTED_MODULE_14__.none; +} +/** + * @param {ViewOptions} options View options. + * @return {{constraint: import("./resolutionconstraint.js").Type, maxResolution: number, + * minResolution: number, minZoom: number, zoomFactor: number}} The constraint. + */ + +function createResolutionConstraint(options) { + var resolutionConstraint; + var maxResolution; + var minResolution; // TODO: move these to be ol constants + // see https://github.com/openlayers/openlayers/issues/2076 + + var defaultMaxZoom = 28; + var defaultZoomFactor = 2; + var minZoom = options.minZoom !== undefined ? options.minZoom : DEFAULT_MIN_ZOOM; + var maxZoom = options.maxZoom !== undefined ? options.maxZoom : defaultMaxZoom; + var zoomFactor = options.zoomFactor !== undefined ? options.zoomFactor : defaultZoomFactor; + var multiWorld = options.multiWorld !== undefined ? options.multiWorld : false; + var smooth = options.smoothResolutionConstraint !== undefined ? options.smoothResolutionConstraint : true; + var showFullExtent = options.showFullExtent !== undefined ? options.showFullExtent : false; + var projection = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.createProjection)(options.projection, 'EPSG:3857'); + var projExtent = projection.getExtent(); + var constrainOnlyCenter = options.constrainOnlyCenter; + var extent = options.extent; + + if (!multiWorld && !extent && projection.isGlobal()) { + constrainOnlyCenter = false; + extent = projExtent; + } + + if (options.resolutions !== undefined) { + var resolutions = options.resolutions; + maxResolution = resolutions[minZoom]; + minResolution = resolutions[maxZoom] !== undefined ? resolutions[maxZoom] : resolutions[resolutions.length - 1]; + + if (options.constrainResolution) { + resolutionConstraint = (0,_resolutionconstraint_js__WEBPACK_IMPORTED_MODULE_15__.createSnapToResolutions)(resolutions, smooth, !constrainOnlyCenter && extent, showFullExtent); + } else { + resolutionConstraint = (0,_resolutionconstraint_js__WEBPACK_IMPORTED_MODULE_15__.createMinMaxResolution)(maxResolution, minResolution, smooth, !constrainOnlyCenter && extent, showFullExtent); + } + } else { + // calculate the default min and max resolution + var size = !projExtent ? // use an extent that can fit the whole world if need be + 360 * _proj_js__WEBPACK_IMPORTED_MODULE_0__.METERS_PER_UNIT[_proj_Units_js__WEBPACK_IMPORTED_MODULE_16__["default"].DEGREES] / projection.getMetersPerUnit() : Math.max((0,_extent_js__WEBPACK_IMPORTED_MODULE_8__.getWidth)(projExtent), (0,_extent_js__WEBPACK_IMPORTED_MODULE_8__.getHeight)(projExtent)); + var defaultMaxResolution = size / _tilegrid_common_js__WEBPACK_IMPORTED_MODULE_17__.DEFAULT_TILE_SIZE / Math.pow(defaultZoomFactor, DEFAULT_MIN_ZOOM); + var defaultMinResolution = defaultMaxResolution / Math.pow(defaultZoomFactor, defaultMaxZoom - DEFAULT_MIN_ZOOM); // user provided maxResolution takes precedence + + maxResolution = options.maxResolution; + + if (maxResolution !== undefined) { + minZoom = 0; + } else { + maxResolution = defaultMaxResolution / Math.pow(zoomFactor, minZoom); + } // user provided minResolution takes precedence + + + minResolution = options.minResolution; + + if (minResolution === undefined) { + if (options.maxZoom !== undefined) { + if (options.maxResolution !== undefined) { + minResolution = maxResolution / Math.pow(zoomFactor, maxZoom); + } else { + minResolution = defaultMaxResolution / Math.pow(zoomFactor, maxZoom); + } + } else { + minResolution = defaultMinResolution; + } + } // given discrete zoom levels, minResolution may be different than provided + + + maxZoom = minZoom + Math.floor(Math.log(maxResolution / minResolution) / Math.log(zoomFactor)); + minResolution = maxResolution / Math.pow(zoomFactor, maxZoom - minZoom); + + if (options.constrainResolution) { + resolutionConstraint = (0,_resolutionconstraint_js__WEBPACK_IMPORTED_MODULE_15__.createSnapToPower)(zoomFactor, maxResolution, minResolution, smooth, !constrainOnlyCenter && extent, showFullExtent); + } else { + resolutionConstraint = (0,_resolutionconstraint_js__WEBPACK_IMPORTED_MODULE_15__.createMinMaxResolution)(maxResolution, minResolution, smooth, !constrainOnlyCenter && extent, showFullExtent); + } + } + + return { + constraint: resolutionConstraint, + maxResolution: maxResolution, + minResolution: minResolution, + minZoom: minZoom, + zoomFactor: zoomFactor + }; +} +/** + * @param {ViewOptions} options View options. + * @return {import("./rotationconstraint.js").Type} Rotation constraint. + */ + +function createRotationConstraint(options) { + var enableRotation = options.enableRotation !== undefined ? options.enableRotation : true; + + if (enableRotation) { + var constrainRotation = options.constrainRotation; + + if (constrainRotation === undefined || constrainRotation === true) { + return (0,_rotationconstraint_js__WEBPACK_IMPORTED_MODULE_18__.createSnapToZero)(); + } else if (constrainRotation === false) { + return _rotationconstraint_js__WEBPACK_IMPORTED_MODULE_18__.none; + } else if (typeof constrainRotation === 'number') { + return (0,_rotationconstraint_js__WEBPACK_IMPORTED_MODULE_18__.createSnapToN)(constrainRotation); + } else { + return _rotationconstraint_js__WEBPACK_IMPORTED_MODULE_18__.none; + } + } else { + return _rotationconstraint_js__WEBPACK_IMPORTED_MODULE_18__.disable; + } +} +/** + * Determine if an animation involves no view change. + * @param {Animation} animation The animation. + * @return {boolean} The animation involves no view change. + */ + +function isNoopAnimation(animation) { + if (animation.sourceCenter && animation.targetCenter) { + if (!(0,_coordinate_js__WEBPACK_IMPORTED_MODULE_5__.equals)(animation.sourceCenter, animation.targetCenter)) { + return false; + } + } + + if (animation.sourceResolution !== animation.targetResolution) { + return false; + } + + if (animation.sourceRotation !== animation.targetRotation) { + return false; + } + + return true; +} +/** + * @param {import("./coordinate.js").Coordinate} coordinate Coordinate. + * @param {import("./size.js").Size} size Box pixel size. + * @param {import("./pixel.js").Pixel} position Position on the view to center on. + * @param {number} resolution Resolution. + * @param {number} rotation Rotation. + * @return {import("./coordinate.js").Coordinate} Shifted center. + */ + +function calculateCenterOn(coordinate, size, position, resolution, rotation) { + // calculate rotated position + var cosAngle = Math.cos(-rotation); + var sinAngle = Math.sin(-rotation); + var rotX = coordinate[0] * cosAngle - coordinate[1] * sinAngle; + var rotY = coordinate[1] * cosAngle + coordinate[0] * sinAngle; + rotX += (size[0] / 2 - position[0]) * resolution; + rotY += (position[1] - size[1] / 2) * resolution; // go back to original angle + + sinAngle = -sinAngle; // go back to original rotation + + var centerX = rotX * cosAngle - rotY * sinAngle; + var centerY = rotY * cosAngle + rotX * sinAngle; + return [centerX, centerY]; +} + +/* harmony default export */ __webpack_exports__["default"] = (View); + +/***/ }), +/* 92 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * @module ol/ViewHint + */ + +/** + * @enum {number} + */ +/* harmony default export */ __webpack_exports__["default"] = ({ + ANIMATING: 0, + INTERACTING: 1 +}); + +/***/ }), +/* 93 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * @module ol/ViewProperty + */ + +/** + * @enum {string} + */ +/* harmony default export */ __webpack_exports__["default"] = ({ + CENTER: 'center', + RESOLUTION: 'resolution', + ROTATION: 'rotation' +}); + +/***/ }), +/* 94 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "createExtent": function() { return /* binding */ createExtent; }, +/* harmony export */ "none": function() { return /* binding */ none; } +/* harmony export */ }); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9); +/** + * @module ol/centerconstraint + */ + +/** + * @typedef {function((import("./coordinate.js").Coordinate|undefined), number, import("./size.js").Size, boolean=, Array=): (import("./coordinate.js").Coordinate|undefined)} Type + */ + +/** + * @param {import("./extent.js").Extent} extent Extent. + * @param {boolean} onlyCenter If true, the constraint will only apply to the view center. + * @param {boolean} smooth If true, the view will be able to go slightly out of the given extent + * (only during interaction and animation). + * @return {Type} The constraint. + */ + +function createExtent(extent, onlyCenter, smooth) { + return ( + /** + * @param {import("./coordinate.js").Coordinate|undefined} center Center. + * @param {number} resolution Resolution. + * @param {import("./size.js").Size} size Viewport size; unused if `onlyCenter` was specified. + * @param {boolean} [opt_isMoving] True if an interaction or animation is in progress. + * @param {Array} [opt_centerShift] Shift between map center and viewport center. + * @return {import("./coordinate.js").Coordinate|undefined} Center. + */ + function (center, resolution, size, opt_isMoving, opt_centerShift) { + if (center) { + var viewWidth = onlyCenter ? 0 : size[0] * resolution; + var viewHeight = onlyCenter ? 0 : size[1] * resolution; + var shiftX = opt_centerShift ? opt_centerShift[0] : 0; + var shiftY = opt_centerShift ? opt_centerShift[1] : 0; + var minX = extent[0] + viewWidth / 2 + shiftX; + var maxX = extent[2] - viewWidth / 2 + shiftX; + var minY = extent[1] + viewHeight / 2 + shiftY; + var maxY = extent[3] - viewHeight / 2 + shiftY; // note: when zooming out of bounds, min and max values for x and y may + // end up inverted (min > max); this has to be accounted for + + if (minX > maxX) { + minX = (maxX + minX) / 2; + maxX = minX; + } + + if (minY > maxY) { + minY = (maxY + minY) / 2; + maxY = minY; + } + + var x = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.clamp)(center[0], minX, maxX); + var y = (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.clamp)(center[1], minY, maxY); + var ratio = 30 * resolution; // during an interaction, allow some overscroll + + if (opt_isMoving && smooth) { + x += -ratio * Math.log(1 + Math.max(0, minX - center[0]) / ratio) + ratio * Math.log(1 + Math.max(0, center[0] - maxX) / ratio); + y += -ratio * Math.log(1 + Math.max(0, minY - center[1]) / ratio) + ratio * Math.log(1 + Math.max(0, center[1] - maxY) / ratio); + } + + return [x, y]; + } else { + return undefined; + } + } + ); +} +/** + * @param {import("./coordinate.js").Coordinate} [center] Center. + * @return {import("./coordinate.js").Coordinate|undefined} Center. + */ + +function none(center) { + return center; +} + +/***/ }), +/* 95 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "createSnapToResolutions": function() { return /* binding */ createSnapToResolutions; }, +/* harmony export */ "createSnapToPower": function() { return /* binding */ createSnapToPower; }, +/* harmony export */ "createMinMaxResolution": function() { return /* binding */ createMinMaxResolution; } +/* harmony export */ }); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9); +/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11); +/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(31); +/** + * @module ol/resolutionconstraint + */ + + + +/** + * @typedef {function((number|undefined), number, import("./size.js").Size, boolean=): (number|undefined)} Type + */ + +/** + * Returns a modified resolution taking into account the viewport size and maximum + * allowed extent. + * @param {number} resolution Resolution + * @param {import("./extent.js").Extent} maxExtent Maximum allowed extent. + * @param {import("./size.js").Size} viewportSize Viewport size. + * @param {boolean} showFullExtent Whether to show the full extent. + * @return {number} Capped resolution. + */ + +function getViewportClampedResolution(resolution, maxExtent, viewportSize, showFullExtent) { + var xResolution = (0,_extent_js__WEBPACK_IMPORTED_MODULE_0__.getWidth)(maxExtent) / viewportSize[0]; + var yResolution = (0,_extent_js__WEBPACK_IMPORTED_MODULE_0__.getHeight)(maxExtent) / viewportSize[1]; + + if (showFullExtent) { + return Math.min(resolution, Math.max(xResolution, yResolution)); + } + + return Math.min(resolution, Math.min(xResolution, yResolution)); +} +/** + * Returns a modified resolution to be between maxResolution and minResolution while + * still allowing the value to be slightly out of bounds. + * Note: the computation is based on the logarithm function (ln): + * - at 1, ln(x) is 0 + * - above 1, ln(x) keeps increasing but at a much slower pace than x + * The final result is clamped to prevent getting too far away from bounds. + * @param {number} resolution Resolution. + * @param {number} maxResolution Max resolution. + * @param {number} minResolution Min resolution. + * @return {number} Smoothed resolution. + */ + + +function getSmoothClampedResolution(resolution, maxResolution, minResolution) { + var result = Math.min(resolution, maxResolution); + var ratio = 50; + result *= Math.log(1 + ratio * Math.max(0, resolution / maxResolution - 1)) / ratio + 1; + + if (minResolution) { + result = Math.max(result, minResolution); + result /= Math.log(1 + ratio * Math.max(0, minResolution / resolution - 1)) / ratio + 1; + } + + return (0,_math_js__WEBPACK_IMPORTED_MODULE_1__.clamp)(result, minResolution / 2, maxResolution * 2); +} +/** + * @param {Array} resolutions Resolutions. + * @param {boolean} [opt_smooth] If true, the view will be able to slightly exceed resolution limits. Default: true. + * @param {import("./extent.js").Extent} [opt_maxExtent] Maximum allowed extent. + * @param {boolean} [opt_showFullExtent] If true, allows us to show the full extent. Default: false. + * @return {Type} Zoom function. + */ + + +function createSnapToResolutions(resolutions, opt_smooth, opt_maxExtent, opt_showFullExtent) { + return ( + /** + * @param {number|undefined} resolution Resolution. + * @param {number} direction Direction. + * @param {import("./size.js").Size} size Viewport size. + * @param {boolean} [opt_isMoving] True if an interaction or animation is in progress. + * @return {number|undefined} Resolution. + */ + function (resolution, direction, size, opt_isMoving) { + if (resolution !== undefined) { + var maxResolution = resolutions[0]; + var minResolution = resolutions[resolutions.length - 1]; + var cappedMaxRes = opt_maxExtent ? getViewportClampedResolution(maxResolution, opt_maxExtent, size, opt_showFullExtent) : maxResolution; // during interacting or animating, allow intermediary values + + if (opt_isMoving) { + var smooth = opt_smooth !== undefined ? opt_smooth : true; + + if (!smooth) { + return (0,_math_js__WEBPACK_IMPORTED_MODULE_1__.clamp)(resolution, minResolution, cappedMaxRes); + } + + return getSmoothClampedResolution(resolution, cappedMaxRes, minResolution); + } + + var capped = Math.min(cappedMaxRes, resolution); + var z = Math.floor((0,_array_js__WEBPACK_IMPORTED_MODULE_2__.linearFindNearest)(resolutions, capped, direction)); + + if (resolutions[z] > cappedMaxRes && z < resolutions.length - 1) { + return resolutions[z + 1]; + } + + return resolutions[z]; + } else { + return undefined; + } + } + ); +} +/** + * @param {number} power Power. + * @param {number} maxResolution Maximum resolution. + * @param {number} [opt_minResolution] Minimum resolution. + * @param {boolean} [opt_smooth] If true, the view will be able to slightly exceed resolution limits. Default: true. + * @param {import("./extent.js").Extent} [opt_maxExtent] Maximum allowed extent. + * @param {boolean} [opt_showFullExtent] If true, allows us to show the full extent. Default: false. + * @return {Type} Zoom function. + */ + +function createSnapToPower(power, maxResolution, opt_minResolution, opt_smooth, opt_maxExtent, opt_showFullExtent) { + return ( + /** + * @param {number|undefined} resolution Resolution. + * @param {number} direction Direction. + * @param {import("./size.js").Size} size Viewport size. + * @param {boolean} [opt_isMoving] True if an interaction or animation is in progress. + * @return {number|undefined} Resolution. + */ + function (resolution, direction, size, opt_isMoving) { + if (resolution !== undefined) { + var cappedMaxRes = opt_maxExtent ? getViewportClampedResolution(maxResolution, opt_maxExtent, size, opt_showFullExtent) : maxResolution; + var minResolution = opt_minResolution !== undefined ? opt_minResolution : 0; // during interacting or animating, allow intermediary values + + if (opt_isMoving) { + var smooth = opt_smooth !== undefined ? opt_smooth : true; + + if (!smooth) { + return (0,_math_js__WEBPACK_IMPORTED_MODULE_1__.clamp)(resolution, minResolution, cappedMaxRes); + } + + return getSmoothClampedResolution(resolution, cappedMaxRes, minResolution); + } + + var tolerance = 1e-9; + var minZoomLevel = Math.ceil(Math.log(maxResolution / cappedMaxRes) / Math.log(power) - tolerance); + var offset = -direction * (0.5 - tolerance) + 0.5; + var capped = Math.min(cappedMaxRes, resolution); + var cappedZoomLevel = Math.floor(Math.log(maxResolution / capped) / Math.log(power) + offset); + var zoomLevel = Math.max(minZoomLevel, cappedZoomLevel); + var newResolution = maxResolution / Math.pow(power, zoomLevel); + return (0,_math_js__WEBPACK_IMPORTED_MODULE_1__.clamp)(newResolution, minResolution, cappedMaxRes); + } else { + return undefined; + } + } + ); +} +/** + * @param {number} maxResolution Max resolution. + * @param {number} minResolution Min resolution. + * @param {boolean} [opt_smooth] If true, the view will be able to slightly exceed resolution limits. Default: true. + * @param {import("./extent.js").Extent} [opt_maxExtent] Maximum allowed extent. + * @param {boolean} [opt_showFullExtent] If true, allows us to show the full extent. Default: false. + * @return {Type} Zoom function. + */ + +function createMinMaxResolution(maxResolution, minResolution, opt_smooth, opt_maxExtent, opt_showFullExtent) { + return ( + /** + * @param {number|undefined} resolution Resolution. + * @param {number} direction Direction. + * @param {import("./size.js").Size} size Viewport size. + * @param {boolean} [opt_isMoving] True if an interaction or animation is in progress. + * @return {number|undefined} Resolution. + */ + function (resolution, direction, size, opt_isMoving) { + if (resolution !== undefined) { + var cappedMaxRes = opt_maxExtent ? getViewportClampedResolution(maxResolution, opt_maxExtent, size, opt_showFullExtent) : maxResolution; + var smooth = opt_smooth !== undefined ? opt_smooth : true; + + if (!smooth || !opt_isMoving) { + return (0,_math_js__WEBPACK_IMPORTED_MODULE_1__.clamp)(resolution, minResolution, cappedMaxRes); + } + + return getSmoothClampedResolution(resolution, cappedMaxRes, minResolution); + } else { + return undefined; + } + } + ); +} + +/***/ }), +/* 96 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "DEFAULT_MAX_ZOOM": function() { return /* binding */ DEFAULT_MAX_ZOOM; }, +/* harmony export */ "DEFAULT_TILE_SIZE": function() { return /* binding */ DEFAULT_TILE_SIZE; } +/* harmony export */ }); +/** + * @module ol/tilegrid/common + */ + +/** + * Default maximum zoom for default tile grids. + * @type {number} + */ +var DEFAULT_MAX_ZOOM = 42; +/** + * Default tile size. + * @type {number} + */ + +var DEFAULT_TILE_SIZE = 256; + +/***/ }), +/* 97 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "disable": function() { return /* binding */ disable; }, +/* harmony export */ "none": function() { return /* binding */ none; }, +/* harmony export */ "createSnapToN": function() { return /* binding */ createSnapToN; }, +/* harmony export */ "createSnapToZero": function() { return /* binding */ createSnapToZero; } +/* harmony export */ }); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9); +/** + * @module ol/rotationconstraint + */ + +/** + * @typedef {function((number|undefined), boolean=): (number|undefined)} Type + */ + +/** + * @param {number|undefined} rotation Rotation. + * @return {number|undefined} Rotation. + */ + +function disable(rotation) { + if (rotation !== undefined) { + return 0; + } else { + return undefined; + } +} +/** + * @param {number|undefined} rotation Rotation. + * @return {number|undefined} Rotation. + */ + +function none(rotation) { + if (rotation !== undefined) { + return rotation; + } else { + return undefined; + } +} +/** + * @param {number} n N. + * @return {Type} Rotation constraint. + */ + +function createSnapToN(n) { + var theta = 2 * Math.PI / n; + return ( + /** + * @param {number|undefined} rotation Rotation. + * @param {boolean} [opt_isMoving] True if an interaction or animation is in progress. + * @return {number|undefined} Rotation. + */ + function (rotation, opt_isMoving) { + if (opt_isMoving) { + return rotation; + } + + if (rotation !== undefined) { + rotation = Math.floor(rotation / theta + 0.5) * theta; + return rotation; + } else { + return undefined; + } + } + ); +} +/** + * @param {number} [opt_tolerance] Tolerance. + * @return {Type} Rotation constraint. + */ + +function createSnapToZero(opt_tolerance) { + var tolerance = opt_tolerance || (0,_math_js__WEBPACK_IMPORTED_MODULE_0__.toRadians)(5); + return ( + /** + * @param {number|undefined} rotation Rotation. + * @param {boolean} [opt_isMoving] True if an interaction or animation is in progress. + * @return {number|undefined} Rotation. + */ + function (rotation, opt_isMoving) { + if (opt_isMoving) { + return rotation; + } + + if (rotation !== undefined) { + if (Math.abs(rotation) <= tolerance) { + return 0; + } else { + return rotation; + } + } else { + return undefined; + } + } + ); +} + +/***/ }), +/* 98 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _MapEvent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(99); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/MapBrowserEvent + */ + + + +/** + * @classdesc + * Events emitted as map browser events are instances of this type. + * See {@link module:ol/PluggableMap~PluggableMap} for which events trigger a map browser event. + * @template {UIEvent} EVENT + */ + +var MapBrowserEvent = +/** @class */ +function (_super) { + __extends(MapBrowserEvent, _super); + /** + * @param {string} type Event type. + * @param {import("./PluggableMap.js").default} map Map. + * @param {EVENT} originalEvent Original event. + * @param {boolean} [opt_dragging] Is the map currently being dragged? + * @param {?import("./PluggableMap.js").FrameState} [opt_frameState] Frame state. + */ + + + function MapBrowserEvent(type, map, originalEvent, opt_dragging, opt_frameState) { + var _this = _super.call(this, type, map, opt_frameState) || this; + /** + * The original browser event. + * @const + * @type {EVENT} + * @api + */ + + + _this.originalEvent = originalEvent; + /** + * The map pixel relative to the viewport corresponding to the original browser event. + * @type {?import("./pixel.js").Pixel} + */ + + _this.pixel_ = null; + /** + * The coordinate in the user projection corresponding to the original browser event. + * @type {?import("./coordinate.js").Coordinate} + */ + + _this.coordinate_ = null; + /** + * Indicates if the map is currently being dragged. Only set for + * `POINTERDRAG` and `POINTERMOVE` events. Default is `false`. + * + * @type {boolean} + * @api + */ + + _this.dragging = opt_dragging !== undefined ? opt_dragging : false; + return _this; + } + + Object.defineProperty(MapBrowserEvent.prototype, "pixel", { + /** + * The map pixel relative to the viewport corresponding to the original event. + * @type {import("./pixel.js").Pixel} + * @api + */ + get: function get() { + if (!this.pixel_) { + this.pixel_ = this.map.getEventPixel(this.originalEvent); + } + + return this.pixel_; + }, + set: function set(pixel) { + this.pixel_ = pixel; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(MapBrowserEvent.prototype, "coordinate", { + /** + * The coordinate corresponding to the original browser event. This will be in the user + * projection if one is set. Otherwise it will be in the view projection. + * @type {import("./coordinate.js").Coordinate} + * @api + */ + get: function get() { + if (!this.coordinate_) { + this.coordinate_ = this.map.getCoordinateFromPixel(this.pixel); + } + + return this.coordinate_; + }, + set: function set(coordinate) { + this.coordinate_ = coordinate; + }, + enumerable: false, + configurable: true + }); + /** + * Prevents the default browser action. + * See https://developer.mozilla.org/en-US/docs/Web/API/event.preventDefault. + * @api + */ + + MapBrowserEvent.prototype.preventDefault = function () { + _super.prototype.preventDefault.call(this); + + if ('preventDefault' in this.originalEvent) { + /** @type {UIEvent} */ + this.originalEvent.preventDefault(); + } + }; + /** + * Prevents further propagation of the current event. + * See https://developer.mozilla.org/en-US/docs/Web/API/event.stopPropagation. + * @api + */ + + + MapBrowserEvent.prototype.stopPropagation = function () { + _super.prototype.stopPropagation.call(this); + + if ('stopPropagation' in this.originalEvent) { + /** @type {UIEvent} */ + this.originalEvent.stopPropagation(); + } + }; + + return MapBrowserEvent; +}(_MapEvent_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (MapBrowserEvent); + +/***/ }), +/* 99 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _events_Event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/MapEvent + */ + + + +/** + * @classdesc + * Events emitted as map events are instances of this type. + * See {@link module:ol/PluggableMap~PluggableMap} for which events trigger a map event. + */ + +var MapEvent = +/** @class */ +function (_super) { + __extends(MapEvent, _super); + /** + * @param {string} type Event type. + * @param {import("./PluggableMap.js").default} map Map. + * @param {?import("./PluggableMap.js").FrameState} [opt_frameState] Frame state. + */ + + + function MapEvent(type, map, opt_frameState) { + var _this = _super.call(this, type) || this; + /** + * The map where the event occurred. + * @type {import("./PluggableMap.js").default} + * @api + */ + + + _this.map = map; + /** + * The frame state at the time of the event. + * @type {?import("./PluggableMap.js").FrameState} + * @api + */ + + _this.frameState = opt_frameState !== undefined ? opt_frameState : null; + return _this; + } + + return MapEvent; +}(_events_Event_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (MapEvent); + +/***/ }), +/* 100 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27); +/* harmony import */ var _MapBrowserEvent_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(98); +/* harmony import */ var _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(101); +/* harmony import */ var _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(79); +/* harmony import */ var _events_Target_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(29); +/* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(54); +/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(30); +/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28); +/** + * @module ol/MapBrowserEventHandler + */ +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); + + + + + + + + + + +var MapBrowserEventHandler = +/** @class */ +function (_super) { + __extends(MapBrowserEventHandler, _super); + /** + * @param {import("./PluggableMap.js").default} map The map with the viewport to listen to events on. + * @param {number} [moveTolerance] The minimal distance the pointer must travel to trigger a move. + */ + + + function MapBrowserEventHandler(map, moveTolerance) { + var _this = _super.call(this, map) || this; + /** + * This is the element that we will listen to the real events on. + * @type {import("./PluggableMap.js").default} + * @private + */ + + + _this.map_ = map; + /** + * @type {any} + * @private + */ + + _this.clickTimeoutId_; + /** + * Emulate dblclick and singleclick. Will be true when only one pointer is active. + * @type {boolean} + */ + + _this.emulateClicks_ = false; + /** + * @type {boolean} + * @private + */ + + _this.dragging_ = false; + /** + * @type {!Array} + * @private + */ + + _this.dragListenerKeys_ = []; + /** + * @type {number} + * @private + */ + + _this.moveTolerance_ = moveTolerance === undefined ? 1 : moveTolerance; + /** + * The most recent "down" type event (or null if none have occurred). + * Set on pointerdown. + * @type {PointerEvent} + * @private + */ + + _this.down_ = null; + + var element = _this.map_.getViewport(); + /** + * @type {number} + * @private + */ + + + _this.activePointers_ = 0; + /** + * @type {!Object} + * @private + */ + + _this.trackedTouches_ = {}; + _this.element_ = element; + /** + * @type {?import("./events.js").EventsKey} + * @private + */ + + _this.pointerdownListenerKey_ = (0,_events_js__WEBPACK_IMPORTED_MODULE_0__.listen)(element, _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_1__["default"].POINTERDOWN, _this.handlePointerDown_, _this); + /** + * @type {PointerEvent} + * @private + */ + + _this.originalPointerMoveEvent_; + /** + * @type {?import("./events.js").EventsKey} + * @private + */ + + _this.relayedListenerKey_ = (0,_events_js__WEBPACK_IMPORTED_MODULE_0__.listen)(element, _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_1__["default"].POINTERMOVE, _this.relayEvent_, _this); + /** + * @private + */ + + _this.boundHandleTouchMove_ = _this.handleTouchMove_.bind(_this); + + _this.element_.addEventListener(_events_EventType_js__WEBPACK_IMPORTED_MODULE_2__["default"].TOUCHMOVE, _this.boundHandleTouchMove_, _has_js__WEBPACK_IMPORTED_MODULE_3__.PASSIVE_EVENT_LISTENERS ? { + passive: false + } : false); + + return _this; + } + /** + * @param {PointerEvent} pointerEvent Pointer + * event. + * @private + */ + + + MapBrowserEventHandler.prototype.emulateClick_ = function (pointerEvent) { + var newEvent = new _MapBrowserEvent_js__WEBPACK_IMPORTED_MODULE_4__["default"](_MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].CLICK, this.map_, pointerEvent); + this.dispatchEvent(newEvent); + + if (this.clickTimeoutId_ !== undefined) { + // double-click + clearTimeout(this.clickTimeoutId_); + this.clickTimeoutId_ = undefined; + newEvent = new _MapBrowserEvent_js__WEBPACK_IMPORTED_MODULE_4__["default"](_MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].DBLCLICK, this.map_, pointerEvent); + this.dispatchEvent(newEvent); + } else { + // click + this.clickTimeoutId_ = setTimeout( + /** @this {MapBrowserEventHandler} */ + function () { + this.clickTimeoutId_ = undefined; + var newEvent = new _MapBrowserEvent_js__WEBPACK_IMPORTED_MODULE_4__["default"](_MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].SINGLECLICK, this.map_, pointerEvent); + this.dispatchEvent(newEvent); + }.bind(this), 250); + } + }; + /** + * Keeps track on how many pointers are currently active. + * + * @param {PointerEvent} pointerEvent Pointer + * event. + * @private + */ + + + MapBrowserEventHandler.prototype.updateActivePointers_ = function (pointerEvent) { + var event = pointerEvent; + + if (event.type == _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].POINTERUP || event.type == _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].POINTERCANCEL) { + delete this.trackedTouches_[event.pointerId]; + } else if (event.type == _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].POINTERDOWN) { + this.trackedTouches_[event.pointerId] = true; + } + + this.activePointers_ = Object.keys(this.trackedTouches_).length; + }; + /** + * @param {PointerEvent} pointerEvent Pointer + * event. + * @private + */ + + + MapBrowserEventHandler.prototype.handlePointerUp_ = function (pointerEvent) { + this.updateActivePointers_(pointerEvent); + var newEvent = new _MapBrowserEvent_js__WEBPACK_IMPORTED_MODULE_4__["default"](_MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].POINTERUP, this.map_, pointerEvent); + this.dispatchEvent(newEvent); // We emulate click events on left mouse button click, touch contact, and pen + // contact. isMouseActionButton returns true in these cases (evt.button is set + // to 0). + // See http://www.w3.org/TR/pointerevents/#button-states + // We only fire click, singleclick, and doubleclick if nobody has called + // event.preventDefault(). + + if (this.emulateClicks_ && !newEvent.defaultPrevented && !this.dragging_ && this.isMouseActionButton_(pointerEvent)) { + this.emulateClick_(this.down_); + } + + if (this.activePointers_ === 0) { + this.dragListenerKeys_.forEach(_events_js__WEBPACK_IMPORTED_MODULE_0__.unlistenByKey); + this.dragListenerKeys_.length = 0; + this.dragging_ = false; + this.down_ = null; + } + }; + /** + * @param {PointerEvent} pointerEvent Pointer + * event. + * @return {boolean} If the left mouse button was pressed. + * @private + */ + + + MapBrowserEventHandler.prototype.isMouseActionButton_ = function (pointerEvent) { + return pointerEvent.button === 0; + }; + /** + * @param {PointerEvent} pointerEvent Pointer + * event. + * @private + */ + + + MapBrowserEventHandler.prototype.handlePointerDown_ = function (pointerEvent) { + this.emulateClicks_ = this.activePointers_ === 0; + this.updateActivePointers_(pointerEvent); + var newEvent = new _MapBrowserEvent_js__WEBPACK_IMPORTED_MODULE_4__["default"](_MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].POINTERDOWN, this.map_, pointerEvent); + this.dispatchEvent(newEvent); // Store a copy of the down event + + this.down_ = + /** @type {PointerEvent} */ + {}; + + for (var property in pointerEvent) { + var value = pointerEvent[property]; + this.down_[property] = typeof value === 'function' ? _functions_js__WEBPACK_IMPORTED_MODULE_6__.VOID : value; + } + + if (this.dragListenerKeys_.length === 0) { + var doc = this.map_.getOwnerDocument(); + this.dragListenerKeys_.push((0,_events_js__WEBPACK_IMPORTED_MODULE_0__.listen)(doc, _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].POINTERMOVE, this.handlePointerMove_, this), (0,_events_js__WEBPACK_IMPORTED_MODULE_0__.listen)(doc, _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].POINTERUP, this.handlePointerUp_, this), + /* Note that the listener for `pointercancel is set up on + * `pointerEventHandler_` and not `documentPointerEventHandler_` like + * the `pointerup` and `pointermove` listeners. + * + * The reason for this is the following: `TouchSource.vacuumTouches_()` + * issues `pointercancel` events, when there was no `touchend` for a + * `touchstart`. Now, let's say a first `touchstart` is registered on + * `pointerEventHandler_`. The `documentPointerEventHandler_` is set up. + * But `documentPointerEventHandler_` doesn't know about the first + * `touchstart`. If there is no `touchend` for the `touchstart`, we can + * only receive a `touchcancel` from `pointerEventHandler_`, because it is + * only registered there. + */ + (0,_events_js__WEBPACK_IMPORTED_MODULE_0__.listen)(this.element_, _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].POINTERCANCEL, this.handlePointerUp_, this)); + + if (this.element_.getRootNode && this.element_.getRootNode() !== doc) { + this.dragListenerKeys_.push((0,_events_js__WEBPACK_IMPORTED_MODULE_0__.listen)(this.element_.getRootNode(), _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].POINTERUP, this.handlePointerUp_, this)); + } + } + }; + /** + * @param {PointerEvent} pointerEvent Pointer + * event. + * @private + */ + + + MapBrowserEventHandler.prototype.handlePointerMove_ = function (pointerEvent) { + // Between pointerdown and pointerup, pointermove events are triggered. + // To avoid a 'false' touchmove event to be dispatched, we test if the pointer + // moved a significant distance. + if (this.isMoving_(pointerEvent)) { + this.dragging_ = true; + var newEvent = new _MapBrowserEvent_js__WEBPACK_IMPORTED_MODULE_4__["default"](_MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].POINTERDRAG, this.map_, pointerEvent, this.dragging_); + this.dispatchEvent(newEvent); + } + }; + /** + * Wrap and relay a pointer event. Note that this requires that the type + * string for the MapBrowserEvent matches the PointerEvent type. + * @param {PointerEvent} pointerEvent Pointer + * event. + * @private + */ + + + MapBrowserEventHandler.prototype.relayEvent_ = function (pointerEvent) { + this.originalPointerMoveEvent_ = pointerEvent; + var dragging = !!(this.down_ && this.isMoving_(pointerEvent)); + this.dispatchEvent(new _MapBrowserEvent_js__WEBPACK_IMPORTED_MODULE_4__["default"](pointerEvent.type, this.map_, pointerEvent, dragging)); + }; + /** + * Flexible handling of a `touch-action: none` css equivalent: because calling + * `preventDefault()` on a `pointermove` event does not stop native page scrolling + * and zooming, we also listen for `touchmove` and call `preventDefault()` on it + * when an interaction (currently `DragPan` handles the event. + * @param {TouchEvent} event Event. + * @private + */ + + + MapBrowserEventHandler.prototype.handleTouchMove_ = function (event) { + // Due to https://github.com/mpizenberg/elm-pep/issues/2, `this.originalPointerMoveEvent_` + // may not be initialized yet when we get here on a platform without native pointer events. + var originalEvent = this.originalPointerMoveEvent_; + + if ((!originalEvent || originalEvent.defaultPrevented) && (typeof event.cancelable !== 'boolean' || event.cancelable === true)) { + event.preventDefault(); + } + }; + /** + * @param {PointerEvent} pointerEvent Pointer + * event. + * @return {boolean} Is moving. + * @private + */ + + + MapBrowserEventHandler.prototype.isMoving_ = function (pointerEvent) { + return this.dragging_ || Math.abs(pointerEvent.clientX - this.down_.clientX) > this.moveTolerance_ || Math.abs(pointerEvent.clientY - this.down_.clientY) > this.moveTolerance_; + }; + /** + * Clean up. + */ + + + MapBrowserEventHandler.prototype.disposeInternal = function () { + if (this.relayedListenerKey_) { + (0,_events_js__WEBPACK_IMPORTED_MODULE_0__.unlistenByKey)(this.relayedListenerKey_); + this.relayedListenerKey_ = null; + } + + this.element_.removeEventListener(_events_EventType_js__WEBPACK_IMPORTED_MODULE_2__["default"].TOUCHMOVE, this.boundHandleTouchMove_); + + if (this.pointerdownListenerKey_) { + (0,_events_js__WEBPACK_IMPORTED_MODULE_0__.unlistenByKey)(this.pointerdownListenerKey_); + this.pointerdownListenerKey_ = null; + } + + this.dragListenerKeys_.forEach(_events_js__WEBPACK_IMPORTED_MODULE_0__.unlistenByKey); + this.dragListenerKeys_.length = 0; + this.element_ = null; + + _super.prototype.disposeInternal.call(this); + }; + + return MapBrowserEventHandler; +}(_events_Target_js__WEBPACK_IMPORTED_MODULE_7__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (MapBrowserEventHandler); + +/***/ }), +/* 101 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27); +/** + * @module ol/MapBrowserEventType + */ + +/** + * Constants for event names. + * @enum {string} + */ + +/* harmony default export */ __webpack_exports__["default"] = ({ + /** + * A true single click with no dragging and no double click. Note that this + * event is delayed by 250 ms to ensure that it is not a double click. + * @event module:ol/MapBrowserEvent~MapBrowserEvent#singleclick + * @api + */ + SINGLECLICK: 'singleclick', + + /** + * A click with no dragging. A double click will fire two of this. + * @event module:ol/MapBrowserEvent~MapBrowserEvent#click + * @api + */ + CLICK: _events_EventType_js__WEBPACK_IMPORTED_MODULE_0__["default"].CLICK, + + /** + * A true double click, with no dragging. + * @event module:ol/MapBrowserEvent~MapBrowserEvent#dblclick + * @api + */ + DBLCLICK: _events_EventType_js__WEBPACK_IMPORTED_MODULE_0__["default"].DBLCLICK, + + /** + * Triggered when a pointer is dragged. + * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointerdrag + * @api + */ + POINTERDRAG: 'pointerdrag', + + /** + * Triggered when a pointer is moved. Note that on touch devices this is + * triggered when the map is panned, so is not the same as mousemove. + * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointermove + * @api + */ + POINTERMOVE: 'pointermove', + POINTERDOWN: 'pointerdown', + POINTERUP: 'pointerup', + POINTEROVER: 'pointerover', + POINTEROUT: 'pointerout', + POINTERENTER: 'pointerenter', + POINTERLEAVE: 'pointerleave', + POINTERCANCEL: 'pointercancel' +}); +/*** + * @typedef {'singleclick'|'click'|'dblclick'|'pointerdrag'|'pointermove'} Types + */ + +/***/ }), +/* 102 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "buffer": function() { return /* binding */ buffer; }, +/* harmony export */ "hasArea": function() { return /* binding */ hasArea; }, +/* harmony export */ "scale": function() { return /* binding */ scale; }, +/* harmony export */ "toSize": function() { return /* binding */ toSize; } +/* harmony export */ }); +/** + * @module ol/size + */ + +/** + * An array of numbers representing a size: `[width, height]`. + * @typedef {Array} Size + * @api + */ + +/** + * Returns a buffered size. + * @param {Size} size Size. + * @param {number} num The amount by which to buffer. + * @param {Size} [opt_size] Optional reusable size array. + * @return {Size} The buffered size. + */ +function buffer(size, num, opt_size) { + if (opt_size === undefined) { + opt_size = [0, 0]; + } + + opt_size[0] = size[0] + 2 * num; + opt_size[1] = size[1] + 2 * num; + return opt_size; +} +/** + * Determines if a size has a positive area. + * @param {Size} size The size to test. + * @return {boolean} The size has a positive area. + */ + +function hasArea(size) { + return size[0] > 0 && size[1] > 0; +} +/** + * Returns a size scaled by a ratio. The result will be an array of integers. + * @param {Size} size Size. + * @param {number} ratio Ratio. + * @param {Size} [opt_size] Optional reusable size array. + * @return {Size} The scaled size. + */ + +function scale(size, ratio, opt_size) { + if (opt_size === undefined) { + opt_size = [0, 0]; + } + + opt_size[0] = size[0] * ratio + 0.5 | 0; + opt_size[1] = size[1] * ratio + 0.5 | 0; + return opt_size; +} +/** + * Returns an `Size` array for the passed in number (meaning: square) or + * `Size` array. + * (meaning: non-square), + * @param {number|Size} size Width and height. + * @param {Size} [opt_size] Optional reusable size array. + * @return {Size} Size. + * @api + */ + +function toSize(size, opt_size) { + if (Array.isArray(size)) { + return size; + } else { + if (opt_size === undefined) { + opt_size = [size, size]; + } else { + opt_size[0] = size; + opt_size[1] = size; + } + + return opt_size; + } +} + +/***/ }), +/* 103 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Base_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(74); +/* harmony import */ var _Collection_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21); +/* harmony import */ var _CollectionEventType_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(23); +/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(27); +/* harmony import */ var _ObjectEventType_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(25); +/* harmony import */ var _source_State_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(72); +/* harmony import */ var _asserts_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14); +/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7); +/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(11); +/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(16); +/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(28); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/layer/Group + */ + + + + + + + + + + + + + +/*** + * @template Return + * @typedef {import("../Observable").OnSignature & + * import("../Observable").OnSignature & + * import("../Observable").CombinedOnSignature} GroupOnSignature + */ + +/** + * @typedef {Object} Options + * @property {number} [opacity=1] Opacity (0, 1). + * @property {boolean} [visible=true] Visibility. + * @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be + * rendered outside of this extent. + * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers + * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed + * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()` + * method was used. + * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be + * visible. + * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will + * be visible. + * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be + * visible. + * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will + * be visible. + * @property {Array|import("../Collection.js").default} [layers] Child layers. + * @property {Object} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`. + */ + +/** + * @enum {string} + * @private + */ + +var Property = { + LAYERS: 'layers' +}; +/** + * @classdesc + * A {@link module:ol/Collection~Collection} of layers that are handled together. + * + * A generic `change` event is triggered when the group/Collection changes. + * + * @api + */ + +var LayerGroup = +/** @class */ +function (_super) { + __extends(LayerGroup, _super); + /** + * @param {Options} [opt_options] Layer options. + */ + + + function LayerGroup(opt_options) { + var _this = this; + + var options = opt_options || {}; + var baseOptions = + /** @type {Options} */ + (0,_obj_js__WEBPACK_IMPORTED_MODULE_0__.assign)({}, options); + delete baseOptions.layers; + var layers = options.layers; + _this = _super.call(this, baseOptions) || this; + /*** + * @type {GroupOnSignature} + */ + + _this.on; + /*** + * @type {GroupOnSignature} + */ + + _this.once; + /*** + * @type {GroupOnSignature} + */ + + _this.un; + /** + * @private + * @type {Array} + */ + + _this.layersListenerKeys_ = []; + /** + * @private + * @type {Object>} + */ + + _this.listenerKeys_ = {}; + + _this.addChangeListener(Property.LAYERS, _this.handleLayersChanged_); + + if (layers) { + if (Array.isArray(layers)) { + layers = new _Collection_js__WEBPACK_IMPORTED_MODULE_1__["default"](layers.slice(), { + unique: true + }); + } else { + (0,_asserts_js__WEBPACK_IMPORTED_MODULE_2__.assert)(typeof + /** @type {?} */ + layers.getArray === 'function', 43); // Expected `layers` to be an array or a `Collection` + } + } else { + layers = new _Collection_js__WEBPACK_IMPORTED_MODULE_1__["default"](undefined, { + unique: true + }); + } + + _this.setLayers(layers); + + return _this; + } + /** + * @private + */ + + + LayerGroup.prototype.handleLayerChange_ = function () { + this.changed(); + }; + /** + * @private + */ + + + LayerGroup.prototype.handleLayersChanged_ = function () { + this.layersListenerKeys_.forEach(_events_js__WEBPACK_IMPORTED_MODULE_3__.unlistenByKey); + this.layersListenerKeys_.length = 0; + var layers = this.getLayers(); + this.layersListenerKeys_.push((0,_events_js__WEBPACK_IMPORTED_MODULE_3__.listen)(layers, _CollectionEventType_js__WEBPACK_IMPORTED_MODULE_4__["default"].ADD, this.handleLayersAdd_, this), (0,_events_js__WEBPACK_IMPORTED_MODULE_3__.listen)(layers, _CollectionEventType_js__WEBPACK_IMPORTED_MODULE_4__["default"].REMOVE, this.handleLayersRemove_, this)); + + for (var id in this.listenerKeys_) { + this.listenerKeys_[id].forEach(_events_js__WEBPACK_IMPORTED_MODULE_3__.unlistenByKey); + } + + (0,_obj_js__WEBPACK_IMPORTED_MODULE_0__.clear)(this.listenerKeys_); + var layersArray = layers.getArray(); + + for (var i = 0, ii = layersArray.length; i < ii; i++) { + var layer = layersArray[i]; + this.listenerKeys_[(0,_util_js__WEBPACK_IMPORTED_MODULE_5__.getUid)(layer)] = [(0,_events_js__WEBPACK_IMPORTED_MODULE_3__.listen)(layer, _ObjectEventType_js__WEBPACK_IMPORTED_MODULE_6__["default"].PROPERTYCHANGE, this.handleLayerChange_, this), (0,_events_js__WEBPACK_IMPORTED_MODULE_3__.listen)(layer, _events_EventType_js__WEBPACK_IMPORTED_MODULE_7__["default"].CHANGE, this.handleLayerChange_, this)]; + } + + this.changed(); + }; + /** + * @param {import("../Collection.js").CollectionEvent} collectionEvent CollectionEvent. + * @private + */ + + + LayerGroup.prototype.handleLayersAdd_ = function (collectionEvent) { + var layer = + /** @type {import("./Base.js").default} */ + collectionEvent.element; + this.listenerKeys_[(0,_util_js__WEBPACK_IMPORTED_MODULE_5__.getUid)(layer)] = [(0,_events_js__WEBPACK_IMPORTED_MODULE_3__.listen)(layer, _ObjectEventType_js__WEBPACK_IMPORTED_MODULE_6__["default"].PROPERTYCHANGE, this.handleLayerChange_, this), (0,_events_js__WEBPACK_IMPORTED_MODULE_3__.listen)(layer, _events_EventType_js__WEBPACK_IMPORTED_MODULE_7__["default"].CHANGE, this.handleLayerChange_, this)]; + this.changed(); + }; + /** + * @param {import("../Collection.js").CollectionEvent} collectionEvent CollectionEvent. + * @private + */ + + + LayerGroup.prototype.handleLayersRemove_ = function (collectionEvent) { + var layer = + /** @type {import("./Base.js").default} */ + collectionEvent.element; + var key = (0,_util_js__WEBPACK_IMPORTED_MODULE_5__.getUid)(layer); + this.listenerKeys_[key].forEach(_events_js__WEBPACK_IMPORTED_MODULE_3__.unlistenByKey); + delete this.listenerKeys_[key]; + this.changed(); + }; + /** + * Returns the {@link module:ol/Collection collection} of {@link module:ol/layer/Layer~Layer layers} + * in this group. + * @return {!import("../Collection.js").default} Collection of + * {@link module:ol/layer/Base layers} that are part of this group. + * @observable + * @api + */ + + + LayerGroup.prototype.getLayers = function () { + return ( + /** @type {!import("../Collection.js").default} */ + this.get(Property.LAYERS) + ); + }; + /** + * Set the {@link module:ol/Collection collection} of {@link module:ol/layer/Layer~Layer layers} + * in this group. + * @param {!import("../Collection.js").default} layers Collection of + * {@link module:ol/layer/Base layers} that are part of this group. + * @observable + * @api + */ + + + LayerGroup.prototype.setLayers = function (layers) { + this.set(Property.LAYERS, layers); + }; + /** + * @param {Array} [opt_array] Array of layers (to be modified in place). + * @return {Array} Array of layers. + */ + + + LayerGroup.prototype.getLayersArray = function (opt_array) { + var array = opt_array !== undefined ? opt_array : []; + this.getLayers().forEach(function (layer) { + layer.getLayersArray(array); + }); + return array; + }; + /** + * Get the layer states list and use this groups z-index as the default + * for all layers in this and nested groups, if it is unset at this point. + * If opt_states is not provided and this group's z-index is undefined + * 0 is used a the default z-index. + * @param {Array} [opt_states] Optional list + * of layer states (to be modified in place). + * @return {Array} List of layer states. + */ + + + LayerGroup.prototype.getLayerStatesArray = function (opt_states) { + var states = opt_states !== undefined ? opt_states : []; + var pos = states.length; + this.getLayers().forEach(function (layer) { + layer.getLayerStatesArray(states); + }); + var ownLayerState = this.getLayerState(); + var defaultZIndex = ownLayerState.zIndex; + + if (!opt_states && ownLayerState.zIndex === undefined) { + defaultZIndex = 0; + } + + for (var i = pos, ii = states.length; i < ii; i++) { + var layerState = states[i]; + layerState.opacity *= ownLayerState.opacity; + layerState.visible = layerState.visible && ownLayerState.visible; + layerState.maxResolution = Math.min(layerState.maxResolution, ownLayerState.maxResolution); + layerState.minResolution = Math.max(layerState.minResolution, ownLayerState.minResolution); + layerState.minZoom = Math.max(layerState.minZoom, ownLayerState.minZoom); + layerState.maxZoom = Math.min(layerState.maxZoom, ownLayerState.maxZoom); + + if (ownLayerState.extent !== undefined) { + if (layerState.extent !== undefined) { + layerState.extent = (0,_extent_js__WEBPACK_IMPORTED_MODULE_8__.getIntersection)(layerState.extent, ownLayerState.extent); + } else { + layerState.extent = ownLayerState.extent; + } + } + + if (layerState.zIndex === undefined) { + layerState.zIndex = defaultZIndex; + } + } + + return states; + }; + /** + * @return {import("../source/State.js").default} Source state. + */ + + + LayerGroup.prototype.getSourceState = function () { + return _source_State_js__WEBPACK_IMPORTED_MODULE_9__["default"].READY; + }; + + return LayerGroup; +}(_Base_js__WEBPACK_IMPORTED_MODULE_10__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (LayerGroup); + +/***/ }), +/* 104 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Object_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(24); +/* harmony import */ var _MapEventType_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(76); +/* harmony import */ var _OverlayPositioning_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(105); +/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(69); +/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(11); +/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(28); +/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(64); +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/Overlay + */ + + + + + + + + + +/** + * @typedef {Object} Options + * @property {number|string} [id] Set the overlay id. The overlay id can be used + * with the {@link module:ol/Map~Map#getOverlayById} method. + * @property {HTMLElement} [element] The overlay element. + * @property {Array} [offset=[0, 0]] Offsets in pixels used when positioning + * the overlay. The first element in the + * array is the horizontal offset. A positive value shifts the overlay right. + * The second element in the array is the vertical offset. A positive value + * shifts the overlay down. + * @property {import("./coordinate.js").Coordinate} [position] The overlay position + * in map projection. + * @property {import("./OverlayPositioning.js").default} [positioning='top-left'] Defines how + * the overlay is actually positioned with respect to its `position` property. + * Possible values are `'bottom-left'`, `'bottom-center'`, `'bottom-right'`, + * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`, + * `'top-center'`, and `'top-right'`. + * @property {boolean} [stopEvent=true] Whether event propagation to the map + * viewport should be stopped. If `true` the overlay is placed in the same + * container as that of the controls (CSS class name + * `ol-overlaycontainer-stopevent`); if `false` it is placed in the container + * with CSS class name specified by the `className` property. + * @property {boolean} [insertFirst=true] Whether the overlay is inserted first + * in the overlay container, or appended. If the overlay is placed in the same + * container as that of the controls (see the `stopEvent` option) you will + * probably set `insertFirst` to `true` so the overlay is displayed below the + * controls. + * @property {PanIntoViewOptions|boolean} [autoPan=false] Pan the map when calling + * `setPosition`, so that the overlay is entirely visible in the current viewport? + * If `true` (deprecated), then `autoPanAnimation` and `autoPanMargin` will be + * used to determine the panning parameters; if an object is supplied then other + * parameters are ignored. + * @property {PanOptions} [autoPanAnimation] The animation options used to pan + * the overlay into view. This animation is only used when `autoPan` is enabled. + * A `duration` and `easing` may be provided to customize the animation. + * Deprecated and ignored if `autoPan` is supplied as an object. + * @property {number} [autoPanMargin=20] The margin (in pixels) between the + * overlay and the borders of the map when autopanning. Deprecated and ignored + * if `autoPan` is supplied as an object. + * @property {PanIntoViewOptions} [autoPanOptions] The options to use for the + * autoPan. This is only used when `autoPan` is enabled and has preference over + * the individual `autoPanMargin` and `autoPanOptions`. + * @property {string} [className='ol-overlay-container ol-selectable'] CSS class + * name. + */ + +/** + * @typedef {Object} PanOptions + * @property {number} [duration=1000] The duration of the animation in + * milliseconds. + * @property {function(number):number} [easing] The easing function to use. Can + * be one from {@link module:ol/easing} or a custom function. + * Default is {@link module:ol/easing.inAndOut}. + */ + +/** + * @typedef {Object} PanIntoViewOptions + * @property {PanOptions} [animation={}] The animation parameters for the pan + * @property {number} [margin=20] The margin (in pixels) between the + * overlay and the borders of the map when panning into view. + */ + +/** + * @enum {string} + * @protected + */ + +var Property = { + ELEMENT: 'element', + MAP: 'map', + OFFSET: 'offset', + POSITION: 'position', + POSITIONING: 'positioning' +}; +/** + * @typedef {import("./ObjectEventType").Types|'change:element'|'change:map'|'change:offset'|'change:position'| + * 'change:positioning'} OverlayObjectEventTypes + */ + +/*** + * @template Return + * @typedef {import("./Observable").OnSignature & + * import("./Observable").OnSignature & + * import("./Observable").CombinedOnSignature} OverlayOnSignature + */ + +/** + * @classdesc + * An element to be displayed over the map and attached to a single map + * location. Like {@link module:ol/control/Control~Control}, Overlays are + * visible widgets. Unlike Controls, they are not in a fixed position on the + * screen, but are tied to a geographical coordinate, so panning the map will + * move an Overlay but not a Control. + * + * Example: + * + * import Overlay from 'ol/Overlay'; + * + * var popup = new Overlay({ + * element: document.getElementById('popup') + * }); + * popup.setPosition(coordinate); + * map.addOverlay(popup); + * + * @api + */ + +var Overlay = +/** @class */ +function (_super) { + __extends(Overlay, _super); + /** + * @param {Options} options Overlay options. + */ + + + function Overlay(options) { + var _this = _super.call(this) || this; + /*** + * @type {OverlayOnSignature} + */ + + + _this.on; + /*** + * @type {OverlayOnSignature} + */ + + _this.once; + /*** + * @type {OverlayOnSignature} + */ + + _this.un; + /** + * @protected + * @type {Options} + */ + + _this.options = options; + /** + * @protected + * @type {number|string|undefined} + */ + + _this.id = options.id; + /** + * @protected + * @type {boolean} + */ + + _this.insertFirst = options.insertFirst !== undefined ? options.insertFirst : true; + /** + * @protected + * @type {boolean} + */ + + _this.stopEvent = options.stopEvent !== undefined ? options.stopEvent : true; + /** + * @protected + * @type {HTMLElement} + */ + + _this.element = document.createElement('div'); + _this.element.className = options.className !== undefined ? options.className : 'ol-overlay-container ' + _css_js__WEBPACK_IMPORTED_MODULE_0__.CLASS_SELECTABLE; + _this.element.style.position = 'absolute'; + _this.element.style.pointerEvents = 'auto'; + var autoPan = options.autoPan; + + if (autoPan && 'object' !== _typeof(autoPan)) { + autoPan = { + animation: options.autoPanAnimation, + margin: options.autoPanMargin + }; + } + /** + * @protected + * @type {PanIntoViewOptions|false} + */ + + + _this.autoPan = + /** @type {PanIntoViewOptions} */ + autoPan || false; + /** + * @protected + * @type {{transform_: string, + * visible: boolean}} + */ + + _this.rendered = { + transform_: '', + visible: true + }; + /** + * @protected + * @type {?import("./events.js").EventsKey} + */ + + _this.mapPostrenderListenerKey = null; + + _this.addChangeListener(Property.ELEMENT, _this.handleElementChanged); + + _this.addChangeListener(Property.MAP, _this.handleMapChanged); + + _this.addChangeListener(Property.OFFSET, _this.handleOffsetChanged); + + _this.addChangeListener(Property.POSITION, _this.handlePositionChanged); + + _this.addChangeListener(Property.POSITIONING, _this.handlePositioningChanged); + + if (options.element !== undefined) { + _this.setElement(options.element); + } + + _this.setOffset(options.offset !== undefined ? options.offset : [0, 0]); + + _this.setPositioning(options.positioning !== undefined ? + /** @type {import("./OverlayPositioning.js").default} */ + options.positioning : _OverlayPositioning_js__WEBPACK_IMPORTED_MODULE_1__["default"].TOP_LEFT); + + if (options.position !== undefined) { + _this.setPosition(options.position); + } + + return _this; + } + /** + * Get the DOM element of this overlay. + * @return {HTMLElement|undefined} The Element containing the overlay. + * @observable + * @api + */ + + + Overlay.prototype.getElement = function () { + return ( + /** @type {HTMLElement|undefined} */ + this.get(Property.ELEMENT) + ); + }; + /** + * Get the overlay identifier which is set on constructor. + * @return {number|string|undefined} Id. + * @api + */ + + + Overlay.prototype.getId = function () { + return this.id; + }; + /** + * Get the map associated with this overlay. + * @return {import("./PluggableMap.js").default|undefined} The map that the + * overlay is part of. + * @observable + * @api + */ + + + Overlay.prototype.getMap = function () { + return ( + /** @type {import("./PluggableMap.js").default|undefined} */ + this.get(Property.MAP) + ); + }; + /** + * Get the offset of this overlay. + * @return {Array} The offset. + * @observable + * @api + */ + + + Overlay.prototype.getOffset = function () { + return ( + /** @type {Array} */ + this.get(Property.OFFSET) + ); + }; + /** + * Get the current position of this overlay. + * @return {import("./coordinate.js").Coordinate|undefined} The spatial point that the overlay is + * anchored at. + * @observable + * @api + */ + + + Overlay.prototype.getPosition = function () { + return ( + /** @type {import("./coordinate.js").Coordinate|undefined} */ + this.get(Property.POSITION) + ); + }; + /** + * Get the current positioning of this overlay. + * @return {import("./OverlayPositioning.js").default} How the overlay is positioned + * relative to its point on the map. + * @observable + * @api + */ + + + Overlay.prototype.getPositioning = function () { + return ( + /** @type {import("./OverlayPositioning.js").default} */ + this.get(Property.POSITIONING) + ); + }; + /** + * @protected + */ + + + Overlay.prototype.handleElementChanged = function () { + (0,_dom_js__WEBPACK_IMPORTED_MODULE_2__.removeChildren)(this.element); + var element = this.getElement(); + + if (element) { + this.element.appendChild(element); + } + }; + /** + * @protected + */ + + + Overlay.prototype.handleMapChanged = function () { + if (this.mapPostrenderListenerKey) { + (0,_dom_js__WEBPACK_IMPORTED_MODULE_2__.removeNode)(this.element); + (0,_events_js__WEBPACK_IMPORTED_MODULE_3__.unlistenByKey)(this.mapPostrenderListenerKey); + this.mapPostrenderListenerKey = null; + } + + var map = this.getMap(); + + if (map) { + this.mapPostrenderListenerKey = (0,_events_js__WEBPACK_IMPORTED_MODULE_3__.listen)(map, _MapEventType_js__WEBPACK_IMPORTED_MODULE_4__["default"].POSTRENDER, this.render, this); + this.updatePixelPosition(); + var container = this.stopEvent ? map.getOverlayContainerStopEvent() : map.getOverlayContainer(); + + if (this.insertFirst) { + container.insertBefore(this.element, container.childNodes[0] || null); + } else { + container.appendChild(this.element); + } + + this.performAutoPan(); + } + }; + /** + * @protected + */ + + + Overlay.prototype.render = function () { + this.updatePixelPosition(); + }; + /** + * @protected + */ + + + Overlay.prototype.handleOffsetChanged = function () { + this.updatePixelPosition(); + }; + /** + * @protected + */ + + + Overlay.prototype.handlePositionChanged = function () { + this.updatePixelPosition(); + this.performAutoPan(); + }; + /** + * @protected + */ + + + Overlay.prototype.handlePositioningChanged = function () { + this.updatePixelPosition(); + }; + /** + * Set the DOM element to be associated with this overlay. + * @param {HTMLElement|undefined} element The Element containing the overlay. + * @observable + * @api + */ + + + Overlay.prototype.setElement = function (element) { + this.set(Property.ELEMENT, element); + }; + /** + * Set the map to be associated with this overlay. + * @param {import("./PluggableMap.js").default|undefined} map The map that the + * overlay is part of. + * @observable + * @api + */ + + + Overlay.prototype.setMap = function (map) { + this.set(Property.MAP, map); + }; + /** + * Set the offset for this overlay. + * @param {Array} offset Offset. + * @observable + * @api + */ + + + Overlay.prototype.setOffset = function (offset) { + this.set(Property.OFFSET, offset); + }; + /** + * Set the position for this overlay. If the position is `undefined` the + * overlay is hidden. + * @param {import("./coordinate.js").Coordinate|undefined} position The spatial point that the overlay + * is anchored at. + * @observable + * @api + */ + + + Overlay.prototype.setPosition = function (position) { + this.set(Property.POSITION, position); + }; + /** + * Pan the map so that the overlay is entirely visible in the current viewport + * (if necessary) using the configured autoPan parameters + * @protected + */ + + + Overlay.prototype.performAutoPan = function () { + if (this.autoPan) { + this.panIntoView(this.autoPan); + } + }; + /** + * Pan the map so that the overlay is entirely visible in the current viewport + * (if necessary). + * @param {PanIntoViewOptions} [opt_panIntoViewOptions] Options for the pan action + * @api + */ + + + Overlay.prototype.panIntoView = function (opt_panIntoViewOptions) { + var map = this.getMap(); + + if (!map || !map.getTargetElement() || !this.get(Property.POSITION)) { + return; + } + + var mapRect = this.getRect(map.getTargetElement(), map.getSize()); + var element = this.getElement(); + var overlayRect = this.getRect(element, [(0,_dom_js__WEBPACK_IMPORTED_MODULE_2__.outerWidth)(element), (0,_dom_js__WEBPACK_IMPORTED_MODULE_2__.outerHeight)(element)]); + var panIntoViewOptions = opt_panIntoViewOptions || {}; + var myMargin = panIntoViewOptions.margin === undefined ? 20 : panIntoViewOptions.margin; + + if (!(0,_extent_js__WEBPACK_IMPORTED_MODULE_5__.containsExtent)(mapRect, overlayRect)) { + // the overlay is not completely inside the viewport, so pan the map + var offsetLeft = overlayRect[0] - mapRect[0]; + var offsetRight = mapRect[2] - overlayRect[2]; + var offsetTop = overlayRect[1] - mapRect[1]; + var offsetBottom = mapRect[3] - overlayRect[3]; + var delta = [0, 0]; + + if (offsetLeft < 0) { + // move map to the left + delta[0] = offsetLeft - myMargin; + } else if (offsetRight < 0) { + // move map to the right + delta[0] = Math.abs(offsetRight) + myMargin; + } + + if (offsetTop < 0) { + // move map up + delta[1] = offsetTop - myMargin; + } else if (offsetBottom < 0) { + // move map down + delta[1] = Math.abs(offsetBottom) + myMargin; + } + + if (delta[0] !== 0 || delta[1] !== 0) { + var center = + /** @type {import("./coordinate.js").Coordinate} */ + map.getView().getCenterInternal(); + var centerPx = map.getPixelFromCoordinateInternal(center); + + if (!centerPx) { + return; + } + + var newCenterPx = [centerPx[0] + delta[0], centerPx[1] + delta[1]]; + var panOptions = panIntoViewOptions.animation || {}; + map.getView().animateInternal({ + center: map.getCoordinateFromPixelInternal(newCenterPx), + duration: panOptions.duration, + easing: panOptions.easing + }); + } + } + }; + /** + * Get the extent of an element relative to the document + * @param {HTMLElement} element The element. + * @param {import("./size.js").Size} size The size of the element. + * @return {import("./extent.js").Extent} The extent. + * @protected + */ + + + Overlay.prototype.getRect = function (element, size) { + var box = element.getBoundingClientRect(); + var offsetX = box.left + window.pageXOffset; + var offsetY = box.top + window.pageYOffset; + return [offsetX, offsetY, offsetX + size[0], offsetY + size[1]]; + }; + /** + * Set the positioning for this overlay. + * @param {import("./OverlayPositioning.js").default} positioning how the overlay is + * positioned relative to its point on the map. + * @observable + * @api + */ + + + Overlay.prototype.setPositioning = function (positioning) { + this.set(Property.POSITIONING, positioning); + }; + /** + * Modify the visibility of the element. + * @param {boolean} visible Element visibility. + * @protected + */ + + + Overlay.prototype.setVisible = function (visible) { + if (this.rendered.visible !== visible) { + this.element.style.display = visible ? '' : 'none'; + this.rendered.visible = visible; + } + }; + /** + * Update pixel position. + * @protected + */ + + + Overlay.prototype.updatePixelPosition = function () { + var map = this.getMap(); + var position = this.getPosition(); + + if (!map || !map.isRendered() || !position) { + this.setVisible(false); + return; + } + + var pixel = map.getPixelFromCoordinate(position); + var mapSize = map.getSize(); + this.updateRenderedPosition(pixel, mapSize); + }; + /** + * @param {import("./pixel.js").Pixel} pixel The pixel location. + * @param {import("./size.js").Size|undefined} mapSize The map size. + * @protected + */ + + + Overlay.prototype.updateRenderedPosition = function (pixel, mapSize) { + var style = this.element.style; + var offset = this.getOffset(); + var positioning = this.getPositioning(); + this.setVisible(true); + var x = Math.round(pixel[0] + offset[0]) + 'px'; + var y = Math.round(pixel[1] + offset[1]) + 'px'; + var posX = '0%'; + var posY = '0%'; + + if (positioning == _OverlayPositioning_js__WEBPACK_IMPORTED_MODULE_1__["default"].BOTTOM_RIGHT || positioning == _OverlayPositioning_js__WEBPACK_IMPORTED_MODULE_1__["default"].CENTER_RIGHT || positioning == _OverlayPositioning_js__WEBPACK_IMPORTED_MODULE_1__["default"].TOP_RIGHT) { + posX = '-100%'; + } else if (positioning == _OverlayPositioning_js__WEBPACK_IMPORTED_MODULE_1__["default"].BOTTOM_CENTER || positioning == _OverlayPositioning_js__WEBPACK_IMPORTED_MODULE_1__["default"].CENTER_CENTER || positioning == _OverlayPositioning_js__WEBPACK_IMPORTED_MODULE_1__["default"].TOP_CENTER) { + posX = '-50%'; + } + + if (positioning == _OverlayPositioning_js__WEBPACK_IMPORTED_MODULE_1__["default"].BOTTOM_LEFT || positioning == _OverlayPositioning_js__WEBPACK_IMPORTED_MODULE_1__["default"].BOTTOM_CENTER || positioning == _OverlayPositioning_js__WEBPACK_IMPORTED_MODULE_1__["default"].BOTTOM_RIGHT) { + posY = '-100%'; + } else if (positioning == _OverlayPositioning_js__WEBPACK_IMPORTED_MODULE_1__["default"].CENTER_LEFT || positioning == _OverlayPositioning_js__WEBPACK_IMPORTED_MODULE_1__["default"].CENTER_CENTER || positioning == _OverlayPositioning_js__WEBPACK_IMPORTED_MODULE_1__["default"].CENTER_RIGHT) { + posY = '-50%'; + } + + var transform = "translate(" + posX + ", " + posY + ") translate(" + x + ", " + y + ")"; + + if (this.rendered.transform_ != transform) { + this.rendered.transform_ = transform; + style.transform = transform; // @ts-ignore IE9 + + style.msTransform = transform; + } + }; + /** + * returns the options this Overlay has been created with + * @return {Options} overlay options + */ + + + Overlay.prototype.getOptions = function () { + return this.options; + }; + + return Overlay; +}(_Object_js__WEBPACK_IMPORTED_MODULE_6__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (Overlay); + +/***/ }), +/* 105 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * @module ol/OverlayPositioning + */ + +/** + * Overlay position: `'bottom-left'`, `'bottom-center'`, `'bottom-right'`, + * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`, + * `'top-center'`, `'top-right'` + * @enum {string} + */ +/* harmony default export */ __webpack_exports__["default"] = ({ + BOTTOM_LEFT: 'bottom-left', + BOTTOM_CENTER: 'bottom-center', + BOTTOM_RIGHT: 'bottom-right', + CENTER_LEFT: 'center-left', + CENTER_CENTER: 'center-center', + CENTER_RIGHT: 'center-right', + TOP_LEFT: 'top-left', + TOP_CENTER: 'top-center', + TOP_RIGHT: 'top-right' +}); + +/***/ }), +/* 106 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Control_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(75); +/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27); +/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(69); +/* harmony import */ var _easing_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(36); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/control/Rotate + */ + + + + + + +/** + * @typedef {Object} Options + * @property {string} [className='ol-rotate'] CSS class name. + * @property {string|HTMLElement} [label='⇧'] Text label to use for the rotate button. + * Instead of text, also an element (e.g. a `span` element) can be used. + * @property {string} [tipLabel='Reset rotation'] Text label to use for the rotate tip. + * @property {string} [compassClassName='ol-compass'] CSS class name for the compass. + * @property {number} [duration=250] Animation duration in milliseconds. + * @property {boolean} [autoHide=true] Hide the control when rotation is 0. + * @property {function(import("../MapEvent.js").default):void} [render] Function called when the control should + * be re-rendered. This is called in a `requestAnimationFrame` callback. + * @property {function():void} [resetNorth] Function called when the control is clicked. + * This will override the default `resetNorth`. + * @property {HTMLElement|string} [target] Specify a target if you want the control to be + * rendered outside of the map's viewport. + */ + +/** + * @classdesc + * A button control to reset rotation to 0. + * To style this control use css selector `.ol-rotate`. A `.ol-hidden` css + * selector is added to the button when the rotation is 0. + * + * @api + */ + +var Rotate = +/** @class */ +function (_super) { + __extends(Rotate, _super); + /** + * @param {Options} [opt_options] Rotate options. + */ + + + function Rotate(opt_options) { + var _this = this; + + var options = opt_options ? opt_options : {}; + _this = _super.call(this, { + element: document.createElement('div'), + render: options.render, + target: options.target + }) || this; + var className = options.className !== undefined ? options.className : 'ol-rotate'; + var label = options.label !== undefined ? options.label : "\u21E7"; + var compassClassName = options.compassClassName !== undefined ? options.compassClassName : 'ol-compass'; + /** + * @type {HTMLElement} + * @private + */ + + _this.label_ = null; + + if (typeof label === 'string') { + _this.label_ = document.createElement('span'); + _this.label_.className = compassClassName; + _this.label_.textContent = label; + } else { + _this.label_ = label; + + _this.label_.classList.add(compassClassName); + } + + var tipLabel = options.tipLabel ? options.tipLabel : 'Reset rotation'; + var button = document.createElement('button'); + button.className = className + '-reset'; + button.setAttribute('type', 'button'); + button.title = tipLabel; + button.appendChild(_this.label_); + button.addEventListener(_events_EventType_js__WEBPACK_IMPORTED_MODULE_0__["default"].CLICK, _this.handleClick_.bind(_this), false); + var cssClasses = className + ' ' + _css_js__WEBPACK_IMPORTED_MODULE_1__.CLASS_UNSELECTABLE + ' ' + _css_js__WEBPACK_IMPORTED_MODULE_1__.CLASS_CONTROL; + var element = _this.element; + element.className = cssClasses; + element.appendChild(button); + _this.callResetNorth_ = options.resetNorth ? options.resetNorth : undefined; + /** + * @type {number} + * @private + */ + + _this.duration_ = options.duration !== undefined ? options.duration : 250; + /** + * @type {boolean} + * @private + */ + + _this.autoHide_ = options.autoHide !== undefined ? options.autoHide : true; + /** + * @private + * @type {number|undefined} + */ + + _this.rotation_ = undefined; + + if (_this.autoHide_) { + _this.element.classList.add(_css_js__WEBPACK_IMPORTED_MODULE_1__.CLASS_HIDDEN); + } + + return _this; + } + /** + * @param {MouseEvent} event The event to handle + * @private + */ + + + Rotate.prototype.handleClick_ = function (event) { + event.preventDefault(); + + if (this.callResetNorth_ !== undefined) { + this.callResetNorth_(); + } else { + this.resetNorth_(); + } + }; + /** + * @private + */ + + + Rotate.prototype.resetNorth_ = function () { + var map = this.getMap(); + var view = map.getView(); + + if (!view) { + // the map does not have a view, so we can't act + // upon it + return; + } + + var rotation = view.getRotation(); + + if (rotation !== undefined) { + if (this.duration_ > 0 && rotation % (2 * Math.PI) !== 0) { + view.animate({ + rotation: 0, + duration: this.duration_, + easing: _easing_js__WEBPACK_IMPORTED_MODULE_2__.easeOut + }); + } else { + view.setRotation(0); + } + } + }; + /** + * Update the rotate control element. + * @param {import("../MapEvent.js").default} mapEvent Map event. + * @override + */ + + + Rotate.prototype.render = function (mapEvent) { + var frameState = mapEvent.frameState; + + if (!frameState) { + return; + } + + var rotation = frameState.viewState.rotation; + + if (rotation != this.rotation_) { + var transform = 'rotate(' + rotation + 'rad)'; + + if (this.autoHide_) { + var contains = this.element.classList.contains(_css_js__WEBPACK_IMPORTED_MODULE_1__.CLASS_HIDDEN); + + if (!contains && rotation === 0) { + this.element.classList.add(_css_js__WEBPACK_IMPORTED_MODULE_1__.CLASS_HIDDEN); + } else if (contains && rotation !== 0) { + this.element.classList.remove(_css_js__WEBPACK_IMPORTED_MODULE_1__.CLASS_HIDDEN); + } + } + + this.label_.style.transform = transform; + } + + this.rotation_ = rotation; + }; + + return Rotate; +}(_Control_js__WEBPACK_IMPORTED_MODULE_3__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (Rotate); + +/***/ }), +/* 107 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "Units": function() { return /* binding */ Units; } +/* harmony export */ }); +/* harmony import */ var _Control_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(75); +/* harmony import */ var _proj_Units_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3); +/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(69); +/* harmony import */ var _proj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var _asserts_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/control/ScaleLine + */ + + + + + + + +/** + * @type {string} + */ + +var UNITS_PROP = 'units'; +/** + * Units for the scale line. Supported values are `'degrees'`, `'imperial'`, + * `'nautical'`, `'metric'`, `'us'`. + * @enum {string} + */ + +var Units = { + DEGREES: 'degrees', + IMPERIAL: 'imperial', + NAUTICAL: 'nautical', + METRIC: 'metric', + US: 'us' +}; +/** + * @const + * @type {Array} + */ + +var LEADING_DIGITS = [1, 2, 5]; +/** + * @const + * @type {number} + */ + +var DEFAULT_DPI = 25.4 / 0.28; +/*** + * @template Return + * @typedef {import("../Observable").OnSignature & + * import("../Observable").OnSignature & + * import("../Observable").CombinedOnSignature} ScaleLineOnSignature + */ + +/** + * @typedef {Object} Options + * @property {string} [className='ol-scale-line'] CSS Class name. + * @property {number} [minWidth=64] Minimum width in pixels at the OGC default dpi. The width will be + * adjusted to match the dpi used. + * @property {function(import("../MapEvent.js").default):void} [render] Function called when the control + * should be re-rendered. This is called in a `requestAnimationFrame` callback. + * @property {HTMLElement|string} [target] Specify a target if you want the control + * to be rendered outside of the map's viewport. + * @property {import("./ScaleLine.js").Units|string} [units='metric'] Units. + * @property {boolean} [bar=false] Render scalebars instead of a line. + * @property {number} [steps=4] Number of steps the scalebar should use. Use even numbers + * for best results. Only applies when `bar` is `true`. + * @property {boolean} [text=false] Render the text scale above of the scalebar. Only applies + * when `bar` is `true`. + * @property {number|undefined} [dpi=undefined] dpi of output device such as printer. Only applies + * when `bar` is `true`. If undefined the OGC default screen pixel size of 0.28mm will be assumed. + */ + +/** + * @classdesc + * A control displaying rough y-axis distances, calculated for the center of the + * viewport. For conformal projections (e.g. EPSG:3857, the default view + * projection in OpenLayers), the scale is valid for all directions. + * No scale line will be shown when the y-axis distance of a pixel at the + * viewport center cannot be calculated in the view projection. + * By default the scale line will show in the bottom left portion of the map, + * but this can be changed by using the css selector `.ol-scale-line`. + * When specifying `bar` as `true`, a scalebar will be rendered instead + * of a scaleline. + * + * @api + */ + +var ScaleLine = +/** @class */ +function (_super) { + __extends(ScaleLine, _super); + /** + * @param {Options} [opt_options] Scale line options. + */ + + + function ScaleLine(opt_options) { + var _this = this; + + var options = opt_options ? opt_options : {}; + var className = options.className !== undefined ? options.className : options.bar ? 'ol-scale-bar' : 'ol-scale-line'; + _this = _super.call(this, { + element: document.createElement('div'), + render: options.render, + target: options.target + }) || this; + /*** + * @type {ScaleLineOnSignature} + */ + + _this.on; + /*** + * @type {ScaleLineOnSignature} + */ + + _this.once; + /*** + * @type {ScaleLineOnSignature} + */ + + _this.un; + /** + * @private + * @type {HTMLElement} + */ + + _this.innerElement_ = document.createElement('div'); + _this.innerElement_.className = className + '-inner'; + _this.element.className = className + ' ' + _css_js__WEBPACK_IMPORTED_MODULE_1__.CLASS_UNSELECTABLE; + + _this.element.appendChild(_this.innerElement_); + /** + * @private + * @type {?import("../View.js").State} + */ + + + _this.viewState_ = null; + /** + * @private + * @type {number} + */ + + _this.minWidth_ = options.minWidth !== undefined ? options.minWidth : 64; + /** + * @private + * @type {boolean} + */ + + _this.renderedVisible_ = false; + /** + * @private + * @type {number|undefined} + */ + + _this.renderedWidth_ = undefined; + /** + * @private + * @type {string} + */ + + _this.renderedHTML_ = ''; + + _this.addChangeListener(UNITS_PROP, _this.handleUnitsChanged_); + + _this.setUnits(options.units || Units.METRIC); + /** + * @private + * @type {boolean} + */ + + + _this.scaleBar_ = options.bar || false; + /** + * @private + * @type {number} + */ + + _this.scaleBarSteps_ = options.steps || 4; + /** + * @private + * @type {boolean} + */ + + _this.scaleBarText_ = options.text || false; + /** + * @private + * @type {number|undefined} + */ + + _this.dpi_ = options.dpi || undefined; + return _this; + } + /** + * Return the units to use in the scale line. + * @return {import("./ScaleLine.js").Units} The units + * to use in the scale line. + * @observable + * @api + */ + + + ScaleLine.prototype.getUnits = function () { + return this.get(UNITS_PROP); + }; + /** + * @private + */ + + + ScaleLine.prototype.handleUnitsChanged_ = function () { + this.updateElement_(); + }; + /** + * Set the units to use in the scale line. + * @param {import("./ScaleLine.js").Units} units The units to use in the scale line. + * @observable + * @api + */ + + + ScaleLine.prototype.setUnits = function (units) { + this.set(UNITS_PROP, units); + }; + /** + * Specify the dpi of output device such as printer. + * @param {number|undefined} dpi The dpi of output device. + * @api + */ + + + ScaleLine.prototype.setDpi = function (dpi) { + this.dpi_ = dpi; + }; + /** + * @private + */ + + + ScaleLine.prototype.updateElement_ = function () { + var viewState = this.viewState_; + + if (!viewState) { + if (this.renderedVisible_) { + this.element.style.display = 'none'; + this.renderedVisible_ = false; + } + + return; + } + + var center = viewState.center; + var projection = viewState.projection; + var units = this.getUnits(); + var pointResolutionUnits = units == Units.DEGREES ? _proj_Units_js__WEBPACK_IMPORTED_MODULE_2__["default"].DEGREES : _proj_Units_js__WEBPACK_IMPORTED_MODULE_2__["default"].METERS; + var pointResolution = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getPointResolution)(projection, viewState.resolution, center, pointResolutionUnits); + var minWidth = this.minWidth_ * (this.dpi_ || DEFAULT_DPI) / DEFAULT_DPI; + var nominalCount = minWidth * pointResolution; + var suffix = ''; + + if (units == Units.DEGREES) { + var metersPerDegree = _proj_js__WEBPACK_IMPORTED_MODULE_0__.METERS_PER_UNIT[_proj_Units_js__WEBPACK_IMPORTED_MODULE_2__["default"].DEGREES]; + nominalCount *= metersPerDegree; + + if (nominalCount < metersPerDegree / 60) { + suffix = "\u2033"; // seconds + + pointResolution *= 3600; + } else if (nominalCount < metersPerDegree) { + suffix = "\u2032"; // minutes + + pointResolution *= 60; + } else { + suffix = "\xB0"; // degrees + } + } else if (units == Units.IMPERIAL) { + if (nominalCount < 0.9144) { + suffix = 'in'; + pointResolution /= 0.0254; + } else if (nominalCount < 1609.344) { + suffix = 'ft'; + pointResolution /= 0.3048; + } else { + suffix = 'mi'; + pointResolution /= 1609.344; + } + } else if (units == Units.NAUTICAL) { + pointResolution /= 1852; + suffix = 'nm'; + } else if (units == Units.METRIC) { + if (nominalCount < 0.001) { + suffix = 'μm'; + pointResolution *= 1000000; + } else if (nominalCount < 1) { + suffix = 'mm'; + pointResolution *= 1000; + } else if (nominalCount < 1000) { + suffix = 'm'; + } else { + suffix = 'km'; + pointResolution /= 1000; + } + } else if (units == Units.US) { + if (nominalCount < 0.9144) { + suffix = 'in'; + pointResolution *= 39.37; + } else if (nominalCount < 1609.344) { + suffix = 'ft'; + pointResolution /= 0.30480061; + } else { + suffix = 'mi'; + pointResolution /= 1609.3472; + } + } else { + (0,_asserts_js__WEBPACK_IMPORTED_MODULE_3__.assert)(false, 33); // Invalid units + } + + var i = 3 * Math.floor(Math.log(minWidth * pointResolution) / Math.log(10)); + var count, width, decimalCount; + + while (true) { + decimalCount = Math.floor(i / 3); + var decimal = Math.pow(10, decimalCount); + count = LEADING_DIGITS[(i % 3 + 3) % 3] * decimal; + width = Math.round(count / pointResolution); + + if (isNaN(width)) { + this.element.style.display = 'none'; + this.renderedVisible_ = false; + return; + } else if (width >= minWidth) { + break; + } + + ++i; + } + + var html; + + if (this.scaleBar_) { + html = this.createScaleBar(width, count, suffix); + } else { + html = count.toFixed(decimalCount < 0 ? -decimalCount : 0) + ' ' + suffix; + } + + if (this.renderedHTML_ != html) { + this.innerElement_.innerHTML = html; + this.renderedHTML_ = html; + } + + if (this.renderedWidth_ != width) { + this.innerElement_.style.width = width + 'px'; + this.renderedWidth_ = width; + } + + if (!this.renderedVisible_) { + this.element.style.display = ''; + this.renderedVisible_ = true; + } + }; + /** + * @private + * @param {number} width The current width of the scalebar. + * @param {number} scale The current scale. + * @param {string} suffix The suffix to append to the scale text. + * @return {string} The stringified HTML of the scalebar. + */ + + + ScaleLine.prototype.createScaleBar = function (width, scale, suffix) { + var mapScale = '1 : ' + Math.round(this.getScaleForResolution()).toLocaleString(); + var scaleSteps = []; + var stepWidth = width / this.scaleBarSteps_; + var backgroundColor = '#ffffff'; + + for (var i = 0; i < this.scaleBarSteps_; i++) { + if (i === 0) { + // create the first marker at position 0 + scaleSteps.push(this.createMarker('absolute', i)); + } + + scaleSteps.push('
' + '
' + '
' + this.createMarker('relative', i) + ( + /*render text every second step, except when only 2 steps */ + i % 2 === 0 || this.scaleBarSteps_ === 2 ? this.createStepText(i, width, false, scale, suffix) : '') + '
'); + + if (i === this.scaleBarSteps_ - 1) { + { + /*render text at the end */ + } + scaleSteps.push(this.createStepText(i + 1, width, true, scale, suffix)); + } // switch colors of steps between black and white + + + if (backgroundColor === '#ffffff') { + backgroundColor = '#000000'; + } else { + backgroundColor = '#ffffff'; + } + } + + var scaleBarText; + + if (this.scaleBarText_) { + scaleBarText = '
' + mapScale + '
'; + } else { + scaleBarText = ''; + } + + var container = '
' + scaleBarText + scaleSteps.join('') + '
'; + return container; + }; + /** + * Creates a marker at given position + * @param {string} position The position, absolute or relative + * @param {number} i The iterator + * @return {string} The stringified div containing the marker + */ + + + ScaleLine.prototype.createMarker = function (position, i) { + var top = position === 'absolute' ? 3 : -10; + return '
'; + }; + /** + * Creates the label for a marker marker at given position + * @param {number} i The iterator + * @param {number} width The width the scalebar will currently use + * @param {boolean} isLast Flag indicating if we add the last step text + * @param {number} scale The current scale for the whole scalebar + * @param {string} suffix The suffix for the scale + * @return {string} The stringified div containing the step text + */ + + + ScaleLine.prototype.createStepText = function (i, width, isLast, scale, suffix) { + var length = i === 0 ? 0 : Math.round(scale / this.scaleBarSteps_ * i * 100) / 100; + var lengthString = length + (i === 0 ? '' : ' ' + suffix); + var margin = i === 0 ? -3 : width / this.scaleBarSteps_ * -1; + var minWidth = i === 0 ? 0 : width / this.scaleBarSteps_ * 2; + return '
' + lengthString + '
'; + }; + /** + * Returns the appropriate scale for the given resolution and units. + * @return {number} The appropriate scale. + */ + + + ScaleLine.prototype.getScaleForResolution = function () { + var resolution = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getPointResolution)(this.viewState_.projection, this.viewState_.resolution, this.viewState_.center); + var dpi = this.dpi_ || DEFAULT_DPI; + var mpu = this.viewState_.projection.getMetersPerUnit(); + var inchesPerMeter = 1000 / 25.4; + return parseFloat(resolution.toString()) * mpu * inchesPerMeter * dpi; + }; + /** + * Update the scale line element. + * @param {import("../MapEvent.js").default} mapEvent Map event. + * @override + */ + + + ScaleLine.prototype.render = function (mapEvent) { + var frameState = mapEvent.frameState; + + if (!frameState) { + this.viewState_ = null; + } else { + this.viewState_ = frameState.viewState; + } + + this.updateElement_(); + }; + + return ScaleLine; +}(_Control_js__WEBPACK_IMPORTED_MODULE_4__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (ScaleLine); + +/***/ }), +/* 108 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Control_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(75); +/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27); +/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(69); +/* harmony import */ var _easing_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(36); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/control/Zoom + */ + + + + + + +/** + * @typedef {Object} Options + * @property {number} [duration=250] Animation duration in milliseconds. + * @property {string} [className='ol-zoom'] CSS class name. + * @property {string} [zoomInClassName=className + '-in'] CSS class name for the zoom-in button. + * @property {string} [zoomOutClassName=className + '-out'] CSS class name for the zoom-out button. + * @property {string|HTMLElement} [zoomInLabel='+'] Text label to use for the zoom-in + * button. Instead of text, also an element (e.g. a `span` element) can be used. + * @property {string|HTMLElement} [zoomOutLabel='–'] Text label to use for the zoom-out button. + * Instead of text, also an element (e.g. a `span` element) can be used. + * @property {string} [zoomInTipLabel='Zoom in'] Text label to use for the button tip. + * @property {string} [zoomOutTipLabel='Zoom out'] Text label to use for the button tip. + * @property {number} [delta=1] The zoom delta applied on each click. + * @property {HTMLElement|string} [target] Specify a target if you want the control to be + * rendered outside of the map's viewport. + */ + +/** + * @classdesc + * A control with 2 buttons, one for zoom in and one for zoom out. + * This control is one of the default controls of a map. To style this control + * use css selectors `.ol-zoom-in` and `.ol-zoom-out`. + * + * @api + */ + +var Zoom = +/** @class */ +function (_super) { + __extends(Zoom, _super); + /** + * @param {Options} [opt_options] Zoom options. + */ + + + function Zoom(opt_options) { + var _this = this; + + var options = opt_options ? opt_options : {}; + _this = _super.call(this, { + element: document.createElement('div'), + target: options.target + }) || this; + var className = options.className !== undefined ? options.className : 'ol-zoom'; + var delta = options.delta !== undefined ? options.delta : 1; + var zoomInClassName = options.zoomInClassName !== undefined ? options.zoomInClassName : className + '-in'; + var zoomOutClassName = options.zoomOutClassName !== undefined ? options.zoomOutClassName : className + '-out'; + var zoomInLabel = options.zoomInLabel !== undefined ? options.zoomInLabel : '+'; + var zoomOutLabel = options.zoomOutLabel !== undefined ? options.zoomOutLabel : "\u2013"; + var zoomInTipLabel = options.zoomInTipLabel !== undefined ? options.zoomInTipLabel : 'Zoom in'; + var zoomOutTipLabel = options.zoomOutTipLabel !== undefined ? options.zoomOutTipLabel : 'Zoom out'; + var inElement = document.createElement('button'); + inElement.className = zoomInClassName; + inElement.setAttribute('type', 'button'); + inElement.title = zoomInTipLabel; + inElement.appendChild(typeof zoomInLabel === 'string' ? document.createTextNode(zoomInLabel) : zoomInLabel); + inElement.addEventListener(_events_EventType_js__WEBPACK_IMPORTED_MODULE_0__["default"].CLICK, _this.handleClick_.bind(_this, delta), false); + var outElement = document.createElement('button'); + outElement.className = zoomOutClassName; + outElement.setAttribute('type', 'button'); + outElement.title = zoomOutTipLabel; + outElement.appendChild(typeof zoomOutLabel === 'string' ? document.createTextNode(zoomOutLabel) : zoomOutLabel); + outElement.addEventListener(_events_EventType_js__WEBPACK_IMPORTED_MODULE_0__["default"].CLICK, _this.handleClick_.bind(_this, -delta), false); + var cssClasses = className + ' ' + _css_js__WEBPACK_IMPORTED_MODULE_1__.CLASS_UNSELECTABLE + ' ' + _css_js__WEBPACK_IMPORTED_MODULE_1__.CLASS_CONTROL; + var element = _this.element; + element.className = cssClasses; + element.appendChild(inElement); + element.appendChild(outElement); + /** + * @type {number} + * @private + */ + + _this.duration_ = options.duration !== undefined ? options.duration : 250; + return _this; + } + /** + * @param {number} delta Zoom delta. + * @param {MouseEvent} event The event to handle + * @private + */ + + + Zoom.prototype.handleClick_ = function (delta, event) { + event.preventDefault(); + this.zoomByDelta_(delta); + }; + /** + * @param {number} delta Zoom delta. + * @private + */ + + + Zoom.prototype.zoomByDelta_ = function (delta) { + var map = this.getMap(); + var view = map.getView(); + + if (!view) { + // the map does not have a view, so we can't act + // upon it + return; + } + + var currentZoom = view.getZoom(); + + if (currentZoom !== undefined) { + var newZoom = view.getConstrainedZoom(currentZoom + delta); + + if (this.duration_ > 0) { + if (view.getAnimating()) { + view.cancelAnimations(); + } + + view.animate({ + zoom: newZoom, + duration: this.duration_, + easing: _easing_js__WEBPACK_IMPORTED_MODULE_2__.easeOut + }); + } else { + view.setZoom(newZoom); + } + } + }; + + return Zoom; +}(_Control_js__WEBPACK_IMPORTED_MODULE_3__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (Zoom); + +/***/ }), +/* 109 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Control_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(75); +/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27); +/* harmony import */ var _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(79); +/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(69); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(9); +/* harmony import */ var _easing_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(36); +/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(28); +/* harmony import */ var _events_Event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(22); +/** + * @module ol/control/ZoomSlider + */ +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); + + + + + + + + + +/** + * The enum for available directions. + * + * @enum {number} + */ + +var Direction = { + VERTICAL: 0, + HORIZONTAL: 1 +}; +/** + * @typedef {Object} Options + * @property {string} [className='ol-zoomslider'] CSS class name. + * @property {number} [duration=200] Animation duration in milliseconds. + * @property {function(import("../MapEvent.js").default):void} [render] Function called when the control + * should be re-rendered. This is called in a `requestAnimationFrame` callback. + */ + +/** + * @classdesc + * A slider type of control for zooming. + * + * Example: + * + * map.addControl(new ZoomSlider()); + * + * @api + */ + +var ZoomSlider = +/** @class */ +function (_super) { + __extends(ZoomSlider, _super); + /** + * @param {Options} [opt_options] Zoom slider options. + */ + + + function ZoomSlider(opt_options) { + var _this = this; + + var options = opt_options ? opt_options : {}; + _this = _super.call(this, { + element: document.createElement('div'), + render: options.render + }) || this; + /** + * @type {!Array} + * @private + */ + + _this.dragListenerKeys_ = []; + /** + * Will hold the current resolution of the view. + * + * @type {number|undefined} + * @private + */ + + _this.currentResolution_ = undefined; + /** + * The direction of the slider. Will be determined from actual display of the + * container and defaults to Direction.VERTICAL. + * + * @type {Direction} + * @private + */ + + _this.direction_ = Direction.VERTICAL; + /** + * @type {boolean} + * @private + */ + + _this.dragging_; + /** + * @type {number} + * @private + */ + + _this.heightLimit_ = 0; + /** + * @type {number} + * @private + */ + + _this.widthLimit_ = 0; + /** + * @type {number|undefined} + * @private + */ + + _this.startX_; + /** + * @type {number|undefined} + * @private + */ + + _this.startY_; + /** + * The calculated thumb size (border box plus margins). Set when initSlider_ + * is called. + * @type {import("../size.js").Size} + * @private + */ + + _this.thumbSize_ = null; + /** + * Whether the slider is initialized. + * @type {boolean} + * @private + */ + + _this.sliderInitialized_ = false; + /** + * @type {number} + * @private + */ + + _this.duration_ = options.duration !== undefined ? options.duration : 200; + var className = options.className !== undefined ? options.className : 'ol-zoomslider'; + var thumbElement = document.createElement('button'); + thumbElement.setAttribute('type', 'button'); + thumbElement.className = className + '-thumb ' + _css_js__WEBPACK_IMPORTED_MODULE_0__.CLASS_UNSELECTABLE; + var containerElement = _this.element; + containerElement.className = className + ' ' + _css_js__WEBPACK_IMPORTED_MODULE_0__.CLASS_UNSELECTABLE + ' ' + _css_js__WEBPACK_IMPORTED_MODULE_0__.CLASS_CONTROL; + containerElement.appendChild(thumbElement); + containerElement.addEventListener(_pointer_EventType_js__WEBPACK_IMPORTED_MODULE_1__["default"].POINTERDOWN, _this.handleDraggerStart_.bind(_this), false); + containerElement.addEventListener(_pointer_EventType_js__WEBPACK_IMPORTED_MODULE_1__["default"].POINTERMOVE, _this.handleDraggerDrag_.bind(_this), false); + containerElement.addEventListener(_pointer_EventType_js__WEBPACK_IMPORTED_MODULE_1__["default"].POINTERUP, _this.handleDraggerEnd_.bind(_this), false); + containerElement.addEventListener(_events_EventType_js__WEBPACK_IMPORTED_MODULE_2__["default"].CLICK, _this.handleContainerClick_.bind(_this), false); + thumbElement.addEventListener(_events_EventType_js__WEBPACK_IMPORTED_MODULE_2__["default"].CLICK, _events_Event_js__WEBPACK_IMPORTED_MODULE_3__.stopPropagation, false); + return _this; + } + /** + * Remove the control from its current map and attach it to the new map. + * Subclasses may set up event handlers to get notified about changes to + * the map here. + * @param {import("../PluggableMap.js").default} map Map. + * @api + */ + + + ZoomSlider.prototype.setMap = function (map) { + _super.prototype.setMap.call(this, map); + + if (map) { + map.render(); + } + }; + /** + * Initializes the slider element. This will determine and set this controls + * direction_ and also constrain the dragging of the thumb to always be within + * the bounds of the container. + * + * @return {boolean} Initialization successful + * @private + */ + + + ZoomSlider.prototype.initSlider_ = function () { + var container = this.element; + var containerWidth = container.offsetWidth; + var containerHeight = container.offsetHeight; + + if (containerWidth === 0 && containerHeight === 0) { + return this.sliderInitialized_ = false; + } + + var containerStyle = getComputedStyle(container); + containerWidth -= parseFloat(containerStyle['paddingRight']) + parseFloat(containerStyle['paddingLeft']); + containerHeight -= parseFloat(containerStyle['paddingTop']) + parseFloat(containerStyle['paddingBottom']); + var thumb = + /** @type {HTMLElement} */ + container.firstElementChild; + var thumbStyle = getComputedStyle(thumb); + var thumbWidth = thumb.offsetWidth + parseFloat(thumbStyle['marginRight']) + parseFloat(thumbStyle['marginLeft']); + var thumbHeight = thumb.offsetHeight + parseFloat(thumbStyle['marginTop']) + parseFloat(thumbStyle['marginBottom']); + this.thumbSize_ = [thumbWidth, thumbHeight]; + + if (containerWidth > containerHeight) { + this.direction_ = Direction.HORIZONTAL; + this.widthLimit_ = containerWidth - thumbWidth; + } else { + this.direction_ = Direction.VERTICAL; + this.heightLimit_ = containerHeight - thumbHeight; + } + + return this.sliderInitialized_ = true; + }; + /** + * @param {PointerEvent} event The browser event to handle. + * @private + */ + + + ZoomSlider.prototype.handleContainerClick_ = function (event) { + var view = this.getMap().getView(); + var relativePosition = this.getRelativePosition_(event.offsetX - this.thumbSize_[0] / 2, event.offsetY - this.thumbSize_[1] / 2); + var resolution = this.getResolutionForPosition_(relativePosition); + var zoom = view.getConstrainedZoom(view.getZoomForResolution(resolution)); + view.animateInternal({ + zoom: zoom, + duration: this.duration_, + easing: _easing_js__WEBPACK_IMPORTED_MODULE_4__.easeOut + }); + }; + /** + * Handle dragger start events. + * @param {PointerEvent} event The drag event. + * @private + */ + + + ZoomSlider.prototype.handleDraggerStart_ = function (event) { + if (!this.dragging_ && event.target === this.element.firstElementChild) { + var element = + /** @type {HTMLElement} */ + this.element.firstElementChild; + this.getMap().getView().beginInteraction(); + this.startX_ = event.clientX - parseFloat(element.style.left); + this.startY_ = event.clientY - parseFloat(element.style.top); + this.dragging_ = true; + + if (this.dragListenerKeys_.length === 0) { + var drag = this.handleDraggerDrag_; + var end = this.handleDraggerEnd_; + var doc = this.getMap().getOwnerDocument(); + this.dragListenerKeys_.push((0,_events_js__WEBPACK_IMPORTED_MODULE_5__.listen)(doc, _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_1__["default"].POINTERMOVE, drag, this), (0,_events_js__WEBPACK_IMPORTED_MODULE_5__.listen)(doc, _pointer_EventType_js__WEBPACK_IMPORTED_MODULE_1__["default"].POINTERUP, end, this)); + } + } + }; + /** + * Handle dragger drag events. + * + * @param {PointerEvent} event The drag event. + * @private + */ + + + ZoomSlider.prototype.handleDraggerDrag_ = function (event) { + if (this.dragging_) { + var deltaX = event.clientX - this.startX_; + var deltaY = event.clientY - this.startY_; + var relativePosition = this.getRelativePosition_(deltaX, deltaY); + this.currentResolution_ = this.getResolutionForPosition_(relativePosition); + this.getMap().getView().setResolution(this.currentResolution_); + } + }; + /** + * Handle dragger end events. + * @param {PointerEvent} event The drag event. + * @private + */ + + + ZoomSlider.prototype.handleDraggerEnd_ = function (event) { + if (this.dragging_) { + var view = this.getMap().getView(); + view.endInteraction(); + this.dragging_ = false; + this.startX_ = undefined; + this.startY_ = undefined; + this.dragListenerKeys_.forEach(_events_js__WEBPACK_IMPORTED_MODULE_5__.unlistenByKey); + this.dragListenerKeys_.length = 0; + } + }; + /** + * Positions the thumb inside its container according to the given resolution. + * + * @param {number} res The res. + * @private + */ + + + ZoomSlider.prototype.setThumbPosition_ = function (res) { + var position = this.getPositionForResolution_(res); + var thumb = + /** @type {HTMLElement} */ + this.element.firstElementChild; + + if (this.direction_ == Direction.HORIZONTAL) { + thumb.style.left = this.widthLimit_ * position + 'px'; + } else { + thumb.style.top = this.heightLimit_ * position + 'px'; + } + }; + /** + * Calculates the relative position of the thumb given x and y offsets. The + * relative position scales from 0 to 1. The x and y offsets are assumed to be + * in pixel units within the dragger limits. + * + * @param {number} x Pixel position relative to the left of the slider. + * @param {number} y Pixel position relative to the top of the slider. + * @return {number} The relative position of the thumb. + * @private + */ + + + ZoomSlider.prototype.getRelativePosition_ = function (x, y) { + var amount; + + if (this.direction_ === Direction.HORIZONTAL) { + amount = x / this.widthLimit_; + } else { + amount = y / this.heightLimit_; + } + + return (0,_math_js__WEBPACK_IMPORTED_MODULE_6__.clamp)(amount, 0, 1); + }; + /** + * Calculates the corresponding resolution of the thumb given its relative + * position (where 0 is the minimum and 1 is the maximum). + * + * @param {number} position The relative position of the thumb. + * @return {number} The corresponding resolution. + * @private + */ + + + ZoomSlider.prototype.getResolutionForPosition_ = function (position) { + var fn = this.getMap().getView().getResolutionForValueFunction(); + return fn(1 - position); + }; + /** + * Determines the relative position of the slider for the given resolution. A + * relative position of 0 corresponds to the minimum view resolution. A + * relative position of 1 corresponds to the maximum view resolution. + * + * @param {number} res The resolution. + * @return {number} The relative position value (between 0 and 1). + * @private + */ + + + ZoomSlider.prototype.getPositionForResolution_ = function (res) { + var fn = this.getMap().getView().getValueForResolutionFunction(); + return (0,_math_js__WEBPACK_IMPORTED_MODULE_6__.clamp)(1 - fn(res), 0, 1); + }; + /** + * Update the zoomslider element. + * @param {import("../MapEvent.js").default} mapEvent Map event. + * @override + */ + + + ZoomSlider.prototype.render = function (mapEvent) { + if (!mapEvent.frameState) { + return; + } + + if (!this.sliderInitialized_ && !this.initSlider_()) { + return; + } + + var res = mapEvent.frameState.viewState.resolution; + this.currentResolution_ = res; + this.setThumbPosition_(res); + }; + + return ZoomSlider; +}(_Control_js__WEBPACK_IMPORTED_MODULE_7__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (ZoomSlider); + +/***/ }), +/* 110 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Control_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(75); +/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27); +/* harmony import */ var _css_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(69); +/* harmony import */ var _geom_Polygon_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/control/ZoomToExtent + */ + + + + + + +/** + * @typedef {Object} Options + * @property {string} [className='ol-zoom-extent'] Class name. + * @property {HTMLElement|string} [target] Specify a target if you want the control + * to be rendered outside of the map's viewport. + * @property {string|HTMLElement} [label='E'] Text label to use for the button. + * Instead of text, also an element (e.g. a `span` element) can be used. + * @property {string} [tipLabel='Fit to extent'] Text label to use for the button tip. + * @property {import("../extent.js").Extent} [extent] The extent to zoom to. If undefined the validity + * extent of the view projection is used. + */ + +/** + * @classdesc + * A button control which, when pressed, changes the map view to a specific + * extent. To style this control use the css selector `.ol-zoom-extent`. + * + * @api + */ + +var ZoomToExtent = +/** @class */ +function (_super) { + __extends(ZoomToExtent, _super); + /** + * @param {Options} [opt_options] Options. + */ + + + function ZoomToExtent(opt_options) { + var _this = this; + + var options = opt_options ? opt_options : {}; + _this = _super.call(this, { + element: document.createElement('div'), + target: options.target + }) || this; + /** + * @type {?import("../extent.js").Extent} + * @protected + */ + + _this.extent = options.extent ? options.extent : null; + var className = options.className !== undefined ? options.className : 'ol-zoom-extent'; + var label = options.label !== undefined ? options.label : 'E'; + var tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Fit to extent'; + var button = document.createElement('button'); + button.setAttribute('type', 'button'); + button.title = tipLabel; + button.appendChild(typeof label === 'string' ? document.createTextNode(label) : label); + button.addEventListener(_events_EventType_js__WEBPACK_IMPORTED_MODULE_0__["default"].CLICK, _this.handleClick_.bind(_this), false); + var cssClasses = className + ' ' + _css_js__WEBPACK_IMPORTED_MODULE_1__.CLASS_UNSELECTABLE + ' ' + _css_js__WEBPACK_IMPORTED_MODULE_1__.CLASS_CONTROL; + var element = _this.element; + element.className = cssClasses; + element.appendChild(button); + return _this; + } + /** + * @param {MouseEvent} event The event to handle + * @private + */ + + + ZoomToExtent.prototype.handleClick_ = function (event) { + event.preventDefault(); + this.handleZoomToExtent(); + }; + /** + * @protected + */ + + + ZoomToExtent.prototype.handleZoomToExtent = function () { + var map = this.getMap(); + var view = map.getView(); + var extent = !this.extent ? view.getProjection().getExtent() : this.extent; + view.fitInternal((0,_geom_Polygon_js__WEBPACK_IMPORTED_MODULE_2__.fromExtent)(extent)); + }; + + return ZoomToExtent; +}(_Control_js__WEBPACK_IMPORTED_MODULE_3__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (ZoomToExtent); + +/***/ }), +/* 111 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "DoubleClickZoom": function() { return /* reexport safe */ _interaction_DoubleClickZoom_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }, +/* harmony export */ "DragAndDrop": function() { return /* reexport safe */ _interaction_DragAndDrop_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }, +/* harmony export */ "DragBox": function() { return /* reexport safe */ _interaction_DragBox_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }, +/* harmony export */ "DragPan": function() { return /* reexport safe */ _interaction_DragPan_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }, +/* harmony export */ "DragRotate": function() { return /* reexport safe */ _interaction_DragRotate_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }, +/* harmony export */ "DragRotateAndZoom": function() { return /* reexport safe */ _interaction_DragRotateAndZoom_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }, +/* harmony export */ "DragZoom": function() { return /* reexport safe */ _interaction_DragZoom_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }, +/* harmony export */ "Draw": function() { return /* reexport safe */ _interaction_Draw_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }, +/* harmony export */ "Extent": function() { return /* reexport safe */ _interaction_Extent_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }, +/* harmony export */ "Interaction": function() { return /* reexport safe */ _interaction_Interaction_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }, +/* harmony export */ "KeyboardPan": function() { return /* reexport safe */ _interaction_KeyboardPan_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }, +/* harmony export */ "KeyboardZoom": function() { return /* reexport safe */ _interaction_KeyboardZoom_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }, +/* harmony export */ "Modify": function() { return /* reexport safe */ _interaction_Modify_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }, +/* harmony export */ "MouseWheelZoom": function() { return /* reexport safe */ _interaction_MouseWheelZoom_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }, +/* harmony export */ "PinchRotate": function() { return /* reexport safe */ _interaction_PinchRotate_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }, +/* harmony export */ "PinchZoom": function() { return /* reexport safe */ _interaction_PinchZoom_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }, +/* harmony export */ "Pointer": function() { return /* reexport safe */ _interaction_Pointer_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }, +/* harmony export */ "Select": function() { return /* reexport safe */ _interaction_Select_js__WEBPACK_IMPORTED_MODULE_17__["default"]; }, +/* harmony export */ "Snap": function() { return /* reexport safe */ _interaction_Snap_js__WEBPACK_IMPORTED_MODULE_18__["default"]; }, +/* harmony export */ "Translate": function() { return /* reexport safe */ _interaction_Translate_js__WEBPACK_IMPORTED_MODULE_19__["default"]; }, +/* harmony export */ "defaults": function() { return /* binding */ defaults; } +/* harmony export */ }); +/* harmony import */ var _Collection_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(21); +/* harmony import */ var _interaction_DoubleClickZoom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(112); +/* harmony import */ var _interaction_DragPan_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(121); +/* harmony import */ var _interaction_DragRotate_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(122); +/* harmony import */ var _interaction_DragZoom_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(124); +/* harmony import */ var _interaction_KeyboardPan_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(175); +/* harmony import */ var _interaction_KeyboardZoom_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(177); +/* harmony import */ var _Kinetic_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(65); +/* harmony import */ var _interaction_MouseWheelZoom_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(179); +/* harmony import */ var _interaction_PinchRotate_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(180); +/* harmony import */ var _interaction_PinchZoom_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(181); +/* harmony import */ var _interaction_DragAndDrop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(115); +/* harmony import */ var _interaction_DragBox_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(117); +/* harmony import */ var _interaction_DragRotateAndZoom_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(123); +/* harmony import */ var _interaction_Draw_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(125); +/* harmony import */ var _interaction_Extent_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(174); +/* harmony import */ var _interaction_Interaction_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(113); +/* harmony import */ var _interaction_Modify_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(178); +/* harmony import */ var _interaction_Pointer_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(120); +/* harmony import */ var _interaction_Select_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(182); +/* harmony import */ var _interaction_Snap_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(183); +/* harmony import */ var _interaction_Translate_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(184); +/** + * @module ol/interaction + */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +/** + * @typedef {Object} DefaultsOptions + * @property {boolean} [altShiftDragRotate=true] Whether Alt-Shift-drag rotate is + * desired. + * @property {boolean} [onFocusOnly=false] Interact only when the map has the + * focus. This affects the `MouseWheelZoom` and `DragPan` interactions and is + * useful when page scroll is desired for maps that do not have the browser's + * focus. + * @property {boolean} [doubleClickZoom=true] Whether double click zoom is + * desired. + * @property {boolean} [keyboard=true] Whether keyboard interaction is desired. + * @property {boolean} [mouseWheelZoom=true] Whether mousewheel zoom is desired. + * @property {boolean} [shiftDragZoom=true] Whether Shift-drag zoom is desired. + * @property {boolean} [dragPan=true] Whether drag pan is desired. + * @property {boolean} [pinchRotate=true] Whether pinch rotate is desired. + * @property {boolean} [pinchZoom=true] Whether pinch zoom is desired. + * @property {number} [zoomDelta] Zoom level delta when using keyboard or double click zoom. + * @property {number} [zoomDuration] Duration of the zoom animation in + * milliseconds. + */ + +/** + * Set of interactions included in maps by default. Specific interactions can be + * excluded by setting the appropriate option to false in the constructor + * options, but the order of the interactions is fixed. If you want to specify + * a different order for interactions, you will need to create your own + * {@link module:ol/interaction/Interaction} instances and insert + * them into a {@link module:ol/Collection} in the order you want + * before creating your {@link module:ol/Map~Map} instance. Changing the order can + * be of interest if the event propagation needs to be stopped at a point. + * The default set of interactions, in sequence, is: + * * {@link module:ol/interaction/DragRotate~DragRotate} + * * {@link module:ol/interaction/DoubleClickZoom~DoubleClickZoom} + * * {@link module:ol/interaction/DragPan~DragPan} + * * {@link module:ol/interaction/PinchRotate~PinchRotate} + * * {@link module:ol/interaction/PinchZoom~PinchZoom} + * * {@link module:ol/interaction/KeyboardPan~KeyboardPan} + * * {@link module:ol/interaction/KeyboardZoom~KeyboardZoom} + * * {@link module:ol/interaction/MouseWheelZoom~MouseWheelZoom} + * * {@link module:ol/interaction/DragZoom~DragZoom} + * + * @param {DefaultsOptions} [opt_options] Defaults options. + * @return {import("./Collection.js").default} + * A collection of interactions to be used with the {@link module:ol/Map~Map} + * constructor's `interactions` option. + * @api + */ + +function defaults(opt_options) { + var options = opt_options ? opt_options : {}; + var interactions = new _Collection_js__WEBPACK_IMPORTED_MODULE_20__["default"](); + var kinetic = new _Kinetic_js__WEBPACK_IMPORTED_MODULE_21__["default"](-0.005, 0.05, 100); + var altShiftDragRotate = options.altShiftDragRotate !== undefined ? options.altShiftDragRotate : true; + + if (altShiftDragRotate) { + interactions.push(new _interaction_DragRotate_js__WEBPACK_IMPORTED_MODULE_4__["default"]()); + } + + var doubleClickZoom = options.doubleClickZoom !== undefined ? options.doubleClickZoom : true; + + if (doubleClickZoom) { + interactions.push(new _interaction_DoubleClickZoom_js__WEBPACK_IMPORTED_MODULE_0__["default"]({ + delta: options.zoomDelta, + duration: options.zoomDuration + })); + } + + var dragPan = options.dragPan !== undefined ? options.dragPan : true; + + if (dragPan) { + interactions.push(new _interaction_DragPan_js__WEBPACK_IMPORTED_MODULE_3__["default"]({ + onFocusOnly: options.onFocusOnly, + kinetic: kinetic + })); + } + + var pinchRotate = options.pinchRotate !== undefined ? options.pinchRotate : true; + + if (pinchRotate) { + interactions.push(new _interaction_PinchRotate_js__WEBPACK_IMPORTED_MODULE_14__["default"]()); + } + + var pinchZoom = options.pinchZoom !== undefined ? options.pinchZoom : true; + + if (pinchZoom) { + interactions.push(new _interaction_PinchZoom_js__WEBPACK_IMPORTED_MODULE_15__["default"]({ + duration: options.zoomDuration + })); + } + + var keyboard = options.keyboard !== undefined ? options.keyboard : true; + + if (keyboard) { + interactions.push(new _interaction_KeyboardPan_js__WEBPACK_IMPORTED_MODULE_10__["default"]()); + interactions.push(new _interaction_KeyboardZoom_js__WEBPACK_IMPORTED_MODULE_11__["default"]({ + delta: options.zoomDelta, + duration: options.zoomDuration + })); + } + + var mouseWheelZoom = options.mouseWheelZoom !== undefined ? options.mouseWheelZoom : true; + + if (mouseWheelZoom) { + interactions.push(new _interaction_MouseWheelZoom_js__WEBPACK_IMPORTED_MODULE_13__["default"]({ + onFocusOnly: options.onFocusOnly, + duration: options.zoomDuration + })); + } + + var shiftDragZoom = options.shiftDragZoom !== undefined ? options.shiftDragZoom : true; + + if (shiftDragZoom) { + interactions.push(new _interaction_DragZoom_js__WEBPACK_IMPORTED_MODULE_6__["default"]({ + duration: options.zoomDuration + })); + } + + return interactions; +} + +/***/ }), +/* 112 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Interaction_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(113); +/* harmony import */ var _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(101); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/interaction/DoubleClickZoom + */ + + + + +/** + * @typedef {Object} Options + * @property {number} [duration=250] Animation duration in milliseconds. + * @property {number} [delta=1] The zoom delta applied on each double click. + */ + +/** + * @classdesc + * Allows the user to zoom by double-clicking on the map. + * @api + */ + +var DoubleClickZoom = +/** @class */ +function (_super) { + __extends(DoubleClickZoom, _super); + /** + * @param {Options} [opt_options] Options. + */ + + + function DoubleClickZoom(opt_options) { + var _this = _super.call(this) || this; + + var options = opt_options ? opt_options : {}; + /** + * @private + * @type {number} + */ + + _this.delta_ = options.delta ? options.delta : 1; + /** + * @private + * @type {number} + */ + + _this.duration_ = options.duration !== undefined ? options.duration : 250; + return _this; + } + /** + * Handles the {@link module:ol/MapBrowserEvent map browser event} (if it was a + * doubleclick) and eventually zooms the map. + * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event. + * @return {boolean} `false` to stop event propagation. + */ + + + DoubleClickZoom.prototype.handleEvent = function (mapBrowserEvent) { + var stopEvent = false; + + if (mapBrowserEvent.type == _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_0__["default"].DBLCLICK) { + var browserEvent = + /** @type {MouseEvent} */ + mapBrowserEvent.originalEvent; + var map = mapBrowserEvent.map; + var anchor = mapBrowserEvent.coordinate; + var delta = browserEvent.shiftKey ? -this.delta_ : this.delta_; + var view = map.getView(); + (0,_Interaction_js__WEBPACK_IMPORTED_MODULE_1__.zoomByDelta)(view, delta, anchor, this.duration_); + browserEvent.preventDefault(); + stopEvent = true; + } + + return !stopEvent; + }; + + return DoubleClickZoom; +}(_Interaction_js__WEBPACK_IMPORTED_MODULE_1__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (DoubleClickZoom); + +/***/ }), +/* 113 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "pan": function() { return /* binding */ pan; }, +/* harmony export */ "zoomByDelta": function() { return /* binding */ zoomByDelta; } +/* harmony export */ }); +/* harmony import */ var _Object_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(24); +/* harmony import */ var _Property_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(114); +/* harmony import */ var _easing_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(36); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/interaction/Interaction + */ + + + + + +/*** + * @template Return + * @typedef {import("../Observable").OnSignature & + * import("../Observable").OnSignature & + * import("../Observable").CombinedOnSignature} InteractionOnSignature + */ + +/** + * Object literal with config options for interactions. + * @typedef {Object} InteractionOptions + * @property {function(import("../MapBrowserEvent.js").default):boolean} handleEvent + * Method called by the map to notify the interaction that a browser event was + * dispatched to the map. If the function returns a falsy value, propagation of + * the event to other interactions in the map's interactions chain will be + * prevented (this includes functions with no explicit return). The interactions + * are traversed in reverse order of the interactions collection of the map. + */ + +/** + * @classdesc + * Abstract base class; normally only used for creating subclasses and not + * instantiated in apps. + * User actions that change the state of the map. Some are similar to controls, + * but are not associated with a DOM element. + * For example, {@link module:ol/interaction/KeyboardZoom~KeyboardZoom} is + * functionally the same as {@link module:ol/control/Zoom~Zoom}, but triggered + * by a keyboard event not a button element event. + * Although interactions do not have a DOM element, some of them do render + * vectors and so are visible on the screen. + * @api + */ + +var Interaction = +/** @class */ +function (_super) { + __extends(Interaction, _super); + /** + * @param {InteractionOptions} [opt_options] Options. + */ + + + function Interaction(opt_options) { + var _this = _super.call(this) || this; + /*** + * @type {InteractionOnSignature} + */ + + + _this.on; + /*** + * @type {InteractionOnSignature} + */ + + _this.once; + /*** + * @type {InteractionOnSignature} + */ + + _this.un; + + if (opt_options && opt_options.handleEvent) { + _this.handleEvent = opt_options.handleEvent; + } + /** + * @private + * @type {import("../PluggableMap.js").default} + */ + + + _this.map_ = null; + + _this.setActive(true); + + return _this; + } + /** + * Return whether the interaction is currently active. + * @return {boolean} `true` if the interaction is active, `false` otherwise. + * @observable + * @api + */ + + + Interaction.prototype.getActive = function () { + return ( + /** @type {boolean} */ + this.get(_Property_js__WEBPACK_IMPORTED_MODULE_0__["default"].ACTIVE) + ); + }; + /** + * Get the map associated with this interaction. + * @return {import("../PluggableMap.js").default} Map. + * @api + */ + + + Interaction.prototype.getMap = function () { + return this.map_; + }; + /** + * Handles the {@link module:ol/MapBrowserEvent map browser event}. + * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event. + * @return {boolean} `false` to stop event propagation. + * @api + */ + + + Interaction.prototype.handleEvent = function (mapBrowserEvent) { + return true; + }; + /** + * Activate or deactivate the interaction. + * @param {boolean} active Active. + * @observable + * @api + */ + + + Interaction.prototype.setActive = function (active) { + this.set(_Property_js__WEBPACK_IMPORTED_MODULE_0__["default"].ACTIVE, active); + }; + /** + * Remove the interaction from its current map and attach it to the new map. + * Subclasses may set up event handlers to get notified about changes to + * the map here. + * @param {import("../PluggableMap.js").default} map Map. + */ + + + Interaction.prototype.setMap = function (map) { + this.map_ = map; + }; + + return Interaction; +}(_Object_js__WEBPACK_IMPORTED_MODULE_1__["default"]); +/** + * @param {import("../View.js").default} view View. + * @param {import("../coordinate.js").Coordinate} delta Delta. + * @param {number} [opt_duration] Duration. + */ + + +function pan(view, delta, opt_duration) { + var currentCenter = view.getCenterInternal(); + + if (currentCenter) { + var center = [currentCenter[0] + delta[0], currentCenter[1] + delta[1]]; + view.animateInternal({ + duration: opt_duration !== undefined ? opt_duration : 250, + easing: _easing_js__WEBPACK_IMPORTED_MODULE_2__.linear, + center: view.getConstrainedCenter(center) + }); + } +} +/** + * @param {import("../View.js").default} view View. + * @param {number} delta Delta from previous zoom level. + * @param {import("../coordinate.js").Coordinate} [opt_anchor] Anchor coordinate in the user projection. + * @param {number} [opt_duration] Duration. + */ + +function zoomByDelta(view, delta, opt_anchor, opt_duration) { + var currentZoom = view.getZoom(); + + if (currentZoom === undefined) { + return; + } + + var newZoom = view.getConstrainedZoom(currentZoom + delta); + var newResolution = view.getResolutionForZoom(newZoom); + + if (view.getAnimating()) { + view.cancelAnimations(); + } + + view.animate({ + resolution: newResolution, + anchor: opt_anchor, + duration: opt_duration !== undefined ? opt_duration : 250, + easing: _easing_js__WEBPACK_IMPORTED_MODULE_2__.easeOut + }); +} +/* harmony default export */ __webpack_exports__["default"] = (Interaction); + +/***/ }), +/* 114 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * @module ol/interaction/Property + */ + +/** + * @enum {string} + */ +/* harmony default export */ __webpack_exports__["default"] = ({ + ACTIVE: 'active' +}); + +/***/ }), +/* 115 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "DragAndDropEvent": function() { return /* binding */ DragAndDropEvent; } +/* harmony export */ }); +/* harmony import */ var _events_Event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22); +/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(27); +/* harmony import */ var _format_FormatType_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(116); +/* harmony import */ var _Interaction_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(113); +/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(30); +/* harmony import */ var _proj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(28); +/** + * @module ol/interaction/DragAndDrop + */ +// FIXME should handle all geo-referenced data, not just vector data +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); + + + + + + + + +/** + * @typedef {Object} Options + * @property {Array} [formatConstructors] Format constructors + * (and/or formats pre-constructed with options). + * @property {import("../source/Vector.js").default} [source] Optional vector source where features will be added. If a source is provided + * all existing features will be removed and new features will be added when + * they are dropped on the target. If you want to add features to a vector + * source without removing the existing features (append only), instead of + * providing the source option listen for the "addfeatures" event. + * @property {import("../proj.js").ProjectionLike} [projection] Target projection. By default, the map's view's projection is used. + * @property {HTMLElement} [target] The element that is used as the drop target, default is the viewport element. + */ + +/** + * @enum {string} + */ + +var DragAndDropEventType = { + /** + * Triggered when features are added + * @event DragAndDropEvent#addfeatures + * @api + */ + ADD_FEATURES: 'addfeatures' +}; +/** + * @classdesc + * Events emitted by {@link module:ol/interaction/DragAndDrop~DragAndDrop} instances are instances + * of this type. + */ + +var DragAndDropEvent = +/** @class */ +function (_super) { + __extends(DragAndDropEvent, _super); + /** + * @param {DragAndDropEventType} type Type. + * @param {File} file File. + * @param {Array} [opt_features] Features. + * @param {import("../proj/Projection.js").default} [opt_projection] Projection. + */ + + + function DragAndDropEvent(type, file, opt_features, opt_projection) { + var _this = _super.call(this, type) || this; + /** + * The features parsed from dropped data. + * @type {Array|undefined} + * @api + */ + + + _this.features = opt_features; + /** + * The dropped file. + * @type {File} + * @api + */ + + _this.file = file; + /** + * The feature projection. + * @type {import("../proj/Projection.js").default|undefined} + * @api + */ + + _this.projection = opt_projection; + return _this; + } + + return DragAndDropEvent; +}(_events_Event_js__WEBPACK_IMPORTED_MODULE_1__["default"]); + + +/*** + * @template Return + * @typedef {import("../Observable").OnSignature & + * import("../Observable").OnSignature & + * import("../Observable").OnSignature<'addfeatures', DragAndDropEvent, Return> & + * import("../Observable").CombinedOnSignature} DragAndDropOnSignature + */ + +/** + * @classdesc + * Handles input of vector data by drag and drop. + * + * Note that the DragAndDrop interaction uses the TextDecoder() constructor if the supplied + * combination of formats read both text string and ArrayBuffer sources. Older browsers such + * as IE which do not support this will need a TextDecoder polyfill to be loaded before use. + * + * @api + * + * @fires DragAndDropEvent + */ + +var DragAndDrop = +/** @class */ +function (_super) { + __extends(DragAndDrop, _super); + /** + * @param {Options} [opt_options] Options. + */ + + + function DragAndDrop(opt_options) { + var _this = this; + + var options = opt_options ? opt_options : {}; + _this = _super.call(this, { + handleEvent: _functions_js__WEBPACK_IMPORTED_MODULE_2__.TRUE + }) || this; + /*** + * @type {DragAndDropOnSignature} + */ + + _this.on; + /*** + * @type {DragAndDropOnSignature} + */ + + _this.once; + /*** + * @type {DragAndDropOnSignature} + */ + + _this.un; + /** + * @private + * @type {boolean} + */ + + _this.readAsBuffer_ = false; + /** + * @private + * @type {Array} + */ + + _this.formats_ = []; + var formatConstructors = options.formatConstructors ? options.formatConstructors : []; + + for (var i = 0, ii = formatConstructors.length; i < ii; ++i) { + var format = formatConstructors[i]; + + if (typeof format === 'function') { + format = new format(); + } + + _this.formats_.push(format); + + _this.readAsBuffer_ = _this.readAsBuffer_ || format.getType() === _format_FormatType_js__WEBPACK_IMPORTED_MODULE_3__["default"].ARRAY_BUFFER; + } + /** + * @private + * @type {import("../proj/Projection.js").default} + */ + + + _this.projection_ = options.projection ? (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.get)(options.projection) : null; + /** + * @private + * @type {?Array} + */ + + _this.dropListenKeys_ = null; + /** + * @private + * @type {import("../source/Vector.js").default} + */ + + _this.source_ = options.source || null; + /** + * @private + * @type {HTMLElement} + */ + + _this.target = options.target ? options.target : null; + return _this; + } + /** + * @param {File} file File. + * @param {Event} event Load event. + * @private + */ + + + DragAndDrop.prototype.handleResult_ = function (file, event) { + var result = event.target.result; + var map = this.getMap(); + var projection = this.projection_; + + if (!projection) { + var view = map.getView(); + projection = view.getProjection(); + } + + var text; + var formats = this.formats_; + + for (var i = 0, ii = formats.length; i < ii; ++i) { + var format = formats[i]; + var input = result; + + if (this.readAsBuffer_ && format.getType() !== _format_FormatType_js__WEBPACK_IMPORTED_MODULE_3__["default"].ARRAY_BUFFER) { + if (text === undefined) { + text = new TextDecoder().decode(result); + } + + input = text; + } + + var features = this.tryReadFeatures_(format, input, { + featureProjection: projection + }); + + if (features && features.length > 0) { + if (this.source_) { + this.source_.clear(); + this.source_.addFeatures(features); + } + + this.dispatchEvent(new DragAndDropEvent(DragAndDropEventType.ADD_FEATURES, file, features, projection)); + break; + } + } + }; + /** + * @private + */ + + + DragAndDrop.prototype.registerListeners_ = function () { + var map = this.getMap(); + + if (map) { + var dropArea = this.target ? this.target : map.getViewport(); + this.dropListenKeys_ = [(0,_events_js__WEBPACK_IMPORTED_MODULE_4__.listen)(dropArea, _events_EventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].DROP, this.handleDrop, this), (0,_events_js__WEBPACK_IMPORTED_MODULE_4__.listen)(dropArea, _events_EventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].DRAGENTER, this.handleStop, this), (0,_events_js__WEBPACK_IMPORTED_MODULE_4__.listen)(dropArea, _events_EventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].DRAGOVER, this.handleStop, this), (0,_events_js__WEBPACK_IMPORTED_MODULE_4__.listen)(dropArea, _events_EventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].DROP, this.handleStop, this)]; + } + }; + /** + * Activate or deactivate the interaction. + * @param {boolean} active Active. + * @observable + * @api + */ + + + DragAndDrop.prototype.setActive = function (active) { + if (!this.getActive() && active) { + this.registerListeners_(); + } + + if (this.getActive() && !active) { + this.unregisterListeners_(); + } + + _super.prototype.setActive.call(this, active); + }; + /** + * Remove the interaction from its current map and attach it to the new map. + * Subclasses may set up event handlers to get notified about changes to + * the map here. + * @param {import("../PluggableMap.js").default} map Map. + */ + + + DragAndDrop.prototype.setMap = function (map) { + this.unregisterListeners_(); + + _super.prototype.setMap.call(this, map); + + if (this.getActive()) { + this.registerListeners_(); + } + }; + /** + * @param {import("../format/Feature.js").default} format Format. + * @param {string} text Text. + * @param {import("../format/Feature.js").ReadOptions} options Read options. + * @private + * @return {Array} Features. + */ + + + DragAndDrop.prototype.tryReadFeatures_ = function (format, text, options) { + try { + return ( + /** @type {Array} */ + format.readFeatures(text, options) + ); + } catch (e) { + return null; + } + }; + /** + * @private + */ + + + DragAndDrop.prototype.unregisterListeners_ = function () { + if (this.dropListenKeys_) { + this.dropListenKeys_.forEach(_events_js__WEBPACK_IMPORTED_MODULE_4__.unlistenByKey); + this.dropListenKeys_ = null; + } + }; + /** + * @param {DragEvent} event Event. + */ + + + DragAndDrop.prototype.handleDrop = function (event) { + var files = event.dataTransfer.files; + + for (var i = 0, ii = files.length; i < ii; ++i) { + var file = files.item(i); + var reader = new FileReader(); + reader.addEventListener(_events_EventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].LOAD, this.handleResult_.bind(this, file)); + + if (this.readAsBuffer_) { + reader.readAsArrayBuffer(file); + } else { + reader.readAsText(file); + } + } + }; + /** + * @param {DragEvent} event Event. + */ + + + DragAndDrop.prototype.handleStop = function (event) { + event.stopPropagation(); + event.preventDefault(); + event.dataTransfer.dropEffect = 'copy'; + }; + + return DragAndDrop; +}(_Interaction_js__WEBPACK_IMPORTED_MODULE_6__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (DragAndDrop); + +/***/ }), +/* 116 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/** + * @module ol/format/FormatType + */ + +/** + * @enum {string} + */ +/* harmony default export */ __webpack_exports__["default"] = ({ + ARRAY_BUFFER: 'arraybuffer', + JSON: 'json', + TEXT: 'text', + XML: 'xml' +}); + +/***/ }), +/* 117 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "DragBoxEvent": function() { return /* binding */ DragBoxEvent; } +/* harmony export */ }); +/* harmony import */ var _events_Event_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22); +/* harmony import */ var _Pointer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(120); +/* harmony import */ var _render_Box_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(118); +/* harmony import */ var _events_condition_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(119); +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); +/** + * @module ol/interaction/DragBox + */ +// FIXME draw drag box + + + + + + +/** + * A function that takes a {@link module:ol/MapBrowserEvent} and two + * {@link module:ol/pixel~Pixel}s and returns a `{boolean}`. If the condition is met, + * true should be returned. + * @typedef {function(this: ?, import("../MapBrowserEvent.js").default, import("../pixel.js").Pixel, import("../pixel.js").Pixel):boolean} EndCondition + */ + +/** + * @typedef {Object} Options + * @property {string} [className='ol-dragbox'] CSS class name for styling the box. + * @property {import("../events/condition.js").Condition} [condition] A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean + * to indicate whether that event should be handled. + * Default is {@link ol/events/condition~mouseActionButton}. + * @property {number} [minArea=64] The minimum area of the box in pixel, this value is used by the default + * `boxEndCondition` function. + * @property {EndCondition} [boxEndCondition] A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two + * {@link module:ol/pixel~Pixel}s to indicate whether a `boxend` event should be fired. + * Default is `true` if the area of the box is bigger than the `minArea` option. + * @property {function(this:DragBox, import("../MapBrowserEvent.js").default):void} [onBoxEnd] Code to execute just + * before `boxend` is fired. + */ + +/** + * @enum {string} + */ + +var DragBoxEventType = { + /** + * Triggered upon drag box start. + * @event DragBoxEvent#boxstart + * @api + */ + BOXSTART: 'boxstart', + + /** + * Triggered on drag when box is active. + * @event DragBoxEvent#boxdrag + * @api + */ + BOXDRAG: 'boxdrag', + + /** + * Triggered upon drag box end. + * @event DragBoxEvent#boxend + * @api + */ + BOXEND: 'boxend', + + /** + * Triggered upon drag box canceled. + * @event DragBoxEvent#boxcancel + * @api + */ + BOXCANCEL: 'boxcancel' +}; +/** + * @classdesc + * Events emitted by {@link module:ol/interaction/DragBox~DragBox} instances are instances of + * this type. + */ + +var DragBoxEvent = +/** @class */ +function (_super) { + __extends(DragBoxEvent, _super); + /** + * @param {string} type The event type. + * @param {import("../coordinate.js").Coordinate} coordinate The event coordinate. + * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Originating event. + */ + + + function DragBoxEvent(type, coordinate, mapBrowserEvent) { + var _this = _super.call(this, type) || this; + /** + * The coordinate of the drag event. + * @const + * @type {import("../coordinate.js").Coordinate} + * @api + */ + + + _this.coordinate = coordinate; + /** + * @const + * @type {import("../MapBrowserEvent.js").default} + * @api + */ + + _this.mapBrowserEvent = mapBrowserEvent; + return _this; + } + + return DragBoxEvent; +}(_events_Event_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + + +/*** + * @template Return + * @typedef {import("../Observable").OnSignature & + * import("../Observable").OnSignature & + * import("../Observable").OnSignature<'boxcancel'|'boxdrag'|'boxend'|'boxstart', DragBoxEvent, Return> & + * import("../Observable").CombinedOnSignature} DragBoxOnSignature + */ + +/** + * @classdesc + * Allows the user to draw a vector box by clicking and dragging on the map, + * normally combined with an {@link module:ol/events/condition} that limits + * it to when the shift or other key is held down. This is used, for example, + * for zooming to a specific area of the map + * (see {@link module:ol/interaction/DragZoom~DragZoom} and + * {@link module:ol/interaction/DragRotateAndZoom}). + * + * @fires DragBoxEvent + * @api + */ + +var DragBox = +/** @class */ +function (_super) { + __extends(DragBox, _super); + /** + * @param {Options} [opt_options] Options. + */ + + + function DragBox(opt_options) { + var _this = _super.call(this) || this; + /*** + * @type {DragBoxOnSignature} + */ + + + _this.on; + /*** + * @type {DragBoxOnSignature} + */ + + _this.once; + /*** + * @type {DragBoxOnSignature} + */ + + _this.un; + var options = opt_options ? opt_options : {}; + /** + * @type {import("../render/Box.js").default} + * @private + */ + + _this.box_ = new _render_Box_js__WEBPACK_IMPORTED_MODULE_1__["default"](options.className || 'ol-dragbox'); + /** + * @type {number} + * @private + */ + + _this.minArea_ = options.minArea !== undefined ? options.minArea : 64; + + if (options.onBoxEnd) { + _this.onBoxEnd = options.onBoxEnd; + } + /** + * @type {import("../pixel.js").Pixel} + * @private + */ + + + _this.startPixel_ = null; + /** + * @private + * @type {import("../events/condition.js").Condition} + */ + + _this.condition_ = options.condition ? options.condition : _events_condition_js__WEBPACK_IMPORTED_MODULE_2__.mouseActionButton; + /** + * @private + * @type {EndCondition} + */ + + _this.boxEndCondition_ = options.boxEndCondition ? options.boxEndCondition : _this.defaultBoxEndCondition; + return _this; + } + /** + * The default condition for determining whether the boxend event + * should fire. + * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent The originating MapBrowserEvent + * leading to the box end. + * @param {import("../pixel.js").Pixel} startPixel The starting pixel of the box. + * @param {import("../pixel.js").Pixel} endPixel The end pixel of the box. + * @return {boolean} Whether or not the boxend condition should be fired. + */ + + + DragBox.prototype.defaultBoxEndCondition = function (mapBrowserEvent, startPixel, endPixel) { + var width = endPixel[0] - startPixel[0]; + var height = endPixel[1] - startPixel[1]; + return width * width + height * height >= this.minArea_; + }; + /** + * Returns geometry of last drawn box. + * @return {import("../geom/Polygon.js").default} Geometry. + * @api + */ + + + DragBox.prototype.getGeometry = function () { + return this.box_.getGeometry(); + }; + /** + * Handle pointer drag events. + * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event. + */ + + + DragBox.prototype.handleDragEvent = function (mapBrowserEvent) { + this.box_.setPixels(this.startPixel_, mapBrowserEvent.pixel); + this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXDRAG, mapBrowserEvent.coordinate, mapBrowserEvent)); + }; + /** + * Handle pointer up events. + * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event. + * @return {boolean} If the event was consumed. + */ + + + DragBox.prototype.handleUpEvent = function (mapBrowserEvent) { + this.box_.setMap(null); + var completeBox = this.boxEndCondition_(mapBrowserEvent, this.startPixel_, mapBrowserEvent.pixel); + + if (completeBox) { + this.onBoxEnd(mapBrowserEvent); + } + + this.dispatchEvent(new DragBoxEvent(completeBox ? DragBoxEventType.BOXEND : DragBoxEventType.BOXCANCEL, mapBrowserEvent.coordinate, mapBrowserEvent)); + return false; + }; + /** + * Handle pointer down events. + * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event. + * @return {boolean} If the event was consumed. + */ + + + DragBox.prototype.handleDownEvent = function (mapBrowserEvent) { + if (this.condition_(mapBrowserEvent)) { + this.startPixel_ = mapBrowserEvent.pixel; + this.box_.setMap(mapBrowserEvent.map); + this.box_.setPixels(this.startPixel_, this.startPixel_); + this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXSTART, mapBrowserEvent.coordinate, mapBrowserEvent)); + return true; + } else { + return false; + } + }; + /** + * Function to execute just before `onboxend` is fired + * @param {import("../MapBrowserEvent.js").default} event Event. + */ + + + DragBox.prototype.onBoxEnd = function (event) {}; + + return DragBox; +}(_Pointer_js__WEBPACK_IMPORTED_MODULE_3__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (DragBox); + +/***/ }), +/* 118 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _Disposable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(32); +/* harmony import */ var _geom_Polygon_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39); +/** + * @module ol/render/Box + */ +var __extends = undefined && undefined.__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + + _extendStatics(d, b); + + function __() { + this.constructor = d; + } + + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); + + + + +var RenderBox = +/** @class */ +function (_super) { + __extends(RenderBox, _super); + /** + * @param {string} className CSS class name. + */ + + + function RenderBox(className) { + var _this = _super.call(this) || this; + /** + * @type {import("../geom/Polygon.js").default} + * @private + */ + + + _this.geometry_ = null; + /** + * @type {HTMLDivElement} + * @private + */ + + _this.element_ = document.createElement('div'); + _this.element_.style.position = 'absolute'; + _this.element_.style.pointerEvents = 'auto'; + _this.element_.className = 'ol-box ' + className; + /** + * @private + * @type {import("../PluggableMap.js").default} + */ + + _this.map_ = null; + /** + * @private + * @type {import("../pixel.js").Pixel} + */ + + _this.startPixel_ = null; + /** + * @private + * @type {import("../pixel.js").Pixel} + */ + + _this.endPixel_ = null; + return _this; + } + /** + * Clean up. + */ + + + RenderBox.prototype.disposeInternal = function () { + this.setMap(null); + }; + /** + * @private + */ + + + RenderBox.prototype.render_ = function () { + var startPixel = this.startPixel_; + var endPixel = this.endPixel_; + var px = 'px'; + var style = this.element_.style; + style.left = Math.min(startPixel[0], endPixel[0]) + px; + style.top = Math.min(startPixel[1], endPixel[1]) + px; + style.width = Math.abs(endPixel[0] - startPixel[0]) + px; + style.height = Math.abs(endPixel[1] - startPixel[1]) + px; + }; + /** + * @param {import("../PluggableMap.js").default} map Map. + */ + + + RenderBox.prototype.setMap = function (map) { + if (this.map_) { + this.map_.getOverlayContainer().removeChild(this.element_); + var style = this.element_.style; + style.left = 'inherit'; + style.top = 'inherit'; + style.width = 'inherit'; + style.height = 'inherit'; + } + + this.map_ = map; + + if (this.map_) { + this.map_.getOverlayContainer().appendChild(this.element_); + } + }; + /** + * @param {import("../pixel.js").Pixel} startPixel Start pixel. + * @param {import("../pixel.js").Pixel} endPixel End pixel. + */ + + + RenderBox.prototype.setPixels = function (startPixel, endPixel) { + this.startPixel_ = startPixel; + this.endPixel_ = endPixel; + this.createOrUpdateGeometry(); + this.render_(); + }; + /** + * Creates or updates the cached geometry. + */ + + + RenderBox.prototype.createOrUpdateGeometry = function () { + var startPixel = this.startPixel_; + var endPixel = this.endPixel_; + var pixels = [startPixel, [startPixel[0], endPixel[1]], endPixel, [endPixel[0], startPixel[1]]]; + var coordinates = pixels.map(this.map_.getCoordinateFromPixelInternal, this.map_); // close the polygon + + coordinates[4] = coordinates[0].slice(); + + if (!this.geometry_) { + this.geometry_ = new _geom_Polygon_js__WEBPACK_IMPORTED_MODULE_0__["default"]([coordinates]); + } else { + this.geometry_.setCoordinates([coordinates]); + } + }; + /** + * @return {import("../geom/Polygon.js").default} Geometry. + */ + + + RenderBox.prototype.getGeometry = function () { + return this.geometry_; + }; + + return RenderBox; +}(_Disposable_js__WEBPACK_IMPORTED_MODULE_1__["default"]); + +/* harmony default export */ __webpack_exports__["default"] = (RenderBox); + +/***/ }), +/* 119 */ +/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "all": function() { return /* binding */ all; }, +/* harmony export */ "altKeyOnly": function() { return /* binding */ altKeyOnly; }, +/* harmony export */ "altShiftKeysOnly": function() { return /* binding */ altShiftKeysOnly; }, +/* harmony export */ "focus": function() { return /* binding */ focus; }, +/* harmony export */ "focusWithTabindex": function() { return /* binding */ focusWithTabindex; }, +/* harmony export */ "always": function() { return /* binding */ always; }, +/* harmony export */ "click": function() { return /* binding */ click; }, +/* harmony export */ "mouseActionButton": function() { return /* binding */ mouseActionButton; }, +/* harmony export */ "never": function() { return /* binding */ never; }, +/* harmony export */ "pointerMove": function() { return /* binding */ pointerMove; }, +/* harmony export */ "singleClick": function() { return /* binding */ singleClick; }, +/* harmony export */ "doubleClick": function() { return /* binding */ doubleClick; }, +/* harmony export */ "noModifierKeys": function() { return /* binding */ noModifierKeys; }, +/* harmony export */ "platformModifierKeyOnly": function() { return /* binding */ platformModifierKeyOnly; }, +/* harmony export */ "shiftKeyOnly": function() { return /* binding */ shiftKeyOnly; }, +/* harmony export */ "targetNotEditable": function() { return /* binding */ targetNotEditable; }, +/* harmony export */ "mouseOnly": function() { return /* binding */ mouseOnly; }, +/* harmony export */ "touchOnly": function() { return /* binding */ touchOnly; }, +/* harmony export */ "penOnly": function() { return /* binding */ penOnly; }, +/* harmony export */ "primaryAction": function() { return /* binding */ primaryAction; } +/* harmony export */ }); +/* harmony import */ var _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(101); +/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30); +/* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(54); +/* harmony import */ var _asserts_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14); +/** + * @module ol/events/condition + */ + + + + +/** + * A function that takes an {@link module:ol/MapBrowserEvent} and returns a + * `{boolean}`. If the condition is met, true should be returned. + * + * @typedef {function(this: ?, import("../MapBrowserEvent.js").default): boolean} Condition + */ + +/** + * Creates a condition function that passes when all provided conditions pass. + * @param {...Condition} var_args Conditions to check. + * @return {Condition} Condition function. + */ + +function all(var_args) { + var conditions = arguments; + /** + * @param {import("../MapBrowserEvent.js").default} event Event. + * @return {boolean} All conditions passed. + */ + + return function (event) { + var pass = true; + + for (var i = 0, ii = conditions.length; i < ii; ++i) { + pass = pass && conditions[i](event); + + if (!pass) { + break; + } + } + + return pass; + }; +} +/** + * Return `true` if only the alt-key is pressed, `false` otherwise (e.g. when + * additionally the shift-key is pressed). + * + * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event. + * @return {boolean} True if only the alt key is pressed. + * @api + */ + +var altKeyOnly = function altKeyOnly(mapBrowserEvent) { + var originalEvent = + /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ + mapBrowserEvent.originalEvent; + return originalEvent.altKey && !(originalEvent.metaKey || originalEvent.ctrlKey) && !originalEvent.shiftKey; +}; +/** + * Return `true` if only the alt-key and shift-key is pressed, `false` otherwise + * (e.g. when additionally the platform-modifier-key is pressed). + * + * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event. + * @return {boolean} True if only the alt and shift keys are pressed. + * @api + */ + +var altShiftKeysOnly = function altShiftKeysOnly(mapBrowserEvent) { + var originalEvent = + /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ + mapBrowserEvent.originalEvent; + return originalEvent.altKey && !(originalEvent.metaKey || originalEvent.ctrlKey) && originalEvent.shiftKey; +}; +/** + * Return `true` if the map has the focus. This condition requires a map target + * element with a `tabindex` attribute, e.g. `
`. + * + * @param {import("../MapBrowserEvent.js").default} event Map browser event. + * @return {boolean} The map has the focus. + * @api + */ + +var focus = function focus(event) { + return event.target.getTargetElement().contains(document.activeElement); +}; +/** + * Return `true` if the map has the focus or no 'tabindex' attribute set. + * + * @param {import("../MapBrowserEvent.js").default} event Map browser event. + * @return {boolean} The map container has the focus or no 'tabindex' attribute. + */ + +var focusWithTabindex = function focusWithTabindex(event) { + return event.map.getTargetElement().hasAttribute('tabindex') ? focus(event) : true; +}; +/** + * Return always true. + * + * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event. + * @return {boolean} True. + * @api + */ + +var always = _functions_js__WEBPACK_IMPORTED_MODULE_0__.TRUE; +/** + * Return `true` if the event is a `click` event, `false` otherwise. + * + * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event. + * @return {boolean} True if the event is a map `click` event. + * @api + */ + +var click = function click(mapBrowserEvent) { + return mapBrowserEvent.type == _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_1__["default"].CLICK; +}; +/** + * Return `true` if the event has an "action"-producing mouse button. + * + * By definition, this includes left-click on windows/linux, and left-click + * without the ctrl key on Macs. + * + * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event. + * @return {boolean} The result. + */ + +var mouseActionButton = function mouseActionButton(mapBrowserEvent) { + var originalEvent = + /** @type {MouseEvent} */ + mapBrowserEvent.originalEvent; + return originalEvent.button == 0 && !(_has_js__WEBPACK_IMPORTED_MODULE_2__.WEBKIT && _has_js__WEBPACK_IMPORTED_MODULE_2__.MAC && originalEvent.ctrlKey); +}; +/** + * Return always false. + * + * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event. + * @return {boolean} False. + * @api + */ + +var never = _functions_js__WEBPACK_IMPORTED_MODULE_0__.FALSE; +/** + * Return `true` if the browser event is a `pointermove` event, `false` + * otherwise. + * + * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event. + * @return {boolean} True if the browser event is a `pointermove` event. + * @api + */ + +var pointerMove = function pointerMove(mapBrowserEvent) { + return mapBrowserEvent.type == 'pointermove'; +}; +/** + * Return `true` if the event is a map `singleclick` event, `false` otherwise. + * + * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event. + * @return {boolean} True if the event is a map `singleclick` event. + * @api + */ + +var singleClick = function singleClick(mapBrowserEvent) { + return mapBrowserEvent.type == _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_1__["default"].SINGLECLICK; +}; +/** + * Return `true` if the event is a map `dblclick` event, `false` otherwise. + * + * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event. + * @return {boolean} True if the event is a map `dblclick` event. + * @api + */ + +var doubleClick = function doubleClick(mapBrowserEvent) { + return mapBrowserEvent.type == _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_1__["default"].DBLCLICK; +}; +/** + * Return `true` if no modifier key (alt-, shift- or platform-modifier-key) is + * pressed. + * + * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event. + * @return {boolean} True only if there no modifier keys are pressed. + * @api + */ + +var noModifierKeys = function noModifierKeys(mapBrowserEvent) { + var originalEvent = + /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ + mapBrowserEvent.originalEvent; + return !originalEvent.altKey && !(originalEvent.metaKey || originalEvent.ctrlKey) && !originalEvent.shiftKey; +}; +/** + * Return `true` if only the platform-modifier-key (the meta-key on Mac, + * ctrl-key otherwise) is pressed, `false` otherwise (e.g. when additionally + * the shift-key is pressed). + * + * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event. + * @return {boolean} True if only the platform modifier key is pressed. + * @api + */ + +var platformModifierKeyOnly = function platformModifierKeyOnly(mapBrowserEvent) { + var originalEvent = + /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ + mapBrowserEvent.originalEvent; + return !originalEvent.altKey && (_has_js__WEBPACK_IMPORTED_MODULE_2__.MAC ? originalEvent.metaKey : originalEvent.ctrlKey) && !originalEvent.shiftKey; +}; +/** + * Return `true` if only the shift-key is pressed, `false` otherwise (e.g. when + * additionally the alt-key is pressed). + * + * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event. + * @return {boolean} True if only the shift key is pressed. + * @api + */ + +var shiftKeyOnly = function shiftKeyOnly(mapBrowserEvent) { + var originalEvent = + /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ + mapBrowserEvent.originalEvent; + return !originalEvent.altKey && !(originalEvent.metaKey || originalEvent.ctrlKey) && originalEvent.shiftKey; +}; +/** + * Return `true` if the target element is not editable, i.e. not a ``-, + * `