From f9acd63fbfd318b58a446c4bebb3c821e8b98ada Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 21 Sep 2023 18:19:46 +0000 Subject: [PATCH] update jsdoc / bundles to release OpenLayers : ol-3.4.0-beta --- .../openlayers/GpPluginOpenLayers-map.css | 4 +- .../dist/openlayers/GpPluginOpenLayers-map.js | 66 +- .../openlayers/GpPluginOpenLayers-src.css | 4 +- .../dist/openlayers/GpPluginOpenLayers-src.js | 1907 +- .../dist/openlayers/GpPluginOpenLayers.css | 4 +- current/dist/openlayers/GpPluginOpenLayers.js | 12 +- .../OpenLayers/Controls/Isocurve.d.ts.map | 2 +- .../Controls/LocationSelector.d.ts.map | 2 +- .../Controls/MousePosition.d.ts.map | 2 +- .../Controls/ReverseGeocode.d.ts.map | 2 +- .../OpenLayers/Controls/Route.d.ts.map | 2 +- current/jsdoc/openlayers/EventEditor.html | 2 +- current/jsdoc/openlayers/global.html | 2 +- current/jsdoc/openlayers/index.html | 2 +- .../jsdoc/openlayers/module-ButtonExport.html | 2 +- .../jsdoc/openlayers/module-ColorUtils.html | 2 +- current/jsdoc/openlayers/module-Config.html | 2 +- .../jsdoc/openlayers/module-Draggable.html | 2 +- current/jsdoc/openlayers/module-Drawing.html | 2 +- .../openlayers/module-ElevationPath.html | 2 +- .../jsdoc/openlayers/module-GPXExtended.html | 2 +- .../openlayers/module-GeoJSONExtended.html | 2 +- .../module-GeoportalAttribution.html | 2 +- .../openlayers/module-GetFeatureInfo.html | 2 +- current/jsdoc/openlayers/module-Gp.html | 2 +- current/jsdoc/openlayers/module-Isocurve.html | 6 +- .../jsdoc/openlayers/module-KMLExtended.html | 2 +- .../jsdoc/openlayers/module-LayerImport.html | 2 +- .../jsdoc/openlayers/module-LayerMapBox.html | 2 +- .../openlayers/module-LayerSwitcher.html | 2 +- .../jsdoc/openlayers/module-LayerUtils.html | 2 +- current/jsdoc/openlayers/module-LayerWMS.html | 2 +- .../jsdoc/openlayers/module-LayerWMTS.html | 2 +- .../openlayers/module-LocationSelector.html | 2 +- .../openlayers/module-LoggerByDefault.html | 2 +- .../jsdoc/openlayers/module-MathUtils.html | 2 +- .../openlayers/module-MousePosition.html | 2 +- current/jsdoc/openlayers/module-Parser.html | 2 +- .../module-ProfileElevationPathDOM.html | 2 +- .../jsdoc/openlayers/module-ProxyUtils.html | 2 +- current/jsdoc/openlayers/module-Register.html | 2 +- .../openlayers/module-ReverseGeocode.html | 6 +- current/jsdoc/openlayers/module-Route.html | 8 +- .../jsdoc/openlayers/module-SearchEngine.html | 2 +- .../openlayers/module-SearchEngineUtils.html | 2 +- .../jsdoc/openlayers/module-SelectorID.html | 2 +- current/jsdoc/openlayers/module-Styling.html | 2 +- current/jsdoc/openlayers/module-Utils.html | 2 +- .../jsdoc/openlayers/ol.control.Drawing.html | 2 +- .../openlayers/ol.control.ElevationPath.html | 2 +- .../jsdoc/openlayers/ol.control.Export.html | 2 +- .../ol.control.GeoportalAttribution.html | 2 +- .../ol.control.GeoportalMousePosition.html | 4 +- .../openlayers/ol.control.GetFeatureInfo.html | 2 +- .../jsdoc/openlayers/ol.control.Isocurve.html | 2 +- .../openlayers/ol.control.LayerImport.html | 2 +- .../openlayers/ol.control.LayerSwitcher.html | 2 +- .../openlayers/ol.control.MeasureArea.html | 2 +- .../openlayers/ol.control.MeasureAzimuth.html | 2 +- .../openlayers/ol.control.MeasureLength.html | 2 +- .../openlayers/ol.control.ReverseGeocode.html | 2 +- .../jsdoc/openlayers/ol.control.Route.html | 2 +- .../openlayers/ol.control.SearchEngine.html | 2 +- .../openlayers/ol.format.GPXExtended.html | 2 +- .../openlayers/ol.format.GeoJSONExtended.html | 2 +- .../openlayers/ol.format.KMLExtended.html | 2 +- .../openlayers/ol.layer.GeoportalMapBox.html | 2 +- .../openlayers/ol.layer.GeoportalWMS.html | 2 +- .../openlayers/ol.layer.GeoportalWMTS.html | 2 +- .../openlayers/ol.source.GeoportalWMS.html | 2 +- .../openlayers/ol.source.GeoportalWMTS.html | 2 +- .../openlayers/ol.source.WMTSExtended.html | 2 +- current/jsdoc/openlayers/ol.style.Editor.html | 2 +- .../openlayers/ol.style.editor.Filter.html | 2 +- .../openlayers/ol.style.editor.Group.html | 2 +- .../openlayers/ol.style.editor.Layer.html | 2 +- .../openlayers/ol.style.editor.Legend.html | 2 +- .../openlayers/ol.style.editor.Search.html | 2 +- .../openlayers/ol.style.editor.Style.html | 2 +- .../openlayers/ol.style.editor.Theme.html | 2 +- .../dist/Common/Controls/AttributionDOM.d.ts | 10 + .../Common/Controls/AttributionDOM.d.ts.map | 1 + .../dist/Common/Controls/BoostReliefDOM.d.ts | 11 + .../Common/Controls/BoostReliefDOM.d.ts.map | 1 + .../dist/Common/Controls/BuildingsDOM.d.ts | 7 + .../Common/Controls/BuildingsDOM.d.ts.map | 1 + .../dist/Common/Controls/DrawingDOM.d.ts | 3 + .../dist/Common/Controls/DrawingDOM.d.ts.map | 1 + .../Common/Controls/Editor/EditorDOM.d.ts | 5 + .../Common/Controls/Editor/EditorDOM.d.ts.map | 1 + .../Common/Controls/ElevationPathDOM.d.ts | 14 + .../Common/Controls/ElevationPathDOM.d.ts.map | 1 + .../dist/Common/Controls/ExportDOM.d.ts | 5 + .../dist/Common/Controls/ExportDOM.d.ts.map | 1 + .../Common/Controls/GetFeatureInfoDOM.d.ts | 8 + .../Controls/GetFeatureInfoDOM.d.ts.map | 1 + .../dist/Common/Controls/IsoDOM.d.ts | 26 + .../dist/Common/Controls/IsoDOM.d.ts.map | 1 + .../dist/Common/Controls/LayerImportDOM.d.ts | 42 + .../Common/Controls/LayerImportDOM.d.ts.map | 1 + .../Common/Controls/LayerSwitcherDOM.d.ts | 28 + .../Common/Controls/LayerSwitcherDOM.d.ts.map | 1 + .../Common/Controls/LocationSelectorDOM.d.ts | 17 + .../Controls/LocationSelectorDOM.d.ts.map | 1 + .../dist/Common/Controls/MeasureAreaDOM.d.ts | 8 + .../Common/Controls/MeasureAreaDOM.d.ts.map | 1 + .../Common/Controls/MeasureAzimuthDOM.d.ts | 8 + .../Controls/MeasureAzimuthDOM.d.ts.map | 1 + .../Common/Controls/MeasureLengthDOM.d.ts | 8 + .../Common/Controls/MeasureLengthDOM.d.ts.map | 1 + .../Common/Controls/MeasureToolBoxDOM.d.ts | 11 + .../Controls/MeasureToolBoxDOM.d.ts.map | 1 + .../dist/Common/Controls/MiniGlobeDOM.d.ts | 6 + .../Common/Controls/MiniGlobeDOM.d.ts.map | 1 + .../Common/Controls/MousePositionDOM.d.ts | 30 + .../Common/Controls/MousePositionDOM.d.ts.map | 1 + .../Controls/ProfileElevationPathDOM.d.ts | 14 + .../Controls/ProfileElevationPathDOM.d.ts.map | 1 + .../Common/Controls/ReverseGeocodingDOM.d.ts | 21 + .../Controls/ReverseGeocodingDOM.d.ts.map | 1 + .../dist/Common/Controls/RouteDOM.d.ts | 34 + .../dist/Common/Controls/RouteDOM.d.ts.map | 1 + .../dist/Common/Controls/ScaleDOM.d.ts | 6 + .../dist/Common/Controls/ScaleDOM.d.ts.map | 1 + .../dist/Common/Controls/SearchEngineDOM.d.ts | 31 + .../Common/Controls/SearchEngineDOM.d.ts.map | 1 + ol-3.4.0-beta/dist/Common/Styles.d.ts | 2 + ol-3.4.0-beta/dist/Common/Styles.d.ts.map | 1 + ol-3.4.0-beta/dist/Common/Utils.d.ts | 7 + ol-3.4.0-beta/dist/Common/Utils.d.ts.map | 1 + .../dist/Common/Utils/AutoLoadConfig.d.ts | 2 + .../dist/Common/Utils/AutoLoadConfig.d.ts.map | 1 + .../dist/Common/Utils/ColorUtils.d.ts | 12 + .../dist/Common/Utils/ColorUtils.d.ts.map | 1 + ol-3.4.0-beta/dist/Common/Utils/Config.d.ts | 6 + .../dist/Common/Utils/Config.d.ts.map | 1 + .../dist/Common/Utils/Draggable.d.ts | 5 + .../dist/Common/Utils/Draggable.d.ts.map | 1 + .../dist/Common/Utils/GeocodeUtils.d.ts | 6 + .../dist/Common/Utils/GeocodeUtils.d.ts.map | 1 + .../dist/Common/Utils/LayerUtils.d.ts | 13 + .../dist/Common/Utils/LayerUtils.d.ts.map | 1 + .../dist/Common/Utils/LoggerByDefault.d.ts | 7 + .../Common/Utils/LoggerByDefault.d.ts.map | 1 + .../dist/Common/Utils/MathUtils.d.ts | 9 + .../dist/Common/Utils/MathUtils.d.ts.map | 1 + ol-3.4.0-beta/dist/Common/Utils/Parser.d.ts | 7 + .../dist/Common/Utils/Parser.d.ts.map | 1 + .../dist/Common/Utils/ProxyUtils.d.ts | 8 + .../dist/Common/Utils/ProxyUtils.d.ts.map | 1 + ol-3.4.0-beta/dist/Common/Utils/Register.d.ts | 441 + .../dist/Common/Utils/Register.d.ts.map | 1 + .../dist/Common/Utils/SearchEngineUtils.d.ts | 25 + .../Common/Utils/SearchEngineUtils.d.ts.map | 1 + .../dist/Common/Utils/SelectorID.d.ts | 8 + .../dist/Common/Utils/SelectorID.d.ts.map | 1 + ol-3.4.0-beta/dist/GpPluginOpenLayers-map.css | 4976 + ol-3.4.0-beta/dist/GpPluginOpenLayers-map.js | 3328 + ol-3.4.0-beta/dist/GpPluginOpenLayers-src.css | 4976 + ol-3.4.0-beta/dist/GpPluginOpenLayers-src.js | 87913 ++++++++++++++++ ol-3.4.0-beta/dist/GpPluginOpenLayers.css | 96 + ol-3.4.0-beta/dist/GpPluginOpenLayers.js | 115 + .../dist/OpenLayers/CRS/AutoLoadCRS.d.ts | 2 + .../dist/OpenLayers/CRS/AutoLoadCRS.d.ts.map | 1 + ol-3.4.0-beta/dist/OpenLayers/CRS/CRS.d.ts | 22 + .../dist/OpenLayers/CRS/CRS.d.ts.map | 1 + ol-3.4.0-beta/dist/OpenLayers/CRS/Proj4.d.ts | 2 + .../dist/OpenLayers/CRS/Proj4.d.ts.map | 1 + .../dist/OpenLayers/Controls/Drawing.d.ts | 110 + .../dist/OpenLayers/Controls/Drawing.d.ts.map | 1 + .../dist/OpenLayers/Controls/Editor.d.ts | 330 + .../dist/OpenLayers/Controls/Editor.d.ts.map | 1 + .../OpenLayers/Controls/Editor/Event.d.ts | 36 + .../OpenLayers/Controls/Editor/Event.d.ts.map | 1 + .../OpenLayers/Controls/Editor/Filter.d.ts | 92 + .../Controls/Editor/Filter.d.ts.map | 1 + .../OpenLayers/Controls/Editor/Group.d.ts | 74 + .../OpenLayers/Controls/Editor/Group.d.ts.map | 1 + .../OpenLayers/Controls/Editor/Layer.d.ts | 196 + .../OpenLayers/Controls/Editor/Layer.d.ts.map | 1 + .../OpenLayers/Controls/Editor/Legend.d.ts | 242 + .../Controls/Editor/Legend.d.ts.map | 1 + .../OpenLayers/Controls/Editor/Search.d.ts | 85 + .../Controls/Editor/Search.d.ts.map | 1 + .../OpenLayers/Controls/Editor/Style.d.ts | 109 + .../OpenLayers/Controls/Editor/Style.d.ts.map | 1 + .../OpenLayers/Controls/Editor/Themes.d.ts | 126 + .../Controls/Editor/Themes.d.ts.map | 1 + .../OpenLayers/Controls/ElevationPath.d.ts | 73 + .../Controls/ElevationPath.d.ts.map | 1 + .../dist/OpenLayers/Controls/Export.d.ts | 266 + .../dist/OpenLayers/Controls/Export.d.ts.map | 1 + .../Controls/GeoportalAttribution.d.ts | 21 + .../Controls/GeoportalAttribution.d.ts.map | 1 + .../OpenLayers/Controls/GetFeatureInfo.d.ts | 31 + .../Controls/GetFeatureInfo.d.ts.map | 1 + .../dist/OpenLayers/Controls/Isocurve.d.ts | 65 + .../OpenLayers/Controls/Isocurve.d.ts.map | 1 + .../dist/OpenLayers/Controls/LayerImport.d.ts | 84 + .../OpenLayers/Controls/LayerImport.d.ts.map | 1 + .../OpenLayers/Controls/LayerSwitcher.d.ts | 40 + .../Controls/LayerSwitcher.d.ts.map | 1 + .../OpenLayers/Controls/LocationSelector.d.ts | 39 + .../Controls/LocationSelector.d.ts.map | 1 + .../OpenLayers/Controls/MeasureToolBox.d.ts | 10 + .../Controls/MeasureToolBox.d.ts.map | 1 + .../Controls/Measures/MeasureArea.d.ts | 27 + .../Controls/Measures/MeasureArea.d.ts.map | 1 + .../Controls/Measures/MeasureAzimuth.d.ts | 27 + .../Controls/Measures/MeasureAzimuth.d.ts.map | 1 + .../Controls/Measures/MeasureLength.d.ts | 27 + .../Controls/Measures/MeasureLength.d.ts.map | 1 + .../Controls/Measures/Measures.d.ts | 11 + .../Controls/Measures/Measures.d.ts.map | 1 + .../OpenLayers/Controls/MousePosition.d.ts | 87 + .../Controls/MousePosition.d.ts.map | 1 + .../OpenLayers/Controls/ReverseGeocode.d.ts | 34 + .../Controls/ReverseGeocode.d.ts.map | 1 + .../dist/OpenLayers/Controls/Route.d.ts | 71 + .../dist/OpenLayers/Controls/Route.d.ts.map | 1 + .../OpenLayers/Controls/SearchEngine.d.ts | 62 + .../OpenLayers/Controls/SearchEngine.d.ts.map | 1 + .../Controls/Utils/Interactions.d.ts | 10 + .../Controls/Utils/Interactions.d.ts.map | 1 + .../OpenLayers/Controls/Utils/Markers.d.ts | 9 + .../Controls/Utils/Markers.d.ts.map | 1 + .../Controls/Utils/MarkersOther.d.ts | 12 + .../Controls/Utils/MarkersOther.d.ts.map | 1 + .../dist/OpenLayers/Formats/GPX.d.ts | 22 + .../dist/OpenLayers/Formats/GPX.d.ts.map | 1 + .../dist/OpenLayers/Formats/GeoJSON.d.ts | 21 + .../dist/OpenLayers/Formats/GeoJSON.d.ts.map | 1 + .../dist/OpenLayers/Formats/KML.d.ts | 30 + .../dist/OpenLayers/Formats/KML.d.ts.map | 1 + .../dist/OpenLayers/Formats/Styling.d.ts | 63 + .../dist/OpenLayers/Formats/Styling.d.ts.map | 1 + ol-3.4.0-beta/dist/OpenLayers/GfiUtils.d.ts | 23 + .../dist/OpenLayers/GfiUtils.d.ts.map | 1 + .../dist/OpenLayers/Layers/LayerMapBox.d.ts | 31 + .../OpenLayers/Layers/LayerMapBox.d.ts.map | 1 + .../dist/OpenLayers/Layers/LayerWMS.d.ts | 22 + .../dist/OpenLayers/Layers/LayerWMS.d.ts.map | 1 + .../dist/OpenLayers/Layers/LayerWMTS.d.ts | 22 + .../dist/OpenLayers/Layers/LayerWMTS.d.ts.map | 1 + .../dist/OpenLayers/Layers/SourceWMS.d.ts | 26 + .../dist/OpenLayers/Layers/SourceWMS.d.ts.map | 1 + .../dist/OpenLayers/Layers/SourceWMTS.d.ts | 26 + .../OpenLayers/Layers/SourceWMTS.d.ts.map | 1 + ol-3.4.0-beta/dist/OpenLayers/Layers/WFS.d.ts | 3 + .../dist/OpenLayers/Layers/WFS.d.ts.map | 1 + .../dist/OpenLayers/Sources/WMTS.d.ts | 14 + .../dist/OpenLayers/Sources/WMTS.d.ts.map | 1 + ol-3.4.0-beta/dist/OpenLayers/Styles.d.ts | 2 + ol-3.4.0-beta/dist/OpenLayers/Styles.d.ts.map | 1 + ol-3.4.0-beta/dist/OpenLayers/index.d.ts | 106 + ol-3.4.0-beta/dist/OpenLayers/index.d.ts.map | 1 + ol-3.4.0-beta/jsdoc/EventEditor.html | 5157 + .../fonts/glyphicons-halflings-regular.eot | Bin 0 -> 20290 bytes .../fonts/glyphicons-halflings-regular.svg | 229 + .../fonts/glyphicons-halflings-regular.ttf | Bin 0 -> 41236 bytes .../fonts/glyphicons-halflings-regular.woff | Bin 0 -> 23292 bytes ol-3.4.0-beta/jsdoc/global.html | 4871 + ol-3.4.0-beta/jsdoc/images/entete.png | Bin 0 -> 119357 bytes ol-3.4.0-beta/jsdoc/images/logoIGN.png | Bin 0 -> 7387 bytes ol-3.4.0-beta/jsdoc/images/logoIGNsmall.png | Bin 0 -> 1010 bytes ol-3.4.0-beta/jsdoc/images/showLeftMenu.png | Bin 0 -> 502 bytes ol-3.4.0-beta/jsdoc/index.html | 4792 + ol-3.4.0-beta/jsdoc/module-ButtonExport.html | 4886 + ol-3.4.0-beta/jsdoc/module-ColorUtils.html | 5271 + ol-3.4.0-beta/jsdoc/module-Config.html | 4729 + ol-3.4.0-beta/jsdoc/module-Draggable.html | 4925 + ol-3.4.0-beta/jsdoc/module-Drawing.html | 4729 + ol-3.4.0-beta/jsdoc/module-ElevationPath.html | 5009 + ol-3.4.0-beta/jsdoc/module-GPXExtended.html | 4729 + .../jsdoc/module-GeoJSONExtended.html | 4729 + .../jsdoc/module-GeoportalAttribution.html | 4866 + .../jsdoc/module-GetFeatureInfo.html | 4729 + ol-3.4.0-beta/jsdoc/module-Gp.html | 5232 + ol-3.4.0-beta/jsdoc/module-Isocurve.html | 5009 + ol-3.4.0-beta/jsdoc/module-KMLExtended.html | 4729 + ol-3.4.0-beta/jsdoc/module-LayerImport.html | 4729 + ol-3.4.0-beta/jsdoc/module-LayerMapBox.html | 4729 + ol-3.4.0-beta/jsdoc/module-LayerSwitcher.html | 4729 + ol-3.4.0-beta/jsdoc/module-LayerUtils.html | 5300 + ol-3.4.0-beta/jsdoc/module-LayerWMS.html | 4729 + ol-3.4.0-beta/jsdoc/module-LayerWMTS.html | 4729 + .../jsdoc/module-LocationSelector.html | 4729 + .../jsdoc/module-LoggerByDefault.html | 5015 + ol-3.4.0-beta/jsdoc/module-MathUtils.html | 5453 + ol-3.4.0-beta/jsdoc/module-MousePosition.html | 4729 + ol-3.4.0-beta/jsdoc/module-Parser.html | 4730 + .../jsdoc/module-ProfileElevationPathDOM.html | 4721 + ol-3.4.0-beta/jsdoc/module-ProxyUtils.html | 4976 + ol-3.4.0-beta/jsdoc/module-Register.html | 5396 + .../jsdoc/module-ReverseGeocode.html | 5068 + ol-3.4.0-beta/jsdoc/module-Route.html | 5031 + ol-3.4.0-beta/jsdoc/module-SearchEngine.html | 5091 + .../jsdoc/module-SearchEngineUtils.html | 4932 + ol-3.4.0-beta/jsdoc/module-SelectorID.html | 5177 + ol-3.4.0-beta/jsdoc/module-Styling.html | 5453 + ol-3.4.0-beta/jsdoc/module-Utils.html | 5127 + ol-3.4.0-beta/jsdoc/ol.control.Drawing.html | 8028 ++ .../jsdoc/ol.control.ElevationPath.html | 7683 ++ ol-3.4.0-beta/jsdoc/ol.control.Export.html | 6276 ++ .../ol.control.GeoportalAttribution.html | 4998 + .../ol.control.GeoportalMousePosition.html | 7412 ++ .../jsdoc/ol.control.GetFeatureInfo.html | 6547 ++ ol-3.4.0-beta/jsdoc/ol.control.Isocurve.html | 7158 ++ .../jsdoc/ol.control.LayerImport.html | 6435 ++ .../jsdoc/ol.control.LayerSwitcher.html | 6605 ++ .../jsdoc/ol.control.MeasureArea.html | 5305 + .../jsdoc/ol.control.MeasureAzimuth.html | 5503 + .../jsdoc/ol.control.MeasureLength.html | 5305 + .../jsdoc/ol.control.ReverseGeocode.html | 5733 + ol-3.4.0-beta/jsdoc/ol.control.Route.html | 6907 ++ .../jsdoc/ol.control.SearchEngine.html | 6037 ++ .../jsdoc/ol.format.GPXExtended.html | 5605 + .../jsdoc/ol.format.GeoJSONExtended.html | 5407 + .../jsdoc/ol.format.KMLExtended.html | 5401 + .../jsdoc/ol.layer.GeoportalMapBox.html | 5243 + .../jsdoc/ol.layer.GeoportalWMS.html | 4996 + .../jsdoc/ol.layer.GeoportalWMTS.html | 5014 + .../jsdoc/ol.source.GeoportalWMS.html | 5111 + .../jsdoc/ol.source.GeoportalWMTS.html | 5111 + .../jsdoc/ol.source.WMTSExtended.html | 5062 + ol-3.4.0-beta/jsdoc/ol.style.Editor.html | 5853 + .../jsdoc/ol.style.editor.Filter.html | 5115 + .../jsdoc/ol.style.editor.Group.html | 5091 + .../jsdoc/ol.style.editor.Layer.html | 5945 ++ .../jsdoc/ol.style.editor.Legend.html | 5916 ++ .../jsdoc/ol.style.editor.Search.html | 5119 + .../jsdoc/ol.style.editor.Style.html | 5117 + .../jsdoc/ol.style.editor.Theme.html | 5129 + ol-3.4.0-beta/jsdoc/scripts/bootstrap.min.js | 7 + ol-3.4.0-beta/jsdoc/scripts/jquery.min.js | 6 + ol-3.4.0-beta/jsdoc/scripts/jquery.min.map | 1 + ol-3.4.0-beta/jsdoc/scripts/linenumber.js | 29 + ol-3.4.0-beta/jsdoc/scripts/main.js | 73 + .../scripts/prettify/Apache-License-2.0.txt | 202 + .../jsdoc/scripts/prettify/lang-css.js | 2 + .../jsdoc/scripts/prettify/prettify.js | 28 + ol-3.4.0-beta/jsdoc/scripts/underscore-min.js | 6 + .../jsdoc/scripts/underscore-min.map | 1 + ol-3.4.0-beta/jsdoc/styles/bootstrap.min.css | 7 + ol-3.4.0-beta/jsdoc/styles/jaguar.css | 349 + ol-3.4.0-beta/jsdoc/styles/prettify-jsdoc.css | 111 + .../jsdoc/styles/prettify-tomorrow.css | 132 + ol-3.4.0-beta/jsdoc/styles/sfd.css | 763 + ol-latest | 2 +- openlayers-latest | 2 +- 350 files changed, 477579 insertions(+), 907 deletions(-) create mode 100644 ol-3.4.0-beta/dist/Common/Controls/AttributionDOM.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Controls/AttributionDOM.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Controls/BoostReliefDOM.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Controls/BoostReliefDOM.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Controls/BuildingsDOM.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Controls/BuildingsDOM.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Controls/DrawingDOM.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Controls/DrawingDOM.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Controls/Editor/EditorDOM.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Controls/Editor/EditorDOM.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Controls/ElevationPathDOM.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Controls/ElevationPathDOM.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Controls/ExportDOM.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Controls/ExportDOM.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Controls/GetFeatureInfoDOM.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Controls/GetFeatureInfoDOM.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Controls/IsoDOM.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Controls/IsoDOM.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Controls/LayerImportDOM.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Controls/LayerImportDOM.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Controls/LayerSwitcherDOM.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Controls/LayerSwitcherDOM.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Controls/LocationSelectorDOM.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Controls/LocationSelectorDOM.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Controls/MeasureAreaDOM.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Controls/MeasureAreaDOM.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Controls/MeasureAzimuthDOM.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Controls/MeasureAzimuthDOM.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Controls/MeasureLengthDOM.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Controls/MeasureLengthDOM.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Controls/MeasureToolBoxDOM.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Controls/MeasureToolBoxDOM.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Controls/MiniGlobeDOM.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Controls/MiniGlobeDOM.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Controls/MousePositionDOM.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Controls/MousePositionDOM.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Controls/ProfileElevationPathDOM.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Controls/ProfileElevationPathDOM.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Controls/ReverseGeocodingDOM.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Controls/ReverseGeocodingDOM.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Controls/RouteDOM.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Controls/RouteDOM.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Controls/ScaleDOM.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Controls/ScaleDOM.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Controls/SearchEngineDOM.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Controls/SearchEngineDOM.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Styles.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Styles.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Utils.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Utils.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Utils/AutoLoadConfig.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Utils/AutoLoadConfig.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Utils/ColorUtils.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Utils/ColorUtils.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Utils/Config.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Utils/Config.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Utils/Draggable.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Utils/Draggable.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Utils/GeocodeUtils.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Utils/GeocodeUtils.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Utils/LayerUtils.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Utils/LayerUtils.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Utils/LoggerByDefault.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Utils/LoggerByDefault.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Utils/MathUtils.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Utils/MathUtils.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Utils/Parser.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Utils/Parser.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Utils/ProxyUtils.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Utils/ProxyUtils.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Utils/Register.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Utils/Register.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Utils/SearchEngineUtils.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Utils/SearchEngineUtils.d.ts.map create mode 100644 ol-3.4.0-beta/dist/Common/Utils/SelectorID.d.ts create mode 100644 ol-3.4.0-beta/dist/Common/Utils/SelectorID.d.ts.map create mode 100644 ol-3.4.0-beta/dist/GpPluginOpenLayers-map.css create mode 100644 ol-3.4.0-beta/dist/GpPluginOpenLayers-map.js create mode 100644 ol-3.4.0-beta/dist/GpPluginOpenLayers-src.css create mode 100644 ol-3.4.0-beta/dist/GpPluginOpenLayers-src.js create mode 100644 ol-3.4.0-beta/dist/GpPluginOpenLayers.css create mode 100644 ol-3.4.0-beta/dist/GpPluginOpenLayers.js create mode 100644 ol-3.4.0-beta/dist/OpenLayers/CRS/AutoLoadCRS.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/CRS/AutoLoadCRS.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/CRS/CRS.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/CRS/CRS.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/CRS/Proj4.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/CRS/Proj4.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Drawing.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Drawing.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Editor.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Editor.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Editor/Event.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Editor/Event.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Editor/Filter.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Editor/Filter.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Editor/Group.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Editor/Group.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Editor/Layer.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Editor/Layer.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Editor/Legend.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Editor/Legend.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Editor/Search.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Editor/Search.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Editor/Style.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Editor/Style.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Editor/Themes.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Editor/Themes.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/ElevationPath.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/ElevationPath.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Export.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Export.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/GeoportalAttribution.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/GeoportalAttribution.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/GetFeatureInfo.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/GetFeatureInfo.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Isocurve.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Isocurve.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/LayerImport.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/LayerImport.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/LayerSwitcher.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/LayerSwitcher.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/LocationSelector.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/LocationSelector.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/MeasureToolBox.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/MeasureToolBox.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Measures/MeasureArea.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Measures/MeasureArea.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Measures/MeasureAzimuth.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Measures/MeasureAzimuth.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Measures/MeasureLength.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Measures/MeasureLength.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Measures/Measures.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Measures/Measures.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/MousePosition.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/MousePosition.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/ReverseGeocode.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/ReverseGeocode.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Route.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Route.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/SearchEngine.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/SearchEngine.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Utils/Interactions.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Utils/Interactions.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Utils/Markers.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Utils/Markers.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Utils/MarkersOther.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Controls/Utils/MarkersOther.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Formats/GPX.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Formats/GPX.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Formats/GeoJSON.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Formats/GeoJSON.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Formats/KML.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Formats/KML.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Formats/Styling.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Formats/Styling.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/GfiUtils.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/GfiUtils.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Layers/LayerMapBox.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Layers/LayerMapBox.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Layers/LayerWMS.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Layers/LayerWMS.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Layers/LayerWMTS.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Layers/LayerWMTS.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Layers/SourceWMS.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Layers/SourceWMS.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Layers/SourceWMTS.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Layers/SourceWMTS.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Layers/WFS.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Layers/WFS.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Sources/WMTS.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Sources/WMTS.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Styles.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/Styles.d.ts.map create mode 100644 ol-3.4.0-beta/dist/OpenLayers/index.d.ts create mode 100644 ol-3.4.0-beta/dist/OpenLayers/index.d.ts.map create mode 100644 ol-3.4.0-beta/jsdoc/EventEditor.html create mode 100644 ol-3.4.0-beta/jsdoc/fonts/glyphicons-halflings-regular.eot create mode 100644 ol-3.4.0-beta/jsdoc/fonts/glyphicons-halflings-regular.svg create mode 100644 ol-3.4.0-beta/jsdoc/fonts/glyphicons-halflings-regular.ttf create mode 100644 ol-3.4.0-beta/jsdoc/fonts/glyphicons-halflings-regular.woff create mode 100644 ol-3.4.0-beta/jsdoc/global.html create mode 100644 ol-3.4.0-beta/jsdoc/images/entete.png create mode 100644 ol-3.4.0-beta/jsdoc/images/logoIGN.png create mode 100644 ol-3.4.0-beta/jsdoc/images/logoIGNsmall.png create mode 100644 ol-3.4.0-beta/jsdoc/images/showLeftMenu.png create mode 100644 ol-3.4.0-beta/jsdoc/index.html create mode 100644 ol-3.4.0-beta/jsdoc/module-ButtonExport.html create mode 100644 ol-3.4.0-beta/jsdoc/module-ColorUtils.html create mode 100644 ol-3.4.0-beta/jsdoc/module-Config.html create mode 100644 ol-3.4.0-beta/jsdoc/module-Draggable.html create mode 100644 ol-3.4.0-beta/jsdoc/module-Drawing.html create mode 100644 ol-3.4.0-beta/jsdoc/module-ElevationPath.html create mode 100644 ol-3.4.0-beta/jsdoc/module-GPXExtended.html create mode 100644 ol-3.4.0-beta/jsdoc/module-GeoJSONExtended.html create mode 100644 ol-3.4.0-beta/jsdoc/module-GeoportalAttribution.html create mode 100644 ol-3.4.0-beta/jsdoc/module-GetFeatureInfo.html create mode 100644 ol-3.4.0-beta/jsdoc/module-Gp.html create mode 100644 ol-3.4.0-beta/jsdoc/module-Isocurve.html create mode 100644 ol-3.4.0-beta/jsdoc/module-KMLExtended.html create mode 100644 ol-3.4.0-beta/jsdoc/module-LayerImport.html create mode 100644 ol-3.4.0-beta/jsdoc/module-LayerMapBox.html create mode 100644 ol-3.4.0-beta/jsdoc/module-LayerSwitcher.html create mode 100644 ol-3.4.0-beta/jsdoc/module-LayerUtils.html create mode 100644 ol-3.4.0-beta/jsdoc/module-LayerWMS.html create mode 100644 ol-3.4.0-beta/jsdoc/module-LayerWMTS.html create mode 100644 ol-3.4.0-beta/jsdoc/module-LocationSelector.html create mode 100644 ol-3.4.0-beta/jsdoc/module-LoggerByDefault.html create mode 100644 ol-3.4.0-beta/jsdoc/module-MathUtils.html create mode 100644 ol-3.4.0-beta/jsdoc/module-MousePosition.html create mode 100644 ol-3.4.0-beta/jsdoc/module-Parser.html create mode 100644 ol-3.4.0-beta/jsdoc/module-ProfileElevationPathDOM.html create mode 100644 ol-3.4.0-beta/jsdoc/module-ProxyUtils.html create mode 100644 ol-3.4.0-beta/jsdoc/module-Register.html create mode 100644 ol-3.4.0-beta/jsdoc/module-ReverseGeocode.html create mode 100644 ol-3.4.0-beta/jsdoc/module-Route.html create mode 100644 ol-3.4.0-beta/jsdoc/module-SearchEngine.html create mode 100644 ol-3.4.0-beta/jsdoc/module-SearchEngineUtils.html create mode 100644 ol-3.4.0-beta/jsdoc/module-SelectorID.html create mode 100644 ol-3.4.0-beta/jsdoc/module-Styling.html create mode 100644 ol-3.4.0-beta/jsdoc/module-Utils.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.control.Drawing.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.control.ElevationPath.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.control.Export.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.control.GeoportalAttribution.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.control.GeoportalMousePosition.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.control.GetFeatureInfo.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.control.Isocurve.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.control.LayerImport.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.control.LayerSwitcher.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.control.MeasureArea.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.control.MeasureAzimuth.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.control.MeasureLength.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.control.ReverseGeocode.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.control.Route.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.control.SearchEngine.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.format.GPXExtended.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.format.GeoJSONExtended.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.format.KMLExtended.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.layer.GeoportalMapBox.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.layer.GeoportalWMS.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.layer.GeoportalWMTS.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.source.GeoportalWMS.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.source.GeoportalWMTS.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.source.WMTSExtended.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.style.Editor.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.style.editor.Filter.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.style.editor.Group.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.style.editor.Layer.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.style.editor.Legend.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.style.editor.Search.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.style.editor.Style.html create mode 100644 ol-3.4.0-beta/jsdoc/ol.style.editor.Theme.html create mode 100644 ol-3.4.0-beta/jsdoc/scripts/bootstrap.min.js create mode 100644 ol-3.4.0-beta/jsdoc/scripts/jquery.min.js create mode 100644 ol-3.4.0-beta/jsdoc/scripts/jquery.min.map create mode 100644 ol-3.4.0-beta/jsdoc/scripts/linenumber.js create mode 100644 ol-3.4.0-beta/jsdoc/scripts/main.js create mode 100644 ol-3.4.0-beta/jsdoc/scripts/prettify/Apache-License-2.0.txt create mode 100644 ol-3.4.0-beta/jsdoc/scripts/prettify/lang-css.js create mode 100644 ol-3.4.0-beta/jsdoc/scripts/prettify/prettify.js create mode 100644 ol-3.4.0-beta/jsdoc/scripts/underscore-min.js create mode 100644 ol-3.4.0-beta/jsdoc/scripts/underscore-min.map create mode 100644 ol-3.4.0-beta/jsdoc/styles/bootstrap.min.css create mode 100644 ol-3.4.0-beta/jsdoc/styles/jaguar.css create mode 100644 ol-3.4.0-beta/jsdoc/styles/prettify-jsdoc.css create mode 100644 ol-3.4.0-beta/jsdoc/styles/prettify-tomorrow.css create mode 100644 ol-3.4.0-beta/jsdoc/styles/sfd.css diff --git a/current/dist/openlayers/GpPluginOpenLayers-map.css b/current/dist/openlayers/GpPluginOpenLayers-map.css index 68697dfa1..ad5ec77ff 100644 --- a/current/dist/openlayers/GpPluginOpenLayers-map.css +++ b/current/dist/openlayers/GpPluginOpenLayers-map.css @@ -9,8 +9,8 @@ * @copyright copyright (c) IGN * @license CeCILL-B * @author IGN - * @version 3.3.4 - * @date 28/08/2023 + * @version 3.4.0-beta + * @date 21/09/2023 * */ diff --git a/current/dist/openlayers/GpPluginOpenLayers-map.js b/current/dist/openlayers/GpPluginOpenLayers-map.js index 7c09dcaa4..b66521791 100644 --- a/current/dist/openlayers/GpPluginOpenLayers-map.js +++ b/current/dist/openlayers/GpPluginOpenLayers-map.js @@ -9,8 +9,8 @@ * @copyright copyright (c) IGN * @license CeCILL-B * @author IGN - * @version 3.3.4 - * @date 28/08/2023 + * @version 3.4.0-beta + * @date 21/09/2023 * */ @@ -260,7 +260,7 @@ eval("/* WEBPACK VAR INJECTION */(function(global) {module.exports = global[\"ev /*! exports provided: _from, _id, _inBundle, _integrity, _location, _phantomChildren, _requested, _requiredBy, _resolved, _shasum, _spec, _where, author, bugs, bundleDependencies, date, dependencies, deprecated, description, devDependencies, homepage, keywords, license, main, module, name, nyc, optionalDependencies, peerDependencies, repository, scripts, version, default */ /***/ (function(module) { -eval("module.exports = JSON.parse(\"{\\\"_from\\\":\\\"geoportal-access-lib@3.3.3\\\",\\\"_id\\\":\\\"geoportal-access-lib@3.3.3\\\",\\\"_inBundle\\\":false,\\\"_integrity\\\":\\\"sha512-1S8B84yaU8JrkSxLXVFxqjkL4MMs1RNJwdQQMGjAoH/fXPr3CleoEaoG7z14HgVlWCvdYYqAqQuL6qGVCrlmXQ==\\\",\\\"_location\\\":\\\"/geoportal-access-lib\\\",\\\"_phantomChildren\\\":{},\\\"_requested\\\":{\\\"type\\\":\\\"version\\\",\\\"registry\\\":true,\\\"raw\\\":\\\"geoportal-access-lib@3.3.3\\\",\\\"name\\\":\\\"geoportal-access-lib\\\",\\\"escapedName\\\":\\\"geoportal-access-lib\\\",\\\"rawSpec\\\":\\\"3.3.3\\\",\\\"saveSpec\\\":null,\\\"fetchSpec\\\":\\\"3.3.3\\\"},\\\"_requiredBy\\\":[\\\"/\\\"],\\\"_resolved\\\":\\\"https://registry.npmjs.org/geoportal-access-lib/-/geoportal-access-lib-3.3.3.tgz\\\",\\\"_shasum\\\":\\\"33b1dc313ca8aeadd0adebf3bca4ef75ea48c50b\\\",\\\"_spec\\\":\\\"geoportal-access-lib@3.3.3\\\",\\\"_where\\\":\\\"/home/runner/work/geoportal-extensions/geoportal-extensions\\\",\\\"author\\\":{\\\"name\\\":\\\"IGNF\\\"},\\\"bugs\\\":{\\\"url\\\":\\\"https://github.com/IGNF/geoportal-access-lib/issues\\\"},\\\"bundleDependencies\\\":false,\\\"date\\\":\\\"02/08/2023\\\",\\\"dependencies\\\":{\\\"es6-promise\\\":\\\"^4.2.4\\\",\\\"node-fetch\\\":\\\"^2.6.1\\\",\\\"xmldom\\\":\\\"^0.1.27\\\"},\\\"deprecated\\\":false,\\\"description\\\":\\\"French Geoportal resources access library\\\",\\\"devDependencies\\\":{\\\"@babel/core\\\":\\\"^7.12.10\\\",\\\"@babel/plugin-transform-template-literals\\\":\\\"^7.12.1\\\",\\\"@babel/preset-env\\\":\\\"^7.12.11\\\",\\\"babel-loader\\\":\\\"^8.2.2\\\",\\\"chai\\\":\\\"^4.1.2\\\",\\\"clean-webpack-plugin\\\":\\\"^3.0.0\\\",\\\"copy-webpack-plugin\\\":\\\"^5.1.2\\\",\\\"eslint\\\":\\\"^7.18.0\\\",\\\"eslint-config-standard\\\":\\\"^16.0.2\\\",\\\"eslint-loader\\\":\\\"^4.0.2\\\",\\\"eslint-plugin-import\\\":\\\"^2.22.1\\\",\\\"eslint-plugin-node\\\":\\\"^11.1.0\\\",\\\"eslint-plugin-promise\\\":\\\"^4.2.1\\\",\\\"eslint-plugin-standard\\\":\\\"^5.0.0\\\",\\\"glob\\\":\\\"^7.1.2\\\",\\\"handlebars-layouts\\\":\\\"^3.1.4\\\",\\\"handlebars-webpack-plugin\\\":\\\"^1.4.1\\\",\\\"html-webpack-plugin\\\":\\\"^4.5.1\\\",\\\"istanbul-instrumenter-loader\\\":\\\"^3.0.1\\\",\\\"jsdoc-webpack-plugin\\\":\\\"^0.3.0\\\",\\\"loglevel\\\":\\\"^1.6.1\\\",\\\"mocha\\\":\\\"^7.2.0\\\",\\\"mocha-loader\\\":\\\"^5.1.5\\\",\\\"mocha-webpack\\\":\\\"^2.0.0-beta.0\\\",\\\"mochawesome\\\":\\\"^6.2.1\\\",\\\"nyc\\\":\\\"^15.1.0\\\",\\\"path\\\":\\\"^0.12.7\\\",\\\"replace-bundle-webpack-plugin\\\":\\\"^1.0.0\\\",\\\"sinon\\\":\\\"^9.2.4\\\",\\\"sinon-es6\\\":\\\"0.0.3\\\",\\\"speed-measure-webpack-plugin\\\":\\\"^1.4.2\\\",\\\"string-template\\\":\\\"^1.0.0\\\",\\\"terser-webpack-plugin\\\":\\\"^2.3.8\\\",\\\"webpack\\\":\\\"^4.46.0\\\",\\\"webpack-cli\\\":\\\"^3.3.12\\\",\\\"webpack-dev-server\\\":\\\"^3.11.2\\\",\\\"webpack-node-externals\\\":\\\"^2.5.2\\\",\\\"webpack-shell-plugin\\\":\\\"^0.5.0\\\"},\\\"homepage\\\":\\\"https://github.com/IGNF/geoportal-access-lib#readme\\\",\\\"keywords\\\":[\\\"geoportail\\\",\\\"webservice\\\",\\\"javascript\\\",\\\"es6\\\"],\\\"license\\\":\\\"CECILL-B\\\",\\\"main\\\":\\\"dist/GpServices-src.js\\\",\\\"module\\\":\\\"src/Gp.js\\\",\\\"name\\\":\\\"geoportal-access-lib\\\",\\\"nyc\\\":{\\\"include\\\":[\\\"src/**/*.js\\\"],\\\"instrument\\\":false,\\\"sourceMap\\\":false},\\\"optionalDependencies\\\":{},\\\"peerDependencies\\\":{},\\\"repository\\\":{\\\"type\\\":\\\"git\\\",\\\"url\\\":\\\"git+https://github.com/IGNF/geoportal-access-lib.git\\\"},\\\"scripts\\\":{\\\"build\\\":\\\"webpack --mode=none\\\",\\\"build:dev\\\":\\\"webpack --mode=development\\\",\\\"build:prod\\\":\\\"webpack --mode=production\\\",\\\"clean\\\":\\\"echo \\\\\\\"Warning: no yet implemented!\\\\\\\" && exit 0\\\",\\\"cover\\\":\\\"nyc --reporter=lcov --reporter=text npm run test\\\",\\\"doc\\\":\\\"npm run doc:serve\\\",\\\"doc:serve\\\":\\\"webpack-dev-server --content-base jsdoc --port 9001 --open\\\",\\\"eslint\\\":\\\"eslint src/\\\",\\\"sample\\\":\\\"npm run sample:serve\\\",\\\"sample:serve\\\":\\\"webpack-dev-server --mode=none --open-page samples/index-src.html --https --content-base . --output-public-path '/dist/' --port 9001 --open\\\",\\\"sample:serve:dev\\\":\\\"webpack-dev-server --mode=development --open-page samples/index-map.html --content-base . --output-public-path '/dist/' --port 9001 --open\\\",\\\"sample:serve:prod\\\":\\\"webpack-dev-server --mode=production --open-page samples/index-prod.html --content-base . --output-public-path '/dist/' --port 9001 --open\\\",\\\"setup\\\":\\\"npm install\\\",\\\"test\\\":\\\"mocha-webpack --reporter mochawesome --reporter-options reportDir=test-report,reportFilename=index --webpack-config ./test/webpack/webpack.test.js --glob \\\\\\\"test_*.js\\\\\\\" test/spec/\\\",\\\"test:end-to-end:serve\\\":\\\"webpack-dev-server --hot --config ./test/webpack/webpack.end-to-end.serve.js\\\",\\\"test:end-to-end:serve:docker\\\":\\\"webpack-dev-server --hot --config ./test/webpack/webpack.end-to-end.serve.docker.js\\\",\\\"test:serve\\\":\\\"webpack-dev-server --hot --config ./test/webpack/webpack.test.serve.js\\\",\\\"test:serve:docker\\\":\\\"webpack-dev-server --hot --config ./test/webpack/webpack.test.serve.docker.js\\\"},\\\"version\\\":\\\"3.3.3\\\"}\");//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiIuL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9wYWNrYWdlLmpzb24uanMiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/package.json\n"); +eval("module.exports = JSON.parse(\"{\\\"_from\\\":\\\"https://raw.githubusercontent.com/IGNF/geoportal-access-lib/release-3.4.0-beta/geoportal-access-lib-3.4.0-beta.tgz\\\",\\\"_id\\\":\\\"geoportal-access-lib@3.4.0-beta\\\",\\\"_inBundle\\\":false,\\\"_integrity\\\":\\\"sha512-gphFcmz76I5nDU8c5HS1X/afidc1hZMNKVESfzr212WyMpVCNbQhImVlLJakAlffXMCkNb40bVZnehKlKvD+9w==\\\",\\\"_location\\\":\\\"/geoportal-access-lib\\\",\\\"_phantomChildren\\\":{},\\\"_requested\\\":{\\\"type\\\":\\\"remote\\\",\\\"raw\\\":\\\"geoportal-access-lib@https://raw.githubusercontent.com/IGNF/geoportal-access-lib/release-3.4.0-beta/geoportal-access-lib-3.4.0-beta.tgz\\\",\\\"name\\\":\\\"geoportal-access-lib\\\",\\\"escapedName\\\":\\\"geoportal-access-lib\\\",\\\"rawSpec\\\":\\\"https://raw.githubusercontent.com/IGNF/geoportal-access-lib/release-3.4.0-beta/geoportal-access-lib-3.4.0-beta.tgz\\\",\\\"saveSpec\\\":\\\"https://raw.githubusercontent.com/IGNF/geoportal-access-lib/release-3.4.0-beta/geoportal-access-lib-3.4.0-beta.tgz\\\",\\\"fetchSpec\\\":\\\"https://raw.githubusercontent.com/IGNF/geoportal-access-lib/release-3.4.0-beta/geoportal-access-lib-3.4.0-beta.tgz\\\"},\\\"_requiredBy\\\":[\\\"/\\\"],\\\"_resolved\\\":\\\"https://raw.githubusercontent.com/IGNF/geoportal-access-lib/release-3.4.0-beta/geoportal-access-lib-3.4.0-beta.tgz\\\",\\\"_shasum\\\":\\\"4972f1314445354d85baad4d3b0e59f0be27ab82\\\",\\\"_spec\\\":\\\"geoportal-access-lib@https://raw.githubusercontent.com/IGNF/geoportal-access-lib/release-3.4.0-beta/geoportal-access-lib-3.4.0-beta.tgz\\\",\\\"_where\\\":\\\"/home/runner/work/geoportal-extensions/geoportal-extensions\\\",\\\"author\\\":{\\\"name\\\":\\\"IGNF\\\"},\\\"bugs\\\":{\\\"url\\\":\\\"https://github.com/IGNF/geoportal-access-lib/issues\\\"},\\\"bundleDependencies\\\":[],\\\"date\\\":\\\"21/09/2023\\\",\\\"dependencies\\\":{\\\"es6-promise\\\":\\\"^4.2.4\\\",\\\"node-fetch\\\":\\\"^2.6.1\\\",\\\"xmldom\\\":\\\"^0.1.27\\\"},\\\"deprecated\\\":false,\\\"description\\\":\\\"French Geoportal resources access library\\\",\\\"devDependencies\\\":{\\\"@babel/core\\\":\\\"^7.12.10\\\",\\\"@babel/plugin-transform-template-literals\\\":\\\"^7.12.1\\\",\\\"@babel/preset-env\\\":\\\"^7.12.11\\\",\\\"babel-loader\\\":\\\"^8.2.2\\\",\\\"chai\\\":\\\"^4.1.2\\\",\\\"clean-webpack-plugin\\\":\\\"^3.0.0\\\",\\\"copy-webpack-plugin\\\":\\\"^5.1.2\\\",\\\"eslint\\\":\\\"^7.18.0\\\",\\\"eslint-config-standard\\\":\\\"^16.0.2\\\",\\\"eslint-loader\\\":\\\"^4.0.2\\\",\\\"eslint-plugin-import\\\":\\\"^2.22.1\\\",\\\"eslint-plugin-node\\\":\\\"^11.1.0\\\",\\\"eslint-plugin-promise\\\":\\\"^4.2.1\\\",\\\"eslint-plugin-standard\\\":\\\"^5.0.0\\\",\\\"glob\\\":\\\"^7.1.2\\\",\\\"handlebars-layouts\\\":\\\"^3.1.4\\\",\\\"handlebars-webpack-plugin\\\":\\\"^1.4.1\\\",\\\"html-webpack-plugin\\\":\\\"^4.5.1\\\",\\\"istanbul-instrumenter-loader\\\":\\\"^3.0.1\\\",\\\"jsdoc-webpack-plugin\\\":\\\"^0.3.0\\\",\\\"loglevel\\\":\\\"^1.6.1\\\",\\\"mocha\\\":\\\"^7.2.0\\\",\\\"mocha-loader\\\":\\\"^5.1.5\\\",\\\"mocha-webpack\\\":\\\"^2.0.0-beta.0\\\",\\\"mochawesome\\\":\\\"^6.2.1\\\",\\\"nyc\\\":\\\"^15.1.0\\\",\\\"path\\\":\\\"^0.12.7\\\",\\\"replace-bundle-webpack-plugin\\\":\\\"^1.0.0\\\",\\\"sinon\\\":\\\"^9.2.4\\\",\\\"sinon-es6\\\":\\\"0.0.3\\\",\\\"speed-measure-webpack-plugin\\\":\\\"^1.4.2\\\",\\\"string-template\\\":\\\"^1.0.0\\\",\\\"terser-webpack-plugin\\\":\\\"^2.3.8\\\",\\\"webpack\\\":\\\"^4.46.0\\\",\\\"webpack-cli\\\":\\\"^3.3.12\\\",\\\"webpack-dev-server\\\":\\\"^3.11.2\\\",\\\"webpack-node-externals\\\":\\\"^2.5.2\\\",\\\"webpack-shell-plugin\\\":\\\"^0.5.0\\\"},\\\"homepage\\\":\\\"https://github.com/IGNF/geoportal-access-lib#readme\\\",\\\"keywords\\\":[\\\"geoportail\\\",\\\"webservice\\\",\\\"javascript\\\",\\\"es6\\\"],\\\"license\\\":\\\"CECILL-B\\\",\\\"main\\\":\\\"dist/GpServices-src.js\\\",\\\"module\\\":\\\"src/Gp.js\\\",\\\"name\\\":\\\"geoportal-access-lib\\\",\\\"nyc\\\":{\\\"include\\\":[\\\"src/**/*.js\\\"],\\\"instrument\\\":false,\\\"sourceMap\\\":false},\\\"optionalDependencies\\\":{},\\\"peerDependencies\\\":{},\\\"repository\\\":{\\\"type\\\":\\\"git\\\",\\\"url\\\":\\\"git+https://github.com/IGNF/geoportal-access-lib.git\\\"},\\\"scripts\\\":{\\\"build\\\":\\\"webpack --mode=none\\\",\\\"build:dev\\\":\\\"webpack --mode=development\\\",\\\"build:prod\\\":\\\"webpack --mode=production\\\",\\\"clean\\\":\\\"echo \\\\\\\"Warning: no yet implemented!\\\\\\\" && exit 0\\\",\\\"cover\\\":\\\"nyc --reporter=lcov --reporter=text npm run test\\\",\\\"doc\\\":\\\"npm run doc:serve\\\",\\\"doc:serve\\\":\\\"webpack-dev-server --content-base jsdoc --port 9001 --open\\\",\\\"eslint\\\":\\\"eslint src/\\\",\\\"sample\\\":\\\"npm run sample:serve\\\",\\\"sample:serve\\\":\\\"webpack-dev-server --mode=none --open-page samples/index-src.html --https --content-base . --output-public-path '/dist/' --port 9001 --open\\\",\\\"sample:serve:dev\\\":\\\"webpack-dev-server --mode=development --open-page samples/index-map.html --content-base . --output-public-path '/dist/' --port 9001 --open\\\",\\\"sample:serve:prod\\\":\\\"webpack-dev-server --mode=production --open-page samples/index-prod.html --content-base . --output-public-path '/dist/' --port 9001 --open\\\",\\\"setup\\\":\\\"npm install\\\",\\\"test\\\":\\\"mocha-webpack --reporter mochawesome --reporter-options reportDir=test-report,reportFilename=index --webpack-config ./test/webpack/webpack.test.js --glob \\\\\\\"test_*.js\\\\\\\" test/spec/\\\",\\\"test:end-to-end:serve\\\":\\\"webpack-dev-server --hot --config ./test/webpack/webpack.end-to-end.serve.js\\\",\\\"test:end-to-end:serve:docker\\\":\\\"webpack-dev-server --hot --config ./test/webpack/webpack.end-to-end.serve.docker.js\\\",\\\"test:serve\\\":\\\"webpack-dev-server --hot --config ./test/webpack/webpack.test.serve.js\\\",\\\"test:serve:docker\\\":\\\"webpack-dev-server --hot --config ./test/webpack/webpack.test.serve.docker.js\\\"},\\\"version\\\":\\\"3.4.0-beta\\\"}\");//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiIuL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9wYWNrYWdlLmpzb24uanMiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/package.json\n"); /***/ }), @@ -356,7 +356,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Uti /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../CommonService */ \"./node_modules/geoportal-access-lib/src/Services/CommonService.js\");\n/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../DefaultUrlService */ \"./node_modules/geoportal-access-lib/src/Services/DefaultUrlService.js\");\n/* harmony import */ var _Request_AltiRequestFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Request/AltiRequestFactory */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Request/AltiRequestFactory.js\");\n/* harmony import */ var _Response_AltiResponseFactory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Response/AltiResponseFactory */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js\");\n\n\n\n\n\n\n\n\n\n/**\n * @classdesc\n *\n * Appel du service d'altimétrie du Géoportail\n *\n * @todo gestion du parma. output et callback\n * @todo outputFormat (REST) et format (WPS)\n * @todo La reponse JSON peut encapsuler un XML !\n *\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.Alti\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {Array.} options.positions - Tableau ({lon:float,lat:float}) contenant les coordonnées des points (CRS:84)\n * dont on veut connaître les altitudes (ou à partir desquelles on va calculer le profil).\n * Chaque élément du tableau est un objet JavaScript avec deux attributs : lon et lat, qui sont des flottants.\n * Minimum 2 éléments si on souhaite calculer un profil altimétrique (ElevationLine).\n * Maximum 50 éléments.\n *\n * @param {String} options.outputFormat - Le format de la réponse du service alti : 'xml' ou 'json'.\n * Ce paramètre déterminera l'extension '.xml' ou '.json' du service dans le cas de l'API REST,\n * ou la valeur du paramètre 'format' dans le cas de la norme WPS.\n * Nécessaire si serverUrl est renseigné, et qu'on souhaite passer par l'API REST,\n * pour connaître le format dans lequel sera fournie la réponse (pour son traitement).\n * Non nécessaire pour la norme WPS. Par défaut, ce paramètre vaut 'json'.\n *\n * @param {Number} [options.sampling] - Nombre de points à utiliser pour déterminer le tracé d'un profil altimétrique, compris entre 2 et 5000.\n * A spécifier lorsqu'on souhaite accéder à cette fonctionnalité.\n * Dans ce cas, les points fournis en entrée (au minimum de deux) servent à déterminer l'axe planimétrique\n * le long duquel le profil doit être calculé.\n * Si le paramètre sampling n'est pas spécifié ou moins de deux points sont fournis,\n * c'est le service Elevation qui sera interrogé (altitudes simples calculées pour les points fournis).\n * Une valeur de sampling strictement inférieure à 2 déclenchera un échantillonnage avec la valeur par défaut du service (3 points).\n *\n * @param {String} [options.api] - Manière d'accéder au service : 'REST' (via l'API REST) ou 'WPS' (via la norme WPS).\n * Par défaut, on utilise l'API REST.\n *\n * @param {Boolean} [options.zonly] - Permet de ne récupérer que les altitudes en sortie s'il vaut 'true'.\n * Vaut 'false' par défaut.\n *\n * @example\n * var options = {\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * protocol : 'JSONP', // JSONP|XHR\n * proxyURL : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * positions : [{lon:, lat:}, {lon:, lat:}],\n * outputFormat : 'json' // json|xml\n * sampling : 3,\n * api : 'REST', // REST|WPS\n * zonly : false // false|true\n * };\n *\n */\nfunction Alti (options) {\n if (!(this instanceof Alti)) {\n throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"CLASS_CONSTRUCTOR\", \"Alti\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"Alti\";\n\n // appel du constructeur par heritage\n _CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].apply(this, arguments);\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"Gp.Services.Alti\");\n this.logger.trace(\"[Constructeur Alti (options)]\");\n\n // #####################\n // analyse des options\n // #####################\n\n if (!options.positions) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"positions\"));\n }\n\n if (options.positions.length === 0) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_EMPTY\", \"positions\"));\n }\n\n // ajout des options spécifiques au service\n this.options.positions = options.positions;\n\n // format de réponse du service : \"json\" ou \"xml\" (valeur par défaut), en minuscule !\n this.options.outputFormat = (typeof options.outputFormat === \"string\") ? options.outputFormat.toLowerCase() : \"xml\";\n\n // sampling\n this.options.sampling = options.sampling || null;\n\n // type d'api utilisé pour requeter le service, en majuscule !\n this.options.api = (typeof options.api === \"string\") ? options.api.toUpperCase() : \"REST\";\n\n // l'api ne peut être interrogée qu'en GET.\n if (this.options.api === \"REST\") {\n this.options.httpMethod = \"GET\";\n }\n\n // param. zonly\n this.options.zonly = options.zonly || false;\n\n // gestion de l'url du service par defaut\n // si l'url n'est pas renseignée, il faut utiliser les urls par defaut\n // en fonction du type d'api, REST ou WPS, du format de reponse demandé (outputFormat)\n // ainsi que sur le type de service (profil ou elevation)\n if (!this.options.serverUrl) {\n var lstUrlByDefault = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__[\"default\"].Alti.url(\"calcul\");\n var urlFound = null;\n switch (this.options.api) {\n case \"WPS\":\n urlFound = lstUrlByDefault.wps;\n break;\n case \"REST\":\n var key = (options.sampling ? \"profil\" : \"elevation\") + \"-\" + this.options.outputFormat;\n urlFound = lstUrlByDefault[key];\n break;\n default:\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_UNKNOWN\", \"api\"));\n }\n\n if (!urlFound) {\n throw new Error(\"Url by default not found !\");\n }\n this.options.serverUrl = urlFound;\n this.logger.trace(\"Server URL by default : \" + this.options.serverUrl);\n }\n\n // gestion du type de service\n // si l'extension de l'url est .json ou .xml, on surcharge le format de sortie (outputFormat)\n var idx = this.options.serverUrl.lastIndexOf(\".\");\n if (idx !== -1) {\n var extension = this.options.serverUrl.substring(idx + 1);\n if (extension && extension.length < 5) { // FIXME extension de moins de 4 car. ...\n this.logger.trace(\"Server Extension URL : \" + extension);\n switch (extension.toLowerCase()) {\n case \"json\":\n case \"xml\":\n this.options.outputFormat = extension.toLowerCase();\n break;\n default:\n throw new Error(\"type of service : unknown or unsupported (json or xml) !\");\n }\n }\n }\n}\n\n/**\n * @lends module:Alti#\n */\nAlti.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].prototype, {\n // todo\n // getter/setter\n});\n\n/**\n * Constructeur (alias)\n */\nAlti.prototype.constructor = Alti;\n\n/**\n * Création de la requête (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nAlti.prototype.buildRequest = function (error, success) {\n // utilisation en mode callback\n var options = {\n httpMethod : this.options.httpMethod,\n // callback\n onSuccess : function (result) {\n // sauvegarde de la requete !\n this.request = result;\n success.call(this, this.request);\n },\n onError : error,\n scope : this,\n // spécifique au service :\n positions : this.options.positions,\n outputFormat : this.options.outputFormat,\n sampling : this.options.sampling,\n api : this.options.api,\n zonly : this.options.zonly\n };\n\n _Request_AltiRequestFactory__WEBPACK_IMPORTED_MODULE_5__[\"default\"].build(options);\n};\n\n/**\n * Analyse de la reponse (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nAlti.prototype.analyzeResponse = function (error, success) {\n // INFO\n // Factory pour masquer la complexité du retour du service qui renvoie soit\n // - une 'string' qui contient du XML ou JSON natif en mode XHR\n // - un objet JSON qui est natif ou encapsulé\n\n if (this.response) {\n var options = {\n response : this.response,\n outputFormat : this.options.outputFormat, // utile pour parser la string en mode XHR : JSON ou XML !\n rawResponse : this.options.rawResponse,\n onError : error,\n onSuccess : success,\n scope : this\n };\n\n _Response_AltiResponseFactory__WEBPACK_IMPORTED_MODULE_6__[\"default\"].build(options);\n } else {\n error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Alti);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQWx0aS9BbHRpLmpzPzJlNDIiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQ2lEO0FBQ0g7QUFDVztBQUNaO0FBQ1E7QUFDUztBQUNHOztBQUVqRTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7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WxkKG9wdGlvbnMpO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIGVycm9yLmNhbGwodGhpcywgbmV3IEVycm9yU2VydmljZShfLmdldE1lc3NhZ2UoXCJTRVJWSUNFX1JFU1BPTlNFX0VNUFRZXCIpKSk7XG4gICAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgQWx0aTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Alti.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../CommonService */ \"./node_modules/geoportal-access-lib/src/Services/CommonService.js\");\n/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../DefaultUrlService */ \"./node_modules/geoportal-access-lib/src/Services/DefaultUrlService.js\");\n/* harmony import */ var _Request_AltiRequestFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Request/AltiRequestFactory */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Request/AltiRequestFactory.js\");\n/* harmony import */ var _Response_AltiResponseFactory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Response/AltiResponseFactory */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js\");\n\n\n\n\n\n\n\n\n\n/**\n * @classdesc\n *\n * Appel du service d'altimétrie du Géoportail\n *\n * @todo gestion du parma. output et callback\n * @todo outputFormat (REST) et format (WPS)\n * @todo La reponse JSON peut encapsuler un XML !\n *\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.Alti\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {Array.} options.positions - Tableau ({lon:float,lat:float}) contenant les coordonnées des points (CRS:84)\n * dont on veut connaître les altitudes (ou à partir desquelles on va calculer le profil).\n * Chaque élément du tableau est un objet JavaScript avec deux attributs : lon et lat, qui sont des flottants.\n * Minimum 2 éléments si on souhaite calculer un profil altimétrique (ElevationLine).\n * Maximum 50 éléments.\n *\n * @param {String} options.outputFormat - Le format de la réponse du service alti : 'xml' ou 'json'.\n * Ce paramètre déterminera l'extension '.xml' ou '.json' du service dans le cas de l'API REST,\n * ou la valeur du paramètre 'format' dans le cas de la norme WPS.\n * Nécessaire si serverUrl est renseigné, et qu'on souhaite passer par l'API REST,\n * pour connaître le format dans lequel sera fournie la réponse (pour son traitement).\n * Non nécessaire pour la norme WPS. Par défaut, ce paramètre vaut 'json'.\n *\n * @param {Number} [options.sampling] - Nombre de points à utiliser pour déterminer le tracé d'un profil altimétrique, compris entre 2 et 5000.\n * A spécifier lorsqu'on souhaite accéder à cette fonctionnalité.\n * Dans ce cas, les points fournis en entrée (au minimum de deux) servent à déterminer l'axe planimétrique\n * le long duquel le profil doit être calculé.\n * Si le paramètre sampling n'est pas spécifié ou moins de deux points sont fournis,\n * c'est le service Elevation qui sera interrogé (altitudes simples calculées pour les points fournis).\n * Une valeur de sampling strictement inférieure à 2 déclenchera un échantillonnage avec la valeur par défaut du service (3 points).\n *\n * @param {String} [options.api] - Manière d'accéder au service : 'REST' (via l'API REST) ou 'WPS' (via la norme WPS).\n * Par défaut, on utilise l'API REST.\n *\n * @param {Boolean} [options.zonly] - Permet de ne récupérer que les altitudes en sortie s'il vaut 'true'.\n * Vaut 'false' par défaut.\n *\n * @param {String} [options.resource] - Resource utilisée pour réaliser le calcul.\n *\n * @example\n * var options = {\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * protocol : 'JSONP', // JSONP|XHR\n * proxyURL : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * positions : [{lon:, lat:}, {lon:, lat:}],\n * outputFormat : 'json' // json|xml\n * sampling : 3,\n * api : 'REST', // REST|WPS\n * zonly : false // false|true,\n * resource : \"resource-par-defaut\"\n * };\n *\n */\nfunction Alti (options) {\n if (!(this instanceof Alti)) {\n throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"CLASS_CONSTRUCTOR\", \"Alti\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"Alti\";\n\n // appel du constructeur par heritage\n _CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].apply(this, arguments);\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"Gp.Services.Alti\");\n this.logger.trace(\"[Constructeur Alti (options)]\");\n\n // #####################\n // analyse des options\n // #####################\n\n if (!options.positions) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"positions\"));\n }\n\n if (options.positions.length === 0) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_EMPTY\", \"positions\"));\n }\n\n // ajout des options spécifiques au service\n this.options.positions = options.positions;\n\n // format de réponse du service : \"json\" ou \"xml\" (valeur par défaut), en minuscule !\n this.options.outputFormat = (typeof options.outputFormat === \"string\") ? options.outputFormat.toLowerCase() : \"xml\";\n\n // ressource utilisée pour le calcul altimétrique\n this.options.resource = options.resource || \"rge_alti_corse2a_float32_zip_lamb93\";\n\n // sampling\n this.options.sampling = options.sampling || null;\n\n // type d'api utilisé pour requeter le service, en majuscule !\n this.options.api = (typeof options.api === \"string\") ? options.api.toUpperCase() : \"REST\";\n\n // l'api ne peut être interrogée qu'en GET.\n if (this.options.api === \"REST\") {\n this.options.httpMethod = \"GET\";\n }\n\n // param. zonly\n this.options.zonly = options.zonly || false;\n\n // param. measures\n this.options.measures = options.measures || false;\n\n // gestion de l'url du service par defaut\n // si l'url n'est pas renseignée, il faut utiliser les urls par defaut\n // en fonction du type d'api, REST ou WPS, du format de reponse demandé (outputFormat)\n // ainsi que sur le type de service (profil ou elevation)\n if (!this.options.serverUrl) {\n // Code commenté pour Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'alti\n /* var lstUrlByDefault = DefaultUrlService.Alti.newUrl();\n if (this.options.oldAltiService) {\n lstUrlByDefault = DefaultUrlService.Alti.url();\n }*/\n // Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'alti\n var lstUrlByDefault = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__[\"default\"].Alti.url();\n var urlFound = null;\n switch (this.options.api) {\n case \"WPS\":\n urlFound = lstUrlByDefault.wps;\n break;\n case \"REST\":\n var key = (options.sampling ? \"profil\" : \"elevation\") + \"-\" + this.options.outputFormat;\n urlFound = lstUrlByDefault[key];\n break;\n default:\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_UNKNOWN\", \"api\"));\n }\n\n if (!urlFound) {\n throw new Error(\"Url by default not found !\");\n }\n this.options.serverUrl = urlFound;\n this.logger.trace(\"Server URL by default : \" + this.options.serverUrl);\n }\n\n // gestion du type de service\n // si l'extension de l'url est .json ou .xml, on surcharge le format de sortie (outputFormat)\n var idx = this.options.serverUrl.lastIndexOf(\".\");\n if (idx !== -1) {\n var extension = this.options.serverUrl.substring(idx + 1);\n if (extension && extension.length < 5) { // FIXME extension de moins de 4 car. ...\n this.logger.trace(\"Server Extension URL : \" + extension);\n switch (extension.toLowerCase()) {\n case \"json\":\n case \"xml\":\n this.options.outputFormat = extension.toLowerCase();\n break;\n default:\n throw new Error(\"type of service : unknown or unsupported (json or xml) !\");\n }\n }\n }\n}\n\n/**\n * @lends module:Alti#\n */\nAlti.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].prototype, {\n // todo\n // getter/setter\n});\n\n/**\n * Constructeur (alias)\n */\nAlti.prototype.constructor = Alti;\n\n/**\n * Création de la requête (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nAlti.prototype.buildRequest = function (error, success) {\n // utilisation en mode callback\n var options = {\n httpMethod : this.options.httpMethod,\n // callback\n onSuccess : function (result) {\n // sauvegarde de la requete !\n this.request = result;\n success.call(this, this.request);\n },\n onError : error,\n scope : this,\n // spécifique au service :\n resource : this.options.resource,\n positions : this.options.positions,\n outputFormat : this.options.outputFormat,\n sampling : this.options.sampling,\n api : this.options.api,\n zonly : this.options.zonly,\n measures : this.options.measures\n };\n\n _Request_AltiRequestFactory__WEBPACK_IMPORTED_MODULE_5__[\"default\"].build(options);\n};\n\n/**\n * Analyse de la reponse (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nAlti.prototype.analyzeResponse = function (error, success) {\n // INFO\n // Factory pour masquer la complexité du retour du service qui renvoie soit\n // - une 'string' qui contient du XML ou JSON natif en mode XHR\n // - un objet JSON qui est natif ou encapsulé\n\n if (this.response) {\n var options = {\n response : this.response,\n outputFormat : this.options.outputFormat, // utile pour parser la string en mode XHR : JSON ou XML !\n rawResponse : this.options.rawResponse,\n onError : error,\n onSuccess : success,\n scope : this\n };\n\n _Response_AltiResponseFactory__WEBPACK_IMPORTED_MODULE_6__[\"default\"].build(options);\n } else {\n error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Alti);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQWx0aS9BbHRpLmpzPzJlNDIiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQ2lEO0FBQ0g7QUFDVztBQUNaO0FBQ1E7QUFDUztBQUNHOztBQUVqRTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGFBQWE7QUFDYjtBQUNBLFdBQVcsT0FBTztBQUNsQjtBQUNBLFdBQVcsZUFBZSwrQkFBK0Isb0JBQW9CO0FBQzdFO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsV0FBVyxPQUFPO0FBQ2xCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsV0FBVyxPQUFPO0FBQ2xCO0FBQ0E7QUFDQSxXQUFXLFFBQVE7QUFDbkI7QUFDQTtBQUNBLFdBQVcsT0FBTztBQUNsQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsMENBQTBDO0FBQzFDLHVDQUF1QztBQUN2QztBQUNBLHNCQUFzQixXQUFXLEdBQUcsV0FBVztBQUMvQztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUF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hSXG4gICAgLy8gIC0gdW4gb2JqZXQgSlNPTiBxdWkgZXN0IG5hdGlmIG91IGVuY2Fwc3Vsw6lcblxuICAgIGlmICh0aGlzLnJlc3BvbnNlKSB7XG4gICAgICAgIHZhciBvcHRpb25zID0ge1xuICAgICAgICAgICAgcmVzcG9uc2UgOiB0aGlzLnJlc3BvbnNlLFxuICAgICAgICAgICAgb3V0cHV0Rm9ybWF0IDogdGhpcy5vcHRpb25zLm91dHB1dEZvcm1hdCwgLy8gdXRpbGUgcG91ciBwYXJzZXIgbGEgc3RyaW5nIGVuIG1vZGUgWEhSIDogSlNPTiBvdSBYTUwgIVxuICAgICAgICAgICAgcmF3UmVzcG9uc2UgOiB0aGlzLm9wdGlvbnMucmF3UmVzcG9uc2UsXG4gICAgICAgICAgICBvbkVycm9yIDogZXJyb3IsXG4gICAgICAgICAgICBvblN1Y2Nlc3MgOiBzdWNjZXNzLFxuICAgICAgICAgICAgc2NvcGUgOiB0aGlzXG4gICAgICAgIH07XG5cbiAgICAgICAgQWx0aVJlc3BvbnNlRmFjdG9yeS5idWlsZChvcHRpb25zKTtcbiAgICB9IGVsc2Uge1xuICAgICAgICBlcnJvci5jYWxsKHRoaXMsIG5ldyBFcnJvclNlcnZpY2UoXy5nZXRNZXNzYWdlKFwiU0VSVklDRV9SRVNQT05TRV9FTVBUWVwiKSkpO1xuICAgIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IEFsdGk7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Alti.js\n"); /***/ }), @@ -368,7 +368,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Uti /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Response_model_AltiResponse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Response/model/AltiResponse */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Response/model/AltiResponse.js\");\n/* harmony import */ var _Response_model_Elevation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Response/model/Elevation */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Response/model/Elevation.js\");\n\n/**\n * Fonction retournant un objet contenant des clés de lecture (readers)\n * qui permettent de parser des réponses XML du service Altimétrique du Géoportail\n * (calcul altimétrique simple ou profil altimétrique d'une courbe),\n * lorsque le paramètre output = xml,\n * afin de récupérer les élévations retournées.\n *\n * @module AltiResponseReader\n * @alias Gp.Services.Alti.Formats.AltiResponseReader\n * @private\n */\n\n// import Logger from \"../../../Utils/LoggerByDefault\";\n\n\n\n/**\n *\n * Objet AltiResponseReader\n *\n * @member {Object} AltiResponseReader\n *\n * @property {Object} AltiResponseReader.READERS - Objet contenant des fonctions de lecture, appelées \"readers\"\n * dont chaque clé correspond au nom d'un tag du XML que l'on souhaite lire\n * et la valeur associée est une fonction (node, data)\n * où node est un noeud du document DOM\n * et data est un objet où l'on stocke les informations lues dans le XML.\n *\n * @property {Method} AltiResponseReader.READERS.elevations - Lecture d'un noeud \"elevations\" de la réponse XML\n * du service alti, correspondant logiquement à la racine du document\n * (contient un ou plusieurs childNodes correspondant chacun à une élévation retournée)\n *\n * @property {Method} AltiResponseReader.READERS.elevation - ecture d'un noeud \"elevation\" de la réponse xml du service alti.\n * (contient un ou 4 childNode (s) correspondant à l'altitude (z) et éventuellement lat, lon, et acc)\n *\n * @property {Method} AltiResponseReader.READERS.lat - Lecture d'un noeud \"lat\" de la réponse xml du service alti.\n * (contient une valeur de latitude, qui est un flottant)\n *\n * @property {Method} AltiResponseReader.READERS.lon - Lecture d'un noeud \"lon\" de la réponse xml du service alti.\n * (contient une valeur de longitude, qui est un flottant)\n *\n * @property {Method} AltiResponseReader.READERS.z - Lecture d'un noeud \"z\" de la réponse xml du service alti.\n * (contient une valeur d'altitude, qui est un flottant)\n *\n * @property {Method} AltiResponseReader.READERS.acc - Lecture d'un noeud \"acc\" de la réponse xml du service alti.\n * (contient une valeur de précision, qui est un flottant)\n *\n * @property {Method} AltiResponseReader.READERS.exceptionreport - Lecture d'un noeud \"ExceptionReport\" de la réponse xml du service alti.\n *\n * @property {Method} AltiResponseReader.READERS.exception - Lecture d'un noeud \"Exception\" de la réponse xml du service alti.\n *\n * @property {Method} AltiResponseReader.read - Méthode permettant de lancer la lecture d'une réponse XML du service altimétrique,\n * à l'aide des readers de la classe.\n *\n */\nvar AltiResponseReader = {};\n\nAltiResponseReader.READERS = {\n\n /**\n * Lecture d'un noeud \"elevations\" de la réponse XML du service alti, correspondant logiquement à la racine du document\n * (contient un ou plusieurs childNodes correspondant chacun à une élévation retournée)\n *\n * @param {DOMElement} root - racine de la réponse XML\n * @static\n * @memberof AltiResponseReader\n * @returns {Object} Retourne un objet de type AltiResponse\n */\n elevations : function (root) {\n // INFO : on passe en paramètre l'objet en entrée elevations, vide, à remplir.\n var altiResponse = new _Response_model_AltiResponse__WEBPACK_IMPORTED_MODULE_0__[\"default\"]();\n\n if (root.hasChildNodes()) {\n var children = root.childNodes;\n var child;\n var elevation;\n\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n\n if (AltiResponseReader.READERS[child.nodeName]) {\n elevation = AltiResponseReader.READERS[child.nodeName](child);\n altiResponse.elevations.push(elevation);\n }\n }\n }\n\n return altiResponse;\n },\n\n /**\n * Lecture d'un noeud \"elevation\" de la réponse xml du service alti.\n * (contient un ou 4 childNode (s) correspondant à l'altitude (z) et éventuellement lat, lon, et acc)\n *\n * @param {DOMElement} node - noeud elevation à lire pour récupérer les informations de l'élévation retournée (z [, lon, lat, acc])\n * @return {Array} elevationResponse - format de la réponse en sortie, instance de AltiResponse\n * @static\n * @memberof AltiResponseReader\n */\n elevation : function (node) {\n var elevation = new _Response_model_Elevation__WEBPACK_IMPORTED_MODULE_1__[\"default\"]();\n\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (AltiResponseReader.READERS[child.nodeName]) {\n // INFO : on passe en paramètre l'objet en entrée elevation, vide, à remplir.\n AltiResponseReader.READERS[child.nodeName](child, elevation);\n }\n }\n }\n return elevation;\n },\n\n /**\n * Lecture d'un noeud \"lat\" de la réponse xml du service alti.\n * (contient une valeur de latitude, qui est un flottant)\n *\n * @param {DOMElement} node - noeud à lire pour récupérer la latitude\n * @param {Object} elevation - objet dans lequel stocker la latitude retournée\n * @static\n * @memberof AltiResponseReader\n */\n lat : function (node, elevation) {\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n elevation.lat = parseFloat(textNode.nodeValue);\n } else {\n throw new Error(\"Erreur dans la lecture de la réponse du service : latitude attendue mais absente\");\n }\n },\n\n /**\n * Lecture d'un noeud \"lon\" de la réponse xml du service alti.\n * (contient une valeur de longitude, qui est un flottant)\n *\n * @param {DOMElement} node - noeud à lire pour récupérer la longitude\n * @param {Object} elevation - objet dans lequel stocker la longitude retournée\n * @static\n * @memberof AltiResponseReader\n */\n lon : function (node, elevation) {\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n elevation.lon = parseFloat(textNode.nodeValue);\n } else {\n throw new Error(\"Erreur dans la lecture de la réponse du service : longitude attendue mais absente\");\n }\n },\n\n /**\n * Lecture d'un noeud \"z\" de la réponse xml du service alti.\n * (contient une valeur d'altitude, qui est un flottant)\n *\n * @param {DOMElement} node - noeud à lire pour récupérer l'altitude\n * @param {Object} elevation - objet dans lequel stocker l'altitude retournée\n * @static\n * @memberof AltiResponseReader\n */\n z : function (node, elevation) {\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n if (elevation) {\n elevation.z = parseFloat(textNode.nodeValue);\n } else {\n elevation = new _Response_model_Elevation__WEBPACK_IMPORTED_MODULE_1__[\"default\"]();\n elevation.z = parseFloat(textNode.nodeValue);\n return elevation;\n }\n } else {\n throw new Error(\"Erreur dans la lecture de la réponse du service : altitude attendue mais absente\");\n }\n },\n\n /**\n * Lecture d'un noeud \"acc\" de la réponse xml du service alti.\n * (contient une valeur de précision, qui est un flottant)\n *\n * @param {DOMElement} node - noeud à lire pour récupérer la précision\n * @param {Object} elevation - objet dans lequel stocker la précision retournée\n * @static\n * @memberof AltiResponseReader\n */\n acc : function (node, elevation) {\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n elevation.acc = parseFloat(textNode.nodeValue);\n } else {\n throw new Error(\"Erreur dans la lecture de la réponse du service : précision (acc) attendue mais absente\");\n }\n },\n\n /**\n * Lecture d'un noeud \"ExceptionReport\" de la réponse xml du service alti.\n *\n * @param {DOMElement} node - noeud à lire pour récupérer l'exception\n * @return {Object} exceptionReport - objet contenant l'exception\n * @static\n * @memberof AltiResponseReader\n */\n exceptionreport : function (node) {\n var response = {};\n\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (child.nodeName === \"Exception\") {\n response.exceptionReport = AltiResponseReader.READERS.exception(child);\n }\n }\n }\n\n return response;\n },\n\n /**\n * Lecture d'un noeud \"Exception\" de la réponse xml du service alti.\n *\n * @param {DOMElement} node - noeud à lire pour récupérer l'exception\n * @return {Object} exceptionReport - objet contenant l'exception, avec deux attributs :\n * {String} exceptionReport.exceptionCode - qui contient l'identifiant du code de l'exception\n * {String} exceptionReport.exception - qui contient le message de l'exception\n * @static\n * @memberof AltiResponseReader\n */\n exception : function (node) {\n var exceptionReport = {};\n\n // get exception code\n var exceptionCode = node.getAttribute(\"exceptionCode\");\n if (exceptionCode) {\n exceptionReport.exceptionCode = exceptionCode;\n }\n\n // get exception message\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n exceptionReport.exception = textNode.nodeValue;\n }\n\n return exceptionReport;\n },\n\n /**\n * Lecture d'un noeud \"Error\" de la réponse xml du service alti.\n *\n * @param {DOMElement} node - noeud à lire pour récupérer l'exception\n * @return {Object} error - objet contenant l'exception\n * @static\n */\n error : function (node) {\n var response = {\n error : {}\n };\n // get error code and description\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n var textNode;\n // get error code\n if (child.nodeType === 1 && child.nodeName === \"code\") { // 1 === node.ELEMENT_NODE\n textNode = child.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n response.error.code = textNode.nodeValue;\n }\n }\n // get error description\n if (child.nodeType === 1 && child.nodeName === \"description\") { // 1 === node.ELEMENT_NODE\n textNode = child.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n response.error.description = textNode.nodeValue;\n }\n }\n }\n }\n return response;\n }\n\n};\n\n/**\n * Méthode permettant de lancer la lecture d'une réponse XML du service altimétrique,\n * à l'aide des readers de la classe.\n *\n * @method AltiResponseReader.read\n * @param {DOMElement} root - racine de la réponse XML à lire\n * @static\n * @memberof AltiResponseReader\n */\nAltiResponseReader.read = function (root) {\n if (root.nodeName === \"elevations\") {\n var altiResponse = AltiResponseReader.READERS.elevations(root);\n return altiResponse;\n } else if (root.nodeName === \"ExceptionReport\") {\n var exceptionReport = AltiResponseReader.READERS.exceptionreport(root);\n return exceptionReport;\n } else if (root.nodeName === \"error\") {\n var error = AltiResponseReader.READERS.error(root);\n return error;\n } else {\n throw new Error(\"Erreur lors de la lecture de la réponse : elle n'est pas au format attendu.\");\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AltiResponseReader);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQWx0aS9Gb3JtYXRzL0FsdGlSZXNwb25zZVJlYWRl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3RhdGljXG4gICAgICogQG1lbWJlcm9mIEFsdGlSZXNwb25zZVJlYWRlclxuICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldG91cm5lIHVuIG9iamV0IGRlIHR5cGUgQWx0aVJlc3BvbnNlXG4gICAgICovXG4gICAgZWxldmF0aW9ucyA6IGZ1bmN0aW9uIChyb290KSB7XG4gICAgICAgIC8vIElORk8gOiBvbiBwYXNzZSBlbiBwYXJhbcOodHJlIGwnb2JqZXQgZW4gZW50csOpZSBlbGV2YXRpb25zLCB2aWRlLCDDoCByZW1wbGlyLlxuICAgICAgICB2YXIgYWx0aVJlc3BvbnNlID0gbmV3IEFsdGlSZXNwb25zZSgpO1xuXG4gICAgICAgIGlmIChyb290Lmhhc0NoaWxkTm9kZXMoKSkge1xuICAgICAgICAgICAgdmFyIGNoaWxkcmVuID0gcm9vdC5jaGlsZE5vZGVzO1xuICAgICAgICAgICAgdmFyIGNoaWxkO1xuICAgICAgICAgICAgdmFyIGVsZXZhdGlvbjtcblxuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGlsZHJlbi5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIGNoaWxkID0gY2hpbGRyZW5baV07XG5cbiAgICAgICAgICAgICAgICBpZiAoQWx0aVJlc3BvbnNlUmVhZGVyLlJFQURFUlNbY2hpbGQubm9kZU5hbWVdKSB7XG4gICAgICAgICAgICAgICAgICAgIGVsZXZhdGlvbiA9IEFsdGlSZXNwb25zZVJlYWRlci5SRUFERVJTW2NoaWxkLm5vZGVOYW1lXShjaGlsZCk7XG4gICAgICAgICAgICAgICAgICAgIGFsdGlSZXNwb25zZS5lbGV2YXRpb25zLnB1c2goZWxldmF0aW9uKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gYWx0aVJlc3BvbnNlO1xuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiBMZWN0dXJlIGQnd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NjcmlwdGlvblxuICAgICAgICBpZiAobm9kZS5oYXNDaGlsZE5vZGVzKCkpIHtcbiAgICAgICAgICAgIHZhciBjaGlsZHJlbiA9IG5vZGUuY2hpbGROb2RlcztcbiAgICAgICAgICAgIHZhciBjaGlsZDtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgY2hpbGRyZW4ubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBjaGlsZCA9IGNoaWxkcmVuW2ldO1xuICAgICAgICAgICAgICAgIHZhciB0ZXh0Tm9kZTtcbiAgICAgICAgICAgICAgICAvLyBnZXQgZXJyb3IgY29kZVxuICAgICAgICAgICAgICAgIGlmIChjaGlsZC5ub2RlVHlwZSA9PT0gMSAmJiBjaGlsZC5ub2RlTmFtZSA9PT0gXCJjb2RlXCIpIHsgLy8gMSA9PT0gbm9kZS5FTEVNRU5UX05PREVcbiAgICAgICAgICAgICAgICAgICAgdGV4dE5vZGUgPSBjaGlsZC5maXJzdENoaWxkO1xuICAgICAgICAgICAgICAgICAgICBpZiAodGV4dE5vZGUgJiYgdGV4dE5vZGUubm9kZVR5cGUgPT09IDMpIHsgLy8gMyA9PT0gbm9kZS5URVhUX05PREVcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc3BvbnNlLmVycm9yLmNvZGUgPSB0ZXh0Tm9kZS5ub2RlVmFsdWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gZ2V0IGVycm9yIGRlc2NyaXB0aW9uXG4gICAgICAgICAgICAgICAgaWYgKGNoaWxkLm5vZGVUeXBlID09PSAxICYmIGNoaWxkLm5vZGVOYW1lID09PSBcImRlc2NyaXB0aW9uXCIpIHsgLy8gMSA9PT0gbm9kZS5FTEVNRU5UX05PREVcbiAgICAgICAgICAgICAgICAgICAgdGV4dE5vZGUgPSBjaGlsZC5maXJzdENoaWxkO1xuICAgICAgICAgICAgICAgICAgICBpZiAod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VhZGVyLlJFQURFUlMuZXhjZXB0aW9ucmVwb3J0KHJvb3QpO1xuICAgICAgICByZXR1cm4gZXhjZXB0aW9uUmVwb3J0O1xuICAgIH0gZWxzZSBpZiAocm9vdC5ub2RlTmFtZSA9PT0gXCJlcnJvclwiKSB7XG4gICAgICAgIHZhciBlcnJvciA9IEFsdGlSZXNwb25zZVJlYWRlci5SRUFERVJTLmVycm9yKHJvb3QpO1xuICAgICAgICByZXR1cm4gZXJyb3I7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwiRXJyZXVyIGxvcnMgZGUgbGEgbGVjdHVyZSBkZSBsYSByw6lwb25zZSA6IGVsbGUgbidlc3QgcGFzIGF1IGZvcm1hdCBhdHRlbmR1LlwiKTtcbiAgICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBBbHRpUmVzcG9uc2VSZWFkZXI7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Formats/AltiResponseReader.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Response_model_AltiResponse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Response/model/AltiResponse */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Response/model/AltiResponse.js\");\n/* harmony import */ var _Response_model_Elevation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Response/model/Elevation */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Response/model/Elevation.js\");\n/* harmony import */ var _Response_model_Measure__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Response/model/Measure */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Response/model/Measure.js\");\n\n/**\n * Fonction retournant un objet contenant des clés de lecture (readers)\n * qui permettent de parser des réponses XML du service Altimétrique du Géoportail\n * (calcul altimétrique simple ou profil altimétrique d'une courbe),\n * lorsque le paramètre output = xml,\n * afin de récupérer les élévations retournées.\n *\n * @module AltiResponseReader\n * @alias Gp.Services.Alti.Formats.AltiResponseReader\n * @private\n */\n\n// import Logger from \"../../../Utils/LoggerByDefault\";\n\n\n\n\n/**\n *\n * Objet AltiResponseReader\n *\n * @member {Object} AltiResponseReader\n *\n * @property {Object} AltiResponseReader.READERS - Objet contenant des fonctions de lecture, appelées \"readers\"\n * dont chaque clé correspond au nom d'un tag du XML que l'on souhaite lire\n * et la valeur associée est une fonction (node, data)\n * où node est un noeud du document DOM\n * et data est un objet où l'on stocke les informations lues dans le XML.\n *\n * @property {Method} AltiResponseReader.READERS.elevations - Lecture d'un noeud \"elevations\" de la réponse XML\n * du service alti, correspondant logiquement à la racine du document\n * (contient un ou plusieurs childNodes correspondant chacun à une élévation retournée)\n *\n * @property {Method} AltiResponseReader.READERS.elevation - Lecture d'un noeud \"elevation\" de la réponse xml du service alti.\n * (contient un ou 4 childNode (s) correspondant à l'altitude (z) et éventuellement lat, lon, et acc)\n *\n * @property {Method} AltiResponseReader.READERS.lat - Lecture d'un noeud \"lat\" de la réponse xml du service alti.\n * (contient une valeur de latitude, qui est un flottant)\n *\n * @property {Method} AltiResponseReader.READERS.lon - Lecture d'un noeud \"lon\" de la réponse xml du service alti.\n * (contient une valeur de longitude, qui est un flottant)\n *\n * @property {Method} AltiResponseReader.READERS.z - Lecture d'un noeud \"z\" de la réponse xml du service alti.\n * (contient une valeur d'altitude, qui est un flottant)\n *\n * @property {Method} AltiResponseReader.READERS.acc - Lecture d'un noeud \"acc\" de la réponse xml du service alti.\n * (contient une valeur de précision, qui est un flottant)\n *\n * @property {Method} AltiResponseReader.READERS.measures - Lecture d'un noeud \"measures\" de la réponse xml du service alti.\n * (contient une valeur de précision, qui est un flottant)\n *\n * @property {Method} AltiResponseReader.READERS.source_name - Lecture d'un noeud \"source_name\" de la réponse xml du service alti.\n * (pour remplir l'éventuel objet measure)\n *\n * @property {Method} AltiResponseReader.READERS.source_mesure - Lecture d'un noeud \"source_mesure\" de la réponse xml du service alti.\n * (pour remplir l'éventuel objet measure)\n *\n * @property {Method} AltiResponseReader.READERS.exceptionreport - Lecture d'un noeud \"ExceptionReport\" de la réponse xml du service alti.\n *\n * @property {Method} AltiResponseReader.READERS.exception - Lecture d'un noeud \"Exception\" de la réponse xml du service alti.\n *\n * @property {Method} AltiResponseReader.read - Méthode permettant de lancer la lecture d'une réponse XML du service altimétrique,\n * à l'aide des readers de la classe.\n *\n */\nvar AltiResponseReader = {};\n\nAltiResponseReader.READERS = {\n\n /**\n * Lecture d'un noeud \"elevations\" de la réponse XML du service alti, correspondant logiquement à la racine du document\n * (contient un ou plusieurs childNodes correspondant chacun à une élévation retournée)\n *\n * @param {DOMElement} root - racine de la réponse XML\n * @static\n * @memberof AltiResponseReader\n * @returns {Object} Retourne un objet de type AltiResponse\n */\n elevations : function (root) {\n // INFO : on passe en paramètre l'objet en entrée elevations, vide, à remplir.\n var altiResponse = new _Response_model_AltiResponse__WEBPACK_IMPORTED_MODULE_0__[\"default\"]();\n\n if (root.hasChildNodes()) {\n var children = root.childNodes;\n var child;\n var elevation;\n\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n\n if (AltiResponseReader.READERS[child.nodeName]) {\n elevation = AltiResponseReader.READERS[child.nodeName](child);\n altiResponse.elevations.push(elevation);\n }\n }\n }\n\n return altiResponse;\n },\n\n /**\n * Lecture d'un noeud \"elevation\" de la réponse xml du service alti.\n * (contient un ou 5 childNode (s) correspondant à l'altitude (z) et éventuellement lat, lon, acc et measures)\n *\n * @param {DOMElement} node - noeud elevation à lire pour récupérer les informations de l'élévation retournée (z [, lon, lat, acc, measures])\n * @return {Array} elevationResponse - format de la réponse en sortie, instance de AltiResponse\n * @static\n * @memberof AltiResponseReader\n */\n elevation : function (node) {\n var elevation = new _Response_model_Elevation__WEBPACK_IMPORTED_MODULE_1__[\"default\"]();\n\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (AltiResponseReader.READERS[child.nodeName]) {\n // INFO : on passe en paramètre l'objet en entrée elevation, vide, à remplir.\n AltiResponseReader.READERS[child.nodeName](child, elevation);\n }\n }\n }\n return elevation;\n },\n\n /**\n * Lecture d'un noeud \"lat\" de la réponse xml du service alti.\n * (contient une valeur de latitude, qui est un flottant)\n *\n * @param {DOMElement} node - noeud à lire pour récupérer la latitude\n * @param {Object} elevation - objet dans lequel stocker la latitude retournée\n * @static\n * @memberof AltiResponseReader\n */\n lat : function (node, elevation) {\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n elevation.lat = parseFloat(textNode.nodeValue);\n } else {\n throw new Error(\"Erreur dans la lecture de la réponse du service : latitude attendue mais absente\");\n }\n },\n\n /**\n * Lecture d'un noeud \"lon\" de la réponse xml du service alti.\n * (contient une valeur de longitude, qui est un flottant)\n *\n * @param {DOMElement} node - noeud à lire pour récupérer la longitude\n * @param {Object} elevation - objet dans lequel stocker la longitude retournée\n * @static\n * @memberof AltiResponseReader\n */\n lon : function (node, elevation) {\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n elevation.lon = parseFloat(textNode.nodeValue);\n } else {\n throw new Error(\"Erreur dans la lecture de la réponse du service : longitude attendue mais absente\");\n }\n },\n\n /**\n * Lecture d'un noeud \"z\" de la réponse xml du service alti.\n * (contient une valeur d'altitude, qui est un flottant)\n *\n * @param {DOMElement} node - noeud à lire pour récupérer l'altitude\n * @param {Object} elevationObject - objet dans lequel stocker l'altitude retournée : elevation ou measure\n * @static\n * @memberof AltiResponseReader\n */\n z : function (node, elevationObject) {\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n if (elevationObject) {\n elevationObject.z = parseFloat(textNode.nodeValue);\n } else {\n elevationObject = new _Response_model_Elevation__WEBPACK_IMPORTED_MODULE_1__[\"default\"]();\n elevationObject.z = parseFloat(textNode.nodeValue);\n return elevationObject;\n }\n } else {\n throw new Error(\"Erreur dans la lecture de la réponse du service : altitude attendue mais absente\");\n }\n },\n\n /**\n * Lecture d'un noeud \"acc\" de la réponse xml du service alti.\n * (contient une valeur de précision, qui est un flottant)\n *\n * @param {DOMElement} node - noeud à lire pour récupérer la précision\n * @param {Object} elevationObject - objet dans lequel stocker la précision retournée : elevation ou measure\n * @static\n * @memberof AltiResponseReader\n */\n acc : function (node, elevationObject) {\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n elevationObject.acc = parseFloat(textNode.nodeValue);\n } else {\n throw new Error(\"Erreur dans la lecture de la réponse du service : précision (acc) attendue mais absente\");\n }\n },\n\n /**\n * Lecture d'un noeud \"source_name\" de la réponse xml du service alti.\n * (contient le nom de la source, qui est un string)\n *\n * @param {DOMElement} node - noeud à lire pour récupérer la précision\n * @param {Object} measure - objet dans lequel stocker le nom de la source retourné\n * @static\n * @memberof AltiResponseReader\n */\n source_name : function (node, measure) {\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n measure.source_name = textNode.nodeValue;\n } else {\n throw new Error(\"Erreur dans la lecture de la réponse du service : source_name attendue mais absente\");\n }\n },\n\n /**\n * Lecture d'un noeud \"source_measure\" de la réponse xml du service alti.\n * (contient le nom de la mesure, qui est un string)\n *\n * @param {DOMElement} node - noeud à lire pour récupérer la précision\n * @param {Object} measure - objet dans lequel stocker le nom de la source retourné\n * @static\n * @memberof AltiResponseReader\n */\n source_measure : function (node, measure) {\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n measure.source_measure = textNode.nodeValue;\n } else {\n throw new Error(\"Erreur dans la lecture de la réponse du service : source_measure attendue mais absente\");\n }\n },\n\n /**\n * Lecture d'un noeud \"measures\" et de ses enfants \"measure\" de la réponse xml du service alti.\n * (contient une valeur de précision, qui est un flottant)\n *\n * @param {DOMElement} node - noeud à lire pour récupérer la précision\n * @param {Object} elevation - objet dans lequel stocker la précision retournée\n * @static\n * @memberof AltiResponseReader\n */\n measures : function (node, elevation) {\n elevation.measures = [];\n var measure;\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var measureNode;\n var measureChildren;\n for (var i = 0; i < children.length; i++) {\n measure = new _Response_model_Measure__WEBPACK_IMPORTED_MODULE_2__[\"default\"]();\n measureNode = children[i];\n measureChildren = measureNode.childNodes;\n for (var j = 0; j < measureChildren.length; j++) {\n if (AltiResponseReader.READERS[measureChildren[j].nodeName]) {\n // INFO : on passe en paramètre l'objet en entrée elevation, vide, à remplir.\n AltiResponseReader.READERS[measureChildren[j].nodeName](measureChildren[j], measure);\n } else {\n throw new Error(\"Erreur dans la lecture de la réponse du service : measures attendues mais absentes\");\n }\n }\n elevation.measures.push(measure);\n }\n }\n },\n\n /**\n * Lecture d'un noeud \"ExceptionReport\" de la réponse xml du service alti.\n *\n * @param {DOMElement} node - noeud à lire pour récupérer l'exception\n * @return {Object} exceptionReport - objet contenant l'exception\n * @static\n * @memberof AltiResponseReader\n */\n exceptionreport : function (node) {\n var response = {};\n\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n if (child.nodeName === \"Exception\") {\n response.exceptionReport = AltiResponseReader.READERS.exception(child);\n }\n }\n }\n\n return response;\n },\n\n /**\n * Lecture d'un noeud \"Exception\" de la réponse xml du service alti.\n *\n * @param {DOMElement} node - noeud à lire pour récupérer l'exception\n * @return {Object} exceptionReport - objet contenant l'exception, avec deux attributs :\n * {String} exceptionReport.exceptionCode - qui contient l'identifiant du code de l'exception\n * {String} exceptionReport.exception - qui contient le message de l'exception\n * @static\n * @memberof AltiResponseReader\n */\n exception : function (node) {\n var exceptionReport = {};\n\n // get exception code\n var exceptionCode = node.getAttribute(\"exceptionCode\");\n if (exceptionCode) {\n exceptionReport.exceptionCode = exceptionCode;\n }\n\n // get exception message\n var textNode = node.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n exceptionReport.exception = textNode.nodeValue;\n }\n\n return exceptionReport;\n },\n\n /**\n * Lecture d'un noeud \"Error\" de la réponse xml du service alti.\n *\n * @param {DOMElement} node - noeud à lire pour récupérer l'exception\n * @return {Object} error - objet contenant l'exception\n * @static\n */\n error : function (node) {\n var response = {\n error : {}\n };\n // get error code and description\n if (node.hasChildNodes()) {\n var children = node.childNodes;\n var child;\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n var textNode;\n // get error code\n if (child.nodeType === 1 && child.nodeName === \"code\") { // 1 === node.ELEMENT_NODE\n textNode = child.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n response.error.code = textNode.nodeValue;\n }\n }\n // get error description\n if (child.nodeType === 1 && child.nodeName === \"description\") { // 1 === node.ELEMENT_NODE\n textNode = child.firstChild;\n if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE\n response.error.description = textNode.nodeValue;\n }\n }\n }\n }\n return response;\n }\n\n};\n\n/**\n * Méthode permettant de lancer la lecture d'une réponse XML du service altimétrique,\n * à l'aide des readers de la classe.\n *\n * @method AltiResponseReader.read\n * @param {DOMElement} root - racine de la réponse XML à lire\n * @static\n * @memberof AltiResponseReader\n */\nAltiResponseReader.read = function (root) {\n if (root.nodeName === \"elevations\") {\n var altiResponse = AltiResponseReader.READERS.elevations(root);\n return altiResponse;\n } else if (root.nodeName === \"ExceptionReport\") {\n var exceptionReport = AltiResponseReader.READERS.exceptionreport(root);\n return exceptionReport;\n } else if (root.nodeName === \"error\") {\n var error = AltiResponseReader.READERS.error(root);\n return error;\n } else {\n throw new Error(\"Erreur lors de la lecture de la réponse : elle n'est pas au format attendu.\");\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AltiResponseReader);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfb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gPSBjaGlsZC5maXJzdENoaWxkO1xuICAgICAgICAgICAgICAgICAgICBpZiAodGV4dE5vZGUgJiYgdGV4dE5vZGUubm9kZVR5cGUgPT09IDMpIHsgLy8gMyA9PT0gbm9kZS5URVhUX05PREVcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc3BvbnNlLmVycm9yLmNvZGUgPSB0ZXh0Tm9kZS5ub2RlVmFsdWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gZ2V0IGVycm9yIGRlc2NyaXB0aW9uXG4gICAgICAgICAgICAgICAgaWYgKGNoaWxkLm5vZGVUeXBlID09PSAxICYmIGNoaWxkLm5vZGVOYW1lID09PSBcImRlc2NyaXB0aW9uXCIpIHsgLy8gMSA9PT0gbm9kZS5FTEVNRU5UX05PREVcbiAgICAgICAgICAgICAgICAgICAgdGV4dE5vZGUgPSBjaGlsZC5maXJzdENoaWxkO1xuICAgICAgICAgICAgICAgICAgICBpZiAodGV4dE5vZGUgJiYgdGV4dE5vZGUubm9kZVR5cGUgPT09IDMpIHsgLy8gMyA9PT0gbm9kZS5URVhUX05PREVcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc3BvbnNlLmVycm9yLmRlc2NyaXB0aW9uID0gdGV4dE5vZGUubm9kZVZhbHVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZXNwb25zZTtcbiAgICB9XG5cbn07XG5cbi8qKlxuICogTcOpdGhvZGUgcGVybWV0dGFudCBkZSBsYW5jZXIgbGEgbGVjdHVyZSBkJ3VuZSByw6lwb25zZSBYTUwgZHUgc2VydmljZSBhbHRpbcOpdHJpcXVlLFxuICogICAgICDDoCBsJ2FpZGUgZGVzIHJlYWRlcnMgZGUgbGEgY2xhc3NlLlxuICpcbiAqIEBtZXRob2QgQWx0aVJlc3BvbnN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ceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Formats/AltiResponseReader.js\n"); /***/ }), @@ -380,7 +380,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Res /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _AltiRequestREST__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AltiRequestREST */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Request/AltiRequestREST.js\");\n/* harmony import */ var _AltiRequestWPS__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AltiRequestWPS */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Request/AltiRequestWPS.js\");\n/**\n * Creation d'une requête en REST ou WPS\n * (Factory)\n *\n * @module AltiRequestFactory\n * @alias Gp.Services.Alti.Request.AltiRequestFactory\n * @private\n */\n\n\n\n\n\nvar AltiRequestFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Alti\n *\n * @example\n * var options = {\n * httpMethod : 'GET', // GET|POST\n * onSuccess : function (response) {},\n * onError : function (error) {},\n * scope : this,\n * positions : [{lon:, lat:}, {lon:, lat:}],\n * outputFormat : 'json' // json|xml\n * sampling : 3,\n * api : 'REST', // REST|WPS\n * zonly : false // false|true\n * };\n *\n */\n build : function (options) {\n // logger\n var logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"AltiRequestFactory\");\n logger.trace([\"AltiRequestFactory::build()\"]);\n\n var request = null;\n\n // on factorise les options par groupe;\n // - global,\n // - param, les params pour les data inputs\n // - wps, les param du service\n // - callback\n\n var settings = {\n // ajout des valeurs par defaut spécifiques au service\n type : options.sampling ? \"Profil\" : \"Elevation\",\n method : options.httpMethod,\n param : {\n positions : null,\n delimiter : null, // FIXME par defaut, on ne le met pas en place car ça fait planter la requête !?\n indent : null, // par defaut\n crs : null, // par defaut\n format : null, // (only to POST)\n sampling : null, // (only use by Profil)\n zonly : null // (only use by Elevation)\n }\n };\n\n // surcharge des valeurs obligatoires\n settings.param.positions = options.positions;\n settings.param.format = options.outputFormat;\n settings.param.sampling = options.sampling;\n settings.param.zonly = options.zonly;\n\n // gestion des callback\n var bOnError = !!(options.onError !== null && typeof options.onError === \"function\"); // cast variable to boolean\n var bOnSuccess = !!(options.onSuccess !== null && typeof options.onSuccess === \"function\");\n\n var message = null;\n switch (options.api) {\n case \"REST\":\n // FIXME les exceptions ne sont pas 'catchées' sur le constructeur !\n var myReq = new _AltiRequestREST__WEBPACK_IMPORTED_MODULE_2__[\"default\"](settings);\n if (!myReq.processRequestString()) {\n message = \"Error in process request (rest) !\";\n if (bOnError) {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__[\"default\"](message));\n return;\n }\n throw new Error(message);\n }\n request = myReq.requestString;\n break;\n case \"WPS\":\n // ajout des valeurs par defaut spécifiques au service WPS\n settings.wps = {\n service : null, // par defaut\n version : null, // par defaut\n identifier : null, // par defaut\n rawdataoutput : null, // par defaut\n request : null // par defaut\n };\n\n request = _AltiRequestWPS__WEBPACK_IMPORTED_MODULE_3__[\"default\"].build(settings);\n if (!request) {\n message = \"Error in process request (wps) !\";\n if (bOnError) {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__[\"default\"](message));\n return;\n }\n throw new Error(message);\n }\n break;\n default:\n message = \"Type of API is not supported by service (REST or WPS) !\";\n if (bOnError) {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__[\"default\"](message));\n return;\n }\n throw new Error(message);\n }\n\n if (bOnSuccess) {\n options.onSuccess.call(options.scope, request);\n }\n\n return request;\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AltiRequestFactory);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQWx0aS9SZXF1ZXN0L0FsdGlSZXF1ZXN0RmFjdG9yeS5qcz9kZDE2Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ29EO0FBQ1E7QUFDWjtBQUNGOztBQUU5Qzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsZUFBZSxPQUFPO0FBQ3RCO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsOENBQThDO0FBQzlDLHlDQUF5QztBQUN6QztBQUNBLDBCQUEwQixXQUFXLEdBQUcsV0FBVztBQUNuRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxxQkFBcUIsOERBQU07QUFDM0I7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSw2RkFBNkY7QUFDN0Y7O0FBRUE7QUFDQTtBQUN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R0aW5ncyk7XG4gICAgICAgICAgICAgICAgaWYgKCFteVJlcS5wcm9jZXNzUmVxdWVzdFN0cmluZygpKSB7XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgPSBcIkVycm9yIGluIHByb2Nlc3MgcmVxdWVzdCAocmVzdCkgIVwiO1xuICAgICAgICAgICAgICAgICAgICBpZiAoYk9uRXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnMub25FcnJvci5jYWxsKG9wdGlvbnMuc2NvcGUsIG5ldyBFcnJvclNlcnZpY2UobWVzc2FnZSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihtZXNzYWdlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmVxdWVzdCA9IG15UmVxLnJlcXVlc3RTdHJpbmc7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwiV1BTXCI6XG4gICAgICAgICAgICAgICAgLy8gYWpvdXQgZGVzIHZhbGV1cnMgcGFyIGRlZmF1dCBzcMOpY2lmaXF1ZXMgYXUgc2VydmljZSBXUFNcbiAgICAgICAgICAgICAgICBzZXR0aW5ncy53cHMgPSB7XG4gICAgICAgICAgICAgICAgICAgIHNlcnZpY2UgOiBudWxsLCAvLyBwYXIgZGVmYXV0XG4gICAgICAgICAgICAgICAgICAgIHZlcnNpb24gOiBudWxsLCAvLyBwYXIgZGVmYXV0XG4gICAgICAgICAgICAgICAgICAgIGlkZW50aWZpZXIgOiBudWxsLCAvLyBwYXIgZGVmYXV0XG4gICAgICAgICAgICAgICAgICAgIHJhd2RhdGFvdXRwdXQgOiBudWxsLCAvLyBwYXIgZGVmYXV0XG4gICAgICAgICAgICAgICAgICAgIHJlcXVlc3QgOiBudWxsIC8vIHBhciBkZWZhdXRcbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgcmVxdWVzdCA9IEFsdGlSZXF1ZXN0V1BTLmJ1aWxkKHNldHRpbmdzKTtcbiAgICAgICAgICAgICAgICBpZiAoIXJlcXVlc3QpIHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA9IFwiRXJyb3IgaW4gcHJvY2VzcyByZXF1ZXN0ICh3cHMpICFcIjtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGJPbkVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLm9uRXJyb3IuY2FsbChvcHRpb25zLnNjb3BlLCBuZXcgRXJyb3JTZXJ2aWNlKG1lc3NhZ2UpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IobWVzc2FnZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICBtZXNzYWdlID0gXCJUeXBlIG9mIEFQSSBpcyBub3Qgc3VwcG9ydGVkIGJ5IHNlcnZpY2UgKFJFU1Qgb3IgV1BTKSAhXCI7XG4gICAgICAgICAgICAgICAgaWYgKGJPbkVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMub25FcnJvci5jYWxsKG9wdGlvbnMuc2NvcGUsIG5ldyBFcnJvclNlcnZpY2UobWVzc2FnZSkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihtZXNzYWdlKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChiT25TdWNjZXNzKSB7XG4gICAgICAgICAgICBvcHRpb25zLm9uU3VjY2Vzcy5jYWxsKG9wdGlvbnMuc2NvcGUsIHJlcXVlc3QpO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHJlcXVlc3Q7XG4gICAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgQWx0aVJlcXVlc3RGYWN0b3J5O1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Request/AltiRequestFactory.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _AltiRequestREST__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AltiRequestREST */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Request/AltiRequestREST.js\");\n/* harmony import */ var _AltiRequestWPS__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AltiRequestWPS */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Request/AltiRequestWPS.js\");\n/**\n * Creation d'une requête en REST ou WPS\n * (Factory)\n *\n * @module AltiRequestFactory\n * @alias Gp.Services.Alti.Request.AltiRequestFactory\n * @private\n */\n\n\n\n\n\nvar AltiRequestFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Alti\n *\n * @example\n * var options = {\n * httpMethod : 'GET', // GET|POST\n * onSuccess : function (response) {},\n * onError : function (error) {},\n * scope : this,\n * positions : [{lon:, lat:}, {lon:, lat:}],\n * outputFormat : 'json' // json|xml\n * sampling : 3,\n * api : 'REST', // REST|WPS\n * zonly : false // false|true\n * };\n *\n */\n build : function (options) {\n // logger\n var logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"AltiRequestFactory\");\n logger.trace([\"AltiRequestFactory::build()\"]);\n\n var request = null;\n\n // on factorise les options par groupe;\n // - global,\n // - param, les params pour les data inputs\n // - wps, les param du service\n // - callback\n\n var settings = {\n // ajout des valeurs par defaut spécifiques au service\n type : options.sampling ? \"Profil\" : \"Elevation\",\n method : options.httpMethod,\n param : {\n positions : null,\n delimiter : null, // FIXME par defaut, on ne le met pas en place car ça fait planter la requête !?\n indent : null, // par defaut\n crs : null, // par defaut\n format : null, // (only to POST)\n sampling : null, // (only use by Profil)\n zonly : null, // (only use by Elevation)\n measures : null // (only use by Elevation)\n }\n };\n\n // surcharge des valeurs obligatoires\n settings.param.positions = options.positions;\n settings.param.format = options.outputFormat;\n settings.param.sampling = options.sampling;\n settings.param.zonly = options.zonly;\n settings.param.measures = options.measures;\n settings.param.resource = options.resource;\n\n // gestion des callback\n var bOnError = !!(options.onError !== null && typeof options.onError === \"function\"); // cast variable to boolean\n var bOnSuccess = !!(options.onSuccess !== null && typeof options.onSuccess === \"function\");\n\n var message = null;\n switch (options.api) {\n case \"REST\":\n // FIXME les exceptions ne sont pas 'catchées' sur le constructeur !\n var myReq = new _AltiRequestREST__WEBPACK_IMPORTED_MODULE_2__[\"default\"](settings);\n if (!myReq.processRequestString()) {\n message = \"Error in process request (rest) !\";\n if (bOnError) {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__[\"default\"](message));\n return;\n }\n throw new Error(message);\n }\n request = myReq.requestString;\n break;\n case \"WPS\":\n // ajout des valeurs par defaut spécifiques au service WPS\n settings.wps = {\n service : null, // par defaut\n version : null, // par defaut\n identifier : null, // par defaut\n rawdataoutput : null, // par defaut\n request : null // par defaut\n };\n\n request = _AltiRequestWPS__WEBPACK_IMPORTED_MODULE_3__[\"default\"].build(settings);\n if (!request) {\n message = \"Error in process request (wps) !\";\n if (bOnError) {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__[\"default\"](message));\n return;\n }\n throw new Error(message);\n }\n break;\n default:\n message = \"Type of API is not supported by service (REST or WPS) !\";\n if (bOnError) {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__[\"default\"](message));\n return;\n }\n throw new Error(message);\n }\n\n if (bOnSuccess) {\n options.onSuccess.call(options.scope, request);\n }\n\n return request;\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AltiRequestFactory);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQWx0aS9SZXF1ZXN0L0FsdGlSZXF1ZXN0RmFjdG9yeS5qcz9kZDE2Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ29EO0FBQ1E7QUFDWjtBQUNGOztBQUU5Qzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsZUFBZSxPQUFPO0FBQ3RCO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsOENBQThDO0FBQzlDLHlDQUF5QztBQUN6QztBQUNBLDBCQUEwQixXQUFXLEdBQUcsV0FBVztBQUNuRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxxQkFBcUIsOERBQU07QUFDM0I7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QU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bnMub25TdWNjZXNzID09PSBcImZ1bmN0aW9uXCIpO1xuXG4gICAgICAgIHZhciBtZXNzYWdlID0gbnVsbDtcbiAgICAgICAgc3dpdGNoIChvcHRpb25zLmFwaSkge1xuICAgICAgICAgICAgY2FzZSBcIlJFU1RcIjpcbiAgICAgICAgICAgICAgICAvLyBGSVhNRSBsZXMgZXhjZXB0aW9ucyBuZSBzb250IHBhcyAnY2F0Y2jDqWVzJyBzdXIgbGUgY29uc3RydWN0ZXVyICFcbiAgICAgICAgICAgICAgICB2YXIgbXlSZXEgPSBuZXcgQWx0aVJlcXVlc3RSRVNUKHNldHRpbmdzKTtcbiAgICAgICAgICAgICAgICBpZiAoIW15UmVxLnByb2Nlc3NSZXF1ZXN0U3RyaW5nKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA9IFwiRXJyb3IgaW4gcHJvY2VzcyByZXF1ZXN0IChyZXN0KSAhXCI7XG4gICAgICAgICAgICAgICAgICAgIGlmIChiT25FcnJvcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5vbkVycm9yLmNhbGwob3B0aW9ucy5zY29wZSwgbmV3IEVycm9yU2VydmljZShtZXNzYWdlKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKG1lc3NhZ2UpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXF1ZXN0ID0gbXlSZXEucmVxdWVzdFN0cmluZztcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgXCJXUFNcIjpcbiAgICAgICAgICAgICAgICAvLyBham91dCBkZXMgdmFsZXVycyBwYXIgZGVmYXV0IHNww6ljaWZpcXVlcyBhdSBzZXJ2aWNlIFdQU1xuICAgICAgICAgICAgICAgIHNldHRpbmdzLndwcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgc2VydmljZSA6IG51bGwsIC8vIHBhciBkZWZhdXRcbiAgICAgICAgICAgICAgICAgICAgdmVyc2lvbiA6IG51bGwsIC8vIHBhciBkZWZhdXRcbiAgICAgICAgICAgICAgICAgICAgaWRlbnRpZmllciA6IG51bGwsIC8vIHBhciBkZWZhdXRcbiAgICAgICAgICAgICAgICAgICAgcmF3ZGF0YW91dHB1dCA6IG51bGwsIC8vIHBhciBkZWZhdXRcbiAgICAgICAgICAgICAgICAgICAgcmVxdWVzdCA6IG51bGwgLy8gcGFyIGRlZmF1dFxuICAgICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgICAgICByZXF1ZXN0ID0gQWx0aVJlcXVlc3RXUFMuYnVpbGQoc2V0dGluZ3MpO1xuICAgICAgICAgICAgICAgIGlmICghcmVxdWVzdCkge1xuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlID0gXCJFcnJvciBpbiBwcm9jZXNzIHJlcXVlc3QgKHdwcykgIVwiO1xuICAgICAgICAgICAgICAgICAgICBpZiAoYk9uRXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnMub25FcnJvci5jYWxsKG9wdGlvbnMuc2NvcGUsIG5ldyBFcnJvclNlcnZpY2UobWVzc2FnZSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihtZXNzYWdlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIG1lc3NhZ2UgPSBcIlR5cGUgb2YgQVBJIGlzIG5vdCBzdXBwb3J0ZWQgYnkgc2VydmljZSAoUkVTVCBvciBXUFMpICFcIjtcbiAgICAgICAgICAgICAgICBpZiAoYk9uRXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5vbkVycm9yLmNhbGwob3B0aW9ucy5zY29wZSwgbmV3IEVycm9yU2VydmljZShtZXNzYWdlKSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKG1lc3NhZ2UpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGJPblN1Y2Nlc3MpIHtcbiAgICAgICAgICAgIG9wdGlvbnMub25TdWNjZXNzLmNhbGwob3B0aW9ucy5zY29wZSwgcmVxdWVzdCk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcmVxdWVzdDtcbiAgICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBBbHRpUmVxdWVzdEZhY3Rvcnk7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Request/AltiRequestFactory.js\n"); /***/ }), @@ -392,7 +392,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Uti /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _model_AltiElevationRequest__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./model/AltiElevationRequest */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiElevationRequest.js\");\n/* harmony import */ var _model_AltiProfilRequest__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./model/AltiProfilRequest */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiProfilRequest.js\");\n/* jshint multistr : true */\n\n\n\n\n\n\n/**\n * @classdesc\n * Classe de gestion des requêtes de type REST sur le service altimetrique.\n *\n * @todo Le service Alti n'implemente pas le POST !?\n * @constructor\n * @alias Gp.Services.Alti.Request.AltiRequestREST\n * @param {Object} options - options\n * @param {Object} options.param.positions - tableau de coordonnées lon/lat\n * @param {String} options.param.delimiter - '|'\n * @param {Boolean} options.param.indent - false|true\n * @param {String} options.param.crs - 'CRS:84'\n * @param {String} options.param.sampling - 3\n * @param {Boolean} options.param.zonly - false|true\n * @param {String} options.param.format - \"JSON|XML\"\n * @param {String} options.type - \"Profil|Elevation\"\n * @param {String} options.method - GET|POST\n *\n * @example\n * var options = {\n * type : 'Profil', // Elevation\n * method : 'GET', // par defaut\n * param : {\n * positions : [\n * {lon:'1.11', lat:'1.11'},\n * {lon:'1.10', lat:'1.10'},\n * {lon:'1.12', lat:'1.12'}\n * ],\n * delimiter : \";\", // par defaut\n * indent : true, // par defaut\n * crs : 'EPSG:4326', // par defaut\n * format : 'json', // par defaut (only to POST)\n * sampling : 3 , // par defaut (only use by Profil)\n * zonly : false // par defaut (only use by Elevation)\n * }\n * };\n *\n * var result;\n * try {\n * var obj = new AltiRequestREST (options);\n * if (! obj.processRequestString ()) {\n * throw new Error(\"Request empty !?\")\n * }\n * result = obj.requestString;\n * } catch (e) {\n * // exceptions...\n * }\n * @private\n */\nfunction AltiRequestREST (options) {\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"AltiRequestREST\");\n this.logger.trace(\"[Constructeur AltiRequestREST ()]\");\n\n if (!(this instanceof AltiRequestREST)) {\n throw new TypeError(\"AltiRequestREST constructor cannot be called as a function.\");\n }\n\n this.options = options || {};\n\n // existance des options\n if (!this.options) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_EMPTY\", \"options\"));\n }\n\n // type de requete : Altitude ou Profil\n // (param. à determiner en fonction des parametres d'entrée)\n if (!this.options.type) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_EMPTY\", \"type (Elevation or Profil)\"));\n }\n\n // construction du modele de requête\n // (test du type d'objet candidat)\n this.DataObject = null;\n switch (this.options.type) {\n case \"Elevation\":\n this.DataObject = new _model_AltiElevationRequest__WEBPACK_IMPORTED_MODULE_2__[\"default\"](this.options.param);\n break;\n case \"Profil\":\n this.DataObject = new _model_AltiProfilRequest__WEBPACK_IMPORTED_MODULE_3__[\"default\"](this.options.param);\n break;\n default:\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_TYPE\", \"type (Elevation or Profil)\"));\n }\n\n /**\n * methode.\n * Par defaut, \"GET\".\n */\n this.method = this.options.method || \"GET\";\n}\n\nAltiRequestREST.prototype = {\n\n /**\n * request\n * @type {String}\n */\n requestString : null,\n\n /**\n * Constructeur (alias)\n */\n constructor : AltiRequestREST,\n\n /**\n * Template de la requête.\n */\n template : {\n get : {\n // FIXME on retire le param 'delimiter' : &delimiter='__DELIMITER__'\n value : \"lon=__LON__&lat=__LAT__&indent=__INDENT__&crs='__CRS__'\",\n input : {\n point : \"&zonly=__ZONLY__\",\n profil : \"&sampling=__SAMPLING__\"\n }\n },\n post : {\n // FIXME on retire le param 'delimiter' : delimiter='__DELIMITER__'\\n\\\n value : \"lon=__LON__\\n\" +\n \"lat=__LAT__\\n\" +\n \"indent=__INDENT__\\n\" +\n \"crs='__CRS__'\\n\",\n input : {\n point : \"zonly=__ZONLY__\",\n profil : \"sampling=__SAMPLING__\"\n }\n }\n },\n\n /**\n * Construction de la requête.\n *\n * @example\n * // GET out : lon=0.2367,2.1570&lat=48.0551,46.6077&delimiter=,&indent=true&zonly=true&crs='CRS:84'\n * // POST out : Not yet supported method POST !\n * @returns {String}\n */\n processRequestString : function () {\n this.logger.trace(\"AltiRequestREST::processRequestString ()\");\n\n var template = \"\";\n if (this.method === \"POST\") {\n template = this.template.post.value;\n } else if (this.method === \"GET\") {\n template = this.template.get.value;\n }\n\n template = template.replace(/__LON__/g, this.DataObject.getLon());\n template = template.replace(/__LAT__/g, this.DataObject.getLat());\n // FIXME on retire le param 'delimiter'\n // template = template.replace(/__DELIMITER__/g, this.DataObject.delimiter);\n template = template.replace(/__INDENT__/g, this.DataObject.indent);\n template = template.replace(/__CRS__/g, this.DataObject.crs);\n\n // ajout +\n template = template + this.__addDataInputs();\n this.logger.trace(\"traduction tmpl\", template);\n\n // sauvegarde\n this.requestString = template;\n\n return this.requestString;\n },\n\n /**\n * Ajout de parametres spécifiques (ex. zonly)\n *\n * @returns {String}\n */\n __addDataInputs : function () {\n this.logger.trace(\"AltiRequestREST::addDataInput ()\");\n\n var myTemplate;\n if (this.method === \"POST\") {\n myTemplate = this.template.post;\n } else if (this.method === \"GET\") {\n myTemplate = this.template.get;\n } else {\n throw new Error(\"No other HTTP method supported by the service !\");\n }\n\n var tmpl = null;\n if (this.DataObject.CLASSNAME === \"AltiElevationRequest\") {\n tmpl = myTemplate.input.point;\n return tmpl.replace(/__ZONLY__/g, this.DataObject.zonly);\n } else if (this.DataObject.CLASSNAME === \"AltiProfilRequest\") {\n tmpl = myTemplate.input.profil;\n return tmpl.replace(/__SAMPLING__/g, this.DataObject.sampling);\n } else {\n throw new Error(\"No other object supported than elevation or profil !?\");\n }\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AltiRequestREST);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQWx0aS9SZXF1ZXN0L0FsdGlSZXF1ZXN0UkVTVC5qcz9kNzQ0Il0sIm5hbWVzIjpbXS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S5mb3JtYXQgLSBcIkpTT058WE1MXCJcbiAqIEBwYXJhbSB7U3RyaW5nfSAgIG9wdGlvbnMudHlwZSAtIFwiUHJvZmlsfEVsZXZhdGlvblwiXG4gKiBAcGFyYW0ge1N0cmluZ30gICBvcHRpb25zLm1ldGhvZCAtIEdFVHxQT1NUXG4gKlxuICogQGV4YW1wbGVcbiAqICAgICAgdmFyIG9wdGlvbnMgPSB7XG4gKiAgICAgICAgICAgdHlwZSA6ICdQcm9maWwnLCAvLyBFbGV2YXRpb25cbiAqICAgICAgICAgICBtZXRob2QgOiAnR0VUJywgIC8vIHBhciBkZWZhdXRcbiAqICAgICAgICAgICBwYXJhbSA6IHtcbiAqICAgICAgICAgICAgICAgcG9zaXRpb25zIDogW1xuICogICAgICAgICAgICAgICAgICAge2xvbjonMS4xMScsIGxhdDonMS4xMSd9LFxuICogICAgICAgICAgICAgICAgICAge2xvbjonMS4xMCcsIGxhdDonMS4xMCd9LFxuICogICAgICAgICAgICAgICAgICAge2xvbjonMS4xMicsIGxhdDonMS4xMid9XG4gKiAgICAgICAgICAgICAgIF0sXG4gKiAgICAgICAgICAgICAgIGRlbGltaXRlciA6IFwiO1wiLCAgICAgICAgIC8vIHBhciBkZWZhdXRcbiAqICAgICAgICAgICAgICAgaW5kZW50ICAgIDogdHJ1ZSwgICAgICAgIC8vIHBhciBkZWZhdXRcbiAqICAgICAgICAgICAgICAgY3JzICAgICAgIDogJ0VQU0c6NDMyNicsIC8vIHBhciBkZWZhdXRcbiAqICAgICAgICAgICAgICAgZm9ybWF0ICAgIDogJ2pzb24nLCAgICAgIC8vIHBhciBkZWZhdXQgKG9ubHkgdG8gUE9TVClcbiAqICAgICAgICAgICAgICAgc2FtcGxpbmcgIDogMyAsICAgICAgICAgIC8vIHBhciBkZWZhdXQgKG9ubHkgdXNlIGJ5IFByb2ZpbClcbiAqICAgICAgICAgICAgICAgem9ubHkgICAgIDogZmFsc2UgICAgICAgIC8vIHBhciBkZWZhdXQgKG9ubHk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IHRoaXMuRGF0YU9iamVjdC5zYW1wbGluZyk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJObyBvdGhlciBvYmplY3Qgc3VwcG9ydGVkIHRoYW4gZWxldmF0aW9uIG9yIHByb2ZpbCAhP1wiKTtcbiAgICAgICAgfVxuICAgIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IEFsdGlSZXF1ZXN0UkVTVDtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Request/AltiRequestREST.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _model_AltiElevationRequest__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./model/AltiElevationRequest */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiElevationRequest.js\");\n/* harmony import */ var _model_AltiProfilRequest__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./model/AltiProfilRequest */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiProfilRequest.js\");\n/* jshint multistr : true */\n\n\n\n\n\n\n/**\n * @classdesc\n * Classe de gestion des requêtes de type REST sur le service altimetrique.\n *\n * @todo Le service Alti n'implemente pas le POST !?\n * @constructor\n * @alias Gp.Services.Alti.Request.AltiRequestREST\n * @param {Object} options - options\n * @param {Object} options.param.positions - tableau de coordonnées lon/lat\n * @param {String} options.param.delimiter - '|'\n * @param {Boolean} options.param.indent - false|true\n * @param {String} options.param.crs - 'CRS:84'\n * @param {String} options.param.sampling - 3\n * @param {String} options.param.resource - 'rge_alti_corse2a_float32_zip_lamb93'\n * @param {Boolean} options.param.zonly - false|true\n * @param {Boolean} options.param.measures - false|true\n * @param {String} options.param.format - \"JSON|XML\"\n * @param {String} options.type - \"Profil|Elevation\"\n * @param {String} options.method - GET|POST\n *\n * @example\n * var options = {\n * type : 'Profil', // Elevation\n * method : 'GET', // par defaut\n * param : {\n * positions : [\n * {lon:'1.11', lat:'1.11'},\n * {lon:'1.10', lat:'1.10'},\n * {lon:'1.12', lat:'1.12'}\n * ],\n * delimiter : \";\", // par defaut\n * indent : true, // par defaut\n * crs : 'EPSG:4326', // par defaut\n * format : 'json', // par defaut (only to POST)\n * sampling : 3 , // par defaut (only use by Profil)\n * zonly : false // par defaut (only use by Elevation)\n * measures : false // par defaut (only use by Elevation)\n * }\n * };\n *\n * var result;\n * try {\n * var obj = new AltiRequestREST (options);\n * if (! obj.processRequestString ()) {\n * throw new Error(\"Request empty !?\")\n * }\n * result = obj.requestString;\n * } catch (e) {\n * // exceptions...\n * }\n * @private\n */\nfunction AltiRequestREST (options) {\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"AltiRequestREST\");\n this.logger.trace(\"[Constructeur AltiRequestREST ()]\");\n\n if (!(this instanceof AltiRequestREST)) {\n throw new TypeError(\"AltiRequestREST constructor cannot be called as a function.\");\n }\n\n this.options = options || {};\n\n // existance des options\n if (!this.options) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_EMPTY\", \"options\"));\n }\n\n // type de requete : Altitude ou Profil\n // (param. à determiner en fonction des parametres d'entrée)\n if (!this.options.type) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_EMPTY\", \"type (Elevation or Profil)\"));\n }\n\n // construction du modele de requête\n // (test du type d'objet candidat)\n this.DataObject = null;\n switch (this.options.type) {\n case \"Elevation\":\n this.DataObject = new _model_AltiElevationRequest__WEBPACK_IMPORTED_MODULE_2__[\"default\"](this.options.param);\n break;\n case \"Profil\":\n this.DataObject = new _model_AltiProfilRequest__WEBPACK_IMPORTED_MODULE_3__[\"default\"](this.options.param);\n break;\n default:\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_TYPE\", \"type (Elevation or Profil)\"));\n }\n\n /**\n * methode.\n * Par defaut, \"GET\".\n */\n this.method = this.options.method || \"GET\";\n}\n\nAltiRequestREST.prototype = {\n\n /**\n * request\n * @type {String}\n */\n requestString : null,\n\n /**\n * Constructeur (alias)\n */\n constructor : AltiRequestREST,\n\n /**\n * Template de la requête.\n */\n template : {\n get : {\n // FIXME on retire le param 'delimiter' : &delimiter='__DELIMITER__'\n value : \"lon=__LON__&lat=__LAT__&indent=__INDENT__&crs='__CRS__'&resource=__RESOURCE__&measures=__MEASURES__\",\n input : {\n point : \"&zonly=__ZONLY__\",\n profil : \"&sampling=__SAMPLING__\"\n }\n },\n post : {\n // FIXME on retire le param 'delimiter' : delimiter='__DELIMITER__'\\n\\\n value : \"lon=__LON__\\n\" +\n \"lat=__LAT__\\n\" +\n \"indent=__INDENT__\\n\" +\n \"crs='__CRS__'\\n\" +\n \"resource='__RESOURCE__'\\n\" +\n \"measures='__MEASURES__'\\n\",\n input : {\n point : \"zonly=__ZONLY__\\n\",\n profil : \"sampling=__SAMPLING__\"\n }\n }\n },\n\n /**\n * Construction de la requête.\n *\n * @example\n * // GET out : lon=0.2367,2.1570&lat=48.0551,46.6077&delimiter=,&indent=true&zonly=true&crs='CRS:84'\n * // POST out : Not yet supported method POST !\n * @returns {String}\n */\n processRequestString : function () {\n this.logger.trace(\"AltiRequestREST::processRequestString ()\");\n\n var template = \"\";\n if (this.method === \"POST\") {\n template = this.template.post.value;\n } else if (this.method === \"GET\") {\n template = this.template.get.value;\n }\n\n template = template.replace(/__LON__/g, this.DataObject.getLon());\n template = template.replace(/__LAT__/g, this.DataObject.getLat());\n // FIXME on retire le param 'delimiter'\n // template = template.replace(/__DELIMITER__/g, this.DataObject.delimiter);\n template = template.replace(/__INDENT__/g, this.DataObject.indent);\n template = template.replace(/__CRS__/g, this.DataObject.crs);\n template = template.replace(/__RESOURCE__/g, this.DataObject.resource);\n template = template.replace(/__MEASURES__/g, this.DataObject.measures);\n\n // ajout +\n template = template + this.__addDataInputs();\n this.logger.trace(\"traduction tmpl\", template);\n\n // sauvegarde\n this.requestString = template;\n\n return this.requestString;\n },\n\n /**\n * Ajout de parametres spécifiques (ex. zonly)\n *\n * @returns {String}\n */\n __addDataInputs : function () {\n this.logger.trace(\"AltiRequestREST::addDataInput ()\");\n\n var myTemplate;\n if (this.method === \"POST\") {\n myTemplate = this.template.post;\n } else if (this.method === \"GET\") {\n myTemplate = this.template.get;\n } else {\n throw new Error(\"No other HTTP method supported by the service !\");\n }\n\n var tmpl = null;\n if (this.DataObject.CLASSNAME === \"AltiElevationRequest\") {\n tmpl = myTemplate.input.point;\n return tmpl.replace(/__ZONLY__/g, this.DataObject.zonly.toString());\n } else if (this.DataObject.CLASSNAME === \"AltiProfilRequest\") {\n tmpl = myTemplate.input.profil;\n return tmpl.replace(/__SAMPLING__/g, this.DataObject.sampling);\n } else {\n throw new Error(\"No other object supported than elevation or profil !?\");\n }\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AltiRequestREST);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQWx0aS9SZXF1ZXN0L0FsdGlSZXF1ZXN0UkVTVC5qcz9kNzQ0Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTt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fZmxvYXQzMl96aXBfbGFtYjkzJ1xuICogQHBhcmFtIHtCb29sZWFufSAgb3B0aW9ucy5wYXJhbS56b25seSAtIGZhbHNlfHRydWVcbiAqIEBwYXJhbSB7Qm9vbGVhbn0gIG9wdGlvbnMucGFyYW0ubWVhc3VyZXMgLSBmYWxzZXx0cnVlXG4gKiBAcGFyYW0ge1N0cmluZ30gICBvcHRpb25zLnBhcmFtLmZvcm1hdCAtIFwiSlNPTnxYTUxcIlxuICogQHBhcmFtIHtTdHJpbmd9ICAgb3B0aW9ucy50eXBlIC0gXCJQcm9maWx8RWxldmF0aW9uXCJcbiAqIEBwYXJhbSB7U3RyaW5nfSAgIG9wdGlvbnMubWV0aG9kIC0gR0VUfFBPU1RcbiAqXG4gKiBAZXhhbXBsZVxuICogICAgICB2YXIgb3B0aW9ucyA9IHtcbiAqICAgICAgICAgICB0eXBlIDogJ1Byb2ZpbCcsIC8vIEVsZXZhdGlvblxuICogICAgICAgICAgIG1ldGhvZCA6ICdHRVQnLCAgLy8gcGFyIGRlZmF1dFxuICogICAgICAgICAgIHBhcmFtIDoge1xuICogICAgICAgICAgICAgICBwb3NpdGlvbnMgOiBbXG4gKiAgICAgICAgICAgICAgICAgICB7bG9uOicxLjExJywgbGF0OicxLjExJ30sXG4gKiAgICAgICAgICAgICAgICAgICB7bG9uOicxLjEwJywgbGF0OicxLjEwJ30sXG4gKiAgICAgICAgICAgICAgICAgICB7bG9uOicxLjEyJywgbGF0OicxLjEyJ31cbiAqICAgICAgICAgICAgICAgXSxcbiAqICAgICAgICAgICAgICAgZGVsaW1pdGVyIDogXCI7XCIsICAgICAgICAgLy8gcGFyIGRlZmF1dFxuICogICAgICAgICAgICAgICBpbmRlbnQgICAgOiB0cnVlLCAgICAgICAgLy8gcGFyIGRlZmF1dFxuICogICAgICAgICAgICAgICBjcnMgICAgICAgOiAnRVBTRzo0MzI2JywgLy8gcGFyIGRlZmF1dFxuICogICAgICAgICAgICAgICBmb3JtYXQgICAgOiAnanNvbicsICAgICAgLy8gcGFyIGRlZmF1dCAob25seSB0byBQT1NUKVxuICogICAgICAgICAgICAgICBzYW1wbGluZyAgOiAzICwgICAgICAgICAgLy8gcGFyIGRlZmF1dCAob25seSB1c2UgYnkgUHJvZmlsKVxuICogICAgICAgICAgICAgICB6b25seSAgICAgOiBmYWxzZSAgICAgICAgLy8gcGFyIGRlZmF1dCAob25seSB1c2UgYnkgRWxldmF0aW9uKVxuICogICAgICAgICAgICAgICBtZWFzdXJlcyAgOiBmYWxzZSAgICAgICAgLy8gcGFyIGRlZmF1dCAob25seSB1c2UgYnkgRWxldmF0aW9uKVxuICogICAgICAgICAgIH1cbiAqICAgICAgfTtcbiAqXG4gKiAgICAgIHZhciByZXN1bHQ7XG4gKiAgICAgIHRyeSB7XG4gKiAgICAgICAgICB2YXIgb2JqID0gbmV3IEFsdGlSZXF1ZXN0UkVTVCAob3B0aW9ucyk7XG4gKiAgICAgICAgICBpZiAoISBvYmoucHJvY2Vzc1JlcXVlc3RTdHJpbmcgKCkpIHtcbiAqICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJSZXF1ZXN0IGVtcHR5ICE/XCIpXG4gKiAgICAgICAgICB9XG4gKiAgICAgICAgICByZXN1bHQgPSBvYmoucmVxdWVzdFN0cmluZztcbiAqICAgICAgfSBjYXRjaCAoZSkge1xuICogICAgICAgICAgLy8gZXhjZXB0aW9ucy4uLlxuICogICAgICB9XG4gKiBAcHJpdmF0ZVxuICovXG5mdW5jdGlvbiBBbHRpUmVxdWVzdFJFU1QgKG9wdGlvbnMpIHtcbiAgICB0aGlzLmxvZ2dlciA9IExvZ2dlci5nZXRMb2dnZXIoXCJBbHRpUmVxdWVzdFJFU1RcIik7XG4gICAgdGhpcy5sb2dnZXIudHJhY2UoXCJbQ29uc3RydWN0ZXVyIEFsdGlSZXF1ZXN0UkVTVCAoKV1cIik7XG5cbiAgICBpZiAoISh0aGlzIGluc3RhbmNlb2YgQWx0aVJlcXVlc3RSRV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VNfX1wiLFxuICAgICAgICAgICAgaW5wdXQgOiB7XG4gICAgICAgICAgICAgICAgcG9pbnQgOiBcIiZ6b25seT1fX1pPTkxZX19cIixcbiAgICAgICAgICAgICAgICBwcm9maWwgOiBcIiZzYW1wbGluZz1fX1NBTVBMSU5HX19cIlxuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBwb3N0IDoge1xuICAgICAgICAgICAgLy8gRklYTUUgb24gcmV0aXJlIGxlIHBhcmFtICdkZWxpbWl0ZXInIDogZGVsaW1pdGVyPSdfX0RFTElNSVRFUl9fJ1xcblxcXG4gICAgICAgICAgICB2YWx1ZSA6IFwibG9uPV9fTE9OX19cXG5cIiArXG4gICAgICAgICAgICAgICAgXCJsYXQ9X19MQVRfX1xcblwiICtcbiAgICAgICAgICAgICAgICBcImluZGVudD1fX0lOREVOVF9fXFxuXCIgK1xuICAgICAgICAgICAgICAgIFwiY3JzPSdfX0NSU19fJ1xcblwiICtcbiAgICAgICAgICAgICAgICBcInJlc291cmNlPSdfX1JFU09VUkNFX18nXFxuXCIgK1xuICAgICAgICAgICAgICAgIFwibWVhc3VyZXM9J19fTUVBU1VSRVNfXydcXG5cIixcbiAgICAgICAgICAgIGlucHV0IDoge1xuICAgICAgICAgICAgICAgIHBvaW50IDogXCJ6b25seT1fX1pPTkxZX19cXG5cIixcbiAgICAgICAgICAgICAgICBwcm9maWwgOiBcInNhbXBsaW5nPV9fU0FNUExJTkdfX1wiXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogQ29uc3RydWN0aW9uIGRlIGxhIHJlcXXDqnRlLlxuICAgICAqXG4gICAgICogQGV4YW1wbGVcbiAgICAgKiAvLyBHRVQgIG91dCA6IGxvbj0wLjIzNjcsMi4xNTcwJmxhdD00OC4wNTUxLDQ2LjYwNzcmZGVsaW1pdGVyPSwmaW5kZW50PXRydWUmem9ubHk9dHJ1ZSZjcnM9J0NSUzo4NCdcbiAg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9PT0gXCJHRVRcIikge1xuICAgICAgICAgICAgbXlUZW1wbGF0ZSA9IHRoaXMudGVtcGxhdGUuZ2V0O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwiTm8gb3RoZXIgSFRUUCBtZXRob2Qgc3VwcG9ydGVkIGJ5IHRoZSBzZXJ2aWNlICFcIik7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgdG1wbCA9IG51bGw7XG4gICAgICAgIGlmICh0aGlzLkRhdGFPYmplY3QuQ0xBU1NOQU1FID09PSBcIkFsdGlFbGV2YXRpb25SZXF1ZXN0XCIpIHtcbiAgICAgICAgICAgIHRtcGwgPSBteVRlbXBsYXRlLmlucHV0LnBvaW50O1xuICAgICAgICAgICAgcmV0dXJuIHRtcGwucmVwbGFjZSgvX19aT05MWV9fL2csIHRoaXMuRGF0YU9iamVjdC56b25seS50b1N0cmluZygpKTtcbiAgICAgICAgfSBlbHNlIGlmICh0aGlzLkRhdGFPYmplY3QuQ0xBU1NOQU1FID09PSBcIkFsdGlQcm9maWxSZXF1ZXN0XCIpIHtcbiAgICAgICAgICAgIHRtcGwgPSBteVRlbXBsYXRlLmlucHV0LnByb2ZpbDtcbiAgICAgICAgICAgIHJldHVybiB0bXBsLnJlcGxhY2UoL19fU0FNUExJTkdfXy9nLCB0aGlzLkRhdGFPYmplY3Quc2FtcGxpbmcpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwiTm8gb3RoZXIgb2JqZWN0IHN1cHBvcnRlZCB0aGFuIGVsZXZhdGlvbiBvciBwcm9maWwgIT9cIik7XG4gICAgICAgIH1cbiAgICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBBbHRpUmVxdWVzdFJFU1Q7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Request/AltiRequestREST.js\n"); /***/ }), @@ -416,7 +416,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Uti /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _AltiRequest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AltiRequest */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiRequest.js\");\n\n\n\n\n/**\n * @classdesc\n *\n * Classe de gestion des param. des requêtes de type POINT du service altimetrique.\n *\n * @constructor\n * @alias Gp.Services.Alti.Request.AltiElevationRequest\n * @param {Object} options - options\n * @param {Boolean} options.zonly - false|true\n *\n * @private\n */\nfunction AltiElevationRequest (options) {\n if (!(this instanceof AltiElevationRequest)) {\n throw new TypeError(\"AltiElevationRequest constructor cannot be called as a function.\");\n }\n\n /**\n * Nom de la classe (heritage)\n */\n this.CLASSNAME = \"AltiElevationRequest\";\n\n // appel du constructeur par heritage\n _AltiRequest__WEBPACK_IMPORTED_MODULE_1__[\"default\"].apply(this, arguments);\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger();\n this.logger.trace(\"[Constructeur AltiElevationRequest ()]\");\n\n /**\n * Z uniquement.\n * true|false\n */\n this.zonly = this.options.zonly || false; // test des options héritées !\n}\n\n/**\n * @lends module:AltiElevationRequest#\n */\n\nAltiElevationRequest.prototype = Object.create(_AltiRequest__WEBPACK_IMPORTED_MODULE_1__[\"default\"].prototype, {\n\n /**\n * Setter/getter pour \"zonly\"\n */\n zonly : {\n /** getter */\n get : function () {\n return this._zonly;\n },\n /** setter */\n set : function (z) {\n this._zonly = z;\n }\n }\n\n});\n\n/**\n * Constructeur (alias)\n */\nAltiElevationRequest.prototype.constructor = AltiElevationRequest;\n\n/**\n * Tableau de clefs/valeurs pour param.\n *\n * @returns {Array}\n */\nAltiElevationRequest.prototype.getData = function () {\n // par glop..., appel de AltiRequest::getData () !\n var map = [];\n map.push({\n k : \"lon\",\n v : this.getLon()\n });\n map.push({\n k : \"lat\",\n v : this.getLat()\n });\n // map.push({k : \"delimiter\", v : this.delimiter}); // FIXME on retire le param \"delimiter\"\n map.push({\n k : \"indent\",\n v : this.indent\n });\n map.push({\n k : \"crs\",\n v : this.crs\n });\n map.push({\n k : \"zonly\",\n v : this.zonly\n });\n map.push({\n k : \"format\",\n v : this.format\n });\n\n return map;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AltiElevationRequest);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQWx0aS9SZXF1ZXN0L21vZGVsL0FsdGlFbGV2YXRpb25SZXF1ZXN0LmpzPzNkM2YiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUN1RDtBQUNmOztBQUV4QztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFdBQVcsT0FBTztBQUNsQixXQUFXLFFBQVE7QUFDbkI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSxJQUFJLG9EQUFXOztBQUVmLGtCQUFrQiw4REFBTTtBQUN4Qjs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDZDQUE2QztBQUM3Qzs7QUFFQTtBQUNBO0FBQ0E7O0FBRUEsK0NBQStDLG9EQUFXOztBQUUxRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFN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C8vIEZJWE1FIG9uIHJldGlyZSBsZSBwYXJhbSBcImRlbGltaXRlclwiXG4gICAgbWFwLnB1c2goe1xuICAgICAgICBrIDogXCJpbmRlbnRcIixcbiAgICAgICAgdiA6IHRoaXMuaW5kZW50XG4gICAgfSk7XG4gICAgbWFwLnB1c2goe1xuICAgICAgICBrIDogXCJjcnNcIixcbiAgICAgICAgdiA6IHRoaXMuY3JzXG4gICAgfSk7XG4gICAgbWFwLnB1c2goe1xuICAgICAgICBrIDogXCJ6b25seVwiLFxuICAgICAgICB2IDogdGhpcy56b25seVxuICAgIH0pO1xuICAgIG1hcC5wdXNoKHtcbiAgICAgICAgayA6IFwiZm9ybWF0XCIsXG4gICAgICAgIHYgOiB0aGlzLmZvcm1hdFxuICAgIH0pO1xuXG4gICAgcmV0dXJuIG1hcDtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IEFsdGlFbGV2YXRpb25SZXF1ZXN0O1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiElevationRequest.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _AltiRequest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AltiRequest */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiRequest.js\");\n\n\n\n\n/**\n * @classdesc\n *\n * Classe de gestion des param. des requêtes de type POINT du service altimetrique.\n *\n * @constructor\n * @alias Gp.Services.Alti.Request.AltiElevationRequest\n * @param {Object} options - options\n * @param {Boolean} options.zonly - false|true\n *\n * @private\n */\nfunction AltiElevationRequest (options) {\n if (!(this instanceof AltiElevationRequest)) {\n throw new TypeError(\"AltiElevationRequest constructor cannot be called as a function.\");\n }\n\n /**\n * Nom de la classe (heritage)\n */\n this.CLASSNAME = \"AltiElevationRequest\";\n\n // appel du constructeur par heritage\n _AltiRequest__WEBPACK_IMPORTED_MODULE_1__[\"default\"].apply(this, arguments);\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger();\n this.logger.trace(\"[Constructeur AltiElevationRequest ()]\");\n\n /**\n * Z uniquement.\n * true|false\n */\n this.zonly = this.options.zonly || false; // test des options héritées !\n}\n\n/**\n * @lends module:AltiElevationRequest#\n */\n\nAltiElevationRequest.prototype = Object.create(_AltiRequest__WEBPACK_IMPORTED_MODULE_1__[\"default\"].prototype, {\n\n /**\n * Setter/getter pour \"zonly\"\n */\n zonly : {\n /** getter */\n get : function () {\n return this._zonly;\n },\n /** setter */\n set : function (z) {\n this._zonly = z;\n }\n }\n\n});\n\n/**\n * Constructeur (alias)\n */\nAltiElevationRequest.prototype.constructor = AltiElevationRequest;\n\n/**\n * Tableau de clefs/valeurs pour param.\n *\n * @returns {Array}\n */\nAltiElevationRequest.prototype.getData = function () {\n // par glop..., appel de AltiRequest::getData () !\n var map = [];\n map.push({\n k : \"lon\",\n v : this.getLon()\n });\n map.push({\n k : \"lat\",\n v : this.getLat()\n });\n // map.push({k : \"delimiter\", v : this.delimiter}); // FIXME on retire le param \"delimiter\"\n map.push({\n k : \"indent\",\n v : this.indent\n });\n map.push({\n k : \"crs\",\n v : this.crs\n });\n map.push({\n k : \"zonly\",\n v : this.zonly\n });\n map.push({\n k : \"format\",\n v : this.format\n });\n map.push({\n k : \"resource\",\n v : this.resource\n });\n\n return map;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AltiElevationRequest);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmM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NlXG4gICAgfSk7XG5cbiAgICByZXR1cm4gbWFwO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgQWx0aUVsZXZhdGlvblJlcXVlc3Q7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiElevationRequest.js\n"); /***/ }), @@ -428,7 +428,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Uti /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _AltiRequest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AltiRequest */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiRequest.js\");\n\n\n\n\n/**\n * @classdesc\n * Classe de gestion des param. des requêtes de type PROFIL du service altimetrique.\n *\n * @constructor\n * @alias Gp.Services.Alti.Request.AltiProfilRequest\n * @param {Object} options - options\n * @param {String} options.sampling - 3\n *\n * @private\n */\nfunction AltiProfilRequest (options) {\n if (!(this instanceof AltiProfilRequest)) {\n throw new TypeError(\"AltiProfilRequest constructor cannot be called as a function.\");\n }\n\n /**\n * Nom de la classe (heritage)\n */\n this.CLASSNAME = \"AltiProfilRequest\";\n\n // appel du constructeur par heritage\n _AltiRequest__WEBPACK_IMPORTED_MODULE_1__[\"default\"].apply(this, arguments);\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger();\n this.logger.trace(\"[Constructeur AltiProfilRequest ()]\");\n\n /**\n * Sampling\n * Par defaut, 3\n */\n this.sampling = this.options.sampling || 3; // test des options héritées !\n}\n\n/**\n * @lends module:AltiProfilRequest#\n */\n\nAltiProfilRequest.prototype = Object.create(_AltiRequest__WEBPACK_IMPORTED_MODULE_1__[\"default\"].prototype, {\n\n /**\n * Setter/getter pour \"sampling\"\n */\n sampling : {\n /** getter */\n get : function () {\n return this._sampling;\n },\n /** setter */\n set : function (value) {\n this._sampling = value;\n }\n }\n});\n\n/**\n * Constructeur (alias)\n */\nAltiProfilRequest.prototype.constructor = AltiProfilRequest;\n\n/**\n * Tableau de clefs/valeurs pour param.\n *\n * @returns {Object[]}\n */\nAltiProfilRequest.prototype.getData = function () {\n // par glop..., appel de AltiRequest::getData () !\n var map = [];\n map.push({\n k : \"lon\",\n v : this.getLon()\n });\n map.push({\n k : \"lat\",\n v : this.getLat()\n });\n // map.push({k : \"delimiter\", v : this.delimiter}); // FIXME on retire le param \"delimiter\"\n map.push({\n k : \"indent\",\n v : this.indent\n });\n map.push({\n k : \"crs\",\n v : this.crs\n });\n map.push({\n k : \"sampling\",\n v : this.sampling\n });\n map.push({\n k : \"format\",\n v : this.format\n });\n\n return map;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AltiProfilRequest);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQWx0aS9SZXF1ZXN0L21vZGVsL0FsdGlQcm9maWxSZXF1ZXN0LmpzP2FmZjkiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUN1RDtBQUNmOztBQUV4QztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEIsV0FBVyxPQUFPO0FBQ2xCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0EsSUFBSSxvREFBVzs7QUFFZixrQkFBa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NoKHtcbiAgICAgICAgayA6IFwibGF0XCIsXG4gICAgICAgIHYgOiB0aGlzLmdldExhdCgpXG4gICAgfSk7XG4gICAgLy8gbWFwLnB1c2goe2sgOiBcImRlbGltaXRlclwiLCB2IDogdGhpcy5kZWxpbWl0ZXJ9KTsgLy8gRklYTUUgb24gcmV0aXJlIGxlIHBhcmFtIFwiZGVsaW1pdGVyXCJcbiAgICBtYXAucHVzaCh7XG4gICAgICAgIGsgOiBcImluZGVudFwiLFxuICAgICAgICB2IDogdGhpcy5pbmRlbnRcbiAgICB9KTtcbiAgICBtYXAucHVzaCh7XG4gICAgICAgIGsgOiBcImNyc1wiLFxuICAgICAgICB2IDogdGhpcy5jcnNcbiAgICB9KTtcbiAgICBtYXAucHVzaCh7XG4gICAgICAgIGsgOiBcInNhbXBsaW5nXCIsXG4gICAgICAgIHYgOiB0aGlzLnNhbXBsaW5nXG4gICAgfSk7XG4gICAgbWFwLnB1c2goe1xuICAgICAgICBrIDogXCJmb3JtYXRcIixcbiAgICAgICAgdiA6IHRoaXMuZm9ybWF0XG4gICAgfSk7XG5cbiAgICByZXR1cm4gbWFwO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgQWx0aVByb2ZpbFJlcXVlc3Q7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiProfilRequest.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _AltiRequest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AltiRequest */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiRequest.js\");\n\n\n\n\n/**\n * @classdesc\n * Classe de gestion des param. des requêtes de type PROFIL du service altimetrique.\n *\n * @constructor\n * @alias Gp.Services.Alti.Request.AltiProfilRequest\n * @param {Object} options - options\n * @param {String} options.sampling - 3\n *\n * @private\n */\nfunction AltiProfilRequest (options) {\n if (!(this instanceof AltiProfilRequest)) {\n throw new TypeError(\"AltiProfilRequest constructor cannot be called as a function.\");\n }\n\n /**\n * Nom de la classe (heritage)\n */\n this.CLASSNAME = \"AltiProfilRequest\";\n\n // appel du constructeur par heritage\n _AltiRequest__WEBPACK_IMPORTED_MODULE_1__[\"default\"].apply(this, arguments);\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger();\n this.logger.trace(\"[Constructeur AltiProfilRequest ()]\");\n\n /**\n * Sampling\n * Par defaut, 3\n */\n this.sampling = this.options.sampling || 3; // test des options héritées !\n}\n\n/**\n * @lends module:AltiProfilRequest#\n */\n\nAltiProfilRequest.prototype = Object.create(_AltiRequest__WEBPACK_IMPORTED_MODULE_1__[\"default\"].prototype, {\n\n /**\n * Setter/getter pour \"sampling\"\n */\n sampling : {\n /** getter */\n get : function () {\n return this._sampling;\n },\n /** setter */\n set : function (value) {\n this._sampling = value;\n }\n }\n});\n\n/**\n * Constructeur (alias)\n */\nAltiProfilRequest.prototype.constructor = AltiProfilRequest;\n\n/**\n * Tableau de clefs/valeurs pour param.\n *\n * @returns {Object[]}\n */\nAltiProfilRequest.prototype.getData = function () {\n // par glop..., appel de AltiRequest::getData () !\n var map = [];\n map.push({\n k : \"lon\",\n v : this.getLon()\n });\n map.push({\n k : \"lat\",\n v : this.getLat()\n });\n // map.push({k : \"delimiter\", v : this.delimiter}); // FIXME on retire le param \"delimiter\"\n map.push({\n k : \"indent\",\n v : this.indent\n });\n map.push({\n k : \"crs\",\n v : this.crs\n });\n map.push({\n k : \"sampling\",\n v : this.sampling\n });\n map.push({\n k : \"format\",\n v : this.format\n });\n map.push({\n k : \"resource\",\n v : this.resource\n });\n\n return map;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AltiPro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AgayA6IFwiZm9ybWF0XCIsXG4gICAgICAgIHYgOiB0aGlzLmZvcm1hdFxuICAgIH0pO1xuICAgIG1hcC5wdXNoKHtcbiAgICAgICAgayA6IFwicmVzb3VyY2VcIixcbiAgICAgICAgdiA6IHRoaXMucmVzb3VyY2VcbiAgICB9KTtcblxuICAgIHJldHVybiBtYXA7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBBbHRpUHJvZmlsUmVxdWVzdDtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiProfilRequest.js\n"); /***/ }), @@ -440,7 +440,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Uti /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n\n\n\n/**\n * @classdesc\n * Classe de gestion des param. des requêtes du service altimetrique.\n *\n * @constructor\n * @alias Gp.Services.Alti.Request.AltiRequest\n * @param {Object} options - options\n * @param {Object} options.positions - tableau de coordonnées lon/lat\n * @param {String} options.delimiter - \"|\"\n * @param {Boolean} options.indent - false|true\n * @param {String} options.crs - \"CRS:84\"\n * @param {String} options.format - \"JSON|XML\"\n *\n * @private\n */\nfunction AltiRequest (options) {\n if (!(this instanceof AltiRequest)) {\n throw new TypeError(\"AltiRequest constructor cannot be called as a function.\");\n }\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger();\n this.logger.trace(\"[Constructeur AltiRequest ()]\");\n\n /**\n * Options en paramêtres du constructeur.\n */\n this.options = options || {};\n\n /**\n * Liste des coordonnées.\n * @example\n * var c = [{lon : \"\", lat : \"\"}, {lon : \"\", lat : \"\"}];\n */\n this.positions = this.options.positions || [];\n\n /**\n * Caractère de séparation.\n * Par defaut, \"|\".\n */\n this.delimiter = this.options.delimiter || \"|\";\n\n /**\n * Indentation.\n * true|false\n */\n this.indent = this.options.indent || false;\n\n /**\n * Projection.\n * Par defaut, CRS:84.\n */\n this.crs = this.options.crs || \"CRS:84\";\n\n /**\n * format de sortie.\n * Par defaut, \"json\".\n */\n this.format = this.options.format || \"json\";\n}\n\n/**\n * CLASSNAME\n */\nAltiRequest.CLASSNAME = \"AltiRequest\";\n\nAltiRequest.prototype = {\n\n /**\n * @lends module:AltiRequest#\n */\n\n /**\n * Constructeur (alias)\n */\n constructor : AltiRequest,\n\n /**\n * Ajout d\"une liste de coordonnées.\n *\n * @param {Object[]} lstPosition - liste de positions\n * @example\n * obj.setPositions ([{lon : \"0.15\", lat : \"0.15\"}, {lon : \"1.15\", lat : \"1.15\"}]);\n */\n setPositions : function (lstPosition) {\n var positions = [];\n for (var i = 0; i < lstPosition.length; i++) {\n var o = lstPosition[i];\n if (o.lon && o.lat) {\n positions.push(o);\n }\n }\n\n this.positions = positions;\n },\n\n /**\n * Liste des coordonnées.\n *\n * @param {Int} pos - position\n * @returns {positions}\n * @example\n * obj.getPositions (); // [{lon : \"\", lat : \"\"}, {lon : \"\", lat : \"\"}]\n * obj.getPositions (0); // [{lon : \"\", lat : \"\"}]\n */\n getPositions : function (pos) {\n // FIXME test if not a number !?\n if (!pos) {\n return this.positions;\n }\n\n var index = this.positions.length - 1;\n if (pos > index || pos < index) {\n this.logger.warn(\"index out of range !\");\n return this.positions;\n }\n\n return this.positions[pos];\n },\n\n /**\n * Ajout d\"une liste de coordonnées.\n *\n * @param {Object[]} lstPosition - liste de positions\n * @example\n * obj.addPositions ([{lon : \"0.15\", lat : \"0.15\"}, {lon : \"1.15\", lat : \"1.15\"}]);\n */\n addPositions : function (lstPosition) {\n for (var i = 0; i < lstPosition.length; i++) {\n var o = lstPosition[i];\n if (o.lon && o.lat) {\n this.positions.push(lstPosition[i]);\n }\n }\n },\n\n /**\n * Retourne la liste des longitudes avec un caractère de séparation.\n *\n * @returns {String} - une liste de longitudes\n * @example\n * // out : 0.2367|2.1570|43.789|...\n */\n getLon : function () {\n var lstLon = [];\n for (var i = 0; i < this.positions.length; i++) {\n lstLon.push(this.positions[i].lon);\n }\n this.logger.trace(lstLon);\n return lstLon.join(this.delimiter);\n },\n\n /**\n * Retourne la liste des lattitudes avec un caractère de séparation.\n *\n * @returns {String} - une liste de lattitudes\n * @example\n * // out : 0.2367|2.1570|43.789|...\n */\n getLat : function () {\n var lstLat = [];\n for (var i = 0; i < this.positions.length; i++) {\n lstLat.push(this.positions[i].lat);\n }\n this.logger.trace(lstLat);\n return lstLat.join(this.delimiter);\n }\n\n};\n\n/**\n * Tableau de clefs/valeurs pour param.\n *\n * @returns {Object[]}\n */\nAltiRequest.prototype.getData = function () {\n var map = [];\n\n map.push({\n k : \"lon\",\n v : this.getLon()\n });\n map.push({\n k : \"lat\",\n v : this.getLat()\n });\n map.push({\n k : \"delimiter\",\n v : this.delimiter\n });\n map.push({\n k : \"indent\",\n v : this.indent\n });\n map.push({\n k : \"crs\",\n v : this.crs\n });\n map.push({\n k : \"format\",\n v : this.format\n });\n\n return map;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AltiRequest);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQWx0aS9SZXF1ZXN0L21vZGVsL0FsdGlSZXF1ZXN0LmpzPzAyMmMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ3VEOztBQUV2RDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEIsV0FBVyxPQUFPO0FBQ2xCLFdBQVcs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AgICAgICAgICB2YXIgbyA9IGxzdFBvc2l0aW9uW2ldO1xuICAgICAgICAgICAgaWYgKG8ubG9uICYmIG8ubGF0KSB7XG4gICAgICAgICAgICAgICAgdGhpcy5wb3NpdGlvbnMucHVzaChsc3RQb3NpdGlvbltpXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogUmV0b3VybmUgbGEgbGlzdGUgZGVzIGxvbmdpdHVkZXMgYXZlYyB1biBjYXJhY3TDqHJlIGRlIHPDqXBhcmF0aW9uLlxuICAgICAqXG4gICAgICogQHJldHVybnMge1N0cmluZ30gLSB1bmUgbGlzdGUgZGUgbG9uZ2l0dWRlc1xuICAgICAqIEBleGFtcGxlXG4gICAgICogLy8gb3V0IDogMC4yMzY3fDIuMTU3MHw0My43ODl8Li4uXG4gICAgICovXG4gICAgZ2V0TG9uIDogZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgbHN0TG9uID0gW107XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGhpcy5wb3NpdGlvbnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIGxzdExvbi5wdXNoKHRoaXMucG9zaXRpb25zW2ldLmxvbik7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5sb2dnZXIudHJhY2UobHN0TG9uKTtcbiAgICAgICAgcmV0dXJuIGxzdExvbi5qb2luKHRoaXMuZGVsaW1pdGVyKTtcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogUmV0b3VybmUgbGEgbGlzdGUgZGVzIGxhdHRpdHVkZXMgYXZlYyB1biBjYXJhY3TDqHJlIGRlIHPDqXBhcmF0aW9uLlxuICAgICAqXG4gICAgICogQHJldHVybnMge1N0cmluZ30gLSB1bmUgbGlzdGUgZGUgbGF0dGl0dWRlc1xuICAgICAqIEBleGFtcGxlXG4gICAgICogLy8gb3V0IDogMC4yMzY3fDIuMTU3MHw0My43ODl8Li4uXG4gICAgICovXG4gICAgZ2V0TGF0IDogZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgbHN0TGF0ID0gW107XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGhpcy5wb3NpdGlvbnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIGxzdExhdC5wdXNoKHRoaXMucG9zaXRpb25zW2ldLmxhdCk7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5sb2dnZXIudHJhY2UobHN0TGF0KTtcbiAgICAgICAgcmV0dXJuIGxzdExhdC5qb2luKHRoaXMuZGVsaW1pdGVyKTtcbiAgICB9XG5cbn07XG5cbi8qKlxuICogVGFibGVhdSBkZSBjbGVmcy92YWxldXJzIHBvdXIgcGFyYW0uXG4gKlxuICogQHJldHVybnMge09iamVjdFtdfVxuICovXG5BbHRpUmVxdWVzdC5wcm90b3R5cGUuZ2V0RGF0YSA9IGZ1bmN0aW9uICgpIHtcbiAgICB2YXIgbWFwID0gW107XG5cbiAgICBtYXAucHVzaCh7XG4gICAgICAgIGsgOiBcImxvblwiLFxuICAgICAgICB2IDogdGhpcy5nZXRMb24oKVxuICAgIH0pO1xuICAgIG1hcC5wdXNoKHtcbiAgICAgICAgayA6IFwibGF0XCIsXG4gICAgICAgIHYgOiB0aGlzLmdldExhdCgpXG4gICAgfSk7XG4gICAgbWFwLnB1c2goe1xuICAgICAgICBrIDogXCJkZWxpbWl0ZXJcIixcbiAgICAgICAgdiA6IHRoaXMuZGVsaW1pdGVyXG4gICAgfSk7XG4gICAgbWFwLnB1c2goe1xuICAgICAgICBrIDogXCJpbmRlbnRcIixcbiAgICAgICAgdiA6IHRoaXMuaW5kZW50XG4gICAgfSk7XG4gICAgbWFwLnB1c2goe1xuICAgICAgICBrIDogXCJjcnNcIixcbiAgICAgICAgdiA6IHRoaXMuY3JzXG4gICAgfSk7XG4gICAgbWFwLnB1c2goe1xuICAgICAgICBrIDogXCJmb3JtYXRcIixcbiAgICAgICAgdiA6IHRoaXMuZm9ybWF0XG4gICAgfSk7XG5cbiAgICByZXR1cm4gbWFwO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgQWx0aVJlcXVlc3Q7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiRequest.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n\n\n\n/**\n * @classdesc\n * Classe de gestion des param. des requêtes du service altimetrique.\n *\n * @constructor\n * @alias Gp.Services.Alti.Request.AltiRequest\n * @param {Object} options - options\n * @param {Object} options.positions - tableau de coordonnées lon/lat\n * @param {String} options.delimiter - \"|\"\n * @param {Boolean} options.indent - false|true\n * @param {String} options.crs - \"CRS:84\"\n * @param {String} options.format - \"JSON|XML\"\n *\n * @private\n */\nfunction AltiRequest (options) {\n if (!(this instanceof AltiRequest)) {\n throw new TypeError(\"AltiRequest constructor cannot be called as a function.\");\n }\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger();\n this.logger.trace(\"[Constructeur AltiRequest ()]\");\n\n /**\n * Options en paramêtres du constructeur.\n */\n this.options = options || {};\n\n /**\n * Liste des coordonnées.\n * @example\n * var c = [{lon : \"\", lat : \"\"}, {lon : \"\", lat : \"\"}];\n */\n this.positions = this.options.positions || [];\n\n /**\n * Caractère de séparation.\n * Par defaut, \"|\".\n */\n this.delimiter = this.options.delimiter || \"|\";\n\n /**\n * Indentation.\n * true|false\n */\n this.indent = this.options.indent || false;\n\n /**\n * Projection.\n * Par defaut, CRS:84.\n */\n this.crs = this.options.crs || \"CRS:84\";\n\n /**\n * format de sortie.\n * Par defaut, \"json\".\n */\n this.format = this.options.format || \"json\";\n\n /*\n * Ressource utilisée\n */\n this.resource = this.options.resource;\n\n /**\n * Réponse détaillée (source & accuracy)\n * true|false\n */\n this.measures = this.options.measures || false;\n}\n\n/**\n * CLASSNAME\n */\nAltiRequest.CLASSNAME = \"AltiRequest\";\n\nAltiRequest.prototype = {\n\n /**\n * @lends module:AltiRequest#\n */\n\n /**\n * Constructeur (alias)\n */\n constructor : AltiRequest,\n\n /**\n * Ajout d\"une liste de coordonnées.\n *\n * @param {Object[]} lstPosition - liste de positions\n * @example\n * obj.setPositions ([{lon : \"0.15\", lat : \"0.15\"}, {lon : \"1.15\", lat : \"1.15\"}]);\n */\n setPositions : function (lstPosition) {\n var positions = [];\n for (var i = 0; i < lstPosition.length; i++) {\n var o = lstPosition[i];\n if (o.lon && o.lat) {\n positions.push(o);\n }\n }\n\n this.positions = positions;\n },\n\n /**\n * Liste des coordonnées.\n *\n * @param {Int} pos - position\n * @returns {positions}\n * @example\n * obj.getPositions (); // [{lon : \"\", lat : \"\"}, {lon : \"\", lat : \"\"}]\n * obj.getPositions (0); // [{lon : \"\", lat : \"\"}]\n */\n getPositions : function (pos) {\n // FIXME test if not a number !?\n if (!pos) {\n return this.positions;\n }\n\n var index = this.positions.length - 1;\n if (pos > index || pos < index) {\n this.logger.warn(\"index out of range !\");\n return this.positions;\n }\n\n return this.positions[pos];\n },\n\n /**\n * Ajout d\"une liste de coordonnées.\n *\n * @param {Object[]} lstPosition - liste de positions\n * @example\n * obj.addPositions ([{lon : \"0.15\", lat : \"0.15\"}, {lon : \"1.15\", lat : \"1.15\"}]);\n */\n addPositions : function (lstPosition) {\n for (var i = 0; i < lstPosition.length; i++) {\n var o = lstPosition[i];\n if (o.lon && o.lat) {\n this.positions.push(lstPosition[i]);\n }\n }\n },\n\n /**\n * Retourne la liste des longitudes avec un caractère de séparation.\n *\n * @returns {String} - une liste de longitudes\n * @example\n * // out : 0.2367|2.1570|43.789|...\n */\n getLon : function () {\n var lstLon = [];\n for (var i = 0; i < this.positions.length; i++) {\n lstLon.push(this.positions[i].lon);\n }\n this.logger.trace(lstLon);\n return lstLon.join(this.delimiter);\n },\n\n /**\n * Retourne la liste des lattitudes avec un caractère de séparation.\n *\n * @returns {String} - une liste de lattitudes\n * @example\n * // out : 0.2367|2.1570|43.789|...\n */\n getLat : function () {\n var lstLat = [];\n for (var i = 0; i < this.positions.length; i++) {\n lstLat.push(this.positions[i].lat);\n }\n this.logger.trace(lstLat);\n return lstLat.join(this.delimiter);\n }\n\n};\n\n/**\n * Tableau de clefs/valeurs pour param.\n *\n * @returns {Object[]}\n */\nAltiRequest.prototype.getData = function () {\n var map = [];\n\n map.push({\n k : \"lon\",\n v : this.getLon()\n });\n map.push({\n k : \"lat\",\n v : this.getLat()\n });\n map.push({\n k : \"delimiter\",\n v : this.delimiter\n });\n map.push({\n k : \"indent\",\n v : this.indent\n });\n map.push({\n k : \"crs\",\n v : this.crs\n });\n map.push({\n k : \"format\",\n v : this.format\n });\n\n return map;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AltiRequest);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQWx0aS9SZXF1ZXN0L21vZGVsL0FsdGlSZXF1ZXN0LmpzPzAyMmMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ3VEOztBQUV2RDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEIsV0FBVyxPQUFPO0FBQ2xCLFdBQVcsT0FBTztBQUNsQixXQUFXLFFBQVE7QUFDbkIsV0FBVyxPQUFPO0FBQ2xCLFdBQVcsT0FBTztBQUNsQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQSxrQkFBa0IsOERBQU07QUFDeEI7O0FBRUE7Q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ICAgICAgayA6IFwiaW5kZW50XCIsXG4gICAgICAgIHYgOiB0aGlzLmluZGVudFxuICAgIH0pO1xuICAgIG1hcC5wdXNoKHtcbiAgICAgICAgayA6IFwiY3JzXCIsXG4gICAgICAgIHYgOiB0aGlzLmNyc1xuICAgIH0pO1xuICAgIG1hcC5wdXNoKHtcbiAgICAgICAgayA6IFwiZm9ybWF0XCIsXG4gICAgICAgIHYgOiB0aGlzLmZvcm1hdFxuICAgIH0pO1xuXG4gICAgcmV0dXJuIG1hcDtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IEFsdGlSZXF1ZXN0O1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Request/model/AltiRequest.js\n"); /***/ }), @@ -452,7 +452,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Uti /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _Formats_XML__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Formats/XML */ \"./node_modules/geoportal-access-lib/src/Formats/XML.js\");\n/* harmony import */ var _Formats_AltiResponseReader__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Formats/AltiResponseReader */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Formats/AltiResponseReader.js\");\n/* harmony import */ var _model_AltiResponse__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./model/AltiResponse */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Response/model/AltiResponse.js\");\n/* harmony import */ var _model_Elevation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./model/Elevation */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Response/model/Elevation.js\");\n/**\n * Factory pour générer une reponse JSON à partir d'un XML ou d'un JSON\n * (Factory)\n *\n * @module AltiResponseFactory\n * @private\n * @alias Gp.Services.Alti.Response.AltiResponseFactory\n */\n\n\n\n\n\n\n\n\nvar AltiResponseFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Alti\n *\n * @example\n * var options = {\n * response :\n * outputFormat :\n * rawResponse :\n * scope :\n * onSuccess :\n * onError :\n * };\n *\n */\n build : function (options) {\n // logger\n var logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"AltiResponseFactory\");\n logger.trace([\"AltiResponseFactory::build()\"]);\n\n var data = null;\n\n if (options.response) {\n if (options.rawResponse) {\n logger.trace(\"analyze response : raw\");\n data = options.response;\n } else {\n switch (options.outputFormat) {\n case \"xml\":\n logger.trace(\"analyze response : xml\");\n\n try {\n var p = new _Formats_XML__WEBPACK_IMPORTED_MODULE_3__[\"default\"]({\n reader : _Formats_AltiResponseReader__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n });\n\n if (typeof options.response === \"string\") {\n p.setXMLString(options.response);\n } else {\n p.setXMLDoc(options.response);\n }\n\n data = p.parse();\n\n if (!data) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EXCEPTION_2\"));\n }\n } catch (e) {\n var message = e.message;\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"]({\n message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EXCEPTION\", message),\n status : 200,\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].TYPE_SRVERR\n }));\n return;\n }\n\n break;\n\n case \"json\":\n logger.trace(\"analyze response : json\");\n logger.trace(\"analyze response : \", typeof options.response);\n\n var JSONResponse = null;\n if (typeof options.response === \"string\") {\n JSONResponse = JSON.parse(options.response);\n } else {\n JSONResponse = options.response;\n }\n\n // le service renvoie t il une erreur ?\n if (JSONResponse && JSONResponse.error) {\n // ex. {\"error\": {\"code\": \"BAD_PARAMETER\",\"description\": \"The values () cannot be parsed as a valid longitude (double value such as -180 < lat < 180).\"}}\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"]({\n message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EXCEPTION\", JSONResponse.error.description),\n status : 200,\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].TYPE_SRVERR\n }));\n return;\n }\n\n // analyse de la reponse\n if (JSONResponse) {\n var elevations = JSONResponse.elevations;\n var altiResponse = new _model_AltiResponse__WEBPACK_IMPORTED_MODULE_5__[\"default\"]();\n var elevation;\n if (Array.isArray(elevations) && elevations.length) {\n for (var i = 0; i < elevations.length; i++) {\n elevation = new _model_Elevation__WEBPACK_IMPORTED_MODULE_6__[\"default\"]();\n\n if (typeof elevations[i] === \"object\") {\n // elevations[i] est un objet elevation\n if (elevations[i].lon) {\n elevation.lon = elevations[i].lon;\n }\n if (elevations[i].lat) {\n elevation.lat = elevations[i].lat;\n }\n if (elevations[i].z) {\n elevation.z = elevations[i].z;\n }\n if (elevations[i].acc) {\n elevation.acc = elevations[i].acc;\n }\n } else if (typeof elevations[i] === \"number\") {\n // elevations[i] est un nombre, dans le cas de zonly=true notamment\n elevation.z = elevations[i];\n }\n\n if (Array.isArray(altiResponse.elevations)) {\n altiResponse.elevations.push(elevation);\n }\n }\n }\n data = altiResponse;\n }\n\n if (!data) {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"]({\n message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_ANALYSE_2\"),\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].TYPE_UNKERR,\n status : -1\n }));\n return;\n }\n break;\n\n default:\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"]({\n message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_FORMAT_2\"),\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].TYPE_UNKERR,\n status : -1\n }));\n return;\n }\n\n // Si la réponse contenait une exception renvoyée par le service\n if (data.exceptionReport) {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"]({\n message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EXCEPTION\", data.exceptionReport),\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].TYPE_SRVERR,\n status : 200\n }));\n return;\n } else if (data.error) {\n var errorMess = data.error.description;\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"]({\n message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EXCEPTION\", errorMess),\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].TYPE_SRVERR,\n status : 200\n }));\n return;\n }\n }\n } else {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n return;\n }\n\n options.onSuccess.call(options.scope, data);\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AltiResponseFactory);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQWx0aS9SZXNwb25zZS9BbHRpUmVzcG9uc2VGYWN0b3J5LmpzP2QwZWYiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDb0Q7QUFDQTtBQUNRO0FBQ3JCO0FBQ3dCO0FBQ2Y7QUFDTjs7QUFFMUM7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGVBQWUsT0FBTztBQUN0QjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EscUJBQXFCLDhEQUFNO0FBQzNCOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsYUFBYTtBQUNiO0FBQ0E7QUFDQTs7QUFFQTtBQUNBLHdDQUF3QyxvREFBRztBQUMzQyx5Q0FBeUMsbUVBQWtCO0FBQzNELDZCQUE2Qjs7QUFFN0I7QUFDQTtBQUNBLDZCQUE2QjtBQUM3QjtBQUNBOztBQUVBOztBQUVBO0FBQ0EsZ0RBQWdELGdFQUFJ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lKSB7XG4gICAgICAgICAgICAgICAgbG9nZ2VyLnRyYWNlKFwiYW5hbHl6ZSByZXNwb25zZSA6IHJhd1wiKTtcbiAgICAgICAgICAgICAgICBkYXRhID0gb3B0aW9ucy5yZXNwb25zZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgc3dpdGNoIChvcHRpb25zLm91dHB1dEZvcm1hdCkge1xuICAgICAgICAgICAgICAgICAgICBjYXNlIFwieG1sXCI6XG4gICAgICAgICAgICAgICAgICAgICAgICBsb2dnZXIudHJhY2UoXCJhbmFseXplIHJlc3BvbnNlIDogeG1sXCIpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwID0gbmV3IFhNTCh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlYWRlciA6IEFsdGlSZXNwb25zZVJlYWRlclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBvcHRpb25zLnJlc3BvbnNlID09PSBcInN0cmluZ1wiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAuc2V0WE1MU3RyaW5nKG9wdGlvbnMucmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAuc2V0WE1MRG9jKG9wdGlvbnMucmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEgPSBwLnBhcnNlKCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWRhdGEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKE1SZXMuZ2V0TWVzc2FnZShcIlNFUlZJQ0VfUkVTUE9OU0VfRVhDRVBUSU9OXzJcIikpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbWVzc2FnZSA9IGUubWVzc2FnZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLm9uRXJyb3IuY2FsbChvcHRpb25zLnNjb3BlLCBuZXcgRXJyb3JTZXJ2aWNlKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA6IE1SZXMuZ2V0TWVzc2FnZShcIlNFUlZJQ0VfUkVTUE9OU0VfRVhDRVBUSU9OXCIsIG1lc3NhZ2UpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgOiAyMDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgOiBFcnJvclNlcnZpY2UuVFlQRV9TUlZFUlJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgICAgICBjYXNlIFwianNvblwiOlxuICAgICAgICAgICAgICAgICAgICAgICAgbG9nZ2VyLnRyYWNlKFwiYW5hbHl6ZSByZXNwb25zZSA6IGpzb25cIik7XG4gICAgICAgICAgICAgICAgICAgICAgICBsb2dnZXIudHJhY2UoXCJhbmFseXplIHJlc3BvbnNlIDogXCIsIHR5cGVvZiBvcHRpb25zLnJlc3BvbnNlKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIEpTT05SZXNwb25zZSA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMucmVzcG9uc2UgPT09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBKU09OUmVzcG9uc2UgPSBKU09OLnBhcnNlKG9wdGlvbnMucmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBKU09OUmVzcG9uc2UgPSBvcHRpb25zLnJlc3BvbnNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBsZSBzZXJ2aWNlIHJlbnZvaWUgdCBpbCB1bmUgZXJyZXVyID9cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChKU09OUmVzcG9uc2UgJiYgSlNPTlJlc3BvbnNlLmVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gZXguIHtcImVycm9yXCI6IHtcImNvZGVcIjogXCJCQURfUEFSQU1FVEVSXCIsXCJkZXNjcmlwdGlvblwiOiBcIlRoZSB2YWx1ZXMgKCkgY2Fubm90IGJlIHBhcnNlZCBhcyBhIHZhbGlkIGxvbmdpdHVkZSAoZG91YmxlIHZhbHVlIHN1Y2ggYXMgLTE4MCA8IGxhdCA8IDE4MCkuXCJ9fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnMub25FcnJvci5jYWxsKG9wdGlvbnMuc2NvcGUsIG5ldyBFcnJvclNlcnZpY2Uoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlIDogTVJlcy5nZXRNZXNzYWdlKFwiU0VSVklDRV9SRVNQT05TRV9FWENFUFRJT05cIiwgSlNPTlJlc3BvbnNlLmVycm9yLmRlc2NyaXB0aW9uKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzIDogMjAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlIDogRXJyb3JTZXJ2aWNlLlRZUEVfU1JWRVJSXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gYW5hbHlzZSBkZSBsYSByZXBvbnNlXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoSlNPTlJlc3BvbnNlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGVsZXZhdGlvbnMgPSBKU09OUmVzcG9uc2UuZWxldmF0aW9ucztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgYWx0aVJlc3BvbnNlID0gbmV3IEFsdGlSZXNwb25zZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBlbGV2YXRpb247XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoZWxldmF0aW9ucykgJiYgZWxldmF0aW9ucy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBlbGV2YXRpb25zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGV2YXRpb24gPSBuZXcgRWxldmF0aW9uKCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgZWxldmF0aW9uc1tpXSA9PT0gXCJvYmplY3RcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGVsZXZhdGlvbnNbaV0gZXN0IHVuIG9iamV0IGVsZXZhdGlvblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlbGV2YXRpb25zW2ldLmxvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGV2YXRpb24ubG9uID0gZWxldmF0aW9uc1tpXS5sb247XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlbGV2YXRpb25zW2ldLmxhdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGV2YXRpb24ubGF0ID0gZWxldmF0aW9uc1tpXS5sYXQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlbGV2YXRpb25zW2ldLnopIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxldmF0aW9uLnogPSBlbGV2YXRpb25zW2ldLno7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlbGV2YXRpb25zW2ldLmFjYykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGV2YXRpb24uYWNjID0gZWxldmF0aW9uc1tpXS5hY2M7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgZWxldmF0aW9uc1tpXSA9PT0gXCJudW1iZXJcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGVsZXZhdGlvbnNbaV0gZXN0IHVuIG5vbWJyZSwgZGFucyBsZSBjYXMgZGUgem9ubHk9dHJ1ZSBub3RhbW1lbnRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGV2YXRpb24ueiA9IGVsZXZhdGlvbnNbaV07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGFsdGlSZXNwb25zZS5lbGV2YXRpb25zKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsdGlSZXNwb25zZS5lbGV2YXRpb25zLnB1c2goZWxldmF0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhID0gYWx0aVJlc3BvbnNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWRhdGEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLm9uRXJyb3IuY2FsbChvcHRpb25zLnNjb3BlLCBuZXcgRXJyb3JTZXJ2aWNlKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA6IE1SZXMuZ2V0TWVzc2FnZShcIlNFUlZJQ0VfUkVTUE9OU0VfQU5BTFlTRV8yXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlIDogRXJyb3JTZXJ2aWNlLlRZUEVfVU5LRVJSLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgOiAtMVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5vbkVycm9yLmNhbGwob3B0aW9ucy5zY29wZSwgbmV3IEVycm9yU2VydmljZSh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA6IE1SZXMuZ2V0TWVzc2FnZShcIlNFUlZJQ0VfUkVTUE9OU0VfRk9STUFUXzJcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZSA6IEVycm9yU2VydmljZS5UWVBFX1VOS0VSUixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgOiAtMVxuICAgICAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIFNpIGxhIHLDqXBvbnNlIGNvbnRlbmFpdCB1bmUgZXhjZXB0aW9uIHJlbnZvecOpZSBwYXIgbGUgc2VydmljZVxuICAgICAgICAgICAgICAgIGlmIChkYXRhLmV4Y2VwdGlvblJlcG9ydCkge1xuICAgICAgICAgICAgICAgICAgICBvcHRpb25zLm9uRXJyb3IuY2FsbChvcHRpb25zLnNjb3BlLCBuZXcgRXJyb3JTZXJ2aWNlKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgOiBNUmVzLmdldE1lc3NhZ2UoXCJTRVJWSUNFX1JFU1BPTlNFX0VYQ0VQVElPTlwiLCBkYXRhLmV4Y2VwdGlvblJlcG9ydCksXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlIDogRXJyb3JTZXJ2aWNlLlRZUEVfU1JWRVJSLFxuICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzIDogMjAwXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZGF0YS5lcnJvcikge1xuICAgICAgICAgICAgICAgICAgICB2YXIgZXJyb3JNZXNzID0gZGF0YS5lcnJvci5kZXNjcmlwdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5vbkVycm9yLmNhbGwob3B0aW9ucy5zY29wZSwgbmV3IEVycm9yU2VydmljZSh7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlIDogTVJlcy5nZXRNZXNzYWdlKFwiU0VSVklDRV9SRVNQT05TRV9FWENFUFRJT05cIiwgZXJyb3JNZXNzKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgOiBFcnJvclNlcnZpY2UuVFlQRV9TUlZFUlIsXG4gICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgOiAyMDBcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgb3B0aW9ucy5vbkVycm9yLmNhbGwob3B0aW9ucy5zY29wZSwgbmV3IEVycm9yU2VydmljZShNUmVzLmdldE1lc3NhZ2UoXCJTRVJWSUNFX1JFU1BPTlNFX0VNUFRZXCIpKSk7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBvcHRpb25zLm9uU3VjY2Vzcy5jYWxsKG9wdGlvbnMuc2NvcGUsIGRhdGEpO1xuICAgIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IEFsdGlSZXNwb25zZUZhY3Rvcnk7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _Formats_XML__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Formats/XML */ \"./node_modules/geoportal-access-lib/src/Formats/XML.js\");\n/* harmony import */ var _Formats_AltiResponseReader__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Formats/AltiResponseReader */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Formats/AltiResponseReader.js\");\n/* harmony import */ var _model_AltiResponse__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./model/AltiResponse */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Response/model/AltiResponse.js\");\n/* harmony import */ var _model_Elevation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./model/Elevation */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Response/model/Elevation.js\");\n/**\n * Factory pour générer une reponse JSON à partir d'un XML ou d'un JSON\n * (Factory)\n *\n * @module AltiResponseFactory\n * @private\n * @alias Gp.Services.Alti.Response.AltiResponseFactory\n */\n\n\n\n\n\n\n\n\nvar AltiResponseFactory = {\n\n /**\n * interface unique\n *\n * @method build\n * @static\n * @param {Object} options - options definies dans le composant Alti\n *\n * @example\n * var options = {\n * response :\n * outputFormat :\n * rawResponse :\n * scope :\n * onSuccess :\n * onError :\n * };\n *\n */\n build : function (options) {\n // logger\n var logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"AltiResponseFactory\");\n logger.trace([\"AltiResponseFactory::build()\"]);\n\n var data = null;\n\n if (options.response) {\n if (options.rawResponse) {\n logger.trace(\"analyze response : raw\");\n data = options.response;\n } else {\n switch (options.outputFormat) {\n case \"xml\":\n logger.trace(\"analyze response : xml\");\n\n try {\n var p = new _Formats_XML__WEBPACK_IMPORTED_MODULE_3__[\"default\"]({\n reader : _Formats_AltiResponseReader__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n });\n\n if (typeof options.response === \"string\") {\n p.setXMLString(options.response);\n } else {\n p.setXMLDoc(options.response);\n }\n\n data = p.parse();\n\n if (!data) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EXCEPTION_2\"));\n }\n } catch (e) {\n var message = e.message;\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"]({\n message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EXCEPTION\", message),\n status : 200,\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].TYPE_SRVERR\n }));\n return;\n }\n\n break;\n\n case \"json\":\n logger.trace(\"analyze response : json\");\n logger.trace(\"analyze response : \", typeof options.response);\n\n var JSONResponse = null;\n if (typeof options.response === \"string\") {\n JSONResponse = JSON.parse(options.response);\n } else {\n JSONResponse = options.response;\n }\n\n // le service renvoie t il une erreur ?\n if (JSONResponse && JSONResponse.error) {\n // ex. {\"error\": {\"code\": \"BAD_PARAMETER\",\"description\": \"The values () cannot be parsed as a valid longitude (double value such as -180 < lat < 180).\"}}\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"]({\n message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EXCEPTION\", JSONResponse.error.description),\n status : 200,\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].TYPE_SRVERR\n }));\n return;\n }\n\n // analyse de la reponse\n if (JSONResponse) {\n var elevations = JSONResponse.elevations;\n var altiResponse = new _model_AltiResponse__WEBPACK_IMPORTED_MODULE_5__[\"default\"]();\n var elevation;\n if (Array.isArray(elevations) && elevations.length) {\n for (var i = 0; i < elevations.length; i++) {\n elevation = new _model_Elevation__WEBPACK_IMPORTED_MODULE_6__[\"default\"]();\n\n if (typeof elevations[i] === \"object\") {\n // elevations[i] est un objet elevation\n if (elevations[i].lon) {\n elevation.lon = elevations[i].lon;\n }\n if (elevations[i].lat) {\n elevation.lat = elevations[i].lat;\n }\n if (elevations[i].z) {\n elevation.z = elevations[i].z;\n }\n if (elevations[i].acc) {\n elevation.acc = elevations[i].acc;\n }\n if (elevations[i].measures) {\n elevation.measures = elevations[i].measures;\n }\n } else if (typeof elevations[i] === \"number\") {\n // elevations[i] est un nombre, dans le cas de zonly=true notamment\n elevation.z = elevations[i];\n }\n\n if (Array.isArray(altiResponse.elevations)) {\n altiResponse.elevations.push(elevation);\n }\n }\n }\n data = altiResponse;\n }\n\n if (!data) {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"]({\n message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_ANALYSE_2\"),\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].TYPE_UNKERR,\n status : -1\n }));\n return;\n }\n break;\n\n default:\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"]({\n message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_FORMAT_2\"),\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].TYPE_UNKERR,\n status : -1\n }));\n return;\n }\n\n // Si la réponse contenait une exception renvoyée par le service\n if (data.exceptionReport) {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"]({\n message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EXCEPTION\", data.exceptionReport),\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].TYPE_SRVERR,\n status : 200\n }));\n return;\n } else if (data.error) {\n var errorMess = data.error.description;\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"]({\n message : _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EXCEPTION\", errorMess),\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].TYPE_SRVERR,\n status : 200\n }));\n return;\n }\n }\n } else {\n options.onError.call(options.scope, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n return;\n }\n\n options.onSuccess.call(options.scope, data);\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AltiResponseFactory);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQWx0aS9SZXNwb25zZS9BbHRpUmVzcG9uc2VGYWN0b3J5LmpzP2QwZWYiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDb0Q7QUFDQTtBQUNRO0FBQ3JCO0FBQ3dCO0FBQ2Y7QUFDTjs7QUFFMUM7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGVBQWUsT0FBTztBQUN0QjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ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9cbiAgICBidWlsZCA6IGZ1bmN0aW9uIChvcHRpb25zKSB7XG4gICAgICAgIC8vIGxvZ2dlclxuICAgICAgICB2YXIgbG9nZ2VyID0gTG9nZ2VyLmdldExvZ2dlcihcIkFsdGlSZXNwb25zZUZhY3RvcnlcIik7XG4gICAgICAgIGxvZ2dlci50cmFjZShbXCJBbHRpUmVzcG9uc2VGYWN0b3J5OjpidWlsZCgpXCJdKTtcblxuICAgICAgICB2YXIgZGF0YSA9IG51bGw7XG5cbiAgICAgICAgaWYgKG9wdGlvbnMucmVzcG9uc2UpIHtcbiAgICAgICAgICAgIGlmIChvcHRpb25zLnJhd1Jlc3BvbnNlKSB7XG4gICAgICAgICAgICAgICAgbG9nZ2VyLnRyYWNlKFwiYW5hbHl6ZSByZXNwb25zZSA6IHJhd1wiKTtcbiAgICAgICAgICAgICAgICBkYXRhID0gb3B0aW9ucy5yZXNwb25zZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgc3dpdGNoIChvcHRpb25zLm91dHB1dEZvcm1hdCkge1xuICAgICAgICAgICAgICAgICAgICBjYXNlIFwieG1sXCI6XG4gICAgICAgICAgICAgICAgICAgICAgICBsb2dnZXIudHJhY2UoXCJhbmFseXplIHJlc3BvbnNlIDogeG1sXCIpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwID0gbmV3IFhNTCh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlYWRlciA6IEFsdGlSZXNwb25zZVJlYWRlclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBvcHRpb25zLnJlc3BvbnNlID09PSBcInN0cmluZ1wiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAuc2V0WE1MU3RyaW5nKG9wdGlvbnMucmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAuc2V0WE1MRG9jKG9wdGlvbnMucmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEgPSBwLnBhcnNlKCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWRhdGEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKE1SZXMuZ2V0TWVzc2FnZShcIlNFUlZJQ0VfUkVTUE9OU0VfRVhDRVBUSU9OXzJcIikpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbWVzc2FnZSA9IGUubWVzc2FnZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLm9uRXJyb3IuY2FsbChvcHRpb25zLnNjb3BlLCBuZXcgRXJyb3JTZXJ2aWNlKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA6IE1SZXMuZ2V0TWVzc2FnZShcIlNFUlZJQ0VfUkVTUE9OU0VfRVhDRVBUSU9OXCIsIG1lc3NhZ2UpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgOiAyMDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgOiBFcnJvclNlcnZpY2UuVFlQRV9TUlZFUlJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgICAgICBjYXNlIFwianNvblwiOlxuICAgICAgICAgICAgICAgICAgICAgICAgbG9nZ2VyLnRyYWNlKFwiYW5hbHl6ZSByZXNwb25zZSA6IGpzb25cIik7XG4gICAgICAgICAgICAgICAgICAgICAgICBsb2dnZXIudHJhY2UoXCJhbmFseXplIHJlc3BvbnNlIDogXCIsIHR5cGVvZiBvcHRpb25zLnJlc3BvbnNlKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIEpTT05SZXNwb25zZSA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMucmVzcG9uc2UgPT09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBKU09OUmVzcG9uc2UgPSBKU09OLnBhcnNlKG9wdGlvbnMucmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBKU09OUmVzcG9uc2UgPSBvcHRpb25zLnJlc3BvbnNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBsZSBzZXJ2aWNlIHJlbnZvaWUgdCBpbCB1bmUgZXJyZXVyID9cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChKU09OUmVzcG9uc2UgJiYgSlNPTlJlc3BvbnNlLmVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gZXguIHtcImVycm9yXCI6IHtcImNvZGVcIjogXCJCQURfUEFSQU1FVEVSXCIsXCJkZXNjcmlwdGlvblwiOiBcIlRoZSB2YWx1ZXMgKCkgY2Fubm90IGJlIHBhcnNlZCBhcyBhIHZhbGlkIGxvbmdpdHVkZSAoZG91YmxlIHZhbHVlIHN1Y2ggYXMgLTE4MCA8IGxhdCA8IDE4MCkuXCJ9fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnMub25FcnJvci5jYWxsKG9wdGlvbnMuc2NvcGUsIG5ldyBFcnJvclNlcnZpY2Uoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlIDogTVJlcy5nZXRNZXNzYWdlKFwiU0VSVklDRV9SRVNQT05TRV9FWENFUFRJT05cIiwgSlNPTlJlc3BvbnNlLmVycm9yLmRlc2NyaXB0aW9uKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzIDogMjAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlIDogRXJyb3JTZXJ2aWNlLlRZUEVfU1JWRVJSXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gYW5hbHlzZSBkZSBsYSByZXBvbnNlXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoSlNPTlJlc3BvbnNlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGVsZXZhdGlvbnMgPSBKU09OUmVzcG9uc2UuZWxldmF0aW9ucztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgYWx0aVJlc3BvbnNlID0gbmV3IEFsdGlSZXNwb25zZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBlbGV2YXRpb247XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoZWxldmF0aW9ucykgJiYgZWxldmF0aW9ucy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBlbGV2YXRpb25zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGV2YXRpb24gPSBuZXcgRWxldmF0aW9uKCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgZWxldmF0aW9uc1tpXSA9PT0gXCJvYmplY3RcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGVsZXZhdGlvbnNbaV0gZXN0IHVuIG9iamV0IGVsZXZhdGlvblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlbGV2YXRpb25zW2ldLmxvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGV2YXRpb24ubG9uID0gZWxldmF0aW9uc1tpXS5sb247XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlbGV2YXRpb25zW2ldLmxhdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGV2YXRpb24ubGF0ID0gZWxldmF0aW9uc1tpXS5sYXQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlbGV2YXRpb25zW2ldLnopIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxldmF0aW9uLnogPSBlbGV2YXRpb25zW2ldLno7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlbGV2YXRpb25zW2ldLmFjYykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGV2YXRpb24uYWNjID0gZWxldmF0aW9uc1tpXS5hY2M7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlbGV2YXRpb25zW2ldLm1lYXN1cmVzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsZXZhdGlvbi5tZWFzdXJlcyA9IGVsZXZhdGlvbnNbaV0ubWVhc3VyZXM7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgZWxldmF0aW9uc1tpXSA9PT0gXCJudW1iZXJcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGVsZXZhdGlvbnNbaV0gZXN0IHVuIG5vbWJyZSwgZGFucyBsZSBjYXMgZGUgem9ubHk9dHJ1ZSBub3RhbW1lbnRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGV2YXRpb24ueiA9IGVsZXZhdGlvbnNbaV07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGFsdGlSZXNwb25zZS5lbGV2YXRpb25zKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsdGlSZXNwb25zZS5lbGV2YXRpb25zLnB1c2goZWxldmF0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhID0gYWx0aVJlc3BvbnNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWRhdGEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLm9uRXJyb3IuY2FsbChvcHRpb25zLnNjb3BlLCBuZXcgRXJyb3JTZXJ2aWNlKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA6IE1SZXMuZ2V0TWVzc2FnZShcIlNFUlZJQ0VfUkVTUE9OU0VfQU5BTFlTRV8yXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlIDogRXJyb3JTZXJ2aWNlLlRZUEVfVU5LRVJSLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgOiAtMVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5vbkVycm9yLmNhbGwob3B0aW9ucy5zY29wZSwgbmV3IEVycm9yU2VydmljZSh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA6IE1SZXMuZ2V0TWVzc2FnZShcIlNFUlZJQ0VfUkVTUE9OU0VfRk9STUFUXzJcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZSA6IEVycm9yU2VydmljZS5UWVBFX1VOS0VSUixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgOiAtMVxuICAgICAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIFNpIGxhIHLDqXBvbnNlIGNvbnRlbmFpdCB1bmUgZXhjZXB0aW9uIHJlbnZvecOpZSBwYXIgbGUgc2VydmljZVxuICAgICAgICAgICAgICAgIGlmIChkYXRhLmV4Y2VwdGlvblJlcG9ydCkge1xuICAgICAgICAgICAgICAgICAgICBvcHRpb25zLm9uRXJyb3IuY2FsbChvcHRpb25zLnNjb3BlLCBuZXcgRXJyb3JTZXJ2aWNlKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgOiBNUmVzLmdldE1lc3NhZ2UoXCJTRVJWSUNFX1JFU1BPTlNFX0VYQ0VQVElPTlwiLCBkYXRhLmV4Y2VwdGlvblJlcG9ydCksXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlIDogRXJyb3JTZXJ2aWNlLlRZUEVfU1JWRVJSLFxuICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzIDogMjAwXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZGF0YS5lcnJvcikge1xuICAgICAgICAgICAgICAgICAgICB2YXIgZXJyb3JNZXNzID0gZGF0YS5lcnJvci5kZXNjcmlwdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5vbkVycm9yLmNhbGwob3B0aW9ucy5zY29wZSwgbmV3IEVycm9yU2VydmljZSh7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlIDogTVJlcy5nZXRNZXNzYWdlKFwiU0VSVklDRV9SRVNQT05TRV9FWENFUFRJT05cIiwgZXJyb3JNZXNzKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgOiBFcnJvclNlcnZpY2UuVFlQRV9TUlZFUlIsXG4gICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgOiAyMDBcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgb3B0aW9ucy5vbkVycm9yLmNhbGwob3B0aW9ucy5zY29wZSwgbmV3IEVycm9yU2VydmljZShNUmVzLmdldE1lc3NhZ2UoXCJTRVJWSUNFX1JFU1BPTlNFX0VNUFRZXCIpKSk7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBvcHRpb25zLm9uU3VjY2Vzcy5jYWxsKG9wdGlvbnMuc2NvcGUsIGRhdGEpO1xuICAgIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IEFsdGlSZXNwb25zZUZhY3Rvcnk7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Response/AltiResponseFactory.js\n"); /***/ }), @@ -480,6 +480,18 @@ eval("__webpack_require__.r(__webpack_exports__);\n\n/**\n * Single elevation ob /***/ }), +/***/ "./node_modules/geoportal-access-lib/src/Services/Alti/Response/model/Measure.js": +/*!***************************************************************************************!*\ + !*** ./node_modules/geoportal-access-lib/src/Services/Alti/Response/model/Measure.js ***! + \***************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n\n/**\n * Single measure object returned by underlying web service if measures = true and zonly = false\n *\n * @property {String} source_name - Name of the source\n * @property {String} source_measure - Name of the measure\n * @property {Float} z - Point elevation.\n * @property {Float} acc - Accuracy of elevation for this point. (only if zonly=false)\n *\n * @namespace\n * @alias Gp.Services.Alti.Measure\n */\nfunction Measure () {\n if (!(this instanceof Measure)) {\n throw new TypeError(\"Measure constructor cannot be called as a function.\");\n }\n\n this.source_name = null;\n this.source_measure = null;\n this.z = null;\n this.acc = null;\n}\n\nMeasure.prototype = {\n\n constructor : Measure\n\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Measure);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWw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cmVcbiAqL1xuZnVuY3Rpb24gTWVhc3VyZSAoKSB7XG4gICAgaWYgKCEodGhpcyBpbnN0YW5jZW9mIE1lYXN1cmUpKSB7XG4gICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXCJNZWFzdXJlIGNvbnN0cnVjdG9yIGNhbm5vdCBiZSBjYWxsZWQgYXMgYSBmdW5jdGlvbi5cIik7XG4gICAgfVxuXG4gICAgdGhpcy5zb3VyY2VfbmFtZSA9IG51bGw7XG4gICAgdGhpcy5zb3VyY2VfbWVhc3VyZSA9IG51bGw7XG4gICAgdGhpcy56ID0gbnVsbDtcbiAgICB0aGlzLmFjYyA9IG51bGw7XG59XG5cbk1lYXN1cmUucHJvdG90eXBlID0ge1xuXG4gICAgY29uc3RydWN0b3IgOiBNZWFzdXJlXG5cbn07XG5cbmV4cG9ydCBkZWZhdWx0IE1lYXN1cmU7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Alti/Response/model/Measure.js\n"); + +/***/ }), + /***/ "./node_modules/geoportal-access-lib/src/Services/AutoComplete/AutoComplete.js": /*!*************************************************************************************!*\ !*** ./node_modules/geoportal-access-lib/src/Services/AutoComplete/AutoComplete.js ***! @@ -488,7 +500,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n\n/**\n * Single elevation ob /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../CommonService */ \"./node_modules/geoportal-access-lib/src/Services/CommonService.js\");\n/* harmony import */ var _Response_AutoCompleteResponseFactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Response/AutoCompleteResponseFactory */ \"./node_modules/geoportal-access-lib/src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js\");\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Utils_Helper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Utils/Helper */ \"./node_modules/geoportal-access-lib/src/Utils/Helper.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n\n\n\n\n\n\n\n/**\n * @classdesc\n * Appel du service d'autocomplétion du Géoportail :\n * envoi de la requête construite selon les paramètres en options,\n * éventuellement parsing et analyse de la réponse,\n * retour d'une réponse en paramètre de la fonction onSuccess.\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.AutoComplete\n *\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {String} options.text - La chaîne de caractère à compléter.\n * Cette chaîne n'est pas \"URL encodée\".\n * C'est l'API qui s'occupe de l'encoder pour l'inclure dans la requête.\n *\n * @param {Array.} [options.type = [\"StreetAddress\"]] - Type de l'objet recherché.\n * Le service d'autocomplétion du Géoportail permet de rechercher des toponymes 'PositionOfInterest' et/ou des adresses postales 'StreetAddress'.\n * D'autres types pourront être rajoutés selon l'évolution du service.\n * Par défaut, type = ['StreetAddress'].\n *\n * @param {String} [options.territory] - Limitation de la zone de recherche de localisants.\n * Le service d'autocomplétion du Géoportail permet de limiter la recherche à la métropole et la Corse : options.territory = 'METROPOLE',\n * DOMS TOMS : options.territory = 'DOMTOM', ou à un département : options.territory = '31'\n * Pas de valeur par défaut.\n * La valeur par défaut est donc celle du service.\n * Le service d'autocomplétion du Géoportail renvoie toutes les informations quand aucun territoire n'est spécifié.\n *\n * @param {Number} [options.maximumResponses = 10] - Nombre de réponses maximal que l'on souhaite recevoir.\n * Pas de valeur par défaut.\n * La valeur par défaut sera donc celle du service : 10.\n *\n * @example\n * var options = {\n * // options communes aux services\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * protocol : 'JSONP', // JSONP|XHR\n * proxyURL : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * text : \"\",\n * type : \"StreetAddress\",\n * territory : 'METROPOLE',\n * maximumResponses : 10\n * };\n */\nfunction AutoComplete (options_) {\n if (!(this instanceof AutoComplete)) {\n throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getMessage(\"CLASS_CONSTRUCTOR\", \"AutoComplete\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"AutoComplete\";\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getLogger(\"Gp.Services.AutoComplete\");\n this.logger.trace(\"[Constructeur AutoComplete (options)]\");\n\n var options = this.patchOptionConvertor(options_);\n options.serverUrl = options.serverUrl || \"https://wxs.ign.fr/calcul/geoportail/geocodage/rest/0.1/completion\";\n\n // appel du constructeur par heritage\n _CommonService__WEBPACK_IMPORTED_MODULE_0__[\"default\"].apply(this, arguments);\n\n if (!options.text) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getMessage(\"PARAM_MISSING\", \"text\"));\n }\n\n // ajout des options spécifiques au service\n this.options.text = options.text;\n\n // on definit des parametres par defaut\n if (!options.type) {\n options.type = [\"StreetAddress,PositionOfInterest\"];\n }\n\n this.options.type = options.type;\n this.options.territory = options.territory || \"\";\n this.options.maximumResponses = options.maximumResponses || 10;\n\n // INFO\n // le service ne repond pas en mode POST (405 Method Not Allowed)\n if (this.options.protocol === \"XHR\" && this.options.httpMethod === \"POST\") {\n this.logger.warn(\"Le service ne gére pas le mode d'interrogation en POST, on bascule sur du GET !\");\n this.options.httpMethod = \"GET\"; // on surcharge !\n }\n\n // attributs d'instances\n\n /**\n * Format forcé de la réponse du service : \"json\"\n * sauf si l'on souhaite une reponse brute (options.rawResponse)\n */\n this.options.outputFormat = (this.options.rawResponse) ? \"\" : \"json\";\n}\n\n/**\n * @lends module:AutoComplete#\n */\n\nAutoComplete.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_0__[\"default\"].prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nAutoComplete.prototype.constructor = AutoComplete;\n\n/**\n * Patch pour la convertion des options vers le nouveau formalisme.\n *\n * @param {Object} options_ - options du service\n * @return {Object} - options\n */\nAutoComplete.prototype.patchOptionConvertor = function (options_) {\n const options = options_;\n\n if (options.filterOptions) {\n this.logger.warn(\"The parameter 'filterOptions' is deprecated\");\n\n if (options.filterOptions.type) {\n this.logger.warn(\"The parameter 'filterOptions.type' is deprecated\");\n if (!options.type) {\n options.type = options.filterOptions.type;\n }\n }\n\n if (options.filterOptions.territory) {\n this.logger.warn(\"The parameter 'filterOptions.territory' is deprecated\");\n if (!options.terr) {\n options.terr = options.filterOptions.territory;\n }\n }\n\n delete options.filterOptions;\n }\n\n return options;\n};\n\n/**\n * (overwrite)\n * Création de la requête\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nAutoComplete.prototype.buildRequest = function (error, success) {\n // ex.\n // http://wxs.ign.fr/CLEF/ols/apis/completion?\n // text=Brie-Comt&\n // type=StreetAddress,PositionOfInterest&\n // territory=METROPOLE&\n // maximumResponses=10\n\n // traitement des param KPV sous forme de tableau\n var territory = \"\";\n if (this.options.territory) {\n territory = this.options.territory;\n }\n\n var type = \"\";\n if (this.options.type) {\n type = this.options.type.join(\",\");\n }\n\n // normalisation de la requete avec param KPV\n this.request = _Utils_Helper__WEBPACK_IMPORTED_MODULE_4__[\"default\"].normalyzeParameters({\n text : encodeURIComponent(this.options.text),\n type : type,\n terr : territory,\n maximumResponses : this.options.maximumResponses\n });\n\n (!this.request)\n ? error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_5__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getMessage(\"SERVICE_REQUEST_BUILD\")))\n : success.call(this, this.request);\n};\n\n/**\n * (overwrite)\n * Analyse de la reponse\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback de succès de l'analyse de la réponse\n */\nAutoComplete.prototype.analyzeResponse = function (error, success) {\n if (this.response) {\n var options = {\n response : this.response,\n rawResponse : this.options.rawResponse,\n onSuccess : success,\n onError : error,\n scope : this\n };\n\n _Response_AutoCompleteResponseFactory__WEBPACK_IMPORTED_MODULE_1__[\"default\"].build(options);\n } else {\n error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_5__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AutoComplete);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQXV0b0NvbXBsZXRlL0F1dG9Db21wbGV0ZS5qcz84MmRjIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQTZDO0FBQ29DO0FBQ2hDO0FBQ0Y7QUFDUDtBQUNpQjs7QUFFekQ7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxhQU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LmJ1aWxkKG9wdGlvbnMpO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIGVycm9yLmNhbGwodGhpcywgbmV3IEVycm9yU2VydmljZShNUi5nZXRNZXNzYWdlKFwiU0VSVklDRV9SRVNQT05TRV9FTVBUWVwiKSkpO1xuICAgIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IEF1dG9Db21wbGV0ZTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/AutoComplete/AutoComplete.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../CommonService */ \"./node_modules/geoportal-access-lib/src/Services/CommonService.js\");\n/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../DefaultUrlService */ \"./node_modules/geoportal-access-lib/src/Services/DefaultUrlService.js\");\n/* harmony import */ var _Response_AutoCompleteResponseFactory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Response/AutoCompleteResponseFactory */ \"./node_modules/geoportal-access-lib/src/Services/AutoComplete/Response/AutoCompleteResponseFactory.js\");\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Utils_Helper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Utils/Helper */ \"./node_modules/geoportal-access-lib/src/Utils/Helper.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n\n\n\n\n\n\n\n\n/**\n * @classdesc\n * Appel du service d'autocomplétion du Géoportail :\n * envoi de la requête construite selon les paramètres en options,\n * éventuellement parsing et analyse de la réponse,\n * retour d'une réponse en paramètre de la fonction onSuccess.\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.AutoComplete\n *\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {String} options.text - La chaîne de caractère à compléter.\n * Cette chaîne n'est pas \"URL encodée\".\n * C'est l'API qui s'occupe de l'encoder pour l'inclure dans la requête.\n *\n * @param {Array.} [options.type = [\"StreetAddress\"]] - Type de l'objet recherché.\n * Le service d'autocomplétion du Géoportail permet de rechercher des toponymes 'PositionOfInterest' et/ou des adresses postales 'StreetAddress'.\n * D'autres types pourront être rajoutés selon l'évolution du service.\n * Par défaut, type = ['StreetAddress'].\n *\n * @param {String} [options.territory] - Limitation de la zone de recherche de localisants.\n * Le service d'autocomplétion du Géoportail permet de limiter la recherche à la métropole et la Corse : options.territory = 'METROPOLE',\n * DOMS TOMS : options.territory = 'DOMTOM', ou à un département : options.territory = '31'\n * Pas de valeur par défaut.\n * La valeur par défaut est donc celle du service.\n * Le service d'autocomplétion du Géoportail renvoie toutes les informations quand aucun territoire n'est spécifié.\n *\n * @param {Number} [options.maximumResponses = 10] - Nombre de réponses maximal que l'on souhaite recevoir.\n * Pas de valeur par défaut.\n * La valeur par défaut sera donc celle du service : 10.\n *\n * @example\n * var options = {\n * // options communes aux services\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * protocol : 'JSONP', // JSONP|XHR\n * proxyURL : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * text : \"\",\n * type : \"StreetAddress\",\n * territory : 'METROPOLE',\n * maximumResponses : 10\n * };\n */\nfunction AutoComplete (options_) {\n if (!(this instanceof AutoComplete)) {\n throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getMessage(\"CLASS_CONSTRUCTOR\", \"AutoComplete\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"AutoComplete\";\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getLogger(\"Gp.Services.AutoComplete\");\n this.logger.trace(\"[Constructeur AutoComplete (options)]\");\n\n var options = this.patchOptionConvertor(options_);\n\n if (!options.serverUrl) {\n // Code commenté : Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'autocomplétion\n /* options.serverUrl = DefaultUrlService.AutoComplete.newUrl();\n if (options.oldAutocompleteService) {\n options.serverUrl = DefaultUrlService.AutoComplete.url();\n } */\n // Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'autocompletion\n options.serverUrl = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_1__[\"default\"].AutoComplete.url();\n }\n\n // appel du constructeur par heritage\n _CommonService__WEBPACK_IMPORTED_MODULE_0__[\"default\"].apply(this, arguments);\n\n if (!options.text) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getMessage(\"PARAM_MISSING\", \"text\"));\n }\n\n // ajout des options spécifiques au service\n this.options.text = options.text;\n\n // on definit des parametres par defaut\n if (!options.type) {\n options.type = [\"StreetAddress,PositionOfInterest\"];\n }\n\n this.options.type = options.type;\n this.options.territory = options.territory || \"\";\n this.options.maximumResponses = options.maximumResponses || 10;\n\n // INFO\n // le service ne repond pas en mode POST (405 Method Not Allowed)\n if (this.options.protocol === \"XHR\" && this.options.httpMethod === \"POST\") {\n this.logger.warn(\"Le service ne gére pas le mode d'interrogation en POST, on bascule sur du GET !\");\n this.options.httpMethod = \"GET\"; // on surcharge !\n }\n\n // attributs d'instances\n\n /**\n * Format forcé de la réponse du service : \"json\"\n * sauf si l'on souhaite une reponse brute (options.rawResponse)\n */\n this.options.outputFormat = (this.options.rawResponse) ? \"\" : \"json\";\n}\n\n/**\n * @lends module:AutoComplete#\n */\n\nAutoComplete.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_0__[\"default\"].prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nAutoComplete.prototype.constructor = AutoComplete;\n\n/**\n * Patch pour la convertion des options vers le nouveau formalisme.\n *\n * @param {Object} options_ - options du service\n * @return {Object} - options\n */\nAutoComplete.prototype.patchOptionConvertor = function (options_) {\n const options = options_;\n\n if (options.filterOptions) {\n this.logger.warn(\"The parameter 'filterOptions' is deprecated\");\n\n if (options.filterOptions.type) {\n this.logger.warn(\"The parameter 'filterOptions.type' is deprecated\");\n if (!options.type) {\n options.type = options.filterOptions.type;\n }\n }\n\n if (options.filterOptions.territory) {\n this.logger.warn(\"The parameter 'filterOptions.territory' is deprecated\");\n if (!options.terr) {\n options.terr = options.filterOptions.territory;\n }\n }\n\n delete options.filterOptions;\n }\n\n return options;\n};\n\n/**\n * (overwrite)\n * Création de la requête\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nAutoComplete.prototype.buildRequest = function (error, success) {\n // ex.\n // http://wxs.ign.fr/CLEF/ols/apis/completion?\n // text=Brie-Comt&\n // type=StreetAddress,PositionOfInterest&\n // territory=METROPOLE&\n // maximumResponses=10\n\n // traitement des param KPV sous forme de tableau\n var territory = \"\";\n if (this.options.territory) {\n territory = this.options.territory;\n }\n\n var type = \"\";\n if (this.options.type) {\n type = this.options.type.join(\",\");\n }\n\n // normalisation de la requete avec param KPV\n this.request = _Utils_Helper__WEBPACK_IMPORTED_MODULE_5__[\"default\"].normalyzeParameters({\n text : encodeURIComponent(this.options.text),\n type : type,\n terr : territory,\n maximumResponses : this.options.maximumResponses\n });\n\n (!this.request)\n ? error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_6__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getMessage(\"SERVICE_REQUEST_BUILD\")))\n : success.call(this, this.request);\n};\n\n/**\n * (overwrite)\n * Analyse de la reponse\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback de succès de l'analyse de la réponse\n */\nAutoComplete.prototype.analyzeResponse = function (error, success) {\n if (this.response) {\n var options = {\n response : this.response,\n rawResponse : this.options.rawResponse,\n onSuccess : success,\n onError : error,\n scope : this\n };\n\n _Response_AutoCompleteResponseFactory__WEBPACK_IMPORTED_MODULE_2__[\"default\"].build(options);\n } else {\n error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_6__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AutoComplete);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQXV0b0NvbXBsZXRlL0F1dG9Db21wbGV0ZS5qcz84MmRjIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBNkM7QUFDUTtBQUM0QjtBQUNoQztBQUNGO0FBQ1A7QUFDaUI7O0FBRXpEO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsYUFBYTtBQUNiO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEI7QUFDQSxXQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0EsV0FBVyxlQUFlO0FBQzFCO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsV0FB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lIHN1Y2PDqHMgZGUgbCdhbmFseXNlIGRlIGxhIHLDqXBvbnNlXG4gKi9cbkF1dG9Db21wbGV0ZS5wcm90b3R5cGUuYW5hbHl6ZVJlc3BvbnNlID0gZnVuY3Rpb24gKGVycm9yLCBzdWNjZXNzKSB7XG4gICAgaWYgKHRoaXMucmVzcG9uc2UpIHtcbiAgICAgICAgdmFyIG9wdGlvbnMgPSB7XG4gICAgICAgICAgICByZXNwb25zZSA6IHRoaXMucmVzcG9uc2UsXG4gICAgICAgICAgICByYXdSZXNwb25zZSA6IHRoaXMub3B0aW9ucy5yYXdSZXNwb25zZSxcbiAgICAgICAgICAgIG9uU3VjY2VzcyA6IHN1Y2Nlc3MsXG4gICAgICAgICAgICBvbkVycm9yIDogZXJyb3IsXG4gICAgICAgICAgICBzY29wZSA6IHRoaXNcbiAgICAgICAgfTtcblxuICAgICAgICBBdXRvQ29tcGxldGVSZXNwb25zZUZhY3RvcnkuYnVpbGQob3B0aW9ucyk7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgZXJyb3IuY2FsbCh0aGlzLCBuZXcgRXJyb3JTZXJ2aWNlKE1SLmdldE1lc3NhZ2UoXCJTRVJWSUNFX1JFU1BPTlNFX0VNUFRZXCIpKSk7XG4gICAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgQXV0b0NvbXBsZXRlO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/AutoComplete/AutoComplete.js\n"); /***/ }), @@ -536,7 +548,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n\n/**\n * Single SuggestedLoc /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_Helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Utils/Helper */ \"./node_modules/geoportal-access-lib/src/Utils/Helper.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Protocols_Protocol__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Protocols/Protocol */ \"./node_modules/geoportal-access-lib/src/Protocols/Protocol.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./DefaultUrlService */ \"./node_modules/geoportal-access-lib/src/Services/DefaultUrlService.js\");\n/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../package.json */ \"./node_modules/geoportal-access-lib/package.json\");\nvar _package_json__WEBPACK_IMPORTED_MODULE_6___namespace = /*#__PURE__*/__webpack_require__.t(/*! ../../package.json */ \"./node_modules/geoportal-access-lib/package.json\", 1);\n\n\n\n\n\n\n// package.json (extract version)\n\n\n/**\n * @classdesc\n * Composant Service\n *\n * @constructor\n * @alias Gp.Services.CommonService\n * @param {Object} options - options communes à tous les services\n *\n * @param {String} [options.serverUrl] - URL d'accès au service. Par défaut \"https://wxs.ign.fr/calcul/geoportail/SERVICE/\".\n * Permet de forcer l'utilisation d'un service équivalent déployé derrière une éventuelle autre URL d'accès.\n * Si ce paramètre est renseigné alors, le paramètre par défaut est ignoré.\n *\n * @param {String} [options.protocol] - Le protocole à utiliser pour récupérer les informations du service :\n * peut valoir 'JSONP' ou 'XHR'.\n * Par défaut, c'est le protocole XHR qui sera utilisé.\n * Attention, le protocole JSONP n'est pas valide dans un environnement NodeJS (Utilisation du mode XHR).\n *\n * @param {Boolean} [options.ssl] - Indique si l'on souhaite intérroger les services en https.\n * Ce paramètre ne fonctionne que pour une utilisation hors navigateur (ex. NodeJS).\n * Sur un navigateur, le protocole est automatiquement extrait de l'url du site...\n * Par défaut, on utilise le protocole http (ssl=false).\n *\n * @param {String} [options.proxyURL] - Le proxy à utiliser pour pallier au problème de cross-domain dans le cas d'une requête XHR.\n * Utile si le paramètre 'protocol' vaut 'XHR', il ne sera pas pris en compte si protocol vaut JSONP.\n *\n * @param {String} [options.callbackSuffix] - Suffixe de la fonction de callback à utiliser, dans le cas du protocole JSONP.\n * Par défaut, la fonction de callback portera un nom du type \"callback\"+ID, où ID est soit un identifiant unique généré à chaque requête,\n * soit le paramètre callbackSuffix s'il est spécifié. Par exemple, si callbackSuffix=\"_2\", la fonction sera \"callback_2 ()\".\n * Utile pour utiliser une réponse déjà encapsulée dans une fonction de callback, dont le nom est connu\n * Utile seulement si le paramètre 'protocol' vaut 'JSONP', il ne sera pas pris en compte si protocol vaut 'XHR'.\n *\n * @param {String} [options.httpMethod] - La méthode HTTP\n * à utiliser dans le cas d'une requête XHR : peut valoir 'GET' ou 'POST'.\n * Non pris en compte si 'protocol' vaut JSONP qui fonctionne obligatoirement en GET.\n * Par défaut, c'est la méthode GET qui est utilisée.\n *\n * @param {String} [options.contentType] - Content-Type de la requete\n * à utiliser dans le cas d'une requête XHR en mode POST.\n * Non pris en compte si 'protocol' vaut JSONP et/ou la méthode HTTP vaut GET.\n * Par défaut, c'est la méthode GET qui est utilisée donc on n'utilise pas de Content-Type.\n *\n * @param {Number} [options.timeOut] - Délai d'attente maximal (en ms) de la réponse du service (à partir de l'envoi de la requête).\n * Par défaut, aucun timeOut n'est pris en compte (timeoutDelay= 0).\n *\n * @param {Boolean} [options.rawResponse] - Indique si l'on souhaite que la réponse du service ne soit pas parsée par l'API avant d'être restituée.\n * (Cf. paramètre « onSuccess » pour plus de détails).\n *\n * @param {Function} [options.onSuccess] - Fonction appelée lorsque le service répond correctement à la requête\n * (code HTTP 200, sans message d'erreur).\n * Cette fonction prend en paramètre la réponse du service,\n * soit sous la forme d'un Object Javascript formaté par le parseur dédié à la syntaxe du service (comportement par défaut) ;\n * soit brute au format String non prétraité si le paramètre « rawResponse » a été précisé avec la valeur « true ».\n *\n * @param {Function} [options.onFailure] - Fonction appelée lorsque le service ne répond pas correctement\n * (code HTTP de retour différent de 200 ou pas de réponse).\n *\n * @param {Function} [options.onBeforeParse] - Fonction appelée avant le parsing de la réponse\n * Permet de modifier la réponse avant parsing et la fonction doit retourner une String.\n * Cette fonction prend en paramètre la réponse telle que renvoyée par le service\n * (cad au format json ou xml).\n * Pour le JSONP, si le paramètre \"rawResponse\" a été précisé avec la valeur \"true\",\n * la fonction prend en paramètre un Object JavaScript contenant la réponse XML.\n *\n * @example\n * var options = {\n * serverUrl : 'http://localhost/service/',\n * protocol : 'JSONP', // JSONP|XHR\n * ssl : false,\n * proxyURL : null,\n * callbackName : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * onBeforeParse : function (rawResponse) {}\n * };\n */\nfunction CommonService (options) {\n if (!(this instanceof CommonService)) {\n throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getMessage(\"CLASS_CONSTRUCTOR\"));\n }\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"CommonService\");\n this.logger.trace(\"[Constructeur CommonService (options)]\");\n\n // #####################\n // récupération des options par défaut pour les paramètres optionnels\n // #####################\n\n /**\n * Options du service\n * @type {Object}\n */\n this.options = {\n // protocol : \"JSONP\",\n protocol : \"XHR\",\n ssl : true,\n proxyURL : \"\",\n // callbackName : \"\",\n callbackSuffix : null,\n httpMethod : \"GET\",\n timeOut : 0,\n rawResponse : false,\n scope : this,\n /**\n * callback par defaut pour la reponse\n * @param {Object} response - response\n * @private\n */\n onSuccess : function (response) {\n console.log(\"onSuccess - la reponse est la suivante : \", response);\n },\n /**\n * callback par defaut pour les erreurs\n * @param {Object} error - error\n * @private\n */\n onFailure : function (error) {\n if (error.status === 200 || !error.status) {\n console.log(\"onFailure : \", error.message);\n } else {\n console.log(\"onFailure - Erreur (\", error.status, \") : \", error.message);\n }\n }\n };\n\n // et on ajoute les options en paramètre aux options par défaut\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n this.options[opt] = options[opt];\n }\n }\n\n // #####################\n // analyse des options\n // #####################\n\n // modification de la fonction de callback onSuccess dans le cas où la réponse brute est demandée\n if (this.options.rawResponse && !this.options.onSuccess) {\n /**\n * callback par defaut pour la reponse\n * @param {Object} response - response\n * @private\n */\n this.options.onSuccess = function (response) {\n console.log(\"onSuccess - la réponse brute du service est la suivante : \", response);\n };\n }\n\n // gestion du callback onSuccess\n var bOnSuccess = !!(this.options.onSuccess !== null && typeof this.options.onSuccess === \"function\");\n if (!bOnSuccess) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getMessage(\"PARAM_MISSING\", \"onSuccess()\"));\n }\n\n // gestion de l'url du service par defaut\n if (!this.options.serverUrl) {\n // INFO\n // gestion de l'url du service par defaut pour les services qui ne possèdent qu'une seul url par defaut\n // les cas particuliers des services avec plusieurs urls (ex. Alti) devront être traité dans la classe du composant\n // donc si l'url n'est pas renseignée, il faut utiliser les urls par defaut\n _DefaultUrlService__WEBPACK_IMPORTED_MODULE_5__[\"default\"].ssl = this.options.ssl;\n var urlByDefault = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_5__[\"default\"][this.CLASSNAME].url(\"calcul\");\n if (typeof urlByDefault === \"string\") {\n this.options.serverUrl = urlByDefault;\n } else {\n this.logger.trace(\"URL par defaut à determiner au niveau du composant...\");\n }\n }\n\n // FIXME nettoyage des KVP dans l'url du service\n // if (this.options.serverUrl) {\n // // INFO\n // // si l'url est renseignée, il faut la nettoyer de tous ses KVP\n // // ex. on ne veut pas de params. 'callback' ou 'output' car ceci declencherait\n // // des opérations d'encapsulations des reponses légèrement farfelues ...\n // var urlsource = this.options.serverUrl;\n // var urlparts = urlsource.split(\"?\");\n // this.options.serverUrl = urlparts[0];\n // }\n\n // gestion de la methode HTTP\n this.options.httpMethod = (typeof options.httpMethod === \"string\") ? options.httpMethod.toUpperCase() : \"GET\";\n\n switch (this.options.httpMethod) {\n case \"POST\":\n case \"GET\":\n break;\n case \"PUT\":\n case \"DELETE\":\n case \"HEAD\":\n case \"OPTIONS\":\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getMessage(\"PARAM_NOT_SUPPORT\", \"httpMethod\"));\n default:\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getMessage(\"PARAM_UNKNOWN\", \"httpMethod\"));\n }\n\n // gestion du protocole\n // this.options.protocol = (typeof options.protocol === \"string\" ) ? options.protocol.toUpperCase() : \"JSONP\";\n this.options.protocol = (typeof options.protocol === \"string\") ? options.protocol.toUpperCase() : \"XHR\";\n\n switch (this.options.protocol) {\n case \"JSONP\":\n case \"XHR\":\n break;\n default:\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getMessage(\"PARAM_UNKNOWN\", \"protocol\"));\n }\n\n // on determine l'environnement d'execution : browser ou non ?\n // et on lance une exception sur l'utilisation du protocole JSONP pour nodeJS...\n if (typeof window === \"undefined\" && this.options.protocol === \"JSONP\") {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getMessage(\"PARAM_NOT_SUPPORT_NODEJS\", \"protocol=JSONP (instead use XHR)\"));\n }\n\n // le protocole JSONP ne fonctionne qu'en GET.\n if (this.options.protocol === \"JSONP\") {\n this.options.httpMethod = \"GET\";\n }\n\n // gestion du cache\n this.options.nocache = options.nocache || false;\n\n // #####################\n // attributs d'instances\n // #####################\n\n /**\n * Format de réponse du service\n */\n this.options.outputFormat = null;\n /**\n * Requête envoyée au service\n */\n this.request = null;\n /**\n * Reponse du service\n */\n this.response = null;\n}\n\n/**\n * @lends module:CommonService\n */\nCommonService.prototype = {\n\n /*\n * Constructeur (alias)\n */\n constructor : CommonService,\n\n /**\n * Appel du service Géoportail\n */\n call : function () {\n /* jshint validthis : true */\n this.logger.trace(\"CommonService::call ()\");\n\n var context = this;\n /** fonction d'execution */\n function run () {\n this.logger.trace(\"CommonService::run ()\");\n this.buildRequest.call(context, onError, onBuildRequest);\n }\n\n run.call(context);\n\n // callback de fin de construction de la requête\n function onBuildRequest (result) {\n this.logger.trace(\"CommonService::onBuildRequest : \", result);\n this.callService.call(context, onError, onCallService);\n }\n\n // callback de fin d'appel au service\n function onCallService (result) {\n this.logger.trace(\"CommonService::onCallService : \", result);\n this.analyzeResponse.call(context, onError, onAnalyzeResponse);\n }\n\n // callback de fin de lecture de la reponse\n function onAnalyzeResponse (result) {\n this.logger.trace(\"CommonService::onAnalyzeResponse : \", result);\n if (result) {\n this.options.onSuccess.call(this, result);\n } else {\n return onError.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"Analyse de la reponse en échec !?\"));\n }\n }\n\n // callback de gestion des erreurs : renvoit un objet de type ErrorService\n function onError (error) {\n this.logger.trace(\"CommonService::onError()\");\n // error : l'objet est du type ErrorService ou Error\n var e = error;\n if (!(e instanceof _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"])) {\n e = new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"](error.message);\n }\n this.options.onFailure.call(this, e);\n }\n },\n\n /**\n * Création de la requête\n * @param {Function} error - callback\n * @param {Function} success - callback\n */\n buildRequest : function (error, success) {\n // INFO\n this.logger.error(\"overwritten method !\");\n // retourne l'objet 'this.request'\n if (error) {\n error.call(this, \"This method must be overwritten !\");\n }\n success.call(this, \"This method must be overwritten !\");\n },\n\n /**\n * Appel du service\n * @param {Function} error - callback\n * @param {Function} success - callback\n */\n callService : function (error, success) {\n // INFO\n // retourne l'objet 'this.response'\n\n // NOTES\n // Pour le mode XHR, on recupère une reponse sous forme d'un json ou xml (#document).\n // Pour le mode JSONP, on a toujours un objet JSON mais sous 2 formes :\n // - natif\n // - XML encapsulé :\n // {http : {status:200, error:null},xml :'réponse du service'}\n // {http : {status:400, error:'reponse du service'},xml :null}\n // En XHR, la reponse est directement sauvegardée dans 'this.response'.\n // Par contre, en JSONP, on doit analyser la reponse (status ou non vide),\n // et ne renvoyer que le contenu (xml ou l'objet)\n\n // gestion de la proxification du service\n var strUrlProxified = null;\n var strData = this.request;\n\n // a t on mis en place un proxy ?\n // la proxyfication est valable uniquement en mode XHR !\n var bUrlProxified = !!(this.options.proxyURL && this.options.protocol === \"XHR\");\n\n // rajout de l'option gpbibaccess\n // INFO : acces au numero de version de package.conf aprés compilation !\n if (this.CLASSNAME !== \"Geocode\" && this.CLASSNAME !== \"ReverseGeocode\" && this.CLASSNAME !== \"AutoComplete\") {\n this.options.serverUrl = _Utils_Helper__WEBPACK_IMPORTED_MODULE_1__[\"default\"].normalyzeUrl(this.options.serverUrl, {\n \"gp-access-lib\" : _package_json__WEBPACK_IMPORTED_MODULE_6__.version\n }, false);\n }\n\n // si le proxy est renseigné, on proxifie l'url du service\n if (bUrlProxified) {\n if (this.options.httpMethod === \"GET\") {\n strUrlProxified = this.options.proxyURL + _Utils_Helper__WEBPACK_IMPORTED_MODULE_1__[\"default\"].normalyzeUrl(this.options.serverUrl, this.request, true);\n strData = null;\n }\n\n if (this.options.httpMethod === \"POST\") {\n strUrlProxified = this.options.proxyURL + _Utils_Helper__WEBPACK_IMPORTED_MODULE_1__[\"default\"].normalyzeUrl(this.options.serverUrl, null, true);\n strData = this.request;\n }\n }\n\n // contexte du composant spécifique !\n var self = this;\n\n var options = {\n url : strUrlProxified || this.options.serverUrl,\n method : this.options.httpMethod,\n protocol : this.options.protocol,\n timeOut : this.options.timeOut || 0,\n format : this.options.outputFormat, // ceci declenche le parsing de la reponse du service, mais on souhaite toujours une reponse brute (string) !\n nocache : this.options.nocache || false, // ceci permet d'ajouter un timestamp dans la requête\n wrap : this.options.protocol !== \"XHR\", // ceci declenche l'encapsulation de la reponse XML du service dans du JSON, mais pas en mode XHR !\n callbackSuffix : this.options.callbackSuffix,\n // callbackName : this.options.callbackName || null,\n data : strData,\n headers : null, // TODO...\n content : this.options.contentType || \"application/xml\",\n scope : this.options.scope || this,\n // callback de reponse\n onResponse : function (response) {\n self.logger.trace(\"callService::onResponse()\");\n\n // le contenu de la reponse à renvoyer !\n var content = null;\n\n // XHR : on renvoie toujours la reponse brute du service (json ou xml)\n // au parser du composant...\n if (self.options.protocol === \"XHR\") {\n self.logger.trace(\"Response XHR\", response);\n content = response; // par defaut, la reponse du service !\n }\n\n // JSONP : on pre-analyse la reponse brute du service (encapsuler ou pas)\n // avant de l'envoyer au parser du composant...\n if (self.options.protocol === \"JSONP\") {\n self.logger.trace(\"Response JSON\", response);\n if (response) {\n if (response.http) {\n // reponse encapsulée :\n // ex. reponse du service en xml\n // > {http : {status:200, error:null},xml :'réponse du service'}\n if (response.http.status !== 200) {\n error.call(self, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"]({\n status : response.http.status,\n message : response.http.error,\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"].TYPE_SRVERR\n }));\n return;\n } else {\n content = response.xml; // par defaut !\n if (self.options.rawResponse) {\n content = response;\n }\n }\n } else {\n // reponse non encapsulée :\n // ex. reponse du service en json ou xml\n content = response;\n }\n } else {\n error.call(self, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"Le contenu de la reponse est vide !?\"));\n return;\n }\n }\n\n // si on souhaite parser la reponse du service\n if (typeof self.options.onBeforeParse === \"function\") {\n var newResponse = self.options.onBeforeParse(content);\n if (typeof newResponse === \"string\") {\n // la reponse parsée par l'utilisateur est retournée sous\n // forme de string !\n content = newResponse;\n }\n }\n // sauvegarde de la reponse dans l'objet parent (CommonService)\n self.response = content;\n // on renvoie la reponse...\n success.call(self, content);\n },\n // callback des erreurs\n onFailure : function (e) {\n self.logger.trace(\"callService::onFailure()\");\n // on est forcement sur une erreur levée par un service !\n e.type = _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"].TYPE_SRVERR;\n error.call(self, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"](e));\n },\n // callback de timeOut\n onTimeOut : function () {\n self.logger.trace(\"callService::onTimeOut()\");\n error.call(self, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"TimeOut!\"));\n }\n };\n\n _Protocols_Protocol__WEBPACK_IMPORTED_MODULE_3__[\"default\"].send(options);\n },\n\n /**\n * Analyse de la réponse\n * @param {Function} error - callback\n * @param {Function} success - callback\n */\n analyzeResponse : function (error, success) {\n // INFO\n this.logger.error(\"overwritten method !\");\n // retourne l'objet spécifique au type de composant (json)\n if (error) {\n error.call(this, \"This method must be overwritten !\");\n }\n success.call(this, \"This method must be overwritten !\");\n }\n\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (CommonService);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQ29tbW9uU2VydmljZS5qcz8xYjIyIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUE4QztBQUNUO0FBQ007QUFDRTtBQUNTO0FBQ0Y7QUFDcEQ7QUFDcUM7O0FBRXJDO0FBQ0E7QUFDQTtBQUNBO0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gZGVzIG9wdGlvbnMgcGFyIGTDqWZhdXQgcG91ciBsZXMgcGFyYW3DqHRyZXMgb3B0aW9ubmVsc1xuICAgIC8vICMjIyMjIyMjIyMjIyMjIyMjIyMjI1xuXG4gICAgLyoqXG4gICAgICogT3B0aW9ucyBkdSBzZXJ2aWNlXG4gICAgICogQHR5cGUge09iamVjdH1cbiAgICAgKi9cbiAgICB0aGlzLm9wdGlvbnMgPSB7XG4gICAgICAgIC8vIHByb3RvY29sIDogXCJKU09OUFwiLFxuICAgICAgICBwcm90b2NvbCA6IFwiWEhSXCIsXG4gICAgICAgIHNzbCA6IHRydWUsXG4gICAgICAgIHByb3h5VVJMIDogXCJcIixcbiAgICAgICAgLy8gY2FsbGJhY2tOYW1lIDogXCJcIixcbiAgICAgICAgY2FsbGJhY2tTdWZmaXggOiBudWxsLFxuICAgICAgICBodHRwTWV0aG9kIDogXCJHRVRcIixcbiAgICAgICAgdGltZU91dCA6IDAsXG4gICAgICAgIHJhd1Jlc3BvbnNlIDogZmFsc2UsXG4gICAgICAgIHNjb3BlIDogdGhpcyxcbiAgICAgICAgLyoqXG4gICAgICAgICogY2FsbGJhY2sgcGFyIGRlZmF1dCBwb3VyIGxhIHJlcG9uc2VcbiAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gcmVzcG9uc2UgLSByZXNwb25zZVxuICAgICAgICAqIEBwcml2YXRlXG4gICAgICAgICovXG4gICAgICAgIG9uU3VjY2VzcyA6IGZ1bmN0aW9uIChyZXNwb25zZSkge1xuICAgICAgICAgICAgY29uc29sZS5sb2coXCJvblN1Y2Nlc3MgLSBsYSByZXBvbnNlIGVzdCBsYSBzdWl2YW50ZSA6IFwiLCByZXNwb25zZSk7XG4gICAgICAgIH0sXG4gICAgICAgIC8qKlxuICAgICAgICAqIGNhbGxiYWNrIHBhciBkZWZhdXQgcG91ciBsZXMgZXJyZXVyc1xuICAgICAgICAqIEBwYXJhbSB7T2JqZWN0fSBlcnJvciAtIGVycm9yXG4gICAgICA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AgICAgLy8gYXUgcGFyc2VyIGR1IGNvbXBvc2FudC4uLlxuICAgICAgICAgICAgICAgIGlmIChzZWxmLm9wdGlvbnMucHJvdG9jb2wgPT09IFwiWEhSXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5sb2dnZXIudHJhY2UoXCJSZXNwb25zZSBYSFJcIiwgcmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICBjb250ZW50ID0gcmVzcG9uc2U7IC8vIHBhciBkZWZhdXQsIGxhIHJlcG9uc2UgZHUgc2VydmljZSAgIVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIEpTT05QIDogb24gcHJlLWFuYWx5c2UgbGEgcmVwb25zZSBicnV0ZSBkdSBzZXJ2aWNlIChlbmNhcHN1bGVyIG91IHBhcylcbiAgICAgICAgICAgICAgICAvLyBhdmFudCBkZSBsJ2Vudm95ZXIgYXUgcGFyc2VyIGR1IGNvbXBvc2FudC4uLlxuICAgICAgICAgICAgICAgIGlmIChzZWxmLm9wdGlvbnMucHJvdG9jb2wgPT09IFwiSlNPTlBcIikge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLmxvZ2dlci50cmFjZShcIlJlc3BvbnNlIEpTT05cIiwgcmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS5odHRwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gcmVwb25zZSBlbmNhcHN1bMOpZSA6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gZXguIHJlcG9uc2UgZHUgc2VydmljZSBlbiB4bWxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyA+IHtodHRwIDoge3N0YXR1czoyMDAsIGVycm9yOm51bGx9LHhtbCA6J3LDqXBvbnNlIGR1IHNlcnZpY2UnfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS5odHRwLnN0YXR1cyAhPT0gMjAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yLmNhbGwoc2VsZiwgbmV3IEVycm9yU2VydmljZSh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgOiByZXNwb25zZS5odHRwLnN0YXR1cyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgOiByZXNwb25zZS5odHRwLmVycm9yLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZSA6IEVycm9yU2VydmljZS5UWVBFX1NSVkVSUlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50ID0gcmVzcG9uc2UueG1sOyAvLyBwYXIgZGVmYXV0ICFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNlbGYub3B0aW9ucy5yYXdSZXNwb25zZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudCA9IHJlc3BvbnNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyByZXBvbnNlIG5vbiBlbmNhcHN1bMOpZSA6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gZXguIHJlcG9uc2UgZHUgc2VydmljZSBlbiBqc29uIG91IHhtbFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnQgPSByZXNwb25zZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yLmNhbGwoc2VsZiwgbmV3IEVycm9yU2VydmljZShcIkxlIGNvbnRlbnUgZGUgbGEgcmVwb25zZSBlc3QgdmlkZSAhP1wiKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBzaSBvbiBzb3VoYWl0ZSBwYXJzZXIgbGEgcmVwb25zZSBkdSBzZXJ2aWNlXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBzZWxmLm9wdGlvbnMub25CZWZvcmVQYXJzZSA9PT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBuZXdSZXNwb25zZSA9IHNlbGYub3B0aW9ucy5vbkJlZm9yZVBhcnNlKGNvbnRlbnQpO1xuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG5ld1Jlc3BvbnNlID09PSBcInN0cmluZ1wiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBsYSByZXBvbnNlIHBhcnPDqWUgcGFyIGwndXRpbGlzYXRldXIgZXN0IHJldG91cm7DqWUgc291c1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gZm9ybWUgZGUgc3RyaW5nICFcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnQgPSBuZXdSZXNwb25zZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBzYXV2ZWdhcmRlIGRlIGxhIHJlcG9uc2UgZGFucyBsJ29iamV0IHBhcmVudCAoQ29tbW9uU2VydmljZSlcbiAgICAgICAgICAgICAgICBzZWxmLnJlc3BvbnNlID0gY29udGVudDtcbiAgICAgICAgICAgICAgICAvLyBvbiByZW52b2llIGxhIHJlcG9uc2UuLi5cbiAgICAgICAgICAgICAgICBzdWNjZXNzLmNhbGwoc2VsZiwgY29udGVudCk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgLy8gY2FsbGJhY2sgZGVzIGVycmV1cnNcbiAgICAgICAgICAgIG9uRmFpbHVyZSA6IGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICAgICAgc2VsZi5sb2dnZXIudHJhY2UoXCJjYWxsU2VydmljZTo6b25GYWlsdXJlKClcIik7XG4gICAgICAgICAgICAgICAgLy8gb24gZXN0IGZvcmNlbWVudCBzdXIgdW5lIGVycmV1ciBsZXbDqWUgcGFyIHVuIHNlcnZpY2UgIVxuICAgICAgICAgICAgICAgIGUudHlwZSA9IEVycm9yU2VydmljZS5UWVBFX1NSVkVSUjtcbiAgICAgICAgICAgICAgICBlcnJvci5jYWxsKHNlbGYsIG5ldyBFcnJvclNlcnZpY2UoZSkpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIC8vIGNhbGxiYWNrIGRlIHRpbWVPdXRcbiAgICAgICAgICAgIG9uVGltZU91dCA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBzZWxmLmxvZ2dlci50cmFjZShcImNhbGxTZXJ2aWNlOjpvblRpbWVPdXQoKVwiKTtcbiAgICAgICAgICAgICAgICBlcnJvci5jYWxsKHNlbGYsIG5ldyBFcnJvclNlcnZpY2UoXCJUaW1lT3V0IVwiKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgUHJvdG9jb2wuc2VuZChvcHRpb25zKTtcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogQW5hbHlzZSBkZSBsYSByw6lwb25zZVxuICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IGVycm9yIC0gY2FsbGJhY2tcbiAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBzdWNjZXNzIC0gY2FsbGJhY2tcbiAgICAgKi9cbiAgICBhbmFseXplUmVzcG9uc2UgOiBmdW5jdGlvbiAoZXJyb3IsIHN1Y2Nlc3MpIHtcbiAgICAgICAgLy8gSU5GT1xuICAgICAgICB0aGlzLmxvZ2dlci5lcnJvcihcIm92ZXJ3cml0dGVuIG1ldGhvZCAhXCIpO1xuICAgICAgICAvLyByZXRvdXJuZSBsJ29iamV0IHNww6ljaWZpcXVlIGF1IHR5cGUgZGUgY29tcG9zYW50IChqc29uKVxuICAgICAgICBpZiAoZXJyb3IpIHtcbiAgICAgICAgICAgIGVycm9yLmNhbGwodGhpcywgXCJUaGlzIG1ldGhvZCBtdXN0IGJlIG92ZXJ3cml0dGVuICFcIik7XG4gICAgICAgIH1cbiAgICAgICAgc3VjY2Vzcy5jYWxsKHRoaXMsIFwiVGhpcyBtZXRob2QgbXVzdCBiZSBvdmVyd3JpdHRlbiAhXCIpO1xuICAgIH1cblxufTtcblxuZXhwb3J0IGRlZmF1bHQgQ29tbW9uU2VydmljZTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/CommonService.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_Helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Utils/Helper */ \"./node_modules/geoportal-access-lib/src/Utils/Helper.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Protocols_Protocol__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Protocols/Protocol */ \"./node_modules/geoportal-access-lib/src/Protocols/Protocol.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./DefaultUrlService */ \"./node_modules/geoportal-access-lib/src/Services/DefaultUrlService.js\");\n/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../package.json */ \"./node_modules/geoportal-access-lib/package.json\");\nvar _package_json__WEBPACK_IMPORTED_MODULE_6___namespace = /*#__PURE__*/__webpack_require__.t(/*! ../../package.json */ \"./node_modules/geoportal-access-lib/package.json\", 1);\n\n\n\n\n\n\n// package.json (extract version)\n\n\n/**\n * @classdesc\n * Composant Service\n *\n * @constructor\n * @alias Gp.Services.CommonService\n * @param {Object} options - options communes à tous les services\n *\n * @param {String} [options.serverUrl] - URL d'accès au service. Par défaut \"https://wxs.ign.fr/calcul/geoportail/SERVICE/\".\n * Permet de forcer l'utilisation d'un service équivalent déployé derrière une éventuelle autre URL d'accès.\n * Si ce paramètre est renseigné alors, le paramètre par défaut est ignoré.\n *\n * @param {String} [options.protocol] - Le protocole à utiliser pour récupérer les informations du service :\n * peut valoir 'JSONP' ou 'XHR'.\n * Par défaut, c'est le protocole XHR qui sera utilisé.\n * Attention, le protocole JSONP n'est pas valide dans un environnement NodeJS (Utilisation du mode XHR).\n *\n * @param {Boolean} [options.ssl] - Indique si l'on souhaite intérroger les services en https.\n * Ce paramètre ne fonctionne que pour une utilisation hors navigateur (ex. NodeJS).\n * Sur un navigateur, le protocole est automatiquement extrait de l'url du site...\n * Par défaut, on utilise le protocole http (ssl=false).\n *\n * @param {String} [options.proxyURL] - Le proxy à utiliser pour pallier au problème de cross-domain dans le cas d'une requête XHR.\n * Utile si le paramètre 'protocol' vaut 'XHR', il ne sera pas pris en compte si protocol vaut JSONP.\n *\n * @param {String} [options.callbackSuffix] - Suffixe de la fonction de callback à utiliser, dans le cas du protocole JSONP.\n * Par défaut, la fonction de callback portera un nom du type \"callback\"+ID, où ID est soit un identifiant unique généré à chaque requête,\n * soit le paramètre callbackSuffix s'il est spécifié. Par exemple, si callbackSuffix=\"_2\", la fonction sera \"callback_2 ()\".\n * Utile pour utiliser une réponse déjà encapsulée dans une fonction de callback, dont le nom est connu\n * Utile seulement si le paramètre 'protocol' vaut 'JSONP', il ne sera pas pris en compte si protocol vaut 'XHR'.\n *\n * @param {String} [options.httpMethod] - La méthode HTTP\n * à utiliser dans le cas d'une requête XHR : peut valoir 'GET' ou 'POST'.\n * Non pris en compte si 'protocol' vaut JSONP qui fonctionne obligatoirement en GET.\n * Par défaut, c'est la méthode GET qui est utilisée.\n *\n * @param {String} [options.contentType] - Content-Type de la requete\n * à utiliser dans le cas d'une requête XHR en mode POST.\n * Non pris en compte si 'protocol' vaut JSONP et/ou la méthode HTTP vaut GET.\n * Par défaut, c'est la méthode GET qui est utilisée donc on n'utilise pas de Content-Type.\n *\n * @param {Number} [options.timeOut] - Délai d'attente maximal (en ms) de la réponse du service (à partir de l'envoi de la requête).\n * Par défaut, aucun timeOut n'est pris en compte (timeoutDelay= 0).\n *\n * @param {Boolean} [options.rawResponse] - Indique si l'on souhaite que la réponse du service ne soit pas parsée par l'API avant d'être restituée.\n * (Cf. paramètre « onSuccess » pour plus de détails).\n *\n * @param {Function} [options.onSuccess] - Fonction appelée lorsque le service répond correctement à la requête\n * (code HTTP 200, sans message d'erreur).\n * Cette fonction prend en paramètre la réponse du service,\n * soit sous la forme d'un Object Javascript formaté par le parseur dédié à la syntaxe du service (comportement par défaut) ;\n * soit brute au format String non prétraité si le paramètre « rawResponse » a été précisé avec la valeur « true ».\n *\n * @param {Function} [options.onFailure] - Fonction appelée lorsque le service ne répond pas correctement\n * (code HTTP de retour différent de 200 ou pas de réponse).\n *\n * @param {Function} [options.onBeforeParse] - Fonction appelée avant le parsing de la réponse\n * Permet de modifier la réponse avant parsing et la fonction doit retourner une String.\n * Cette fonction prend en paramètre la réponse telle que renvoyée par le service\n * (cad au format json ou xml).\n * Pour le JSONP, si le paramètre \"rawResponse\" a été précisé avec la valeur \"true\",\n * la fonction prend en paramètre un Object JavaScript contenant la réponse XML.\n *\n * @example\n * var options = {\n * serverUrl : 'http://localhost/service/',\n * protocol : 'JSONP', // JSONP|XHR\n * ssl : false,\n * proxyURL : null,\n * callbackName : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * onBeforeParse : function (rawResponse) {}\n * };\n */\nfunction CommonService (options) {\n if (!(this instanceof CommonService)) {\n throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getMessage(\"CLASS_CONSTRUCTOR\"));\n }\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"CommonService\");\n this.logger.trace(\"[Constructeur CommonService (options)]\");\n\n // #####################\n // récupération des options par défaut pour les paramètres optionnels\n // #####################\n\n /**\n * Options du service\n * @type {Object}\n */\n this.options = {\n // protocol : \"JSONP\",\n protocol : \"XHR\",\n ssl : true,\n proxyURL : \"\",\n // callbackName : \"\",\n callbackSuffix : null,\n httpMethod : \"GET\",\n timeOut : 0,\n rawResponse : false,\n scope : this,\n /**\n * callback par defaut pour la reponse\n * @param {Object} response - response\n * @private\n */\n onSuccess : function (response) {\n console.log(\"onSuccess - la reponse est la suivante : \", response);\n },\n /**\n * callback par defaut pour les erreurs\n * @param {Object} error - error\n * @private\n */\n onFailure : function (error) {\n if (error.status === 200 || !error.status) {\n console.log(\"onFailure : \", error.message);\n } else {\n console.log(\"onFailure - Erreur (\", error.status, \") : \", error.message);\n }\n }\n };\n\n // et on ajoute les options en paramètre aux options par défaut\n for (var opt in options) {\n if (options.hasOwnProperty(opt)) {\n this.options[opt] = options[opt];\n }\n }\n\n // #####################\n // analyse des options\n // #####################\n\n // modification de la fonction de callback onSuccess dans le cas où la réponse brute est demandée\n if (this.options.rawResponse && !this.options.onSuccess) {\n /**\n * callback par defaut pour la reponse\n * @param {Object} response - response\n * @private\n */\n this.options.onSuccess = function (response) {\n console.log(\"onSuccess - la réponse brute du service est la suivante : \", response);\n };\n }\n\n // gestion du callback onSuccess\n var bOnSuccess = !!(this.options.onSuccess !== null && typeof this.options.onSuccess === \"function\");\n if (!bOnSuccess) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getMessage(\"PARAM_MISSING\", \"onSuccess()\"));\n }\n\n /* FIXME traitement au niveau de chaque composant pour tester service WXS / GPF\n // gestion de l'url du service par defaut\n if (!this.options.serverUrl) {\n // INFO\n // gestion de l'url du service par defaut pour les services qui ne possèdent qu'une seul url par defaut\n // les cas particuliers des services avec plusieurs urls (ex. Alti) devront être traité dans la classe du composant\n // donc si l'url n'est pas renseignée, il faut utiliser les urls par defaut\n DefaultUrlService.ssl = this.options.ssl;\n var urlByDefault = DefaultUrlService[this.CLASSNAME].url(\"calcul\");\n if (typeof urlByDefault === \"string\") {\n this.options.serverUrl = urlByDefault;\n } else {\n this.logger.trace(\"URL par defaut à determiner au niveau du composant...\");\n }\n }*/\n\n // FIXME nettoyage des KVP dans l'url du service\n // if (this.options.serverUrl) {\n // // INFO\n // // si l'url est renseignée, il faut la nettoyer de tous ses KVP\n // // ex. on ne veut pas de params. 'callback' ou 'output' car ceci declencherait\n // // des opérations d'encapsulations des reponses légèrement farfelues ...\n // var urlsource = this.options.serverUrl;\n // var urlparts = urlsource.split(\"?\");\n // this.options.serverUrl = urlparts[0];\n // }\n\n // gestion de la methode HTTP\n this.options.httpMethod = (typeof options.httpMethod === \"string\") ? options.httpMethod.toUpperCase() : \"GET\";\n\n switch (this.options.httpMethod) {\n case \"POST\":\n case \"GET\":\n break;\n case \"PUT\":\n case \"DELETE\":\n case \"HEAD\":\n case \"OPTIONS\":\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getMessage(\"PARAM_NOT_SUPPORT\", \"httpMethod\"));\n default:\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getMessage(\"PARAM_UNKNOWN\", \"httpMethod\"));\n }\n\n // gestion du protocole\n // this.options.protocol = (typeof options.protocol === \"string\" ) ? options.protocol.toUpperCase() : \"JSONP\";\n this.options.protocol = (typeof options.protocol === \"string\") ? options.protocol.toUpperCase() : \"XHR\";\n\n switch (this.options.protocol) {\n case \"JSONP\":\n case \"XHR\":\n break;\n default:\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getMessage(\"PARAM_UNKNOWN\", \"protocol\"));\n }\n\n // on determine l'environnement d'execution : browser ou non ?\n // et on lance une exception sur l'utilisation du protocole JSONP pour nodeJS...\n if (typeof window === \"undefined\" && this.options.protocol === \"JSONP\") {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getMessage(\"PARAM_NOT_SUPPORT_NODEJS\", \"protocol=JSONP (instead use XHR)\"));\n }\n\n // le protocole JSONP ne fonctionne qu'en GET.\n if (this.options.protocol === \"JSONP\") {\n this.options.httpMethod = \"GET\";\n }\n\n // gestion du cache\n this.options.nocache = options.nocache || false;\n\n // #####################\n // attributs d'instances\n // #####################\n\n /**\n * Format de réponse du service\n */\n this.options.outputFormat = null;\n /**\n * Requête envoyée au service\n */\n this.request = null;\n /**\n * Reponse du service\n */\n this.response = null;\n}\n\n/**\n * @lends module:CommonService\n */\nCommonService.prototype = {\n\n /*\n * Constructeur (alias)\n */\n constructor : CommonService,\n\n /**\n * Appel du service Géoportail\n */\n call : function () {\n /* jshint validthis : true */\n this.logger.trace(\"CommonService::call ()\");\n\n var context = this;\n /** fonction d'execution */\n function run () {\n this.logger.trace(\"CommonService::run ()\");\n this.buildRequest.call(context, onError, onBuildRequest);\n }\n\n run.call(context);\n\n // callback de fin de construction de la requête\n function onBuildRequest (result) {\n this.logger.trace(\"CommonService::onBuildRequest : \", result);\n this.callService.call(context, onError, onCallService);\n }\n\n // callback de fin d'appel au service\n function onCallService (result) {\n this.logger.trace(\"CommonService::onCallService : \", result);\n this.analyzeResponse.call(context, onError, onAnalyzeResponse);\n }\n\n // callback de fin de lecture de la reponse\n function onAnalyzeResponse (result) {\n this.logger.trace(\"CommonService::onAnalyzeResponse : \", result);\n if (result) {\n this.options.onSuccess.call(this, result);\n } else {\n return onError.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"Analyse de la reponse en échec !?\"));\n }\n }\n\n // callback de gestion des erreurs : renvoit un objet de type ErrorService\n function onError (error) {\n this.logger.trace(\"CommonService::onError()\");\n // error : l'objet est du type ErrorService ou Error\n var e = error;\n if (!(e instanceof _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"])) {\n e = new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"](error.message);\n }\n this.options.onFailure.call(this, e);\n }\n },\n\n /**\n * Création de la requête\n * @param {Function} error - callback\n * @param {Function} success - callback\n */\n buildRequest : function (error, success) {\n // INFO\n this.logger.error(\"overwritten method !\");\n // retourne l'objet 'this.request'\n if (error) {\n error.call(this, \"This method must be overwritten !\");\n }\n success.call(this, \"This method must be overwritten !\");\n },\n\n /**\n * Appel du service\n * @param {Function} error - callback\n * @param {Function} success - callback\n */\n callService : function (error, success) {\n // INFO\n // retourne l'objet 'this.response'\n\n // NOTES\n // Pour le mode XHR, on recupère une reponse sous forme d'un json ou xml (#document).\n // Pour le mode JSONP, on a toujours un objet JSON mais sous 2 formes :\n // - natif\n // - XML encapsulé :\n // {http : {status:200, error:null},xml :'réponse du service'}\n // {http : {status:400, error:'reponse du service'},xml :null}\n // En XHR, la reponse est directement sauvegardée dans 'this.response'.\n // Par contre, en JSONP, on doit analyser la reponse (status ou non vide),\n // et ne renvoyer que le contenu (xml ou l'objet)\n\n // gestion de la proxification du service\n var strUrlProxified = null;\n var strData = this.request;\n\n // a t on mis en place un proxy ?\n // la proxyfication est valable uniquement en mode XHR !\n var bUrlProxified = !!(this.options.proxyURL && this.options.protocol === \"XHR\");\n\n // rajout de l'option gpbibaccess\n // INFO : acces au numero de version de package.conf aprés compilation !\n if (this.CLASSNAME !== \"Geocode\" && this.CLASSNAME !== \"ReverseGeocode\" && this.CLASSNAME !== \"AutoComplete\") {\n this.options.serverUrl = _Utils_Helper__WEBPACK_IMPORTED_MODULE_1__[\"default\"].normalyzeUrl(this.options.serverUrl, {\n \"gp-access-lib\" : _package_json__WEBPACK_IMPORTED_MODULE_6__.version,\n apiKey : this.options.apiKey || \"calcul\"\n }, false);\n }\n\n // si le proxy est renseigné, on proxifie l'url du service\n if (bUrlProxified) {\n if (this.options.httpMethod === \"GET\") {\n strUrlProxified = this.options.proxyURL + _Utils_Helper__WEBPACK_IMPORTED_MODULE_1__[\"default\"].normalyzeUrl(this.options.serverUrl, this.request, true);\n strData = null;\n }\n\n if (this.options.httpMethod === \"POST\") {\n strUrlProxified = this.options.proxyURL + _Utils_Helper__WEBPACK_IMPORTED_MODULE_1__[\"default\"].normalyzeUrl(this.options.serverUrl, null, true);\n strData = this.request;\n }\n }\n\n // contexte du composant spécifique !\n var self = this;\n\n var options = {\n url : strUrlProxified || this.options.serverUrl,\n method : this.options.httpMethod,\n protocol : this.options.protocol,\n timeOut : this.options.timeOut || 0,\n format : this.options.outputFormat, // ceci declenche le parsing de la reponse du service, mais on souhaite toujours une reponse brute (string) !\n nocache : this.options.nocache || false, // ceci permet d'ajouter un timestamp dans la requête\n wrap : this.options.protocol !== \"XHR\", // ceci declenche l'encapsulation de la reponse XML du service dans du JSON, mais pas en mode XHR !\n callbackSuffix : this.options.callbackSuffix,\n // callbackName : this.options.callbackName || null,\n data : strData,\n headers : null, // TODO...\n content : this.options.contentType || \"application/xml\",\n scope : this.options.scope || this,\n // callback de reponse\n onResponse : function (response) {\n self.logger.trace(\"callService::onResponse()\");\n\n // le contenu de la reponse à renvoyer !\n var content = null;\n\n // XHR : on renvoie toujours la reponse brute du service (json ou xml)\n // au parser du composant...\n if (self.options.protocol === \"XHR\") {\n self.logger.trace(\"Response XHR\", response);\n content = response; // par defaut, la reponse du service !\n }\n\n // JSONP : on pre-analyse la reponse brute du service (encapsuler ou pas)\n // avant de l'envoyer au parser du composant...\n if (self.options.protocol === \"JSONP\") {\n self.logger.trace(\"Response JSON\", response);\n if (response) {\n if (response.http) {\n // reponse encapsulée :\n // ex. reponse du service en xml\n // > {http : {status:200, error:null},xml :'réponse du service'}\n if (response.http.status !== 200) {\n error.call(self, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"]({\n status : response.http.status,\n message : response.http.error,\n type : _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"].TYPE_SRVERR\n }));\n return;\n } else {\n content = response.xml; // par defaut !\n if (self.options.rawResponse) {\n content = response;\n }\n }\n } else {\n // reponse non encapsulée :\n // ex. reponse du service en json ou xml\n content = response;\n }\n } else {\n error.call(self, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"Le contenu de la reponse est vide !?\"));\n return;\n }\n }\n\n // si on souhaite parser la reponse du service\n if (typeof self.options.onBeforeParse === \"function\") {\n var newResponse = self.options.onBeforeParse(content);\n if (typeof newResponse === \"string\") {\n // la reponse parsée par l'utilisateur est retournée sous\n // forme de string !\n content = newResponse;\n }\n }\n // sauvegarde de la reponse dans l'objet parent (CommonService)\n self.response = content;\n // on renvoie la reponse...\n success.call(self, content);\n },\n // callback des erreurs\n onFailure : function (e) {\n self.logger.trace(\"callService::onFailure()\");\n // on est forcement sur une erreur levée par un service !\n e.type = _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"].TYPE_SRVERR;\n error.call(self, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"](e));\n },\n // callback de timeOut\n onTimeOut : function () {\n self.logger.trace(\"callService::onTimeOut()\");\n error.call(self, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_4__[\"default\"](\"TimeOut!\"));\n }\n };\n\n _Protocols_Protocol__WEBPACK_IMPORTED_MODULE_3__[\"default\"].send(options);\n },\n\n /**\n * Analyse de la réponse\n * @param {Function} error - callback\n * @param {Function} success - callback\n */\n analyzeResponse : function (error, success) {\n // INFO\n this.logger.error(\"overwritten method !\");\n // retourne l'objet spécifique au type de composant (json)\n if (error) {\n error.call(this, \"This method must be overwritten !\");\n }\n success.call(this, \"This method must be overwritten !\");\n }\n\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (CommonService);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQ29tbW9uU2VydmljZS5qcz8xYjIyIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUE4QztBQUNUO0FBQ007QUFDRTtBQUNTO0FBQ0Y7QUFDcEQ7QUFDcUM7O0FBRXJDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFdBQVcsT0FBTztBQUNsQjtBQUNBLFdBQVcsT0FBTztBQUNsQjtBQUNBO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQSxXQUFXLFFBQVE7QUFDbkI7QUFDQTtBQUNBO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBLFdBQVcsT0FBTztBQUNsQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsV0FBVyxPQUFPO0FBQ2xCO0FBQ0E7QUFDQTtBQUNBO0F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J29wdGlvbiBncGJpYmFjY2Vzc1xuICAgICAgICAvLyBJTkZPIDogYWNjZXMgYXUgbnVtZXJvIGRlIHZlcnNpb24gZGUgcGFja2FnZS5jb25mIGFwcsOpcyBjb21waWxhdGlvbiAhXG4gICAgICAgIGlmICh0aGlzLkNMQVNTTkFNRSAhPT0gXCJHZW9jb2RlXCIgJiYgdGhpcy5DTEFTU05BTUUgIT09IFwiUmV2ZXJzZUdlb2NvZGVcIiAmJiB0aGlzLkNMQVNTTkFNRSAhPT0gXCJBdXRvQ29tcGxldGVcIikge1xuICAgICAgICAgICAgdGhpcy5vcHRpb25zLnNlcnZlclVybCA9IEhlbHBlci5ub3JtYWx5emVVcmwodGhpcy5vcHRpb25zLnNlcnZlclVybCwge1xuICAgICAgICAgICAgICAgIFwiZ3AtYWNjZXNzLWxpYlwiIDogUGtnLnZlcnNpb24sXG4gICAgICAgICAgICAgICAgYXBpS2V5IDogdGhpcy5vcHRpb25zLmFwaUtleSB8fCBcImNhbGN1bFwiXG4gICAgICAgICAgICB9LCBmYWxzZSk7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBzaSBsZSBwcm94eSBlc3QgcmVuc2VpZ27DqSwgb24gcHJveGlmaWUgbCd1cmwgZHUgc2VydmljZVxuICAgICAgICBpZiAoYlVybFByb3hpZmllZCkge1xuICAgICAgICAgICAgaWYgKHRoaXMub3B0aW9ucy5odHRwTWV0aG9kID09PSBcIkdFVFwiKSB7XG4gICAgICAgICAgICAgICAgc3RyVXJsUHJveGlmaWVkID0gdGhpcy5vcHRpb25zLnByb3h5VVJMICsgSGVscGVyLm5vcm1hbHl6ZVVybCh0aGlzLm9wdGlvbnMuc2VydmVyVXJsLCB0aGlzLnJlcXVlc3QsIHRydWUpO1xuICAgICAgICAgICAgICAgIHN0ckRhdGEgPSBudWxsO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodGhpcy5vcHRpb25zLmh0dHBNZXRob2QgPT09IFwiUE9TVFwiKSB7XG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bmNhcHN1bGF0aW9uIGRlIGxhIHJlcG9uc2UgWE1MIGR1IHNlcnZpY2UgZGFucyBkdSBKU09OLCBtYWlzIHBhcyBlbiBtb2RlIFhIUiAhXG4gICAgICAgICAgICBjYWxsYmFja1N1ZmZpeCA6IHRoaXMub3B0aW9ucy5jYWxsYmFja1N1ZmZpeCxcbiAgICAgICAgICAgIC8vIGNhbGxiYWNrTmFtZSA6IHRoaXMub3B0aW9ucy5jYWxsYmFja05hbWUgfHwgbnVsbCxcbiAgICAgICAgICAgIGRhdGEgOiBzdHJEYXRhLFxuICAgICAgICAgICAgaGVhZGVycyA6IG51bGwsIC8vIFRPRE8uLi5cbiAgICAgICAgICAgIGNvbnRlbnQgOiB0aGlzLm9wdGlvbnMuY29udGVudFR5cGUgfHwgXCJhcHBsaWNhdGlvbi94bWxcIixcbiAgICAgICAgICAgIHNjb3BlIDogdGhpcy5vcHRpb25zLnNjb3BlIHx8IHRoaXMsXG4gICAgICAgICAgICAvLyBjYWxsYmFjayBkZSByZXBvbnNlXG4gICAgICAgICAgICBvblJlc3BvbnNlIDogZnVuY3Rpb24gKHJlc3BvbnNlKSB7XG4gICAgICAgICAgICAgICAgc2VsZi5sb2dnZXIudHJhY2UoXCJjYWxsU2VydmljZTo6b25SZXNwb25zZSgpXCIpO1xuXG4gICAgICAgICAgICAgICAgLy8gbGUgY29udGVudSBkZSBsYSByZXBvbnNlIMOgIHJlbnZveWVyICFcbiAgICAgICAgICAgICAgICB2YXIgY29udGVudCA9IG51bGw7XG5cbiAgICAgICAgICAgICAgICAvLyBYSFIgOiBvbiByZW52b2llIHRvdWpvdXJzIGxhIHJlcG9uc2UgYnJ1dGUgZHUgc2VydmljZSAoanNvbiBvdSB4bWwpXG4gICAgICAgICAgICAgICAgLy8gYXUgcGFyc2VyIGR1IGNvbXBvc2FudC4uLlxuICAgICAgICAgICAgICAgIGlmIChzZWxmLm9wdGlvbnMucHJvdG9jb2wgPT09IFwiWEhSXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5sb2dnZXIudHJhY2UoXCJSZXNwb25zZSBYSFJcIiwgcmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICBjb250ZW50ID0gcmVzcG9uc2U7IC8vIHBhciBkZWZhdXQsIGxhIHJlcG9uc2UgZHUgc2VydmljZSAgIVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIEpTT05QIDogb24gcHJlLWFuYWx5c2UgbGEgcmVwb25zZSBicnV0ZSBkdSBzZXJ2aWNlIChlbmNhcHN1bGVyIG91IHBhcylcbiAgICAgICAgICAgICAgICAvLyBhdmFudCBkZSBsJ2Vudm95ZXIgYXUgcGFyc2VyIGR1IGNvbXBvc2FudC4uLlxuICAgICAgICAgICAgICAgIGlmIChzZWxmLm9wdGlvbnMucHJvdG9jb2wgPT09IFwiSlNPTlBcIikge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLmxvZ2dlci50cmFjZShcIlJlc3BvbnNlIEpTT05cIiwgcmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS5odHRwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gcmVwb25zZSBlbmNhcHN1bMOpZSA6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gZXguIHJlcG9uc2UgZHUgc2VydmljZSBlbiB4bWxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyA+IHtodHRwIDoge3N0YXR1czoyMDAsIGVycm9yOm51bGx9LHhtbCA6J3LDqXBvbnNlIGR1IHNlcnZpY2UnfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS5odHRwLnN0YXR1cyAhPT0gMjAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yLmNhbGwoc2VsZiwgbmV3IEVycm9yU2VydmljZSh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMgOiByZXNwb25zZS5odHRwLnN0YXR1cyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgOiByZXNwb25zZS5odHRwLmVycm9yLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZSA6IEVycm9yU2VydmljZS5UWVBFX1NSVkVSUlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50ID0gcmVzcG9uc2UueG1sOyAvLyBwYXIgZGVmYXV0ICFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNlbGYub3B0aW9ucy5yYXdSZXNwb25zZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudCA9IHJlc3BvbnNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyByZXBvbnNlIG5vbiBlbmNhcHN1bMOpZSA6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gZXguIHJlcG9uc2UgZHUgc2VydmljZSBlbiBqc29uIG91IHhtbFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnQgPSByZXNwb25zZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yLmNhbGwoc2VsZiwgbmV3IEVycm9yU2VydmljZShcIkxlIGNvbnRlbnUgZGUgbGEgcmVwb25zZSBlc3QgdmlkZSAhP1wiKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBzaSBvbiBzb3VoYWl0ZSBwYXJzZXIgbGEgcmVwb25zZSBkdSBzZXJ2aWNlXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBzZWxmLm9wdGlvbnMub25CZWZvcmVQYXJzZSA9PT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBuZXdSZXNwb25zZSA9IHNlbGYub3B0aW9ucy5vbkJlZm9yZVBhcnNlKGNvbnRlbnQpO1xuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG5ld1Jlc3BvbnNlID09PSBcInN0cmluZ1wiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBsYSByZXBvbnNlIHBhcnPDqWUgcGFyIGwndXRpbGlzYXRldXIgZXN0IHJldG91cm7DqWUgc291c1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gZm9ybWUgZGUgc3RyaW5nICFcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnQgPSBuZXdSZXNwb25zZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBzYXV2ZWdhcmRlIGRlIGxhIHJlcG9uc2UgZGFucyBsJ29iamV0IHBhcmVudCAoQ29tbW9uU2VydmljZSlcbiAgICAgICAgICAgICAgICBzZWxmLnJlc3BvbnNlID0gY29udGVudDtcbiAgICAgICAgICAgICAgICAvLyBvbiByZW52b2llIGxhIHJlcG9uc2UuLi5cbiAgICAgICAgICAgICAgICBzdWNjZXNzLmNhbGwoc2VsZiwgY29udGVudCk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgLy8gY2FsbGJhY2sgZGVzIGVycmV1c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ZCAhXCIpO1xuICAgICAgICAvLyByZXRvdXJuZSBsJ29iamV0IHNww6ljaWZpcXVlIGF1IHR5cGUgZGUgY29tcG9zYW50IChqc29uKVxuICAgICAgICBpZiAoZXJyb3IpIHtcbiAgICAgICAgICAgIGVycm9yLmNhbGwodGhpcywgXCJUaGlzIG1ldGhvZCBtdXN0IGJlIG92ZXJ3cml0dGVuICFcIik7XG4gICAgICAgIH1cbiAgICAgICAgc3VjY2Vzcy5jYWxsKHRoaXMsIFwiVGhpcyBtZXRob2QgbXVzdCBiZSBvdmVyd3JpdHRlbiAhXCIpO1xuICAgIH1cblxufTtcblxuZXhwb3J0IGRlZmF1bHQgQ29tbW9uU2VydmljZTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/CommonService.js\n"); /***/ }), @@ -548,7 +560,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Uti /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../CommonService */ \"./node_modules/geoportal-access-lib/src/Services/CommonService.js\");\n/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../DefaultUrlService */ \"./node_modules/geoportal-access-lib/src/Services/DefaultUrlService.js\");\n/* harmony import */ var _ConfigInterface__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ConfigInterface */ \"./node_modules/geoportal-access-lib/src/Services/Config/ConfigInterface.js\");\n\n\n\n\n\n\n/**\n * @classdesc\n *\n * Recupération de la configuration de clés Géoportail sous forme de JSON\n *\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.Config\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n * @param {Sting} options.apiKey - clé(s) dont on veut obtenir la configuration. Si plusieurs clés, séparer chacune par une virgule\n * @param {Boolean} [options.sync=false] - force le mode synchrone\n * @param {String} options.customConfigFile - chemin vers un fichier de configuration personnalisé. Surcharge le paramètre apiKey.\n *\n * @example\n * var options = {\n * apiKey : \"cartes,ortho\",\n * sync : false,\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * };\n *\n */\nfunction Config (options) {\n if (!(this instanceof Config)) {\n throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"CLASS_CONSTRUCTOR\", \"Config\"));\n }\n\n /**\n * Nom de la classe (heritage)\n */\n this.CLASSNAME = \"Config\";\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"Gp.Config\");\n this.logger.trace(\"[Constructeur Config (options)]\");\n\n // #####################\n // analyse des options\n // #####################\n\n // gestion du callback onSuccess\n var bOnSuccess = !!(options.onSuccess !== null && typeof options.onSuccess === \"function\");\n if (!bOnSuccess) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"onSuccess()\"));\n }\n if (!options.apiKey && !options.customConfigFile) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"apiKey\", \"customConfigFile\"));\n }\n this.options = {};\n this.options.onSuccess = options.onSuccess;\n this.options.onFailure = options.onFailure;\n\n // mode sync\n this.options.sync = options.sync || false;\n\n // gestion d'un tableau d'url des fichiers de configuration\n this.options.listConfigUrls = (options.customConfigFile)\n ? [options.customConfigFile]\n : !Array.isArray(options.apiKey)\n ? _DefaultUrlService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].Config.url(options.apiKey.split(\",\"))\n : _DefaultUrlService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].Config.url(options.apiKey);\n}\n\n/**\n * @lends module:Config#\n */\nConfig.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].prototype, {\n // todo\n // getter/setter\n});\n\n/**\n * Constructeur (alias)\n */\nConfig.prototype.constructor = Config;\n\n/**\n * Création de la requête\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n * @overload\n */\nConfig.prototype.buildRequest = function (error, success) {\n // liste des urls des fichiers de configuration en JSON\n this.listConfigUrls = this.options.listConfigUrls;\n\n if (!this.listConfigUrls) {\n error.call(this, new Error(\"url by default not found !\"));\n return;\n }\n\n // INFO :\n // il n'y a pas de construction de requête,\n // on passe directement à l'appel des requêtes\n success.call(this, this.listConfigUrls);\n};\n\n/**\n * Récupération des configuration\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n * @overload\n */\nConfig.prototype.callService = function (error, success) {\n if (this.options.sync) {\n __callServiceSync.call(this, error, success);\n } else {\n __callService.call(this, error, success);\n }\n};\n\n/**\n * Requêtes en mode asynchrone\n *\n * @param {*} error\n * @param {*} success\n * @private\n */\nvar __callService = function (error, success) {\n // liste des resultats au format JSON\n this.listConfigResults = [];\n\n // test on env. nodejs or browser\n let Fetch = null;\n if (typeof window === \"undefined\") {\n var nodefetch = __webpack_require__(/*! node-fetch */ \"node-fetch\");\n Fetch = nodefetch;\n } else {\n Fetch = window.fetch;\n }\n\n // the factory of fetch !\n var fetchFactory = (url) => {\n return Fetch(url, { credentials : \"same-origin\" })\n .then((response) => {\n if (response.ok) {\n return response.json()\n .then((json) => {\n // TODO :\n // tester le contenu !\n return json;\n })\n .catch((error) => {\n throw new Error(\"Exception Json : \" + error);\n });\n } else {\n throw new Error(\"Exception HTTP : \" + response.status + \" (status code) !\");\n }\n })\n .catch((error) => {\n return new Promise((resolve, reject) => {\n // eslint-disable-line no-unused-vars\n reject(error);\n });\n });\n };\n\n // construction des promises fetch\n var promises = [];\n for (let index = 0; index < this.listConfigUrls.length; index++) {\n const url = this.listConfigUrls[index];\n promises.push(fetchFactory(url));\n }\n\n Promise.all(promises)\n .then((results) => {\n if (!results) {\n throw new Error(\"results config empty !?\");\n }\n results.forEach((result) => {\n // TODO :\n // verification des resultats\n this.listConfigResults.push(result);\n });\n })\n .then(() => {\n success.call(this, this.listConfigResults);\n })\n .catch((e) => {\n // TODO :\n // construction d'un message\n error.call(this, e);\n });\n};\n\n/**\n * Requêtes en mode synchrone\n *\n * @param {*} error\n * @param {*} success\n * @private\n */\nvar __callServiceSync = function (error, success) {\n // liste des resultats au format JSON\n this.listConfigResults = [];\n\n // FIXME :\n // boucle synchrone !\n for (var i = 0; i < this.listConfigUrls.length; i++) {\n const url = this.listConfigUrls[i];\n // TODO :\n // prévoir le CORS, headers, ...\n const request = new XMLHttpRequest();\n request.open(\"GET\", url, false);\n request.send(null);\n if (request.status === 200) {\n // TODO :\n // tester la reponse !\n var response = JSON.parse(request.responseText);\n this.listConfigResults.push(response);\n }\n }\n // callback\n if (this.listConfigResults.length !== 0) {\n success.call(this, this.listConfigResults);\n } else {\n error.call(this, new Error(\"...\"));\n }\n};\n\n/**\n * Analyse et mise en forme de la réponse en fusionnant les configurations\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n * @overload\n */\nConfig.prototype.analyzeResponse = function (error, success) {\n // fonction de merge des objects JSON\n var mergeConfig = function (objects) {\n // objet fusion des couches\n var allLayersConfig = {};\n // objet fusion des clés\n var allKeysConfig = {};\n // objet fusion des TMS\n var allTMSConfig = {};\n\n // on fusionne les résultat\n for (var i = 0; i < objects.length; i++) {\n if (!objects[i].generalOptions || !objects[i].layers) {\n return;\n }\n allKeysConfig = {\n ...allKeysConfig,\n ...objects[i].generalOptions.apiKeys\n };\n allLayersConfig = {\n ...allLayersConfig,\n ...objects[i].layers\n };\n allTMSConfig = {\n ...allTMSConfig,\n ...objects[i].tileMatrixSets\n };\n }\n\n var mergedConfig = {\n generalOptions : {\n apiKeys : allKeysConfig\n },\n layers : allLayersConfig,\n tileMatrixSets : allTMSConfig\n };\n return mergedConfig;\n };\n\n // fusion des configurations JSON\n var ConfigJSON = mergeConfig(this.listConfigResults);\n if (!ConfigJSON) {\n error.call(this, new Error(\"configuration structure not conforme !\"));\n return;\n }\n\n // creation des interfaces\n var IConfig = new _ConfigInterface__WEBPACK_IMPORTED_MODULE_4__[\"default\"]();\n // ajout des interfaces avec la configuration JSON\n Object.assign(IConfig, ConfigJSON);\n\n // définition de la variable globale Gp.Config\n var scope = typeof window !== \"undefined\" ? window : {};\n if (!scope.Gp) {\n scope.Gp = {};\n }\n\n // enregistrement\n if (scope.Gp.Config) {\n Object.assign(scope.Gp.Config, IConfig);\n // dans le doute..., ceinture et bretelles !\n for (var property in IConfig) {\n scope.Gp.Config[property] = IConfig[property];\n }\n } else {\n scope.Gp.Config = IConfig;\n }\n\n // INFO :\n // il n'y a pas d'analyse des résultats,\n // on passe directement à l'appel de la callback utilisateur\n success.call(this, scope.Gp.Config);\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Config);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQ29uZmlnL0NvbmZpZy5qcz9lZjhmIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFpRDtBQUNIO0FBQ0Q7QUFDUTtBQUNMOztBQUVoRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxh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0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBUT0RPIDpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB0ZXN0ZXIgbGUgY29udGVudSAhXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGpzb247XG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgLmNhdGNoKChlcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIkV4Y2VwdGlvbiBKc29uIDogXCIgKyBlcnJvcik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJFeGNlcHRpb24gSFRUUCA6IFwiICsgcmVzcG9uc2Uuc3RhdHVzICsgXCIgKHN0YXR1cyBjb2RlKSAhXCIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAuY2F0Y2goKGVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby11bnVzZWQtdmFyc1xuICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgfTtcblxuICAgIC8vIGNvbnN0cnVjdGlvbiBkZXMgcHJvbWlzZXMgZmV0Y2hcbiAgICB2YXIgcHJvbWlzZXMgPSBbXTtcbiAgICBmb3IgKGxldCBpbmRleCA9IDA7IGluZGV4IDwgdGhpcy5saXN0Q29uZmlnVXJscy5sZW5ndGg7IGluZGV4KyspIHtcbiAgICAgICAgY29uc3QgdXJsID0gdGhpcy5saXN0Q29uZmlnVXJsc1tpbmRleF07XG4gICAgICAgIHByb21pc2VzLnB1c2goZmV0Y2hGYWN0b3J5KHVybCkpO1xuICAgIH1cblxuICAgIFByb21pc2UuYWxsKHByb21pc2VzKVxuICAgICAgICAudGhlbigocmVzdWx0cykgPT4ge1xuICAgICAgICAgICAgaWYgKCFyZXN1bHRzKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwicmVzdWx0cyBjb25maWcgZW1wdHkgIT9cIik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXN1bHRzLmZvckVhY2goKHJlc3VsdCkgPT4ge1xuICAgICAgICAgICAgICAgIC8vIFRPRE8gOlxuICAgICAgICAgICAgICAgIC8vIHZlcmlmaWNhdGlvbiBkZXMgcmVzdWx0YXRzXG4gICAgICAgICAgICAgICAgdGhpcy5saXN0Q29uZmlnUmVzdWx0cy5wdXNoKHJlc3VsdCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSlcbiAgICAgICAgLnRoZW4oKCkgPT4ge1xuICAgICAgICAgICAgc3VjY2Vzcy5jYWxsKHRoaXMsIHRoaXMubGlzdENvbmZpZ1Jlc3VsdHMpO1xuICAgICAgICB9KVxuICAgICAgICAuY2F0Y2goKGUpID0+IHtcbiAgICAgICAgICAgIC8vIFRPRE8gOlxuICAgICAgICAgICAgLy8gY29uc3RydWN0aW9uIGQndW4gbWVzc2FnZVxuICAgICAgICAgICAgZXJyb3IuY2FsbCh0aGlzLCBlKTtcbiAgICAgICAgfSk7XG59O1xuXG4vKipcbiAqIFJlcXXDqnRlcyBlbiBtb2RlIHN5bmNocm9uZVxuICpcbiAqIEBwYXJhbSB7Kn0gZXJyb3JcbiAqIEBwYXJhbSB7Kn0gc3VjY2Vzc1xuICogQHByaXZhdGVcbiAqL1xudmFyIF9fY2FsbFNlcnZpY2VTeW5jID0gZnVuY3Rpb24gKGVycm9yLCBzdWNjZXNzKSB7XG4gICAgLy8gbGlzdGUgZGVzIHJlc3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5nZW5lcmFsT3B0aW9ucy5hcGlLZXlzXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgYWxsTGF5ZXJzQ29uZmlnID0ge1xuICAgICAgICAgICAgICAgIC4uLmFsbExheWVyc0NvbmZpZyxcbiAgICAgICAgICAgICAgICAuLi5vYmplY3RzW2ldLmxheWVyc1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGFsbFRNU0NvbmZpZyA9IHtcbiAgICAgICAgICAgICAgICAuLi5hbGxUTVNDb25maWcsXG4gICAgICAgICAgICAgICAgLi4ub2JqZWN0c1tpXS50aWxlTWF0cml4U2V0c1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBtZXJnZWRDb25maWcgPSB7XG4gICAgICAgICAgICBnZW5lcmFsT3B0aW9ucyA6IHtcbiAgICAgICAgICAgICAgICBhcGlLZXlzIDogYWxsS2V5c0NvbmZpZ1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGxheWVycyA6IGFsbExheWVyc0NvbmZpZyxcbiAgICAgICAgICAgIHRpbGVNYXRyaXhTZXRzIDogYWxsVE1TQ29uZmlnXG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBtZXJnZWRDb25maWc7XG4gICAgfTtcblxuICAgIC8vIGZ1c2lvbiBkZXMgY29uZmlndXJhdGlvbnMgSlNPTlxuICAgIHZhciBDb25maWdKU09OID0gbWVyZ2VDb25maWcodGhpcy5saXN0Q29uZmlnUmVzdWx0cyk7XG4gICAgaWYgKCFDb25maWdKU09OKSB7XG4gICAgICAgIGVycm9yLmNhbGwodGhpcywgbmV3IEVycm9yKFwiY29uZmlndXJhdGlvbiBzdHJ1Y3R1cmUgbm90IGNvbmZvcm1lICFcIikpO1xuICAgICAgICByZXR1cm47XG4gICAgfVxuXG4gICAgLy8gY3JlYXRpb24gZGVzIGludGVyZmFjZXNcbiAgICB2YXIgSUNvbmZpZyA9IG5ldyBDb25maWdJbnRlcmZhY2UoKTtcbiAg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# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Config/Config.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../CommonService */ \"./node_modules/geoportal-access-lib/src/Services/CommonService.js\");\n/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../DefaultUrlService */ \"./node_modules/geoportal-access-lib/src/Services/DefaultUrlService.js\");\n/* harmony import */ var _ConfigInterface__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ConfigInterface */ \"./node_modules/geoportal-access-lib/src/Services/Config/ConfigInterface.js\");\n\n\n\n\n\n\n/**\n * @classdesc\n *\n * Recupération de la configuration de clés Géoportail sous forme de JSON\n *\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.Config\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n * @param {Sting} options.apiKey - clé(s) dont on veut obtenir la configuration. Si plusieurs clés, séparer chacune par une virgule\n * @param {Boolean} [options.sync=false] - force le mode synchrone\n * @param {String} options.customConfigFile - chemin vers un fichier de configuration personnalisé. Surcharge le paramètre apiKey.\n *\n * @example\n * var options = {\n * apiKey : \"cartes,ortho\",\n * sync : false,\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * };\n *\n */\nfunction Config (options) {\n if (!(this instanceof Config)) {\n throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"CLASS_CONSTRUCTOR\", \"Config\"));\n }\n\n /**\n * Nom de la classe (heritage)\n */\n this.CLASSNAME = \"Config\";\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"Gp.Config\");\n this.logger.trace(\"[Constructeur Config (options)]\");\n\n // #####################\n // analyse des options\n // #####################\n\n // gestion du callback onSuccess\n var bOnSuccess = !!(options.onSuccess !== null && typeof options.onSuccess === \"function\");\n if (!bOnSuccess) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"onSuccess()\"));\n }\n if (!options.apiKey && !options.customConfigFile) {\n // si pas de thème spécifié, on récupère toutes les ressources possibles dans l'objet Config\n options.apiKey = \"full\";\n }\n this.options = {};\n this.options.onSuccess = options.onSuccess;\n this.options.onFailure = options.onFailure;\n\n // mode sync\n this.options.sync = options.sync || false;\n\n // gestion d'un tableau d'url des fichiers de configuration\n this.options.listConfigUrls = (options.customConfigFile)\n ? [options.customConfigFile]\n : !Array.isArray(options.apiKey)\n ? _DefaultUrlService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].Config.url(options.apiKey.split(\",\"))\n : _DefaultUrlService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].Config.url(options.apiKey);\n}\n\n/**\n * @lends module:Config#\n */\nConfig.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_2__[\"default\"].prototype, {\n // todo\n // getter/setter\n});\n\n/**\n * Constructeur (alias)\n */\nConfig.prototype.constructor = Config;\n\n/**\n * Création de la requête\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n * @overload\n */\nConfig.prototype.buildRequest = function (error, success) {\n // liste des urls des fichiers de configuration en JSON\n this.listConfigUrls = this.options.listConfigUrls;\n\n if (!this.listConfigUrls) {\n error.call(this, new Error(\"url by default not found !\"));\n return;\n }\n\n // INFO :\n // il n'y a pas de construction de requête,\n // on passe directement à l'appel des requêtes\n success.call(this, this.listConfigUrls);\n};\n\n/**\n * Récupération des configuration\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n * @overload\n */\nConfig.prototype.callService = function (error, success) {\n if (this.options.sync) {\n __callServiceSync.call(this, error, success);\n } else {\n __callService.call(this, error, success);\n }\n};\n\n/**\n * Requêtes en mode asynchrone\n *\n * @param {*} error\n * @param {*} success\n * @private\n */\nvar __callService = function (error, success) {\n // liste des resultats au format JSON\n this.listConfigResults = [];\n\n // test on env. nodejs or browser\n let Fetch = null;\n if (typeof window === \"undefined\") {\n var nodefetch = __webpack_require__(/*! node-fetch */ \"node-fetch\");\n Fetch = nodefetch;\n } else {\n Fetch = window.fetch;\n }\n\n // the factory of fetch !\n var fetchFactory = (url) => {\n return Fetch(url, { credentials : \"same-origin\" })\n .then((response) => {\n if (response.ok) {\n return response.json()\n .then((json) => {\n // TODO :\n // tester le contenu !\n return json;\n })\n .catch((error) => {\n throw new Error(\"Exception Json : \" + error);\n });\n } else {\n throw new Error(\"Exception HTTP : \" + response.status + \" (status code) !\");\n }\n })\n .catch((error) => {\n return new Promise((resolve, reject) => {\n // eslint-disable-line no-unused-vars\n reject(error);\n });\n });\n };\n\n // construction des promises fetch\n var promises = [];\n for (let index = 0; index < this.listConfigUrls.length; index++) {\n const url = this.listConfigUrls[index];\n promises.push(fetchFactory(url));\n }\n\n Promise.all(promises)\n .then((results) => {\n if (!results) {\n throw new Error(\"results config empty !?\");\n }\n results.forEach((result) => {\n // TODO :\n // verification des resultats\n this.listConfigResults.push(result);\n });\n })\n .then(() => {\n success.call(this, this.listConfigResults);\n })\n .catch((e) => {\n // TODO :\n // construction d'un message\n error.call(this, e);\n });\n};\n\n/**\n * Requêtes en mode synchrone\n *\n * @param {*} error\n * @param {*} success\n * @private\n */\nvar __callServiceSync = function (error, success) {\n // liste des resultats au format JSON\n this.listConfigResults = [];\n\n // FIXME :\n // boucle synchrone !\n for (var i = 0; i < this.listConfigUrls.length; i++) {\n const url = this.listConfigUrls[i];\n // TODO :\n // prévoir le CORS, headers, ...\n const request = new XMLHttpRequest();\n request.open(\"GET\", url, false);\n request.send(null);\n if (request.status === 200) {\n // TODO :\n // tester la reponse !\n var response = JSON.parse(request.responseText);\n this.listConfigResults.push(response);\n }\n }\n // callback\n if (this.listConfigResults.length !== 0) {\n success.call(this, this.listConfigResults);\n } else {\n error.call(this, new Error(\"...\"));\n }\n};\n\n/**\n * Analyse et mise en forme de la réponse en fusionnant les configurations\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n * @overload\n */\nConfig.prototype.analyzeResponse = function (error, success) {\n // fonction de merge des objects JSON\n var mergeConfig = function (objects) {\n // objet fusion des couches\n var allLayersConfig = {};\n // objet fusion des clés\n var allKeysConfig = {};\n // objet fusion des TMS\n var allTMSConfig = {};\n\n // on fusionne les résultat\n for (var i = 0; i < objects.length; i++) {\n if (!objects[i].generalOptions || !objects[i].layers) {\n return;\n }\n allKeysConfig = {\n ...allKeysConfig,\n ...objects[i].generalOptions.apiKeys\n };\n allLayersConfig = {\n ...allLayersConfig,\n ...objects[i].layers\n };\n allTMSConfig = {\n ...allTMSConfig,\n ...objects[i].tileMatrixSets\n };\n }\n\n var mergedConfig = {\n generalOptions : {\n apiKeys : allKeysConfig\n },\n layers : allLayersConfig,\n tileMatrixSets : allTMSConfig\n };\n return mergedConfig;\n };\n\n // fusion des configurations JSON\n var ConfigJSON = mergeConfig(this.listConfigResults);\n if (!ConfigJSON) {\n error.call(this, new Error(\"configuration structure not conforme !\"));\n return;\n }\n\n // creation des interfaces\n var IConfig = new _ConfigInterface__WEBPACK_IMPORTED_MODULE_4__[\"default\"]();\n // ajout des interfaces avec la configuration JSON\n Object.assign(IConfig, ConfigJSON);\n\n // définition de la variable globale Gp.Config\n var scope = typeof window !== \"undefined\" ? window : {};\n if (!scope.Gp) {\n scope.Gp = {};\n }\n\n // enregistrement\n if (scope.Gp.Config) {\n Object.assign(scope.Gp.Config, IConfig);\n // dans le doute..., ceinture et bretelles !\n for (var property in IConfig) {\n scope.Gp.Config[property] = IConfig[property];\n }\n } else {\n scope.Gp.Config = IConfig;\n }\n\n // INFO :\n // il n'y a pas d'analyse des résultats,\n // on passe directement à l'appel de la callback utilisateur\n success.call(this, scope.Gp.Config);\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Config);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQ29uZmlnL0NvbmZpZy5qcz9lZjhmIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFpRDtBQUNIO0FBQ0Q7QUFDUTtBQUNMOztBQUVoRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxhQUFhO0FBQ2I7QUFDQSxXQUFXLE9BQU87QUFDbEIsV0FBVyxNQUFNO0FBQ2pCLFdBQVcsUUFBUTtBQUNuQixXQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDBDQUEwQztBQUMxQyx1Q0FBdUM7QUFDdkM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDRCQUE0QixnRUFBQztBQUM3Qjs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQSxrQkFBa0IsOERBQU07QUFDeEI7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLHdCQUF3QixnRUFBQztBQUN6QjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQSxjQUFjLDBEQUFpQjtBQUMvQixjQUFjLDBEQUFpQjtBQUMvQjs7QUFFQ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udWxsO1xuICAgIGlmICh0eXBlb2Ygd2luZG93ID09PSBcInVuZGVmaW5lZFwiKSB7XG4gICAgICAgIHZhciBub2RlZmV0Y2ggPSByZXF1aXJlKFwibm9kZS1mZXRjaFwiKTtcbiAgICAgICAgRmV0Y2ggPSBub2RlZmV0Y2g7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgRmV0Y2ggPSB3aW5kb3cuZmV0Y2g7XG4gICAgfVxuXG4gICAgLy8gdGhlIGZhY3Rvcnkgb2YgZmV0Y2ggIVxuICAgIHZhciBmZXRjaEZhY3RvcnkgPSAodXJsKSA9PiB7XG4gICAgICAgIHJldHVybiBGZXRjaCh1cmwsIHsgY3JlZGVudGlhbHMgOiBcInNhbWUtb3JpZ2luXCIgfSlcbiAgICAgICAgICAgIC50aGVuKChyZXNwb25zZSkgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZS5vaykge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzcG9uc2UuanNvbigpXG4gICAgICAgICAgICAgICAgICAgICAgICAudGhlbigoanNvbikgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRPRE8gOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRlc3RlciBsZSBjb250ZW51ICFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ganNvbjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAuY2F0Y2goKGVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwiRXhjZXB0aW9uIEpzb24gOiBcIiArIGVycm9yKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIkV4Y2VwdGlvbiBIVFRQIDogXCIgKyByZXNwb25zZS5zdGF0dXMgKyBcIiAoc3RhdHVzIGNvZGUpICFcIik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5jYXRjaCgoZXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLXVudXNlZC12YXJzXG4gICAgICAgICAgICAgICAgICAgIHJlamVjdChlcnJvcik7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICB9O1xuXG4gICAgLy8gY29uc3RydWN0aW9uIGRlcyBwcm9taXNlcyBmZXRjaFxuICAgIHZhciBwcm9taXNlcyA9IFtdO1xuICAgIGZvciAobGV0IGluZGV4ID0gMDsgaW5kZXggPCB0aGlzLmxpc3RDb25maWdVcmxzLmxlbmd0aDsgaW5kZXgrKykge1xuICAgICAgICBjb25zdCB1cmwgPSB0aGlzLmxpc3RDb25maWdVcmxzW2luZGV4XTtcbiAgICAgICAgcHJvbWlzZXMucHVzaChmZXRjaEZhY3RvcnkodXJsKSk7XG4gICAgfVxuXG4gICAgUHJvbWlzZS5hbGwocHJvbWlzZXMpXG4gICAgICAgIC50aGVuKChyZXN1bHRzKSA9PiB7XG4gICAgICAgICAgICBpZiAoIXJlc3VsdHMpIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJyZXN1bHRzIGNvbmZpZyBlbXB0eSAhP1wiKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlc3VsdHMuZm9yRWFjaCgocmVzdWx0KSA9PiB7XG4gICAgICAgICAgICAgICAgLy8gVE9ETyA6XG4gICAgICAgICAgICAgICAgLy8gdmVyaWZpY2F0aW9uIGRlcyByZXN1bHRhdHNcbiAgICAgICAgICAgICAgICB0aGlzLmxpc3RDb25maWdSZXN1bHRzL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mFyIGFsbExheWVyc0NvbmZpZyA9IHt9O1xuICAgICAgICAvLyBvYmpldCBmdXNpb24gZGVzIGNsw6lzXG4gICAgICAgIHZhciBhbGxLZXlzQ29uZmlnID0ge307XG4gICAgICAgIC8vIG9iamV0IGZ1c2lvbiBkZXMgVE1TXG4gICAgICAgIHZhciBhbGxUTVNDb25maWcgPSB7fTtcblxuICAgICAgICAvLyBvbiBmdXNpb25uZSBsZXMgcsOpc3VsdGF0XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgb2JqZWN0cy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgaWYgKCFvYmplY3RzW2ldLmdlbmVyYWxPcHRpb25zIHx8ICFvYmplY3RzW2ldLmxheWVycykge1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGFsbEtleXNDb25maWcgPSB7XG4gICAgICAgICAgICAgICAgLi4uYWxsS2V5c0NvbmZpZyxcbiAgICAgICAgICAgICAgICAuLi5vYmplY3RzW2ldLmdlbmVyYWxPcHRpb25zLmFwaUtleXNcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBhbGxMYXllcnNDb25maWcgPSB7XG4gICAgICAgICAgICAgICAgLi4uYWxsTGF5ZXJzQ29uZmlnLFxuICAgICAgICAgICAgICAgIC4uLm9iamVjdHNbaV0ubGF5ZXJzXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgYWxsVE1TQ29uZmlnID0ge1xuICAgICAgICAgICAgICAgIC4uLmFsbFRNU0NvbmZpZyxcbiAgICAgICAgICAgICAgICAuLi5vYmplY3RzW2ldLnRpbGVNYXRyaXhTZXRzXG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIG1lcmdlZENvbmZpZyA9IHtcbiAgICAgICAgICAgIGdlbmVyYWxPcHRpb25zIDoge1xuICAgICAgICAgICAgICAgIGFwaUtleXMgOiBhbGxLZXlzQ29uZmlnXG4gICAgICA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LyBkYW5zIGxlIGRvdXRlLi4uLCBjZWludHVyZSBldCBicmV0ZWxsZXMgIVxuICAgICAgICBmb3IgKHZhciBwcm9wZXJ0eSBpbiBJQ29uZmlnKSB7XG4gICAgICAgICAgICBzY29wZS5HcC5Db25maWdbcHJvcGVydHldID0gSUNvbmZpZ1twcm9wZXJ0eV07XG4gICAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgICBzY29wZS5HcC5Db25maWcgPSBJQ29uZmlnO1xuICAgIH1cblxuICAgIC8vIElORk8gOlxuICAgIC8vIGlsIG4neSBhIHBhcyBkJ2FuYWx5c2UgZGVzIHLDqXN1bHRhdHMsXG4gICAgLy8gb24gcGFzc2UgZGlyZWN0ZW1lbnQgw6AgbCdhcHBlbCBkZSBsYSBjYWxsYmFjayB1dGlsaXNhdGV1clxuICAgIHN1Y2Nlc3MuY2FsbCh0aGlzLCBzY29wZS5HcC5Db25maWcpO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgQ29uZmlnO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Config/Config.js\n"); /***/ }), @@ -560,7 +572,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Uti /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n\n/**\n * Response object for {@link module:Services~getConfig Gp.Services.getConfig ()} invocation when successful. Received as the argument of onSuccess callback function.\n *\n * @property {Object} generalOptions - General properties for default map configuration resources.\n * @property {Object} generalOptions.apiKeys - Object that associates apiKey (s) with an array of resources IDs availables with that key.\n * @property {String} generalOptions.title - Underlying web service Title.\n * @property {String} generalOptions.defaultGMLGFIStyle - XSL URL used by default to translate an XML GetFeatureInfo response into an HTML array.\n * @property {String} generalOptions.theme - default theme (FIXME : for what ?)\n * @property {Array.} generalOptions.wgs84Resolutions - geographical resolutions Array for each [zoom level of the Geoportal platform]{@link http://api.ign.fr/tech-docs-js/webmaster/layers.html#Geoportal_resolutions} from 0 to 21. Expressed in degrees/pixel.\n * @property {Object} layers - Associative array mapping resources availables IDs (keys) with their properties (values given as {@link Gp.Services.Config.Layer}).\n * @property {Object} tileMatrixSets - Associative Array mapping TileMatrixSets IDs (keys) availables with their properties (values given as {@link Gp.Services.Config.TileMatrixSet}).\n *\n * @namespace\n * @alias Gp.Services.GetConfigInterface\n */\nfunction ConfigInterface () {\n if (!(this instanceof ConfigInterface)) {\n throw new TypeError(\"ConfigInterface constructor cannot be called as a function.\");\n }\n\n this.generalOptions = {\n apiKeys : {},\n title : null,\n defaultGMLGFIStyle : null,\n theme : null,\n wgs84Resolutions : []\n };\n\n this.layers = {};\n\n this.tileMatrixSets = {};\n}\n\nConfigInterface.prototype = {\n\n /*\n * Constructor (alias)\n */\n constructor : ConfigInterface,\n\n /**\n * Check if config is loaded for a given key\n *\n * @param {String} apiKey - Access key to Geoportal platform\n * @returns {Boolean} isKeyConfLoaded - true if config of the key is already loaded, false otherwise\n */\n isKeyConfLoaded : function (apiKey) {\n if (!apiKey) {\n return;\n }\n if (this.generalOptions.apiKeys[apiKey]) {\n return true;\n }\n return false;\n },\n\n /**\n * Returns an array of Geoportal layers identifiers, corresponding to an API contract key.\n *\n * @param {String} apiKey - Access key to Geoportal platform\n * @returns {Array} apiKeys - Array of geoportal layers identifiers\n */\n getLayersId : function (apiKey) {\n return this.generalOptions.apiKeys[apiKey];\n },\n\n /**\n * Returns the id of a Geoportal layer with its name and its service.\n *\n * @param {String} layerName - name of the layer (ex. \"ORTHOIMAGERY.ORTHOPHOTOS\")\n * @param {String} service - name of the service (ex. \"WMS\" ou \"WMTS\")\n * @returns {String} Id of the layer (ex. \"ORTHOIMAGERY.ORTHOPHOTOS$GEOPORTAIL:OGC:WMTS\")\n */\n getLayerId : function (layerName, service) {\n if (!layerName || !service) {\n return;\n }\n var layerId = null;\n\n // layer\n // key : [layerName]$[contexte]:OGC:[service]\n // ex : \"ORTHOIMAGERY.ORTHOPHOTOS$GEOPORTAIL:OGC:WMTS\"\n\n // service\n // key : [layerName]$[contexte];[service]\n // ex : PositionOfInterest$OGC:OPENLS;ReverseGeocode\n\n if (this.layers) {\n var layers = this.layers;\n for (var key in layers) {\n if (layers.hasOwnProperty(key)) {\n var parts = key.split(\"$\");\n if (layerName === parts[0]) {\n if (parts[1]) {\n var servicePartsLayer = parts[1].split(\":\");\n var servicePartsService = parts[1].split(\";\");\n\n if (servicePartsService[1] === service.toUpperCase()) {\n layerId = key;\n break;\n }\n if (servicePartsLayer[2] === service.toUpperCase()) {\n layerId = key;\n break;\n }\n }\n }\n }\n }\n }\n if (!layerId) {\n return;\n }\n return layerId;\n },\n\n /**\n * Returns an associative array of Geoportal layers configurations, corresponding to an API contract key.\n * If no key is specified, all layers from configuration are returned.\n *\n * @param {String} apiKey - Access key to Geoportal platform\n * @returns {Object} layers - Object which properties are layers identifiers.\n */\n getLayersConf : function (apiKey) {\n var layers = {};\n var layersIdArray = this.getLayersId(apiKey);\n if (layersIdArray) {\n for (var i = 0; i < layersIdArray.length; i++) {\n var lyrId = layersIdArray[i];\n layers[lyrId] = this.layers[lyrId];\n }\n }\n return layers;\n },\n\n /**\n * Returns a geoportal layer configuration, given its identifier\n *\n * @param {String} layerId - Geoportal layer identifier (e.g. \"GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS\")\n * @return {Object} layer - Layer configuration\n */\n getLayerConf : function (layerId) {\n if (!this.layers) {\n return;\n }\n return this.layers[layerId];\n },\n\n /**\n * Get all parameters needed to display a WMS or WMTS layer given its name, its service and its key\n *\n * @param {String} layerName - name of the layer (ex. \"ORTHOIMAGERY.ORTHOPHOTOS\")\n * @param {String} service - name of the service (ex. \"WMS\" ou \"WMTS\")\n * @param {String} [apiKey] - Contract API key\n * @returns {Object} params - params of the service (WMS or WMTS) for the given layer\n * @returns {String} params.url - Url of the service to reach to display the layer\n * @returns {String} params.version - Version of the service\n * @returns {String} params.styles - Default style of the layer\n * @returns {String} params.format - Default format of the layer\n * @returns {String} params.projection - Default projection of the layer\n * @returns {Number} params.minScale - Min scale denominator of the layer\n * @returns {Number} params.maxScale - Max scale denominator of the layer\n * @returns {Gp.BBox} params.extent - Extent of the layer, in the projection of the layer\n * @returns {Array} params.legends - Array of legends associated to the layer\n * @returns {Array} params.title - Name of the layer, readable by a human\n * @returns {Array} params.description - Description of the layer\n * @returns {String} params.[TMSLink] - Id of the Tile Matrix Set (TMS), in the case of WMTS layer\n * @returns {Gp.Point} params.[matrixOrigin] - Originof the tile matrix (top left corner), in the case of WMTS layer\n * @returns {Array} params.[nativeResolutions] - Array with the resolution of each level of the tile matrix set, in the case of WMTS layer\n * @returns {Array} params.[matrixIds] - Array with the ID of each level of the tile matrix set, in the case of WMTS layer\n */\n getLayerParams : function (layerName, service) {\n var params = {};\n\n if ((service === \"WMS\" || Object.keys(this.tileMatrixSets).length !== 0) && Object.keys(this.layers).length !== 0) {\n // get the layerId of the layer\n var layerId = this.getLayerId(layerName, service);\n\n if (layerId) {\n // get the layer Conf Object\n var layerConf = this.getLayerConf(layerId);\n\n var keys = this.getLayerKey(layerId);\n if (keys.length === 0) {\n return;\n }\n\n // get services params\n for (var i = 0; i < keys.length; i++) {\n // only one serverUrl is saved in Gp.Config : with multiKeys, we have to retrieve the key used in the serverUrl property\n if (layerConf.serviceParams.serverUrl[keys[i]]) {\n params.url = layerConf.serviceParams.serverUrl[keys[i]];\n }\n }\n\n const wmsTypeRegex = /\\/v\\//;\n // WMS vector style always empty (not in getCap)\n if (wmsTypeRegex.test(params.url)) {\n params.styles = \"\";\n } else {\n // WMS raster style is defined in getCap\n params.styles = layerConf.styles[0].name;\n }\n\n params.version = layerConf.serviceParams.version;\n params.format = layerConf.formats[0].name;\n params.projection = layerConf.defaultProjection;\n\n // get layer info and constraints\n params.minScale = layerConf.globalConstraint.minScaleDenominator;\n params.maxScale = layerConf.globalConstraint.maxScaleDenominator;\n params.extent = layerConf.globalConstraint.bbox;\n params.legends = layerConf.legends;\n params.title = layerConf.title;\n params.description = layerConf.description;\n\n if (service === \"WMS\") {\n params.metadata = layerConf.metadata;\n }\n\n // Informations non disponibles avec les getCap\n // params.metadata = layerConf.getMetadata();\n // params.originators = layerConf.getOriginators();\n // params.quicklookUrl = layerConf.getQuicklookUrl();\n\n // WMTS : get the tileMatrixSetLimits\n if (layerConf.wmtsOptions) {\n params.tileMatrixSetLimits = layerConf.wmtsOptions.tileMatrixSetLimits;\n var TMSLink = layerConf.wmtsOptions.tileMatrixSetLink;\n if (TMSLink) {\n params.TMSLink = TMSLink;\n var tmsConf = this.getTMSConf(TMSLink);\n // Get matrix origin : Gp.Point = Object{x:Float, y:Float}\n // params.matrixOrigin = tmsConf.getTopLeftCorner();\n params.matrixIds = Object.keys(tmsConf.tileMatrices);\n params.tileMatrices = tmsConf.tileMatrices;\n // by default, pseudo mercator resolutions\n params.nativeResolutions = tmsConf.nativeResolutions || this.getTMSConf(\"PM\").nativeResolutions;\n }\n }\n }\n }\n return params;\n },\n\n /**\n * Get the contract key(s) associated to a given layer.\n *\n * @param {String} layerId - Geoportal layer identifier (e.g. \"GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS\")\n * @return {Array} layerKey - array of key(s) associated to the given layer\n */\n getLayerKey : function (layerId) {\n var layerKey = [];\n if (this.generalOptions && this.generalOptions.apiKeys && Object.keys(this.generalOptions.apiKeys).length !== 0) {\n var resourcesByKey = this.generalOptions.apiKeys;\n for (var key in resourcesByKey) {\n var resourcesArray = resourcesByKey[key];\n resourcesArray.forEach(function (arrayLayerId) {\n if (arrayLayerId === layerId) {\n layerKey.push(key);\n }\n });\n }\n }\n return layerKey;\n },\n\n /**\n * Returns an associative array of Tile Matrix Sets configurations.\n *\n * @return {Object} tileMatrixSets - Object which properties are TMS identifiers\n *\n */\n getTileMatrixSets : function () {\n return this.tileMatrixSets;\n },\n\n /**\n * Returns a Tile Matrix Sets configuration, given its identifier.\n *\n * @param {String} tmsID - Tile Matrix Set identifier (e.g. : \"PM\")\n * @return {Object} tileMatrixSet - Tile Matrix Set configuration\n */\n getTMSConf : function (tmsID) {\n if (!this.tileMatrixSets) {\n return;\n }\n return this.tileMatrixSets[tmsID];\n },\n\n /**\n * Get global constraints for a given Layer : extent, minScale, maxScale, projection\n *\n * @param {String} layerId - Geoportal layer identifier (e.g. \"GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS\")\n * @returns {Object} params - layer constraints\n * @returns {String} params.projection - default layer projection\n * @returns {Number} params.minScale - layer min scale denominator\n * @returns {Number} params.maxScale - layer max scale denominator\n * @returns {Gp.BBox} params.extent - layer extent expressed in the layer projection\n */\n getGlobalConstraints : function (layerId) {\n var params = {};\n\n if (layerId) {\n // get layer configuration object\n var layerConf = this.getLayerConf(layerId);\n params.projection = layerConf.defaultProjection;\n params.minScale = layerConf.globalConstraint.minScaleDenominator;\n params.maxScale = layerConf.globalConstraint.maxScaleDenominator;\n params.extent = layerConf.globalConstraint.bbox;\n }\n\n return params;\n }\n\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ConfigInterface);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQ29uZmlnL0NvbmZpZ0ludGVyZmFjZS5qcz83NDM1Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQ0E7QUFDQSx3QkFBd0IseURBQXlEO0FBQ2pGO0FBQ0EsY0FBYyxPQUFPO0FBQ3JCLGNBQWMsT0FBTztBQUNyQixjQUFjLE9BQU87QUFDckIsY0FBYyxPQUFPO0FBQ3JCLGNBQWMsT0FBTztBQUNyQixjQUFjLGNBQWMsa0hBQWtILGlGQUFpRjtBQUMvTixjQUFjLE9BQU8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0kW2NvbnRleHRlXTpPR0M6W3NlcnZpY2VdXG4gICAgICAgIC8vIGV4IDogXCJPUlRIT0lNQUdFUlkuT1JUSE9QSE9UT1MkR0VPUE9SVEFJTDpPR0M6V01UU1wiXG5cbiAgICAgICAgLy8gc2VydmljZVxuICAgICAgICAvLyBrZXkgOiBbbGF5ZXJOYW1lXSRbY29udGV4dGVdO1tzZXJ2aWNlXVxuICAgICAgICAvLyBleCA6IFBvc2l0aW9uT2ZJbnRlcmVzdCRPR0M6T1BFTkxTO1JldmVyc2VHZW9jb2RlXG5cbiAgICAgICAgaWYgKHRoaXMubGF5ZXJzKSB7XG4gICAgICAgICAgICB2YXIgbGF5ZXJzID0gdGhpcy5sYXllcnM7XG4gICAgICAgICAgICBmb3IgKHZhciBrZXkgaW4gbGF5ZXJzKSB7XG4gICAgICAgICAgICAgICAgaWYgKGxheWVycy5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBwYXJ0cyA9IGtleS5zcGxpdChcIiRcIik7XG4gICAgICAgICAgICAgICAgICAgIGlmIChsYXllck5hbWUgPT09IHBhcnRzWzBdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocGFydHNbMV0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgc2VydmljZVBhcnRzTGF5ZXIgPSBwYXJ0c1sxXS5zcGxpdChcIjpcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHNlcnZpY2VQYXJ0c1NlcnZpY2UgPSBwYXJ0c1sxXS5zcGxpdChcIjtcIik7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VydmljZVBhcnRzU2VydmljZVsxXSA9PT0gc2VydmljZS50b1VwcGVyQ2FzZSgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxheWVySWQgPSBrZXk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VydmljZVBhcnRzTGF5ZXJbMl0gPT09IHNlcnZpY2UudG9VcHBlckNhc2UoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXllcklkID0ga2V5O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFsYXllcklkKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGxheWVySWQ7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIFJldHVybnMgYW4gYXNzb2NpYXRpdmUgYXJyYXkgb2YgR2VvcG9ydGFsIGxheWVycyBjb25maWd1cmF0aW9ucywgY29ycmVzcG9uZGluZyB0byBhbiBBUEkgY29udHJhY3Qga2V5LlxuICAgICAqIElmIG5vIGtleSBpcyBzcGVjaWZpZWQsIGFsbCBsYXllcnMgZnJvbSBjb25maWd1cmF0aW9uIGFyZSByZXR1cm5lZC5cbiAgICAgKlxuICAgICAqIEBwYXJhbSB7U3RyaW5nfSBhcGlLZXkgLSBBY2Nlc3Mga2V5IHRvIEdlb3BvcnRhbCBwbGF0Zm9ybVxuICAgICAqIEByZXR1cm5zIHtPYmplY3R9IGxheWVycyAtIE9iamVjdCB3aGljaCBwcm9wZXJ0aWVzIGFyZSBsYXllcnMgaWRlbnRpZmllcnMuXG4gICAgICovXG4gICAgZ2V0TGF5ZXJzQ29uZiA6IGZ1bmN0aW9uIChhcGlLZXkpIHtcbiAgICAgICAgdmFyIGxheWVycyA9IHt9O1xuICAgICAgICB2YXIgbGF5ZXJzSWRBcnJhe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GVhY2ggbGV2ZWwgb2YgdGhlIHRpbGUgbWF0cml4IHNldCwgaW4gdGhlIGNhc2Ugb2YgV01UUyBsYXllclxuICAgICAqL1xuICAgIGdldExheWVyUGFyYW1zIDogZnVuY3Rpb24gKGxheWVyTmFtZSwgc2VydmljZSkge1xuICAgICAgICB2YXIgcGFyYW1zID0ge307XG5cbiAgICAgICAgaWYgKChzZXJ2aWNlID09PSBcIldNU1wiIHx8IE9iamVjdC5rZXlzKHRoaXMudGlsZU1hdHJpeFNldHMpLmxlbmd0aCAhPT0gMCkgJiYgT2JqZWN0LmtleXModGhpcy5sYXllcnMpLmxlbmd0aCAhPT0gMCkge1xuICAgICAgICAgICAgLy8gZ2V0IHRoZSBsYXllcklkIG9mIHRoZSBsYXllclxuICAgICAgICAgICAgdmFyIGxheWVySWQgPSB0aGlzLmdldExheWVySWQobGF5ZXJOYW1lLCBzZXJ2aWNlKTtcblxuICAgICAgICAgICAgaWYgKGxheWVySWQpIHtcbiAgICAgICAgICAgICAgICAvLyBnZXQgdGhlIGxheWVyIENvbmYgT2JqZWN0XG4gICAgICAgICAgICAgICAgdmFyIGxheWVyQ29uZiA9IHRoaXMuZ2V0TGF5ZXJDb25mKGxheWVySWQpO1xuXG4gICAgICAgICAgICAgICAgdmFyIGtleXMgPSB0aGlzLmdldExheWVyS2V5KGxheWVySWQpO1xuICAgICAgICAgICAgICAgIGlmIChrZXlzLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZ2V0IHNlcnZpY2VzIHBhcmFtc1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwga2V5cy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICAvLyBvbmx5IG9uZSBzZXJ2ZXJVcmwgaXMgc2F2ZWQgaW4gR3AuQ29uZmlnIDogd2l0aCBtdWx0aUtleXMsIHdlIGhhdmUgdG8gcmV0cmlldmUgdGhlIGtleSB1c2VkIGluIHRoZSBzZXJ2ZXJVcmwgcHJvcGVydHlcbiAgICAgICAgICAgICAgICAgICAgaWYgKGxheWVyQ29uZi5zZXJ2aWNlUGFyYW1zLnNlcnZlclVybFtrZXlzW2ldXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLnVybCA9IGxheWVyQ29uZi5zZXJ2aWNlUGFyYW1zLnNlcnZlclVybFtrZXlzW2ldXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGNvbnN0IHdtc1R5cGVSZWdleCA9IC9cXC92XFwvLztcbiAgICAgICAgICAgICAgICAvLyBXTVMgdmVjdG9yIHN0eWxlIGFsd2F5cyBlbXB0eSAobm90IGluIGdldENhcClcbiAgICAgICAgICAgICAgICBpZiAod21zVHlwZVJlZ2V4LnRlc3QocGFyYW1zLnVybCkpIHtcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1zLnN0eWxlcyA9IFwiXCI7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gV01TIHJhc3RlciBzdHlsZSBpcyBkZWZpbmVkIGluIGdldENhcFxuICAgICAgICAgICAgICAgICAgICBwYXJhbXMuc3R5bGVzID0gbGF5ZXJDb25mLnN0eWxlc1swXS5uYW1lO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHBhcmFtcy52ZXJzaW9uID0gbGF5ZXJDb25mLnNlcnZpY2VQYXJhbXMudmVyc2lvbjtcbiAgICAgICAgICAgICAgICBwYXJhbXMuZm9ybWF0ID0gbGF5ZXJDb25mLmZvcm1hdHNbMF0ubmFtZTtcbiAgICAgICAgICAgICAgICBwYXJhbXMucHJvamVjdGlvbiA9IGxheWVyQ29uZi5kZWZhdWx0UHJvamVjdGlvbjtcblxuICAgICAgICAgICAgICAgIC8vIGdldCBsYXllciBpbmZvIGFuZCBjb25zdHJhaW50c1xuICAgICAgICAgICAgICAgIHBhcmFtcy5taW5TY2FsZSA9IGxheWVyQ29uZi5nbG9iYWxDb25zdHJhaW50Lm1pblNjYWxlRGVub21pbmF0b3I7XG4gICAgICAgICAgICAgICAgcGFyYW1zLm1heFNjYWxlID0gbGF5ZXJDb25mLmdsb2JhbENvbnN0cmFpbnQubWF4U2NhbGVEZW5vbWluYXRvcjtcbiAgICAgICAgICAgICAgICBwYXJhbXMuZXh0ZW50ID0gbGF5ZXJDb25mLmdsb2JhbENvbnN0cmFpbnQuYmJveDtcbiAgICAgICAgICAgICAgICBwYXJhbXMubGVnZW5kcyA9IGxheWVyQ29uZi5sZWdlbmRzO1xuICAgICAgICAgICAgICAgIHBhcmFtcy50aXRsZSA9IGxheWVyQ29uZi50aXRsZTtcbiAgICAgICAgICAgICAgICBwYXJhbXMuZGVzY3JpcHRpb24gPSBsYXllckNvbmYuZGVzY3JpcHRpb247XG5cbiAgICAgICAgICAgICAgICBpZiAoc2VydmljZSA9PT0gXCJXTVNcIikge1xuICAgICAgICAgICAgICAgICAgICBwYXJhbXMubWV0YWRhdGEgPSBsYXllckNvbmYubWV0YWRhdGE7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gSW5mb3JtYXRpb25zICBub24gZGlzcG9uaWJsZXMgYXZlYyBsZXMgZ2V0Q2FwXG4gICAgICAgICAgICAgICAgLy8gcGFyYW1zLm1ldGFkYXRhID0gbGF5ZXJDb25mLmdldE1ldGFkYXRhKCk7XG4gICAgICAgICAgICAgICAgLy8gcGFyYW1zLm9yaWdpbmF0b3JzID0gbGF5ZXJDb25mLmdldE9yaWdpbmF0b3JzKCk7XG4gICAgICAgICAgICAgICAgLy8gcGFyYW1zLnF1aWNrbG9va1VybCA9IGxheWVyQ29uZi5nZXRRdWlja2xvb2tVcmwoKTtcblxuICAgICAgICAgICAgICAgIC8vIFdNVFMgOiBnZXQgdGhlIHRpbGVNYXRyaXhTZXRMaW1pdHNcbiAgICAgICAgICAgICAgICBpZiAobGF5ZXJDb25mLndtdHNPcHRpb25zKSB7XG4gICAgICAgICAgICAgICAgICAgIHBhcmFtcy50aWxlTWF0cml4U2V0TGltaXRzID0gbGF5ZXJDb25mLndtdHNPcHRpb25zLnRpbGVNYXRyaXhTZXRMaW1pdHM7XG4gICAgICAgICAgICAgICAgICAgIHZhciBUTVNMaW5rID0gbGF5ZXJDb25mLndtdHNPcHRpb25zLnRpbGVNYXRyaXhTZXRMaW5rO1xuICAgICAgICAgICAgICAgICAgICBpZiAoVE1TTGluaykge1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLlRNU0xpbmsgPSBUTVNMaW5rO1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRtc0NvbmYgPSB0aGlzLmdldFRNU0NvbmYoVE1TTGluayk7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBHZXQgbWF0cml4IG9yaWdpbiA6IEdwLlBvaW50ID0gT2JqZWN0e3g6RmxvYXQsIHk6RmxvYXR9XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBwYXJhbXMubWF0cml4T3JpZ2luID0gdG1zQ29uZi5nZXRUb3BMZWZ0Q29ybmVyKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMubWF0cml4SWRzID0gT2JqZWN0LmtleXModG1zQ29uZi50aWxlTWF0cmljZXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLnRpbGVNYXRyaWNlcyA9IHRtc0NvbmYudGlsZU1hdHJpY2VzO1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gYnkgZGVmYXVsdCwgcHNldWRvIG1lcmNhdG9yIHJlc29sdXRpb25zXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMubmF0aXZlUmVzb2x1dGlvbnMgPSB0bXNDb25mLm5hdGl2ZVJlc29sdXRpb25zIHx8IHRoaXMuZ2V0VE1TQ29uZihcIlBNXCIpLm5hdGl2ZVJlc29sdXRpb25zO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBwYXJhbXM7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIEdldCB0aGUgY29udHJhY3Qga2V5KHMpIGFzc29jaWF0ZWQgdG8gYSBnaXZlbiBsYXllci5cbiAgICAgKlxuICAgICAqIEBwYXJhbSB7U3RyaW5nfSBsYXllcklkIC0gR2VvcG9ydGFsIGxheWVyIGlkZW50aWZpZXIgKGUuZy4gXCJHRU9HUkFQSElDQUxHUklEU1lTVEVNUy5NQVBTJEdFT1BPUlRBSUw6T0dDOldNVFNcIilcbiAgICAgKiBAcmV0dXJuIHtBcnJheX0gbGF5ZXJLZXkgLSBhcnJheSBvZiBrZXkocykgYXNzb2NpYXRlZCB0byB0aGUgZ2l2ZW4gbGF5ZXJcbiAgICAgKi9cbiAgICBnZXRMYXllcktleSA6IGZ1bmN0aW9uIChsYXllcklkKSB7XG4gICAgICAgIHZhciBsYXllcktleSA9IFtdO1xuICAgICAgICBpZiAodGhpcy5nZW5lcmFsT3B0aW9ucyAmJiB0aGlzLmdlbmVyYWxPcHRpb25zLmFwaUtleXMgJiYgT2JqZWN0LmtleXModGhpcy5nZW5lcmFsT3B0aW9ucy5hcGlLZXlzKS5sZW5ndGggIT09IDApIHtcbiAgICAgICAgICAgIHZhciByZXNvdXJjZXNCeUtleSA9IHRoaXMuZ2VuZXJhbE9wdGlvbnMuYXBpS2V5cztcbiAgICAgICAgICAgIGZvciAodmFyIGtleSBpbiByZXNvdXJjZXNCeUtleSkge1xuICAgICAgICAgICAgICAgIHZhciByZXNvdXJjZXNBcnJheSA9IHJlc291cmNlc0J5S2V5W2tleV07XG4gICAgICAgICAgICAgICAgcmVzb3VyY2VzQXJyYXkuZm9yRWFjaChmdW5jdGlvbiAoYXJyYXlMYXllcklkKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChhcnJheUxheWVySWQgPT09IGxheWVySWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxheWVyS2V5LnB1c2goa2V5KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBsYXllcktleTtcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogUmV0dXJucyBhbiBhc3NvY2lhdGl2ZSBhcnJheSBvZiBUaWxlIE1hdHJpeCBTZXRzIGNvbmZpZ3VyYXRpb25zLlxuICAgICAqXG4gICAgICogQHJldHVybiB7T2JqZWN0fSB0aWxlTWF0cml4U2V0cyAtIE9iamVjdCB3aGljaCBwcm9wZXJ0aWVzIGFyZSBUTVMgaWRlbnRpZmllcnNcbiAgICAgKlxuICAgICAqL1xuICAgIGdldFRpbGVNYXRyaXhTZXRzIDogZnVuY3Rpb24gKCkge1xuICAgICAgICByZXR1cm4gdGhpcy50aWxlTWF0cml4U2V0cztcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogUmV0dXJucyBhIFRpbGUgTWF0cml4IFNldHMgY29uZmlndXJhdGlvbiwgZ2l2ZW4gaXRzIGlkZW50aWZpZXIuXG4gICAgICpcbiAgICAgKiBAcGFyYW0ge1N0cmluZ30gdG1zSUQgLSBUaWxlIE1hdHJpeCBTZXQgaWRlbnRpZmllciAoZS5nLiA6IFwiUE1cIilcbiAgICAgKiBAcmV0dXJuIHtPYmplY3R9IHRpbGVNYXRyaXhTZXQgLSBUaWxlIE1hdHJpeCBTZXQgY29uZmlndXJhdGlvblxuICAgICAqL1xuICAgIGdldFRNU0NvbmYgOiBmdW5jdGlvbiAodG1zSUQpIHtcbiAgICAgICAgaWYgKCF0aGlzLnRpbGVNYXRyaXhTZXRzKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHRoaXMudGlsZU1hdHJpeFNldHNbd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hcmFtcy5wcm9qZWN0aW9uID0gbGF5ZXJDb25mLmRlZmF1bHRQcm9qZWN0aW9uO1xuICAgICAgICAgICAgcGFyYW1zLm1pblNjYWxlID0gbGF5ZXJDb25mLmdsb2JhbENvbnN0cmFpbnQubWluU2NhbGVEZW5vbWluYXRvcjtcbiAgICAgICAgICAgIHBhcmFtcy5tYXhTY2FsZSA9IGxheWVyQ29uZi5nbG9iYWxDb25zdHJhaW50Lm1heFNjYWxlRGVub21pbmF0b3I7XG4gICAgICAgICAgICBwYXJhbXMuZXh0ZW50ID0gbGF5ZXJDb25mLmdsb2JhbENvbnN0cmFpbnQuYmJveDtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBwYXJhbXM7XG4gICAgfVxuXG59O1xuXG5leHBvcnQgZGVmYXVsdCBDb25maWdJbnRlcmZhY2U7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Config/ConfigInterface.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n\n/**\n * Response object for {@link module:Services~getConfig Gp.Services.getConfig ()} invocation when successful. Received as the argument of onSuccess callback function.\n *\n * @property {Object} generalOptions - General properties for default map configuration resources.\n * @property {Object} generalOptions.apiKeys - Object that associates apiKey (s) with an array of resources IDs availables with that key.\n * @property {String} generalOptions.title - Underlying web service Title.\n * @property {String} generalOptions.defaultGMLGFIStyle - XSL URL used by default to translate an XML GetFeatureInfo response into an HTML array.\n * @property {String} generalOptions.theme - default theme (FIXME : for what ?)\n * @property {Array.} generalOptions.wgs84Resolutions - geographical resolutions Array for each [zoom level of the Geoportal platform]{@link http://api.ign.fr/tech-docs-js/webmaster/layers.html#Geoportal_resolutions} from 0 to 21. Expressed in degrees/pixel.\n * @property {Object} layers - Associative array mapping resources availables IDs (keys) with their properties (values given as {@link Gp.Services.Config.Layer}).\n * @property {Object} tileMatrixSets - Associative Array mapping TileMatrixSets IDs (keys) availables with their properties (values given as {@link Gp.Services.Config.TileMatrixSet}).\n *\n * @namespace\n * @alias Gp.Services.GetConfigInterface\n */\nfunction ConfigInterface () {\n if (!(this instanceof ConfigInterface)) {\n throw new TypeError(\"ConfigInterface constructor cannot be called as a function.\");\n }\n\n this.generalOptions = {\n apiKeys : {},\n title : null,\n defaultGMLGFIStyle : null,\n theme : null,\n wgs84Resolutions : []\n };\n\n this.layers = {};\n\n this.tileMatrixSets = {};\n}\n\nConfigInterface.prototype = {\n\n /*\n * Constructor (alias)\n */\n constructor : ConfigInterface,\n\n /**\n * Check if config is loaded for a given key\n *\n * @param {String} apiKey - Access key to Geoportal platform\n * @returns {Boolean} isKeyConfLoaded - true if config of the key is already loaded, false otherwise\n */\n isKeyConfLoaded : function (apiKey) {\n if (!apiKey) {\n return;\n }\n if (this.generalOptions.apiKeys[apiKey]) {\n return true;\n }\n return false;\n },\n\n /**\n * Returns an array of Geoportal layers identifiers, corresponding to an API contract key.\n *\n * @param {String} apiKey - Access key to Geoportal platform\n * @returns {Array} apiKeys - Array of geoportal layers identifiers\n */\n getLayersId : function (apiKey) {\n return this.generalOptions.apiKeys[apiKey];\n },\n\n /**\n * Returns the id of a Geoportal layer with its name and its service.\n *\n * @param {String} layerName - name of the layer (ex. \"ORTHOIMAGERY.ORTHOPHOTOS\")\n * @param {String} service - name of the service (ex. \"WMS\" ou \"WMTS\")\n * @returns {String} Id of the layer (ex. \"ORTHOIMAGERY.ORTHOPHOTOS$GEOPORTAIL:OGC:WMTS\")\n */\n getLayerId : function (layerName, service) {\n if (!layerName || !service) {\n return;\n }\n var layerId = null;\n\n // layer\n // key : [layerName]$[contexte]:OGC:[service]\n // ex : \"ORTHOIMAGERY.ORTHOPHOTOS$GEOPORTAIL:OGC:WMTS\"\n\n // service\n // key : [layerName]$[contexte];[service]\n // ex : PositionOfInterest$OGC:OPENLS;ReverseGeocode\n\n if (this.layers) {\n var layers = this.layers;\n for (var key in layers) {\n if (layers.hasOwnProperty(key)) {\n var parts = key.split(\"$\");\n if (layerName === parts[0]) {\n if (parts[1]) {\n var servicePartsLayer = parts[1].split(\":\");\n var servicePartsService = parts[1].split(\";\");\n\n if (servicePartsService[1] === service.toUpperCase()) {\n layerId = key;\n break;\n }\n if (servicePartsLayer[2] === service.toUpperCase()) {\n layerId = key;\n break;\n }\n }\n }\n }\n }\n }\n if (!layerId) {\n return;\n }\n return layerId;\n },\n\n /**\n * Returns an associative array of Geoportal layers configurations, corresponding to an API contract key.\n * If no key is specified, all layers from configuration are returned.\n *\n * @param {String} apiKey - Access key to Geoportal platform\n * @returns {Object} layers - Object which properties are layers identifiers.\n */\n getLayersConf : function (apiKey) {\n var layers = {};\n var layersIdArray = this.getLayersId(apiKey);\n if (layersIdArray) {\n for (var i = 0; i < layersIdArray.length; i++) {\n var lyrId = layersIdArray[i];\n layers[lyrId] = this.layers[lyrId];\n }\n }\n return layers;\n },\n\n /**\n * Returns a geoportal layer configuration, given its identifier\n *\n * @param {String} layerId - Geoportal layer identifier (e.g. \"GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS\")\n * @return {Object} layer - Layer configuration\n */\n getLayerConf : function (layerId) {\n if (!this.layers) {\n return;\n }\n return this.layers[layerId];\n },\n\n /**\n * Get all parameters needed to display a WMS or WMTS layer given its name, its service and its key\n *\n * @param {String} layerName - name of the layer (ex. \"ORTHOIMAGERY.ORTHOPHOTOS\")\n * @param {String} service - name of the service (ex. \"WMS\" ou \"WMTS\")\n * @param {String} [apiKey] - Contract API key\n * @returns {Object} params - params of the service (WMS or WMTS) for the given layer\n * @returns {String} params.url - Url of the service to reach to display the layer\n * @returns {String} params.version - Version of the service\n * @returns {String} params.styles - Default style of the layer\n * @returns {String} params.format - Default format of the layer\n * @returns {String} params.projection - Default projection of the layer\n * @returns {Number} params.minScale - Min scale denominator of the layer\n * @returns {Number} params.maxScale - Max scale denominator of the layer\n * @returns {Gp.BBox} params.extent - Extent of the layer, in the projection of the layer\n * @returns {Array} params.legends - Array of legends associated to the layer\n * @returns {Array} params.title - Name of the layer, readable by a human\n * @returns {Array} params.description - Description of the layer\n * @returns {String} params.[TMSLink] - Id of the Tile Matrix Set (TMS), in the case of WMTS layer\n * @returns {Gp.Point} params.[matrixOrigin] - Originof the tile matrix (top left corner), in the case of WMTS layer\n * @returns {Array} params.[nativeResolutions] - Array with the resolution of each level of the tile matrix set, in the case of WMTS layer\n * @returns {Array} params.[matrixIds] - Array with the ID of each level of the tile matrix set, in the case of WMTS layer\n */\n getLayerParams : function (layerName, service) {\n var params = {};\n\n if ((service === \"WMS\" || Object.keys(this.tileMatrixSets).length !== 0) && Object.keys(this.layers).length !== 0) {\n // get the layerId of the layer\n var layerId = this.getLayerId(layerName, service);\n\n if (layerId) {\n // get the layer Conf Object\n var layerConf = this.getLayerConf(layerId);\n\n var keys = this.getLayerKey(layerId);\n if (keys.length === 0) {\n return;\n }\n\n // get services params\n for (var i = 0; i < keys.length; i++) {\n // only one serverUrl is saved in Gp.Config : with multiKeys, we have to retrieve the key used in the serverUrl property\n if (layerConf.serviceParams.serverUrl[keys[i]]) {\n params.url = layerConf.serviceParams.serverUrl[keys[i]];\n }\n }\n\n const wmsTypeRegex = /\\/v\\//;\n // WMS vector style always empty (not in getCap)\n if (wmsTypeRegex.test(params.url)) {\n params.styles = \" \";\n } else {\n // WMS raster style is defined in getCap\n params.styles = layerConf.styles[0].name;\n }\n\n params.version = layerConf.serviceParams.version;\n params.format = layerConf.formats[0].name;\n params.projection = layerConf.defaultProjection;\n\n // get layer info and constraints\n params.minScale = layerConf.globalConstraint.minScaleDenominator;\n params.maxScale = layerConf.globalConstraint.maxScaleDenominator;\n params.extent = layerConf.globalConstraint.bbox;\n params.legends = layerConf.legends;\n params.title = layerConf.title;\n params.description = layerConf.description;\n\n if (service === \"WMS\") {\n params.metadata = layerConf.metadata;\n }\n\n // Informations non disponibles avec les getCap\n // params.metadata = layerConf.getMetadata();\n // params.originators = layerConf.getOriginators();\n // params.quicklookUrl = layerConf.getQuicklookUrl();\n\n // WMTS : get the tileMatrixSetLimits\n if (layerConf.wmtsOptions) {\n params.tileMatrixSetLimits = layerConf.wmtsOptions.tileMatrixSetLimits;\n var TMSLink = layerConf.wmtsOptions.tileMatrixSetLink;\n if (TMSLink) {\n params.TMSLink = TMSLink;\n var tmsConf = this.getTMSConf(TMSLink);\n // Get matrix origin : Gp.Point = Object{x:Float, y:Float}\n // params.matrixOrigin = tmsConf.getTopLeftCorner();\n params.matrixIds = Object.keys(tmsConf.tileMatrices);\n params.tileMatrices = tmsConf.tileMatrices;\n // by default, pseudo mercator resolutions\n params.nativeResolutions = tmsConf.nativeResolutions || this.getTMSConf(\"PM\").nativeResolutions;\n }\n }\n }\n }\n return params;\n },\n\n /**\n * Get the contract key(s) associated to a given layer.\n *\n * @param {String} layerId - Geoportal layer identifier (e.g. \"GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS\")\n * @return {Array} layerKey - array of key(s) associated to the given layer\n */\n getLayerKey : function (layerId) {\n var layerKey = [];\n if (this.generalOptions && this.generalOptions.apiKeys && Object.keys(this.generalOptions.apiKeys).length !== 0) {\n var resourcesByKey = this.generalOptions.apiKeys;\n for (var key in resourcesByKey) {\n var resourcesArray = resourcesByKey[key];\n resourcesArray.forEach(function (arrayLayerId) {\n if (arrayLayerId === layerId) {\n layerKey.push(key);\n }\n });\n }\n }\n return layerKey;\n },\n\n /**\n * Returns an associative array of Tile Matrix Sets configurations.\n *\n * @return {Object} tileMatrixSets - Object which properties are TMS identifiers\n *\n */\n getTileMatrixSets : function () {\n return this.tileMatrixSets;\n },\n\n /**\n * Returns a Tile Matrix Sets configuration, given its identifier.\n *\n * @param {String} tmsID - Tile Matrix Set identifier (e.g. : \"PM\")\n * @return {Object} tileMatrixSet - Tile Matrix Set configuration\n */\n getTMSConf : function (tmsID) {\n if (!this.tileMatrixSets) {\n return;\n }\n return this.tileMatrixSets[tmsID];\n },\n\n /**\n * Get global constraints for a given Layer : extent, minScale, maxScale, projection\n *\n * @param {String} layerId - Geoportal layer identifier (e.g. \"GEOGRAPHICALGRIDSYSTEMS.MAPS$GEOPORTAIL:OGC:WMTS\")\n * @returns {Object} params - layer constraints\n * @returns {String} params.projection - default layer projection\n * @returns {Number} params.minScale - layer min scale denominator\n * @returns {Number} params.maxScale - layer max scale denominator\n * @returns {Gp.BBox} params.extent - layer extent expressed in the layer projection\n */\n getGlobalConstraints : function (layerId) {\n var params = {};\n\n if (layerId) {\n // get layer configuration object\n var layerConf = this.getLayerConf(layerId);\n params.projection = layerConf.defaultProjection;\n params.minScale = layerConf.globalConstraint.minScaleDenominator;\n params.maxScale = layerConf.globalConstraint.maxScaleDenominator;\n params.extent = layerConf.globalConstraint.bbox;\n }\n\n return params;\n }\n\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ConfigInterface);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvQ29uZmlnL0NvbmZpZ0ludGVyZmFjZS5qcz83NDM1Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQ0E7QUFDQSx3QkFBd0IseURBQXlEO0FBQ2pGO0FBQ0EsY0FBYyxPQUFPO0FBQ3JCLGNBQWMsT0FBTztBQUNyQixjQUFjLE9BQU87QUFDckIsY0FBYyxPQUFPO0FBQ3JCLGNBQWMsT0FBTztBQUNyQixjQUFjLGNBQWMsa0hBQWtILGlGQUFpRjtBQUMvTixjQUFjLE9BQU8sNEdBQTRHLCtCQUErQjtBQUNoSyxjQUFjLE9BQU8seUhBQXlILHVDQUF1QztBQUNyTDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0Esb0JBQW9CO0FBQ3BCO0FBQ0E7QUFDQTtBQUNBO0FBQ0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XJOYW1lXSRbY29udGV4dGVdO1tzZXJ2aWNlXVxuICAgICAgICAvLyBleCA6IFBvc2l0aW9uT2ZJbnRlcmVzdCRPR0M6T1BFTkxTO1JldmVyc2VHZW9jb2RlXG5cbiAgICAgICAgaWYgKHRoaXMubGF5ZXJzKSB7XG4gICAgICAgICAgICB2YXIgbGF5ZXJzID0gdGhpcy5sYXllcnM7XG4gICAgICAgICAgICBmb3IgKHZhciBrZXkgaW4gbGF5ZXJzKSB7XG4gICAgICAgICAgICAgICAgaWYgKGxheWVycy5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBwYXJ0cyA9IGtleS5zcGxpdChcIiRcIik7XG4gICAgICAgICAgICAgICAgICAgIGlmIChsYXllck5hbWUgPT09IHBhcnRzWzBdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocGFydHNbMV0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgc2VydmljZVBhcnRzTGF5ZXIgPSBwYXJ0c1sxXS5zcGxpdChcIjpcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHNlcnZpY2VQYXJ0c1NlcnZpY2UgPSBwYXJ0c1sxXS5zcGxpdChcIjtcIik7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VydmljZVBhcnRzU2VydmljZVsxXSA9PT0gc2VydmljZS50b1VwcGVyQ2FzZSgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxheWVySWQgPSBrZXk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VydmljZVBhcnRzTGF5ZXJbMl0gPT09IHNlcnZpY2UudG9VcHBlckNhc2UoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXllcklkID0ga2V5O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFsYXllcklkKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGxheWVySWQ7XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIFJldHVybnMgYW4gYXNzb2NpYXRpdmUgYXJyYXkgb2YgR2VvcG9ydGFsIGxheWVycyBjb25maWd1cmF0aW9ucywgY29ycmVzcG9uZGluZyB0byBhbiBBUEkgY29udHJhY3Qga2V5LlxuICAgICAqIElmIG5vIGtleSBpcyBzcGVjaWZpZWQsIGFsbCBsYXllcnMgZnJvbSBjb25maWd1cmF0aW9uIGFyZSByZXR1cm5lZC5cbiAgICAgKlxuICAgICAqIEBwYXJhbSB7U3RyaW5nfSBhcGlLZXkgLSBBY2Nlc3Mga2V5IHRvIEdlb3BvcnRhbCBwbGF0Zm9ybVxuICAgICAqIEByZXR1cm5zIHtPYmplY3R9IGxheWVycyAtIE9iamVjdCB3aGljaCBwcm9wZXJ0aWVzIGFyZSBsYXllcnMgaWRlbnRpZmllcnMuXG4gICAgICovXG4gICAgZ2V0TGF5ZXJzQ29uZiA6IGZ1bmN0aW9uIChhcGlLZXkpIHtcbiAgICAgICAgdmFyIGxheWVycyA9IHt9O1xuICAgICAgICB2YXIgbGF5ZXJzSWRBcnJheSA9IHRoaXMuZ2V0TGF5ZXJzSWQoYXBpS2V5KTtcbiAgICAgICAgaWYgKGxheWVyc0lkQXJyYXkpIHtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGF5ZXJzSWRBcnJheS5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIH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1zID0ge307XG5cbiAgICAgICAgaWYgKChzZXJ2aWNlID09PSBcIldNU1wiIHx8IE9iamVjdC5rZXlzKHRoaXMudGlsZU1hdHJpeFNldHMpLmxlbmd0aCAhPT0gMCkgJiYgT2JqZWN0LmtleXModGhpcy5sYXllcnMpLmxlbmd0aCAhPT0gMCkge1xuICAgICAgICAgICAgLy8gZ2V0IHRoZSBsYXllcklkIG9mIHRoZSBsYXllclxuICAgICAgICAgICAgdmFyIGxheWVySWQgPSB0aGlzLmdldExheWVySWQobGF5ZXJOYW1lLCBzZXJ2aWNlKTtcblxuICAgICAgICAgICAgaWYgKGxheWVySWQpIHtcbiAgICAgICAgICAgICAgICAvLyBnZXQgdGhlIGxheWVyIENvbmYgT2JqZWN0XG4gICAgICAgICAgICAgICAgdmFyIGxheWVyQ29uZiA9IHRoaXMuZ2V0TGF5ZXJDb25mKGxheWVySWQpO1xuXG4gICAgICAgICAgICAgICAgdmFyIGtleXMgPSB0aGlzLmdldExheWVyS2V5KGxheWVySWQpO1xuICAgICAgICAgICAgICAgIGlmIChrZXlzLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZ2V0IHNlcnZpY2VzIHBhcmFtc1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwga2V5cy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICAvLyBvbmx5IG9uZSBzZXJ2ZXJVcmwgaXMgc2F2ZWQgaW4gR3AuQ29uZmlnIDogd2l0aCBtdWx0aUtleXMsIHdlIGhhdmUgdG8gcmV0cmlldmUgdGhlIGtleSB1c2VkIGluIHRoZSBzZXJ2ZXJVcmwgcHJvcGVydHlcbiAgICAgICAgICAgICAgICAgICAgaWYgKGxheWVyQ29uZi5zZXJ2aWNlUGFyYW1zLnNlcnZlclVybFtrZXlzW2ldXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLnVybCA9IGxheWVyQ29uZi5zZXJ2aWNlUGFyYW1zLnNlcnZlclVybFtrZXlzW2ldXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGNvbnN0IHdtc1R5cGVSZWdleCA9IC9cXC92XFwvLztcbiAgICAgICAgICAgICAgICAvLyBXTVMgdmVjdG9yIHN0eWxlIGFsd2F5cyBlbXB0eSAobm90IGluIGdldENhcClcbiAgICAgICAgICAgICAgICBpZiAod21zVHlwZVJlZ2V4LnRlc3QocGFyYW1zLnVybCkpIHtcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1zLnN0eWxlcyA9IFwiIFwiO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIFdNUyByYXN0ZXIgc3R5bGUgaXMgZGVmaW5lZCBpbiBnZXRDYXBcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1zLnN0eWxlcyA9IGxheWVyQ29uZi5zdHlsZXNbMF0ubmFtZTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBwYXJhbXMudmVyc2lvbiA9IGxheWVyQ29uZi5zZXJ2aWNlUGFyYW1zLnZlcnNpb247XG4gICAgICAgICAgICAgICAgcGFyYW1zLmZvcm1hdCA9IGxheWVyQ29uZi5mb3JtYXRzWzBdLm5hbWU7XG4gICAgICAgICAgICAgICAgcGFyYW1zLnByb2plY3Rpb24gPSBsYXllckNvbmYuZGVmYXVsdFByb2plY3Rpb247XG5cbiAgICAgICAgICAgICAgICAvLyBnZXQgbGF5ZXIgaW5mbyBhbmQgY29uc3RyYWludHNcbiAgICAgICAgICAgICAgICBwYXJhbXMubWluU2NhbGUgPSBsYXllckNvbmYuZ2xvYmFsQ29uc3RyYWludC5taW5TY2FsZURlbm9taW5hdG9yO1xuICAgICAgICAgICAgICAgIHBhcmFtcy5tYXhTY2FsZSA9IGxheWVyQ29uZi5nbG9iYWxDb25zdHJhaW50Lm1heFNjYWxlRGVub21pbmF0b3I7XG4gICAgICAgICAgICAgICAgcGFyYW1zLmV4dGVudCA9IGxheWVyQ29uZi5nbG9iYWxDb25zdHJhaW50LmJib3g7XG4gICAgICAgICAgICAgICAgcGFyYW1zLmxlZ2VuZHMgPSBsYXllckNvbmYubGVnZW5kcztcbiAgICAgICAgICAgICAgICBwYXJhbXMudGl0bGUgPSBsYXllckNvbmYudGl0bGU7XG4gICAgICAgICAgICAgICAgcGFyYW1zLmRlc2NyaXB0aW9uID0gbGF5ZXJDb25mLmRlc2NyaXB0aW9uO1xuXG4gICAgICAgICAgICAgICAgaWYgKHNlcnZpY2UgPT09IFwiV01TXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1zLm1ldGFkYXRhID0gbGF5ZXJDb25mLm1ldGFkYXRhO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIEluZm9ybWF0aW9ucyAgbm9uIGRpc3BvbmlibGVzIGF2ZWMgbGVzIGdldENhcFxuICAgICAgICAgICAgICAgIC8vIHBhcmFtcy5tZXRhZGF0YSA9IGxheWVyQ29uZi5nZXRNZXRhZGF0YSgpO1xuICAgICAgICAgICAgICAgIC8vIHBhcmFtcy5vcmlnaW5hdG9ycyA9IGxheWVyQ29uZi5nZXRPcmlnaW5hdG9ycygpO1xuICAgICAgICAgICAgICAgIC8vIHBhcmFtcy5xdWlja2xvb2tVcmwgPSBsYXllckNvbmYuZ2V0UXVpY2tsb29rVXJsKCk7XG5cbiAgICAgICAgICAgICAgICAvLyBXTVRTIDogZ2V0IHRoZSB0aWxlTWF0cml4U2V0TGltaXRzXG4gICAgICAgICAgICAgICAgaWYgKGxheWVyQ29uZi53bXRzT3B0aW9ucykge1xuICAgICAgICAgICAgICAgICAgICBwYXJhbXMudGlsZU1hdHJpeFNldExpbWl0cyA9IGxheWVyQ29uZi53bXRzT3B0aW9ucy50aWxlTWF0cml4U2V0TGltaXRzO1xuICAgICAgICAgICAgICAgICAgICB2YXIgVE1TTGluayA9IGxheWVyQ29uZi53bXRzT3B0aW9ucy50aWxlTWF0cml4U2V0TGluaztcbiAgICAgICAgICAgICAgICAgICAgaWYgKFRNU0xpbmspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5UTVNMaW5rID0gVE1TTGluaztcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0bXNDb25mID0gdGhpcy5nZXRUTVNDb25mKFRNU0xpbmspO1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gR2V0IG1hdHJpeCBvcmlnaW4gOiBHcC5Qb2ludCA9IE9iamVjdHt4OkZsb2F0LCB5OkZsb2F0fVxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gcGFyYW1zLm1hdHJpeE9yaWdpbiA9IHRtc0NvbmYuZ2V0VG9wTGVmdENvcm5lcigpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLm1hdHJpeElkcyA9IE9iamVjdC5rZXlzKHRtc0NvbmYudGlsZU1hdHJpY2VzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy50aWxlTWF0cmljZXMgPSB0bXNDb25mLnRpbGVNYXRyaWNlcztcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGJ5IGRlZmF1bHQsIHBzZXVkbyBtZXJjYXRvciByZXNvbHV0aW9uc1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLm5hdGl2ZVJlc29sdXRpb25zID0gdG1zQ29uZi5uYXRpdmVSZXNvbHV0aW9ucyB8fCB0aGlzLmdldFRNU0NvbmYoXCJQTVwiKS5uYXRpdmVSZXNvbHV0aW9ucztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcGFyYW1zO1xuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiBHZXQgdG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m1pblNjYWxlRGVub21pbmF0b3I7XG4gICAgICAgICAgICBwYXJhbXMubWF4U2NhbGUgPSBsYXllckNvbmYuZ2xvYmFsQ29uc3RyYWludC5tYXhTY2FsZURlbm9taW5hdG9yO1xuICAgICAgICAgICAgcGFyYW1zLmV4dGVudCA9IGxheWVyQ29uZi5nbG9iYWxDb25zdHJhaW50LmJib3g7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcGFyYW1zO1xuICAgIH1cblxufTtcblxuZXhwb3J0IGRlZmF1bHQgQ29uZmlnSW50ZXJmYWNlO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Config/ConfigInterface.js\n"); /***/ }), @@ -572,7 +584,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n\n/**\n * Response object for /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// cette classe contient les URLs par defaut des services.\n// DefaultUrlService.Alti.url(key)[elevation-json]\n// DefaultUrlService.Alti.url(key)[elevation-xml]\n// DefaultUrlService.Alti.url(key)[profil-json]\n// DefaultUrlService.Alti.url(key)[profil-xml]\n// DefaultUrlService.Alti.url(key)[wps]\n// DefaultUrlService.ProcessIsoCurve.url(key)\n// DefaultUrlService.AutoComplete.url(key)\n// DefaultUrlService.ReverseGeocode.url(key)\n// DefaultUrlService.Geocode.url(key)\n// DefaultUrlService.Route.url(key)\n\n// Example :\n//\n// DefaultUrlService.Alti.url('alti')[elevation-json]\n// output {String} -> http://wxs.ign.fr/calcul/alti/rest/elevation.json\n//\n// DefaultUrlService.Alti.url('calcul')\n// output {Object|String}\n// -> http://wxs.ign.fr/calcul/alti/rest/elevation.json\n// -> http://wxs.ign.fr/calcul/alti/rest/elevation.xml\n// -> http://wxs.ign.fr/calcul/alti/rest/elevationLine.json\n// -> http://wxs.ign.fr/calcul/alti/rest/elevationLine.xml\n// -> http://wxs.ign.fr/calcul/alti/wps\n//\n// ssl by default.\n//\n// Force to not do ssl :\n// DefaultUrlService.ssl = false;\n//\n// DefaultUrlService.AutoComplete.url('calcul')\n// output {Object|String}\n// -> https://wxs.ign.fr/calcul/ols/apis/completion\n\n// constantes internes\nvar HOSTNAME = \"wxs.ign.fr\";\n\n/**\n * Default Geoportal web services URLs access.\n *\n * @namespace\n * @alias Gp.Services.DefaultUrl\n */\nvar DefaultUrlService = {\n\n /** if set true, require the use of https protocol */\n ssl : true,\n\n /**\n * base url of services (ssl protocol management)\n * @param {String} key - key\n * @param {String} path - path\n * @returns {String} url\n */\n url : function (key, path) {\n // comportement par défaut => https\n // sinon, il est fixé par l'option 'ssl' (false => http)\n var _protocol;\n if (DefaultUrlService.ssl === false) {\n _protocol = \"http://\";\n } else {\n _protocol = \"https://\";\n }\n\n return _protocol + HOSTNAME.concat(\"/\", key, path);\n },\n\n /**\n * Elevation web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns elevation service default urls with or without geoportal access key given as a parameter. The result is a javascript object with different urls given used protocols (\"elevation-json\", \"elevation-xml\", \"profil-json\" or \"profil-xml\").\n */\n Alti : {\n _key : {\n // rest\n \"elevation-json\" : \"/alti/rest/elevation.json\",\n \"elevation-xml\" : \"/alti/rest/elevation.xml\",\n \"profil-json\" : \"/alti/rest/elevationLine.json\",\n \"profil-xml\" : \"/alti/rest/elevationLine.xml\",\n // other\n wps : \"/alti/wps\"\n },\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n return {\n // rest\n \"elevation-json\" : DefaultUrlService.url(key, this._key[\"elevation-json\"]),\n \"elevation-xml\" : DefaultUrlService.url(key, this._key[\"elevation-xml\"]),\n \"profil-json\" : DefaultUrlService.url(key, this._key[\"profil-json\"]),\n \"profil-xml\" : DefaultUrlService.url(key, this._key[\"profil-xml\"]),\n // other\n wps : DefaultUrlService.url(key, this._key[\"wps\"])\n };\n }\n },\n /**\n * IsoCurve web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns isocurve service default urls with or without geoportal access key given as a parameter. The result is a javascript object with different urls given used protocols (\"iso-json\" or \"iso-xml\").\n */\n ProcessIsoCurve : {\n _key : \"/geoportail/isochrone/rest/1.0.0/isochrone\",\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n return DefaultUrlService.url(key, this._key);\n }\n },\n /**\n * Config web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns config service default urls with or without geoportal access key given as a parameter.\n */\n Config : {\n _key : \"https://raw.githubusercontent.com/IGNF/geoportal-configuration/main/dist/\",\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n // key must be an array of one or several keys\n if (!Array.isArray(key)) {\n key = key.split(\",\");\n }\n // not homogeneous with others geoportal services URLs\n var url = [];\n for (var i = 0; i < key.length; i++) {\n url[i] = this._key + key[i] + \"Config.json\";\n }\n return url;\n }\n },\n /**\n * Autocompletion web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns autocomplete service default urls with or without geoportal access key given as a parameter. The result is a String.\n */\n AutoComplete : {\n _key : \"/ols/apis/completion\",\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n return DefaultUrlService.url(key, this._key);\n }\n },\n /**\n * Reverse geocoding web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns reverse geocoding service default urls with or without geoportal access key given as a parameter. The result is a String.\n */\n ReverseGeocode : {\n _key : \"/geoportail/ols\",\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n return DefaultUrlService.url(key, this._key);\n }\n },\n /**\n * Geocoding web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns geocoding service default urls with or without geoportal access key given as a parameter. The result is a String.\n */\n Geocode : {\n _key : \"/geoportail/ols\",\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n return DefaultUrlService.url(key, this._key);\n }\n },\n /**\n * Routing web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns routing service default urls with or without geoportal access key given as a parameter. The result is a javascript object with different urls given used protocols.\n */\n Route : {\n _key : \"/geoportail/itineraire/rest/1.0.0/route\",\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n return DefaultUrlService.url(key, this._key);\n }\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (DefaultUrlService);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvRGVmYXVsdFVybFNlcnZpY2UuanM/MzE5NCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsWUFBWSxPQUFPO0FBQ25CO0FBQ0E7QUFDQSxXQUFXO0FBQ1g7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsV0FBVztBQUNYOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsY0FBYyxPQUFPO0FBQ3JCLGNBQWMsT0FBTztBQUNyQixnQkFBZ0IsT0FBTztBQUN2QjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFNBQVM7QUFDVDtBQUNBOztBQUVBO0FBQ0EsS0FBSzs7QUFFTDtBQUNBO0FBQ0E7QUFDQSxnQkFBZ0I7QUFDaEIsa0JBQWtCLFNBQVM7QUFDM0I7QUFDQTtBQUNBO0FBQ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DogXCIvYWx0aS93cHNcIlxuICAgICAgICB9LFxuICAgICAgICAvKipcbiAgICAgICAgKiB1cmxcbiAgICAgICAgKiBAcGFyYW0ge1N0cmluZ30ga2V5IC0ga2V5XG4gICAgICAgICogQHJldHVybnMge1N0cmluZ30gdXJsXG4gICAgICAgICovXG4gICAgICAgIHVybCA6IGZ1bmN0aW9uIChrZXkpIHtcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgLy8gcmVzdFxuICAgICAgICAgICAgICAgIFwiZWxldmF0aW9uLWpzb25cIiA6IERlZmF1bHRVcmxTZXJ2aWNlLnVybChrZXksIHRoaXMuX2tleVtcImVsZXZhdGlvbi1qc29uXCJdKSxcbiAgICAgICAgICAgICAgICBcImVsZXZhdGlvbi14bWxcIiA6IERlZmF1bHRVcmxTZXJ2aWNlLnVybChrZXksIHRoaXMuX2tleVtcImVsZXZhdGlvbi14bWxcIl0pLFxuICAgICAgICAgICAgICAgIFwicHJvZmlsLWpzb25cIiA6IERlZmF1bHRVcmxTZXJ2aWNlLnVybChrZXksIHRoaXMuX2tleVtcInByb2ZpbC1qc29uXCJdKSxcbiAgICAgICAgICAgICAgICBcInByb2ZpbC14bWxcIiA6IERlZmF1bHRVcmxTZXJ2aWNlLnVybChrZXksIHRoaXMuX2tleVtcInByb2ZpbC14bWxcIl0pLFxuICAgICAgICAgICAgICAgIC8vIG90aGVyXG4gICAgICAgICAgICAgICAgd3BzIDogRGVmYXVsdFVybFNlcnZpY2UudXJsKGtleSwgdGhpcy5fa2V5W1wid3BzXCJdKVxuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgIH0sXG4gICAgLyoqXG4gICAgICogSXNvQ3VydmUgd2ViIHNlcnZpY2UgYWNjZXNzXG4gICAgICpcbiAgICAgKiBAbWVtYmVyIHtPYmplY3R9XG4gICAgICogQHByb3BlcnR5IHtGdW5jdGlvbn0gdXJsIChrZXkpIC0gUmV0dXJucyBpc29jdXJ2ZSBzZXJ2aWN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Rpc3QvXCIsXG4gICAgICAgIC8qKlxuICAgICAgICAqIHVybFxuICAgICAgICAqIEBwYXJhbSB7U3RyaW5nfSBrZXkgLSBrZXlcbiAgICAgICAgKiBAcmV0dXJucyB7U3RyaW5nfSB1cmxcbiAgICAgICAgKi9cbiAgICAgICAgdXJsIDogZnVuY3Rpb24gKGtleSkge1xuICAgICAgICAgICAgLy8ga2V5IG11c3QgYmUgYW4gYXJyYXkgb2Ygb25lIG9yIHNldmVyYWwga2V5c1xuICAgICAgICAgICAgaWYgKCFBcnJheS5pc0FycmF5KGtleSkpIHtcbiAgICAgICAgICAgICAgICBrZXkgPSBrZXkuc3BsaXQoXCIsXCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gbm90IGhvbW9nZW5lb3VzIHdpdGggb3RoZXJzIGdlb3BvcnRhbCBzZXJ2aWNlcyBVUkxzXG4gICAgICAgICAgICB2YXIgdXJsID0gW107XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGtleS5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIHVybFtpXSA9IHRoaXMuX2tleSArIGtleVtpXSArIFwiQ29uZmlnLmpzb25cIjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB1cmw7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIC8qKlxuICAgICAqIEF1dG9jb21wbGV0aW9uIHdlYiBzZXJ2aWNlIGFjY2Vzc1xuICAgICAqXG4gICAgICogQG1lbWJlciB7T2JqZWN0fVxuICAgICAqIEBwcm9wZXJ0eSB7RnVuY3Rpb259IHVybCAoa2V5KSAtIFJldHVybnMgYXV0b2NvbXBsZXRlIHNlcnZpY2UgZGVmYXVsdCB1cmxzIHdpdGggb3Igd2l0aG91dCBnZW9wb3J0YWwgYWNjZXNzIGtleSBnaXZlbiBhcyBhIHBhcmFtZXRlci4gVGhlIHJlc3VsdCBpcyBhIFN0cmluZy5cbiAgICAgKi9cbiAgICBBdXRvQ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2tleSA6IFwiL2dlb3BvcnRhaWwvaXRpbmVyYWlyZS9yZXN0LzEuMC4wL3JvdXRlXCIsXG4gICAgICAgIC8qKlxuICAgICAgICAqIHVybFxuICAgICAgICAqIEBwYXJhbSB7U3RyaW5nfSBrZXkgLSBrZXlcbiAgICAgICAgKiBAcmV0dXJucyB7U3RyaW5nfSB1cmxcbiAgICAgICAgKi9cbiAgICAgICAgdXJsIDogZnVuY3Rpb24gKGtleSkge1xuICAgICAgICAgICAgcmV0dXJuIERlZmF1bHRVcmxTZXJ2aWNlLnVybChrZXksIHRoaXMuX2tleSk7XG4gICAgICAgIH1cbiAgICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBEZWZhdWx0VXJsU2VydmljZTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/DefaultUrlService.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n// cette classe contient les URLs par defaut des services.\n// DefaultUrlService.Alti.url(key)[elevation-json]\n// DefaultUrlService.Alti.url(key)[elevation-xml]\n// DefaultUrlService.Alti.url(key)[profil-json]\n// DefaultUrlService.Alti.url(key)[profil-xml]\n// DefaultUrlService.ProcessIsoCurve.url(key)\n// DefaultUrlService.AutoComplete.url(key)\n// DefaultUrlService.ReverseGeocode.url(key)\n// DefaultUrlService.Geocode.url(key)\n// DefaultUrlService.Route.url(key)\n\n// Example :\n//\n// DefaultUrlService.Alti.url('alti')[elevation-json]\n// output {String} -> http://wxs.ign.fr/calcul/alti/rest/elevation.json\n//\n// DefaultUrlService.Alti.url('calcul')\n// output {Object|String}\n// -> http://wxs.ign.fr/calcul/alti/rest/elevation.json\n// -> http://wxs.ign.fr/calcul/alti/rest/elevation.xml\n// -> http://wxs.ign.fr/calcul/alti/rest/elevationLine.json\n// -> http://wxs.ign.fr/calcul/alti/rest/elevationLine.xml\n//\n// ssl by default.\n//\n// Force to not do ssl :\n// DefaultUrlService.ssl = false;\n//\n// DefaultUrlService.AutoComplete.url('calcul')\n// output {Object|String}\n// -> https://wxs.ign.fr/calcul/ols/apis/completion\n\n// constantes internes\nvar HOSTNAME = \"wxs.ign.fr\";\n\n/**\n * Default Geoportal web services URLs access.\n *\n * @namespace\n * @alias Gp.Services.DefaultUrl\n */\nvar DefaultUrlService = {\n\n /** if set true, require the use of https protocol */\n ssl : true,\n\n /**\n * base url of services (ssl protocol management)\n * @param {String} path - path\n * @returns {String} url\n */\n url : function (path) {\n // comportement par défaut => https\n // sinon, il est fixé par l'option 'ssl' (false => http)\n var _protocol;\n if (DefaultUrlService.ssl === false) {\n _protocol = \"http://\";\n } else {\n _protocol = \"https://\";\n }\n\n return _protocol + HOSTNAME + path;\n },\n\n /**\n * base new-url of services (ssl protocol management)\n * @param {String} path - path\n * @returns {String} url\n */\n newUrl : function (path, hostname) {\n // comportement par défaut => https\n // sinon, il est fixé par l'option 'ssl' (false => http)\n var _protocol;\n if (DefaultUrlService.ssl === false) {\n _protocol = \"http://\";\n } else {\n _protocol = \"https://\";\n }\n\n return _protocol + hostname + path;\n },\n\n /**\n * Elevation web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns elevation service default urls with or without geoportal access key given as a parameter. The result is a javascript object with different urls given used protocols (\"elevation-json\", \"elevation-xml\", \"profil-json\" or \"profil-xml\").\n */\n Alti : {\n new_key : {\n // rest\n \"elevation-json\" : \"/altimetrie/1.0/calcul/alti/rest/elevation.json\",\n \"elevation-xml\" : \"/altimetrie/1.0/calcul/alti/rest/elevation.xml\",\n \"profil-json\" : \"/altimetrie/1.0/calcul/alti/rest/elevationLine.json\",\n \"profil-xml\" : \"/altimetrie/1.0/calcul/alti/rest/elevationLine.xml\"\n },\n _key : {\n // rest\n \"elevation-json\" : \"/calcul/alti/rest/elevation.json\",\n \"elevation-xml\" : \"/calcul/alti/rest/elevation.xml\",\n \"profil-json\" : \"/calcul/alti/rest/elevationLine.json\",\n \"profil-xml\" : \"/calcul/alti/rest/elevationLine.xml\",\n // other\n wps : \"/alti/wps\"\n },\n /**\n * newurl from geoplateforme service\n * @param {String} key - key\n * @returns {String} url\n */\n newUrl : function () {\n return;\n },\n /**\n * url from wxs service\n * @returns {String} url\n */\n url : function () {\n return {\n // rest\n \"elevation-json\" : DefaultUrlService.url(this._key[\"elevation-json\"]),\n \"elevation-xml\" : DefaultUrlService.url(this._key[\"elevation-xml\"]),\n \"profil-json\" : DefaultUrlService.url(this._key[\"profil-json\"]),\n \"profil-xml\" : DefaultUrlService.url(this._key[\"profil-xml\"])\n };\n }\n },\n /**\n * IsoCurve web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns isocurve service default urls with or without geoportal access key given as a parameter. The result is a javascript object with different urls given used protocols (\"iso-json\" or \"iso-xml\").\n */\n ProcessIsoCurve : {\n\n new_key : \"/itineraire/isochrone\",\n\n _key : \"/calcul/geoportail/isochrone/rest/1.0.0/isochrone\",\n\n /**\n * url from geoplateforme service\n * @returns {String} url\n */\n newUrl : function () {\n return;\n },\n\n /**\n * url from wxs service\n * @returns {String} url\n */\n url : function () {\n return DefaultUrlService.url(this._key);\n }\n },\n /**\n * Config web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns config service default urls with or without geoportal access key given as a parameter.\n */\n Config : {\n _key : \"https://raw.githubusercontent.com/IGNF/geoportal-configuration/new-url/dist/\",\n /**\n * url\n * @param {String} key - key\n * @returns {String} url\n */\n url : function (key) {\n // key must be an array of one or several keys\n if (!Array.isArray(key)) {\n key = key.split(\",\");\n }\n // not homogeneous with others geoportal services URLs\n var url = [];\n for (var i = 0; i < key.length; i++) {\n url[i] = this._key + key[i] + \"Config.json\";\n }\n return url;\n }\n },\n /**\n * Autocompletion web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns autocomplete service default urls with or without geoportal access key given as a parameter. The result is a String.\n */\n AutoComplete : {\n new_key : \"/completion\",\n\n _key : \"/calcul/geoportail/geocodage/rest/0.1/completion\",\n\n /**\n * url from geoplateforme service\n * @returns {String} url\n */\n newUrl : function () {\n return;\n },\n\n /**\n * url\n * @returns {String} url\n */\n url : function (key) {\n return DefaultUrlService.url(this._key);\n }\n },\n /**\n * Reverse geocoding web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns reverse geocoding service default urls with or without geoportal access key given as a parameter. The result is a String.\n */\n ReverseGeocode : {\n new_key : \"/reverse\",\n\n _key : \"/calcul/geoportail/geocodage/rest/0.1/reverse\",\n\n /**\n * url from geoplateforme service\n * @returns {String} url\n */\n newUrl : function () {\n return;\n },\n\n /**\n * url\n * @returns {String} url\n */\n url : function () {\n return DefaultUrlService.url(this._key);\n }\n },\n /**\n * Geocoding web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns geocoding service default urls with or without geoportal access key given as a parameter. The result is a String.\n */\n Geocode : {\n new_key : \"/search\",\n\n _key : \"/calcul/geoportail/geocodage/rest/0.1/search\",\n\n /**\n * url from geoplateforme service\n * @returns {String} url\n */\n newUrl : function () {\n return;\n },\n\n /**\n * url\n * @returns {String} url\n */\n url : function () {\n return DefaultUrlService.url(this._key);\n }\n },\n /**\n * Routing web service access\n *\n * @member {Object}\n * @property {Function} url (key) - Returns routing service default urls with or without geoportal access key given as a parameter. The result is a javascript object with different urls given used protocols.\n */\n Route : {\n new_key : \"/itineraire/route\",\n\n _key : \"/calcul/geoportail/itineraire/rest/1.0.0/route\",\n\n /**\n * url from geoplateforme service\n * @returns {String} url\n */\n newUrl : function () {\n return;\n },\n\n /**\n * url from wxs service\n * @returns {String} url\n */\n url : function () {\n return DefaultUrlService.url(this._key);\n }\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (DefaultUrlService);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvRGVmYXVsdFVybFNlcnZpY2Uuan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hdGlvbkxpbmUueG1sXCIsXG4gICAgICAgICAgICAvLyBvdGhlclxuICAgICAgICAgICAgd3BzIDogXCIvYWx0aS93cHNcIlxuICAgICAgICB9LFxuICAgICAgICAvKipcbiAgICAgICAgKiBuZXd1cmwgZnJvbSBnZW9wbGF0ZWZvcm1lIHNlcnZpY2VcbiAgICAgICAgKiBAcGFyYW0ge1N0cmluZ30ga2V5IC0ga2V5XG4gICAgICAgICogQHJldHVybnMge1N0cmluZ30gdXJsXG4gICAgICAgICovXG4gICAgICAgIG5ld1VybCA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfSxcbiAgICAgICAgLyoqXG4gICAgICAgICogdXJsIGZyb20gd3hzIHNlcnZpY2VcbiAgICAgICAgKiBAcmV0dXJucyB7U3RyaW5nfSB1cmxcbiAgICAgICAgKi9cbiAgICAgICAgdXJsIDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAvLyByZXN0XG4gICAgICAgICAgICAgICAgXCJlbGV2YXRpb24tanNvblwiIDogRGVmYXVsdFVybFNlcnZpY2UudXJsKHRoaXMuX2tleVtcImVsZXZhdGlvbi1qc29uXCJdKSxcbiAgICAgICAgICAgICAgICBcImVsZXZhdGlvbi14bWxcIiA6IERlZmF1bHRVcmxTZXJ2aWNlLnVybCh0aGlzLl9rZXlbXCJlbGV2YXRpb24teG1sXCJdKSxcbiAgICAgICAgICAgICAgICBcInByb2ZpbC1qc29uXCIgOiBEZWZhdWx0VXJsU2VydmljZS51cmwodGhpcy5fa2V5W1wicHJvZmlsLWpzb25cIl0pLFxuICAgICAgICAgICAgICAgIFwicHJvZmlsLXhtbFwiIDogRGVmYXVsdFVybFNlcnZpY2UudXJsKHRoaXMuX2tleVtcInByb2ZpbC14bWxcIl0pXG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgfSxcbiAgICAvKipcbiAgICAgKiBJc29DdXJ2Z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HdlYiBzZXJ2aWNlIGFjY2Vzc1xuICAgICAqXG4gICAgICogQG1lbWJlciB7T2JqZWN0fVxuICAgICAqIEBwcm9wZXJ0eSB7RnVuY3Rpb259IHVybCAoa2V5KSAtIFJldHVybnMgY29uZmlnIHNlcnZpY2UgZGVmYXVsdCB1cmxzIHdpdGggb3Igd2l0aG91dCBnZW9wb3J0YWwgYWNjZXNzIGtleSBnaXZlbiBhcyBhIHBhcmFtZXRlci5cbiAgICAgKi9cbiAgICBDb25maWcgOiB7XG4gICAgICAgIF9rZXkgOiBcImh0dHBzOi8vcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbS9JR05GL2dlb3BvcnRhbC1jb25maWd1cmF0aW9uL25ldy11cmwvZGlzdC9cIixcbiAgICAgICAgLyoqXG4gICAgICAgICogdXJsXG4gICAgICAgICogQHBhcmFtIHtTdHJpbmd9IGtleSAtIGtleVxuICAgICAgICAqIEByZXR1cm5zIHtTdHJpbmd9IHVybFxuICAgICAgICAqL1xuICAgICAgICB1cmwgOiBmdW5jdGlvbiAoa2V5KSB7XG4gICAgICAgICAgICAvLyBrZXkgbXVzdCBiZSBhbiBhcnJheSBvZiBvbmUgb3Igc2V2ZXJhbCBrZXlzXG4gICAgICAgICAgICBpZiAoIUFycmF5LmlzQXJyYXkoa2V5KSkge1xuICAgICAgICAgICAgICAgIGtleSA9IGtleS5zcGxpdChcIixcIik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBub3QgaG9tb2dlbmVvdXMgd2l0aCBvdGhlcnMgZ2VvcG9ydGFsIHNlcnZpY2VzIFVSTHNcbiAgICAgICAgICAgIHZhciB1cmwgPSBbXTtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwga2V5Lmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgdXJsW2ldID0gdGhpcy5fa2V5ICsga2V5W2ldICsgXCJDb25maWcuanNvblwiO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcm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gICovXG4gICAgUm91dGUgOiB7XG4gICAgICAgIG5ld19rZXkgOiBcIi9pdGluZXJhaXJlL3JvdXRlXCIsXG5cbiAgICAgICAgX2tleSA6IFwiL2NhbGN1bC9nZW9wb3J0YWlsL2l0aW5lcmFpcmUvcmVzdC8xLjAuMC9yb3V0ZVwiLFxuXG4gICAgICAgIC8qKlxuICAgICAgICAqIHVybCBmcm9tIGdlb3BsYXRlZm9ybWUgc2VydmljZVxuICAgICAgICAqIEByZXR1cm5zIHtTdHJpbmd9IHVybFxuICAgICAgICAqL1xuICAgICAgICBuZXdVcmwgOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH0sXG5cbiAgICAgICAgLyoqXG4gICAgICAgICogdXJsIGZyb20gd3hzIHNlcnZpY2VcbiAgICAgICAgKiBAcmV0dXJucyB7U3RyaW5nfSB1cmxcbiAgICAgICAgKi9cbiAgICAgICAgdXJsIDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIERlZmF1bHRVcmxTZXJ2aWNlLnVybCh0aGlzLl9rZXkpO1xuICAgICAgICB9XG4gICAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgRGVmYXVsdFVybFNlcnZpY2U7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/DefaultUrlService.js\n"); /***/ }), @@ -596,7 +608,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Uti /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../CommonService */ \"./node_modules/geoportal-access-lib/src/Services/CommonService.js\");\n/* harmony import */ var _Request_GeocodeRequestFactory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Request/GeocodeRequestFactory */ \"./node_modules/geoportal-access-lib/src/Services/Geocode/Request/GeocodeRequestFactory.js\");\n/* harmony import */ var _Response_GeocodeResponseFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Response/GeocodeResponseFactory */ \"./node_modules/geoportal-access-lib/src/Services/Geocode/Response/GeocodeResponseFactory.js\");\n\n\n\n\n\n\n\n/**\n * @classdesc\n * Appel du service de géocodage direct du Géoportail :\n * envoi de la requête construite selon les paramètres en options,\n * éventuellement parsing et analyse de la réponse,\n * retour d'une réponse en paramètre de la fonction onSuccess.\n *\n *\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.Geocode\n *\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {String|Object} options.query - Nom de l'adresse, du toponyme, de l'unité administrative ou de la parcelle cadastrale recherchée.\n *\n * @param {Object} [options.filters] - Les propriétés possibles de cet objet sont décrites ci-après.\n * @param {String} [options.filters.[prop]] - Critère supplémentaire pour filtrer la recherche sous la forme\n * d'un couple clé/valeur à définir selon les possibilités du serveur ajouté à la requête.\n * Le service de géocodage du Géoportail permet de filtrer les adresses postales avec les propriétés :\n * \"postalCode\", \"inseeCode\", \"city\".\n * Il permet également de filtrer les toponymes avec les propriétés :\n * \"postalCode\", \"inseeCode\", \"type\".\n * Enfin, il permet de filtrer les parcelles cadastrales avec les propriétés :\n * \"codeDepartement\", \"codeCommune\", \"nomCommune\", \"codeCommuneAbs\", \"codeArrondissement\", \"section\", \"numero\", \"feuille\".\n *\n * @param {String} [options.index = \"StreetAddress\"] - Type de l'objet recherché.\n * Le service de géocodage du Géoportail permet de rechercher des 'PositionOfInterest' pour des toponymes, des 'StreetAddress'\n * pour des adresses postales ou des 'CadastralParcel' pour des parcelles cadastrales.\n * L'index 'location' regroupe les indexes 'StreetAddress' et 'PositionOfInterest'.\n * D'autres types pourront être rajoutés selon l'évolution du service.\n * Par défaut, index = 'StreetAddress'.\n *\n * @param {Object} options.position - Position du point de référence pour le calcul de proximité exprimée dans le système de référence spécifié par le srs.\n * @param {Float} options.position.lon - Longitude du point de référence pour le calcul de proximité.\n * @param {Float} options.position.lat - Latitude du point de référence pour le calcul de proximité.\n *\n * @param {Number} [options.maximumResponses] - Nombre de réponses maximal que l'on souhaite recevoir.\n * Pas de valeur par défaut.\n * Si le serveur consulté est celui du Géoportail, la valeur par défaut sera donc celle du service : 20.\n *\n * @param {Boolean} [options.returnTrueGeometry = false] - Booléen indiquant si l'on souhaite récupérer la géométrie vraie des objects géolocalisés.\n * false par défaut.\n *\n *\n * @example\n * var options = {\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * proxyURL : null,\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * position : {lon:, lat:},\n * index : 'StreetAddress',\n * query : '10 rue du pont Machin-ville'\n * (...)\n * };\n */\nfunction Geocode (options_) {\n if (!(this instanceof Geocode)) {\n throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"CLASS_CONSTRUCTOR\", \"Geocode\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"Geocode\";\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"Gp.Services.Geocode\");\n this.logger.trace(\"[Constructeur Geocode (options)]\");\n\n var options = this.patchOptionConvertor(options_);\n options.serverUrl = options.serverUrl || \"https://wxs.ign.fr/calcul/geoportail/geocodage/rest/0.1/search\";\n\n // appel du constructeur par heritage\n _CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].apply(this, [options]);\n\n if (!options.hasOwnProperty(\"query\")) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"query\"));\n }\n\n // ajout des options spécifiques au service\n this.options.query = options.query;\n\n // on definit l'index par defaut\n if (!options.index) {\n this.options.index = options.index = \"StreetAddress\";\n }\n\n if (options.filters) {\n var filter = Object.keys(options.filters);\n for (var i = 0; i < filter.length; i++) {\n var key = filter[i];\n // on supprime les filtres vides\n if (typeof options.filters[key] === \"undefined\" ||\n (typeof options.filters[key] === \"object\" && Object.keys(options.filters[key]).length === 0) ||\n (typeof options.filters[key] === \"string\" && options.filters[key].length === 0) ||\n (Array.isArray(options.filters[key]) && options.filters[key].length === 0)\n ) {\n delete this.options.filters[key];\n }\n }\n }\n\n this.options.index = options.index || \"StreetAddress\";\n this.options.maximumResponses = options.maximumResponses || 20;\n}\n\n/**\n * @lends module:Geocode#\n */\nGeocode.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nGeocode.prototype.constructor = Geocode;\n\n/**\n * Patch pour la convertion des options vers le nouveau formalisme.\n *\n * @param {Object} options_ - options du service\n * @return {Object} - options\n */\nGeocode.prototype.patchOptionConvertor = function (options_) {\n const options = options_;\n\n if (options.hasOwnProperty(\"location\")) {\n this.logger.warn(\"The parameter 'location' is deprecated\");\n\n if (!options.query) {\n options.query = options.location;\n }\n delete options.location;\n }\n\n if (options.filterOptions) {\n this.logger.warn(\"The parameter 'filterOptions' is deprecated\");\n\n if (!options.filters) {\n options.filters = options.filterOptions;\n\n if (options.filters.type) {\n this.logger.warn(\"The parameter 'filterOptions.type' is deprecated\");\n if (!options.index) {\n if (Array.isArray(options.filters.type) && options.filters.type.length > 0) {\n options.index = options.filters.type[0];\n } else {\n options.index = options.filters.type;\n }\n }\n delete options.filters.type;\n }\n\n if (options.filters.bbox) {\n this.logger.warn(\"The parameter 'filterOptions.bbox' is deprecated\");\n delete options.filters.bbox;\n }\n }\n delete options.filterOptions;\n }\n\n if (options.position) {\n if (options.position.x) {\n this.logger.warn(\"The parameter 'position.x' is deprecated\");\n\n if (!options.position.lon) {\n options.position.lon = options.position.x;\n }\n delete options.position.x;\n }\n\n if (options.position.y) {\n this.logger.warn(\"The parameter 'position.y' is deprecated\");\n\n if (!options.position.lat) {\n options.position.lat = options.position.y;\n }\n delete options.position.y;\n }\n }\n\n if (options.returnFreeForm) {\n this.logger.warn(\"The parameter 'returnFreeForm' is deprecated\");\n delete options.returnFreeForm;\n }\n\n if (options.srs) {\n this.logger.warn(\"The parameter 'srs' is deprecated\");\n delete options.srs;\n }\n\n return options;\n};\n\n/**\n * Création de la requête (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nGeocode.prototype.buildRequest = function (error, success) {\n var options = {\n httpMethod : this.options.httpMethod,\n // options specifiques du service\n geocodeMethod : \"search\",\n query : this.options.query,\n index : this.options.index,\n returnTrueGeometry : this.options.returnTrueGeometry,\n position : this.options.position,\n maxResp : this.options.maximumResponses,\n filters : this.options.filters\n };\n\n this.request = _Request_GeocodeRequestFactory__WEBPACK_IMPORTED_MODULE_4__[\"default\"].build(options);\n\n // on teste si la requete a bien été construite !\n (!this.request)\n ? error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_REQUEST_BUILD\")))\n : success.call(this, this.request);\n};\n\n/**\n * Analyse de la reponse (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nGeocode.prototype.analyzeResponse = function (error, success) {\n /* INFO :\n Etape 1 : Création de la requête (URL)\n -> stockage de la requête dans this.request\n Etape 2 : Envoi de la requête\n -> appel du protocol XHR, et envoi (par ex send ())\n -> récupération de la réponse JSON dans la fonction onSuccess () (this.response)\n -> si code HTTP 200 et pas de message d'erreur : etape 3\n -> si code HTTP != 200 : lancement de la fonction de callback onFailure avec le message d'erreur\n Etape 3 : Analyse de la réponse JSON (si rawResponse === false )\n -> appel du parser pour récupérer le document\n Etape 4 : Lancement de la fonction de callback onSuccess avec la réponse :\n -> JSON (si rawResponse === true)\n -> ou geocodedLocations\n */\n\n if (this.response) {\n var options = {\n response : this.response,\n rawResponse : this.options.rawResponse,\n onError : error,\n onSuccess : success,\n scope : this\n };\n\n _Response_GeocodeResponseFactory__WEBPACK_IMPORTED_MODULE_5__[\"default\"].build(options);\n } else {\n error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Geocode);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvR2VvY29kZS9HZW9jb2RlLmpzP2Q1NWQiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBaUQ7QUFDSDtBQUNXO0FBQ1o7QUFDdUI7QUFDRzs7QUFFdkU7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsYUFBYTtB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x0ZXJPcHRpb25zKSB7XG4gICAgICAgIHRoaXMubG9nZ2VyLndhcm4oXCJUaGUgcGFyYW1ldGVyICdmaWx0ZXJPcHRpb25zJyBpcyBkZXByZWNhdGVkXCIpO1xuXG4gICAgICAgIGlmICghb3B0aW9ucy5maWx0ZXJzKSB7XG4gICAgICAgICAgICBvcHRpb25zLmZpbHRlcnMgPSBvcHRpb25zLmZpbHRlck9wdGlvbnM7XG5cbiAgICAgICAgICAgIGlmIChvcHRpb25zLmZpbHRlcnMudHlwZSkge1xuICAgICAgICAgICAgICAgIHRoaXMubG9nZ2VyLndhcm4oXCJUaGUgcGFyYW1ldGVyICdmaWx0ZXJPcHRpb25zLnR5cGUnIGlzIGRlcHJlY2F0ZWRcIik7XG4gICAgICAgICAgICAgICAgaWYgKCFvcHRpb25zLmluZGV4KSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KG9wdGlvbnMuZmlsdGVycy50eXBlKSAmJiBvcHRpb25zLmZpbHRlcnMudHlwZS5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmluZGV4ID0gb3B0aW9ucy5maWx0ZXJzLnR5cGVbMF07XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmluZGV4ID0gb3B0aW9ucy5maWx0ZXJzLnR5cGU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZGVsZXRlIG9wdGlvbnMuZmlsdGVycy50eXBlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAob3B0aW9ucy5maWx0ZXJzLmJib3gpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmxvZ2dlci53YXJuKFwiVGhlIHBhcmFtZXRlciAnZmlsdGVyT3B0aW9ucy5iYm94JyBpcyBkZXByZWNhdGVkXCIpO1xuICAgICAgICAgICAgIC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GwodGhpcywgbmV3IEVycm9yU2VydmljZShfLmdldE1lc3NhZ2UoXCJTRVJWSUNFX1JFU1BPTlNFX0VNUFRZXCIpKSk7XG4gICAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgR2VvY29kZTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Geocode/Geocode.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../CommonService */ \"./node_modules/geoportal-access-lib/src/Services/CommonService.js\");\n/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../DefaultUrlService */ \"./node_modules/geoportal-access-lib/src/Services/DefaultUrlService.js\");\n/* harmony import */ var _Request_GeocodeRequestFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Request/GeocodeRequestFactory */ \"./node_modules/geoportal-access-lib/src/Services/Geocode/Request/GeocodeRequestFactory.js\");\n/* harmony import */ var _Response_GeocodeResponseFactory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Response/GeocodeResponseFactory */ \"./node_modules/geoportal-access-lib/src/Services/Geocode/Response/GeocodeResponseFactory.js\");\n\n\n\n\n\n\n\n\n/**\n * @classdesc\n * Appel du service de géocodage direct du Géoportail :\n * envoi de la requête construite selon les paramètres en options,\n * éventuellement parsing et analyse de la réponse,\n * retour d'une réponse en paramètre de la fonction onSuccess.\n *\n *\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.Geocode\n *\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {String|Object} options.query - Nom de l'adresse, du toponyme, de l'unité administrative ou de la parcelle cadastrale recherchée.\n *\n * @param {Object} [options.filters] - Les propriétés possibles de cet objet sont décrites ci-après.\n * @param {String} [options.filters.[prop]] - Critère supplémentaire pour filtrer la recherche sous la forme\n * d'un couple clé/valeur à définir selon les possibilités du serveur ajouté à la requête.\n * Le service de géocodage du Géoportail permet de filtrer les adresses postales avec les propriétés :\n * \"postalCode\", \"inseeCode\", \"city\".\n * Il permet également de filtrer les toponymes avec les propriétés :\n * \"postalCode\", \"inseeCode\", \"type\".\n * Enfin, il permet de filtrer les parcelles cadastrales avec les propriétés :\n * \"codeDepartement\", \"codeCommune\", \"nomCommune\", \"codeCommuneAbs\", \"codeArrondissement\", \"section\", \"numero\", \"feuille\".\n *\n * @param {String} [options.index = \"StreetAddress\"] - Type de l'objet recherché.\n * Le service de géocodage du Géoportail permet de rechercher des 'PositionOfInterest' pour des toponymes, des 'StreetAddress'\n * pour des adresses postales ou des 'CadastralParcel' pour des parcelles cadastrales.\n * L'index 'location' regroupe les indexes 'StreetAddress' et 'PositionOfInterest'.\n * D'autres types pourront être rajoutés selon l'évolution du service.\n * Par défaut, index = 'StreetAddress'.\n *\n * @param {Object} options.position - Position du point de référence pour le calcul de proximité exprimée dans le système de référence spécifié par le srs.\n * @param {Float} options.position.lon - Longitude du point de référence pour le calcul de proximité.\n * @param {Float} options.position.lat - Latitude du point de référence pour le calcul de proximité.\n *\n * @param {Number} [options.maximumResponses] - Nombre de réponses maximal que l'on souhaite recevoir.\n * Pas de valeur par défaut.\n * Si le serveur consulté est celui du Géoportail, la valeur par défaut sera donc celle du service : 20.\n *\n * @param {Boolean} [options.returnTrueGeometry = false] - Booléen indiquant si l'on souhaite récupérer la géométrie vraie des objects géolocalisés.\n * false par défaut.\n *\n *\n * @example\n * var options = {\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * proxyURL : null,\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * position : {lon:, lat:},\n * index : 'StreetAddress',\n * query : '10 rue du pont Machin-ville'\n * (...)\n * };\n */\nfunction Geocode (options_) {\n if (!(this instanceof Geocode)) {\n throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"CLASS_CONSTRUCTOR\", \"Geocode\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"Geocode\";\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"Gp.Services.Geocode\");\n this.logger.trace(\"[Constructeur Geocode (options)]\");\n\n var options = this.patchOptionConvertor(options_);\n if (!options.serverUrl) {\n // Code commenté : Release beta services DIFFUSION uniquement : on tape sur l'anvcien service de geocodage\n /* options.serverUrl = DefaultUrlService.Geocode.newUrl();\n if (options.oldGeocodeService) {\n options.serverUrl = DefaultUrlService.Geocode.url();\n } */\n // Release beta services DIFFUSION uniquement : on tape sur l'anvcien service de geocodage\n options.serverUrl = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__[\"default\"].Geocode.url();\n }\n\n // appel du constructeur par heritage\n _CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].apply(this, [options]);\n\n if (!options.hasOwnProperty(\"query\")) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"query\"));\n }\n\n // ajout des options spécifiques au service\n this.options.query = options.query;\n\n // on definit l'index par defaut\n if (!options.index) {\n this.options.index = options.index = \"StreetAddress\";\n }\n\n if (options.filters) {\n var filter = Object.keys(options.filters);\n for (var i = 0; i < filter.length; i++) {\n var key = filter[i];\n // on supprime les filtres vides\n if (typeof options.filters[key] === \"undefined\" ||\n (typeof options.filters[key] === \"object\" && Object.keys(options.filters[key]).length === 0) ||\n (typeof options.filters[key] === \"string\" && options.filters[key].length === 0) ||\n (Array.isArray(options.filters[key]) && options.filters[key].length === 0)\n ) {\n delete this.options.filters[key];\n }\n }\n }\n\n this.options.index = options.index || \"StreetAddress\";\n this.options.maximumResponses = options.maximumResponses || 20;\n}\n\n/**\n * @lends module:Geocode#\n */\nGeocode.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nGeocode.prototype.constructor = Geocode;\n\n/**\n * Patch pour la convertion des options vers le nouveau formalisme.\n *\n * @param {Object} options_ - options du service\n * @return {Object} - options\n */\nGeocode.prototype.patchOptionConvertor = function (options_) {\n const options = options_;\n\n if (options.hasOwnProperty(\"location\")) {\n this.logger.warn(\"The parameter 'location' is deprecated\");\n\n if (!options.query) {\n options.query = options.location;\n }\n delete options.location;\n }\n\n if (options.filterOptions) {\n this.logger.warn(\"The parameter 'filterOptions' is deprecated\");\n\n if (!options.filters) {\n options.filters = options.filterOptions;\n\n if (options.filters.type) {\n this.logger.warn(\"The parameter 'filterOptions.type' is deprecated\");\n if (!options.index) {\n if (Array.isArray(options.filters.type) && options.filters.type.length > 0) {\n options.index = options.filters.type[0];\n } else {\n options.index = options.filters.type;\n }\n }\n delete options.filters.type;\n }\n\n if (options.filters.bbox) {\n this.logger.warn(\"The parameter 'filterOptions.bbox' is deprecated\");\n delete options.filters.bbox;\n }\n }\n delete options.filterOptions;\n }\n\n if (options.position) {\n if (options.position.x) {\n this.logger.warn(\"The parameter 'position.x' is deprecated\");\n\n if (!options.position.lon) {\n options.position.lon = options.position.x;\n }\n delete options.position.x;\n }\n\n if (options.position.y) {\n this.logger.warn(\"The parameter 'position.y' is deprecated\");\n\n if (!options.position.lat) {\n options.position.lat = options.position.y;\n }\n delete options.position.y;\n }\n }\n\n if (options.returnFreeForm) {\n this.logger.warn(\"The parameter 'returnFreeForm' is deprecated\");\n delete options.returnFreeForm;\n }\n\n if (options.srs) {\n this.logger.warn(\"The parameter 'srs' is deprecated\");\n delete options.srs;\n }\n\n return options;\n};\n\n/**\n * Création de la requête (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nGeocode.prototype.buildRequest = function (error, success) {\n var options = {\n httpMethod : this.options.httpMethod,\n // options specifiques du service\n geocodeMethod : \"search\",\n query : this.options.query,\n index : this.options.index,\n returnTrueGeometry : this.options.returnTrueGeometry,\n position : this.options.position,\n maxResp : this.options.maximumResponses,\n filters : this.options.filters\n };\n\n this.request = _Request_GeocodeRequestFactory__WEBPACK_IMPORTED_MODULE_5__[\"default\"].build(options);\n\n // on teste si la requete a bien été construite !\n (!this.request)\n ? error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_REQUEST_BUILD\")))\n : success.call(this, this.request);\n};\n\n/**\n * Analyse de la reponse (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nGeocode.prototype.analyzeResponse = function (error, success) {\n /* INFO :\n Etape 1 : Création de la requête (URL)\n -> stockage de la requête dans this.request\n Etape 2 : Envoi de la requête\n -> appel du protocol XHR, et envoi (par ex send ())\n -> récupération de la réponse JSON dans la fonction onSuccess () (this.response)\n -> si code HTTP 200 et pas de message d'erreur : etape 3\n -> si code HTTP != 200 : lancement de la fonction de callback onFailure avec le message d'erreur\n Etape 3 : Analyse de la réponse JSON (si rawResponse === false )\n -> appel du parser pour récupérer le document\n Etape 4 : Lancement de la fonction de callback onSuccess avec la réponse :\n -> JSON (si rawResponse === true)\n -> ou geocodedLocations\n */\n\n if (this.response) {\n var options = {\n response : this.response,\n rawResponse : this.options.rawResponse,\n onError : error,\n onSuccess : success,\n scope : this\n };\n\n _Response_GeocodeResponseFactory__WEBPACK_IMPORTED_MODULE_6__[\"default\"].build(options);\n } else {\n error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Geocode);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvR2VvY29kZS9HZW9jb2RlLmpzP2Q1NWQiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFpRDtBQUNIO0FBQ1c7QUFDWjtBQUNRO0FBQ2U7QUFDRzs7QUFFdkU7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsYUFBYTtBQUNiO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEI7QUFDQSxXQUFXLGNBQWM7QUFDekI7QUFDQSxXQUFXLE9BQU87QUFDbEIsV0FBVyxPQUFPO0FBQ2xCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsV0FBVyxPQUFPO0FBQ2xCLGdCQUFnQixNQUFNO0FBQ3RCLGdCQUFnQixNQUFNO0FBQ3RCO0FBQ0Es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V4ID0gb3B0aW9ucy5maWx0ZXJzLnR5cGU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZGVsZXRlIG9wdGlvbnMuZmlsdGVycy50eXBlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAob3B0aW9ucy5maWx0ZXJzLmJib3gpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmxvZ2dlci53YXJuKFwiVGhlIHBhcmFtZXRlciAnZmlsdGVyT3B0aW9ucy5iYm94JyBpcyBkZXByZWNhdGVkXCIpO1xuICAgICAgICAgICAgICAgIGRlbGV0ZSBvcHRpb25zLmZpbHRlcnMuYmJveDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBkZWxldGUgb3B0aW9ucy5maWx0ZXJPcHRpb25zO1xuICAgIH1cblxuICAgIGlmIChvcHRpb25zLnBvc2l0aW9uKSB7XG4gICAgICAgIGlmIChvcHRpb25zLnBvc2l0aW9uLngpIHtcbiAgICAgICAgICAgIHRoaXMubG9nZ2VyLndhcm4oXCJUaGUgcGFyYW1ldGVyICdwb3NpdGlvbi54JyBpcyBkZXByZWNhdGVkXCIpO1xuXG4gICAgICAgICAgICBpZiAoIW9wdGlvbnMucG9zaXRpb24ubG9uKSB7XG4gICAgICAgICAgICAgICAgb3B0aW9ucy5wb3NpdGlvbi5sb24gPSBvcHRpb25zLnBvc2l0aW9uLng7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBkZWxldGUgb3B0aW9ucy5wb3NpdGlvbi54O1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKG9wdGlvbnMucG9zaXRpb24ueSkge1xuICAgICAgICAgICAgdGhpcy5sb2dnZXIud2FybihcIlRoZSBwYXJhbWV0ZXIgJ3Bvc2l0aW9uLnknIGlzIGRlcHJlY2F0ZWRcIik7XG5cbiAgICAgICAgICAgIGlmICghb3B0aW9ucy5wb3NpdGlvbi5sYXQpIHtcbi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gICAgICByZXNwb25zZSA6IHRoaXMucmVzcG9uc2UsXG4gICAgICAgICAgICByYXdSZXNwb25zZSA6IHRoaXMub3B0aW9ucy5yYXdSZXNwb25zZSxcbiAgICAgICAgICAgIG9uRXJyb3IgOiBlcnJvcixcbiAgICAgICAgICAgIG9uU3VjY2VzcyA6IHN1Y2Nlc3MsXG4gICAgICAgICAgICBzY29wZSA6IHRoaXNcbiAgICAgICAgfTtcblxuICAgICAgICBHZW9jb2RlUmVzcG9uc2VGYWN0b3J5LmJ1aWxkKG9wdGlvbnMpO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIGVycm9yLmNhbGwodGhpcywgbmV3IEVycm9yU2VydmljZShfLmdldE1lc3NhZ2UoXCJTRVJWSUNFX1JFU1BPTlNFX0VNUFRZXCIpKSk7XG4gICAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgR2VvY29kZTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Geocode/Geocode.js\n"); /***/ }), @@ -680,7 +692,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n\n/**\n * Single location obj /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../CommonService */ \"./node_modules/geoportal-access-lib/src/Services/CommonService.js\");\n/* harmony import */ var _Request_GeocodeRequestFactory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Request/GeocodeRequestFactory */ \"./node_modules/geoportal-access-lib/src/Services/Geocode/Request/GeocodeRequestFactory.js\");\n/* harmony import */ var _Response_GeocodeResponseFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Response/GeocodeResponseFactory */ \"./node_modules/geoportal-access-lib/src/Services/Geocode/Response/GeocodeResponseFactory.js\");\n\n\n\n\n\n\n\n/**\n * @classdesc\n * Appel du service de géocodage inverse du Géoportail :\n * envoi de la requête construite selon les paramètres en options,\n * éventuellement parsing et analyse de la réponse,\n * retour d'une réponse en paramètre de la fonction onSuccess.\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.ReverseGeocode\n *\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {Object} options.position - Position du point de référence pour le calcul de proximité exprimée dans le système de référence spécifié par le srs.\n * @param {Float} options.position.lon - Longitude du point de référence pour le calcul de proximité.\n * @param {Float} options.position.lat - Latitude du point de référence pour le calcul de proximité.\n *\n * @param {Object} [options.filters] - Les propriétés possibles de cet objet.\n * @param {String} [options.filters.[proprietes du filtre]] - Critère supplémentaire pour filtrer la recherche sous la forme\n * d'un couple clé/valeur à définir selon les possibilités du serveur ajouté à la requête.\n * Le service de géocodage du Géoportail permet de filtrer les adresses postales avec les propriétés :\n * \"postalCode\", \"inseeCode\", \"city\".\n * Il permet également de filtrer les toponymes avec les propriétés :\n * \"postalCode\", \"inseeCode\", \"type\".\n * Enfin, il permet de filtrer les parcelles cadastrales avec les propriétés :\n * \"codeDepartement\", \"codeCommune\", \"nomCommune\", \"codeCommuneAbs\", \"codeArrondissement\", \"section\", \"numero\", \"feuille\".\n *\n * @param {Object} [options.searchGeometry] - Emprise dans laquelle on souhaite effectuer la recherche.\n * Les propriétés possibles de cet objet sont décrites ci-après.\n * @param {String} options.searchGeometry.type - Type de géometrie (Point|Circle|Linestring|Polygon)\n * @param {Array.|Array.Array.} options.searchGeometry.coordinates - Coordonnées des points constituant la géométrie.\n * @param {Float} options.searchGeometry.radius - Rayon. Paramètre applicable uniquement pour le type 'Circle'.\n *\n * @param {String} [options.index = \"StreetAddress\"] - Type de l'objet recherché.\n * Le service de géocodage du Géoportail permet de rechercher des 'PositionOfInterest' pour des toponymes, des 'StreetAddress'\n * pour des adresses postales ou des 'CadastralParcel' pour des parcelles cadastrales. L'index 'location' permet une recherche\n * multi-indexes en regroupant les indexes 'PositionOfInterest' et 'StreetAddress'.\n * D'autres types pourront être rajoutés selon l'évolution du service.\n * Par défaut, index = 'StreetAddress'.\n *\n * @param {Number} [options.maximumResponses] - Nombre de réponses maximal que l'on souhaite recevoir.\n * Pas de valeur par défaut. Si le serveur consulté est celui du Géoportail, la valeur par défaut sera donc celle du service : 20s.\n *\n * @param {Boolean} [options.returnTrueGeometry] - Booléen indiquant si l'on souhaite récupérer la géométrie vraie des objects géolocalisés.\n * false par défaut.\n *\n * @example\n * var options = {\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * proxyURL : null,\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * index : 'StreetAddress',\n * searchGeometry : {\n * type : Circle,\n * coordinates : [48, 2],\n * radius : 100\n * },\n * position : {lon:2 , lat:48.5},\n * maximumResponses : 25,\n * };\n *\n */\nfunction ReverseGeocode (options_) {\n if (!(this instanceof ReverseGeocode)) {\n throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"CLASS_CONSTRUCTOR\", \"ReverseGeocode\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"ReverseGeocode\";\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"Gp.Services.ReverseGeocode\");\n this.logger.trace(\"[Constructeur ReverseGeocode (options)]\");\n\n var options = this.patchOptionConvertor(options_);\n options.serverUrl = options.serverUrl || \"https://wxs.ign.fr/calcul/geoportail/geocodage/rest/0.1/reverse\";\n\n // appel du constructeur par heritage\n _CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].apply(this, [options]);\n\n if (!options.searchGeometry) {\n if (!options.position) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"searchGeometry\"));\n }\n } else {\n this.options.searchGeometry = options.searchGeometry;\n }\n\n // on definit l'index par defaut\n if (!options.index) {\n this.options.index = options.index = \"StreetAddress\";\n }\n\n if (options.filters) {\n var filter = Object.keys(options.filters);\n for (var i = 0; i < filter.length; i++) {\n var key = filter[i];\n // on supprime les filtres vides\n if (typeof options.filters[key] === \"undefined\" ||\n (typeof options.filters[key] === \"object\" && Object.keys(options.filters[key]).length === 0) ||\n (typeof options.filters[key] === \"string\" && options.filters[key].length === 0) ||\n (Array.isArray(options.filters[key]) && options.filters[key].length === 0)\n ) {\n delete this.options.filters[key];\n }\n }\n }\n\n this.options.position = options.position;\n this.options.index = options.index || \"StreetAddress\";\n this.options.maximumResponses = options.maximumResponses || 20;\n}\n\n/**\n * @lends module:ReverseGeocode#\n */\nReverseGeocode.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nReverseGeocode.prototype.constructor = ReverseGeocode;\n\n/**\n * Patch pour la convertion des options vers le nouveau formalisme.\n *\n * @param {Object} options_ - options du service\n * @return {Object} - options\n */\nReverseGeocode.prototype.patchOptionConvertor = function (options_) {\n var options = options_;\n\n if (options.filterOptions) {\n this.logger.warn(\"The parameter 'filterOptions' is deprecated\");\n\n if (options.filterOptions.type) {\n this.logger.warn(\"The parameter 'filterOptions.type' is deprecated\");\n if (!options.index) {\n if (Array.isArray(options.filterOptions.type) && options.filterOptions.type.length > 0) {\n options.index = options.filterOptions.type[0];\n } else {\n options.index = options.filterOptions.type;\n }\n }\n delete options.filterOptions.type;\n }\n\n if (options.filterOptions.bbox) {\n this.logger.warn(\"The parameter 'filterOptions.bbox' is deprecated\");\n if (!options.searchGeometry) {\n // convertir la geometrie\n options.searchGeometry = this.bbox2Json(options.filterOptions.bbox);\n }\n delete options.filterOptions.bbox;\n }\n\n if (options.filterOptions.circle) {\n this.logger.warn(\"The parameter 'filterOptions.circle' is deprecated\");\n if (!options.searchGeometry) {\n // convertir la geometrie\n options.searchGeometry = this.circle2Json(options.filterOptions.circle);\n }\n delete options.filterOptions.circle;\n }\n\n if (options.filterOptions.polygon) {\n this.logger.warn(\"The parameter 'filterOptions.polygon' is deprecated\");\n if (!options.searchGeometry) {\n // convertir la geometrie\n options.searchGeometry = this.polygon2Json(options.filterOptions.polygon);\n }\n delete options.filterOptions.polygon;\n }\n\n if (!options.filters && Object.keys(options.filterOptions).length > 0) {\n options.filters = options.filterOptions;\n }\n\n delete options.filterOptions;\n }\n\n if (options.position) {\n if (options.position.x) {\n this.logger.warn(\"The parameter 'position.x' is deprecated\");\n\n if (!options.position.lon) {\n options.position.lon = options.position.x;\n }\n delete options.position.x;\n }\n\n if (options.position.y) {\n this.logger.warn(\"The parameter 'position.y' is deprecated\");\n\n if (!options.position.lat) {\n options.position.lat = options.position.y;\n }\n delete options.position.y;\n }\n }\n\n if (options.srs) {\n this.logger.warn(\"The parameter 'srs' is deprecated\");\n delete options.srs;\n }\n\n return options;\n};\n\n/**\n * (overwrite)\n * Création de la requête\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nReverseGeocode.prototype.buildRequest = function (error, success) {\n var options = {\n httpMethod : this.options.httpMethod,\n // options specifiques du service\n geocodeMethod : \"reverse\",\n searchGeometry : this.options.searchGeometry,\n index : this.options.index,\n position : this.options.position,\n returnTrueGeometry : this.options.returnTrueGeometry,\n maxResp : this.options.maximumResponses,\n filters : this.options.filters\n };\n\n this.request = _Request_GeocodeRequestFactory__WEBPACK_IMPORTED_MODULE_4__[\"default\"].build(options);\n\n // on teste si la requete a bien été construite !\n (!this.request)\n ? error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_REQUEST_BUILD\")))\n : success.call(this, this.request);\n};\n\n/**\n * (overwrite)\n * Analyse de la reponse\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nReverseGeocode.prototype.analyzeResponse = function (error, success) {\n if (this.response) {\n var options = {\n response : this.response,\n rawResponse : this.options.rawResponse,\n onError : error,\n onSuccess : success,\n scope : this\n };\n\n _Response_GeocodeResponseFactory__WEBPACK_IMPORTED_MODULE_5__[\"default\"].build(options);\n } else {\n error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\n/**\n * Patch pour la convertion des options vers le nouveau formalisme.\n *\n * @param {Array} bbox - bbox\n * @return {Object} - geometrie au format json\n */\nReverseGeocode.prototype.bbox2Json = function (bbox) {\n return {\n type : \"Polygon\",\n coordinates : [[\n [bbox.left, bbox.top],\n [bbox.right, bbox.top],\n [bbox.right, bbox.bottom],\n [bbox.left, bbox.bottom],\n [bbox.left, bbox.top]\n ]]\n };\n};\n\n/**\n * Patch pour la convertion des options vers le nouveau formalisme.\n *\n * @param {Object} circle - circle\n * @return {Object} - geometrie au format json\n */\nReverseGeocode.prototype.circle2Json = function (circle) {\n return {\n type : \"Circle\",\n radius : circle.radius,\n coordinates : [circle.x, circle.y]\n };\n};\n\n/**\n * Patch pour la convertion des options vers le nouveau formalisme.\n *\n * @param {Array} polygon - polygon\n * @return {Object} - geometrie au format json\n */\nReverseGeocode.prototype.polygon2Json = function (polygon) {\n var jsonGeom = {\n type : \"Polygon\",\n coordinates : [[]]\n };\n\n for (var i = 0; i < polygon.length; ++i) {\n jsonGeom.coordinates[0].push([polygon[i].x, polygon[i].y]);\n }\n\n return jsonGeom;\n};\n\n/**\n * Codes EPSG géographiques (lat/lon). Utiles car les coordonnées doivent être inversées.\n */\nReverseGeocode.geoEPSG = [\"EPSG:4326\"];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ReverseGeocode);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvR2VvY29kZS9SZXZlcnNlR2VvY29kZS5qcz9iZGFlIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQWlEO0FBQ0g7QUFDVztBQUNaO0FBQ3VCO0FBQ0c7O0FBRXZFO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsYUFBYTtBQUNiO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEI7QUFDQSxXQUFXLE9BQU87QUFDbEIsZ0JBQWdCLE1BQU07QUFDdEIsZ0JBQWdCLE1BQU07QUFDdEI7QUFDQSxXQUFXLE9BQU87QUFDbEIsV0FBVyxPQUFPO0FBQ2xCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEI7QUFDQSxnQkFBZ0IsT0FBTztBQUN2QixnQkFBZ0Isa0NBQWtDO0FBQ2xELGdCQUFnQixNQUFNO0FBQ3RCO0FBQ0EsV0FBVyxPQUFPO0FBQ2xCO0FBQ0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mRleCA9IG9wdGlvbnMuaW5kZXggPSBcIlN0cmVldEFkZHJlc3NcIjtcbiAgICB9XG5cbiAgICBpZiAob3B0aW9ucy5maWx0ZXJzKSB7XG4gICAgICAgIHZhciBmaWx0ZXIgPSBPYmplY3Qua2V5cyhvcHRpb25zLmZpbHRlcnMpO1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGZpbHRlci5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIGtleSA9IGZpbHRlcltpXTtcbiAgICAgICAgICAgIC8vIG9uIHN1cHByaW1lIGxlcyBmaWx0cmVzIHZpZGVzXG4gICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMuZmlsdGVyc1trZXldID09PSBcInVuZGVmaW5lZFwiIHx8XG4gICAgICAgICAgICAgICAgKHR5cGVvZiBvcHRpb25zLmZpbHRlcnNba2V5XSA9PT0gXCJvYmplY3RcIiAmJiBPYmplY3Qua2V5cyhvcHRpb25zLmZpbHRlcnNba2V5XSkubGVuZ3RoID09PSAwKSB8fFxuICAgICAgICAgICAgICAgICh0eXBlb2Ygb3B0aW9ucy5maWx0ZXJzW2tleV0gPT09IFwic3RyaW5nXCIgJiYgb3B0aW9ucy5maWx0ZXJzW2tleV0ubGVuZ3RoID09PSAwKSB8fFxuICAgICAgICAgICAgICAgIChBcnJheS5pc0FycmF5KG9wdGlvbnMuZmlsdGVyc1trZXldKSAmJiBvcHRpb25zLmZpbHRlcnNba2V5XS5sZW5ndGggPT09IDApXG4gICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBkZWxldGUgdGhpcy5vcHRpb25zLmZpbHRlcnNba2V5XTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIHRoaXMub3B0aW9ucy5wb3NpdGlvbiA9IG9wdGlvbnMucG9zaXRpb247XG4gICAgdGhpcy5vcHRpb25zLmluZGV4ID0gb3B0aW9ucy5pbmRleCB8fCBcIlN0cmVldEFkZHJlc3NcIjt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XByZWNhdGVkXCIpO1xuICAgICAgICAgICAgaWYgKCFvcHRpb25zLmluZGV4KSB7XG4gICAgICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkob3B0aW9ucy5maWx0ZXJPcHRpb25zLnR5cGUpICYmIG9wdGlvbnMuZmlsdGVyT3B0aW9ucy50eXBlLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5pbmRleCA9IG9wdGlvbnMuZmlsdGVyT3B0aW9ucy50eXBlWzBdO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMuaW5kZXggPSBvcHRpb25zLmZpbHRlck9wdGlvbnMudHlwZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBkZWxldGUgb3B0aW9ucy5maWx0ZXJPcHRpb25zLnR5cGU7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAob3B0aW9ucy5maWx0ZXJPcHRpb25zLmJib3gpIHtcbiAgICAgICAgICAgIHRoaXMubG9nZ2VyLndhcm4oXCJUaGUgcGFyYW1ldGVyICdmaWx0ZXJPcHRpb25zLmJib3gnIGlzIGRlcHJlY2F0ZWRcIik7XG4gICAgICAgICAgICBpZiAoIW9wdGlvbnMuc2VhcmNoR2VvbWV0cnkpIHtcbiAgICAgICAgICAgICAgICAvLyBjb252ZXJ0aXIgbGEgZ2VvbWV0cmllXG4gICAgICAgICAgICAgICAgb3B0aW9ucy5zZWFyY2hHZW9tZXRyeSA9IHRoaXMuYmJveDJKc29uKG9wdGlvbnMuZmlsdGVyT3B0aW9ucy5iYm94KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGRlbGV0ZSBvcHRpb25zLmZpbHRlck9wdGlvbnMuYmJveDtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChvcHRpb25zLmZpbHRlck9wdGlvbnMuY2lyY2xlKSB7XG4gICAgICAgICAgICB0aGlz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BsZSBub3V2ZWF1IGZvcm1hbGlzbWUuXG4gKlxuICogQHBhcmFtIHtBcnJheX0gcG9seWdvbiAtIHBvbHlnb25cbiAqIEByZXR1cm4ge09iamVjdH0gLSBnZW9tZXRyaWUgYXUgZm9ybWF0IGpzb25cbiAqL1xuUmV2ZXJzZUdlb2NvZGUucHJvdG90eXBlLnBvbHlnb24ySnNvbiA9IGZ1bmN0aW9uIChwb2x5Z29uKSB7XG4gICAgdmFyIGpzb25HZW9tID0ge1xuICAgICAgICB0eXBlIDogXCJQb2x5Z29uXCIsXG4gICAgICAgIGNvb3JkaW5hdGVzIDogW1tdXVxuICAgIH07XG5cbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHBvbHlnb24ubGVuZ3RoOyArK2kpIHtcbiAgICAgICAganNvbkdlb20uY29vcmRpbmF0ZXNbMF0ucHVzaChbcG9seWdvbltpXS54LCBwb2x5Z29uW2ldLnldKTtcbiAgICB9XG5cbiAgICByZXR1cm4ganNvbkdlb207XG59O1xuXG4vKipcbiAqIENvZGVzIEVQU0cgZ8Opb2dyYXBoaXF1ZXMgKGxhdC9sb24pLiBVdGlsZXMgY2FyIGxlcyBjb29yZG9ubsOpZXMgZG9pdmVudCDDqnRyZSBpbnZlcnPDqWVzLlxuICovXG5SZXZlcnNlR2VvY29kZS5nZW9FUFNHID0gW1wiRVBTRzo0MzI2XCJdO1xuXG5leHBvcnQgZGVmYXVsdCBSZXZlcnNlR2VvY29kZTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Geocode/ReverseGeocode.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../CommonService */ \"./node_modules/geoportal-access-lib/src/Services/CommonService.js\");\n/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../DefaultUrlService */ \"./node_modules/geoportal-access-lib/src/Services/DefaultUrlService.js\");\n/* harmony import */ var _Request_GeocodeRequestFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Request/GeocodeRequestFactory */ \"./node_modules/geoportal-access-lib/src/Services/Geocode/Request/GeocodeRequestFactory.js\");\n/* harmony import */ var _Response_GeocodeResponseFactory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Response/GeocodeResponseFactory */ \"./node_modules/geoportal-access-lib/src/Services/Geocode/Response/GeocodeResponseFactory.js\");\n\n\n\n\n\n\n\n\n/**\n * @classdesc\n * Appel du service de géocodage inverse du Géoportail :\n * envoi de la requête construite selon les paramètres en options,\n * éventuellement parsing et analyse de la réponse,\n * retour d'une réponse en paramètre de la fonction onSuccess.\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.ReverseGeocode\n *\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {Object} options.position - Position du point de référence pour le calcul de proximité exprimée dans le système de référence spécifié par le srs.\n * @param {Float} options.position.lon - Longitude du point de référence pour le calcul de proximité.\n * @param {Float} options.position.lat - Latitude du point de référence pour le calcul de proximité.\n *\n * @param {Object} [options.filters] - Les propriétés possibles de cet objet.\n * @param {String} [options.filters.[proprietes du filtre]] - Critère supplémentaire pour filtrer la recherche sous la forme\n * d'un couple clé/valeur à définir selon les possibilités du serveur ajouté à la requête.\n * Le service de géocodage du Géoportail permet de filtrer les adresses postales avec les propriétés :\n * \"postalCode\", \"inseeCode\", \"city\".\n * Il permet également de filtrer les toponymes avec les propriétés :\n * \"postalCode\", \"inseeCode\", \"type\".\n * Enfin, il permet de filtrer les parcelles cadastrales avec les propriétés :\n * \"codeDepartement\", \"codeCommune\", \"nomCommune\", \"codeCommuneAbs\", \"codeArrondissement\", \"section\", \"numero\", \"feuille\".\n *\n * @param {Object} [options.searchGeometry] - Emprise dans laquelle on souhaite effectuer la recherche.\n * Les propriétés possibles de cet objet sont décrites ci-après.\n * @param {String} options.searchGeometry.type - Type de géometrie (Point|Circle|Linestring|Polygon)\n * @param {Array.|Array.Array.} options.searchGeometry.coordinates - Coordonnées des points constituant la géométrie.\n * @param {Float} options.searchGeometry.radius - Rayon. Paramètre applicable uniquement pour le type 'Circle'.\n *\n * @param {String} [options.index = \"StreetAddress\"] - Type de l'objet recherché.\n * Le service de géocodage du Géoportail permet de rechercher des 'PositionOfInterest' pour des toponymes, des 'StreetAddress'\n * pour des adresses postales ou des 'CadastralParcel' pour des parcelles cadastrales. L'index 'location' permet une recherche\n * multi-indexes en regroupant les indexes 'PositionOfInterest' et 'StreetAddress'.\n * D'autres types pourront être rajoutés selon l'évolution du service.\n * Par défaut, index = 'StreetAddress'.\n *\n * @param {Number} [options.maximumResponses] - Nombre de réponses maximal que l'on souhaite recevoir.\n * Pas de valeur par défaut. Si le serveur consulté est celui du Géoportail, la valeur par défaut sera donc celle du service : 20s.\n *\n * @param {Boolean} [options.returnTrueGeometry] - Booléen indiquant si l'on souhaite récupérer la géométrie vraie des objects géolocalisés.\n * false par défaut.\n *\n * @example\n * var options = {\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * proxyURL : null,\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * index : 'StreetAddress',\n * searchGeometry : {\n * type : Circle,\n * coordinates : [48, 2],\n * radius : 100\n * },\n * position : {lon:2 , lat:48.5},\n * maximumResponses : 25,\n * };\n *\n */\nfunction ReverseGeocode (options_) {\n if (!(this instanceof ReverseGeocode)) {\n throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"CLASS_CONSTRUCTOR\", \"ReverseGeocode\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"ReverseGeocode\";\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"Gp.Services.ReverseGeocode\");\n this.logger.trace(\"[Constructeur ReverseGeocode (options)]\");\n\n var options = this.patchOptionConvertor(options_);\n if (!options.serverUrl) {\n // Code commenté : Release beta services DIFFUSION uniquement : on tape sur l'anvcien service de geocodage inverse\n /* options.serverUrl = DefaultUrlService.ReverseGeocode.newUrl();\n if (options.oldReverseService) {\n options.serverUrl = DefaultUrlService.ReverseGeocode.url();\n } */\n // Release beta services DIFFUSION uniquement : on tape sur l'anvcien service de geocodage inverse\n options.serverUrl = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__[\"default\"].ReverseGeocode.url();\n }\n\n // appel du constructeur par heritage\n _CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].apply(this, [options]);\n\n if (!options.searchGeometry) {\n if (!options.position) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"searchGeometry\"));\n }\n } else {\n this.options.searchGeometry = options.searchGeometry;\n }\n\n // on definit l'index par defaut\n if (!options.index) {\n this.options.index = options.index = \"StreetAddress\";\n }\n\n if (options.filters) {\n var filter = Object.keys(options.filters);\n for (var i = 0; i < filter.length; i++) {\n var key = filter[i];\n // on supprime les filtres vides\n if (typeof options.filters[key] === \"undefined\" ||\n (typeof options.filters[key] === \"object\" && Object.keys(options.filters[key]).length === 0) ||\n (typeof options.filters[key] === \"string\" && options.filters[key].length === 0) ||\n (Array.isArray(options.filters[key]) && options.filters[key].length === 0)\n ) {\n delete this.options.filters[key];\n }\n }\n }\n\n this.options.position = options.position;\n this.options.index = options.index || \"StreetAddress\";\n this.options.maximumResponses = options.maximumResponses || 20;\n}\n\n/**\n * @lends module:ReverseGeocode#\n */\nReverseGeocode.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nReverseGeocode.prototype.constructor = ReverseGeocode;\n\n/**\n * Patch pour la convertion des options vers le nouveau formalisme.\n *\n * @param {Object} options_ - options du service\n * @return {Object} - options\n */\nReverseGeocode.prototype.patchOptionConvertor = function (options_) {\n var options = options_;\n\n if (options.filterOptions) {\n this.logger.warn(\"The parameter 'filterOptions' is deprecated\");\n\n if (options.filterOptions.type) {\n this.logger.warn(\"The parameter 'filterOptions.type' is deprecated\");\n if (!options.index) {\n if (Array.isArray(options.filterOptions.type) && options.filterOptions.type.length > 0) {\n options.index = options.filterOptions.type[0];\n } else {\n options.index = options.filterOptions.type;\n }\n }\n delete options.filterOptions.type;\n }\n\n if (options.filterOptions.bbox) {\n this.logger.warn(\"The parameter 'filterOptions.bbox' is deprecated\");\n if (!options.searchGeometry) {\n // convertir la geometrie\n options.searchGeometry = this.bbox2Json(options.filterOptions.bbox);\n }\n delete options.filterOptions.bbox;\n }\n\n if (options.filterOptions.circle) {\n this.logger.warn(\"The parameter 'filterOptions.circle' is deprecated\");\n if (!options.searchGeometry) {\n // convertir la geometrie\n options.searchGeometry = this.circle2Json(options.filterOptions.circle);\n }\n delete options.filterOptions.circle;\n }\n\n if (options.filterOptions.polygon) {\n this.logger.warn(\"The parameter 'filterOptions.polygon' is deprecated\");\n if (!options.searchGeometry) {\n // convertir la geometrie\n options.searchGeometry = this.polygon2Json(options.filterOptions.polygon);\n }\n delete options.filterOptions.polygon;\n }\n\n if (!options.filters && Object.keys(options.filterOptions).length > 0) {\n options.filters = options.filterOptions;\n }\n\n delete options.filterOptions;\n }\n\n if (options.position) {\n if (options.position.x) {\n this.logger.warn(\"The parameter 'position.x' is deprecated\");\n\n if (!options.position.lon) {\n options.position.lon = options.position.x;\n }\n delete options.position.x;\n }\n\n if (options.position.y) {\n this.logger.warn(\"The parameter 'position.y' is deprecated\");\n\n if (!options.position.lat) {\n options.position.lat = options.position.y;\n }\n delete options.position.y;\n }\n }\n\n if (options.srs) {\n this.logger.warn(\"The parameter 'srs' is deprecated\");\n delete options.srs;\n }\n\n return options;\n};\n\n/**\n * (overwrite)\n * Création de la requête\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nReverseGeocode.prototype.buildRequest = function (error, success) {\n var options = {\n httpMethod : this.options.httpMethod,\n // options specifiques du service\n geocodeMethod : \"reverse\",\n searchGeometry : this.options.searchGeometry,\n index : this.options.index,\n position : this.options.position,\n returnTrueGeometry : this.options.returnTrueGeometry,\n maxResp : this.options.maximumResponses,\n filters : this.options.filters\n };\n\n this.request = _Request_GeocodeRequestFactory__WEBPACK_IMPORTED_MODULE_5__[\"default\"].build(options);\n\n // on teste si la requete a bien été construite !\n (!this.request)\n ? error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_REQUEST_BUILD\")))\n : success.call(this, this.request);\n};\n\n/**\n * (overwrite)\n * Analyse de la reponse\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nReverseGeocode.prototype.analyzeResponse = function (error, success) {\n if (this.response) {\n var options = {\n response : this.response,\n rawResponse : this.options.rawResponse,\n onError : error,\n onSuccess : success,\n scope : this\n };\n\n _Response_GeocodeResponseFactory__WEBPACK_IMPORTED_MODULE_6__[\"default\"].build(options);\n } else {\n error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\n/**\n * Patch pour la convertion des options vers le nouveau formalisme.\n *\n * @param {Array} bbox - bbox\n * @return {Object} - geometrie au format json\n */\nReverseGeocode.prototype.bbox2Json = function (bbox) {\n return {\n type : \"Polygon\",\n coordinates : [[\n [bbox.left, bbox.top],\n [bbox.right, bbox.top],\n [bbox.right, bbox.bottom],\n [bbox.left, bbox.bottom],\n [bbox.left, bbox.top]\n ]]\n };\n};\n\n/**\n * Patch pour la convertion des options vers le nouveau formalisme.\n *\n * @param {Object} circle - circle\n * @return {Object} - geometrie au format json\n */\nReverseGeocode.prototype.circle2Json = function (circle) {\n return {\n type : \"Circle\",\n radius : circle.radius,\n coordinates : [circle.x, circle.y]\n };\n};\n\n/**\n * Patch pour la convertion des options vers le nouveau formalisme.\n *\n * @param {Array} polygon - polygon\n * @return {Object} - geometrie au format json\n */\nReverseGeocode.prototype.polygon2Json = function (polygon) {\n var jsonGeom = {\n type : \"Polygon\",\n coordinates : [[]]\n };\n\n for (var i = 0; i < polygon.length; ++i) {\n jsonGeom.coordinates[0].push([polygon[i].x, polygon[i].y]);\n }\n\n return jsonGeom;\n};\n\n/**\n * Codes EPSG géographiques (lat/lon). Utiles car les coordonnées doivent être inversées.\n */\nReverseGeocode.geoEPSG = [\"EPSG:4326\"];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ReverseGeocode);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvR2VvY29kZS9SZXZlcnNlR2VvY29kZS5qcz9iZGFlIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQ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W9ucy5wb2x5Z29uO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCFvcHRpb25zLmZpbHRlcnMgJiYgT2JqZWN0LmtleXMob3B0aW9ucy5maWx0ZXJPcHRpb25zKS5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICBvcHRpb25zLmZpbHRlcnMgPSBvcHRpb25zLmZpbHRlck9wdGlvbnM7XG4gICAgICAgIH1cblxuICAgICAgICBkZWxldGUgb3B0aW9ucy5maWx0ZXJPcHRpb25zO1xuICAgIH1cblxuICAgIGlmIChvcHRpb25zLnBvc2l0aW9uKSB7XG4gICAgICAgIGlmIChvcHRpb25zLnBvc2l0aW9uLngpIHtcbiAgICAgICAgICAgIHRoaXMubG9nZ2VyLndhcm4oXCJUaGUgcGFyYW1ldGVyICdwb3NpdGlvbi54JyBpcyBkZXByZWNhdGVkXCIpO1xuXG4gICAgICAgICAgICBpZiAoIW9wdGlvbnMucG9zaXRpb24ubG9uKSB7XG4gICAgICAgICAgICAgICAgb3B0aW9ucy5wb3NpdGlvbi5sb24gPSBvcHRpb25zLnBvc2l0aW9uLng7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBkZWxldGUgb3B0aW9ucy5wb3NpdGlvbi54O1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKG9wdGlvbnMucG9zaXRpb24ueSkge1xuICAgICAgICAgICAgdGhpcy5sb2dnZXIud2FybihcIlRoZSBwYXJhbWV0ZXIgJ3Bvc2l0aW9uLnknIGlzIGRlcHJlY2F0ZWRcIik7XG5cbiAgICAgICAgICAgIGlmICghb3B0aW9ucy5wb3NpdGlvbi5sYXQpIHtcbiAgICAgICAgICAgICAgICBvcHRpb25zLnBvc2l0aW9uLmxhdCA9IG9wdGlvbnMucG9zaXRpb24ueTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGRlbGV0ZSBvcHRpb25zLnBvc2l0aW9uLnk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAob3B0aW9ucy5z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sXG4gICAgICAgIHJhZGl1cyA6IGNpcmNsZS5yYWRpdXMsXG4gICAgICAgIGNvb3JkaW5hdGVzIDogW2NpcmNsZS54LCBjaXJjbGUueV1cbiAgICB9O1xufTtcblxuLyoqXG4gKiBQYXRjaCBwb3VyIGxhIGNvbnZlcnRpb24gZGVzIG9wdGlvbnMgdmVycyBsZSBub3V2ZWF1IGZvcm1hbGlzbWUuXG4gKlxuICogQHBhcmFtIHtBcnJheX0gcG9seWdvbiAtIHBvbHlnb25cbiAqIEByZXR1cm4ge09iamVjdH0gLSBnZW9tZXRyaWUgYXUgZm9ybWF0IGpzb25cbiAqL1xuUmV2ZXJzZUdlb2NvZGUucHJvdG90eXBlLnBvbHlnb24ySnNvbiA9IGZ1bmN0aW9uIChwb2x5Z29uKSB7XG4gICAgdmFyIGpzb25HZW9tID0ge1xuICAgICAgICB0eXBlIDogXCJQb2x5Z29uXCIsXG4gICAgICAgIGNvb3JkaW5hdGVzIDogW1tdXVxuICAgIH07XG5cbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHBvbHlnb24ubGVuZ3RoOyArK2kpIHtcbiAgICAgICAganNvbkdlb20uY29vcmRpbmF0ZXNbMF0ucHVzaChbcG9seWdvbltpXS54LCBwb2x5Z29uW2ldLnldKTtcbiAgICB9XG5cbiAgICByZXR1cm4ganNvbkdlb207XG59O1xuXG4vKipcbiAqIENvZGVzIEVQU0cgZ8Opb2dyYXBoaXF1ZXMgKGxhdC9sb24pLiBVdGlsZXMgY2FyIGxlcyBjb29yZG9ubsOpZXMgZG9pdmVudCDDqnRyZSBpbnZlcnPDqWVzLlxuICovXG5SZXZlcnNlR2VvY29kZS5nZW9FUFNHID0gW1wiRVBTRzo0MzI2XCJdO1xuXG5leHBvcnQgZGVmYXVsdCBSZXZlcnNlR2VvY29kZTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Geocode/ReverseGeocode.js\n"); /***/ }), @@ -692,7 +704,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Uti /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../CommonService */ \"./node_modules/geoportal-access-lib/src/Services/CommonService.js\");\n/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../DefaultUrlService */ \"./node_modules/geoportal-access-lib/src/Services/DefaultUrlService.js\");\n/* harmony import */ var _Request_ProcessIsoCurveRequest__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Request/ProcessIsoCurveRequest */ \"./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js\");\n/* harmony import */ var _Response_ProcessIsoCurveResponseFactory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Response/ProcessIsoCurveResponseFactory */ \"./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js\");\n\n\n\n\n\n\n\n\n\n/**\n * @classdesc\n * Appel du service d'isochrone/distance du Géoportail :\n * envoi de la requête construite selon les paramètres en options,\n * éventuellement parsing et analyse de la réponse,\n * retour d'une réponse en paramètre de la fonction onSuccess.\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.ProcessIsoCurve\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {String} options.resource - La ressource utilisée pour le calcul. Ce paramètre devrait être obligatoire car il l'est dans l'appel au service. Mais il ne l'est pas pour des raisons de rétrocompatibilité.\n *\n * @param {String} options.outputFormat - Le format de la réponse du service iso : 'json' uniquement et par défaut.\n *\n * @param {Object} options.position - Point de départ du calcul.\n * Coordonnées exprimées en longitudes, latitudes (EPSG:4326)\n * @param {Float} options.position.x - Abcisse du point de départ du calcul d'isochrone/distance.\n * @param {Float} options.position.y - Ordonnée du point de départ du calcul d'isochrone/distance.\n *\n * @param {String} options.srs - Projection.\n * Système de coordonnées dans lequel les coordonnées du point « location » sont exprimées et\n * dans lequel la géométrie de la courbe résultante sera exprimée.\n * Par défaut, le système de coordonnées utilisé sera « EPSG:4326 ».\n *\n * @param {String} [options.graph = \"voiture\"] - Nom du graphe à utiliser pour le calcul (« Pieton » ou « Voiture »).\n * La valeur par défaut est : «voiture»\n *\n * @param {Array.} [options.exclusions] - DEPRECATED: Ce paramètre est conservé pour une rétrocompatibilité de l'api. Le nouveau paramètre à utiliser est options.constraints.\n * Critères d'exclusions à appliquer pour le calcul.\n * On précise ici le type de tronçons que l'on ne veut pas que l'isochrone/distance emprunte\n * (valeurs possibles : « toll » (éviter les péages), « bridge », « tunnel »).\n *\n * @param {Object[]} [options.constraints] - Critères de contraintes à appliquer sur un itinéraire. Les valeurs disponibles dépendent de la ressource utilisée. Il est donc utile de regarder le getCapabilities.\n * @param {String} [options.constraints.constraintType] - Type de la contrainte. Généralement \"banned\".\n * @param {String} [options.constraints.key] - Clé de la contrainte. Généralement \"wayType\".\n * @param {String} [options.constraints.operator] - Opérateur de la contrainte. Généralement \"=\".\n * @param {String} [options.constraints.value] - Valeur de la contrainte. Généralement \"autoroute\".\n *\n * @param {String} [options.method = \"time\"] - Méthode utilisée pour le calcul de la courbe iso.\n * Les valeurs possible sont \"time\" pour un calcul d'isochrone, \"distance\" pour un calcul d'isodistance.\n * Pas de valeur spécifié équivaut à un calcul d'isochrone.\n *\n * @param {String} [options.distanceUnit = \"m\"] - Indique si la distance doit être exprimée en km ou m dans la réponse (\"m\" or \"km\").\n *\n * @param {String} [options.timeUnit = \"second\"] - Indique si la durée doit être exprimée en seconde, minute ou heure dans la réponse (\"standard\", \"second\", \"minute\", \"hour\"). Il peut-être formatté hh:mm::ss avec la valeur standard.\n *\n * @param {Float} options.time - Durée maximum (exprimée en secondes) à utiliser pour le calcul de la courbe à partir du ou jusqu'au point « location ».\n * Ce paramètre doit être renseigné si l'option \"méthod\" a la valeur \"time\".\n * Si l'option method n'est pas renseignée, ce paramètre doit être renseigné.\n *\n * @param {Float} options.distance - Distance maximum (exprimée en metres) à utiliser pour le calcul de la courbe à partir du ou j'usqu'au point « location ».\n * Ce paramètre doit être renseigné si l'option \"méthod\" a la valeur \"DISTANCE\".\n * Si l'option \"method\" n'est pas renseignée, ce paramètre sera ignoré.\n *\n * @param {Boolean} [options.reverse = false] - Indique si la géométrie résultante doit être lissée (« true ») pour ne pas avoir d'effet d'escalier.\n * Par défaut, la valeur « false » est appliquée.\n *\n * @param {Boolean} [options.smoothing = false] - Indique si la géométrie résultante doit être lissée (« true ») pour ne pas avoir d'effet d'escalier.\n * Par défaut, la valeur « false » est appliquée.\n *\n * @param {Boolean} [options.holes = false] - Indique si la géométrie résultante (surface) doit être retournée avec des trous (« true »).\n * Par défaut, la valeur « false » est appliquée.\n *\n * @example\n * var options = {\n * // options communes aux services\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * protocol : 'JSONP', // JSONP|XHR\n * proxyURL : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * position : {\n * x : 2.3242664298058053,\n * y : 48.86118017324745\n * },\n * distance : 200,\n * [time : ]\n * method : \"distance\",\n * graph : \"voiture\",\n * reverse : false\n * };\n */\n\nfunction ProcessIsoCurve (options) {\n if (!(this instanceof ProcessIsoCurve)) {\n throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"CLASS_CONSTRUCTOR\", \"ProcessIsoCurve\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"ProcessIsoCurve\";\n\n // appel du constructeur par heritage\n _CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].apply(this, arguments);\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"Gp.Services.ProcessIsoCurve\");\n this.logger.trace(\"[Constructeur ProcessIsoCurve (options)]\");\n\n if (!options.position) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"position\"));\n }\n\n // on lance une exception afin d'eviter au service de le faire...\n if (options.position.x === null) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"position.x\"));\n }\n\n if (options.position.y === null) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"position.y\"));\n }\n\n if (!options.time && !options.distance) {\n throw new Error(\"Parameter (s) 'distance' missing. Parameter time to calculate an isochrone, parameter distance for an isodistance\");\n }\n\n // si on a que le paramètre \"distance\" en entrée, on calcule une isodistance.\n // Le paramètre \"méthode\" doit pour avoir une réponse du service, être passé à \"distance\"\n if (!options.time && options.distance) {\n this.options.method = \"distance\";\n // on supprime l'éventuel attribut time, résidu d'un appel antérieur\n if (this.options.time) {\n delete this.options.time;\n }\n }\n\n // si on a que le paramètre \"time\" en entrée, on calcule une isochrone.\n // Le paramètre \"méthode\" doit pour avoir une réponse du service, être passé à \"time\"\n if (options.time && !options.distance) {\n this.options.method = \"time\";\n // on supprime l'éventuel attribut time, résidu d'un appel antérieur\n if (this.options.distance) {\n delete this.options.distance;\n }\n }\n\n // au cas où on a ni l'un, ni l'autre...\n this.options.method = this.options.method || \"time\";\n\n // options par defaut du service\n // TODO: modifier la ressource lors de la mise en production du service\n this.options.resource = options.resource || \"bdtopo-iso\";\n this.options.exclusions = options.exclusions || [];\n this.options.reverse = options.reverse || false;\n this.options.srs = options.srs || \"EPSG:4326\";\n this.options.distanceUnit = options.distanceUnit || \"m\";\n this.options.timeUnit = options.timeUnit || \"second\";\n\n // options depreciees\n if (options.smoothing) {\n this.logger.warn(\"options.smoothing is DEPRECATED\");\n }\n this.options.smoothing = false;\n if (options.holes) {\n this.logger.warn(\"options.holes is DEPRECATED\");\n }\n this.options.holes = false;\n\n // Gestion du graphe\n if (options.graph) {\n if (options.graph === \"Voiture\") {\n this.options.graph = \"car\";\n }\n if (options.graph === \"Pieton\") {\n this.options.graph = \"pedestrian\";\n }\n } else {\n this.options.graph = \"car\";\n }\n\n // Gestions des contraintes\n this.options.constraints = [];\n if (options.constraints) {\n if (Array.isArray(options.constraints)) {\n for (var k = 0; k < options.constraints.length; k++) {\n this.options.constraints.push(options.constraints[k]);\n }\n } else {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_TYPE\", \"constraints\"));\n }\n }\n\n // Gestion de l'ancien paramètre exclusions\n var constraintTunnel = {};\n var constraintPont = {};\n var constraintAutoroute = {};\n if (options.exclusions) {\n if (options.exclusions.length !== 0) {\n this.logger.warn(\"options.exclusions is DEPRECATED !!\");\n for (var c = 0; c < options.exclusions.length; c++) {\n if (typeof options.exclusions[c] === \"string\") {\n options.exclusions[c] = options.exclusions[c].toLowerCase();\n } else {\n // on ne crée pas une erreur pour rétro-compatibilité avec les anciennes versions\n continue;\n }\n if (options.exclusions[c] === \"toll\") {\n constraintAutoroute.constraintType = \"banned\";\n constraintAutoroute.key = \"wayType\";\n constraintAutoroute.operator = \"=\";\n constraintAutoroute.value = \"autoroute\";\n this.options.constraints.push(constraintAutoroute);\n }\n if (options.exclusions[c] === \"tunnel\") {\n constraintTunnel.constraintType = \"banned\";\n constraintTunnel.key = \"wayType\";\n constraintTunnel.operator = \"=\";\n constraintTunnel.value = \"tunnel\";\n this.options.constraints.push(constraintTunnel);\n }\n if (options.exclusions[c] === \"bridge\") {\n constraintPont.constraintType = \"banned\";\n constraintPont.key = \"wayType\";\n constraintPont.operator = \"=\";\n constraintPont.value = \"pont\";\n this.options.constraints.push(constraintPont);\n }\n }\n }\n }\n\n // on passe l'option outputFormat en minuscules afin d'éviter des exceptions.\n this.options.outputFormat = (typeof options.outputFormat === \"string\") ? options.outputFormat.toLowerCase() : \"json\";\n if (options.outputFormat && options.outputFormat !== \"json\") {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_NOT_SUPPORT\", \"outputFormat\"));\n }\n this.options.outputFormat = \"json\";\n\n // gestion de l'url du service par defaut\n // si l'url n'est pas renseignée, il faut utiliser les urls par defaut\n if (!this.options.serverUrl) {\n var urlFound = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__[\"default\"].ProcessIsoCurve.url(\"calcul\");\n if (!urlFound) {\n throw new Error(\"Url by default not found !\");\n }\n this.options.serverUrl = urlFound;\n this.logger.trace(\"Serveur URL par defaut : \" + this.options.serverUrl);\n }\n}\n\n/**\n * @lends module:ProcessIsoCurve#\n */\nProcessIsoCurve.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nProcessIsoCurve.prototype.constructor = ProcessIsoCurve;\n\n/**\n * Création de la requête (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nProcessIsoCurve.prototype.buildRequest = function (error, success) {\n try {\n var oIsoCurve = new _Request_ProcessIsoCurveRequest__WEBPACK_IMPORTED_MODULE_5__[\"default\"](this.options);\n if (!oIsoCurve.processRequestString()) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_REQUEST_BUILD\"));\n }\n\n this.request = oIsoCurve.requestString;\n } catch (e) {\n error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](e.message));\n return;\n }\n\n success.call(this, this.request);\n};\n\n/**\n * (overwrite)\n * Analyse de la reponse\n *\n * @param {Function} onError - callback des erreurs\n * @param {Function} onSuccess - callback de succès de l'analyse de la réponse\n */\nProcessIsoCurve.prototype.analyzeResponse = function (onError, onSuccess) {\n if (this.response) {\n var options = {\n response : this.response,\n outputFormat : this.options.outputFormat,\n rawResponse : this.options.rawResponse,\n onSuccess : onSuccess,\n onError : onError,\n scope : this\n };\n\n _Response_ProcessIsoCurveResponseFactory__WEBPACK_IMPORTED_MODULE_6__[\"default\"].build(options);\n } else {\n onError.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ProcessIsoCurve);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvUHJvY2Vzc0lzb0N1cnZlL1Byb2Nlc3NJc29DdXJ2ZS5qcz84OGNlIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUNpRDtBQUNIO0FBQ1c7QUFDWjtBQUNRO0FBQ2lCO0FBQ2lCOztBQUV2RjtBQUNBO0FBQ0E7QUFDQ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lmIChvcHRpb25zLmdyYXBoKSB7XG4gICAgICAgIGlmIChvcHRpb25zLmdyYXBoID09PSBcIlZvaXR1cmVcIikge1xuICAgICAgICAgICAgdGhpcy5vcHRpb25zLmdyYXBoID0gXCJjYXJcIjtcbiAgICAgICAgfVxuICAgICAgICBpZiAob3B0aW9ucy5ncmFwaCA9PT0gXCJQaWV0b25cIikge1xuICAgICAgICAgICAgdGhpcy5vcHRpb25zLmdyYXBoID0gXCJwZWRlc3RyaWFuXCI7XG4gICAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgICB0aGlzLm9wdGlvbnMuZ3JhcGggPSBcImNhclwiO1xuICAgIH1cblxuICAgIC8vIEdlc3Rpb25zIGRlcyBjb250cmFpbnRlc1xuICAgIHRoaXMub3B0aW9ucy5jb25zdHJhaW50cyA9IFtdO1xuICAgIGlmIChvcHRpb25zLmNvbnN0cmFpbnRzKSB7XG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KG9wdGlvbnMuY29uc3RyYWludHMpKSB7XG4gICAgICAgICAgICBmb3IgKHZhciBrID0gMDsgayA8IG9wdGlvbnMuY29uc3RyYWludHMubGVuZ3RoOyBrKyspIHtcbiAgICAgICAgICAgICAgICB0aGlzLm9wdGlvbnMuY29uc3RyYWludHMucHVzaChvcHRpb25zLmNvbnN0cmFpbnRzW2tdKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihfLmdldE1lc3NhZ2UoXCJQQVJBTV9UWVBFXCIsIFwiY29uc3RyYWludHNcIikpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLy8gR2VzdGlvbiBkZSBsJ2FuY2llbiBwYXJhbcOodHJlIGV4Y2x1c2lvbnNcbiAgICB2YXIgY29uc3RyYWludFR1bm5lbCA9IHt9O1xuICAgIHZhciBjb25zdHJhaW50UG9udCA9IHt9O1xuICAgIHZhciBjb25zdHJhaW50QXV0b3JvdXRlID0ge307XG4gICAgaWYgKG9wdGlvbnMuZXhjbHVzaW9ucykge1xuICAgICAgICBpZiAob3B0aW9ucy5leGNsdXNpb25zLmxlbmd0aCAhPT0gMCkge1xuICAgICAgICAgICAgdGhpcy5sb2dnZXIud2FybihcIm9wdGlvbnMuZXhjbHVzaW9ucyBpcyBERVBSRUNBVEVEICEhXCIpO1xuICAgICAgICAgICAgZm9yICh2YXIgYyA9IDA7IGMgPCBvcHRpb25zLmV4Y2x1c2lvbnMubGVuZ3RoOyBjKyspIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMuZXhjbHVzaW9uc1tjXSA9PT0gXCJzdHJpbmdcIikge1xuICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmV4Y2x1c2lvbnNbY10gPSBvcHRpb25zLmV4Y2x1c2lvbnNbY10udG9Mb3dlckNhc2UoKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBvbiBuZSBjcsOpZSBwYXMgdW5lIGVycmV1ciBwb3VyIHLDqXRyby1jb21wYXRpYmlsaXTDqSBhdmVjIGxlcyBhbmNpZW5uZXMgdmVyc2lvbnNcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLmV4Y2x1c2lvbnNbY10gPT09IFwidG9sbFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRBdXRvcm91dGUuY29uc3RyYWludFR5cGUgPSBcImJhbm5lZFwiO1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50QXV0b3JvdXRlLmtleSA9IFwid2F5VHlwZVwiO1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50QXV0b3JvdXRlLm9wZXJhdG9yID0gXCI9XCI7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRBdXRvcm91dGUudmFsdWUgPSBcImF1dG9yb3V0ZVwiO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLm9wdGlvbnMuY29uc3RyYWludHMucHVzaChjb25zdHJhaW50QXV0b3JvdXRlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMuZXhjbHVzaW9uc1tjXSA9PT0gXCJ0dW5uZWxcIikge1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50VHVubmVsLmNvbnN0cmFpbnRUeXBlID0gXCJiYW5uZWRcIjtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludFR1bm5lbC5rZXkgPSBcIndheVR5cGVcIjtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludFR1bm5lbC5vcGVyYXRvciA9IFwiPVwiO1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50VHVubmVsLnZhbHVlID0gXCJ0dW5uZWxcIjtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5vcHRpb25zLmNvbnN0cmFpbnRzLnB1c2goY29uc3RyYWludFR1bm5lbCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLmV4Y2x1c2lvbnNbY10gPT09IFwiYnJpZGdlXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludFBvbnQuY29uc3RyYWludFR5cGUgPSBcImJhbm5lZFwiO1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50UG9udC5rZXkgPSBcIndheVR5cGVcIjtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludFBvbnQub3BlcmF0b3IgPSBcIj1cIjtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludFBvbnQudmFsdWUgPSBcInBvbnRcIjtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5vcHRpb25zLmNvbnN0cmFpbnRzLnB1c2goY29uc3RyYWludFBvbnQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVx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FsbCh0aGlzLCBuZXcgRXJyb3JTZXJ2aWNlKF8uZ2V0TWVzc2FnZShcIlNFUlZJQ0VfUkVTUE9OU0VfRU1QVFlcIikpKTtcbiAgICB9XG59O1xuXG5leHBvcnQgZGVmYXVsdCBQcm9jZXNzSXNvQ3VydmU7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../CommonService */ \"./node_modules/geoportal-access-lib/src/Services/CommonService.js\");\n/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../DefaultUrlService */ \"./node_modules/geoportal-access-lib/src/Services/DefaultUrlService.js\");\n/* harmony import */ var _Request_ProcessIsoCurveRequest__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Request/ProcessIsoCurveRequest */ \"./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/Request/ProcessIsoCurveRequest.js\");\n/* harmony import */ var _Response_ProcessIsoCurveResponseFactory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Response/ProcessIsoCurveResponseFactory */ \"./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/Response/ProcessIsoCurveResponseFactory.js\");\n\n\n\n\n\n\n\n\n\n/**\n * @classdesc\n * Appel du service d'isochrone/distance du Géoportail :\n * envoi de la requête construite selon les paramètres en options,\n * éventuellement parsing et analyse de la réponse,\n * retour d'une réponse en paramètre de la fonction onSuccess.\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @alias Gp.Services.ProcessIsoCurve\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {String} options.resource - La ressource utilisée pour le calcul. Ce paramètre devrait être obligatoire car il l'est dans l'appel au service. Mais il ne l'est pas pour des raisons de rétrocompatibilité.\n *\n * @param {String} options.outputFormat - Le format de la réponse du service iso : 'json' uniquement et par défaut.\n *\n * @param {Object} options.position - Point de départ du calcul.\n * Coordonnées exprimées en longitudes, latitudes (EPSG:4326)\n * @param {Float} options.position.x - Abcisse du point de départ du calcul d'isochrone/distance.\n * @param {Float} options.position.y - Ordonnée du point de départ du calcul d'isochrone/distance.\n *\n * @param {String} options.srs - Projection.\n * Système de coordonnées dans lequel les coordonnées du point « location » sont exprimées et\n * dans lequel la géométrie de la courbe résultante sera exprimée.\n * Par défaut, le système de coordonnées utilisé sera « EPSG:4326 ».\n *\n * @param {String} [options.graph = \"voiture\"] - Nom du graphe à utiliser pour le calcul (« Pieton » ou « Voiture »).\n * La valeur par défaut est : «voiture»\n *\n * @param {Array.} [options.exclusions] - DEPRECATED: Ce paramètre est conservé pour une rétrocompatibilité de l'api. Le nouveau paramètre à utiliser est options.constraints.\n * Critères d'exclusions à appliquer pour le calcul.\n * On précise ici le type de tronçons que l'on ne veut pas que l'isochrone/distance emprunte\n * (valeurs possibles : « toll » (éviter les péages), « bridge », « tunnel »).\n *\n * @param {Object[]} [options.constraints] - Critères de contraintes à appliquer sur un itinéraire. Les valeurs disponibles dépendent de la ressource utilisée. Il est donc utile de regarder le getCapabilities.\n * @param {String} [options.constraints.constraintType] - Type de la contrainte. Généralement \"banned\".\n * @param {String} [options.constraints.key] - Clé de la contrainte. Généralement \"wayType\".\n * @param {String} [options.constraints.operator] - Opérateur de la contrainte. Généralement \"=\".\n * @param {String} [options.constraints.value] - Valeur de la contrainte. Généralement \"autoroute\".\n *\n * @param {String} [options.method = \"time\"] - Méthode utilisée pour le calcul de la courbe iso.\n * Les valeurs possible sont \"time\" pour un calcul d'isochrone, \"distance\" pour un calcul d'isodistance.\n * Pas de valeur spécifié équivaut à un calcul d'isochrone.\n *\n * @param {String} [options.distanceUnit = \"m\"] - Indique si la distance doit être exprimée en km ou m dans la réponse (\"m\" or \"km\").\n *\n * @param {String} [options.timeUnit = \"second\"] - Indique si la durée doit être exprimée en seconde, minute ou heure dans la réponse (\"standard\", \"second\", \"minute\", \"hour\"). Il peut-être formatté hh:mm::ss avec la valeur standard.\n *\n * @param {Float} options.time - Durée maximum (exprimée en secondes) à utiliser pour le calcul de la courbe à partir du ou jusqu'au point « location ».\n * Ce paramètre doit être renseigné si l'option \"méthod\" a la valeur \"time\".\n * Si l'option method n'est pas renseignée, ce paramètre doit être renseigné.\n *\n * @param {Float} options.distance - Distance maximum (exprimée en metres) à utiliser pour le calcul de la courbe à partir du ou j'usqu'au point « location ».\n * Ce paramètre doit être renseigné si l'option \"méthod\" a la valeur \"DISTANCE\".\n * Si l'option \"method\" n'est pas renseignée, ce paramètre sera ignoré.\n *\n * @param {Boolean} [options.reverse = false] - Indique si la géométrie résultante doit être lissée (« true ») pour ne pas avoir d'effet d'escalier.\n * Par défaut, la valeur « false » est appliquée.\n *\n * @param {Boolean} [options.smoothing = false] - Indique si la géométrie résultante doit être lissée (« true ») pour ne pas avoir d'effet d'escalier.\n * Par défaut, la valeur « false » est appliquée.\n *\n * @param {Boolean} [options.holes = false] - Indique si la géométrie résultante (surface) doit être retournée avec des trous (« true »).\n * Par défaut, la valeur « false » est appliquée.\n *\n * @example\n * var options = {\n * // options communes aux services\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * protocol : 'JSONP', // JSONP|XHR\n * proxyURL : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * position : {\n * x : 2.3242664298058053,\n * y : 48.86118017324745\n * },\n * distance : 200,\n * [time : ]\n * method : \"distance\",\n * graph : \"voiture\",\n * reverse : false\n * };\n */\n\nfunction ProcessIsoCurve (options) {\n if (!(this instanceof ProcessIsoCurve)) {\n throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"CLASS_CONSTRUCTOR\", \"ProcessIsoCurve\"));\n }\n\n /**\n * Nom de la classe (heritage)\n * FIXME instance ou classe ?\n */\n this.CLASSNAME = \"ProcessIsoCurve\";\n\n // appel du constructeur par heritage\n _CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].apply(this, arguments);\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"Gp.Services.ProcessIsoCurve\");\n this.logger.trace(\"[Constructeur ProcessIsoCurve (options)]\");\n\n if (!options.position) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"position\"));\n }\n\n // on lance une exception afin d'eviter au service de le faire...\n if (options.position.x === null) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"position.x\"));\n }\n\n if (options.position.y === null) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"position.y\"));\n }\n\n if (!options.time && !options.distance) {\n throw new Error(\"Parameter (s) 'distance' missing. Parameter time to calculate an isochrone, parameter distance for an isodistance\");\n }\n\n // si on a que le paramètre \"distance\" en entrée, on calcule une isodistance.\n // Le paramètre \"méthode\" doit pour avoir une réponse du service, être passé à \"distance\"\n if (!options.time && options.distance) {\n this.options.method = \"distance\";\n // on supprime l'éventuel attribut time, résidu d'un appel antérieur\n if (this.options.time) {\n delete this.options.time;\n }\n }\n\n // si on a que le paramètre \"time\" en entrée, on calcule une isochrone.\n // Le paramètre \"méthode\" doit pour avoir une réponse du service, être passé à \"time\"\n if (options.time && !options.distance) {\n this.options.method = \"time\";\n // on supprime l'éventuel attribut time, résidu d'un appel antérieur\n if (this.options.distance) {\n delete this.options.distance;\n }\n }\n\n // au cas où on a ni l'un, ni l'autre...\n this.options.method = this.options.method || \"time\";\n\n // options par defaut du service\n // TODO: modifier la ressource lors de la mise en production du service\n this.options.resource = options.resource || \"bdtopo-iso\";\n this.options.exclusions = options.exclusions || [];\n this.options.reverse = options.reverse || false;\n this.options.srs = options.srs || \"EPSG:4326\";\n this.options.distanceUnit = options.distanceUnit || \"m\";\n this.options.timeUnit = options.timeUnit || \"second\";\n\n // options depreciees\n if (options.smoothing) {\n this.logger.warn(\"options.smoothing is DEPRECATED\");\n }\n this.options.smoothing = false;\n if (options.holes) {\n this.logger.warn(\"options.holes is DEPRECATED\");\n }\n this.options.holes = false;\n\n // Gestion du graphe\n if (options.graph) {\n if (options.graph === \"Voiture\") {\n this.options.graph = \"car\";\n }\n if (options.graph === \"Pieton\") {\n this.options.graph = \"pedestrian\";\n }\n } else {\n this.options.graph = \"car\";\n }\n\n // Gestions des contraintes\n this.options.constraints = [];\n if (options.constraints) {\n if (Array.isArray(options.constraints)) {\n for (var k = 0; k < options.constraints.length; k++) {\n this.options.constraints.push(options.constraints[k]);\n }\n } else {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_TYPE\", \"constraints\"));\n }\n }\n\n // Gestion de l'ancien paramètre exclusions\n var constraintTunnel = {};\n var constraintPont = {};\n var constraintAutoroute = {};\n if (options.exclusions) {\n if (options.exclusions.length !== 0) {\n this.logger.warn(\"options.exclusions is DEPRECATED !!\");\n for (var c = 0; c < options.exclusions.length; c++) {\n if (typeof options.exclusions[c] === \"string\") {\n options.exclusions[c] = options.exclusions[c].toLowerCase();\n } else {\n // on ne crée pas une erreur pour rétro-compatibilité avec les anciennes versions\n continue;\n }\n if (options.exclusions[c] === \"toll\") {\n constraintAutoroute.constraintType = \"banned\";\n constraintAutoroute.key = \"wayType\";\n constraintAutoroute.operator = \"=\";\n constraintAutoroute.value = \"autoroute\";\n this.options.constraints.push(constraintAutoroute);\n }\n if (options.exclusions[c] === \"tunnel\") {\n constraintTunnel.constraintType = \"banned\";\n constraintTunnel.key = \"wayType\";\n constraintTunnel.operator = \"=\";\n constraintTunnel.value = \"tunnel\";\n this.options.constraints.push(constraintTunnel);\n }\n if (options.exclusions[c] === \"bridge\") {\n constraintPont.constraintType = \"banned\";\n constraintPont.key = \"wayType\";\n constraintPont.operator = \"=\";\n constraintPont.value = \"pont\";\n this.options.constraints.push(constraintPont);\n }\n }\n }\n }\n\n // on passe l'option outputFormat en minuscules afin d'éviter des exceptions.\n this.options.outputFormat = (typeof options.outputFormat === \"string\") ? options.outputFormat.toLowerCase() : \"json\";\n if (options.outputFormat && options.outputFormat !== \"json\") {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_NOT_SUPPORT\", \"outputFormat\"));\n }\n this.options.outputFormat = \"json\";\n\n // gestion de l'url du service par defaut\n // si l'url n'est pas renseignée, il faut utiliser les urls par defaut\n if (!this.options.serverUrl) {\n // Code commenté : Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'isochrone\n /* var urlFound = DefaultUrlService.ProcessIsoCurve.newUrl();\n if (this.options.oldIsoService) {\n urlFound = DefaultUrlService.ProcessIsoCurve.url();\n } */\n // Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'isochrone\n var urlFound = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__[\"default\"].ProcessIsoCurve.url();\n if (!urlFound) {\n throw new Error(\"Url by default not found !\");\n }\n this.options.serverUrl = urlFound;\n this.logger.trace(\"Serveur URL par defaut : \" + this.options.serverUrl);\n }\n}\n\n/**\n * @lends module:ProcessIsoCurve#\n */\nProcessIsoCurve.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nProcessIsoCurve.prototype.constructor = ProcessIsoCurve;\n\n/**\n * Création de la requête (overwrite)\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nProcessIsoCurve.prototype.buildRequest = function (error, success) {\n try {\n var oIsoCurve = new _Request_ProcessIsoCurveRequest__WEBPACK_IMPORTED_MODULE_5__[\"default\"](this.options);\n if (!oIsoCurve.processRequestString()) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_REQUEST_BUILD\"));\n }\n\n this.request = oIsoCurve.requestString;\n } catch (e) {\n error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](e.message));\n return;\n }\n\n success.call(this, this.request);\n};\n\n/**\n * (overwrite)\n * Analyse de la reponse\n *\n * @param {Function} onError - callback des erreurs\n * @param {Function} onSuccess - callback de succès de l'analyse de la réponse\n */\nProcessIsoCurve.prototype.analyzeResponse = function (onError, onSuccess) {\n if (this.response) {\n var options = {\n response : this.response,\n outputFormat : this.options.outputFormat,\n rawResponse : this.options.rawResponse,\n onSuccess : onSuccess,\n onError : onError,\n scope : this\n };\n\n _Response_ProcessIsoCurveResponseFactory__WEBPACK_IMPORTED_MODULE_6__[\"default\"].build(options);\n } else {\n onError.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ProcessIsoCurve);\n//# sourceURL=[module]\n//# source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NoKG9wdGlvbnMuY29uc3RyYWludHNba10pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKF8uZ2V0TWVzc2FnZShcIlBBUkFNX1RZUEVcIiwgXCJjb25zdHJhaW50c1wiKSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvLyBHZXN0aW9uIGRlIGwnYW5jaWVuIHBhcmFtw6h0cmUgZXhjbHVzaW9uc1xuICAgIHZhciBjb25zdHJhaW50VHVubmVsID0ge307XG4gICAgdmFyIGNvbnN0cmFpbnRQb250ID0ge307XG4gICAgdmFyIGNvbnN0cmFpbnRBdXRvcm91dGUgPSB7fTtcbiAgICBpZiAob3B0aW9ucy5leGNsdXNpb25zKSB7XG4gICAgICAgIGlmIChvcHRpb25zLmV4Y2x1c2lvbnMubGVuZ3RoICE9PSAwKSB7XG4gICAgICAgICAgICB0aGlzLmxvZ2dlci53YXJuKFwib3B0aW9ucy5leGNsdXNpb25zIGlzIERFUFJFQ0FURUQgISFcIik7XG4gICAgICAgICAgICBmb3IgKHZhciBjID0gMDsgYyA8IG9wdGlvbnMuZXhjbHVzaW9ucy5sZW5ndGg7IGMrKykge1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2Ygb3B0aW9ucy5leGNsdXNpb25zW2NdID09PSBcInN0cmluZ1wiKSB7XG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMuZXhjbHVzaW9uc1tjXSA9IG9wdGlvbnMuZXhjbHVzaW9uc1tjXS50b0xvd2VyQ2FzZSgpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIG9uIG5lIGNyw6llIHBhcyB1bmUgZXJyZXVyIHBvdXIgcsOpdHJvLWNvbXBhdGliaWxpdMOpIGF2ZWMgbGVzIGFuY2llbm5lcyB2ZXJzaW9uc1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMuZXhjbHVzaW9uc1tjXSA9PT0gXCJ0b2xsXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludEF1dG9yb3V0ZS5jb25zdHJhaW50VHlwZSA9IFwiYmFubmVkXCI7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRBdXRvcm91dGUua2V5ID0gXCJ3YXlUeXBlXCI7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRBdXRvcm91dGUub3BlcmF0b3IgPSBcIj1cIjtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludEF1dG9yb3V0ZS52YWx1ZSA9IFwiYXV0b3JvdXRlXCI7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMub3B0aW9ucy5jb25zdHJhaW50cy5wdXNoKGNvbnN0cmFpbnRBdXRvcm91dGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5leGNsdXNpb25zW2NdID09PSBcInR1bm5lbFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRUdW5uZWwuY29uc3RyYWludFR5cGUgPSBcImJhbm5lZFwiO1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50VHVubmVsLmtleSA9IFwid2F5VHlwZVwiO1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50VHVubmVsLm9wZXJhdG9yID0gXCI9XCI7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRUdW5uZWwudmFsdWUgPSBcInR1bm5lbFwiO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLm9wdGlvbnMuY29uc3RyYWludHMucHVzaChjb25zdHJhaW50VHVubmVsKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMuZXhjbHVzaW9uc1tjXSA9PT0gXCJicmlkZ2VcIikge1xuICAgICAgICAg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0lzb0N1cnZlO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js\n"); /***/ }), @@ -824,7 +836,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Response object for { /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../CommonService */ \"./node_modules/geoportal-access-lib/src/Services/CommonService.js\");\n/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../DefaultUrlService */ \"./node_modules/geoportal-access-lib/src/Services/DefaultUrlService.js\");\n/* harmony import */ var _Request_RouteRequestFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Request/RouteRequestFactory */ \"./node_modules/geoportal-access-lib/src/Services/Route/Request/RouteRequestFactory.js\");\n/* harmony import */ var _Response_RouteResponseFactory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Response/RouteResponseFactory */ \"./node_modules/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js\");\n\n\n\n\n\n\n\n\n\n/**\n * @classdesc\n * Appel du service d'itinéraire du Géoportail :\n * envoi de la requête construite selon les paramètres en options,\n * éventuellement parsing et analyse de la réponse,\n * retour d'une réponse en paramètre de la fonction onSuccess.\n *\n * @alias Gp.Services.Route\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {String} options.resource - La ressource utilisée pour le calcul. Ce paramètre devrait être obligatoire car il l'est dans l'appel au service. Mais il ne l'est pas pour des raisons de rétrocompatibilité.\n *\n * @param {String} options.outputFormat - Le format de la réponse du service itineraire : 'json' uniquement et par défaut.\n *\n * @param {String} [options.routePreference = \"fastest\"] - Mode de calcul à utiliser :\n * - le plus rapide « fastest »\n * - le plus court « shortest »\n * Par défaut : « fastest ».\n *\n * @param {Object} options.startPoint - Point de départ du calcul. Coordonnées exprimées en longitudes, latitudes (EPSG:4326)\n * @param {Float} options.startPoint.x - Abcisse du point de départ du calcul d'itinéraire.\n * @param {Float} options.startPoint.y - Ordonnée du point de départ du calcul d'itinéraire.\n *\n * @param {Object} options.endPoint - Point d'arrivée du calcul. Coordonnées exprimées en longitudes, latitudes (EPSG:4326)\n * @param {Float} options.endPoint.x - Abcisse du point d'arrivée du calcul d'itinéraire.\n * @param {Float} options.endPoint.y - Ordonnée du point d'arrivée du calcul d'itinéraire.\n *\n * @param {Object[]} [options.viaPoints] - Liste de point ({x:Float,y:Float}) intermédaires que l'itinéraire doit emprunter dans l'ordre du tableau.\n * Coordonnées exprimées en longitudes, latitudes (EPSG:4326) :{x:float, y:float}\n *\n * @param {String} [options.graph = \"voiture\"] - Type de graphe utilisé : \"Voiture\" ou \"Pieton\".\n * Détermine le profil de vitesses utilisé pour le calcul ainsi que les tronçons autorisés ou non.\n * Par défaut, c'est la valeur \"Voiture\" qui sera utilisée.\n *\n * @param {String[]} [options.exclusions] - DEPRECATED: Critères d'exclusions à appliquer pour le calcul. (correspond au paramètre \"avoidFeature\" d'OpenLS)\n * On précise ici le type de tronçons que l'on ne veut pas que l'itinéraire emprunte\n * (valeurs possibles : « toll » (éviter les péages), « bridge », « tunnel »).\n * Ce paramètre est conservé pour une rétrocompatibilité de l'api. Le nouveau paramètre à utiliser est options.constraints\n *\n * @param {Object[]} [options.constraints] - Critères de contraintes à appliquer sur un itinéraire. Les valeurs disponibles dépendent de la ressource utilisée. Il est donc utile de regarder le getCapabilities.\n * @param {String} [options.constraints.constraintType] - Type de la contrainte. Généralement \"banned\".\n * @param {String} [options.constraints.key] - Clé de la contrainte. Généralement \"wayType\".\n * @param {String} [options.constraints.operator] - Opérateur de la contrainte. Généralement \"=\".\n * @param {String} [options.constraints.value] - Valeur de la contrainte. Généralement \"autoroute\".\n *\n * @param {Boolean} [options.geometryInInstructions = false] - Indique si la géométrie de l'itinéraire doit être reprise morceau par morceau dans les instructions.\n * (correspond au paramètre \"provideGeometry\" d'OpenLS) Par défaut : false.\n *\n * @param {Boolean} [options.provideBbox = true] - Indique si les instructions doivent être localisées par une bbox dans la réponse.\n * Par défaut : true.\n *\n * @param {String} [options.distanceUnit = \"m\"] - Indique si la distance doit être exprimée en km ou m dans la réponse.\n * Par défaut : m.\n * @param {String} [options.timeUnit = \"second\"] - Indique si la durée doit être exprimée en seconde, minute ou heure dans la réponse. Il peut-être formatté hh:mm::ss avec la valeur standard.\n * Les valeurs possibles sont \"standard\", \"second\", \"minute\" ou \"hour\".\n * Par défaut : \"standard\".\n *\n * @param {String} [options.srs] - Système de coordonnées dans lequel les paramètres géographiques en entrée et la réponse du service sont exprimés.\n * Pas de valeur par défaut. Si le serveur consulté est celui du Géoportail, la valeur par défaut sera donc celle du service : 'EPSG:4326'.\n *\n * @param {String[]} [options.waysAttributes] - Nom des attributs des voies. Les valeurs disponibles dépendent de la ressource utilisée. Il est donc utile de regarder le getCapabilities.\n *\n * @example\n * var options = {\n * // options communes aux services\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * protocol : 'XHR',\n * proxyURL : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * resource : 'bdtopo'\n * outputFormat : 'json',\n * startPoint : {\n * x : 42.1121,\n * y : 1.5557\n * },\n * endPoint : {\n * x : 42.1121,\n * y : 1.5557\n * },\n * provideBbox : true,\n * exclusions : [\"Bridge\", \"Tunnel\", \"Toll\"],\n * distanceUnit : \"km\",\n * graph : \"Voiture\",\n * geometryInInstructions : true,\n * routePreference : \"fastest\"\n * };\n *\n */\nfunction Route (options) {\n if (!(this instanceof Route)) {\n throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"CLASS_CONSTRUCTOR\", \"Route\"));\n }\n\n /**\n * Nom de la classe (heritage)\n */\n this.CLASSNAME = \"Route\";\n\n // appel du constructeur par heritage\n _CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].apply(this, arguments);\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"Gp.Services.Route\");\n this.logger.trace(\"[Constructeur Route (options)]\");\n\n if (!options.startPoint) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"startPoint\"));\n }\n\n // on lance une exception afin d'eviter au service de le faire...\n if (options.startPoint.x === null) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"startPoint.x\"));\n }\n\n if (options.startPoint.y === null) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"startPoint.y\"));\n }\n\n if (!options.endPoint) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"endPoint\"));\n }\n\n // on lance une exception afin d'eviter au service de le faire...\n if (options.endPoint.x === null) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"endPoint.x\"));\n }\n\n if (options.endPoint.y === null) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"endPoint.y\"));\n }\n\n // options par defaut\n\n // on passe l'option outputFormat en minuscules afin d'éviter des exceptions.\n if (options.outputFormat && options.outputFormat !== \"json\") {\n this.logger.warn(\"options.outputFormat could only be json\");\n }\n this.options.outputFormat = \"json\";\n\n this.options.resource = options.resource || \"bdtopo-osrm\";\n this.options.startPoint = options.startPoint;\n this.options.endPoint = options.endPoint;\n this.options.viaPoints = options.viaPoints || [];\n this.options.routePreference = options.routePreference || \"fastest\";\n /** Gestion des anciennes valeurs de graph */\n if (options.graph) {\n if (options.graph === \"Voiture\") {\n this.options.graph = \"car\";\n }\n if (options.graph === \"Pieton\") {\n this.options.graph = \"pedestrian\";\n }\n } else {\n this.options.graph = \"car\";\n }\n this.options.constraints = [];\n if (options.constraints) {\n if (Array.isArray(options.constraints)) {\n for (var k = 0; k < options.constraints.length; k++) {\n this.options.constraints.push(options.constraints[k]);\n }\n } else {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_TYPE\", \"constraints\"));\n }\n }\n\n /** Gestion de l'ancien paramètre exclusion */\n var constraintTunnel = {};\n var constraintPont = {};\n var constraintAutoroute = {};\n if (options.exclusions) {\n if (options.exclusions.length !== 0) {\n this.logger.warn(\"options.exclusions is DEPRECATED !!\");\n for (var c = 0; c < options.exclusions.length; c++) {\n if (typeof options.exclusions[c] === \"string\") {\n options.exclusions[c] = options.exclusions[c].toLowerCase();\n } else {\n // on ne crée pas une erreur pour rétro-compatibilité avec les anciennes versions\n continue;\n }\n if (options.exclusions[c] === \"toll\") {\n constraintAutoroute.constraintType = \"banned\";\n constraintAutoroute.key = \"wayType\";\n constraintAutoroute.operator = \"=\";\n constraintAutoroute.value = \"autoroute\";\n this.options.constraints.push(constraintAutoroute);\n }\n if (options.exclusions[c] === \"tunnel\") {\n constraintTunnel.constraintType = \"banned\";\n constraintTunnel.key = \"wayType\";\n constraintTunnel.operator = \"=\";\n constraintTunnel.value = \"tunnel\";\n this.options.constraints.push(constraintTunnel);\n }\n if (options.exclusions[c] === \"bridge\") {\n constraintPont.constraintType = \"banned\";\n constraintPont.key = \"wayType\";\n constraintPont.operator = \"=\";\n constraintPont.value = \"pont\";\n this.options.constraints.push(constraintPont);\n }\n }\n }\n }\n\n this.options.geometryInInstructions = options.geometryInInstructions || false;\n this.options.provideBbox = options.provideBbox || true;\n this.options.distanceUnit = options.distanceUnit || \"m\";\n this.options.timeUnit = options.timeUnit || \"second\";\n this.options.expectedStartTime = null; // FIXME not yet implemented !\n this.options.srs = options.srs || \"EPSG:4326\";\n this.options.waysAttributes = options.waysAttributes || [];\n\n // gestion de l'url du service par defaut\n // si l'url n'est pas renseignée, il faut utiliser les urls par defaut\n if (!this.options.serverUrl) {\n var UrlByDefault = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__[\"default\"].Route.url(\"calcul\");\n if (!UrlByDefault) {\n throw new Error(\"Url by default not found !\");\n }\n this.options.serverUrl = UrlByDefault;\n this.logger.trace(\"Serveur URL par defaut : \" + this.options.serverUrl);\n }\n}\n\n/**\n * @lends module:Route#\n */\nRoute.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nRoute.prototype.constructor = Route;\n\n/**\n * (overwrite)\n * Création de la requête\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nRoute.prototype.buildRequest = function (error, success) {\n var options = {\n // spécifique au service\n resource : this.options.resource,\n startPoint : this.options.startPoint,\n endPoint : this.options.endPoint,\n viaPoints : this.options.viaPoints,\n provideBbox : this.options.provideBbox,\n constraints : this.options.constraints,\n distanceUnit : this.options.distanceUnit,\n timeUnit : this.options.timeUnit,\n graph : this.options.graph,\n geometryInInstructions : this.options.geometryInInstructions,\n routePreference : this.options.routePreference,\n srs : this.options.srs,\n waysAttributes : this.options.waysAttributes\n };\n\n this.request = _Request_RouteRequestFactory__WEBPACK_IMPORTED_MODULE_5__[\"default\"].build(options);\n\n // on teste si la requete a bien été construite !\n if (!this.request) {\n error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_REQUEST_BUILD\")));\n } else {\n success.call(this, this.request);\n }\n};\n\n/**\n * (overwrite)\n * Analyse de la reponse\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nRoute.prototype.analyzeResponse = function (error, success) {\n // INFO\n // Factory pour masquer la complexité du retour du service\n\n if (this.response) {\n var options = {\n distanceUnit : this.options.distanceUnit,\n timeUnit : this.options.timeUnit,\n response : this.response,\n outputFormat : this.options.outputFormat, // utile pour parser la string en mode XHR : JSON ou XML !\n rawResponse : this.options.rawResponse,\n onError : error,\n onSuccess : success,\n scope : this,\n geometryInInstructions : this.options.geometryInInstructions\n };\n\n _Response_RouteResponseFactory__WEBPACK_IMPORTED_MODULE_6__[\"default\"].build(options);\n } else {\n error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EMPTY\")));\n }\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Route);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvUm91dGUvUm91dGUuanM/ZjE5YyJdLCJuYW1lcy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IHZhciBjb25zdHJhaW50UG9udCA9IHt9O1xuICAgIHZhciBjb25zdHJhaW50QXV0b3JvdXRlID0ge307XG4gICAgaWYgKG9wdGlvbnMuZXhjbHVzaW9ucykge1xuICAgICAgICBpZiAob3B0aW9ucy5leGNsdXNpb25zLmxlbmd0aCAhPT0gMCkge1xuICAgICAgICAgICAgdGhpcy5sb2dnZXIud2FybihcIm9wdGlvbnMuZXhjbHVzaW9ucyBpcyBERVBSRUNBVEVEICEhXCIpO1xuICAgICAgICAgICAgZm9yICh2YXIgYyA9IDA7IGMgPCBvcHRpb25zLmV4Y2x1c2lvbnMubGVuZ3RoOyBjKyspIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMuZXhjbHVzaW9uc1tjXSA9PT0gXCJzdHJpbmdcIikge1xuICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmV4Y2x1c2lvbnNbY10gPSBvcHRpb25zLmV4Y2x1c2lvbnNbY10udG9Mb3dlckNhc2UoKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBvbiBuZSBjcsOpZSBwYXMgdW5lIGVycmV1ciBwb3VyIHLDqXRyby1jb21wYXRpYmlsaXTDqSBhdmVjIGxlcyBhbmNpZW5uZXMgdmVyc2lvbnNcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLmV4Y2x1c2lvbnNbY10gPT09IFwidG9sbFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRBdXRvcm91dGUuY29uc3RyYWludFR5cGUgPSBcImJhbm5lZFwiO1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50QXV0b3JvdXRlLmtleSA9IFwid2F5VHlwZVwiO1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50QXV0b3JvdXRlLm9wZXJhdG9yID0gXCI9XCI7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRBdXRvcm91dGUudmFsdWUgPSBcImF1dG9yb3V0ZVwiO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLm9wdGlvbnMuY29uc3RyYWludHMucHVzaChjb25zdHJhaW50QXV0b3JvdXRlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMuZXhjbHVzaW9uc1tjXSA9PT0gXCJ0dW5uZWxcIikge1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50VHVubmVsLmNvbnN0cmFpbnRUeXBlID0gXCJiYW5uZWRcIjtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludFR1bm5lbC5rZXkgPSBcIndheVR5cGVcIjtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludFR1bm5lbC5vcGVyYXRvciA9IFwiPVwiO1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50VHVubmVsLnZhbHVlID0gXCJ0dW5uZWxcIjtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5vcHRpb25zLmNvbnN0cmFpbnRzLnB1c2goY29uc3RyYWludFR1bm5lbCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLmV4Y2x1c2lvbnNbY10gPT09IFwiYnJpZGdlXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludFBvbnQuY29uc3RyYWludFR5cGUgPSBcImJhbm5lZFwiO1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50UG9udC5rZXkgPSBcIndheVR5cGVcIjtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludFBvbnQub3BlcmF0b3IgPSBcIj1cIjtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludFBvbnQudmFsdWUgPSBcInBvbnRcIjtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5vcHRpb25zLmNvbnN0cmFpbnRzLnB1c2goY29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c2VGYWN0b3J5LmJ1aWxkKG9wdGlvbnMpO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIGVycm9yLmNhbGwodGhpcywgbmV3IEVycm9yU2VydmljZShfLmdldE1lc3NhZ2UoXCJTRVJWSUNFX1JFU1BPTlNFX0VNUFRZXCIpKSk7XG4gICAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgUm91dGU7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Route/Route.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Utils/LoggerByDefault */ \"./node_modules/geoportal-access-lib/src/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Utils/MessagesResources */ \"./node_modules/geoportal-access-lib/src/Utils/MessagesResources.js\");\n/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Exceptions/ErrorService */ \"./node_modules/geoportal-access-lib/src/Exceptions/ErrorService.js\");\n/* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../CommonService */ \"./node_modules/geoportal-access-lib/src/Services/CommonService.js\");\n/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../DefaultUrlService */ \"./node_modules/geoportal-access-lib/src/Services/DefaultUrlService.js\");\n/* harmony import */ var _Request_RouteRequestFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Request/RouteRequestFactory */ \"./node_modules/geoportal-access-lib/src/Services/Route/Request/RouteRequestFactory.js\");\n/* harmony import */ var _Response_RouteResponseFactory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Response/RouteResponseFactory */ \"./node_modules/geoportal-access-lib/src/Services/Route/Response/RouteResponseFactory.js\");\n\n\n\n\n\n\n\n\n\n/**\n * @classdesc\n * Appel du service d'itinéraire du Géoportail :\n * envoi de la requête construite selon les paramètres en options,\n * éventuellement parsing et analyse de la réponse,\n * retour d'une réponse en paramètre de la fonction onSuccess.\n *\n * @alias Gp.Services.Route\n * @constructor\n * @extends {Gp.Services.CommonService}\n * @param {Object} options - options spécifiques au service (+ les options heritées)\n *\n * @param {String} options.resource - La ressource utilisée pour le calcul. Ce paramètre devrait être obligatoire car il l'est dans l'appel au service. Mais il ne l'est pas pour des raisons de rétrocompatibilité.\n *\n * @param {String} options.outputFormat - Le format de la réponse du service itineraire : 'json' uniquement et par défaut.\n *\n * @param {String} [options.routePreference = \"fastest\"] - Mode de calcul à utiliser :\n * - le plus rapide « fastest »\n * - le plus court « shortest »\n * Par défaut : « fastest ».\n *\n * @param {Object} options.startPoint - Point de départ du calcul. Coordonnées exprimées en longitudes, latitudes (EPSG:4326)\n * @param {Float} options.startPoint.x - Abcisse du point de départ du calcul d'itinéraire.\n * @param {Float} options.startPoint.y - Ordonnée du point de départ du calcul d'itinéraire.\n *\n * @param {Object} options.endPoint - Point d'arrivée du calcul. Coordonnées exprimées en longitudes, latitudes (EPSG:4326)\n * @param {Float} options.endPoint.x - Abcisse du point d'arrivée du calcul d'itinéraire.\n * @param {Float} options.endPoint.y - Ordonnée du point d'arrivée du calcul d'itinéraire.\n *\n * @param {Object[]} [options.viaPoints] - Liste de point ({x:Float,y:Float}) intermédaires que l'itinéraire doit emprunter dans l'ordre du tableau.\n * Coordonnées exprimées en longitudes, latitudes (EPSG:4326) :{x:float, y:float}\n *\n * @param {String} [options.graph = \"voiture\"] - Type de graphe utilisé : \"Voiture\" ou \"Pieton\".\n * Détermine le profil de vitesses utilisé pour le calcul ainsi que les tronçons autorisés ou non.\n * Par défaut, c'est la valeur \"Voiture\" qui sera utilisée.\n *\n * @param {String[]} [options.exclusions] - DEPRECATED: Critères d'exclusions à appliquer pour le calcul. (correspond au paramètre \"avoidFeature\" d'OpenLS)\n * On précise ici le type de tronçons que l'on ne veut pas que l'itinéraire emprunte\n * (valeurs possibles : « toll » (éviter les péages), « bridge », « tunnel »).\n * Ce paramètre est conservé pour une rétrocompatibilité de l'api. Le nouveau paramètre à utiliser est options.constraints\n *\n * @param {Object[]} [options.constraints] - Critères de contraintes à appliquer sur un itinéraire. Les valeurs disponibles dépendent de la ressource utilisée. Il est donc utile de regarder le getCapabilities.\n * @param {String} [options.constraints.constraintType] - Type de la contrainte. Généralement \"banned\".\n * @param {String} [options.constraints.key] - Clé de la contrainte. Généralement \"wayType\".\n * @param {String} [options.constraints.operator] - Opérateur de la contrainte. Généralement \"=\".\n * @param {String} [options.constraints.value] - Valeur de la contrainte. Généralement \"autoroute\".\n *\n * @param {Boolean} [options.geometryInInstructions = false] - Indique si la géométrie de l'itinéraire doit être reprise morceau par morceau dans les instructions.\n * (correspond au paramètre \"provideGeometry\" d'OpenLS) Par défaut : false.\n *\n * @param {Boolean} [options.provideBbox = true] - Indique si les instructions doivent être localisées par une bbox dans la réponse.\n * Par défaut : true.\n *\n * @param {String} [options.distanceUnit = \"m\"] - Indique si la distance doit être exprimée en km ou m dans la réponse.\n * Par défaut : m.\n * @param {String} [options.timeUnit = \"second\"] - Indique si la durée doit être exprimée en seconde, minute ou heure dans la réponse. Il peut-être formatté hh:mm::ss avec la valeur standard.\n * Les valeurs possibles sont \"standard\", \"second\", \"minute\" ou \"hour\".\n * Par défaut : \"standard\".\n *\n * @param {String} [options.srs] - Système de coordonnées dans lequel les paramètres géographiques en entrée et la réponse du service sont exprimés.\n * Pas de valeur par défaut. Si le serveur consulté est celui du Géoportail, la valeur par défaut sera donc celle du service : 'EPSG:4326'.\n *\n * @param {String[]} [options.waysAttributes] - Nom des attributs des voies. Les valeurs disponibles dépendent de la ressource utilisée. Il est donc utile de regarder le getCapabilities.\n *\n * @example\n * var options = {\n * // options communes aux services\n * apiKey : null,\n * serverUrl : 'http://localhost/service/',\n * protocol : 'XHR',\n * proxyURL : null,\n * httpMethod : 'GET', // GET|POST\n * timeOut : 10000, // ms\n * rawResponse : false, // true|false\n * scope : null, // this\n * onSuccess : function (response) {},\n * onFailure : function (error) {},\n * // spécifique au service\n * resource : 'bdtopo'\n * outputFormat : 'json',\n * startPoint : {\n * x : 42.1121,\n * y : 1.5557\n * },\n * endPoint : {\n * x : 42.1121,\n * y : 1.5557\n * },\n * provideBbox : true,\n * exclusions : [\"Bridge\", \"Tunnel\", \"Toll\"],\n * distanceUnit : \"km\",\n * graph : \"Voiture\",\n * geometryInInstructions : true,\n * routePreference : \"fastest\"\n * };\n *\n */\nfunction Route (options) {\n if (!(this instanceof Route)) {\n throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"CLASS_CONSTRUCTOR\", \"Route\"));\n }\n\n /**\n * Nom de la classe (heritage)\n */\n this.CLASSNAME = \"Route\";\n\n // appel du constructeur par heritage\n _CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].apply(this, arguments);\n\n this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__[\"default\"].getLogger(\"Gp.Services.Route\");\n this.logger.trace(\"[Constructeur Route (options)]\");\n\n if (!options.startPoint) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"startPoint\"));\n }\n\n // on lance une exception afin d'eviter au service de le faire...\n if (options.startPoint.x === null) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"startPoint.x\"));\n }\n\n if (options.startPoint.y === null) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"startPoint.y\"));\n }\n\n if (!options.endPoint) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"endPoint\"));\n }\n\n // on lance une exception afin d'eviter au service de le faire...\n if (options.endPoint.x === null) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"endPoint.x\"));\n }\n\n if (options.endPoint.y === null) {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_MISSING\", \"endPoint.y\"));\n }\n\n // options par defaut\n\n // on passe l'option outputFormat en minuscules afin d'éviter des exceptions.\n if (options.outputFormat && options.outputFormat !== \"json\") {\n this.logger.warn(\"options.outputFormat could only be json\");\n }\n this.options.outputFormat = \"json\";\n\n this.options.resource = options.resource || \"bdtopo-osrm\";\n this.options.startPoint = options.startPoint;\n this.options.endPoint = options.endPoint;\n this.options.viaPoints = options.viaPoints || [];\n this.options.routePreference = options.routePreference || \"fastest\";\n /** Gestion des anciennes valeurs de graph */\n if (options.graph) {\n if (options.graph === \"Voiture\") {\n this.options.graph = \"car\";\n }\n if (options.graph === \"Pieton\") {\n this.options.graph = \"pedestrian\";\n }\n } else {\n this.options.graph = \"car\";\n }\n this.options.constraints = [];\n if (options.constraints) {\n if (Array.isArray(options.constraints)) {\n for (var k = 0; k < options.constraints.length; k++) {\n this.options.constraints.push(options.constraints[k]);\n }\n } else {\n throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"PARAM_TYPE\", \"constraints\"));\n }\n }\n\n /** Gestion de l'ancien paramètre exclusion */\n var constraintTunnel = {};\n var constraintPont = {};\n var constraintAutoroute = {};\n if (options.exclusions) {\n if (options.exclusions.length !== 0) {\n this.logger.warn(\"options.exclusions is DEPRECATED !!\");\n for (var c = 0; c < options.exclusions.length; c++) {\n if (typeof options.exclusions[c] === \"string\") {\n options.exclusions[c] = options.exclusions[c].toLowerCase();\n } else {\n // on ne crée pas une erreur pour rétro-compatibilité avec les anciennes versions\n continue;\n }\n if (options.exclusions[c] === \"toll\") {\n constraintAutoroute.constraintType = \"banned\";\n constraintAutoroute.key = \"wayType\";\n constraintAutoroute.operator = \"=\";\n constraintAutoroute.value = \"autoroute\";\n this.options.constraints.push(constraintAutoroute);\n }\n if (options.exclusions[c] === \"tunnel\") {\n constraintTunnel.constraintType = \"banned\";\n constraintTunnel.key = \"wayType\";\n constraintTunnel.operator = \"=\";\n constraintTunnel.value = \"tunnel\";\n this.options.constraints.push(constraintTunnel);\n }\n if (options.exclusions[c] === \"bridge\") {\n constraintPont.constraintType = \"banned\";\n constraintPont.key = \"wayType\";\n constraintPont.operator = \"=\";\n constraintPont.value = \"pont\";\n this.options.constraints.push(constraintPont);\n }\n }\n }\n }\n\n this.options.geometryInInstructions = options.geometryInInstructions || false;\n this.options.provideBbox = options.provideBbox || true;\n this.options.distanceUnit = options.distanceUnit || \"m\";\n this.options.timeUnit = options.timeUnit || \"second\";\n this.options.expectedStartTime = null; // FIXME not yet implemented !\n this.options.srs = options.srs || \"EPSG:4326\";\n this.options.waysAttributes = options.waysAttributes || [];\n\n // gestion de l'url du service par defaut\n // si l'url n'est pas renseignée, il faut utiliser les urls par defaut\n if (!this.options.serverUrl) {\n // Code commenté : Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'itinéraire\n /* var UrlByDefault = DefaultUrlService.Route.newUrl();\n if (this.options.oldRouteService) {\n UrlByDefault = DefaultUrlService.Route.url();\n } */\n // Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'itinéraire\n var UrlByDefault = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__[\"default\"].Route.url();\n\n if (!UrlByDefault) {\n throw new Error(\"Url by default not found !\");\n }\n this.options.serverUrl = UrlByDefault;\n this.logger.trace(\"Serveur URL par defaut : \" + this.options.serverUrl);\n }\n}\n\n/**\n * @lends module:Route#\n */\nRoute.prototype = Object.create(_CommonService__WEBPACK_IMPORTED_MODULE_3__[\"default\"].prototype, {\n // todo\n // getter/setter\n});\n\n/*\n * Constructeur (alias)\n */\nRoute.prototype.constructor = Route;\n\n/**\n * (overwrite)\n * Création de la requête\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nRoute.prototype.buildRequest = function (error, success) {\n var options = {\n // spécifique au service\n resource : this.options.resource,\n startPoint : this.options.startPoint,\n endPoint : this.options.endPoint,\n viaPoints : this.options.viaPoints,\n provideBbox : this.options.provideBbox,\n constraints : this.options.constraints,\n distanceUnit : this.options.distanceUnit,\n timeUnit : this.options.timeUnit,\n graph : this.options.graph,\n geometryInInstructions : this.options.geometryInInstructions,\n routePreference : this.options.routePreference,\n srs : this.options.srs,\n waysAttributes : this.options.waysAttributes\n };\n\n this.request = _Request_RouteRequestFactory__WEBPACK_IMPORTED_MODULE_5__[\"default\"].build(options);\n\n // on teste si la requete a bien été construite !\n if (!this.request) {\n error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_REQUEST_BUILD\")));\n } else {\n success.call(this, this.request);\n }\n};\n\n/**\n * (overwrite)\n * Analyse de la reponse\n *\n * @param {Function} error - callback des erreurs\n * @param {Function} success - callback\n */\nRoute.prototype.analyzeResponse = function (error, success) {\n // INFO\n // Factory pour masquer la complexité du retour du service\n\n if (this.response) {\n var options = {\n distanceUnit : this.options.distanceUnit,\n timeUnit : this.options.timeUnit,\n response : this.response,\n outputFormat : this.options.outputFormat, // utile pour parser la string en mode XHR : JSON ou XML !\n rawResponse : this.options.rawResponse,\n onError : error,\n onSuccess : success,\n scope : this,\n geometryInInstructions : this.options.geometryInInstructions\n };\n\n _Response_RouteResponseFactory__WEBPACK_IMPORTED_MODULE_6__[\"default\"].build(options);\n } else {\n error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getMessage(\"SERVICE_RESPONSE_EMPT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bnN0cmFpbnRzW2tdKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihfLmdldE1lc3NhZ2UoXCJQQVJBTV9UWVBFXCIsIFwiY29uc3RyYWludHNcIikpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLyoqIEdlc3Rpb24gZGUgbCdhbmNpZW4gcGFyYW3DqHRyZSBleGNsdXNpb24gKi9cbiAgICB2YXIgY29uc3RyYWludFR1bm5lbCA9IHt9O1xuICAgIHZhciBjb25zdHJhaW50UG9udCA9IHt9O1xuICAgIHZhciBjb25zdHJhaW50QXV0b3JvdXRlID0ge307XG4gICAgaWYgKG9wdGlvbnMuZXhjbHVzaW9ucykge1xuICAgICAgICBpZiAob3B0aW9ucy5leGNsdXNpb25zLmxlbmd0aCAhPT0gMCkge1xuICAgICAgICAgICAgdGhpcy5sb2dnZXIud2FybihcIm9wdGlvbnMuZXhjbHVzaW9ucyBpcyBERVBSRUNBVEVEICEhXCIpO1xuICAgICAgICAgICAgZm9yICh2YXIgYyA9IDA7IGMgPCBvcHRpb25zLmV4Y2x1c2lvbnMubGVuZ3RoOyBjKyspIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMuZXhjbHVzaW9uc1tjXSA9PT0gXCJzdHJpbmdcIikge1xuICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmV4Y2x1c2lvbnNbY10gPSBvcHRpb25zLmV4Y2x1c2lvbnNbY10udG9Mb3dlckNhc2UoKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBvbiBuZSBjcsOpZSBwYXMgdW5lIGVycmV1ciBwb3VyIHLDqXRyby1jb21wYXRpYmlsaXTDqSBhdmVjIGxlcyBhbmNpZW5uZXMgdmVyc2lvbnNcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLmV4Y2x1c2lvbnNbY10gPT09IFwidG9sbFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRBdXRvcm91dGUuY29uc3RyYWludFR5cGUgPSBcImJhbm5lZFwiO1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50QXV0b3JvdXRlLmtleSA9IFwid2F5VHlwZVwiO1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50QXV0b3JvdXRlLm9wZXJhdG9yID0gXCI9XCI7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnRBdXRvcm91dGUudmFsdWUgPSBcImF1dG9yb3V0ZVwiO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLm9wdGlvbnMuY29uc3RyYWludHMucHVzaChjb25zdHJhaW50QXV0b3JvdXRlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMuZXhjbHVzaW9uc1tjXSA9PT0gXCJ0dW5uZWxcIikge1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50VHVubmVsLmNvbnN0cmFpbnRUeXBlID0gXCJiYW5uZWRcIjtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludFR1bm5lbC5rZXkgPSBcIndheVR5cGVcIjtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludFR1bm5lbC5vcGVyYXRvciA9IFwiPVwiO1xuICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50VHVubmVsLnZhbHVlID0gXCJ0dW5uZWxcIjtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5vcHRpb25zLmNvbnN0cmFpbnRzLnB1c2goY29uc3RyYWludFR1bm5lbCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLmV4Y2x1c2lvbnNbY10gPT09IFwiYnJpZGdlXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludFBv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internal:///./node_modules/geoportal-access-lib/src/Services/Route/Route.js\n"); /***/ }), @@ -836,7 +848,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Uti /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Config_Config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Config/Config */ \"./node_modules/geoportal-access-lib/src/Services/Config/Config.js\");\n/* harmony import */ var _Alti_Alti__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Alti/Alti */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Alti.js\");\n/* harmony import */ var _Geocode_Geocode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Geocode/Geocode */ \"./node_modules/geoportal-access-lib/src/Services/Geocode/Geocode.js\");\n/* harmony import */ var _Geocode_ReverseGeocode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Geocode/ReverseGeocode */ \"./node_modules/geoportal-access-lib/src/Services/Geocode/ReverseGeocode.js\");\n/* harmony import */ var _AutoComplete_AutoComplete__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./AutoComplete/AutoComplete */ \"./node_modules/geoportal-access-lib/src/Services/AutoComplete/AutoComplete.js\");\n/* harmony import */ var _Route_Route__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Route/Route */ \"./node_modules/geoportal-access-lib/src/Services/Route/Route.js\");\n/* harmony import */ var _ProcessIsoCurve_ProcessIsoCurve__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ProcessIsoCurve/ProcessIsoCurve */ \"./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js\");\n/* eslint no-unused-vars: [\"error\", { \"varsIgnorePattern\": \"point|circle|bbox\" }] */\n\n/**\n* Geoportal web services invocation namespace.\n*\n* @module Services\n* @alias Gp.Services\n*/\n\n\n\n\n\n\n\n\nvar Services = {\n /**\n * Access to Geoportal resources metadata availables with one ore several keys\n *\n * @method getConfig\n * @param {Object} options - Options for function call.\n * @param {String} [options.apiKey] - Access key(s) (\",\" as separator, no spaces) to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}\n * @param {String} [options.customConfigFile] - path to a local config file. Overload the apiKey parameter\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.GetConfigResponse} object as a parameter except if \"rawResponse\" parameter is set to true : a String will be returned.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n */\n getConfig : function (options) {\n var configService = new _Config_Config__WEBPACK_IMPORTED_MODULE_0__[\"default\"](options);\n configService.call();\n },\n /**\n * Getting elevations in or along of one or several points on french territories using the [elevation services of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/alti.html}.
\n * Two use cases are availables :
\n * 1. getting elevations of the given points : don't use the options.sampling parameter ;
\n * 2. getting a regular set of elevations along the given points : use the options.sampling parameter.\n *\n * @method getAltitude\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}.\n * @param {Array.} options.positions - Array of positions ({lon:float, lat:float}) expressed in CRS:84 coordinates system, where to get elevations. 50 positions maximum may be given. 2 positions minimum are required if you use the options.sampling parameter.\n * @param {Number} [options.sampling] - Number of points to use (between 2 and 5000) in order to compute an elevation path. The points given with the options.positions parameter are used to fix the planimetric path along which the elevations will be computed.
\n * If not used, only elevations of these positions will be returned.\n * @param {Boolean} [options.zonly=false] - Set this parameter to true if you only want to have elevations returned without corresponding coordinates.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.AltiResponse} object as a parameter, except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/alti/rest/elevation.json] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {Boolean} [options.ssl = true] - Use of HTTPS or HTTP protocol to request the services. HTTPS by default (ssl=true).\n * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing.\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {String} [options.contentType=\"application/xml\"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n * @param {String} [options.api='REST'] - What API to use for interacting with underlying web service : 'REST' or 'WPS'. Only use if you know what you are doing.\n * @param {String} [options.outputFormat='xml'] - Output format for underlying web service response : 'xml' or 'json'. Only use if you know what you are doing.\n */\n getAltitude : function (options) {\n var altiService = new _Alti_Alti__WEBPACK_IMPORTED_MODULE_1__[\"default\"](options);\n altiService.call();\n },\n /**\n * Getting positon of a geographic identifier (places names, address, cadastral parcel, other...) using the [geocoding web service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/geocodage.html}.\n *\n * @example\n * Gp.Services.geocode ({\n * apiKey : \"carte\",\n * location : \"73 avenue de Paris, Saint-Mandé\",\n * // traitement des resultats\n * onSuccess : function (result) {\n * console.log(\"found (x:\"+result.position.x+\", y:\"+result.position.y+\")\") ;\n * }\n * }) ;\n *\n *\n * @method geocode\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}.\n * @param {String} [options.index=\"StreetAddress\"] - Geographical identifier type to search. Values currently availables are : \"PositionOfInterest\" for place names, \"StreetAddress\" for address search, \"CadastralParcel\" for Cadastral parcels search, \"location\" for a multi-index search on \"StreetAddress\" and \"PositionOfInterest\". Default is \"StreetAddress\".\n * @param {String} options.query - Geographic identifier to locate.\n * @param {Object} [options.filters] - Additional filters to apply to search. The following properties may be given.\n * @param {String} [options.filters.[prop]] - Additionnal properties to filter search. Properties depends on options.index, and values type should be \"String\".\n *

\n * Properties availables for address search :
\n * \"postalCode\", \"inseeCode\" and \"city\".\n *

\n * Properties availables for place names search :
\n * \"postalCode\", \"inseeCode\" and \"type\".\n *

\n * Properties availables for cadastral parcels search :
\n * \"codeDepartement\", \"codeCommune\", \"nomCommune\", \"codeCommuneAbs\", \"codeArrondissement\", \"section\", \"numero\", \"feuille\".\n * @param {Number} [options.maximumResponses=20] - Maximum number of responses. Default underlying service value applies (20) if not provided.\n * @param {Boolean} [options.returnTrueGeometry=false] - Set this parameter to true if you wish to have the true geometrie returned.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.GeocodeResponse} object as a parameter except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/geoportail/ols] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {Boolean} [options.ssl = true] - Use of HTTPS or HTTP protocol to request the services. HTTPS by default (ssl=true).\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n geocode : function (options) {\n var geocodeService = new _Geocode_Geocode__WEBPACK_IMPORTED_MODULE_2__[\"default\"](options);\n geocodeService.call();\n },\n /**\n * Retrieving geographical identifiers (place names, address, cadastral parcels, ...) near a given position, using the [reverse geocoding web service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/geocodage-inverse.html}.\n *\n * @method reverseGeocode\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}.\n * @param {String} [options.index=\"StreetAddress\"] - Geographical identifier type to search. Values currently availables are : \"PositionOfInterest\" for place names, \"StreetAddress\" for address search, \"CadastralParcel\" for Cadastral parcels search, \"location\" for a multi-index search on \"StreetAddress\" and \"PositionOfInterest\". Default is \"StreetAddress\".\n * @param {Object} options.position - Reference position where to search geographical identifiers.\n * @param {Float} options.position.lon - Longitude\n * @param {Float} options.position.lat - Latitude\n * @param {Object} [options.filters] - Additional filters to apply to search. The following properties may be given.\n * @param {String} [options.filters.[prop]] - Additionnal properties to filter search. Properties depends on options.index, and values type should be \"String\".\n *

\n * Properties availables for address search :
\n * \"postalCode\", \"inseeCode\" and \"city\".\n *

\n * Properties availables for place names search :
\n * \"postalCode\", \"inseeCode\" and \"type\".\n *

\n * Properties availables for cadastral parcels search :
\n * \"codeDepartement\", \"codeCommune\", \"nomCommune\", \"codeCommuneAbs\", \"codeArrondissement\", \"section\", \"numero\", \"feuille\".\n * @param {Object} [options.searchGeometry] - Location where to perform the search.\n * @param {String} options.searchGeometry.type - Geometry type (Point|Circle|Linestring|Polygon)\n * @param {Array.|Array.Array.} options.searchGeometry.coordinates - Coordinates\n * @param {Float} [options.searchGeometry.radius] - Radius (only for type 'Circle')\n * @param {Number} [options.maximumResponses=20] - Maximum number of responses. Default underlying service value applies (20) if not provided.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.GeocodeResponse} object as a parameter except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/geoportail/ols] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {Boolean} [options.ssl = true] - Use of HTTPS or HTTP protocol to request the services. HTTPS by default (ssl=true).\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n reverseGeocode : function (options) {\n var reverseGeocodeService = new _Geocode_ReverseGeocode__WEBPACK_IMPORTED_MODULE_3__[\"default\"](options);\n reverseGeocodeService.call();\n },\n /**\n * Getting suggestions of probable places names or address based on uncomplete texts, using the [autocompletion service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/autocompletion.html}\n *\n * @method autoComplete\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}.\n * @param {String} options.text - Text input to complete.\n * @param {Array.} [options.filterOptions.type = \"StreetAddress\"] - Suggestion types to provide : address (\"StreetAddress\") and/or place name (\"PositionOfInterest\").\n * @param {Array.} [options.filterOptions.territory] - Places where to limit the search of suggestions : \"METROPOLE\" (Corsica and metropolitan France), \"DOMTOM\" (French overseas departments and territories), or an INSEE code of a department. No limitation by default. For instance : ['METROPOLE', '31']\n * @param {Number} [options.maximumResponses = 10] - Maximum number of responses.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.AutoCompleteResponse} object as a parameter except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/ols/apis/completion] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {Boolean} [options.ssl = true] - Use of HTTPS or HTTP protocol to request the services. HTTPS by default (ssl=true).\n * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing.\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {String} [options.contentType=\"application/xml\"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n autoComplete : function (options) {\n var autoCompleteService = new _AutoComplete_AutoComplete__WEBPACK_IMPORTED_MODULE_4__[\"default\"](options);\n autoCompleteService.call();\n },\n /**\n * Getting a route from one point to another using the [route service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/itineraires.html}.\n *\n * @method route\n * @param {Object} options - Options for function call.\n * @param {String} options.resource - Resource used to compute the route. Available values are in the GetCapabilities.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}.\n * @param {String} [options.routePreference = \"fastest\"] - Indicates the way to compute the route : \"fastest\" (time optimisation) or \"shortest\" (distance optimisation). Available values are in the GetCapabilities.\n * @param {Gp.Point} options.startPoint - Start point of the route. Expressed in CRS:84 coordinates system (startPoint.x corresponds to longitude, startPoint.y corresponds to latitude). Available bbox are in the GetCapabilities.\n * @param {Gp.Point} options.endPoint - End point of the route. Expressed in CRS:84 coordinates system (endPoint.x corresponds to longitude, endPoint.y corresponds to latitude). Available bbox are in the GetCapabilities.\n * @param {Array.} [options.viaPoints] - Ordered via Points of the route. Expressed in CRS:84 coordinates system (viaPoints[i].x corresponds to longitude, viaPoints[i].y corresponds to latitude). Available bbox are in the GetCapabilities.\n * @param {String} [options.graph = \"Voiture\"] - User profile to use to compute the route : \"Voiture\" (using a vehicule) or \"Pieton\" (pedestrian). Has an influence on the kind of roads the route may use and the average speed. Available bbox are in the GetCapabilities.\n * @param {Array.} [options.exclusions] - DEPRECATED: use options.constraints. Indicates if route has to avoid some features (\"toll\", \"bridge\" or \"tunnel\").\n * @param {Boolean} [options.geometryInInstructions = false] - Indicates if route geometry has to be also returned with route instructions.\n * @param {Boolean} [options.provideBoundingBox = true] - Indicates if route instructions has to be localised with a BBOX in the response.\n * @param {String} [options.distanceUnit = \"m\"] - The unit used to provide distances in the response (\"meter\" or \"kilometer\").\n * @param {String} [options.timeUnit = \"second\"] - The unit used to provide duration in the response (\"standard\", \"second\", \"minute\", \"hour\").\n * @param {Array.} [options.waysAttributes] - Way Attributes to add in the response. Available values are in the GetCapabilities.\n * @param {Array.} [options.constraints] - Constraints used ({'constraintType':'banned','key':'ways_type','operator':'=','value':'autoroute'}). Available values are in the GetCapabilities.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.RouteResponse} object as a parameter except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.outputFormat='json'] - Output format (\"json\" or \"xml\") to use for underlying webService. Only use if you know what you are doing.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/itineraire/rest/route.json] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {Boolean} [options.ssl = true] - Use of HTTPS or HTTP protocol to request the services. HTTPS by default (ssl=true).\n * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing.\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {String} [options.contentType=\"application/xml\"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n route : function (options) {\n var routeService = new _Route_Route__WEBPACK_IMPORTED_MODULE_5__[\"default\"](options);\n routeService.call();\n },\n /**\n * Computing a set of places (curve) reachable from a given point (or from where to start to reach a given point) within a time or distance constraint using the [isochrone service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/isochrones.html}.\n *\n * @method isoCurve\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}.\n * @param {String} options.resource - Resource used to compute the route. Available values are in the GetCapabilities.\n * @param {Gp.Point} options.position - Start or Arrival (options.reverse===true) Point for the computing. Expressed in CRS:84 coordinates system (position.x corresponds to longitude, position.y corresponds to latitude).\n * @param {String} [options.graph = \"Voiture\"] - User profile to use to compute the isoCurve : \"Voiture\" (using a vehicule) or \"Pieton\" (pedestrian). Has an influence on the kind of roads to use and the average speed. Available values are in the GetCapabilities.\n * @param {Array.} [options.exclusions] - DEPRECATED: use options.constraints. Indicates if route has to avoid some features (\"toll\", \"bridge\" or \"tunnel\").\n * @param {Array.} [options.constraints] - Constraints used ({'constraintType':'banned','key':'ways_type','operator':'=','value':'autoroute'}). Available values are in the GetCapabilities.\n * @param {String} [options.method = \"time\"] - Computing method to use : \"time\" (using a duration as a constraint) or \"distance\" (using a distance as a constraint). Available values are in the GetCapabilities.\n * @param {Float} options.time - Maximum duration (expressed in seconds) to use when options.method is set to \"time\".\n * @param {Float} options.distance - Maximum distance (expressed in meters) to use when options.method is set to \"distance\".\n * @param {Boolean} [options.reverse = false] - Set this parameter to true if you want options.position to be the destination (instead of departure) for the computing.\n * @param {String} [options.distanceUnit = \"km\"] - The unit used to provide distances in the response (\"m\" or \"km\").\n * @param {String} [options.timeUnit = \"second\"] - The unit used to provide duration in the response (\"standard\", \"second\", \"minute\", \"hour\").\n * @param {Boolean} [options.smoothing = false] - DEPRECATED: Set this parameter to true if you want the resulting geometry to be smoothed.\n * @param {Boolean} [options.holes = false] - DEPRECATED: Set this parameter to true if you want the resulting geometry (polygon) to have holes if pertinent.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.IsoCurveResponse} object as a parameter except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.outputFormat='json'] - Output format (\"json\") to use for underlying webService. Only use if you know what you are doing.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/isochrone/isochrone.json] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {Boolean} [options.ssl = true] - Use of HTTPS or HTTP protocol to request the services. HTTPS by default (ssl=true).\n * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing.\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {String} [options.contentType=\"application/xml\"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n isoCurve : function (options) {\n var processIsoCurveService = new _ProcessIsoCurve_ProcessIsoCurve__WEBPACK_IMPORTED_MODULE_6__[\"default\"](options);\n processIsoCurveService.call();\n }\n};\n\n/**\n * Point object.\n *\n * @namespace\n * @alias Gp.Point\n *\n * @property {Float} x - Point abscissa\n * @property {Float} y - Point ordinate\n */\nvar point = {};\n\n/**\n * Circle object.\n *\n * @namespace\n * @alias Gp.Circle\n *\n * @property {Float} x - Circle center abscissa.\n * @property {Float} y - Circle center ordinate.\n * @property {Float} radius - Circle radius.\n */\nvar circle = {};\n\n/**\n * Bounding box object, expressed with four coordinates.\n *\n * @namespace\n * @alias Gp.BBox\n *\n * @property {Float} left - minimum abscissa\n * @property {Float} right - maximum abscissa\n * @property {Float} bottom - minimum ordinate\n * @property {Float} top - maximum ordinate\n */\nvar bbox = {};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Services);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL25vZGVfbW9kdWxlcy9nZW9wb3J0YWwtYWNjZXNzLWxpYi9zcmMvU2VydmljZXMvU2VydmljZXMuanM/YmMwOCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUEscUNBQXFDLDJDQUEyQzs7QUFFaEY7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ3FDO0FBQ047QUFDUztBQUNjO0FBQ0M7QUFDckI7QUFDOEI7O0FBRWhFO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxlQUFlLE9BQU87QUFDdEIsZUFBZSxPQUFPLHVHQUF1RztBQUM3SCxlQUFlLE9BQU87QUFDdEIsZUFBZSxTQUFTLHlGQUF5RixvQ0FBb0M7QUFDckosZUFBZSxTQUFTLDhIQUE4SCxlQUFlO0FBQ3JLLGVB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ICogQHByb3BlcnR5IHtGbG9hdH0geSAtIENpcmNsZSBjZW50ZXIgb3JkaW5hdGUuXG4gKiBAcHJvcGVydHkge0Zsb2F0fSByYWRpdXMgLSBDaXJjbGUgcmFkaXVzLlxuICovXG52YXIgY2lyY2xlID0ge307XG5cbi8qKlxuICogQm91bmRpbmcgYm94IG9iamVjdCwgZXhwcmVzc2VkIHdpdGggZm91ciBjb29yZGluYXRlcy5cbiAqXG4gKiBAbmFtZXNwYWNlXG4gKiBAYWxpYXMgR3AuQkJveFxuICpcbiAqIEBwcm9wZXJ0eSB7RmxvYXR9IGxlZnQgLSBtaW5pbXVtIGFic2Npc3NhXG4gKiBAcHJvcGVydHkge0Zsb2F0fSByaWdodCAtIG1heGltdW0gYWJzY2lzc2FcbiAqIEBwcm9wZXJ0eSB7RmxvYXR9IGJvdHRvbSAtIG1pbmltdW0gb3JkaW5hdGVcbiAqIEBwcm9wZXJ0eSB7RmxvYXR9IHRvcCAtIG1heGltdW0gb3JkaW5hdGVcbiAqL1xudmFyIGJib3ggPSB7fTtcblxuZXhwb3J0IGRlZmF1bHQgU2VydmljZXM7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Services.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Config_Config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Config/Config */ \"./node_modules/geoportal-access-lib/src/Services/Config/Config.js\");\n/* harmony import */ var _Alti_Alti__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Alti/Alti */ \"./node_modules/geoportal-access-lib/src/Services/Alti/Alti.js\");\n/* harmony import */ var _Geocode_Geocode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Geocode/Geocode */ \"./node_modules/geoportal-access-lib/src/Services/Geocode/Geocode.js\");\n/* harmony import */ var _Geocode_ReverseGeocode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Geocode/ReverseGeocode */ \"./node_modules/geoportal-access-lib/src/Services/Geocode/ReverseGeocode.js\");\n/* harmony import */ var _AutoComplete_AutoComplete__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./AutoComplete/AutoComplete */ \"./node_modules/geoportal-access-lib/src/Services/AutoComplete/AutoComplete.js\");\n/* harmony import */ var _Route_Route__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Route/Route */ \"./node_modules/geoportal-access-lib/src/Services/Route/Route.js\");\n/* harmony import */ var _ProcessIsoCurve_ProcessIsoCurve__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ProcessIsoCurve/ProcessIsoCurve */ \"./node_modules/geoportal-access-lib/src/Services/ProcessIsoCurve/ProcessIsoCurve.js\");\n/* eslint no-unused-vars: [\"error\", { \"varsIgnorePattern\": \"point|circle|bbox\" }] */\n\n/**\n* Geoportal web services invocation namespace.\n*\n* @module Services\n* @alias Gp.Services\n*/\n\n\n\n\n\n\n\n\nvar Services = {\n /**\n * Access to Geoportal resources metadata availables with one ore several keys\n *\n * @method getConfig\n * @param {Object} options - Options for function call.\n * @param {String} [options.apiKey] - Access key(s) (\",\" as separator, no spaces) to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}\n * @param {String} [options.customConfigFile] - path to a local config file. Overload the apiKey parameter\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.GetConfigResponse} object as a parameter except if \"rawResponse\" parameter is set to true : a String will be returned.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n */\n getConfig : function (options) {\n var configService = new _Config_Config__WEBPACK_IMPORTED_MODULE_0__[\"default\"](options);\n configService.call();\n },\n /**\n * Getting elevations in or along of one or several points on french territories using the [elevation services of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/alti.html}.
\n * Two use cases are availables :
\n * 1. getting elevations of the given points : don't use the options.sampling parameter ;
\n * 2. getting a regular set of elevations along the given points : use the options.sampling parameter.\n *\n * @method getAltitude\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}.\n * @param {Array.} options.positions - Array of positions ({lon:float, lat:float}) expressed in CRS:84 coordinates system, where to get elevations. 50 positions maximum may be given. 2 positions minimum are required if you use the options.sampling parameter.\n * @param {Number} [options.sampling] - Number of points to use (between 2 and 5000) in order to compute an elevation path. The points given with the options.positions parameter are used to fix the planimetric path along which the elevations will be computed.
\n * If not used, only elevations of these positions will be returned.\n * @param {Boolean} [options.zonly=false] - Set this parameter to true if you only want to have elevations returned without corresponding coordinates.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.AltiResponse} object as a parameter, except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/alti/rest/elevation.json] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {Boolean} [options.ssl = true] - Use of HTTPS or HTTP protocol to request the services. HTTPS by default (ssl=true).\n * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing.\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {String} [options.contentType=\"application/xml\"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n * @param {String} [options.api='REST'] - What API to use for interacting with underlying web service : 'REST'. Only use if you know what you are doing.\n * @param {String} [options.outputFormat='xml'] - Output format for underlying web service response : 'xml' or 'json'. Only use if you know what you are doing.\n */\n getAltitude : function (options) {\n var altiService = new _Alti_Alti__WEBPACK_IMPORTED_MODULE_1__[\"default\"](options);\n altiService.call();\n },\n /**\n * Getting positon of a geographic identifier (places names, address, cadastral parcel, other...) using the [geocoding web service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/geocodage.html}.\n *\n * @example\n * Gp.Services.geocode ({\n * apiKey : \"carte\",\n * location : \"73 avenue de Paris, Saint-Mandé\",\n * // traitement des resultats\n * onSuccess : function (result) {\n * console.log(\"found (x:\"+result.position.x+\", y:\"+result.position.y+\")\") ;\n * }\n * }) ;\n *\n *\n * @method geocode\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}.\n * @param {String} [options.index=\"StreetAddress\"] - Geographical identifier type to search. Values currently availables are : \"PositionOfInterest\" for place names, \"StreetAddress\" for address search, \"CadastralParcel\" for Cadastral parcels search, \"location\" for a multi-index search on \"StreetAddress\" and \"PositionOfInterest\". Default is \"StreetAddress\".\n * @param {String} options.query - Geographic identifier to locate.\n * @param {Object} [options.filters] - Additional filters to apply to search. The following properties may be given.\n * @param {String} [options.filters.[prop]] - Additionnal properties to filter search. Properties depends on options.index, and values type should be \"String\".\n *

\n * Properties availables for address search :
\n * \"postalCode\", \"inseeCode\" and \"city\".\n *

\n * Properties availables for place names search :
\n * \"postalCode\", \"inseeCode\" and \"type\".\n *

\n * Properties availables for cadastral parcels search :
\n * \"codeDepartement\", \"codeCommune\", \"nomCommune\", \"codeCommuneAbs\", \"codeArrondissement\", \"section\", \"numero\", \"feuille\".\n * @param {Number} [options.maximumResponses=20] - Maximum number of responses. Default underlying service value applies (20) if not provided.\n * @param {Boolean} [options.returnTrueGeometry=false] - Set this parameter to true if you wish to have the true geometrie returned.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.GeocodeResponse} object as a parameter except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/geoportail/ols] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {Boolean} [options.ssl = true] - Use of HTTPS or HTTP protocol to request the services. HTTPS by default (ssl=true).\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n geocode : function (options) {\n var geocodeService = new _Geocode_Geocode__WEBPACK_IMPORTED_MODULE_2__[\"default\"](options);\n geocodeService.call();\n },\n /**\n * Retrieving geographical identifiers (place names, address, cadastral parcels, ...) near a given position, using the [reverse geocoding web service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/geocodage-inverse.html}.\n *\n * @method reverseGeocode\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}.\n * @param {String} [options.index=\"StreetAddress\"] - Geographical identifier type to search. Values currently availables are : \"PositionOfInterest\" for place names, \"StreetAddress\" for address search, \"CadastralParcel\" for Cadastral parcels search, \"location\" for a multi-index search on \"StreetAddress\" and \"PositionOfInterest\". Default is \"StreetAddress\".\n * @param {Object} options.position - Reference position where to search geographical identifiers.\n * @param {Float} options.position.lon - Longitude\n * @param {Float} options.position.lat - Latitude\n * @param {Object} [options.filters] - Additional filters to apply to search. The following properties may be given.\n * @param {String} [options.filters.[prop]] - Additionnal properties to filter search. Properties depends on options.index, and values type should be \"String\".\n *

\n * Properties availables for address search :
\n * \"postalCode\", \"inseeCode\" and \"city\".\n *

\n * Properties availables for place names search :
\n * \"postalCode\", \"inseeCode\" and \"type\".\n *

\n * Properties availables for cadastral parcels search :
\n * \"codeDepartement\", \"codeCommune\", \"nomCommune\", \"codeCommuneAbs\", \"codeArrondissement\", \"section\", \"numero\", \"feuille\".\n * @param {Object} [options.searchGeometry] - Location where to perform the search.\n * @param {String} options.searchGeometry.type - Geometry type (Point|Circle|Linestring|Polygon)\n * @param {Array.|Array.Array.} options.searchGeometry.coordinates - Coordinates\n * @param {Float} [options.searchGeometry.radius] - Radius (only for type 'Circle')\n * @param {Number} [options.maximumResponses=20] - Maximum number of responses. Default underlying service value applies (20) if not provided.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.GeocodeResponse} object as a parameter except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/geoportail/ols] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {Boolean} [options.ssl = true] - Use of HTTPS or HTTP protocol to request the services. HTTPS by default (ssl=true).\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n reverseGeocode : function (options) {\n var reverseGeocodeService = new _Geocode_ReverseGeocode__WEBPACK_IMPORTED_MODULE_3__[\"default\"](options);\n reverseGeocodeService.call();\n },\n /**\n * Getting suggestions of probable places names or address based on uncomplete texts, using the [autocompletion service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/autocompletion.html}\n *\n * @method autoComplete\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}.\n * @param {String} options.text - Text input to complete.\n * @param {Array.} [options.filterOptions.type = \"StreetAddress\"] - Suggestion types to provide : address (\"StreetAddress\") and/or place name (\"PositionOfInterest\").\n * @param {Array.} [options.filterOptions.territory] - Places where to limit the search of suggestions : \"METROPOLE\" (Corsica and metropolitan France), \"DOMTOM\" (French overseas departments and territories), or an INSEE code of a department. No limitation by default. For instance : ['METROPOLE', '31']\n * @param {Number} [options.maximumResponses = 10] - Maximum number of responses.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.AutoCompleteResponse} object as a parameter except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/ols/apis/completion] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {Boolean} [options.ssl = true] - Use of HTTPS or HTTP protocol to request the services. HTTPS by default (ssl=true).\n * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing.\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {String} [options.contentType=\"application/xml\"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n autoComplete : function (options) {\n var autoCompleteService = new _AutoComplete_AutoComplete__WEBPACK_IMPORTED_MODULE_4__[\"default\"](options);\n autoCompleteService.call();\n },\n /**\n * Getting a route from one point to another using the [route service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/itineraires.html}.\n *\n * @method route\n * @param {Object} options - Options for function call.\n * @param {String} options.resource - Resource used to compute the route. Available values are in the GetCapabilities.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}.\n * @param {String} [options.routePreference = \"fastest\"] - Indicates the way to compute the route : \"fastest\" (time optimisation) or \"shortest\" (distance optimisation). Available values are in the GetCapabilities.\n * @param {Gp.Point} options.startPoint - Start point of the route. Expressed in CRS:84 coordinates system (startPoint.x corresponds to longitude, startPoint.y corresponds to latitude). Available bbox are in the GetCapabilities.\n * @param {Gp.Point} options.endPoint - End point of the route. Expressed in CRS:84 coordinates system (endPoint.x corresponds to longitude, endPoint.y corresponds to latitude). Available bbox are in the GetCapabilities.\n * @param {Array.} [options.viaPoints] - Ordered via Points of the route. Expressed in CRS:84 coordinates system (viaPoints[i].x corresponds to longitude, viaPoints[i].y corresponds to latitude). Available bbox are in the GetCapabilities.\n * @param {String} [options.graph = \"Voiture\"] - User profile to use to compute the route : \"Voiture\" (using a vehicule) or \"Pieton\" (pedestrian). Has an influence on the kind of roads the route may use and the average speed. Available bbox are in the GetCapabilities.\n * @param {Array.} [options.exclusions] - DEPRECATED: use options.constraints. Indicates if route has to avoid some features (\"toll\", \"bridge\" or \"tunnel\").\n * @param {Boolean} [options.geometryInInstructions = false] - Indicates if route geometry has to be also returned with route instructions.\n * @param {Boolean} [options.provideBoundingBox = true] - Indicates if route instructions has to be localised with a BBOX in the response.\n * @param {String} [options.distanceUnit = \"m\"] - The unit used to provide distances in the response (\"meter\" or \"kilometer\").\n * @param {String} [options.timeUnit = \"second\"] - The unit used to provide duration in the response (\"standard\", \"second\", \"minute\", \"hour\").\n * @param {Array.} [options.waysAttributes] - Way Attributes to add in the response. Available values are in the GetCapabilities.\n * @param {Array.} [options.constraints] - Constraints used ({'constraintType':'banned','key':'ways_type','operator':'=','value':'autoroute'}). Available values are in the GetCapabilities.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.RouteResponse} object as a parameter except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.outputFormat='json'] - Output format (\"json\" or \"xml\") to use for underlying webService. Only use if you know what you are doing.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/itineraire/rest/route.json] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {Boolean} [options.ssl = true] - Use of HTTPS or HTTP protocol to request the services. HTTPS by default (ssl=true).\n * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing.\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {String} [options.contentType=\"application/xml\"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n route : function (options) {\n var routeService = new _Route_Route__WEBPACK_IMPORTED_MODULE_5__[\"default\"](options);\n routeService.call();\n },\n /**\n * Computing a set of places (curve) reachable from a given point (or from where to start to reach a given point) within a time or distance constraint using the [isochrone service of the Geoportal Platform]{@link https://geoservices.ign.fr/documentation/geoservices/isochrones.html}.\n *\n * @method isoCurve\n * @param {Object} options - Options for function call.\n * @param {String} options.apiKey - Access key to Geoportal platform, obtained [here]{@link https://geoservices.ign.fr/services-web}.\n * @param {String} options.resource - Resource used to compute the route. Available values are in the GetCapabilities.\n * @param {Gp.Point} options.position - Start or Arrival (options.reverse===true) Point for the computing. Expressed in CRS:84 coordinates system (position.x corresponds to longitude, position.y corresponds to latitude).\n * @param {String} [options.graph = \"Voiture\"] - User profile to use to compute the isoCurve : \"Voiture\" (using a vehicule) or \"Pieton\" (pedestrian). Has an influence on the kind of roads to use and the average speed. Available values are in the GetCapabilities.\n * @param {Array.} [options.exclusions] - DEPRECATED: use options.constraints. Indicates if route has to avoid some features (\"toll\", \"bridge\" or \"tunnel\").\n * @param {Array.} [options.constraints] - Constraints used ({'constraintType':'banned','key':'ways_type','operator':'=','value':'autoroute'}). Available values are in the GetCapabilities.\n * @param {String} [options.method = \"time\"] - Computing method to use : \"time\" (using a duration as a constraint) or \"distance\" (using a distance as a constraint). Available values are in the GetCapabilities.\n * @param {Float} options.time - Maximum duration (expressed in seconds) to use when options.method is set to \"time\".\n * @param {Float} options.distance - Maximum distance (expressed in meters) to use when options.method is set to \"distance\".\n * @param {Boolean} [options.reverse = false] - Set this parameter to true if you want options.position to be the destination (instead of departure) for the computing.\n * @param {String} [options.distanceUnit = \"km\"] - The unit used to provide distances in the response (\"m\" or \"km\").\n * @param {String} [options.timeUnit = \"second\"] - The unit used to provide duration in the response (\"standard\", \"second\", \"minute\", \"hour\").\n * @param {Boolean} [options.smoothing = false] - DEPRECATED: Set this parameter to true if you want the resulting geometry to be smoothed.\n * @param {Boolean} [options.holes = false] - DEPRECATED: Set this parameter to true if you want the resulting geometry (polygon) to have holes if pertinent.\n * @param {Function} options.onSuccess - Callback function for getting successful service response. Takes a {@link Gp.Services.IsoCurveResponse} object as a parameter except if \"rawResponse\" is set to true.\n * @param {Function} [options.onFailure] - Callback function for handling unsuccessful service responses (timeOut, missing rights, ...). Takes a {@link Gp.Error} object as parameter.\n * @param {Number} [options.timeOut=0] - Number of milliseconds above which a timeOut response will be returned with onFailure callback (see above). Default value is 0 which means timeOut will not be handled.\n * @param {String} [options.outputFormat='json'] - Output format (\"json\") to use for underlying webService. Only use if you know what you are doing.\n * @param {String} [options.serverUrl=http (s)://wxs.ign.fr/APIKEY/isochrone/isochrone.json] - Web service URL. If used, options.apiKey parameter is ignored. Only use if you know what you're doing.\n * @param {Boolean} [options.ssl = true] - Use of HTTPS or HTTP protocol to request the services. HTTPS by default (ssl=true).\n * @param {String} [options.protocol=XHR] - Protocol used to handle dialog with web service. Possible values are 'JSONP' ({@link https://en.wikipedia.org/wiki/JSONP}) and 'XHR' ({@link https://en.wikipedia.org/wiki/XMLHttpRequest}). Only XHR protocol is supported in a NodeJS environment. Only use if you know what you're doing.\n * @param {String} [options.proxyURL] - Proxy URL to use when requesting underlying web service. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you're doing.\n * @param {String} [options.callbackSuffix] - Callback function name suffix to use in case of a JSONP protocol use (see above), to set your own suffix instead of auto-increment. Ignored when options.protocol is set to 'XHR' value. Only use if you know what you're doing.\n * @param {String} [options.httpMethod=GET] - HTTP method to use when requesting underlying web service in case of a XHR protocol use (see above). Possible values are 'GET' and 'POST'. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {String} [options.contentType=\"application/xml\"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing.\n * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing.\n * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing.\n */\n isoCurve : function (options) {\n var processIsoCurveService = new _ProcessIsoCurve_ProcessIsoCurve__WEBPACK_IMPORTED_MODULE_6__[\"default\"](options);\n processIsoCurveService.call();\n }\n};\n\n/**\n * Point object.\n *\n * @namespace\n * @alias Gp.Point\n *\n * @property {Float} x - Point abscissa\n * @property {Float} y - Point ordinate\n */\nvar point = {};\n\n/**\n * Circle object.\n *\n * @namespace\n * @alias Gp.Circle\n *\n * @property {Float} x - Circle center abscissa.\n * @property {Float} y - Circle center ordinate.\n * @property {Float} radius - Circle radius.\n */\nvar circle = {};\n\n/**\n * Bounding box object, expressed with four coordinates.\n *\n * @namespace\n * @alias Gp.BBox\n *\n * @property {Float} left - minimum abscissa\n * @property {Float} right - maximum abscissa\n * @property {Float} bottom - minimum ordinate\n * @property {Float} top - maximum ordinate\n */\nvar bbox = {};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Services);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIj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qL1xudmFyIGJib3ggPSB7fTtcblxuZXhwb3J0IGRlZmF1bHQgU2VydmljZXM7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/geoportal-access-lib/src/Services/Services.js\n"); /***/ }), @@ -1402,7 +1414,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /*! exports provided: name, description, version, date, leafletExtName, leafletExtVersion, olExtName, olExtVersion, itownsExtName, itownsExtVersion, main, types, module, directories, scripts, repository, author, keywords, license, bugs, homepage, dependencies, devDependencies, default */ /***/ (function(module) { -eval("module.exports = JSON.parse(\"{\\\"name\\\":\\\"geoportal-extensions\\\",\\\"description\\\":\\\"French Geoportal Extensions for OpenLayers, Leaflet and iTowns libraries\\\",\\\"version\\\":\\\"2.8.5\\\",\\\"date\\\":\\\"28/08/2023\\\",\\\"leafletExtName\\\":\\\"French Geoportal Extension for Leaflet\\\",\\\"leafletExtVersion\\\":\\\"2.3.3\\\",\\\"olExtName\\\":\\\"French Geoportal Extension for OpenLayers\\\",\\\"olExtVersion\\\":\\\"3.3.4\\\",\\\"itownsExtName\\\":\\\"French Geoportal Extension for Itowns\\\",\\\"itownsExtVersion\\\":\\\"2.4.3\\\",\\\"main\\\":\\\"dist/leaflet/GpPluginLeaflet.js, dist/openlayers/GpPluginOpenLayers.js, dist/itowns/GpPluginItowns.js\\\",\\\"types\\\":\\\"dist/leaflet/index.d.ts, dist/openlayers/index.d.ts, dist/itowns/index.d.ts\\\",\\\"module\\\":\\\"src/Leaflet/index.js, src/OpenLayers/index.js, src/Itowns/index.js\\\",\\\"directories\\\":{},\\\"scripts\\\":{\\\"setup\\\":\\\"npm install\\\",\\\"clean\\\":\\\"echo \\\\\\\"Warning: target not yet implemented!\\\\\\\" && exit 0\\\",\\\"eslint\\\":\\\"eslint src/\\\",\\\"test\\\":\\\"npm run test:serve\\\",\\\"test:serve\\\":\\\"cd test && webpack-dev-server --hot --config webpack.test.serve.js\\\",\\\"sample\\\":\\\"npm run sample:serve\\\",\\\"sample:serve\\\":\\\"npm run sample:ol:serve\\\",\\\"sample:itowns:serve\\\":\\\"webpack-dev-server --config build/webpack/webpack.config.itowns --mode=development --https --open-page samples/index-itowns-map.html --content-base . --output-public-path '/dist/itowns/' --port 9001 --open\\\",\\\"sample:leaflet:serve\\\":\\\"webpack-dev-server --config build/webpack/webpack.config.leaflet --mode=development --https --open-page samples/index-leaflet-map.html --content-base . --output-public-path '/dist/leaflet/' --port 9001 --open\\\",\\\"sample:ol:serve\\\":\\\"webpack-dev-server --config build/webpack/webpack.config.openlayers --mode=development --https --open-page samples/index-openlayers-map.html --content-base . --output-public-path '/dist/openlayers/' --port 9001 --open\\\",\\\"generate-types:ol\\\":\\\"npx tsc -p build/types/tsconfig-openlayers.json\\\",\\\"generate-types:leaflet\\\":\\\"npx tsc -p build/types/tsconfig-leaflet.json\\\",\\\"generate-types:itowns\\\":\\\"npx tsc -p build/types/tsconfig-itowns.json\\\",\\\"generate-jsdoc:ol\\\":\\\"jsdoc -c build/jsdoc/jsdoc-openlayers.json\\\",\\\"generate-jsdoc:leaflet\\\":\\\"jsdoc -c build/jsdoc/jsdoc-leaflet.json\\\",\\\"generate-jsdoc:itowns\\\":\\\"jsdoc -c build/jsdoc/jsdoc-itowns.json\\\",\\\"doc\\\":\\\"npm run doc:serve\\\",\\\"doc:serve\\\":\\\"npm run doc:ol:serve\\\",\\\"doc:itowns:serve\\\":\\\"webpack-dev-server --hot --config build/webpack/webpack.config.itowns --content-base jsdoc/itowns --port 9001 --open\\\",\\\"doc:leaflet:serve\\\":\\\"webpack-dev-server --hot --config build/webpack/webpack.config.leaflet --content-base jsdoc/leaflet --port 9001 --open\\\",\\\"doc:ol:serve\\\":\\\"webpack-dev-server --hot --config build/webpack/webpack.config.openlayers --content-base jsdoc/openlayers --port 9001 --open\\\",\\\"build:dev\\\":\\\"npm-run-all --print-label --print-name build:*:dev\\\",\\\"build:prod\\\":\\\"npm-run-all --print-label --print-name build:*:prod\\\",\\\"build:src\\\":\\\"npm-run-all --print-label --print-name build:*:src\\\",\\\"build\\\":\\\"npm-run-all --print-label --print-name build:*:*\\\",\\\"build:itowns\\\":\\\"npm-run-all --print-label --print-name build:itowns:*\\\",\\\"build:itowns:dev\\\":\\\"webpack --config build/webpack/webpack.config.itowns --mode=development\\\",\\\"build:itowns:prod\\\":\\\"webpack --config build/webpack/webpack.config.itowns --mode=production\\\",\\\"build:itowns:src\\\":\\\"webpack --config build/webpack/webpack.config.itowns --mode=none\\\",\\\"build:ol\\\":\\\"npm-run-all --print-label --print-name build:ol:*\\\",\\\"build:ol:dev\\\":\\\"webpack --config build/webpack/webpack.config.openlayers --mode=development\\\",\\\"build:ol:prod\\\":\\\"webpack --config build/webpack/webpack.config.openlayers --mode=production\\\",\\\"build:ol:src\\\":\\\"webpack --config build/webpack/webpack.config.openlayers --mode=none\\\",\\\"build:leaflet\\\":\\\"npm-run-all --print-label --print-name build:leaflet:*\\\",\\\"build:leaflet:dev\\\":\\\"webpack --config build/webpack/webpack.config.leaflet --mode=development\\\",\\\"build:leaflet:prod\\\":\\\"webpack --config build/webpack/webpack.config.leaflet --mode=production\\\",\\\"build:leaflet:src\\\":\\\"webpack --config build/webpack/webpack.config.leaflet --mode=none\\\"},\\\"repository\\\":{\\\"type\\\":\\\"git\\\",\\\"url\\\":\\\"https://github.com/IGNF/geoportal-extensions.git\\\"},\\\"author\\\":\\\"IGNF\\\",\\\"keywords\\\":[\\\"geoportail\\\",\\\"javascript\\\",\\\"OpenLayers\\\",\\\"Leaflet\\\",\\\"Itowns\\\",\\\"3D\\\"],\\\"license\\\":\\\"CECILL-B\\\",\\\"bugs\\\":{\\\"url\\\":\\\"https://github.com/IGNF/geoportal-extensions/issues\\\"},\\\"homepage\\\":\\\"https://github.com/IGNF/geoportal-extensions#readme\\\",\\\"dependencies\\\":{\\\"@mapbox/mapbox-gl-style-spec\\\":\\\"13.20.1\\\",\\\"eventbusjs\\\":\\\"0.2.0\\\",\\\"geoportal-access-lib\\\":\\\"3.3.3\\\",\\\"itowns\\\":\\\"2.38.2\\\",\\\"leaflet\\\":\\\"1.7.1\\\",\\\"leaflet-draw\\\":\\\"1.0.4\\\",\\\"loglevel\\\":\\\"^1.6.7\\\",\\\"markdown-toc\\\":\\\"^1.2.0\\\",\\\"ol\\\":\\\"6.9.0\\\",\\\"ol-mapbox-style\\\":\\\"6.7.0\\\",\\\"proj4\\\":\\\"2.7.5\\\",\\\"proj4leaflet\\\":\\\"1.0.2\\\",\\\"sortablejs\\\":\\\"1.14.0\\\",\\\"three\\\":\\\"0.137.5\\\",\\\"typescript\\\":\\\"^4.5.5\\\",\\\"whatwg-fetch\\\":\\\"3.0.0\\\"},\\\"devDependencies\\\":{\\\"@babel/core\\\":\\\"^7.4.4\\\",\\\"@babel/plugin-transform-template-literals\\\":\\\"^7.7.4\\\",\\\"@babel/preset-env\\\":\\\"^7.4.4\\\",\\\"babel-loader\\\":\\\"^8.0.5\\\",\\\"chai\\\":\\\"^4.2.0\\\",\\\"chalk\\\":\\\"^4.0.0\\\",\\\"clean-webpack-plugin\\\":\\\"^3.0.0\\\",\\\"copy-webpack-plugin\\\":\\\"^5.0.3\\\",\\\"core-js\\\":\\\"^3.6.4\\\",\\\"css-loader\\\":\\\"^3.4.2\\\",\\\"eslint\\\":\\\"^6.8.0\\\",\\\"eslint-config-standard\\\":\\\"^14.1.1\\\",\\\"eslint-loader\\\":\\\"^4.0.0\\\",\\\"eslint-plugin-import\\\":\\\"^2.17.2\\\",\\\"eslint-plugin-node\\\":\\\"^11.1.0\\\",\\\"eslint-plugin-promise\\\":\\\"^4.1.1\\\",\\\"eslint-plugin-standard\\\":\\\"^4.0.0\\\",\\\"exports-loader\\\":\\\"^0.7.0\\\",\\\"expose-loader\\\":\\\"^0.7.5\\\",\\\"fs-extra\\\":\\\"^9.0.0\\\",\\\"handlebars\\\":\\\"^4.7.5\\\",\\\"handlebars-layouts\\\":\\\"^3.1.4\\\",\\\"html-webpack-plugin\\\":\\\"^4.0.4\\\",\\\"jsdoc-webpack-plugin\\\":\\\"^0.3.0\\\",\\\"mini-css-extract-plugin\\\":\\\"^0.9.0\\\",\\\"mocha\\\":\\\"^7.1.1\\\",\\\"mocha-loader\\\":\\\"^5.0.0\\\",\\\"npm-run-all\\\":\\\"^4.1.5\\\",\\\"optimize-css-assets-webpack-plugin\\\":\\\"^5.0.1\\\",\\\"path\\\":\\\"^0.12.7\\\",\\\"replace-bundle-webpack-plugin\\\":\\\"^1.0.0\\\",\\\"requirejs\\\":\\\"^2.3.6\\\",\\\"responsive-loader\\\":\\\"^1.2.0\\\",\\\"speed-measure-webpack-plugin\\\":\\\"^1.3.0\\\",\\\"string-template\\\":\\\"^1.0.0\\\",\\\"style-loader\\\":\\\"^1.1.3\\\",\\\"terser-webpack-plugin\\\":\\\"^2.0.0\\\",\\\"url-loader\\\":\\\"^4.0.0\\\",\\\"webpack\\\":\\\"^4.30.0\\\",\\\"webpack-cli\\\":\\\"^3.3.1\\\",\\\"webpack-dev-server\\\":\\\"^3.3.1\\\",\\\"webpack-node-externals\\\":\\\"^1.7.2\\\"}}\");//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiIuL3BhY2thZ2UuanNvbi5qcyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./package.json\n"); +eval("module.exports = JSON.parse(\"{\\\"name\\\":\\\"geoportal-extensions\\\",\\\"description\\\":\\\"French Geoportal Extensions for OpenLayers, Leaflet and iTowns libraries\\\",\\\"version\\\":\\\"2.9.0\\\",\\\"date\\\":\\\"21/09/2023\\\",\\\"leafletExtName\\\":\\\"French Geoportal Extension for Leaflet\\\",\\\"leafletExtVersion\\\":\\\"2.4.0-beta\\\",\\\"olExtName\\\":\\\"French Geoportal Extension for OpenLayers\\\",\\\"olExtVersion\\\":\\\"3.4.0-beta\\\",\\\"itownsExtName\\\":\\\"French Geoportal Extension for Itowns\\\",\\\"itownsExtVersion\\\":\\\"2.4.3\\\",\\\"main\\\":\\\"dist/leaflet/GpPluginLeaflet.js, dist/openlayers/GpPluginOpenLayers.js, dist/itowns/GpPluginItowns.js\\\",\\\"types\\\":\\\"dist/leaflet/index.d.ts, dist/openlayers/index.d.ts, dist/itowns/index.d.ts\\\",\\\"module\\\":\\\"src/Leaflet/index.js, src/OpenLayers/index.js, src/Itowns/index.js\\\",\\\"directories\\\":{},\\\"scripts\\\":{\\\"setup\\\":\\\"npm install\\\",\\\"clean\\\":\\\"echo \\\\\\\"Warning: target not yet implemented!\\\\\\\" && exit 0\\\",\\\"eslint\\\":\\\"eslint src/\\\",\\\"test\\\":\\\"npm run test:serve\\\",\\\"test:serve\\\":\\\"cd test && webpack-dev-server --hot --config webpack.test.serve.js\\\",\\\"sample\\\":\\\"npm run sample:serve\\\",\\\"sample:serve\\\":\\\"npm run sample:ol:serve\\\",\\\"sample:itowns:serve\\\":\\\"webpack-dev-server --config build/webpack/webpack.config.itowns --mode=development --https --open-page samples/index-itowns-map.html --content-base . --output-public-path '/dist/itowns/' --port 9001 --open\\\",\\\"sample:leaflet:serve\\\":\\\"webpack-dev-server --config build/webpack/webpack.config.leaflet --mode=development --https --open-page samples/index-leaflet-map.html --content-base . --output-public-path '/dist/leaflet/' --port 9001 --open\\\",\\\"sample:ol:serve\\\":\\\"webpack-dev-server --config build/webpack/webpack.config.openlayers --mode=development --https --open-page samples/index-openlayers-map.html --content-base . --output-public-path '/dist/openlayers/' --port 9001 --open\\\",\\\"generate-types:ol\\\":\\\"npx tsc -p build/types/tsconfig-openlayers.json\\\",\\\"generate-types:leaflet\\\":\\\"npx tsc -p build/types/tsconfig-leaflet.json\\\",\\\"generate-types:itowns\\\":\\\"npx tsc -p build/types/tsconfig-itowns.json\\\",\\\"generate-jsdoc:ol\\\":\\\"jsdoc -c build/jsdoc/jsdoc-openlayers.json\\\",\\\"generate-jsdoc:leaflet\\\":\\\"jsdoc -c build/jsdoc/jsdoc-leaflet.json\\\",\\\"generate-jsdoc:itowns\\\":\\\"jsdoc -c build/jsdoc/jsdoc-itowns.json\\\",\\\"doc\\\":\\\"npm run doc:serve\\\",\\\"doc:serve\\\":\\\"npm run doc:ol:serve\\\",\\\"doc:itowns:serve\\\":\\\"webpack-dev-server --hot --config build/webpack/webpack.config.itowns --content-base jsdoc/itowns --port 9001 --open\\\",\\\"doc:leaflet:serve\\\":\\\"webpack-dev-server --hot --config build/webpack/webpack.config.leaflet --content-base jsdoc/leaflet --port 9001 --open\\\",\\\"doc:ol:serve\\\":\\\"webpack-dev-server --hot --config build/webpack/webpack.config.openlayers --content-base jsdoc/openlayers --port 9001 --open\\\",\\\"build:dev\\\":\\\"npm-run-all --print-label --print-name build:*:dev\\\",\\\"build:prod\\\":\\\"npm-run-all --print-label --print-name build:*:prod\\\",\\\"build:src\\\":\\\"npm-run-all --print-label --print-name build:*:src\\\",\\\"build\\\":\\\"npm-run-all --print-label --print-name build:*:*\\\",\\\"build:itowns\\\":\\\"npm-run-all --print-label --print-name build:itowns:*\\\",\\\"build:itowns:dev\\\":\\\"webpack --config build/webpack/webpack.config.itowns --mode=development\\\",\\\"build:itowns:prod\\\":\\\"webpack --config build/webpack/webpack.config.itowns --mode=production\\\",\\\"build:itowns:src\\\":\\\"webpack --config build/webpack/webpack.config.itowns --mode=none\\\",\\\"build:ol\\\":\\\"npm-run-all --print-label --print-name build:ol:*\\\",\\\"build:ol:dev\\\":\\\"webpack --config build/webpack/webpack.config.openlayers --mode=development\\\",\\\"build:ol:prod\\\":\\\"webpack --config build/webpack/webpack.config.openlayers --mode=production\\\",\\\"build:ol:src\\\":\\\"webpack --config build/webpack/webpack.config.openlayers --mode=none\\\",\\\"build:leaflet\\\":\\\"npm-run-all --print-label --print-name build:leaflet:*\\\",\\\"build:leaflet:dev\\\":\\\"webpack --config build/webpack/webpack.config.leaflet --mode=development\\\",\\\"build:leaflet:prod\\\":\\\"webpack --config build/webpack/webpack.config.leaflet --mode=production\\\",\\\"build:leaflet:src\\\":\\\"webpack --config build/webpack/webpack.config.leaflet --mode=none\\\"},\\\"repository\\\":{\\\"type\\\":\\\"git\\\",\\\"url\\\":\\\"https://github.com/IGNF/geoportal-extensions.git\\\"},\\\"author\\\":\\\"IGNF\\\",\\\"keywords\\\":[\\\"geoportail\\\",\\\"javascript\\\",\\\"OpenLayers\\\",\\\"Leaflet\\\",\\\"Itowns\\\",\\\"3D\\\"],\\\"license\\\":\\\"CECILL-B\\\",\\\"bugs\\\":{\\\"url\\\":\\\"https://github.com/IGNF/geoportal-extensions/issues\\\"},\\\"homepage\\\":\\\"https://github.com/IGNF/geoportal-extensions#readme\\\",\\\"dependencies\\\":{\\\"@mapbox/mapbox-gl-style-spec\\\":\\\"13.20.1\\\",\\\"eventbusjs\\\":\\\"0.2.0\\\",\\\"geoportal-access-lib\\\":\\\"https://raw.githubusercontent.com/IGNF/geoportal-access-lib/release-3.4.0-beta/geoportal-access-lib-3.4.0-beta.tgz\\\",\\\"itowns\\\":\\\"2.38.2\\\",\\\"leaflet\\\":\\\"1.7.1\\\",\\\"leaflet-draw\\\":\\\"1.0.4\\\",\\\"loglevel\\\":\\\"^1.6.7\\\",\\\"markdown-toc\\\":\\\"^1.2.0\\\",\\\"ol\\\":\\\"6.9.0\\\",\\\"ol-mapbox-style\\\":\\\"6.7.0\\\",\\\"proj4\\\":\\\"2.7.5\\\",\\\"proj4leaflet\\\":\\\"1.0.2\\\",\\\"sortablejs\\\":\\\"1.14.0\\\",\\\"three\\\":\\\"0.137.5\\\",\\\"typescript\\\":\\\"^4.5.5\\\",\\\"whatwg-fetch\\\":\\\"3.0.0\\\"},\\\"devDependencies\\\":{\\\"@babel/core\\\":\\\"^7.4.4\\\",\\\"@babel/plugin-transform-template-literals\\\":\\\"^7.7.4\\\",\\\"@babel/preset-env\\\":\\\"^7.4.4\\\",\\\"babel-loader\\\":\\\"^8.0.5\\\",\\\"chai\\\":\\\"^4.2.0\\\",\\\"chalk\\\":\\\"^4.0.0\\\",\\\"clean-webpack-plugin\\\":\\\"^3.0.0\\\",\\\"copy-webpack-plugin\\\":\\\"^5.0.3\\\",\\\"core-js\\\":\\\"^3.6.4\\\",\\\"css-loader\\\":\\\"^3.4.2\\\",\\\"eslint\\\":\\\"^6.8.0\\\",\\\"eslint-config-standard\\\":\\\"^14.1.1\\\",\\\"eslint-loader\\\":\\\"^4.0.0\\\",\\\"eslint-plugin-import\\\":\\\"^2.17.2\\\",\\\"eslint-plugin-node\\\":\\\"^11.1.0\\\",\\\"eslint-plugin-promise\\\":\\\"^4.1.1\\\",\\\"eslint-plugin-standard\\\":\\\"^4.0.0\\\",\\\"exports-loader\\\":\\\"^0.7.0\\\",\\\"expose-loader\\\":\\\"^0.7.5\\\",\\\"fs-extra\\\":\\\"^9.0.0\\\",\\\"handlebars\\\":\\\"^4.7.5\\\",\\\"handlebars-layouts\\\":\\\"^3.1.4\\\",\\\"html-webpack-plugin\\\":\\\"^4.0.4\\\",\\\"jsdoc-webpack-plugin\\\":\\\"^0.3.0\\\",\\\"mini-css-extract-plugin\\\":\\\"^0.9.0\\\",\\\"mocha\\\":\\\"^7.1.1\\\",\\\"mocha-loader\\\":\\\"^5.0.0\\\",\\\"npm-run-all\\\":\\\"^4.1.5\\\",\\\"optimize-css-assets-webpack-plugin\\\":\\\"^5.0.1\\\",\\\"path\\\":\\\"^0.12.7\\\",\\\"replace-bundle-webpack-plugin\\\":\\\"^1.0.0\\\",\\\"requirejs\\\":\\\"^2.3.6\\\",\\\"responsive-loader\\\":\\\"^1.2.0\\\",\\\"speed-measure-webpack-plugin\\\":\\\"^1.3.0\\\",\\\"string-template\\\":\\\"^1.0.0\\\",\\\"style-loader\\\":\\\"^1.1.3\\\",\\\"terser-webpack-plugin\\\":\\\"^2.0.0\\\",\\\"url-loader\\\":\\\"^4.0.0\\\",\\\"webpack\\\":\\\"^4.30.0\\\",\\\"webpack-cli\\\":\\\"^3.3.1\\\",\\\"webpack-dev-server\\\":\\\"^3.3.1\\\",\\\"webpack-node-externals\\\":\\\"^1.7.2\\\"}}\");//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiIuL3BhY2thZ2UuanNvbi5qcyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./package.json\n"); /***/ }), @@ -2421,7 +2433,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CSS /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CSS_Controls_Isochrone_GPisochronOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../CSS/Controls/Isochrone/GPisochronOpenLayers.css */ \"./src/OpenLayers/CSS/Controls/Isochrone/GPisochronOpenLayers.css\");\n/* harmony import */ var _CSS_Controls_Isochrone_GPisochronOpenLayers_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_Isochrone_GPisochronOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ol/control/Control */ \"ol/control/Control\");\n/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_control_Control__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ol/Observable */ \"ol/Observable\");\n/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ol_Observable__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ol/layer/Vector */ \"ol/layer/Vector\");\n/* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ol_layer_Vector__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var ol_source_Vector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ol/source/Vector */ \"ol/source/Vector\");\n/* harmony import */ var ol_source_Vector__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(ol_source_Vector__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ol/style */ \"ol/style\");\n/* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(ol_style__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! geoportal-access-lib */ \"./node_modules/geoportal-access-lib/src/Gp.js\");\n/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Common/Utils */ \"./src/Common/Utils.js\");\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Common/Utils/SelectorID */ \"./src/Common/Utils/SelectorID.js\");\n/* harmony import */ var _Utils_Markers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Utils/Markers */ \"./src/OpenLayers/Controls/Utils/Markers.js\");\n/* harmony import */ var _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Common/Utils/Draggable */ \"./src/Common/Utils/Draggable.js\");\n/* harmony import */ var _Utils_Interactions__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Utils/Interactions */ \"./src/OpenLayers/Controls/Utils/Interactions.js\");\n/* harmony import */ var _LayerSwitcher__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./LayerSwitcher */ \"./src/OpenLayers/Controls/LayerSwitcher.js\");\n/* harmony import */ var _LocationSelector__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./LocationSelector */ \"./src/OpenLayers/Controls/LocationSelector.js\");\n/* harmony import */ var _Export__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Export */ \"./src/OpenLayers/Controls/Export.js\");\n/* harmony import */ var _Formats_GeoJSON__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../Formats/GeoJSON */ \"./src/OpenLayers/Formats/GeoJSON.js\");\n/* harmony import */ var _Common_Controls_IsoDOM__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../Common/Controls/IsoDOM */ \"./src/Common/Controls/IsoDOM.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n// import CSS\n\n// import OpenLayers\n\n\n\n\n// import GeoJSON from \"ol/format/GeoJSON\";\n\n// import geoportal library access\n\n// import local\n\n\n\n\n\n\n// import local with ol dependencies\n\n\n\n\n\n// DOM\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_8__[\"default\"].getLogger(\"isocurve\");\n\n/**\n * @classdesc\n *\n * Isocurve Control.\n *\n * @constructor\n * @alias ol.control.Isocurve\n * @type {ol.control.Isocurve}\n * @extends {ol.control.Control}\n * @param {Object} options - Isocurve control options\n * @param {String} [options.apiKey] - API key for services call (isocurve and autocomplete services). The key \"calcul\" is used by default.\n * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol)\n * @param {Boolean} [options.collapsed = true] - Specify if widget has to be collapsed (true) or not (false) on map loading. Default is true.\n * @param {Boolean} [options.draggable = false] - Specify if widget is draggable\n * @param {Boolean|Object} [options.export = false] - Specify if button \"Export\" is displayed. For the use of the options of the \"Export\" control, see {@link ol.control.Export}\n * @param {Object} [options.exclusions = {\"toll\" : false, \"tunnel\" : false, \"bridge\" : false}] - list of exclusions with status (true = checked). By default : no exclusions checked.\n * @param {Array} [options.graphs = [\"Voiture\", \"Pieton\"]] - list of graph resources to be used for isocurve calculation, by default : [\"Voiture\", \"Pieton\"]. Possible values are \"Voiture\" and \"Pieton\". The first element is selected.\n * @param {Array} [options.methods = [\"time\", \"distance\"]] - list of methods, by default : [\"time\", \"distance\"]. Possible values are \"time\" and \"distance\". The first element is selected by default.\n * @param {Array} [options.directions = [\"departure\", \"arrival\"]] - list of directions to be displayed, by default : [\"departure\", \"arrival\"]. The first element is selected by default. Possible values are \"departure\" and \"arrival\".\n * Directions enable to specify if input location point will be used as a departure point (\"departure\") or as an arrival point (\"arrival\")\n * @param {Object} [options.isocurveOptions = {}] - isocurve service options. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~isoCurve Gp.Services.isoCurve()} to know all isocurve options.\n * @param {Object} [options.autocompleteOptions = {}] - autocomplete service options. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~autoComplete Gp.Services.autoComplete()} to know all autocomplete options\n * @param {Object} [options.markerOpts] - options to use your own marker. Default is a lightOrange marker.\n * @param {String} [options.markerOpts.url] - marker base64 encoded url (ex \"data:image/png;base64,...\"\"). Mandatory for a custom marker\n * @param {Array} [options.markerOpts.offset] - 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. Default is [0, 0]. (see http://openlayers.org/en/latest/apidoc/ol.Overlay.html)\n * @param {Object} [options.layerDescription = {}] - Layer informations to be displayed in LayerSwitcher widget (only if a LayerSwitcher is also added to the map)\n * @param {String} [options.layerDescription.title = \"Isochrone/Isodistance\"] - Layer title to be displayed in LayerSwitcher\n * @param {String} [options.layerDescription.description = \"isochrone/isodistance basé sur un graphe\"] - Layer description to be displayed in LayerSwitcher\n * @fires isocurve:drawstart\n * @fires isocurve:drawend\n * @fires isocurve:compute\n * @fires export:compute\n * @example\n * var iso = ol.control.Isocurve({\n * \"collapsed\" : false,\n * \"draggable\" : true,\n * \"export\" : false,\n * \"methods\" : [\"time\", \"distance\"],\n * \"exclusions\" : {\n * \"toll\" : true,\n * \"bridge\" : false,\n * \"tunnel\" : true\n * },\n * \"graphs\" : [\"Pieton\", \"Voiture\"],\n * \"markerOpts\" : {\n * \"url\" : \"...\",\n * \"offset\" : [0,0]\n * }\n * \"isocurveOptions\" : {},\n * \"autocompleteOptions\" : {}\n * });\n *\n * // if you want to pluggued the control Export with options :\n * var iso = new ol.control.Isocurve({\n * export : {\n * name : \"export\",\n * format : \"geojson\",\n * title : \"Exporter\",\n * menu : false\n * }\n * });\n */\nvar Isocurve = function (Control) {\n /**\n * See {@link ol.control.Isocurve}\n * @module Isocurve\n * @alias module:~Controls/Isocurve\n * @param {*} options - options\n * @example\n * import Isocurve from \"src/OpenLayers/Controls/Isocurve\"\n */\n function Isocurve(options) {\n options = options || {};\n if (!(this instanceof Isocurve)) {\n throw new TypeError(\"ERROR CLASS_CONSTRUCTOR\");\n }\n\n // initialisation du composant\n this.initialize(options);\n\n // // Widget main DOM container\n this._container = this._createMainContainerElement();\n // info: le container sera complété lors de l'ajout à la carte (setMap), car certains composants nécessitent d'être liés à la map.\n this._containerElement = null;\n\n // on peut éventuellement encapsuler le composant dans une div passée par l'utilisateur\n if (options.element && options.element.appendChild) {\n // dans ce cas on stocke les deux container\n options.element.appendChild(this._container);\n this._containerElement = options.element;\n }\n\n // call ol.control.Control constructor\n Control.call(this, {\n element: this._containerElement || this._container,\n target: options.target,\n render: options.render\n });\n }\n ;\n\n // Inherits from ol.control.Control\n if (Control) Isocurve.__proto__ = Control;\n\n /**\n * @lends module:Isocurve\n */\n Isocurve.prototype = Object.create(Control.prototype, {});\n\n // on récupère les méthodes de la classe commune IsoDOM\n _Common_Utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].assign(Isocurve.prototype, _Common_Controls_IsoDOM__WEBPACK_IMPORTED_MODULE_17__[\"default\"]);\n\n /**\n * Constructor (alias)\n *\n * @private\n */\n Isocurve.prototype.constructor = Isocurve;\n\n /**\n * Overwrite OpenLayers setMap method\n *\n * @param {ol.Map} map - Map.\n */\n Isocurve.prototype.setMap = function (map) {\n if (map) {\n // enrichissement du DOM du container lors de l'ajout à la carte\n this._container = this._initContainer(map);\n\n // ajout d'un bouton d'export\n if (this.options[\"export\"]) {\n var opts = _Common_Utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].assign({\n control: this\n }, this.options[\"export\"]);\n this[\"export\"] = new _Export__WEBPACK_IMPORTED_MODULE_15__[\"default\"](opts);\n this[\"export\"].render();\n var self = this;\n this[\"export\"].on(\"export:compute\", function (e) {\n self.dispatchEvent({\n type: \"export:compute\",\n content: e.content\n });\n });\n }\n\n // mode \"draggable\"\n if (this.draggable) {\n _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_11__[\"default\"].dragElement(this._IsoPanelContainer, this._IsoPanelHeaderContainer, map.getTargetElement());\n }\n }\n\n // on appelle la méthode setMap originale d'OpenLayers\n Control.prototype.setMap.call(this, map);\n };\n\n // ################################################################### //\n // ##################### public methods ############################## //\n // ################################################################### //\n\n /**\n * Returns true if widget is collapsed (minimized), false otherwise\n *\n * @returns {Boolean} collapsed - true if widget is collapsed\n */\n Isocurve.prototype.getCollapsed = function () {\n return this.collapsed;\n };\n\n /**\n * Collapse or display widget main container\n *\n * @param {Boolean} collapsed - True to collapse widget, False to display it\n */\n Isocurve.prototype.setCollapsed = function (collapsed) {\n if (collapsed === undefined) {\n logger.log(\"[ERROR] Isocurve:setCollapsed - missing collapsed parameter\");\n return;\n }\n if (collapsed && this.collapsed || !collapsed && !this.collapsed) {\n return;\n }\n if (collapsed) {\n document.getElementById(\"GPisochronPanelClose-\" + this._uid).click();\n } else {\n document.getElementById(\"GPshowIsochronPicto-\" + this._uid).click();\n }\n this.collapsed = collapsed;\n };\n\n /**\n * Get vector layer where Isocurve geometry is drawn\n *\n * @returns {Object} layer - ol.layer.Vector isocurve layer\n */\n Isocurve.prototype.getLayer = function () {\n return this._geojsonLayer;\n };\n\n /**\n * Set vector layer where Isocurve geometry is drawn\n *\n * @param {Object} layer - ol.layer.Vector isocurve layer\n */\n Isocurve.prototype.setLayer = function (layer) {\n if (!layer) {\n this._geojsonLayer = null;\n return;\n }\n if (!(layer instanceof ol_layer_Vector__WEBPACK_IMPORTED_MODULE_3___default.a)) {\n logger.log(\"no valid layer given for hosting drawn features.\");\n return;\n }\n\n // application des styles\n layer.setStyle(this._defaultFeatureStyle);\n\n // sauvegarde\n this._geojsonLayer = layer;\n };\n\n /**\n * Get vector layer\n *\n * @returns {String} geojson - GeoJSON format layer\n */\n Isocurve.prototype.getGeoJSON = function () {\n return JSON.stringify(this._geojsonObject);\n };\n\n /**\n * Set vector layer\n *\n * @param {String} geojson - GeoJSON format layer\n */\n Isocurve.prototype.setGeoJSON = function (geojson) {\n try {\n this._geojsonObject = JSON.parse(geojson);\n } catch (e) {\n logger.log(\"no valid geojson given :\" + e.message);\n }\n };\n\n /**\n * Get isocurve data\n *\n * @returns {Object} data - process results\n */\n Isocurve.prototype.getData = function () {\n var data = {\n type: \"isocurve\",\n transport: this._currentTransport,\n computation: this._currentComputation,\n exclusions: this._currentExclusions,\n direction: this._currentDirection,\n point: this._originPoint.getCoordinate(),\n // lon/lat wgs84\n results: {}\n };\n _Common_Utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].assign(data.results, this._currentIsoResults);\n return data;\n };\n\n /**\n * Set isocurve data\n *\n * @param {Object} data - control informations\n * @param {String} data.transport - transport type\n * @param {String} data.computation - computation type\n * @param {Array} data.exclusions - list of exclusions\n * @param {String} data.direction - direction type\n * @param {Array} data.point - [lon, lat]\n * @param {Object} data.results - service response\n */\n Isocurve.prototype.setData = function (data) {\n this._currentTransport = data.transport;\n this._currentComputation = data.computation;\n this._currentExclusions = data.exclusions;\n this._currentDirection = data.direction;\n // INFO\n // > this._originPoint.clear();\n // l'utilisation de cette méthode declenche des evenements qui retirent la couche en cours !\n // (cf. _createIsoPanelFormPointElement),\n var inputPointer = document.getElementById(\"GPlocationOriginPointer_\" + 1 + \"-\" + this._uid);\n inputPointer.checked = true;\n var inputCoords = document.getElementById(\"GPlocationOriginCoords_\" + 1 + \"-\" + this._uid);\n inputCoords.value = \"\";\n this._originPoint.setCoordinate(data.point, \"EPSG:4326\");\n this._currentIsoResults = data.results;\n };\n\n /**\n * Get container\n *\n * @returns {DOMElement} container\n */\n Isocurve.prototype.getContainer = function () {\n return this._container;\n };\n\n /**\n * Get default style\n *\n * @returns {ol.style} style\n */\n Isocurve.prototype.getStyle = function () {\n return this._defaultFeatureStyle;\n };\n\n /**\n * This method is public.\n * It allows to control the execution of a traitment.\n *\n * @param {Array} position - position in the projection map [ x, y ]\n * @param {Object} value - distance in km or hours-minutes\n * @param {Object} options - options = {...}\n */\n Isocurve.prototype.compute = function (position, value, options) {\n this._clear();\n if (!this._showIsoContainer.checked) {\n this._pictoIsoContainer.click();\n }\n var map = this.getMap();\n if (!map) {\n return;\n }\n\n // Les options par defauts\n var settings = {\n direction: \"departure\",\n method: \"time\",\n transport: \"Voiture\",\n exclusions: []\n };\n\n // On recupere les options\n _Common_Utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].assign(settings, options);\n this._originPoint.setCoordinate(position);\n var coordinate = this._originPoint.getCoordinate();\n var input = document.getElementById(\"GPlocationOrigin_\" + 1 + \"-\" + this._uid);\n input.value = coordinate[0].toFixed(4) + \" / \" + coordinate[1].toFixed(4);\n this._currentTransport = settings.transport;\n if (settings.transport === \"Voiture\") {\n document.getElementById(\"GPisochronTransportCar-\" + this._uid).checked = true;\n } else {\n document.getElementById(\"GPisochronTransportPedestrian-\" + this._uid).checked = true;\n }\n this._currentExclusions = settings.exclusions;\n this._currentComputation = settings.method;\n if (settings.method === \"time\") {\n var time = value.split(\".\");\n this._currentTimeHour = time[0] || 0;\n document.getElementById(\"GPisochronValueChronInput1-\" + this._uid).value = this._currentTimeHour;\n this._currentTimeMinute = time[1] || 0;\n document.getElementById(\"GPisochronValueChronInput2-\" + this._uid).value = this._currentTimeMinute;\n document.getElementById(\"GPisochronChoiceAltChron-\" + this._uid).click();\n } else {\n this._currentDistance = value;\n document.getElementById(\"GPisochronValueDistInput-\" + this._uid).value = this._currentDistance;\n document.getElementById(\"GPisochronChoiceAltDist-\" + this._uid).click();\n }\n this._currentDirection = settings.direction;\n settings.direction === \"departure\" ? document.getElementById(\"GPisochronDirectionSelect-\" + this._uid).selectedIndex = 0 : document.getElementById(\"GPisochronDirectionSelect-\" + this._uid).selectedIndex = 1;\n this.onIsoComputationSubmit();\n };\n\n /**\n * This method is public.\n * It allows to init the control.\n */\n Isocurve.prototype.init = function () {\n // point\n var coordinate = this._originPoint.getCoordinate();\n var input = document.getElementById(\"GPlocationOrigin_\" + 1 + \"-\" + this._uid);\n input.value = coordinate[1].toFixed(4) + \" / \" + coordinate[0].toFixed(4);\n\n // transport\n if (this._currentTransport === \"Voiture\") {\n document.getElementById(\"GPisochronTransportCar-\" + this._uid).checked = true;\n } else {\n document.getElementById(\"GPisochronTransportPedestrian-\" + this._uid).checked = true;\n }\n\n // method\n if (this._currentComputation === \"time\") {\n var minutes = this._currentIsoResults.time / 60;\n this._currentTimeHour = Math.floor(minutes / 60);\n document.getElementById(\"GPisochronValueChronInput1-\" + this._uid).value = this._currentTimeHour;\n this._currentTimeMinute = Math.round((minutes / 60 - this._currentTimeHour) * 60);\n document.getElementById(\"GPisochronValueChronInput2-\" + this._uid).value = this._currentTimeMinute;\n document.getElementById(\"GPisochronChoiceAltChron-\" + this._uid).click();\n } else {\n this._currentDistance = this._currentIsoResults.distance / 1000;\n document.getElementById(\"GPisochronValueDistInput-\" + this._uid).value = this._currentDistance;\n document.getElementById(\"GPisochronChoiceAltDist-\" + this._uid).click();\n }\n\n // direction\n this._currentDirection === \"departure\" ? document.getElementById(\"GPisochronDirectionSelect-\" + this._uid).selectedIndex = 0 : document.getElementById(\"GPisochronDirectionSelect-\" + this._uid).selectedIndex = 1;\n };\n\n /**\n * Clean UI : reinit control\n */\n Isocurve.prototype.clean = function () {\n this._clearIsoInputs();\n // INFO\n // le comportement est surchargé, ceci supprime la couche !?\n // cf. _createIsoPanelFormPointElement()\n this._originPoint.clearResults();\n document.getElementById(\"GPlocationPoint_1-\" + this._uid).style.cssText = \"\";\n document.getElementById(\"GPlocationOriginCoords_1-\" + this._uid).value = \"\";\n document.getElementById(\"GPlocationOrigin_1-\" + this._uid).value = \"\";\n document.getElementById(\"GPlocationPoint_1-\" + this._uid).style.cssText = \"\";\n document.getElementById(\"GPlocationOriginPointer_1-\" + this._uid).checked = false;\n document.getElementById(\"GPlocationOrigin_1-\" + this._uid).className = \"GPlocationOriginVisible\";\n document.getElementById(\"GPlocationOriginCoords_1-\" + this._uid).className = \"GPlocationOriginHidden\";\n this._currentIsoResults = null;\n this.setLayer();\n };\n\n // ################################################################### //\n // ##################### init component ############################## //\n // ################################################################### //\n\n /**\n * Initialize Isocurve control (called by Isocurve constructor)\n *\n * @param {Object} options - constructor options\n * @private\n */\n Isocurve.prototype.initialize = function (options) {\n this._checkInputOptions(options);\n\n // set default options\n this.options = {\n collapsed: true,\n draggable: false,\n \"export\": false,\n methods: [\"time\", \"distance\"],\n graphs: [\"Voiture\", \"Pieton\"],\n exclusions: {\n toll: false,\n tunnel: false,\n bridge: false\n },\n directions: [\"departure\", \"arrival\"],\n markerOpts: {\n url: _Utils_Markers__WEBPACK_IMPORTED_MODULE_10__[\"default\"][\"lightOrange\"],\n offset: _Utils_Markers__WEBPACK_IMPORTED_MODULE_10__[\"default\"].defaultOffset\n },\n isocurveOptions: {},\n autocompleteOptions: {},\n layerDescription: {\n title: \"Isochrone/Isodistance\",\n description: \"isochrone/isodistance basé sur un graphe\"\n }\n };\n\n // merge with user options\n _Common_Utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].assign(this.options, options);\n\n /** {Boolean} specify if isocurve control is collapsed (true) or not (false) */\n this.collapsed = this.options.collapsed;\n\n /** {Boolean} specify if isocurve control is draggable (true) or not (false) */\n this.draggable = this.options.draggable;\n\n // identifiant du contrôle : utile pour suffixer les identifiants CSS (pour gérer le cas où il y en a plusieurs dans la même page)\n this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_9__[\"default\"].generate();\n\n // Options du service paramétrables via l'interface (graph, method, exclusions)\n // Mode de transport selectionné : 'Voiture' ou 'Pieton'\n this._currentTransport = null;\n this._initTransport();\n // Mode de calcul selectionné : 'time' (isochron) ou 'distance' (isodistance)\n this._currentComputation = null;\n this._initComputation();\n // Exclusions selectionnées : Tunnel, Toll et Bridge\n this._currentExclusions = [];\n this._initExclusions();\n // sens de parcours : \"departure\" ou \"arrival\"\n this._currentDirection = null;\n this._initDirection();\n\n // point de saisie\n this._originPoint = null;\n\n // // containers principaux\n this._showIsoContainer = null;\n this._pictoIsoContainer = null;\n this._waitingContainer = null;\n this._formContainer = null;\n this._IsoPanelContainer = null;\n this._IsoPanelHeaderContainer = null;\n\n // les résultats du calcul\n this._currentIsoResults = null;\n\n // la géométrie\n this._geojsonLayer = null;\n this._geojsonObject = null;\n\n // bouton export\n this[\"export\"] = null;\n\n // si un calcul est en cours ou non\n this._waiting = false;\n // timer pour cacher la patience après un certain temps\n this._timer = null;\n\n // styles pour les sélections des features\n this._defaultFeatureStyle = new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Style\"]({\n fill: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Fill\"]({\n color: \"rgba(0, 183, 152, 0.7)\"\n }),\n stroke: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Stroke\"]({\n color: \"rgba(0, 183, 152, 0)\",\n width: 1\n })\n });\n\n // liste des ressources avec droits par service\n // Ex. {\n // \"Isocurve\" : {\n // key : \"ger4g456re45er456t4er5ge5\",\n // resources : [\"Pieton\", \"Voiture\"]\n // }\n // }\n this._resources = {};\n\n // listener key for event click on map\n this.listenerKey = null;\n };\n\n /**\n * this method is called by this.initialize()\n *\n * @param {Object} options - options\n *\n * @private\n */\n Isocurve.prototype._checkInputOptions = function (options) {\n // vérification des options\n // on ne permet pas de n'afficher aucun mode de calcul ou aucun mode de transport ?\n var i;\n\n // modes de calcul\n if (options.methods) {\n if (Array.isArray(options.methods)) {\n // on ne permet pas de passer un tableau vide : on spécifie au moins une méthode\n if (options.methods.length === 0) {\n options.methods = null;\n } else {\n for (i = 0; i < options.methods.length; i++) {\n if (typeof options.methods[i] !== \"string\") {\n logger.log(\"[ol.control.Isocurve] ERROR : parameter 'methods' elements should be of type 'string'\");\n }\n }\n }\n } else {\n logger.warn(\"'methods' parameter should be an array\");\n options.methods = null;\n }\n }\n\n // mode de transport\n if (options.graphs) {\n if (Array.isArray(options.graphs)) {\n // on ne permet pas de passer un tableau vide : on spécifie au moins un graph\n if (options.graphs.length === 0) {\n options.graphs = null;\n } else {\n for (i = 0; i < options.graphs.length; i++) {\n if (typeof options.graphs[i] !== \"string\") {\n logger.log(\"[ol.control.Isocurve] ERROR : parameter 'graphs' elements should be of type 'string'\");\n } else {\n if (options.graphs[i].toLowerCase() === \"pieton\") {\n options.graphs[i] = \"Pieton\";\n }\n if (options.graphs[i].toLowerCase() === \"voiture\") {\n options.graphs[i] = \"Voiture\";\n }\n }\n }\n }\n } else {\n logger.warn(\"'graphs' parameter should be an array\");\n options.graphs = null;\n }\n }\n\n // sens du parcours\n if (options.directions) {\n if (Array.isArray(options.directions)) {\n // on ne permet pas de passer un tableau vide : on spécifie au moins une direction\n if (options.directions.length === 0) {\n options.directions = null;\n } else {\n for (i = 0; i < options.directions.length; i++) {\n if (typeof options.directions[i] !== \"string\") {\n logger.log(\"[ol.control.Isocurve] ERROR : parameter 'directions' elements should be of type 'string'\");\n }\n }\n }\n } else {\n logger.warn(\"'directions' parameter should be an array\");\n options.directions = null;\n }\n }\n\n // collapsed\n if (options.collapsed === \"true\") {\n options.collapsed = true;\n }\n if (options.collapsed === \"false\") {\n options.collapsed = false;\n }\n };\n\n /**\n * this method is called by this.initialize() and initialize transport mode\n * (\"Voiture\" ou \"Pieton\")\n *\n * @private\n */\n Isocurve.prototype._initTransport = function () {\n // Mode de transport selectionné\n this._currentTransport = \"Voiture\"; // par defaut\n\n // par defaut\n var transports = this.options.graphs;\n if (!transports || transports.length === 0) {\n this.options.graphs = [\"Voiture\", \"Pieton\"];\n }\n\n // option\n if (Array.isArray(transports) && transports.length) {\n // FIXME pb si le 1er graphe n'est pas une ressource connue !\n if (transports[0] === \"Voiture\" || transports[0] === \"Pieton\") {\n this._currentTransport = transports[0];\n }\n }\n\n // si l'utilisateur a spécifié un graph dans le service, on surcharge les options du widget\n var serviceOptions = this.options.isocurveOptions;\n if (serviceOptions.graph) {\n this._currentTransport = serviceOptions.graph;\n }\n };\n\n /**\n * this method is called by this.initialize() and initialize computation mode\n * (time or distance)\n *\n * @private\n */\n Isocurve.prototype._initComputation = function () {\n // Mode de calcul selectionné\n this._currentComputation = \"time\"; // par defaut\n\n // par defaut\n var methods = this.options.methods;\n if (!methods || methods.length === 0) {\n this.options.methods = [\"time\", \"distance\"];\n }\n\n // option\n if (Array.isArray(methods) && methods.length) {\n // FIXME pb si le 1er graphe n'est pas une ressource connue !\n if (methods[0] === \"time\" || methods[0] === \"distance\") {\n this._currentComputation = methods[0];\n }\n }\n\n // si l'utilisateur a spécifié une méthode dans le service, on surcharge les options du widget\n var serviceOptions = this.options.isocurveOptions;\n if (serviceOptions.method) {\n this._currentComputation = serviceOptions.method;\n }\n if (serviceOptions.time) {\n this._currentComputation = \"time\";\n }\n if (serviceOptions.distance) {\n this._currentComputation = \"distance\";\n }\n };\n\n /**\n * this method is called by this.initialize() and initialize direction mode\n * (departure or arrival)\n *\n * @private\n */\n Isocurve.prototype._initDirection = function () {\n // Mode de calcul selectionné\n this._currentDirection = \"departure\"; // par defaut\n\n // par defaut\n var directions = this.options.directions;\n if (!directions || directions.length === 0) {\n this.options.directions = [\"departure\", \"arrival\"];\n }\n\n // option\n if (Array.isArray(directions) && directions.length) {\n // FIXME pb si le 1er graphe n'est pas une ressource connue !\n if (directions[0] === \"departure\" || directions[0] === \"arrival\") {\n this._currentDirection = directions[0];\n }\n }\n\n // si l'utilisateur a spécifié une méthode dans le service, on surcharge les options du widget\n var serviceOptions = this.options.isocurveOptions;\n if (!serviceOptions.reverse) {\n this._currentDirection = \"departure\";\n }\n if (serviceOptions.reverse === true) {\n this._currentDirection = \"arrival\";\n this.options.directions = [\"arrival\", \"departure\"];\n }\n };\n\n /**\n * this method is called by this.initialize() and initialize exclusions\n *\n * @private\n */\n Isocurve.prototype._initExclusions = function () {\n // Exclusions selectionnées : Tunnel, Toll et Bridge\n this._currentExclusions = []; // par defaut\n\n // par defaut\n var exclusion = this.options.exclusions;\n if (!exclusion || _typeof(exclusion) === \"object\" && Object.keys(exclusion).length === 0) {\n this.options.exclusions = {\n toll: false,\n tunnel: false,\n bridge: false\n };\n }\n\n // option\n if (exclusion && _typeof(exclusion) === \"object\" && Object.keys(exclusion).length) {\n for (var k in exclusion) {\n if (exclusion.hasOwnProperty(k)) {\n if (exclusion.k) {\n this._currentExclusions.push(k);\n }\n }\n }\n }\n\n // si l'utilisateur a spécifié des exclusions dans le service, on surcharge les options du widget\n var serviceOptions = this.options.isocurveOptions;\n if (Array.isArray(serviceOptions.exclusions)) {\n this._currentExclusions = serviceOptions.exclusions;\n }\n };\n\n // ################################################################### //\n // ######################## DOM initialize ########################### //\n // ################################################################### //\n\n /**\n * initialize component container (DOM)\n *\n * @param {Object} map - the map\n *\n * @returns {DOMElement} DOM element\n *\n * @private\n */\n Isocurve.prototype._initContainer = function (map) {\n var _this = this;\n // get main container\n var container = this._container;\n var inputShow = this._showIsoContainer = this._createShowIsoElement();\n container.appendChild(inputShow);\n\n // mode \"collapsed\"\n if (!this.collapsed) {\n inputShow.checked = true;\n }\n var picto = this._pictoIsoContainer = this._createShowIsoPictoElement();\n container.appendChild(picto);\n\n // panneau\n var panel = this._IsoPanelContainer = this._createIsoPanelElement();\n\n // header\n var header = this._IsoPanelHeaderContainer = this._createIsoPanelHeaderElement();\n panel.appendChild(header);\n\n // form\n var form = this._formContainer = this._createIsoPanelFormElement();\n\n // form: input de saisie de la localisation (fonction de Isocurve, voir ci-dessous)\n var point = this._createIsoPanelFormPointElement(map);\n form.appendChild(point);\n var isoChronChecked = false;\n var isoDistChecked = false;\n var typeChoice = this._createIsoPanelFormTypeChoiceElement();\n for (var i = 0; i < this.options.methods.length; i++) {\n if (this.options.methods[i] === \"time\") {\n isoChronChecked = i === 0;\n typeChoice.appendChild(this._createIsoPanelFormTypeChoiceChronElement(isoChronChecked));\n }\n if (this.options.methods[i] === \"distance\") {\n isoDistChecked = i === 0;\n typeChoice.appendChild(this._createIsoPanelFormTypeChoiceDistElement(isoDistChecked));\n }\n }\n form.appendChild(typeChoice);\n\n // form: menu du choix des valeurs\n form.appendChild(this._createIsoPanelFormValueIsochronElement(isoChronChecked));\n form.appendChild(this._createIsoPanelFormValueIsodistanceElement(isoDistChecked));\n\n // form: menu du choix du transport et du sens du parcours\n var modeChoice = this._createIsoPanelFormModeChoiceElement();\n modeChoice.appendChild(this._createIsoPanelFormModeChoiceTransportElement(this.options.graphs));\n // FIXME : doit on passer le paramètre defaultDirection ?\n modeChoice.appendChild(this._createIsoPanelFormModeChoiceDirectionElement(this.options.directions));\n form.appendChild(modeChoice);\n\n // form: menu des exclusions\n if (this.options.exclusions && _typeof(this.options.exclusions) === \"object\" && Object.keys(this.options.exclusions).length !== 0) {\n form.appendChild(this._createShowIsoExclusionsElement());\n form.appendChild(this._createShowIsoExclusionsPictoElement());\n var exclusion = this._createIsoPanelFormExclusionsElement();\n exclusion.appendChild(this._createIsoPanelFormExclusionOptionsElement(this.options.exclusions));\n form.appendChild(exclusion);\n }\n var divReset = this._createIsoFormResetElement();\n form.appendChild(divReset);\n\n // form: bouton du calcul\n var submit = this._submitContainer = this._createIsoSubmitFormElement();\n form.appendChild(submit);\n panel.appendChild(form);\n\n // waiting\n var waiting = this._waitingContainer = this._createIsoWaitingElement();\n panel.appendChild(waiting);\n container.appendChild(panel);\n\n // hide autocomplete suggested locations on container click\n if (container.addEventListener) {\n container.addEventListener(\"click\", function (e) {\n return _this._hideIsoSuggestedLocations(e);\n });\n }\n return container;\n };\n\n /**\n * Create start point\n *\n * @param {Object} map - the map\n *\n * @returns {Object} DOM element\n * @private\n */\n Isocurve.prototype._createIsoPanelFormPointElement = function (map) {\n this._originPoint = new _LocationSelector__WEBPACK_IMPORTED_MODULE_14__[\"default\"]({\n apiKey: this.options.apiKey || null,\n tag: {\n id: 1,\n groupId: this._uid,\n markerOpts: this.options.markerOpts,\n label: \"Départ\",\n display: true\n },\n autocompleteOptions: this.options.autocompleteOptions || null\n });\n this._originPoint.setMap(map);\n // a la sélection d'un nouveau point, on réinitialise aussi le tracé\n var self = this;\n // click sur le pointer\n document.getElementById(\"GPlocationOriginPointerImg_1-\" + this._uid).onclick = function () {\n self._clearGeojsonLayer();\n var map = self.getMap();\n if (self._originPoint._inputShowPointerContainer.checked) {\n // au click sur l'input pour pointer sur la carte: on minimise le formulaire\n self._formContainer.className = \"GPisochronFormMini\";\n // et au clic sur la carte, on réaffichera le formulaire \"normal\"\n this.listenerKey = map.on(\"click\", function () {\n self._formContainer.className = \"\";\n self.dispatchEvent(\"isocurve:drawend\");\n });\n } else {\n // si on déselectionne le pointer, on rétablit le formulaire en mode normal\n self._formContainer.className = \"\";\n // et on enlève l'écouteur d'évènement sur la carte\n // map.un(\"click\", () => { self._formContainer.className = \"\"; });\n Object(ol_Observable__WEBPACK_IMPORTED_MODULE_2__[\"unByKey\"])(this.listenerKey);\n }\n /**\n * event triggered at the start of drawing input\n *\n * @event isocurve:drawstart\n */\n self.dispatchEvent(\"isocurve:drawstart\");\n };\n // click sur le label\n document.getElementById(\"GPlocationOriginLabel_1-\" + this._uid).onclick = function () {\n self._clearGeojsonLayer();\n self._formContainer.className = \"\";\n // on désactive l'écouteur d'événements sur la carte (pour ne pas placer un marker au clic)\n map.un(\"click\", function () {\n self._formContainer.className = \"\";\n });\n self.dispatchEvent(\"isocurve:drawend\");\n };\n // click sur la zone de saisie\n document.getElementById(\"GPlocationOrigin_1-\" + this._uid).onclick = function () {\n self._clearGeojsonLayer();\n /**\n * event triggered at the end of drawing input\n *\n * @event isocurve:drawend\n */\n self.dispatchEvent(\"isocurve:drawend\");\n };\n return this._originPoint._container;\n };\n\n // ################################################################### //\n // ####################### handlers events to dom #################### //\n // ################################################################### //\n\n /**\n * this method is called by event 'submit' on 'GPisochronForm' tag form\n * (cf. this._createIsoPanelFormElement),\n * and call isocurve service to display results\n *\n * @private\n */\n Isocurve.prototype.onIsoComputationSubmit = function () {\n // si on n'a pas de valeur récupérée pour notre point origine, on ne fait rien\n if (!this._originPoint || !this._originPoint.getCoordinate || !this._originPoint.getCoordinate()) {\n logger.log(\"[Isocurve] Missing position parameter to submit isocurve request\");\n return;\n }\n\n // récupération de l'origine\n var positionCoordinates = this._originPoint.getCoordinate();\n var position = {\n x: positionCoordinates[0],\n y: positionCoordinates[1]\n };\n logger.log(\"origin : \", position);\n\n // récupération du temps ou de la distance\n var time;\n var distance;\n if (this._currentComputation.toLowerCase() === \"time\") {\n var timeHourInput = document.getElementById(\"GPisochronValueChronInput1-\" + this._uid);\n var hours = parseInt(timeHourInput.value, 10);\n if (isNaN && isNaN(hours)) {\n hours = 0;\n }\n var timeMinutesInput = document.getElementById(\"GPisochronValueChronInput2-\" + this._uid);\n var minutes = parseInt(timeMinutesInput.value, 10);\n if (isNaN && isNaN(minutes)) {\n minutes = 0;\n }\n // durée exprimée en secondes\n time = hours * 3600 + minutes * 60;\n logger.log(\"time : \" + time);\n }\n if (this._currentComputation.toLowerCase() === \"distance\") {\n var distInput = document.getElementById(\"GPisochronValueDistInput-\" + this._uid);\n // distance exprimée en mètres\n distance = parseFloat(distInput.value) * 1000;\n logger.log(\"distance : \" + distance);\n }\n\n // si on n'a pas de valeur de calcul renseignée, on ne lance pas la requête.\n if (!time && !distance) {\n logger.log(\"[Isocurve] Missing time or distance parameter to submit isocurve request\");\n return;\n }\n\n // on recupere les éventuelles options du service passées par l'utilisateur\n var options = this.options.isocurveOptions || {};\n\n // gestion du protocole et du timeout\n // le timeout est indispensable sur le protocole JSONP.\n var _protocol = options.protocol || \"XHR\";\n var _timeout = options.timeOut || 0;\n if (_protocol === \"JSONP\" && _timeout === 0) {\n // FIXME le timeout est obligatoire pour ce type de protocole...\n _timeout = 15000;\n }\n\n // gestion des callback\n var bOnFailure = !!(options.onFailure !== null && typeof options.onFailure === \"function\"); // cast variable to boolean\n var bOnSuccess = !!(options.onSuccess !== null && typeof options.onSuccess === \"function\");\n\n // on met en place l'affichage des resultats dans la fenetre de resultats.\n var context = this;\n var isoRequestOptions = {\n position: position,\n graph: options.graph || this._currentTransport,\n exclusions: options.exclusions || this._currentExclusions,\n method: options.method || this._currentComputation,\n smoothing: options.smoothing || true,\n timeOut: _timeout,\n protocol: _protocol,\n // callback onSuccess\n onSuccess: function onSuccess(results) {\n logger.log(results);\n if (results) {\n context._drawIsoResults(results);\n }\n if (bOnSuccess) {\n options.onSuccess.call(context, results);\n }\n },\n // callback onFailure\n onFailure: function onFailure(error) {\n // FIXME mise à jour du controle mais le service ne repond pas en 200 !?\n context._hideWaitingContainer();\n logger.log(error.message);\n if (bOnFailure) {\n options.onFailure.call(context, error);\n }\n }\n };\n if (this._currentDirection.toLowerCase() === \"arrival\" || options.reverse) {\n isoRequestOptions.reverse = true;\n }\n if (time) {\n isoRequestOptions.time = time;\n }\n if (distance) {\n isoRequestOptions.distance = distance;\n }\n this._requestIsoCurve(isoRequestOptions);\n };\n\n /**\n * this method is called by event 'click' on 'GPshowIsochronPicto' picto\n * (cf. this._createShowIsoPictoElement),\n * and clear inputs and previous isocurve drawings\n *\n * @private\n */\n Isocurve.prototype.onShowIsoPanelClick = function () {\n var map = this.getMap();\n // on supprime toutes les interactions\n _Utils_Interactions__WEBPACK_IMPORTED_MODULE_12__[\"default\"].unset(map);\n this.collapsed = this._showIsoContainer.checked;\n // on génère nous même l'evenement OpenLayers de changement de propriété\n // (utiliser ol.control.Isocurve.on(\"change:collapsed\", function ) pour s'abonner à cet évènement)\n this.dispatchEvent(\"change:collapsed\");\n };\n\n /**\n * this method is called by event 'change' on 'GPisochronChoiceAltDist' or 'GPisochronChoiceAltChron'\n * input (cf. this._createIsoPanelFormTypeChoiceElement),\n * and updates current computation mode\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n Isocurve.prototype.onIsoTypeChoiceChange = function (e) {\n var value = e.target.value;\n if (!value) {\n return;\n }\n if (value === \"isodistance\") {\n this._currentComputation = \"distance\";\n }\n if (value === \"isochron\") {\n this._currentComputation = \"time\";\n }\n };\n\n /**\n * this method is called by event 'click' on 'GPisochronTransportPedestrian' or 'GPisochronTransportCar'\n * input (cf. this._createIsoPanelFormModeChoiceTransportElement),\n * and updates current transport mode\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n Isocurve.prototype.onIsoModeTransportChange = function (e) {\n var value = e.target.value;\n if (!value) {\n return;\n }\n this._currentTransport = value;\n };\n\n /**\n * this method is called by event 'change' on 'GPisochronDirectionSelect' select\n * (cf. this._createIsoPanelFormModeChoiceDirectionElement),\n * and updates current direction mode\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n Isocurve.prototype.onIsoModeDirectionChange = function (e) {\n var value = e.target.value;\n if (!value) {\n return;\n }\n if (value.toLowerCase() === \"arrival\") {\n this._originPoint._inputLabelContainer.innerHTML = \"Arrivée\";\n } else {\n this._originPoint._inputLabelContainer.innerHTML = \"Départ\";\n }\n this._currentDirection = value;\n };\n\n /**\n * this method is called by event 'change' on 'GPIsoExclusionsToll'\n * or 'GPIsoeExclusionsTunnel' or 'GPIsoExclusionsBridge' tag input\n * (cf. this._createIsoPanelFormExclusionOptionsElement).\n * this value is saved as a parameter for the service isocurve.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n Isocurve.prototype.onIsoExclusionsChange = function (e) {\n var value = e.target.value;\n var checked = e.target.checked;\n if (!value) {\n return;\n }\n var bFound = false;\n var iFound = null;\n for (var i = 0; i < this._currentExclusions.length; i++) {\n if (deepEqual(this._currentExclusions[i], value.toLowerCase())) {\n iFound = i;\n bFound = true;\n }\n }\n // on l'ajoute si la valeur n'existe pas et est selectionnée\n if (!bFound && !checked) {\n this._currentExclusions.push(value.toLowerCase());\n }\n // on la retire si la valeur existe et est deselectionnée\n if (bFound && checked) {\n this._currentExclusions[iFound] = null;\n }\n };\n\n /**\n * this method is called by event 'click' on 'GPisoReset'\n * tag label (cf. this._createIsoFormResetElement),\n * and it cleans all isochron input options and results.\n *\n * @private\n */\n Isocurve.prototype.onIsoResetClick = function () {\n // clear\n this._clear();\n };\n\n // ################################################################### //\n // ######################## isocurve calculation ##################### //\n // ################################################################### //\n\n /**\n * this method is called by this.onIsoComputationSubmit\n * and executes a request to the service.\n *\n * @param {Object} options - isocurve service request options\n * @private\n */\n Isocurve.prototype._requestIsoCurve = function (options) {\n // on ne fait pas de requête si on n'a pas renseigné de parametres !\n if (!options || _typeof(options) === \"object\" && Object.keys(options).length === 0) {\n return;\n }\n // on ne fait pas de requête si on n'a pas de point d'origine\n if (!options.position) {\n return;\n }\n\n // si l'utilisateur a spécifié le paramètre ssl au niveau du control, on s'en sert\n // true par défaut (https)\n if (typeof options.ssl !== \"boolean\") {\n if (typeof this.options.ssl === \"boolean\") {\n options.ssl = this.options.ssl;\n } else {\n options.ssl = true;\n }\n }\n logger.log(options);\n\n // on efface une éventuelle précédente couche\n this._clearGeojsonLayer();\n\n // mise en place de la patience\n this._displayWaitingContainer();\n\n // appel du service de calcul d'isochrones\n geoportal_access_lib__WEBPACK_IMPORTED_MODULE_6__[\"default\"].Services.isoCurve(options);\n };\n\n /**\n * this method is called by this.onIsoComputationSubmit (in case of success)\n * and draw isocurve results geometry on map\n *\n * @param {Object} results - isocurve response results\n * @private\n */\n Isocurve.prototype._drawIsoResults = function (results) {\n var _this2 = this;\n // sauvegarde de l'etat des resultats\n this._currentIsoResults = results;\n // cache la patience\n this._hideWaitingContainer();\n if (!results.geometry) {\n return;\n }\n var map = this.getMap();\n\n // 1. création de l'objet geoJSON\n this._geojsonObject = {\n type: \"FeatureCollection\",\n crs: {\n type: \"name\",\n properties: {\n name: \"EPSG:4326\"\n }\n },\n features: [{\n type: \"Feature\",\n crs: {\n type: \"name\",\n properties: {\n name: \"EPSG:4326\"\n }\n },\n geometry: results.geometry\n }]\n };\n this._geojsonObject.features.push({\n type: \"Feature\",\n geometry: {\n type: \"Point\",\n coordinates: this._originPoint.getCoordinate()\n },\n properties: {\n description: \"Point d'origine\",\n \"marker-symbol\": this.options.markerOpts.url\n }\n });\n var geojsonformat = new _Formats_GeoJSON__WEBPACK_IMPORTED_MODULE_16__[\"default\"]({\n defaultDataProjection: \"EPSG:4326\",\n defaultStyle: this._defaultFeatureStyle\n });\n var mapProj = map.getView().getProjection().getCode();\n var features = geojsonformat.readFeatures(this._geojsonObject, {\n dataProjection: \"EPSG:4326\",\n featureProjection: mapProj\n });\n\n // 2. ajout de la géométrie comme nouvelle couche vecteur à la carte\n this._geojsonLayer = new ol_layer_Vector__WEBPACK_IMPORTED_MODULE_3___default.a({\n source: new ol_source_Vector__WEBPACK_IMPORTED_MODULE_4___default.a({\n features: features\n }),\n style: this._defaultFeatureStyle,\n opacity: 0.9\n });\n // ajout d'un identifiant à la couche\n var graph;\n if (this._currentTransport === \"Pieton\") {\n graph = \"piéton\";\n this._geojsonLayer.gpResultLayerId = \"Pieton$GEOPORTAIL:GPP:Isocurve\";\n } else {\n graph = \"voiture\";\n this._geojsonLayer.gpResultLayerId = \"Voiture$GEOPORTAIL:GPP:Isocurve\";\n }\n // ajout à la carte\n map.addLayer(this._geojsonLayer);\n\n /**\n * event triggered when the compute is finished\n *\n * @event isocurve:compute\n * @typedef {Object}\n * @property {Object} type - event\n * @property {Object} target - instance Isocurve\n * @example\n * Isocurve.on(\"isocurve:compute\", function (e) {\n * console.log(e.target.getData());\n * })\n */\n this.dispatchEvent({\n type: \"isocurve:compute\"\n });\n\n // 3. Zoom sur l'emprise de la geometry\n if (features[0] && features[0].getGeometry() && features[0].getGeometry().getExtent()) {\n var extent = features[0].getGeometry().getExtent();\n map.getView().fit(extent, map.getSize());\n }\n\n // 5. Si un layer switcher est présent dans la carte, on lui affecte des informations pour cette couche\n var method = this._currentComputation === \"time\" ? \"Isochrone\" : \"Isodistance\";\n map.getControls().forEach(function (control) {\n if (control instanceof _LayerSwitcher__WEBPACK_IMPORTED_MODULE_13__[\"default\"]) {\n // un layer switcher est présent dans la carte\n var layerId = _this2._geojsonLayer.gpLayerId;\n // on n'ajoute des informations que s'il n'y en a pas déjà (si le titre est le numéro par défaut)\n if (control._layers[layerId].title === layerId) {\n control.addLayer(_this2._geojsonLayer, {\n title: _this2.options.layerDescription.title + \" (\" + method + \"/\" + graph + \")\",\n description: _this2.options.layerDescription.description\n });\n }\n }\n });\n };\n\n // ################################################################### //\n // ############################# Clean ############################### //\n // ################################################################### //\n\n /**\n * this method is called by this.onShowIsoPanelClick()\n * and it clears all elements (reinit).\n *\n * @private\n */\n Isocurve.prototype._clear = function () {\n // clear inputs\n this._clearIsoInputs();\n\n // clear origin point (and marker)\n this._originPoint.clear();\n\n // remove geometry layer\n this._clearGeojsonLayer();\n\n // clear results\n this._currentIsoResults = null;\n };\n\n /**\n * this method is called by this._clear()\n * and it clears all input elements (dist and time)\n *\n * @private\n */\n Isocurve.prototype._clearIsoInputs = function () {\n // 1. clear inputs\n // clear time inputs (if exists) :\n // hours\n var timeHourInput = document.getElementById(\"GPisochronValueChronInput1-\" + this._uid);\n if (timeHourInput) {\n timeHourInput.value = \"0\";\n }\n // minutes\n var timeMinutesInput = document.getElementById(\"GPisochronValueChronInput2-\" + this._uid);\n if (timeMinutesInput) {\n timeMinutesInput.value = \"0\";\n }\n // clear distance input (if exists)\n var distInput = document.getElementById(\"GPisochronValueDistInput-\" + this._uid);\n if (distInput) {\n distInput.value = \"0\";\n }\n\n // 2. reinit options to default\n this._initTransport();\n this._initComputation();\n this._initDirection();\n this._initExclusions();\n\n // 3. set transport mode to default\n var transportdiv;\n if (this._currentTransport === \"Pieton\") {\n transportdiv = document.getElementById(\"GPisochronTransportPedestrian-\" + this._uid);\n if (transportdiv) {\n transportdiv.checked = \"true\";\n }\n } else {\n transportdiv = document.getElementById(\"GPisochronTransportCar-\" + this._uid);\n if (transportdiv) {\n transportdiv.checked = \"true\";\n }\n }\n\n // 4. set computation mode to default (distance or time)\n var computationdiv;\n if (this._currentComputation.toLowerCase() === \"distance\") {\n computationdiv = document.getElementById(\"GPisochronChoiceAltDist-\" + this._uid);\n if (computationdiv) {\n computationdiv.checked = \"true\";\n }\n if (document.getElementById(\"GPisochronValueDist-\" + this._uid)) {\n document.getElementById(\"GPisochronValueDist-\" + this._uid).className = \"GPflexInput\";\n }\n if (document.getElementById(\"GPisochronValueChron-\" + this._uid)) {\n document.getElementById(\"GPisochronValueChron-\" + this._uid).className = \"GPisochronValueHidden\";\n }\n } else {\n computationdiv = document.getElementById(\"GPisochronChoiceAltChron-\" + this._uid);\n if (computationdiv) {\n computationdiv.checked = \"true\";\n }\n if (document.getElementById(\"GPisochronValueChron-\" + this._uid)) {\n document.getElementById(\"GPisochronValueChron-\" + this._uid).className = \"GPflexInput\";\n }\n if (document.getElementById(\"GPisochronValueDist-\" + this._uid)) {\n document.getElementById(\"GPisochronValueDist-\" + this._uid).className = \"GPisochronValueHidden\";\n }\n }\n\n // 5. set direction mode to default (arrival or departure)\n var directionSelect = document.getElementById(\"GPisochronDirectionSelect-\" + this._uid);\n if (directionSelect) {\n directionSelect.value = this._currentDirection;\n }\n if (this._currentDirection === \"arrival\") {\n this._originPoint._inputLabelContainer.innerHTML = \"Arrivée\";\n } else {\n this._originPoint._inputLabelContainer.innerHTML = \"Départ\";\n }\n\n // 6. set exclusions to default\n var tollInput = document.getElementById(\"GPisoExclusionsToll-\" + this._uid);\n if (tollInput) {\n if (this._currentExclusions.indexOf(\"toll\") !== -1) {\n tollInput.checked = false;\n } else {\n tollInput.checked = true;\n }\n }\n var tunnelInput = document.getElementById(\"GPisoExclusionsTunnel-\" + this._uid);\n if (tunnelInput) {\n if (this._currentExclusions.indexOf(\"tunnel\") !== -1) {\n tunnelInput.checked = false;\n } else {\n tunnelInput.checked = true;\n }\n }\n var bridgeInput = document.getElementById(\"GPisoExclusionsBridge-\" + this._uid);\n if (bridgeInput) {\n if (this._currentExclusions.indexOf(\"bridge\") !== -1) {\n bridgeInput.checked = false;\n } else {\n bridgeInput.checked = true;\n }\n }\n };\n\n /**\n * this method is called by this.onIsoComputationSubmit (in case of failure)\n * and it clears all geometries\n *\n * @private\n */\n Isocurve.prototype._clearGeojsonLayer = function () {\n var map = this.getMap();\n // remove layer\n if (this._geojsonLayer) {\n map.removeLayer(this._geojsonLayer);\n this._geojsonLayer = null;\n }\n // remove geojson object\n this._geojsonObject = null;\n };\n\n /**\n * this method is called by event 'click' on control main container\n * and hide suggested Locations (unless target is an autocomplete input)\n *\n * @param {Object} e - event\n *\n * @private\n */\n Isocurve.prototype._hideIsoSuggestedLocations = function (e) {\n // si on clique sur l'input de saisie du point d'origine\n if (e.target && e.target.id && e.target.id.indexOf(\"GPlocationOrigin_\") !== -1) {} else {\n // si on clique ailleurs dans le DOM du control, on cache tous les résultats d'autocomplétion\n this._originPoint._hideSuggestedLocation();\n }\n };\n\n /**\n * this method displays waiting container and sets a timeout\n *\n * @private\n */\n Isocurve.prototype._displayWaitingContainer = function () {\n this._waitingContainer.className = \"GPisochronCalcWaitingContainerVisible\";\n this._waiting = true;\n\n // mise en place d'un timeout pour réinitialiser le panel (cacher la patience)\n // si on est toujours en attente (si la requête est bloquée par exemple)\n var opts = this.options.isocurveOptions;\n if (opts && opts.timeOut) {\n if (this._timer) {\n clearTimeout(this._timer);\n this._timer = null;\n }\n var context = this;\n this._timer = setTimeout(function () {\n if (context._waiting === true) {\n context._hideWaitingContainer();\n } else {\n if (context._timer) {\n clearTimeout(context._timer);\n }\n }\n }, 16000);\n }\n };\n\n /**\n * this method hides waiting container and clears timeout\n *\n * @private\n */\n Isocurve.prototype._hideWaitingContainer = function () {\n if (this._waiting) {\n this._waitingContainer.className = \"GPisochronCalcWaitingContainerHidden\";\n this._waiting = false;\n var opts = this.options.isocurveOptions;\n if (opts && opts.timeOut) {\n clearTimeout(this._timer);\n this._timer = null;\n }\n }\n };\n return Isocurve;\n}(ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default.a);\n/* harmony default export */ __webpack_exports__[\"default\"] = (Isocurve);\n\n// Expose Isocurve as ol.control.Isocurve (for a build bundle)\nif (window.ol && window.ol.control) {\n window.ol.control.Isocurve = Isocurve;\n}\nvar deepEqual = function deepEqual(x, y) {\n if (x === y) {\n return true;\n } else if (_typeof(x) === \"object\" && x != null && _typeof(y) === \"object\" && y != null) {\n if (Object.keys(x).length !== Object.keys(y).length) {\n return false;\n }\n for (var prop in x) {\n if (y.hasOwnProperty(prop)) {\n if (!deepEqual(x[prop], y[prop])) {\n return false;\n }\n } else {\n return false;\n }\n }\n return true;\n } else {\n return false;\n }\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9PcGVuTGF5ZXJzL0NvbnRyb2xzL0lzb2N1cnZlLmpzPzU4MjAiXSwibmFtZXMiOlsibG9nZ2VyIiwiTG9nZ2VyIiwiZ2V0TG9nZ2VyIiwiSXNvY3VydmUiLCJDb250cm9sIiwib3B0aW9uc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IiwgXCJkaXN0YW5jZVwiXSxcbiAqICAgICAgXCJleGNsdXNpb25zXCIgOiB7XG4gKiAgICAgICAgIFwidG9sbFwiIDogdHJ1ZSxcbiAqICAgICAgICAgXCJicmlkZ2VcIiA6IGZhbHNlLFxuICogICAgICAgICBcInR1bm5lbFwiIDogdHJ1ZVxuICogICAgICB9LFxuICogICAgICBcImdyYXBoc1wiIDogW1wiUGlldG9uXCIsIFwiVm9pdHVyZVwiXSxcbiAqICAgICAgXCJtYXJrZXJPcHRzXCIgOiB7XG4gKiAgICAgICAgICBcInVybFwiIDogXCIuLi5cIixcbiAqICAgICAgICAgIFwib2Zmc2V0XCIgOiBbMCwwXVxuICogICAgICB9XG4gKiAgICAgIFwiaXNvY3VydmVPcHRpb25zXCIgOiB7fSxcbiAqICAgICAgXCJhdXRvY29tcGxldGVPcHRpb25zXCIgOiB7fVxuICogIH0pO1xuICpcbiAqICAvLyBpZiB5b3Ugd2FudCB0byBwbHVnZ3VlZCB0aGUgY29udHJvbCBFeHBvcnQgd2l0aCBvcHRpb25zIDpcbiAqICB2YXIgaXNvID0gbmV3IG9sLmNvbnRyb2wuSXNvY3VydmUoe1xuICogICAgZXhwb3J0IDoge1xuICogICAgICBuYW1lIDogXCJleHBvcnRcIixcbiAqICAgICAgZm9ybWF0IDogXCJnZW9qc29uXCIsXG4gKiAgICAgIHRpdGxlIDogXCJFeHBvcnRlclwiLFxuICogICAgICBtZW51IDogZmFsc2VcbiAqICAgIH1cbiAqICB9KTtcbiAqL1xudmFyIElzb2N1cnZlID0gKGZ1bmN0aW9uIChDb250cm9sKSB7XG4gICAgLyoqXG4gICAgICogU2VlIHtAbGluayBvbC5jb250cm9sLklzb2N1cnZlfVxuICAgICAqIEBtb2R1bGUgSXNvY3VydmVcbiAgICAgKiBAYWxpYXMgbW9kdWxlOn5Db250cm9scy9Jc29jdXJ2ZVxuICAgICAqIEBwYXJhbSB7Kn0gb3B0aW9ucyAtIG9wdGlvbnNcbiAgICAgKiBAZX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4gICAgLyoqXG4gICAgICogT3ZlcndyaXRlIE9wZW5MYXllcnMgc2V0TWFwIG1ldGhvZFxuICAgICAqXG4gICAgICogQHBhcmFtIHtvbC5NYXB9IG1hcCAtIE1hcC5cbiAgICAgKi9cbiAgICBJc29jdXJ2ZS5wcm90b3R5cGUuc2V0TWFwID0gZnVuY3Rpb24gKG1hcCkge1xuICAgICAgICBpZiAobWFwKSB7XG4gICAgICAgICAgICAvLyBlbnJpY2hpc3NlbWVudCBkdSBET00gZHUgY29udGFpbmVyIGxvcnMgZGUgbCdham91dCDDoCBsYSBjYXJ0ZVxuICAgICAgICAgICAgdGhpcy5fY29udGFpbmVyID0gdGhpcy5faW5pdENvbnRhaW5lcihtYXApO1xuXG4gICAgICAgICAgICAvLyBham91dCBkJ3VuIGJvdXRvbiBkJ2V4cG9ydFxuICAgICAgICAgICAgaWYgKHRoaXMub3B0aW9ucy5leHBvcnQpIHtcbiAgICAgICAgICAgICAgICB2YXIgb3B0cyA9IFV0aWxzLmFzc2lnbih7IGNvbnRyb2wgOiB0aGlzIH0sIHRoaXMub3B0aW9ucy5leHBvcnQpO1xuICAgICAgICAgICAgICAgIHRoaXMuZXhwb3J0ID0gbmV3IEJ1dHRvbkV4cG9ydChvcHRzKTtcbiAgICAgICAgICAgICAgICB0aGlzLmV4cG9ydC5yZW5kZXIoKTtcbiAgICAgICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXM7XG4gICAgICAgICAgICAgICAgdGhpcy5leHBvcnQub24oXCJleHBvcnQ6Y29tcHV0ZVwiLCAoZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLmRpc3BhdGNoRXZlbnQoe1xuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZSA6IFwiZXhwb3J0OmNvbXB1dGVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnQgOiBlLmNvbnRlbnRcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG4g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AgIHRoaXMuY29sbGFwc2VkID0gY29sbGFwc2VkO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBHZXQgdmVjdG9yIGxheWVyIHdoZXJlIElzb2N1cnZlIGdlb21ldHJ5IGlzIGRyYXduXG4gICAgICpcbiAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSBsYXllciAtIG9sLmxheWVyLlZlY3RvciBpc29jdXJ2ZSBsYXllclxuICAgICAqL1xuICAgIElzb2N1cnZlLnByb3RvdHlwZS5nZXRMYXllciA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuX2dlb2pzb25MYXllcjtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogU2V0IHZlY3RvciBsYXllciB3aGVyZSBJc29jdXJ2ZSBnZW9tZXRyeSBpcyBkcmF3blxuICAgICAqXG4gICAgICogQHBhcmFtIHtPYmplY3R9IGxheWVyIC0gb2wubGF5ZXIuVmVjdG9yIGlzb2N1cnZlIGxheWVyXG4gICAgICovXG4gICAgSXNvY3VydmUucHJvdG90eXBlLnNldExheWVyID0gZnVuY3Rpb24gKGxheWVyKSB7XG4gICAgICAgIGlmICghbGF5ZXIpIHtcbiAgICAgICAgICAgIHRoaXMuX2dlb2pzb25MYXllciA9IG51bGw7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIShsYXllciBpbnN0YW5jZW9mIFZlY3RvckxheWVyKSkge1xuICAgICAgICAgICAgbG9nZ2VyLmxvZyhcIm5vIHZhbGlkIGxheWVyIGdpdmVuIGZvciBob3N0aW5nIGRyYXduIGZlYXR1cmVzLlwiKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIGFwcGxpY2F0aW9uIGRlcyBzdHlsZXNcbiAgICAgICAgbGF5ZXIuc2V0U3R5bGUodGhpcy5fZGVmYXVsdEZlYXR1cmVTdHlsZSk7XG5cbiAgICAgICAgLy8gc2F1dmVnYXJkZVxuICAgICAgICB0aGlzLl9nZW9qc29uTGF5ZXIgPSBsYXllcjtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogR2V0IHZlY3RvciBsYXllclxuICAgICAqXG4gICAgICogQHJldHVybnMge1N0cmluZ30gZ2VvanNvbiAtIEdlb0pTT04gZm9ybWF0IGxheWVyXG4gICAgICovXG4gICAgSXNvY3VydmUucHJvdG90eXBlLmdldEdlb0pTT04gPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeSh0aGlzLl9nZW9qc29uT2JqZWN0KTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogU2V0IHZlY3RvciBsYXllclxuICAgICAqXG4gICAgICogQHBhcmFtIHtTdHJpbmd9IGdlb2pzb24gLSBHZW9KU09OIGZvcm1hdCBsYXllclxuICAgICAqL1xuICAgIElzb2N1cnZlLnByb3RvdHlwZS5zZXRHZW9KU09OID0gZnVuY3Rpb24gKGdlb2pzb24pIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHRoaXMuX2dlb2pzb25PYmplY3QgPSBKU09OLnBhcnNlKGdlb2pzb24pO1xuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICBsb2dnZXIubG9nKFwibm8gdmFsaWQgZ2VvanNvbiBnaXZlbiA6XCIgKyBlLm1lc3NhZ2UpO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIEdldCBpc29jdXJ2ZSBkYXRhXG4gICAgICpcbiAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSBkYXRhIC0gcHJvY2VzcyByZXN1bHRzXG4gICAgICovXG4gICAgSXNvY3VydmUucHJvdG90eXBlLmdldERhdGEgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciBkYXRhID0ge1xuICAgICAgICAgICAgdHlwZSA6IFwiaXNvY3VydmVcIixcbiAgICAgICAgICAgIHRyYW5zcG9ydCA6IHRo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WxpemUgPSBmdW5jdGlvbiAob3B0aW9ucykge1xuICAgICAgICB0aGlzLl9jaGVja0lucHV0T3B0aW9ucyhvcHRpb25zKTtcblxuICAgICAgICAvLyBzZXQgZGVmYXVsdCBvcHRpb25zXG4gICAgICAgIHRoaXMub3B0aW9ucyA9IHtcbiAgICAgICAgICAgIGNvbGxhcHNlZCA6IHRydWUsXG4gICAgICAgICAgICBkcmFnZ2FibGUgOiBmYWxzZSxcbiAgICAgICAgICAgIGV4cG9ydCA6IGZhbHNlLFxuICAgICAgICAgICAgbWV0aG9kcyA6IFtcInRpbWVcIiwgXCJkaXN0YW5jZVwiXSxcbiAgICAgICAgICAgIGdyYXBocyA6IFtcIlZvaXR1cmVcIiwgXCJQaWV0b25cIl0sXG4gICAgICAgICAgICBleGNsdXNpb25zIDoge1xuICAgICAgICAgICAgICAgIHRvbGwgOiBmYWxzZSxcbiAgICAgICAgICAgICAgICB0dW5uZWwgOiBmYWxzZSxcbiAgICAgICAgICAgICAgICBicmlkZ2UgOiBmYWxzZVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGRpcmVjdGlvbnMgOiBbXCJkZXBhcnR1cmVcIiwgXCJhcnJpdmFsXCJdLFxuICAgICAgICAgICAgbWFya2VyT3B0cyA6IHtcbiAgICAgICAgICAgICAgICB1cmwgOiBNYXJrZXJzW1wibGlnaHRPcmFuZ2VcIl0sXG4gICAgICAgICAgICAgICAgb2Zmc2V0IDogTWFya2Vycy5kZWZhdWx0T2Zmc2V0XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgaXNvY3VydmVPcHRpb25zIDoge30sXG4gICAgICAgICAgICBhdXRvY29tcGxldGVPcHRpb25zIDoge30sXG4gICAgICAgICAgICBsYXllckRlc2NyaXB0aW9uIDoge1xuICAgICAgICAgICAgICAgIHRpdGxlIDogXCJJc29jaHJvbmUvSXNvZGlzdGFuY2VcIixcbiAgICAgICAgICAgICAgICBkZXNjcmlwdGlvbiA6IFwiaXNvY2hyb25lL2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2lucyB1bmUgbcOpdGhvZGVcbiAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5tZXRob2RzLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBvcHRpb25zLm1ldGhvZHMgPSBudWxsO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBvcHRpb25zLm1ldGhvZHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2Ygb3B0aW9ucy5tZXRob2RzW2ldICE9PSBcInN0cmluZ1wiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nZ2VyLmxvZyhcIltvbC5jb250cm9sLklzb2N1cnZlXSBFUlJPUiA6IHBhcmFtZXRlciAnbWV0aG9kcycgZWxlbWVudHMgc2hvdWxkIGJlIG9mIHR5cGUgJ3N0cmluZydcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGxvZ2dlci53YXJuKFwiJ21ldGhvZHMnIHBhcmFtZXRlciBzaG91bGQgYmUgYW4gYXJyYXlcIik7XG4gICAgICAgICAgICAgICAgb3B0aW9ucy5tZXRob2RzID0gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIG1vZGUgZGUgdHJhbnNwb3J0XG4gICAgICAgIGlmIChvcHRpb25zLmdyYXBocykge1xuICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkob3B0aW9ucy5ncmFwaHMpKSB7XG4gICAgICAgICAgICAgICAgLy8gb24gbmUgcGVybWV0IHBhcyBkZSBwYXNzZXIgdW4gdGFibGVhdSB2aWRlIDogb24gc3DDqWNpZmllIGF1IG1vaW5zIHVuIGdyYXBoXG4gICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMuZ3JhcGhzLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmdyYXBocyA9IG51bGw7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IG9wdGlvbnMuZ3JhcGhzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMuZ3JhcGhzW2ldICE9PSBcInN0cmluZ1wiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nZ2VyLmxvZyhcIltvbC5jb250cm9sLklzb2N1cnZlXSBFUlJPUiA6IHBhcmFtZXRlciAnZ3JhcGhzJyBlbGVtZW50cyBzaG91bGQgYmUgb2YgdHlwZSAnc3RyaW5nJ1wiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMuZ3JhcGhzW2ldLnRvTG93ZXJDYXNlKCkgPT09IFwicGlldG9uXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5ncmFwaHNbaV0gPSBcIlBpZXRvblwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5ncmFwaHNbaV0udG9Mb3dlckNhc2UoKSA9PT0gXCJ2b2l0dXJlXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5ncmFwaHNbaV0gPSBcIlZvaXR1cmVcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGxvZ2dlci53YXJuKFwiJ2dyYXBocycgcGFyYW1ldGVyIHNob3VsZCBiZSBhbiBhcnJheVwiKTtcbiAgICAgICAgICAgICAgICBvcHRpb25zLmdyYXBocyA9IG51bGw7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBzZW5zIGR1IHBhcmNvdXJzXG4gICAgICAgIGlmIChvcHRpb25zLmRpcmVjdGlvbnMpIHtcbiAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KG9wdGlvbnMuZGlyZWN0aW9ucykpIHtcbiAgICAgICAgICAgICAgICAvLyBvbiBuZSBwZXJtZXQgcGFzIGRlIHBhc3NlciB1biB0YWJsZWF1IHZpZGUgOiBvbiBzcMOpY2lmaWUgYXUgbW9pbnMgdW5lIGRpcmVjdGlvblxuICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLmRpcmVjdGlvbnMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMuZGlyZWN0aW9ucyA9IG51bGw7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IG9wdGlvbnMuZGlyZWN0aW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBvcHRpb25zLmRpcmVjdGlvbnNbaV0gIT09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2dnZXIubG9nKFwiW29sLmNvbnRyb2wuSXNvY3VydmVdIEVSUk9SIDogcGFyYW1ldGVyICdkaXJlY3Rpb25zJyBlbGVtZW50cyBzaG91bGQgYmUgb2YgdHlwZSAnc3RyaW5nJ1wiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICA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y5pbml0aWFsaXplKCkgYW5kIGluaXRpYWxpemUgZXhjbHVzaW9uc1xuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBJc29jdXJ2ZS5wcm90b3R5cGUuX2luaXRFeGNsdXNpb25zID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAvLyBFeGNsdXNpb25zIHNlbGVjdGlvbm7DqWVzIDogVHVubmVsLCBUb2xsIGV0IEJyaWRnZVxuICAgICAgICB0aGlzLl9jdXJyZW50RXhjbHVzaW9ucyA9IFtdOyAvLyBwYXIgZGVmYXV0XG5cbiAgICAgICAgLy8gcGFyIGRlZmF1dFxuICAgICAgICB2YXIgZXhjbHVzaW9uID0gdGhpcy5vcHRpb25zLmV4Y2x1c2lvbnM7XG4gICAgICAgIGlmICghZXhjbHVzaW9uIHx8ICh0eXBlb2YgZXhjbHVzaW9uID09PSBcIm9iamVjdFwiICYmIE9iamVjdC5rZXlzKGV4Y2x1c2lvbikubGVuZ3RoID09PSAwKSkge1xuICAgICAgICAgICAgdGhpcy5vcHRpb25zLmV4Y2x1c2lvbnMgPSB7XG4gICAgICAgICAgICAgICAgdG9sbCA6IGZhbHNlLFxuICAgICAgICAgICAgICAgIHR1bm5lbCA6IGZhbHNlLFxuICAgICAgICAgICAgICAgIGJyaWRnZSA6IGZhbHNlXG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gb3B0aW9uXG4gICAgICAgIGlmIChleGNsdXNpb24gJiYgdHlwZW9mIGV4Y2x1c2lvbiA9PT0gXCJvYmplY3RcIiAmJiBPYmplY3Qua2V5cyhleGNsdXNpb24pLmxlbmd0aCkge1xuICAgICAgICAgICAgZm9yICh2YXIgayBpbiBleGNsdXNpb24pIHtcbiAgICAgICAgICAgICAgICBpZiAoZXhjbHVzaW9uLmhhc093blByb3BlcnR5KGspKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChleGNsdXNpb24uaykge1xuICAgICAgICAgICAgICAgICAgIC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Zm9ybSk7XG5cbiAgICAgICAgLy8gd2FpdGluZ1xuICAgICAgICB2YXIgd2FpdGluZyA9IHRoaXMuX3dhaXRpbmdDb250YWluZXIgPSB0aGlzLl9jcmVhdGVJc29XYWl0aW5nRWxlbWVudCgpO1xuICAgICAgICBwYW5lbC5hcHBlbmRDaGlsZCh3YWl0aW5nKTtcblxuICAgICAgICBjb250YWluZXIuYXBwZW5kQ2hpbGQocGFuZWwpO1xuXG4gICAgICAgIC8vIGhpZGUgYXV0b2NvbXBsZXRlIHN1Z2dlc3RlZCBsb2NhdGlvbnMgb24gY29udGFpbmVyIGNsaWNrXG4gICAgICAgIGlmIChjb250YWluZXIuYWRkRXZlbnRMaXN0ZW5lcikge1xuICAgICAgICAgICAgY29udGFpbmVyLmFkZEV2ZW50TGlzdGVuZXIoXCJjbGlja1wiLCAoZSkgPT4gdGhpcy5faGlkZUlzb1N1Z2dlc3RlZExvY2F0aW9ucyhlKSk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gY29udGFpbmVyO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBDcmVhdGUgc3RhcnQgcG9pbnRcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7T2JqZWN0fSBtYXAgLSB0aGUgbWFwXG4gICAgICpcbiAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSBET00gZWxlbWVudFxuICAgICAqIEBwcml2YXRlXG4gICAgICovXG4gICAgSXNvY3VydmUucHJvdG90eXBlLl9jcmVhdGVJc29QYW5lbEZvcm1Qb2ludEVsZW1lbnQgPSBmdW5jdGlvbiAobWFwKSB7XG4gICAgICAgIHRoaXMuX29yaWdpblBvaW50ID0gbmV3IExvY2F0aW9uU2VsZWN0b3Ioe1xuICAgICAgICAgICAgYXBpS2V5IDogdGhpcy5vcHRpb25zLmFwaUtleSB8fCBudWxsLFxuICAgICAgICAgICAgdGFnIDoge1xuICAgICAgICAgICAgICAgIGlkIDogMSxcbiAgICAgICAgICAgICAgICBncm91cElk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IjtcbiAgICAgICAgICAgICAgICAvLyBldCBhdSBjbGljIHN1ciBsYSBjYXJ0ZSwgb24gcsOpYWZmaWNoZXJhIGxlIGZvcm11bGFpcmUgXCJub3JtYWxcIlxuICAgICAgICAgICAgICAgIHRoaXMubGlzdGVuZXJLZXkgPSBtYXAub24oXG4gICAgICAgICAgICAgICAgICAgIFwiY2xpY2tcIixcbiAgICAgICAgICAgICAgICAgICAgKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5fZm9ybUNvbnRhaW5lci5jbGFzc05hbWUgPSBcIlwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5kaXNwYXRjaEV2ZW50KFwiaXNvY3VydmU6ZHJhd2VuZFwiKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIHNpIG9uIGTDqXNlbGVjdGlvbm5lIGxlIHBvaW50ZXIsIG9uIHLDqXRhYmxpdCBsZSBmb3JtdWxhaXJlIGVuIG1vZGUgbm9ybWFsXG4gICAgICAgICAgICAgICAgc2VsZi5fZm9ybUNvbnRhaW5lci5jbGFzc05hbWUgPSBcIlwiO1xuICAgICAgICAgICAgICAgIC8vIGV0IG9uIGVubMOodmUgbCfDqWNvdXRldXIgZCfDqXbDqG5lbWVudCBzdXIgbGEgY2FydGVcbiAgICAgICAgICAgICAgICAvLyBtYXAudW4oXCJjbGlja1wiLCAoKSA9PiB7IHNlbGYuX2Zvcm1Db250YWluZXIuY2xhc3NOYW1lID0gXCJcIjsgfSk7XG4gICAgICAgICAgICAgICAgb2xPYnNlcnZhYmxlVW5CeUtleSh0aGlzLmxpc3RlbmVyS2V5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgKiBldmVudCB0cmlnZ2VyZWQgYXQgdGhlIHN0YXJ0IG9mIGRyYXdpbmcgaW5wdXRcbiAgICAgICAgICAgICpcbiAgICAgICAgICAgICogQGV2ZW50IGlzb2N1cnZlOmRyYXdzdGFydFxuICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIHNlbGYuZGlzcGF0Y2hFdmVudChcImlzb2N1cnZlOmRyYXdzdGFydFwiKTtcbiAgICAgICAgfTtcbiAgICAgICAgLy8gY2xpY2sgc3VyIGxlIGxhYmVsXG4gICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKFwiR1Bsb2NhdGlvbk9yaWdpbkxhYmVsXzEtXCIgKyB0aGlzLl91aWQpLm9uY2xpY2sgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICBzZWxmLl9jbGVhckdlb2pzb25MYXllcigpO1xuICAgICAgICAgICAgc2VsZi5fZm9ybUNvbnRhaW5lci5jbGFzc05hbWUgPSBcIlwiO1xuICAgICAgICAgICAgLy8gb24gZMOpc2FjdGl2ZSBsJ8OpY291dGV1ciBkJ8OpdsOpbmVtZW50cyBzdXIgbGEgY2FydGUgKHBvdXIgbmUgcGFzIHBsYWNlciB1biBtYXJrZXIgYXUgY2xpYylcbiAgICAgICAgICAgIG1hcC51bihcbiAgICAgICAgICAgICAgICBcImNsaWNrXCIsXG4gICAgICAgICAgICAgICAgKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLl9mb3JtQ29udGFpbmVyLmNsYXNzTmFtZSA9IFwiXCI7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIHNlbGYuZGlzcGF0Y2hFdmVudChcImlzb2N1cnZlOmRyYXdlbmRcIik7XG4gICAgICAgIH07XG4gICAgICAgIC8vIGNsaWNrIHN1ciBsYSB6b25lIGRlIHNhaXNpZVxuICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChcIkdQbG9jYXRpb25PcmlnaW5fMS1cIiArIHRoaXMuX3VpZCkub25jbGljayA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIH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XNvY2hyb25WYWx1ZUNocm9uSW5wdXQxLVwiICsgdGhpcy5fdWlkKTtcbiAgICAgICAgICAgIHZhciBob3VycyA9IHBhcnNlSW50KHRpbWVIb3VySW5wdXQudmFsdWUsIDEwKTtcbiAgICAgICAgICAgIGlmIChpc05hTiAmJiBpc05hTihob3VycykpIHtcbiAgICAgICAgICAgICAgICBob3VycyA9IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgdGltZU1pbnV0ZXNJbnB1dCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKFwiR1Bpc29jaHJvblZhbHVlQ2hyb25JbnB1dDItXCIgKyB0aGlzLl91aWQpO1xuICAgICAgICAgICAgdmFyIG1pbnV0ZXMgPSBwYXJzZUludCh0aW1lTWludXRlc0lucHV0LnZhbHVlLCAxMCk7XG4gICAgICAgICAgICBpZiAoaXNOYU4gJiYgaXNOYU4obWludXRlcykpIHtcbiAgICAgICAgICAgICAgICBtaW51dGVzID0gMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIGR1csOpZSBleHByaW3DqWUgZW4gc2Vjb25kZXNcbiAgICAgICAgICAgIHRpbWUgPSBob3VycyAqIDM2MDAgKyBtaW51dGVzICogNjA7XG4gICAgICAgICAgICBsb2dnZXIubG9nKFwidGltZSA6IFwiICsgdGltZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHRoaXMuX2N1cnJlbnRDb21wdXRhdGlvbi50b0xvd2VyQ2FzZSgpID09PSBcImRpc3RhbmNlXCIpIHtcbiAgICAgICAgICAgIHZhciBkaXN0SW5wdXQgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChcIkdQaXNvY2hyb25WYWx1ZURpc3RJbnB1dC1cIiArIHRoaXMuX3VpZCk7XG4gICAgICAgICAgICAvLyBkaXN0YW5jZSBleHByaW3DqWUgZW4gbcOodHJlc1xuICAgICAgICAgICAgZGlzdGFuY2UgPSBwYXJzZUZsb2F0KGRpc3RJbnB1dC52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29sLFxuICAgICAgICAgICAgLy8gY2FsbGJhY2sgb25TdWNjZXNzXG4gICAgICAgICAgICBvblN1Y2Nlc3MgOiBmdW5jdGlvbiAocmVzdWx0cykge1xuICAgICAgICAgICAgICAgIGxvZ2dlci5sb2cocmVzdWx0cyk7XG4gICAgICAgICAgICAgICAgaWYgKHJlc3VsdHMpIHtcbiAgICAgICAgICAgICAgICAgICAgY29udGV4dC5fZHJhd0lzb1Jlc3VsdHMocmVzdWx0cyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChiT25TdWNjZXNzKSB7XG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMub25TdWNjZXNzLmNhbGwoY29udGV4dCwgcmVzdWx0cyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIC8vIGNhbGxiYWNrIG9uRmFpbHVyZVxuICAgICAgICAgICAgb25GYWlsdXJlIDogZnVuY3Rpb24gKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgLy8gRklYTUUgbWlzZSDDoCBqb3VyIGR1IGNvbnRyb2xlIG1haXMgbGUgc2VydmljZSBuZSByZXBvbmQgcGFzIGVuIDIwMCAhP1xuICAgICAgICAgICAgICAgIGNvbnRleHQuX2hpZGVXYWl0aW5nQ29udGFpbmVyKCk7XG4gICAgICAgICAgICAgICAgbG9nZ2VyLmxvZyhlcnJvci5tZXNzYWdlKTtcbiAgICAgICAgICAgICAgICBpZiAoYk9uRmFpbHVyZSkge1xuICAgICAgICAgICAgICAgICAgICBvcHRpb25zLm9uRmFpbHVyZS5jYWxsKGNvbnRleHQsIGVycm9yKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgICAgIGlmICgodGhpcy5fY3VycmVudERpcmVjdGlvbi50b0xvd2VyQ2FzZSgpID09PSBcImFycml2YWxcIikgfHwgKG9wdGlvbnMucmV2ZXJzZSkpIHtcbiAgICAgICAgICA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uIGNyw6lhdGlvbiBkZSBsJ29iamV0IGdlb0pTT05cbiAgICAgICAgdGhpcy5fZ2VvanNvbk9iamVjdCA9IHtcbiAgICAgICAgICAgIHR5cGUgOiBcIkZlYXR1cmVDb2xsZWN0aW9uXCIsXG4gICAgICAgICAgICBjcnMgOiB7XG4gICAgICAgICAgICAgICAgdHlwZSA6IFwibmFtZVwiLFxuICAgICAgICAgICAgICAgIHByb3BlcnRpZXMgOiB7XG4gICAgICAgICAgICAgICAgICAgIG5hbWUgOiBcIkVQU0c6NDMyNlwiXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGZlYXR1cmVzIDogW1xuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZSA6IFwiRmVhdHVyZVwiLFxuICAgICAgICAgICAgICAgICAgICBjcnMgOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlIDogXCJuYW1lXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0aWVzIDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWUgOiBcIkVQU0c6NDMyNlwiXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIGdlb21ldHJ5IDogcmVzdWx0cy5nZW9tZXRyeVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIF1cbiAgICAgICAgfTtcbiAgICAgICAgdGhpcy5fZ2VvanNvbk9iamVjdC5mZWF0dXJlcy5wdXNoKHtcbiAgICAgICAgICAgIHR5cGUgOiBcIkZlYXR1cmVcIixcbiAgICAgICAgICAgIGdlb21ldHJ5IDoge1xuICAgICAgICAgICAgICAgIHR5cGUgOiBcIlBvaW50XCIsXG4gICAgICAgICAgICAgICAgY29vcmRpbmF0ZXMgOiB0aGlzLl9vcmlnaW5Qb2ludC5nZXRDb29yZGluYXRlKClcbiAgICAgICAg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7XG4gICAgICAgICAgICAgICAgICAgIC8vIHVuIGxheWVyIHN3aXRjaGVyIGVzdCBwcsOpc2VudCBkYW5zIGxhIGNhcnRlXG4gICAgICAgICAgICAgICAgICAgIHZhciBsYXllcklkID0gdGhpcy5fZ2VvanNvbkxheWVyLmdwTGF5ZXJJZDtcbiAgICAgICAgICAgICAgICAgICAgLy8gb24gbidham91dGUgZGVzIGluZm9ybWF0aW9ucyBxdWUgcydpbCBuJ3kgZW4gYSBwYXMgZMOpasOgIChzaSBsZSB0aXRyZSBlc3QgbGUgbnVtw6lybyBwYXIgZMOpZmF1dClcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbnRyb2wuX2xheWVyc1tsYXllcklkXS50aXRsZSA9PT0gbGF5ZXJJZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5hZGRMYXllcihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9nZW9qc29uTGF5ZXIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGUgOiB0aGlzLm9wdGlvbnMubGF5ZXJEZXNjcmlwdGlvbi50aXRsZSArIFwiIChcIiArIG1ldGhvZCArIFwiL1wiICsgZ3JhcGggKyBcIilcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzY3JpcHRpb24gOiB0aGlzLm9wdGlvbnMubGF5ZXJEZXNjcmlwdGlvbi5kZXNjcmlwdGlvblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICk7XG4gICAgfTtcblxuICAgIC8vICMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMgLy9cbiAgICAvLyAjIyMjIyMjIyMjIy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HV0TGFiZWxDb250YWluZXIuaW5uZXJIVE1MID0gXCJEw6lwYXJ0XCI7XG4gICAgICAgIH1cblxuICAgICAgICAvLyA2LiBzZXQgZXhjbHVzaW9ucyB0byBkZWZhdWx0XG4gICAgICAgIHZhciB0b2xsSW5wdXQgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChcIkdQaXNvRXhjbHVzaW9uc1RvbGwtXCIgKyB0aGlzLl91aWQpO1xuICAgICAgICBpZiAodG9sbElucHV0KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5fY3VycmVudEV4Y2x1c2lvbnMuaW5kZXhPZihcInRvbGxcIikgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgdG9sbElucHV0LmNoZWNrZWQgPSBmYWxzZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdG9sbElucHV0LmNoZWNrZWQgPSB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHZhciB0dW5uZWxJbnB1dCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKFwiR1Bpc29FeGNsdXNpb25zVHVubmVsLVwiICsgdGhpcy5fdWlkKTtcbiAgICAgICAgaWYgKHR1bm5lbElucHV0KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5fY3VycmVudEV4Y2x1c2lvbnMuaW5kZXhPZihcInR1bm5lbFwiKSAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICB0dW5uZWxJbnB1dC5jaGVja2VkID0gZmFsc2U7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHR1bm5lbElucHV0LmNoZWNrZWQgPSB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHZhciBicmlkZ2VJbnB1dCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKFwiR1Bpc29FeGNsdXNpb25zQnJpZGdlLVwiICsgdGhpcy5fdWlkKTtcbiAgICAgICAgaWYgKGJy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aGlzLl93YWl0aW5nID0gdHJ1ZTtcblxuICAgICAgICAvLyBtaXNlIGVuIHBsYWNlIGQndW4gdGltZW91dCBwb3VyIHLDqWluaXRpYWxpc2VyIGxlIHBhbmVsIChjYWNoZXIgbGEgcGF0aWVuY2UpXG4gICAgICAgIC8vIHNpIG9uIGVzdCB0b3Vqb3VycyBlbiBhdHRlbnRlIChzaSBsYSByZXF1w6p0ZSBlc3QgYmxvcXXDqWUgcGFyIGV4ZW1wbGUpXG4gICAgICAgIHZhciBvcHRzID0gdGhpcy5vcHRpb25zLmlzb2N1cnZlT3B0aW9ucztcbiAgICAgICAgaWYgKG9wdHMgJiYgb3B0cy50aW1lT3V0KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5fdGltZXIpIHtcbiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGhpcy5fdGltZXIpO1xuICAgICAgICAgICAgICAgIHRoaXMuX3RpbWVyID0gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBjb250ZXh0ID0gdGhpcztcbiAgICAgICAgICAgIHRoaXMuX3RpbWVyID0gc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgaWYgKGNvbnRleHQuX3dhaXRpbmcgPT09IHRydWUpIHtcbiAgICAgICAgICAgICAgICAgICAgY29udGV4dC5faGlkZVdhaXRpbmdDb250YWluZXIoKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBpZiAoY29udGV4dC5fdGltZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dChjb250ZXh0Ll90aW1lcik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LCAxNjAwMCk7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogdGhpcyBtZXRob2QgaGlkZXMgd2FpdGluZyBjb250YWluZXIgYW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h0eXBlb2YgeSA9PT0gXCJvYmplY3RcIiAmJiB5ICE9IG51bGwpKSB7XG4gICAgICAgIGlmIChPYmplY3Qua2V5cyh4KS5sZW5ndGggIT09IE9iamVjdC5rZXlzKHkpLmxlbmd0aCkge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG5cbiAgICAgICAgZm9yICh2YXIgcHJvcCBpbiB4KSB7XG4gICAgICAgICAgICBpZiAoeS5oYXNPd25Qcm9wZXJ0eShwcm9wKSkge1xuICAgICAgICAgICAgICAgIGlmICghZGVlcEVxdWFsKHhbcHJvcF0sIHlbcHJvcF0pKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9IGVsc2Uge1xuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxufTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/OpenLayers/Controls/Isocurve.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CSS_Controls_Isochrone_GPisochronOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../CSS/Controls/Isochrone/GPisochronOpenLayers.css */ \"./src/OpenLayers/CSS/Controls/Isochrone/GPisochronOpenLayers.css\");\n/* harmony import */ var _CSS_Controls_Isochrone_GPisochronOpenLayers_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_Isochrone_GPisochronOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ol/control/Control */ \"ol/control/Control\");\n/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_control_Control__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ol/Observable */ \"ol/Observable\");\n/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ol_Observable__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ol/layer/Vector */ \"ol/layer/Vector\");\n/* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ol_layer_Vector__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var ol_source_Vector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ol/source/Vector */ \"ol/source/Vector\");\n/* harmony import */ var ol_source_Vector__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(ol_source_Vector__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ol/style */ \"ol/style\");\n/* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(ol_style__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! geoportal-access-lib */ \"./node_modules/geoportal-access-lib/src/Gp.js\");\n/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Common/Utils */ \"./src/Common/Utils.js\");\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Common/Utils/SelectorID */ \"./src/Common/Utils/SelectorID.js\");\n/* harmony import */ var _Utils_Markers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Utils/Markers */ \"./src/OpenLayers/Controls/Utils/Markers.js\");\n/* harmony import */ var _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Common/Utils/Draggable */ \"./src/Common/Utils/Draggable.js\");\n/* harmony import */ var _Utils_Interactions__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Utils/Interactions */ \"./src/OpenLayers/Controls/Utils/Interactions.js\");\n/* harmony import */ var _LayerSwitcher__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./LayerSwitcher */ \"./src/OpenLayers/Controls/LayerSwitcher.js\");\n/* harmony import */ var _LocationSelector__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./LocationSelector */ \"./src/OpenLayers/Controls/LocationSelector.js\");\n/* harmony import */ var _Export__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Export */ \"./src/OpenLayers/Controls/Export.js\");\n/* harmony import */ var _Formats_GeoJSON__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../Formats/GeoJSON */ \"./src/OpenLayers/Formats/GeoJSON.js\");\n/* harmony import */ var _Common_Controls_IsoDOM__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../Common/Controls/IsoDOM */ \"./src/Common/Controls/IsoDOM.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n// import CSS\n\n// import OpenLayers\n\n\n\n\n// import GeoJSON from \"ol/format/GeoJSON\";\n\n// import geoportal library access\n\n// import local\n\n\n\n\n\n\n// import local with ol dependencies\n\n\n\n\n\n// DOM\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_8__[\"default\"].getLogger(\"isocurve\");\n\n/**\n * @classdesc\n *\n * Isocurve Control.\n *\n * @constructor\n * @alias ol.control.Isocurve\n * @type {ol.control.Isocurve}\n * @extends {ol.control.Control}\n * @param {Object} options - Isocurve control options\n * @param {String} [options.apiKey] - API key for services call (isocurve and autocomplete services). The key \"calcul\" is used by default.\n * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol)\n * @param {Boolean} [options.collapsed = true] - Specify if widget has to be collapsed (true) or not (false) on map loading. Default is true.\n * @param {Boolean} [options.draggable = false] - Specify if widget is draggable\n * @param {Boolean|Object} [options.export = false] - Specify if button \"Export\" is displayed. For the use of the options of the \"Export\" control, see {@link ol.control.Export}\n * @param {Object} [options.exclusions = {\"toll\" : false, \"tunnel\" : false, \"bridge\" : false}] - list of exclusions with status (true = checked). By default : no exclusions checked.\n * @param {Array} [options.graphs = [\"Voiture\", \"Pieton\"]] - list of graph resources to be used for isocurve calculation, by default : [\"Voiture\", \"Pieton\"]. Possible values are \"Voiture\" and \"Pieton\". The first element is selected.\n * @param {Array} [options.methods = [\"time\", \"distance\"]] - list of methods, by default : [\"time\", \"distance\"]. Possible values are \"time\" and \"distance\". The first element is selected by default.\n * @param {Array} [options.directions = [\"departure\", \"arrival\"]] - list of directions to be displayed, by default : [\"departure\", \"arrival\"]. The first element is selected by default. Possible values are \"departure\" and \"arrival\".\n * Directions enable to specify if input location point will be used as a departure point (\"departure\") or as an arrival point (\"arrival\")\n * @param {Object} [options.isocurveOptions = {}] - isocurve service options. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~isoCurve Gp.Services.isoCurve()} to know all isocurve options.\n * @param {Object} [options.autocompleteOptions = {}] - autocomplete service options. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~autoComplete Gp.Services.autoComplete()} to know all autocomplete options\n * @param {Object} [options.markerOpts] - options to use your own marker. Default is a lightOrange marker.\n * @param {String} [options.markerOpts.url] - marker base64 encoded url (ex \"data:image/png;base64,...\"\"). Mandatory for a custom marker\n * @param {Array} [options.markerOpts.offset] - 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. Default is [0, 0]. (see http://openlayers.org/en/latest/apidoc/ol.Overlay.html)\n * @param {Object} [options.layerDescription = {}] - Layer informations to be displayed in LayerSwitcher widget (only if a LayerSwitcher is also added to the map)\n * @param {String} [options.layerDescription.title = \"Isochrone/Isodistance\"] - Layer title to be displayed in LayerSwitcher\n * @param {String} [options.layerDescription.description = \"isochrone/isodistance basé sur un graphe\"] - Layer description to be displayed in LayerSwitcher\n * @fires isocurve:drawstart\n * @fires isocurve:drawend\n * @fires isocurve:compute\n * @fires export:compute\n * @example\n * var iso = ol.control.Isocurve({\n * \"collapsed\" : false,\n * \"draggable\" : true,\n * \"export\" : false,\n * \"methods\" : [\"time\", \"distance\"],\n * \"exclusions\" : {\n * \"toll\" : true,\n * \"bridge\" : false,\n * \"tunnel\" : true\n * },\n * \"graphs\" : [\"Pieton\", \"Voiture\"],\n * \"markerOpts\" : {\n * \"url\" : \"...\",\n * \"offset\" : [0,0]\n * }\n * \"isocurveOptions\" : {},\n * \"autocompleteOptions\" : {}\n * });\n *\n * // if you want to pluggued the control Export with options :\n * var iso = new ol.control.Isocurve({\n * export : {\n * name : \"export\",\n * format : \"geojson\",\n * title : \"Exporter\",\n * menu : false\n * }\n * });\n */\nvar Isocurve = function (Control) {\n /**\n * See {@link ol.control.Isocurve}\n * @module Isocurve\n * @alias module:~Controls/Isocurve\n * @param {*} options - options\n * @example\n * import Isocurve from \"src/OpenLayers/Controls/Isocurve\"\n */\n function Isocurve(options) {\n options = options || {};\n if (!(this instanceof Isocurve)) {\n throw new TypeError(\"ERROR CLASS_CONSTRUCTOR\");\n }\n\n // initialisation du composant\n this.initialize(options);\n\n // // Widget main DOM container\n this._container = this._createMainContainerElement();\n // info: le container sera complété lors de l'ajout à la carte (setMap), car certains composants nécessitent d'être liés à la map.\n this._containerElement = null;\n\n // on peut éventuellement encapsuler le composant dans une div passée par l'utilisateur\n if (options.element && options.element.appendChild) {\n // dans ce cas on stocke les deux container\n options.element.appendChild(this._container);\n this._containerElement = options.element;\n }\n\n // call ol.control.Control constructor\n Control.call(this, {\n element: this._containerElement || this._container,\n target: options.target,\n render: options.render\n });\n }\n ;\n\n // Inherits from ol.control.Control\n if (Control) Isocurve.__proto__ = Control;\n\n /**\n * @lends module:Isocurve\n */\n Isocurve.prototype = Object.create(Control.prototype, {});\n\n // on récupère les méthodes de la classe commune IsoDOM\n _Common_Utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].assign(Isocurve.prototype, _Common_Controls_IsoDOM__WEBPACK_IMPORTED_MODULE_17__[\"default\"]);\n\n /**\n * Constructor (alias)\n *\n * @private\n */\n Isocurve.prototype.constructor = Isocurve;\n\n /**\n * Overwrite OpenLayers setMap method\n *\n * @param {ol.Map} map - Map.\n */\n Isocurve.prototype.setMap = function (map) {\n if (map) {\n // enrichissement du DOM du container lors de l'ajout à la carte\n this._container = this._initContainer(map);\n\n // ajout d'un bouton d'export\n if (this.options[\"export\"]) {\n var opts = _Common_Utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].assign({\n control: this\n }, this.options[\"export\"]);\n this[\"export\"] = new _Export__WEBPACK_IMPORTED_MODULE_15__[\"default\"](opts);\n this[\"export\"].render();\n var self = this;\n this[\"export\"].on(\"export:compute\", function (e) {\n self.dispatchEvent({\n type: \"export:compute\",\n content: e.content\n });\n });\n }\n\n // mode \"draggable\"\n if (this.draggable) {\n _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_11__[\"default\"].dragElement(this._IsoPanelContainer, this._IsoPanelHeaderContainer, map.getTargetElement());\n }\n }\n\n // on appelle la méthode setMap originale d'OpenLayers\n Control.prototype.setMap.call(this, map);\n };\n\n // ################################################################### //\n // ##################### public methods ############################## //\n // ################################################################### //\n\n /**\n * Returns true if widget is collapsed (minimized), false otherwise\n *\n * @returns {Boolean} collapsed - true if widget is collapsed\n */\n Isocurve.prototype.getCollapsed = function () {\n return this.collapsed;\n };\n\n /**\n * Collapse or display widget main container\n *\n * @param {Boolean} collapsed - True to collapse widget, False to display it\n */\n Isocurve.prototype.setCollapsed = function (collapsed) {\n if (collapsed === undefined) {\n logger.log(\"[ERROR] Isocurve:setCollapsed - missing collapsed parameter\");\n return;\n }\n if (collapsed && this.collapsed || !collapsed && !this.collapsed) {\n return;\n }\n if (collapsed) {\n document.getElementById(\"GPisochronPanelClose-\" + this._uid).click();\n } else {\n document.getElementById(\"GPshowIsochronPicto-\" + this._uid).click();\n }\n this.collapsed = collapsed;\n };\n\n /**\n * Get vector layer where Isocurve geometry is drawn\n *\n * @returns {Object} layer - ol.layer.Vector isocurve layer\n */\n Isocurve.prototype.getLayer = function () {\n return this._geojsonLayer;\n };\n\n /**\n * Set vector layer where Isocurve geometry is drawn\n *\n * @param {Object} layer - ol.layer.Vector isocurve layer\n */\n Isocurve.prototype.setLayer = function (layer) {\n if (!layer) {\n this._geojsonLayer = null;\n return;\n }\n if (!(layer instanceof ol_layer_Vector__WEBPACK_IMPORTED_MODULE_3___default.a)) {\n logger.log(\"no valid layer given for hosting drawn features.\");\n return;\n }\n\n // application des styles\n layer.setStyle(this._defaultFeatureStyle);\n\n // sauvegarde\n this._geojsonLayer = layer;\n };\n\n /**\n * Get vector layer\n *\n * @returns {String} geojson - GeoJSON format layer\n */\n Isocurve.prototype.getGeoJSON = function () {\n return JSON.stringify(this._geojsonObject);\n };\n\n /**\n * Set vector layer\n *\n * @param {String} geojson - GeoJSON format layer\n */\n Isocurve.prototype.setGeoJSON = function (geojson) {\n try {\n this._geojsonObject = JSON.parse(geojson);\n } catch (e) {\n logger.log(\"no valid geojson given :\" + e.message);\n }\n };\n\n /**\n * Get isocurve data\n *\n * @returns {Object} data - process results\n */\n Isocurve.prototype.getData = function () {\n var data = {\n type: \"isocurve\",\n transport: this._currentTransport,\n computation: this._currentComputation,\n exclusions: this._currentExclusions,\n direction: this._currentDirection,\n point: this._originPoint.getCoordinate(),\n // lon/lat wgs84\n results: {}\n };\n _Common_Utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].assign(data.results, this._currentIsoResults);\n return data;\n };\n\n /**\n * Set isocurve data\n *\n * @param {Object} data - control informations\n * @param {String} data.transport - transport type\n * @param {String} data.computation - computation type\n * @param {Array} data.exclusions - list of exclusions\n * @param {String} data.direction - direction type\n * @param {Array} data.point - [lon, lat]\n * @param {Object} data.results - service response\n */\n Isocurve.prototype.setData = function (data) {\n this._currentTransport = data.transport;\n this._currentComputation = data.computation;\n this._currentExclusions = data.exclusions;\n this._currentDirection = data.direction;\n // INFO\n // > this._originPoint.clear();\n // l'utilisation de cette méthode declenche des evenements qui retirent la couche en cours !\n // (cf. _createIsoPanelFormPointElement),\n var inputPointer = document.getElementById(\"GPlocationOriginPointer_\" + 1 + \"-\" + this._uid);\n inputPointer.checked = true;\n var inputCoords = document.getElementById(\"GPlocationOriginCoords_\" + 1 + \"-\" + this._uid);\n inputCoords.value = \"\";\n this._originPoint.setCoordinate(data.point, \"EPSG:4326\");\n this._currentIsoResults = data.results;\n };\n\n /**\n * Get container\n *\n * @returns {DOMElement} container\n */\n Isocurve.prototype.getContainer = function () {\n return this._container;\n };\n\n /**\n * Get default style\n *\n * @returns {ol.style} style\n */\n Isocurve.prototype.getStyle = function () {\n return this._defaultFeatureStyle;\n };\n\n /**\n * This method is public.\n * It allows to control the execution of a traitment.\n *\n * @param {Array} position - position in the projection map [ x, y ]\n * @param {Object} value - distance in km or hours-minutes\n * @param {Object} options - options = {...}\n */\n Isocurve.prototype.compute = function (position, value, options) {\n this._clear();\n if (!this._showIsoContainer.checked) {\n this._pictoIsoContainer.click();\n }\n var map = this.getMap();\n if (!map) {\n return;\n }\n\n // Les options par defauts\n var settings = {\n direction: \"departure\",\n method: \"time\",\n transport: \"Voiture\",\n exclusions: []\n };\n\n // On recupere les options\n _Common_Utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].assign(settings, options);\n this._originPoint.setCoordinate(position);\n var coordinate = this._originPoint.getCoordinate();\n var input = document.getElementById(\"GPlocationOrigin_\" + 1 + \"-\" + this._uid);\n input.value = coordinate[0].toFixed(4) + \" / \" + coordinate[1].toFixed(4);\n this._currentTransport = settings.transport;\n if (settings.transport === \"Voiture\") {\n document.getElementById(\"GPisochronTransportCar-\" + this._uid).checked = true;\n } else {\n document.getElementById(\"GPisochronTransportPedestrian-\" + this._uid).checked = true;\n }\n this._currentExclusions = settings.exclusions;\n this._currentComputation = settings.method;\n if (settings.method === \"time\") {\n var time = value.split(\".\");\n this._currentTimeHour = time[0] || 0;\n document.getElementById(\"GPisochronValueChronInput1-\" + this._uid).value = this._currentTimeHour;\n this._currentTimeMinute = time[1] || 0;\n document.getElementById(\"GPisochronValueChronInput2-\" + this._uid).value = this._currentTimeMinute;\n document.getElementById(\"GPisochronChoiceAltChron-\" + this._uid).click();\n } else {\n this._currentDistance = value;\n document.getElementById(\"GPisochronValueDistInput-\" + this._uid).value = this._currentDistance;\n document.getElementById(\"GPisochronChoiceAltDist-\" + this._uid).click();\n }\n this._currentDirection = settings.direction;\n settings.direction === \"departure\" ? document.getElementById(\"GPisochronDirectionSelect-\" + this._uid).selectedIndex = 0 : document.getElementById(\"GPisochronDirectionSelect-\" + this._uid).selectedIndex = 1;\n this.onIsoComputationSubmit();\n };\n\n /**\n * This method is public.\n * It allows to init the control.\n */\n Isocurve.prototype.init = function () {\n // point\n var coordinate = this._originPoint.getCoordinate();\n var input = document.getElementById(\"GPlocationOrigin_\" + 1 + \"-\" + this._uid);\n input.value = coordinate[1].toFixed(4) + \" / \" + coordinate[0].toFixed(4);\n\n // transport\n if (this._currentTransport === \"Voiture\") {\n document.getElementById(\"GPisochronTransportCar-\" + this._uid).checked = true;\n } else {\n document.getElementById(\"GPisochronTransportPedestrian-\" + this._uid).checked = true;\n }\n\n // method\n if (this._currentComputation === \"time\") {\n var minutes = this._currentIsoResults.time / 60;\n this._currentTimeHour = Math.floor(minutes / 60);\n document.getElementById(\"GPisochronValueChronInput1-\" + this._uid).value = this._currentTimeHour;\n this._currentTimeMinute = Math.round((minutes / 60 - this._currentTimeHour) * 60);\n document.getElementById(\"GPisochronValueChronInput2-\" + this._uid).value = this._currentTimeMinute;\n document.getElementById(\"GPisochronChoiceAltChron-\" + this._uid).click();\n } else {\n this._currentDistance = this._currentIsoResults.distance / 1000;\n document.getElementById(\"GPisochronValueDistInput-\" + this._uid).value = this._currentDistance;\n document.getElementById(\"GPisochronChoiceAltDist-\" + this._uid).click();\n }\n\n // direction\n this._currentDirection === \"departure\" ? document.getElementById(\"GPisochronDirectionSelect-\" + this._uid).selectedIndex = 0 : document.getElementById(\"GPisochronDirectionSelect-\" + this._uid).selectedIndex = 1;\n };\n\n /**\n * Clean UI : reinit control\n */\n Isocurve.prototype.clean = function () {\n this._clearIsoInputs();\n // INFO\n // le comportement est surchargé, ceci supprime la couche !?\n // cf. _createIsoPanelFormPointElement()\n this._originPoint.clearResults();\n document.getElementById(\"GPlocationPoint_1-\" + this._uid).style.cssText = \"\";\n document.getElementById(\"GPlocationOriginCoords_1-\" + this._uid).value = \"\";\n document.getElementById(\"GPlocationOrigin_1-\" + this._uid).value = \"\";\n document.getElementById(\"GPlocationPoint_1-\" + this._uid).style.cssText = \"\";\n document.getElementById(\"GPlocationOriginPointer_1-\" + this._uid).checked = false;\n document.getElementById(\"GPlocationOrigin_1-\" + this._uid).className = \"GPlocationOriginVisible\";\n document.getElementById(\"GPlocationOriginCoords_1-\" + this._uid).className = \"GPlocationOriginHidden\";\n this._currentIsoResults = null;\n this.setLayer();\n };\n\n // ################################################################### //\n // ##################### init component ############################## //\n // ################################################################### //\n\n /**\n * Initialize Isocurve control (called by Isocurve constructor)\n *\n * @param {Object} options - constructor options\n * @private\n */\n Isocurve.prototype.initialize = function (options) {\n this._checkInputOptions(options);\n\n // set default options\n this.options = {\n collapsed: true,\n draggable: false,\n \"export\": false,\n methods: [\"time\", \"distance\"],\n graphs: [\"Voiture\", \"Pieton\"],\n exclusions: {\n toll: false,\n tunnel: false,\n bridge: false\n },\n directions: [\"departure\", \"arrival\"],\n markerOpts: {\n url: _Utils_Markers__WEBPACK_IMPORTED_MODULE_10__[\"default\"][\"lightOrange\"],\n offset: _Utils_Markers__WEBPACK_IMPORTED_MODULE_10__[\"default\"].defaultOffset\n },\n isocurveOptions: {\n oldIsoService: true\n },\n autocompleteOptions: {},\n layerDescription: {\n title: \"Isochrone/Isodistance\",\n description: \"isochrone/isodistance basé sur un graphe\"\n }\n };\n\n // merge with user options\n _Common_Utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].assign(this.options, options);\n\n /** {Boolean} specify if isocurve control is collapsed (true) or not (false) */\n this.collapsed = this.options.collapsed;\n\n /** {Boolean} specify if isocurve control is draggable (true) or not (false) */\n this.draggable = this.options.draggable;\n\n // identifiant du contrôle : utile pour suffixer les identifiants CSS (pour gérer le cas où il y en a plusieurs dans la même page)\n this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_9__[\"default\"].generate();\n\n // Options du service paramétrables via l'interface (graph, method, exclusions)\n // Mode de transport selectionné : 'Voiture' ou 'Pieton'\n this._currentTransport = null;\n this._initTransport();\n // Mode de calcul selectionné : 'time' (isochron) ou 'distance' (isodistance)\n this._currentComputation = null;\n this._initComputation();\n // Exclusions selectionnées : Tunnel, Toll et Bridge\n this._currentExclusions = [];\n this._initExclusions();\n // sens de parcours : \"departure\" ou \"arrival\"\n this._currentDirection = null;\n this._initDirection();\n\n // point de saisie\n this._originPoint = null;\n\n // // containers principaux\n this._showIsoContainer = null;\n this._pictoIsoContainer = null;\n this._waitingContainer = null;\n this._formContainer = null;\n this._IsoPanelContainer = null;\n this._IsoPanelHeaderContainer = null;\n\n // les résultats du calcul\n this._currentIsoResults = null;\n\n // la géométrie\n this._geojsonLayer = null;\n this._geojsonObject = null;\n\n // bouton export\n this[\"export\"] = null;\n\n // si un calcul est en cours ou non\n this._waiting = false;\n // timer pour cacher la patience après un certain temps\n this._timer = null;\n\n // styles pour les sélections des features\n this._defaultFeatureStyle = new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Style\"]({\n fill: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Fill\"]({\n color: \"rgba(0, 183, 152, 0.7)\"\n }),\n stroke: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Stroke\"]({\n color: \"rgba(0, 183, 152, 0)\",\n width: 1\n })\n });\n\n // liste des ressources avec droits par service\n // Ex. {\n // \"Isocurve\" : {\n // key : \"ger4g456re45er456t4er5ge5\",\n // resources : [\"Pieton\", \"Voiture\"]\n // }\n // }\n this._resources = {};\n\n // listener key for event click on map\n this.listenerKey = null;\n };\n\n /**\n * this method is called by this.initialize()\n *\n * @param {Object} options - options\n *\n * @private\n */\n Isocurve.prototype._checkInputOptions = function (options) {\n // vérification des options\n // on ne permet pas de n'afficher aucun mode de calcul ou aucun mode de transport ?\n var i;\n\n // modes de calcul\n if (options.methods) {\n if (Array.isArray(options.methods)) {\n // on ne permet pas de passer un tableau vide : on spécifie au moins une méthode\n if (options.methods.length === 0) {\n options.methods = null;\n } else {\n for (i = 0; i < options.methods.length; i++) {\n if (typeof options.methods[i] !== \"string\") {\n logger.log(\"[ol.control.Isocurve] ERROR : parameter 'methods' elements should be of type 'string'\");\n }\n }\n }\n } else {\n logger.warn(\"'methods' parameter should be an array\");\n options.methods = null;\n }\n }\n\n // mode de transport\n if (options.graphs) {\n if (Array.isArray(options.graphs)) {\n // on ne permet pas de passer un tableau vide : on spécifie au moins un graph\n if (options.graphs.length === 0) {\n options.graphs = null;\n } else {\n for (i = 0; i < options.graphs.length; i++) {\n if (typeof options.graphs[i] !== \"string\") {\n logger.log(\"[ol.control.Isocurve] ERROR : parameter 'graphs' elements should be of type 'string'\");\n } else {\n if (options.graphs[i].toLowerCase() === \"pieton\") {\n options.graphs[i] = \"Pieton\";\n }\n if (options.graphs[i].toLowerCase() === \"voiture\") {\n options.graphs[i] = \"Voiture\";\n }\n }\n }\n }\n } else {\n logger.warn(\"'graphs' parameter should be an array\");\n options.graphs = null;\n }\n }\n\n // sens du parcours\n if (options.directions) {\n if (Array.isArray(options.directions)) {\n // on ne permet pas de passer un tableau vide : on spécifie au moins une direction\n if (options.directions.length === 0) {\n options.directions = null;\n } else {\n for (i = 0; i < options.directions.length; i++) {\n if (typeof options.directions[i] !== \"string\") {\n logger.log(\"[ol.control.Isocurve] ERROR : parameter 'directions' elements should be of type 'string'\");\n }\n }\n }\n } else {\n logger.warn(\"'directions' parameter should be an array\");\n options.directions = null;\n }\n }\n\n // collapsed\n if (options.collapsed === \"true\") {\n options.collapsed = true;\n }\n if (options.collapsed === \"false\") {\n options.collapsed = false;\n }\n };\n\n /**\n * this method is called by this.initialize() and initialize transport mode\n * (\"Voiture\" ou \"Pieton\")\n *\n * @private\n */\n Isocurve.prototype._initTransport = function () {\n // Mode de transport selectionné\n this._currentTransport = \"Voiture\"; // par defaut\n\n // par defaut\n var transports = this.options.graphs;\n if (!transports || transports.length === 0) {\n this.options.graphs = [\"Voiture\", \"Pieton\"];\n }\n\n // option\n if (Array.isArray(transports) && transports.length) {\n // FIXME pb si le 1er graphe n'est pas une ressource connue !\n if (transports[0] === \"Voiture\" || transports[0] === \"Pieton\") {\n this._currentTransport = transports[0];\n }\n }\n\n // si l'utilisateur a spécifié un graph dans le service, on surcharge les options du widget\n var serviceOptions = this.options.isocurveOptions;\n if (serviceOptions.graph) {\n this._currentTransport = serviceOptions.graph;\n }\n };\n\n /**\n * this method is called by this.initialize() and initialize computation mode\n * (time or distance)\n *\n * @private\n */\n Isocurve.prototype._initComputation = function () {\n // Mode de calcul selectionné\n this._currentComputation = \"time\"; // par defaut\n\n // par defaut\n var methods = this.options.methods;\n if (!methods || methods.length === 0) {\n this.options.methods = [\"time\", \"distance\"];\n }\n\n // option\n if (Array.isArray(methods) && methods.length) {\n // FIXME pb si le 1er graphe n'est pas une ressource connue !\n if (methods[0] === \"time\" || methods[0] === \"distance\") {\n this._currentComputation = methods[0];\n }\n }\n\n // si l'utilisateur a spécifié une méthode dans le service, on surcharge les options du widget\n var serviceOptions = this.options.isocurveOptions;\n if (serviceOptions.method) {\n this._currentComputation = serviceOptions.method;\n }\n if (serviceOptions.time) {\n this._currentComputation = \"time\";\n }\n if (serviceOptions.distance) {\n this._currentComputation = \"distance\";\n }\n };\n\n /**\n * this method is called by this.initialize() and initialize direction mode\n * (departure or arrival)\n *\n * @private\n */\n Isocurve.prototype._initDirection = function () {\n // Mode de calcul selectionné\n this._currentDirection = \"departure\"; // par defaut\n\n // par defaut\n var directions = this.options.directions;\n if (!directions || directions.length === 0) {\n this.options.directions = [\"departure\", \"arrival\"];\n }\n\n // option\n if (Array.isArray(directions) && directions.length) {\n // FIXME pb si le 1er graphe n'est pas une ressource connue !\n if (directions[0] === \"departure\" || directions[0] === \"arrival\") {\n this._currentDirection = directions[0];\n }\n }\n\n // si l'utilisateur a spécifié une méthode dans le service, on surcharge les options du widget\n var serviceOptions = this.options.isocurveOptions;\n if (!serviceOptions.reverse) {\n this._currentDirection = \"departure\";\n }\n if (serviceOptions.reverse === true) {\n this._currentDirection = \"arrival\";\n this.options.directions = [\"arrival\", \"departure\"];\n }\n };\n\n /**\n * this method is called by this.initialize() and initialize exclusions\n *\n * @private\n */\n Isocurve.prototype._initExclusions = function () {\n // Exclusions selectionnées : Tunnel, Toll et Bridge\n this._currentExclusions = []; // par defaut\n\n // par defaut\n var exclusion = this.options.exclusions;\n if (!exclusion || _typeof(exclusion) === \"object\" && Object.keys(exclusion).length === 0) {\n this.options.exclusions = {\n toll: false,\n tunnel: false,\n bridge: false\n };\n }\n\n // option\n if (exclusion && _typeof(exclusion) === \"object\" && Object.keys(exclusion).length) {\n for (var k in exclusion) {\n if (exclusion.hasOwnProperty(k)) {\n if (exclusion.k) {\n this._currentExclusions.push(k);\n }\n }\n }\n }\n\n // si l'utilisateur a spécifié des exclusions dans le service, on surcharge les options du widget\n var serviceOptions = this.options.isocurveOptions;\n if (Array.isArray(serviceOptions.exclusions)) {\n this._currentExclusions = serviceOptions.exclusions;\n }\n };\n\n // ################################################################### //\n // ######################## DOM initialize ########################### //\n // ################################################################### //\n\n /**\n * initialize component container (DOM)\n *\n * @param {Object} map - the map\n *\n * @returns {DOMElement} DOM element\n *\n * @private\n */\n Isocurve.prototype._initContainer = function (map) {\n var _this = this;\n // get main container\n var container = this._container;\n var inputShow = this._showIsoContainer = this._createShowIsoElement();\n container.appendChild(inputShow);\n\n // mode \"collapsed\"\n if (!this.collapsed) {\n inputShow.checked = true;\n }\n var picto = this._pictoIsoContainer = this._createShowIsoPictoElement();\n container.appendChild(picto);\n\n // panneau\n var panel = this._IsoPanelContainer = this._createIsoPanelElement();\n\n // header\n var header = this._IsoPanelHeaderContainer = this._createIsoPanelHeaderElement();\n panel.appendChild(header);\n\n // form\n var form = this._formContainer = this._createIsoPanelFormElement();\n\n // form: input de saisie de la localisation (fonction de Isocurve, voir ci-dessous)\n var point = this._createIsoPanelFormPointElement(map);\n form.appendChild(point);\n var isoChronChecked = false;\n var isoDistChecked = false;\n var typeChoice = this._createIsoPanelFormTypeChoiceElement();\n for (var i = 0; i < this.options.methods.length; i++) {\n if (this.options.methods[i] === \"time\") {\n isoChronChecked = i === 0;\n typeChoice.appendChild(this._createIsoPanelFormTypeChoiceChronElement(isoChronChecked));\n }\n if (this.options.methods[i] === \"distance\") {\n isoDistChecked = i === 0;\n typeChoice.appendChild(this._createIsoPanelFormTypeChoiceDistElement(isoDistChecked));\n }\n }\n form.appendChild(typeChoice);\n\n // form: menu du choix des valeurs\n form.appendChild(this._createIsoPanelFormValueIsochronElement(isoChronChecked));\n form.appendChild(this._createIsoPanelFormValueIsodistanceElement(isoDistChecked));\n\n // form: menu du choix du transport et du sens du parcours\n var modeChoice = this._createIsoPanelFormModeChoiceElement();\n modeChoice.appendChild(this._createIsoPanelFormModeChoiceTransportElement(this.options.graphs));\n // FIXME : doit on passer le paramètre defaultDirection ?\n modeChoice.appendChild(this._createIsoPanelFormModeChoiceDirectionElement(this.options.directions));\n form.appendChild(modeChoice);\n\n // form: menu des exclusions\n if (this.options.exclusions && _typeof(this.options.exclusions) === \"object\" && Object.keys(this.options.exclusions).length !== 0) {\n form.appendChild(this._createShowIsoExclusionsElement());\n form.appendChild(this._createShowIsoExclusionsPictoElement());\n var exclusion = this._createIsoPanelFormExclusionsElement();\n exclusion.appendChild(this._createIsoPanelFormExclusionOptionsElement(this.options.exclusions));\n form.appendChild(exclusion);\n }\n var divReset = this._createIsoFormResetElement();\n form.appendChild(divReset);\n\n // form: bouton du calcul\n var submit = this._submitContainer = this._createIsoSubmitFormElement();\n form.appendChild(submit);\n panel.appendChild(form);\n\n // waiting\n var waiting = this._waitingContainer = this._createIsoWaitingElement();\n panel.appendChild(waiting);\n container.appendChild(panel);\n\n // hide autocomplete suggested locations on container click\n if (container.addEventListener) {\n container.addEventListener(\"click\", function (e) {\n return _this._hideIsoSuggestedLocations(e);\n });\n }\n return container;\n };\n\n /**\n * Create start point\n *\n * @param {Object} map - the map\n *\n * @returns {Object} DOM element\n * @private\n */\n Isocurve.prototype._createIsoPanelFormPointElement = function (map) {\n this._originPoint = new _LocationSelector__WEBPACK_IMPORTED_MODULE_14__[\"default\"]({\n apiKey: this.options.apiKey || null,\n tag: {\n id: 1,\n groupId: this._uid,\n markerOpts: this.options.markerOpts,\n label: \"Départ\",\n display: true\n },\n autocompleteOptions: this.options.autocompleteOptions || null\n });\n this._originPoint.setMap(map);\n // a la sélection d'un nouveau point, on réinitialise aussi le tracé\n var self = this;\n // click sur le pointer\n document.getElementById(\"GPlocationOriginPointerImg_1-\" + this._uid).onclick = function () {\n self._clearGeojsonLayer();\n var map = self.getMap();\n if (self._originPoint._inputShowPointerContainer.checked) {\n // au click sur l'input pour pointer sur la carte: on minimise le formulaire\n self._formContainer.className = \"GPisochronFormMini\";\n // et au clic sur la carte, on réaffichera le formulaire \"normal\"\n this.listenerKey = map.on(\"click\", function () {\n self._formContainer.className = \"\";\n self.dispatchEvent(\"isocurve:drawend\");\n });\n } else {\n // si on déselectionne le pointer, on rétablit le formulaire en mode normal\n self._formContainer.className = \"\";\n // et on enlève l'écouteur d'évènement sur la carte\n // map.un(\"click\", () => { self._formContainer.className = \"\"; });\n Object(ol_Observable__WEBPACK_IMPORTED_MODULE_2__[\"unByKey\"])(this.listenerKey);\n }\n /**\n * event triggered at the start of drawing input\n *\n * @event isocurve:drawstart\n */\n self.dispatchEvent(\"isocurve:drawstart\");\n };\n // click sur le label\n document.getElementById(\"GPlocationOriginLabel_1-\" + this._uid).onclick = function () {\n self._clearGeojsonLayer();\n self._formContainer.className = \"\";\n // on désactive l'écouteur d'événements sur la carte (pour ne pas placer un marker au clic)\n map.un(\"click\", function () {\n self._formContainer.className = \"\";\n });\n self.dispatchEvent(\"isocurve:drawend\");\n };\n // click sur la zone de saisie\n document.getElementById(\"GPlocationOrigin_1-\" + this._uid).onclick = function () {\n self._clearGeojsonLayer();\n /**\n * event triggered at the end of drawing input\n *\n * @event isocurve:drawend\n */\n self.dispatchEvent(\"isocurve:drawend\");\n };\n return this._originPoint._container;\n };\n\n // ################################################################### //\n // ####################### handlers events to dom #################### //\n // ################################################################### //\n\n /**\n * this method is called by event 'submit' on 'GPisochronForm' tag form\n * (cf. this._createIsoPanelFormElement),\n * and call isocurve service to display results\n *\n * @private\n */\n Isocurve.prototype.onIsoComputationSubmit = function () {\n // si on n'a pas de valeur récupérée pour notre point origine, on ne fait rien\n if (!this._originPoint || !this._originPoint.getCoordinate || !this._originPoint.getCoordinate()) {\n logger.log(\"[Isocurve] Missing position parameter to submit isocurve request\");\n return;\n }\n\n // récupération de l'origine\n var positionCoordinates = this._originPoint.getCoordinate();\n var position = {\n x: positionCoordinates[0],\n y: positionCoordinates[1]\n };\n logger.log(\"origin : \", position);\n\n // récupération du temps ou de la distance\n var time;\n var distance;\n if (this._currentComputation.toLowerCase() === \"time\") {\n var timeHourInput = document.getElementById(\"GPisochronValueChronInput1-\" + this._uid);\n var hours = parseInt(timeHourInput.value, 10);\n if (isNaN && isNaN(hours)) {\n hours = 0;\n }\n var timeMinutesInput = document.getElementById(\"GPisochronValueChronInput2-\" + this._uid);\n var minutes = parseInt(timeMinutesInput.value, 10);\n if (isNaN && isNaN(minutes)) {\n minutes = 0;\n }\n // durée exprimée en secondes\n time = hours * 3600 + minutes * 60;\n logger.log(\"time : \" + time);\n }\n if (this._currentComputation.toLowerCase() === \"distance\") {\n var distInput = document.getElementById(\"GPisochronValueDistInput-\" + this._uid);\n // distance exprimée en mètres\n distance = parseFloat(distInput.value) * 1000;\n logger.log(\"distance : \" + distance);\n }\n\n // si on n'a pas de valeur de calcul renseignée, on ne lance pas la requête.\n if (!time && !distance) {\n logger.log(\"[Isocurve] Missing time or distance parameter to submit isocurve request\");\n return;\n }\n\n // on recupere les éventuelles options du service passées par l'utilisateur\n var options = this.options.isocurveOptions || {};\n\n // gestion du protocole et du timeout\n // le timeout est indispensable sur le protocole JSONP.\n var _protocol = options.protocol || \"XHR\";\n var _timeout = options.timeOut || 0;\n if (_protocol === \"JSONP\" && _timeout === 0) {\n // FIXME le timeout est obligatoire pour ce type de protocole...\n _timeout = 15000;\n }\n\n // gestion des callback\n var bOnFailure = !!(options.onFailure !== null && typeof options.onFailure === \"function\"); // cast variable to boolean\n var bOnSuccess = !!(options.onSuccess !== null && typeof options.onSuccess === \"function\");\n\n // on met en place l'affichage des resultats dans la fenetre de resultats.\n var context = this;\n var isoRequestOptions = {\n position: position,\n graph: options.graph || this._currentTransport,\n exclusions: options.exclusions || this._currentExclusions,\n method: options.method || this._currentComputation,\n smoothing: options.smoothing || true,\n timeOut: _timeout,\n protocol: _protocol,\n oldIsoService: options.oldIsoService || true,\n resource: options.resource,\n // callback onSuccess\n onSuccess: function onSuccess(results) {\n logger.log(results);\n if (results) {\n context._drawIsoResults(results);\n }\n if (bOnSuccess) {\n options.onSuccess.call(context, results);\n }\n },\n // callback onFailure\n onFailure: function onFailure(error) {\n // FIXME mise à jour du controle mais le service ne repond pas en 200 !?\n context._hideWaitingContainer();\n logger.log(error.message);\n if (bOnFailure) {\n options.onFailure.call(context, error);\n }\n }\n };\n if (this._currentDirection.toLowerCase() === \"arrival\" || options.reverse) {\n isoRequestOptions.reverse = true;\n }\n if (time) {\n isoRequestOptions.time = time;\n }\n if (distance) {\n isoRequestOptions.distance = distance;\n }\n this._requestIsoCurve(isoRequestOptions);\n };\n\n /**\n * this method is called by event 'click' on 'GPshowIsochronPicto' picto\n * (cf. this._createShowIsoPictoElement),\n * and clear inputs and previous isocurve drawings\n *\n * @private\n */\n Isocurve.prototype.onShowIsoPanelClick = function () {\n var map = this.getMap();\n // on supprime toutes les interactions\n _Utils_Interactions__WEBPACK_IMPORTED_MODULE_12__[\"default\"].unset(map);\n this.collapsed = this._showIsoContainer.checked;\n // on génère nous même l'evenement OpenLayers de changement de propriété\n // (utiliser ol.control.Isocurve.on(\"change:collapsed\", function ) pour s'abonner à cet évènement)\n this.dispatchEvent(\"change:collapsed\");\n };\n\n /**\n * this method is called by event 'change' on 'GPisochronChoiceAltDist' or 'GPisochronChoiceAltChron'\n * input (cf. this._createIsoPanelFormTypeChoiceElement),\n * and updates current computation mode\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n Isocurve.prototype.onIsoTypeChoiceChange = function (e) {\n var value = e.target.value;\n if (!value) {\n return;\n }\n if (value === \"isodistance\") {\n this._currentComputation = \"distance\";\n }\n if (value === \"isochron\") {\n this._currentComputation = \"time\";\n }\n };\n\n /**\n * this method is called by event 'click' on 'GPisochronTransportPedestrian' or 'GPisochronTransportCar'\n * input (cf. this._createIsoPanelFormModeChoiceTransportElement),\n * and updates current transport mode\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n Isocurve.prototype.onIsoModeTransportChange = function (e) {\n var value = e.target.value;\n if (!value) {\n return;\n }\n this._currentTransport = value;\n };\n\n /**\n * this method is called by event 'change' on 'GPisochronDirectionSelect' select\n * (cf. this._createIsoPanelFormModeChoiceDirectionElement),\n * and updates current direction mode\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n Isocurve.prototype.onIsoModeDirectionChange = function (e) {\n var value = e.target.value;\n if (!value) {\n return;\n }\n if (value.toLowerCase() === \"arrival\") {\n this._originPoint._inputLabelContainer.innerHTML = \"Arrivée\";\n } else {\n this._originPoint._inputLabelContainer.innerHTML = \"Départ\";\n }\n this._currentDirection = value;\n };\n\n /**\n * this method is called by event 'change' on 'GPIsoExclusionsToll'\n * or 'GPIsoeExclusionsTunnel' or 'GPIsoExclusionsBridge' tag input\n * (cf. this._createIsoPanelFormExclusionOptionsElement).\n * this value is saved as a parameter for the service isocurve.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n Isocurve.prototype.onIsoExclusionsChange = function (e) {\n var value = e.target.value;\n var checked = e.target.checked;\n if (!value) {\n return;\n }\n var bFound = false;\n var iFound = null;\n for (var i = 0; i < this._currentExclusions.length; i++) {\n if (deepEqual(this._currentExclusions[i], value.toLowerCase())) {\n iFound = i;\n bFound = true;\n }\n }\n // on l'ajoute si la valeur n'existe pas et est selectionnée\n if (!bFound && !checked) {\n this._currentExclusions.push(value.toLowerCase());\n }\n // on la retire si la valeur existe et est deselectionnée\n if (bFound && checked) {\n this._currentExclusions[iFound] = null;\n }\n };\n\n /**\n * this method is called by event 'click' on 'GPisoReset'\n * tag label (cf. this._createIsoFormResetElement),\n * and it cleans all isochron input options and results.\n *\n * @private\n */\n Isocurve.prototype.onIsoResetClick = function () {\n // clear\n this._clear();\n };\n\n // ################################################################### //\n // ######################## isocurve calculation ##################### //\n // ################################################################### //\n\n /**\n * this method is called by this.onIsoComputationSubmit\n * and executes a request to the service.\n *\n * @param {Object} options - isocurve service request options\n * @private\n */\n Isocurve.prototype._requestIsoCurve = function (options) {\n // on ne fait pas de requête si on n'a pas renseigné de parametres !\n if (!options || _typeof(options) === \"object\" && Object.keys(options).length === 0) {\n return;\n }\n // on ne fait pas de requête si on n'a pas de point d'origine\n if (!options.position) {\n return;\n }\n\n // si l'utilisateur a spécifié le paramètre ssl au niveau du control, on s'en sert\n // true par défaut (https)\n if (typeof options.ssl !== \"boolean\") {\n if (typeof this.options.ssl === \"boolean\") {\n options.ssl = this.options.ssl;\n } else {\n options.ssl = true;\n }\n }\n logger.log(options);\n\n // on efface une éventuelle précédente couche\n this._clearGeojsonLayer();\n\n // mise en place de la patience\n this._displayWaitingContainer();\n\n // appel du service de calcul d'isochrones\n geoportal_access_lib__WEBPACK_IMPORTED_MODULE_6__[\"default\"].Services.isoCurve(options);\n };\n\n /**\n * this method is called by this.onIsoComputationSubmit (in case of success)\n * and draw isocurve results geometry on map\n *\n * @param {Object} results - isocurve response results\n * @private\n */\n Isocurve.prototype._drawIsoResults = function (results) {\n var _this2 = this;\n // sauvegarde de l'etat des resultats\n this._currentIsoResults = results;\n // cache la patience\n this._hideWaitingContainer();\n if (!results.geometry) {\n return;\n }\n var map = this.getMap();\n\n // 1. création de l'objet geoJSON\n this._geojsonObject = {\n type: \"FeatureCollection\",\n crs: {\n type: \"name\",\n properties: {\n name: \"EPSG:4326\"\n }\n },\n features: [{\n type: \"Feature\",\n crs: {\n type: \"name\",\n properties: {\n name: \"EPSG:4326\"\n }\n },\n geometry: results.geometry\n }]\n };\n this._geojsonObject.features.push({\n type: \"Feature\",\n geometry: {\n type: \"Point\",\n coordinates: this._originPoint.getCoordinate()\n },\n properties: {\n description: \"Point d'origine\",\n \"marker-symbol\": this.options.markerOpts.url\n }\n });\n var geojsonformat = new _Formats_GeoJSON__WEBPACK_IMPORTED_MODULE_16__[\"default\"]({\n defaultDataProjection: \"EPSG:4326\",\n defaultStyle: this._defaultFeatureStyle\n });\n var mapProj = map.getView().getProjection().getCode();\n var features = geojsonformat.readFeatures(this._geojsonObject, {\n dataProjection: \"EPSG:4326\",\n featureProjection: mapProj\n });\n\n // 2. ajout de la géométrie comme nouvelle couche vecteur à la carte\n this._geojsonLayer = new ol_layer_Vector__WEBPACK_IMPORTED_MODULE_3___default.a({\n source: new ol_source_Vector__WEBPACK_IMPORTED_MODULE_4___default.a({\n features: features\n }),\n style: this._defaultFeatureStyle,\n opacity: 0.9\n });\n // ajout d'un identifiant à la couche\n var graph;\n if (this._currentTransport === \"Pieton\") {\n graph = \"piéton\";\n this._geojsonLayer.gpResultLayerId = \"Pieton$GEOPORTAIL:GPP:Isocurve\";\n } else {\n graph = \"voiture\";\n this._geojsonLayer.gpResultLayerId = \"Voiture$GEOPORTAIL:GPP:Isocurve\";\n }\n // ajout à la carte\n map.addLayer(this._geojsonLayer);\n\n /**\n * event triggered when the compute is finished\n *\n * @event isocurve:compute\n * @typedef {Object}\n * @property {Object} type - event\n * @property {Object} target - instance Isocurve\n * @example\n * Isocurve.on(\"isocurve:compute\", function (e) {\n * console.log(e.target.getData());\n * })\n */\n this.dispatchEvent({\n type: \"isocurve:compute\"\n });\n\n // 3. Zoom sur l'emprise de la geometry\n if (features[0] && features[0].getGeometry() && features[0].getGeometry().getExtent()) {\n var extent = features[0].getGeometry().getExtent();\n map.getView().fit(extent, map.getSize());\n }\n\n // 5. Si un layer switcher est présent dans la carte, on lui affecte des informations pour cette couche\n var method = this._currentComputation === \"time\" ? \"Isochrone\" : \"Isodistance\";\n map.getControls().forEach(function (control) {\n if (control instanceof _LayerSwitcher__WEBPACK_IMPORTED_MODULE_13__[\"default\"]) {\n // un layer switcher est présent dans la carte\n var layerId = _this2._geojsonLayer.gpLayerId;\n // on n'ajoute des informations que s'il n'y en a pas déjà (si le titre est le numéro par défaut)\n if (control._layers[layerId].title === layerId) {\n control.addLayer(_this2._geojsonLayer, {\n title: _this2.options.layerDescription.title + \" (\" + method + \"/\" + graph + \")\",\n description: _this2.options.layerDescription.description\n });\n }\n }\n });\n };\n\n // ################################################################### //\n // ############################# Clean ############################### //\n // ################################################################### //\n\n /**\n * this method is called by this.onShowIsoPanelClick()\n * and it clears all elements (reinit).\n *\n * @private\n */\n Isocurve.prototype._clear = function () {\n // clear inputs\n this._clearIsoInputs();\n\n // clear origin point (and marker)\n this._originPoint.clear();\n\n // remove geometry layer\n this._clearGeojsonLayer();\n\n // clear results\n this._currentIsoResults = null;\n };\n\n /**\n * this method is called by this._clear()\n * and it clears all input elements (dist and time)\n *\n * @private\n */\n Isocurve.prototype._clearIsoInputs = function () {\n // 1. clear inputs\n // clear time inputs (if exists) :\n // hours\n var timeHourInput = document.getElementById(\"GPisochronValueChronInput1-\" + this._uid);\n if (timeHourInput) {\n timeHourInput.value = \"0\";\n }\n // minutes\n var timeMinutesInput = document.getElementById(\"GPisochronValueChronInput2-\" + this._uid);\n if (timeMinutesInput) {\n timeMinutesInput.value = \"0\";\n }\n // clear distance input (if exists)\n var distInput = document.getElementById(\"GPisochronValueDistInput-\" + this._uid);\n if (distInput) {\n distInput.value = \"0\";\n }\n\n // 2. reinit options to default\n this._initTransport();\n this._initComputation();\n this._initDirection();\n this._initExclusions();\n\n // 3. set transport mode to default\n var transportdiv;\n if (this._currentTransport === \"Pieton\") {\n transportdiv = document.getElementById(\"GPisochronTransportPedestrian-\" + this._uid);\n if (transportdiv) {\n transportdiv.checked = \"true\";\n }\n } else {\n transportdiv = document.getElementById(\"GPisochronTransportCar-\" + this._uid);\n if (transportdiv) {\n transportdiv.checked = \"true\";\n }\n }\n\n // 4. set computation mode to default (distance or time)\n var computationdiv;\n if (this._currentComputation.toLowerCase() === \"distance\") {\n computationdiv = document.getElementById(\"GPisochronChoiceAltDist-\" + this._uid);\n if (computationdiv) {\n computationdiv.checked = \"true\";\n }\n if (document.getElementById(\"GPisochronValueDist-\" + this._uid)) {\n document.getElementById(\"GPisochronValueDist-\" + this._uid).className = \"GPflexInput\";\n }\n if (document.getElementById(\"GPisochronValueChron-\" + this._uid)) {\n document.getElementById(\"GPisochronValueChron-\" + this._uid).className = \"GPisochronValueHidden\";\n }\n } else {\n computationdiv = document.getElementById(\"GPisochronChoiceAltChron-\" + this._uid);\n if (computationdiv) {\n computationdiv.checked = \"true\";\n }\n if (document.getElementById(\"GPisochronValueChron-\" + this._uid)) {\n document.getElementById(\"GPisochronValueChron-\" + this._uid).className = \"GPflexInput\";\n }\n if (document.getElementById(\"GPisochronValueDist-\" + this._uid)) {\n document.getElementById(\"GPisochronValueDist-\" + this._uid).className = \"GPisochronValueHidden\";\n }\n }\n\n // 5. set direction mode to default (arrival or departure)\n var directionSelect = document.getElementById(\"GPisochronDirectionSelect-\" + this._uid);\n if (directionSelect) {\n directionSelect.value = this._currentDirection;\n }\n if (this._currentDirection === \"arrival\") {\n this._originPoint._inputLabelContainer.innerHTML = \"Arrivée\";\n } else {\n this._originPoint._inputLabelContainer.innerHTML = \"Départ\";\n }\n\n // 6. set exclusions to default\n var tollInput = document.getElementById(\"GPisoExclusionsToll-\" + this._uid);\n if (tollInput) {\n if (this._currentExclusions.indexOf(\"toll\") !== -1) {\n tollInput.checked = false;\n } else {\n tollInput.checked = true;\n }\n }\n var tunnelInput = document.getElementById(\"GPisoExclusionsTunnel-\" + this._uid);\n if (tunnelInput) {\n if (this._currentExclusions.indexOf(\"tunnel\") !== -1) {\n tunnelInput.checked = false;\n } else {\n tunnelInput.checked = true;\n }\n }\n var bridgeInput = document.getElementById(\"GPisoExclusionsBridge-\" + this._uid);\n if (bridgeInput) {\n if (this._currentExclusions.indexOf(\"bridge\") !== -1) {\n bridgeInput.checked = false;\n } else {\n bridgeInput.checked = true;\n }\n }\n };\n\n /**\n * this method is called by this.onIsoComputationSubmit (in case of failure)\n * and it clears all geometries\n *\n * @private\n */\n Isocurve.prototype._clearGeojsonLayer = function () {\n var map = this.getMap();\n // remove layer\n if (this._geojsonLayer) {\n map.removeLayer(this._geojsonLayer);\n this._geojsonLayer = null;\n }\n // remove geojson object\n this._geojsonObject = null;\n };\n\n /**\n * this method is called by event 'click' on control main container\n * and hide suggested Locations (unless target is an autocomplete input)\n *\n * @param {Object} e - event\n *\n * @private\n */\n Isocurve.prototype._hideIsoSuggestedLocations = function (e) {\n // si on clique sur l'input de saisie du point d'origine\n if (e.target && e.target.id && e.target.id.indexOf(\"GPlocationOrigin_\") !== -1) {} else {\n // si on clique ailleurs dans le DOM du control, on cache tous les résultats d'autocomplétion\n this._originPoint._hideSuggestedLocation();\n }\n };\n\n /**\n * this method displays waiting container and sets a timeout\n *\n * @private\n */\n Isocurve.prototype._displayWaitingContainer = function () {\n this._waitingContainer.className = \"GPisochronCalcWaitingContainerVisible\";\n this._waiting = true;\n\n // mise en place d'un timeout pour réinitialiser le panel (cacher la patience)\n // si on est toujours en attente (si la requête est bloquée par exemple)\n var opts = this.options.isocurveOptions;\n if (opts && opts.timeOut) {\n if (this._timer) {\n clearTimeout(this._timer);\n this._timer = null;\n }\n var context = this;\n this._timer = setTimeout(function () {\n if (context._waiting === true) {\n context._hideWaitingContainer();\n } else {\n if (context._timer) {\n clearTimeout(context._timer);\n }\n }\n }, 16000);\n }\n };\n\n /**\n * this method hides waiting container and clears timeout\n *\n * @private\n */\n Isocurve.prototype._hideWaitingContainer = function () {\n if (this._waiting) {\n this._waitingContainer.className = \"GPisochronCalcWaitingContainerHidden\";\n this._waiting = false;\n var opts = this.options.isocurveOptions;\n if (opts && opts.timeOut) {\n clearTimeout(this._timer);\n this._timer = null;\n }\n }\n };\n return Isocurve;\n}(ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default.a);\n/* harmony default export */ __webpack_exports__[\"default\"] = (Isocurve);\n\n// Expose Isocurve as ol.control.Isocurve (for a build bundle)\nif (window.ol && window.ol.control) {\n window.ol.control.Isocurve = Isocurve;\n}\nvar deepEqual = function deepEqual(x, y) {\n if (x === y) {\n return true;\n } else if (_typeof(x) === \"object\" && x != null && _typeof(y) === \"object\" && y != null) {\n if (Object.keys(x).length !== Object.keys(y).length) {\n return false;\n }\n for (var prop in x) {\n if (y.hasOwnProperty(prop)) {\n if (!deepEqual(x[prop], y[prop])) {\n return false;\n }\n } else {\n return false;\n }\n }\n return true;\n } else {\n return false;\n }\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9PcGVuTGF5ZXJzL0NvbnRyb2xzL0lzb2N1cnZlLmpzPzU4MjAiXSwibmFtZXMiOlsibG9nZ2VyIiwiTG9nZ2VyIiwiZ2V0TG9nZ2VyIiwiSXNvY3VydmUiLCJDb250cm9sIiwib3B0aW9ucyIsIlR5cGVFcnJvciIsImluaXRpYWxpemUiLCJfY29udGFpbmVyIiwiX2NyZWF0ZU1haW5Db250YWluZXJFbGVtZW50IiwiX2NvbnRhaW5lckVsZW1lbnQiLCJlbGVtZW50IiwiYXBwZW5kQ2hpbGQiLCJjYWxsIiwidGFyZ2V0IiwicmVuZGVyIiwiX19wcm90b19fIiwicHJvdG90eXBlIiwiT2JqZWN0IiwiY3JlYXRlIiwiVXRpbHMiLCJhc3NpZ24iLCJJc29ET00iLCJjb25zdHJ1Y3RvciIsInNldE1hcCIsIm1hcCIsIl9pbml0Q29udGFpbmVyIiwib3B0cyIsImNvbnRyb2wiLCJCdXR0b25FeHBvcnQiLCJzZWxmIiwib24iLCJlIiwiZGlzcGF0Y2hFdmVudCIsInR5cGUiLCJjb250ZW50IiwiZHJhZ2dhYmxlIiwiRHJhZ2dhYmxlIiwiZHJhZ0VsZW1lbnQiLCJfSXNvUGFuZWxDb250YWluZXIiLCJfSXNvUGFuZWxIZWFkZXJDb250YWluZXIiLCJnZXRUYXJnZXRFbGVtZW50IiwiZ2V0Q29sbGFwc2VkIiwiY29sbGFwc2VkIiwic2V0Q29sbGFwc2VkIiwidW5kZWZpbmVkIiwibG9nIiwiZG9jdW1lbnQiLCJnZXRFbGVtZW50QnlJZCIsIl91aWQiLCJjbGljayIsImdldExheWVyIiwiX2dlb2pzb25MYXllciIsInNldExheW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gICAgICAgdmFyIG9wdHMgPSBVdGlscy5hc3NpZ24oeyBjb250cm9sIDogdGhpcyB9LCB0aGlzLm9wdGlvbnMuZXhwb3J0KTtcbiAgICAgICAgICAgICAgICB0aGlzLmV4cG9ydCA9IG5ldyBCdXR0b25FeHBvcnQob3B0cyk7XG4gICAgICAgICAgICAgICAgdGhpcy5leHBvcnQucmVuZGVyKCk7XG4gICAgICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzO1xuICAgICAgICAgICAgICAgIHRoaXMuZXhwb3J0Lm9uKFwiZXhwb3J0OmNvbXB1dGVcIiwgKGUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5kaXNwYXRjaEV2ZW50KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgOiBcImV4cG9ydDpjb21wdXRlXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50IDogZS5jb250ZW50XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBtb2RlIFwiZHJhZ2dhYmxlXCJcbiAgICAgICAgICAgIGlmICh0aGlzLmRyYWdnYWJsZSkge1xuICAgICAgICAgICAgICAgIERyYWdnYWJsZS5kcmFnRWxlbWVudChcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fSXNvUGFuZWxDb250YWluZXIsXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX0lzb1BhbmVsSGVhZGVyQ29udGFpbmVyLFxuICAgICAgICAgICAgICAgICAgICBtYXAuZ2V0VGFyZ2V0RWxlbWVudCgpXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIG9uIGFwcGVsbGUgbGEgbcOpdGhvZGUgc2V0TWFwIG9yaWdpbmFsZSBkJ09wZW5MYXllcnNcbiAgICAgICAgQ29udHJvbC5wcm90b3R5cGUuc2V0TWFwLmN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iAgICAgICAgdGhpcy5fdGltZXIgPSBudWxsO1xuXG4gICAgICAgIC8vIHN0eWxlcyBwb3VyIGxlcyBzw6lsZWN0aW9ucyBkZXMgZmVhdHVyZXNcbiAgICAgICAgdGhpcy5fZGVmYXVsdEZlYXR1cmVTdHlsZSA9IG5ldyBTdHlsZSh7XG4gICAgICAgICAgICBmaWxsIDogbmV3IEZpbGwoe1xuICAgICAgICAgICAgICAgIGNvbG9yIDogXCJyZ2JhKDAsIDE4MywgMTUyLCAwLjcpXCJcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgc3Ryb2tlIDogbmV3IFN0cm9rZSh7XG4gICAgICAgICAgICAgICAgY29sb3IgOiBcInJnYmEoMCwgMTgzLCAxNTIsIDApXCIsXG4gICAgICAgICAgICAgICAgd2lkdGggOiAxXG4gICAgICAgICAgICB9KVxuICAgICAgICB9KTtcblxuICAgICAgICAvLyBsaXN0ZSBkZXMgcmVzc291cmNlcyBhdmVjIGRyb2l0cyBwYXIgc2VydmljZVxuICAgICAgICAvLyBFeC4ge1xuICAgICAgICAvLyAgIFwiSXNvY3VydmVcIiA6IHtcbiAgICAgICAgLy8gICAgICAga2V5IDogXCJnZXI0ZzQ1NnJlNDVlcjQ1NnQ0ZXI1Z2U1XCIsXG4gICAgICAgIC8vICAgICAgIHJlc291cmNlcyA6IFtcIlBpZXRvblwiLCBcIlZvaXR1cmVcIl1cbiAgICAgICAgLy8gICB9XG4gICAgICAgIC8vIH1cbiAgICAgICAgdGhpcy5fcmVzb3VyY2VzID0ge307XG5cbiAgICAgICAgLy8gbGlzdGVuZXIga2V5IGZvciBldmVudCBjbGljayBvbiBtYXBcbiAgICAgICAgdGhpcy5saXN0ZW5lcktleSA9IG51bGw7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIHRoaXMgbWV0aG9kIGlzIGNhbGxlZCBieSB0aGlzLmluaXRpYWxpemUoKVxuICAgICAqXG4gICAgICogQHBhcmFtIHtPYmplY3R9IG9wdGlvbnMgLSBvcHRpb25zXG4gICAgICpcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqL1xuICAgIElzb2N1cnZlLnByb3RvdHlwZS5fY2hlY2tJbnB1dE9wdGlvbnMgPSBmdW5jdGlvbiAob3B0aW9ucykge1xuICAgICAgICAvLyB2w6lyaWZpY2F0aW9uIGRlcyBvcHRpb25zXG4gICAgICAgIC8vIG9uIG5lIHBlcm1ldCBwYXMgZGUgbidhZmZpY2hlciBhdWN1biBtb2RlIGRlIGNhbGN1bCBvdSBhdWN1biBtb2RlIGRlIHRyYW5zcG9ydCA/XG4gICAgICAgIHZhciBpO1xuXG4gICAgICAgIC8vIG1vZGVzIGRlIGNhbGN1bFxuICAgICAgICBpZiAob3B0aW9ucy5tZXRob2RzKSB7XG4gICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShvcHRpb25zLm1ldGhvZHMpKSB7XG4gICAgICAgICAgICAgICAgLy8gb24gbmUgcGVybWV0IHBhcyBkZSBwYXNzZXIgdW4gdGFibGVhdSB2aWRlIDogb24gc3DDqWNpZmllIGF1IG1vaW5zIHVuZSBtw6l0aG9kZVxuICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLm1ldGhvZHMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMubWV0aG9kcyA9IG51bGw7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IG9wdGlvbnMubWV0aG9kcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBvcHRpb25zLm1ldGhvZHNbaV0gIT09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2dnZXIubG9nKFwiW29sLmNvbnRyb2wuSXNvY3VydmVdIEVSUk9SIDogcGFyYW1ldGVyICdtZXRob2RzJyBlbGVtZW50cyBzaG91bGQgYmUgb2YgdHlwZSAnc3RyaW5nJ1wiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbG9nZ2VyLndhcm4oXCInbWV0aG9kcycgcGFyYW1ldGVyIHNob3VsZCBiZSBhbiBhcnJheVwiKTtcbiAgICAgICAgICAgICAgICBvcHRpb25zLm1ldGhvZHMgPSBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gbW9kZSBkZSB0cmFuc3BvcnRcbiAgICAgICAgaWYgKG9wdGlvbnMuZ3JhcGhzKSB7XG4gICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShvcHRpb25zLmdyYXBocykpIHtcbiAgICAgICAgICAgICAgICAvLyBvbiBuZSBwZXJtZXQgcGFzIGRlIHBhc3NlciB1biB0YWJsZWF1IHZpZGUgOiBvbiBzcMOpY2lmaWUgYXUgbW9pbnMgdW4gZ3JhcGhcbiAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5ncmFwaHMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMuZ3JhcGhzID0gbnVsbDtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgb3B0aW9ucy5ncmFwaHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2Ygb3B0aW9ucy5ncmFwaHNbaV0gIT09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2dnZXIubG9nKFwiW29sLmNvbnRyb2wuSXNvY3VydmVdIEVSUk9SIDogcGFyYW1ldGVyICdncmFwaHMnIGVsZW1lbnRzIHNob3VsZCBiZSBvZiB0eXBlICdzdHJpbmcnXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5ncmFwaHNbaV0udG9Mb3dlckNhc2UoKSA9PT0gXCJwaWV0b25cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmdyYXBoc1tpXSA9IFwiUGlldG9uXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLmdyYXBoc1tpXS50b0xvd2VyQ2FzZSgpID09PSBcInZvaXR1cmVcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmdyYXBoc1tpXSA9IFwiVm9pdHVyZVwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbG9nZ2VyLndhcm4oXCInZ3JhcGhzJyBwYXJhbWV0ZXIgc2hvdWxkIGJlIGFuIGFycmF5XCIpO1xuICAgICAgICAgICAgICAgIG9wdGlvbnMuZ3JhcGhzID0gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIHNlbnMgZHUgcGFyY291cnNcbiAgICAgICAgaWYgKG9wdGlvbnMuZGlyZWN0aW9ucykge1xuICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkob3B0aW9ucy5kaXJlY3Rpb25zKSkge1xuICAgICAgICAgICAgICAgIC8vIG9uIG5lIHBlcm1ldCBwYXMgZGUgcGFzc2VyIHVuIHRhYmxlYXUgdmlkZSA6IG9uIHNww6ljaWZpZSBhdSBtb2lucyB1bmUgZGlyZWN0aW9uXG4gICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMuZGlyZWN0aW9ucy5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5kaXJlY3Rpb25zID0gbnVsbDtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgb3B0aW9ucy5kaXJlY3Rpb25zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMuZGlyZWN0aW9uc1tpXSAhPT0gXCJzdHJpbmdcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZ2dlci5sb2coXCJbb2wuY29udHJvbC5Jc29jdXJ2ZV0gRVJST1IgOiBwYXJhbWV0ZXIgJ2RpcmVjdGlvbnMnIGVsZW1lbnRzIHNob3VsZCBiZSBvZiB0eXBlICdzdHJpbmcnXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBsb2dnZXIud2FybihcIidkaXJlY3Rpb25zJyBwYXJhbWV0ZXIgc2hvdWxkIGJlIGFuIGFycmF5XCIpO1xuICAgICAgICAgICAgICAgIG9wdGlvbnMuZGlyZWN0aW9ucyA9IG51bGw7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBjb2xsYXBzZWRcbiAgICAgICAgaWYgKG9wdGlvbnMuY29sbGFwc2VkID09PSBcInRydWVcIikge1xuICAgICAgICAgICAgb3B0aW9ucy5jb2xsYXBzZWQgPSB0cnVlO1xuICAgICAgICB9XG4gICAgICAgIGlmIChvcHRpb25zLmNvbGxhcHNlZCA9PT0gXCJmYWxzZVwiKSB7XG4gICAgICAgICAgICBvcHRpb25zLmNvbGxhcHNlZCA9IGZhbHNlO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAq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T09IFwib2JqZWN0XCIgJiYgT2JqZWN0LmtleXMoZXhjbHVzaW9uKS5sZW5ndGggPT09IDApKSB7XG4gICAgICAgICAgICB0aGlzLm9wdGlvbnMuZXhjbHVzaW9ucyA9IHtcbiAgICAgICAgICAgICAgICB0b2xsIDogZmFsc2UsXG4gICAgICAgICAgICAgICAgdHVubmVsIDogZmFsc2UsXG4gICAgICAgICAgICAgICAgYnJpZGdlIDogZmFsc2VcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cblxuICAgICAgICAvLyBvcHRpb25cbiAgICAgICAgaWYgKGV4Y2x1c2lvbiAmJiB0eXBlb2YgZXhjbHVzaW9uID09PSBcIm9iamVjdFwiICYmIE9iamVjdC5rZXlzKGV4Y2x1c2lvbikubGVuZ3RoKSB7XG4gICAgICAgICAgICBmb3IgKHZhciBrIGluIGV4Y2x1c2lvbikge1xuICAgICAgICAgICAgICAgIGlmIChleGNsdXNpb24uaGFzT3duUHJvcGVydHkoaykpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGV4Y2x1c2lvbi5rKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9jdXJyZW50RXhjbHVzaW9ucy5wdXNoKGspO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gc2kgbCd1dGlsaXNhdGV1ciBhIHNww6ljaWZpw6kgZGVzIGV4Y2x1c2lvbnMgZGFucyBsZSBzZXJ2aWNlLCBvbiBzdXJjaGFyZ2UgbGVzIG9wdGlvbnMgZHUgd2lkZ2V0XG4gICAgICAgIHZhciBzZXJ2aWNlT3B0aW9ucyA9IHRoaXMub3B0aW9ucy5pc29jdXJ2ZU9wdGlvbnM7XG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KHNlcnZpY2VPcHRpb25zLmV4Y2x1c2lvbnMpKSB7XG4gICAgICAgICAgICB0aGlzLl9jdXJyZW50RXh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1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gc2kgb24gZMOpc2VsZWN0aW9ubmUgbGUgcG9pbnRlciwgb24gcsOpdGFibGl0IGxlIGZvcm11bGFpcmUgZW4gbW9kZSBub3JtYWxcbiAgICAgICAgICAgICAgICBzZWxmLl9mb3JtQ29udGFpbmVyLmNsYXNzTmFtZSA9IFwiXCI7XG4gICAgICAgICAgICAgICAgLy8gZXQgb24gZW5sw6h2ZSBsJ8OpY291dGV1ciBkJ8OpdsOobmVtZW50IHN1ciBsYSBjYXJ0ZVxuICAgICAgICAgICAgICAgIC8vIG1hcC51bihcImNsaWNrXCIsICgpID0+IHsgc2VsZi5fZm9ybUNvbnRhaW5lci5jbGFzc05hbWUgPSBcIlwiOyB9KTtcbiAgICAgICAgICAgICAgICBvbE9ic2VydmFibGVVbkJ5S2V5KHRoaXMubGlzdGVuZXJLZXkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAqIGV2ZW50IHRyaWdnZXJlZCBhdCB0aGUgc3RhcnQgb2YgZHJhd2luZyBpbnB1dFxuICAgICAgICAgICAgKlxuICAgICAgICAgICAgKiBAZXZlbnQgaXNvY3VydmU6ZHJhd3N0YXJ0XG4gICAgICAgICAgICAqL1xuICAgICAgICAgICAgc2VsZi5kaXNwYXRjaEV2ZW50KFwiaXNvY3VydmU6ZHJhd3N0YXJ0XCIpO1xuICAgICAgICB9O1xuICAgICAgICAvLyBjbGljayBzdXIgbGUgbGFiZWxcbiAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoXCJHUGxvY2F0aW9uT3JpZ2luTGFiZWxfMS1cIiArIHRoaXMuX3VpZCkub25jbGljayA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHNlbGYuX2NsZWFyR2VvanNvbkxheWVyKCk7XG4gICAgICAgIC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VzdFwiKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIHLDqWN1cMOpcmF0aW9uIGRlIGwnb3JpZ2luZVxuICAgICAgICB2YXIgcG9zaXRpb25Db29yZGluYXRlcyA9IHRoaXMuX29yaWdpblBvaW50LmdldENvb3JkaW5hdGUoKTtcbiAgICAgICAgdmFyIHBvc2l0aW9uID0ge1xuICAgICAgICAgICAgeCA6IHBvc2l0aW9uQ29vcmRpbmF0ZXNbMF0sXG4gICAgICAgICAgICB5IDogcG9zaXRpb25Db29yZGluYXRlc1sxXVxuICAgICAgICB9O1xuICAgICAgICBsb2dnZXIubG9nKFwib3JpZ2luIDogXCIsIHBvc2l0aW9uKTtcblxuICAgICAgICAvLyByw6ljdXDDqXJhdGlvbiBkdSB0ZW1wcyBvdSBkZSBsYSBkaXN0YW5jZVxuICAgICAgICB2YXIgdGltZTtcbiAgICAgICAgdmFyIGRpc3RhbmNlO1xuICAgICAgICBpZiAodGhpcy5fY3VycmVudENvbXB1dGF0aW9uLnRvTG93ZXJDYXNlKCkgPT09IFwidGltZVwiKSB7XG4gICAgICAgICAgICB2YXIgdGltZUhvdXJJbnB1dCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKFwiR1Bpc29jaHJvblZhbHVlQ2hyb25JbnB1dDEtXCIgKyB0aGlzLl91aWQpO1xuICAgICAgICAgICAgdmFyIGhvdXJzID0gcGFyc2VJbnQodGltZUhvdXJJbnB1dC52YWx1ZSwgMTApO1xuICAgICAgICAgICAgaWYgKGlzTmFOICYmIGlzTmFOKGhvdXJzKSkge1xuICAgICAgICAgICAgICAgIGhvdXJzID0gMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciB0aW1lTWludXRlc0lucHV0ID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoXCJHUGlzb2Nocm9uVmFsdWVDaHJvbklucHV0Mi1cIiArIHRoaXMuX3VpZCk7XG4gICAgICAgICAg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3SXNvUmVzdWx0cyhyZXN1bHRzKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGJPblN1Y2Nlc3MpIHtcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5vblN1Y2Nlc3MuY2FsbChjb250ZXh0LCByZXN1bHRzKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgLy8gY2FsbGJhY2sgb25GYWlsdXJlXG4gICAgICAgICAgICBvbkZhaWx1cmUgOiBmdW5jdGlvbiAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgICAvLyBGSVhNRSBtaXNlIMOgIGpvdXIgZHUgY29udHJvbGUgbWFpcyBsZSBzZXJ2aWNlIG5lIHJlcG9uZCBwYXMgZW4gMjAwICE/XG4gICAgICAgICAgICAgICAgY29udGV4dC5faGlkZVdhaXRpbmdDb250YWluZXIoKTtcbiAgICAgICAgICAgICAgICBsb2dnZXIubG9nKGVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgICAgICAgIGlmIChiT25GYWlsdXJlKSB7XG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMub25GYWlsdXJlLmNhbGwoY29udGV4dCwgZXJyb3IpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgICAgaWYgKCh0aGlzLl9jdXJyZW50RGlyZWN0aW9uLnRvTG93ZXJDYXNlKCkgPT09IFwiYXJyaXZhbFwiKSB8fCAob3B0aW9ucy5yZXZlcnNlKSkge1xuICAgICAgICAgICAgaXNvUmVxdWVzdE9wdGlvbnMucmV2ZXJzZSA9IHRydWU7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHRpbWUpIHtcbiAgICAgICAgICAgIGlzb1JlcXVlc3RPcHRpb25zLnRpbWUgPSB0aW1lO1xuICAgICAgICB9XG4gICAgICAgIGlmIChkaXN0YW5jZSkge1xuICAgICAgICAgICAgaXNvUmVxdWVzdE9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A6IHtcbiAgICAgICAgICAgICAgICAgICAgbmFtZSA6IFwiRVBTRzo0MzI2XCJcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZmVhdHVyZXMgOiBbXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICB0eXBlIDogXCJGZWF0dXJlXCIsXG4gICAgICAgICAgICAgICAgICAgIGNycyA6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgOiBcIm5hbWVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIHByb3BlcnRpZXMgOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZSA6IFwiRVBTRzo0MzI2XCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgZ2VvbWV0cnkgOiByZXN1bHRzLmdlb21ldHJ5XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgXVxuICAgICAgICB9O1xuICAgICAgICB0aGlzLl9nZW9qc29uT2JqZWN0LmZlYXR1cmVzLnB1c2goe1xuICAgICAgICAgICAgdHlwZSA6IFwiRmVhdHVyZVwiLFxuICAgICAgICAgICAgZ2VvbWV0cnkgOiB7XG4gICAgICAgICAgICAgICAgdHlwZSA6IFwiUG9pbnRcIixcbiAgICAgICAgICAgICAgICBjb29yZGluYXRlcyA6IHRoaXMuX29yaWdpblBvaW50LmdldENvb3JkaW5hdGUoKVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHByb3BlcnRpZXMgOiB7XG4gICAgICAgICAgICAgICAgZGVzY3JpcHRpb24gOiBcIlBvaW50IGQnb3JpZ2luZVwiLFxuICAgICAgICAgICAgICAgIFwibWFya2VyLXN5bWJvbFwiIDogdGhpcy5vcHRpb25zLm1hcmtlck9wdHMudXJsXG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgICB2YXIgZ2VvanNvbmZ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ydCA9PT0gXCJQaWV0b25cIikge1xuICAgICAgICAgICAgZ3JhcGggPSBcInBpw6l0b25cIjtcbiAgICAgICAgICAgIHRoaXMuX2dlb2pzb25MYXllci5ncFJlc3VsdExheWVySWQgPSBcIlBpZXRvbiRHRU9QT1JUQUlMOkdQUDpJc29jdXJ2ZVwiO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgZ3JhcGggPSBcInZvaXR1cmVcIjtcbiAgICAgICAgICAgIHRoaXMuX2dlb2pzb25MYXllci5ncFJlc3VsdExheWVySWQgPSBcIlZvaXR1cmUkR0VPUE9SVEFJTDpHUFA6SXNvY3VydmVcIjtcbiAgICAgICAgfVxuICAgICAgICAvLyBham91dCDDoCBsYSBjYXJ0ZVxuICAgICAgICBtYXAuYWRkTGF5ZXIodGhpcy5fZ2VvanNvbkxheWVyKTtcblxuICAgICAgICAvKipcbiAgICAgICAgICogZXZlbnQgdHJpZ2dlcmVkIHdoZW4gdGhlIGNvbXB1dGUgaXMgZmluaXNoZWRcbiAgICAgICAgICpcbiAgICAgICAgICogQGV2ZW50IGlzb2N1cnZlOmNvbXB1dGVcbiAgICAgICAgICogQHR5cGVkZWYge09iamVjdH1cbiAgICAgICAgICogQHByb3BlcnR5IHtPYmplY3R9IHR5cGUgLSBldmVudFxuICAgICAgICAgKiBAcHJvcGVydHkge09iamVjdH0gdGFyZ2V0IC0gaW5zdGFuY2UgSXNvY3VydmVcbiAgICAgICAgICogQGV4YW1wbGVcbiAgICAgICAgICogSXNvY3VydmUub24oXCJpc29jdXJ2ZTpjb21wdXRlXCIsIGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAqICAgY29uc29sZS5sb2coZS50YXJnZXQuZ2V0RGF0YSgpKTtcbiAgICAgICAgICogfSlcbiAgICAgICAgICovXG4gICAgICAgIHRoaXMuZGlzcGF0Y2hFdmVudCh7XG4gICAgICAgICAgICB0eXBlIDogXCJpc29jdXJ2ZTpjb21wdXRlXCJcbiAgICAgICAgfSk7XG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gKHNpIGxlIHRpdHJlIGVzdCBsZSBudW3DqXJvIHBhciBkw6lmYXV0KVxuICAgICAgICAgICAgICAgICAgICBpZiAoY29udHJvbC5fbGF5ZXJzW2xheWVySWRdLnRpdGxlID09PSBsYXllcklkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sLmFkZExheWVyKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2dlb2pzb25MYXllciwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZSA6IHRoaXMub3B0aW9ucy5sYXllckRlc2NyaXB0aW9uLnRpdGxlICsgXCIgKFwiICsgbWV0aG9kICsgXCIvXCIgKyBncmFwaCArIFwiKVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjcmlwdGlvbiA6IHRoaXMub3B0aW9ucy5sYXllckRlc2NyaXB0aW9uLmRlc2NyaXB0aW9uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgKTtcbiAgICB9O1xuXG4gICAgLy8gIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyAvL1xuICAgIC8vICMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIENsZWFuICMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMgLy9cbiAgICAvLyAjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIC8vXG5cbiAgICAvKipcbiAgICAgKiB0aGlzIG1ldGhvZCBpcyBjYWxsZWQgYnkgdGhpcy5vblNob3dJc29QYW5lbENsaWNr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ICAgdmFyIG9wdHMgPSB0aGlzLm9wdGlvbnMuaXNvY3VydmVPcHRpb25zO1xuICAgICAgICBpZiAob3B0cyAmJiBvcHRzLnRpbWVPdXQpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLl90aW1lcikge1xuICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aGlzLl90aW1lcik7XG4gICAgICAgICAgICAgICAgdGhpcy5fdGltZXIgPSBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIGNvbnRleHQgPSB0aGlzO1xuICAgICAgICAgICAgdGhpcy5fdGltZXIgPSBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBpZiAoY29udGV4dC5fd2FpdGluZyA9PT0gdHJ1ZSkge1xuICAgICAgICAgICAgICAgICAgICBjb250ZXh0Ll9oaWRlV2FpdGluZ0NvbnRhaW5lcigpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChjb250ZXh0Ll90aW1lcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KGNvbnRleHQuX3RpbWVyKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sIDE2MDAwKTtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiB0aGlzIG1ldGhvZCBoaWRlcyB3YWl0aW5nIGNvbnRhaW5lciBhbmQgY2xlYXJzIHRpbWVvdXRcbiAgICAgKlxuICAgICAqIEBwcml2YXRlXG4gICAgICovXG4gICAgSXNvY3VydmUucHJvdG90eXBlLl9oaWRlV2FpdGluZ0NvbnRhaW5lciA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgaWYgKHRoaXMuX3dhaXRpbmcpIHtcbiAgICAgICAgICAgIHRoaXMuX3dhaXRpbmdDb250YWluZXIuY2xhc3NOYW1lID0gXCJHUGlzb2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3BlcnR5KHByb3ApKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFkZWVwRXF1YWwoeFtwcm9wXSwgeVtwcm9wXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9XG59O1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/OpenLayers/Controls/Isocurve.js\n"); /***/ }), @@ -2457,7 +2469,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CSS /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CSS_Controls_LocationSelector_GPlocationOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../CSS/Controls/LocationSelector/GPlocationOpenLayers.css */ \"./src/OpenLayers/CSS/Controls/LocationSelector/GPlocationOpenLayers.css\");\n/* harmony import */ var _CSS_Controls_LocationSelector_GPlocationOpenLayers_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_LocationSelector_GPlocationOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ol/control/Control */ \"ol/control/Control\");\n/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_control_Control__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ol/Overlay */ \"ol/Overlay\");\n/* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ol_Overlay__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ol/proj */ \"ol/proj\");\n/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ol_proj__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ol/Observable */ \"ol/Observable\");\n/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(ol_Observable__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! geoportal-access-lib */ \"./node_modules/geoportal-access-lib/src/Gp.js\");\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Common/Utils */ \"./src/Common/Utils.js\");\n/* harmony import */ var _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Common/Utils/GeocodeUtils */ \"./src/Common/Utils/GeocodeUtils.js\");\n/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Common/Utils/SelectorID */ \"./src/Common/Utils/SelectorID.js\");\n/* harmony import */ var _Utils_Markers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Utils/Markers */ \"./src/OpenLayers/Controls/Utils/Markers.js\");\n/* harmony import */ var _Common_Controls_LocationSelectorDOM__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Common/Controls/LocationSelectorDOM */ \"./src/Common/Controls/LocationSelectorDOM.js\");\n// import CSS\n\n// import OpenLayers\n\n\n\n\n// import geoportal library access\n\n// import local\n\n\n\n\n\n// DOM\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_6__[\"default\"].getLogger(\"locationselector\");\n\n/**\n * @classdesc\n *\n * LocationSelector component. Enables to select a location, using autocompletion or picking location on the map\n * @type {ol.control.LocationSelector}\n * @param {Object} [options] - component options\n * @param {String} [options.apiKey] - API key for autocomplete service call. The key \"calcul\" is used by default.\n * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol)\n * @param {Boolean} [options.displayInfo = true] - whether to display info in a popup or not (not implemented yet) Default is true\n * @param {Object} [options.tag] - tag options\n * @param {Number} [options.tag.id = 1] - order id number in a locations group, in case several LocationSelector are used. For instance in route case : departure tag id should be 0, arrival tag id should be 1, and other ones : 2, 3, ...\n * @param {Number} [options.tag.groupId = null] - locationSelector global component id (in case locationSelector is called by another graphic component, e.g. route control)\n * @param {String} [options.tag.label] - text to display in component (e.g. \"Departure\"). Default is \">\"\n * @param {Object} [options.tag.markerOpts] - options to use your own marker. Default is a lightOrange marker.\n * @param {String} [options.tag.markerOpts.url] - marker base64 encoded url (ex \"data:image/png;base64,...\"\"). Mandatory for a custom marker\n * @param {Array} [options.tag.markerOpts.offset] - 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. Default is [0, 0]. (see {@link http://openlayers.org/en/latest/apidoc/ol.Overlay.html ol.Overlay})\n * @param {Boolean} [options.tag.display = true] - whether to display or hide component. Default is true\n * @param {Boolean} [options.tag.addOption = false] - whether to display picto to add another LocationSelector (in case of route control)\n * @param {Boolean} [options.tag.removeOption = false] - whether to display picto to remove a LocationSelector (in case of route control)\n * @param {Object} [options.autocompleteOptions] - autocomplete service options (see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~autoComplete Gp.Services.autoComplete()} to know all autocomplete options)\n * @example\n * var locationselector = new LocationSelector({\n * apiKey : \"\",\n * tag : {\n * id : 1,\n * groupId : null,\n * label : \"Départ\",\n * markerOpts : {\n * url : \"...\",\n * offset : [0,0]\n * },\n * display : true\n * },\n * autocompleteOptions : {}\n * });\n */\nvar LocationSelector = function (Control) {\n /**\n * See {@link ol.control.LocationSelector}\n * @module LocationSelector\n * @alias module:~Controls/LocationSelector\n * @param {*} options - options\n * @example\n * import LocationSelector from \"src/OpenLayers/Controls/LocationSelector\"\n */\n function LocationSelector(options) {\n options = options || {};\n if (!(this instanceof LocationSelector)) {\n throw new TypeError(\"ERROR CLASS_CONSTRUCTOR\");\n }\n\n // initialisation du composant\n this.initialize(options);\n\n // creation du DOM\n this._container = this._initContainer();\n\n // on peut éventuellement encapsuler le composant dans une div passée par l'utilisateur\n // (le composant étant positionné en relatif, il doit être positionné dans une div si utilisé seul)\n if (options.element && options.element.appendChild) {\n options.element.appendChild(this._container);\n this._container = options.element;\n }\n\n // call ol.control.Control constructor\n Control.call(this, {\n element: this._container,\n target: options.target,\n render: options.render\n });\n }\n ;\n // Inherits from ol.control.Control\n if (Control) LocationSelector.__proto__ = Control;\n\n /**\n * @lends module:LocationSelector\n */\n LocationSelector.prototype = Object.create(Control.prototype, {});\n _Common_Utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].assign(LocationSelector.prototype, _Common_Controls_LocationSelectorDOM__WEBPACK_IMPORTED_MODULE_11__[\"default\"]);\n\n /**\n * Constructor (alias)\n */\n LocationSelector.prototype.constructor = LocationSelector;\n\n /**\n * initialize component\n *\n * @param {Object} options - options\n */\n LocationSelector.prototype.initialize = function (options) {\n // set default options\n this.options = {\n tag: {\n id: 1,\n // numero d'ordre sur un groupe de locations\n groupId: null,\n // id du composant global contenant le LocationSelector\n label: \">\",\n display: true,\n addOption: false,\n removeOption: false\n },\n displayInfo: true,\n autocompleteOptions: {}\n };\n\n // merge with user options\n _Common_Utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].mergeParams(this.options, options);\n\n /** uuid */\n this._uid = this.options.tag.groupId || _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_9__[\"default\"].generate();\n // info : si un uid (groupId) est spécifié\n // (par ex si ce composant est appélé par un autre composant graphique)\n // alors on le récupère, sinon c'est qu'il est indépendant : on génère donc un uuid\n\n /** container map */\n this._map = null;\n\n /** container principal des entrées */\n this._inputsContainer = null;\n\n /** container du label du point */\n this._inputLabelContainer = null;\n\n /** container de la saisi de l'autocompletion */\n this._inputAutoCompleteContainer = null;\n\n /** container du pointer de saisi sur la carte */\n this._inputShowPointerContainer = null;\n\n /** label du pointer de saisi sur la carte (avec img) */\n this._inputShowPointer = null;\n\n /** container des coordonnées */\n this._inputCoordinateContainer = null;\n\n /** elements pour ajouter ou supprimer un nouveau point */\n this._addPointElement = null;\n this._removePointElement = null;\n\n /** coordonnées du point selectionné, en EPSG:4326 */\n this._coordinate = null;\n\n /** container des reponses de l'autocompletion */\n this._suggestedContainer = null;\n\n /** listes des reponses de l'autocompletion */\n this._suggestedLocations = [];\n\n /** localisant */\n this._currentLocation = null;\n\n /** marker */\n this._initMarker();\n\n /** ressources du services d'autocompletion (ayant droit!) */\n this._resources = {};\n\n // listener key for event click on map\n this.listenerKey = null;\n };\n\n /**\n * initialize marker : url and offset\n *\n * @private\n */\n LocationSelector.prototype._initMarker = function () {\n // init marker properties\n this._marker = null;\n this._markerUrl = \"\";\n this._markerOffset = [0, 0];\n if (this.options.tag.markerOpts && this.options.tag.markerOpts.url) {\n // get marker src url\n this._markerUrl = this.options.tag.markerOpts.url;\n\n // get marker offset\n var offset = this.options.tag.markerOpts.offset;\n if (offset) {\n if (Array.isArray(offset) && offset.length === 2) {\n this._markerOffset = offset;\n } else {\n logger.log(\"markerOpts.offset should be an array. e.g. : [0,0]\");\n }\n }\n } else {\n // set default options for marker\n this._markerUrl = _Utils_Markers__WEBPACK_IMPORTED_MODULE_10__[\"default\"][\"lightOrange\"];\n this._markerOffset = _Utils_Markers__WEBPACK_IMPORTED_MODULE_10__[\"default\"].defaultOffset;\n }\n };\n\n // ################################################################### //\n // ########################## publics methods ######################## //\n // ################################################################### //\n\n /**\n * get coordinate\n *\n * @returns {Array} this._coordinate - point coordinate (EPSG:4326) : [lon, lat]\n */\n LocationSelector.prototype.getCoordinate = function () {\n return this._coordinate;\n };\n\n /**\n * set coordinate\n * @param {Object} coordinate - Coordinate in the map projection by default, otherwise, the projection is entered in the following parameter\n * @param {String} crs - Coordinate projection\n */\n LocationSelector.prototype.setCoordinate = function (coordinate, crs) {\n var map = this.getMap();\n var proj = map.getView().getProjection();\n // on utilise la projection de la carte\n if (crs === null) {\n crs = proj;\n }\n this._setCoordinate(coordinate, crs);\n\n // on utilise toujours la projection de la carte pour placer le marker\n coordinate = Object(ol_proj__WEBPACK_IMPORTED_MODULE_3__[\"transform\"])(coordinate, crs, proj);\n this._setMarker([coordinate[0], coordinate[1]], null, false);\n };\n\n /**\n * clean all and input\n */\n LocationSelector.prototype.clear = function () {\n this.clearResults();\n this._inputLabelContainer.click();\n };\n\n /**\n * clear all results and the marker.\n */\n LocationSelector.prototype.clearResults = function () {\n this._currentLocation = null;\n this._coordinate = null;\n this._hideSuggestedLocation();\n this._clearSuggestedLocation();\n this._setMarker();\n // map.un(\"click\", (e) => this.onMouseMapClick(e));\n Object(ol_Observable__WEBPACK_IMPORTED_MODULE_4__[\"unByKey\"])(this.listenerKey);\n };\n\n // ################################################################### //\n // ##################### init component (private) #################### //\n // ################################################################### //\n\n /**\n * initialize component container\n *\n * @returns {DOMElement} DOM element\n */\n LocationSelector.prototype._initContainer = function () {\n var _this = this;\n var id = this.options.tag.id;\n\n // create main container\n var container = this._createMainContainerElement();\n var inputs = this._inputsContainer = this._createLocationPointElement(id, this.options.tag.display);\n container.appendChild(inputs);\n var _inputLabel = this._inputLabelContainer = this._createLocationPointLabelElement(id, this.options.tag.label);\n inputs.appendChild(_inputLabel);\n var _inputAutoComplete = this._inputAutoCompleteContainer = this._createLocationAutoCompleteteInputElement(id);\n if (_inputAutoComplete.addEventListener) {\n _inputAutoComplete.addEventListener(\"click\", function () {\n return _this.onAutoCompleteInputClick();\n });\n } else if (_inputAutoComplete.attachEvent) {\n _inputAutoComplete.attachEvent(\"onclick\", function () {\n return _this.onAutoCompleteInputClick();\n });\n }\n inputs.appendChild(_inputAutoComplete);\n var _inputCoordinate = this._inputCoordinateContainer = this._createLocationCoordinateInputElement(id);\n inputs.appendChild(_inputCoordinate);\n var _inputShowPointer = this._inputShowPointerContainer = this._createLocationPointerShowInputElement(id);\n inputs.appendChild(_inputShowPointer);\n var _inputPointer = this._inputShowPointer = this._createLocationPointerInputElement(id);\n inputs.appendChild(_inputPointer);\n if (this.options.tag.addOption) {\n var _inputAddStage = this._addPointElement = this._createLocationAddPointElement();\n inputs.appendChild(_inputAddStage);\n }\n if (this.options.tag.removeOption) {\n var _inputRemoveStage = this._removePointElement = this._createLocationRemovePointElement(id);\n inputs.appendChild(_inputRemoveStage);\n }\n var results = this._suggestedContainer = this._createLocationAutoCompleteResultElement(id);\n container.appendChild(results);\n return container;\n };\n\n // ################################################################### //\n // ###################### handlers events (dom) ###################### //\n // ################################################################### //\n\n /**\n * this method is called by event 'click' on 'GPlocationOrigin' input\n *\n * @private\n */\n LocationSelector.prototype.onAutoCompleteInputClick = function () {\n if (this._inputAutoCompleteContainer && this._inputAutoCompleteContainer.value.length > 2) {\n this._displaySuggestedLocation();\n }\n };\n\n /**\n * this method is called by event 'keyup' on 'GProuteOrigin' tag input\n * (cf. this._createRouteAutoCompleteteInputElement), and it gets the value of input.\n * this value is passed as a parameter for the service autocomplete (text).\n * the results of the request are displayed into a drop down menu.\n * FIXME\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n LocationSelector.prototype.onAutoCompleteSearchText = function (e) {\n var _this2 = this;\n var value = e.target.value;\n if (!value) {\n return;\n }\n\n // on sauvegarde le localisant\n this._currentLocation = value;\n\n // on limite les requêtes à partir de 3 car. saisie !\n if (value.length < 3) {\n this._clearSuggestedLocation();\n return;\n }\n\n // INFORMATION\n // on effectue la requête au service d'autocompletion.\n // on met en place des callbacks afin de recuperer les resultats ou\n // les messages d'erreurs du service.\n // les resultats sont affichés dans une liste deroulante.\n // les messages d'erreurs sont affichés sur la console (?)\n var context = this;\n this._requestAutoComplete({\n text: value,\n maximumResponses: 5,\n // FIXME je limite le nombre de reponse car le container DOM est limité dans l'affichage !!!\n // callback onSuccess\n onSuccess: function onSuccess(results) {\n if (results) {\n var locations = results.suggestedLocations;\n context._fillAutoCompletedLocationListContainer(locations);\n }\n },\n // callback onFailure\n onFailure: function onFailure(error) {\n // FIXME\n // où affiche t on les messages : ex. 'No suggestion matching the search' ?\n // doit on nettoyer la liste des suggestions dernierement enregistrée :\n context._clearSuggestedLocation();\n logger.log(error.message);\n }\n });\n var map = this.getMap();\n map.on(\"click\", function () {\n return _this2._hideSuggestedLocation();\n });\n map.on(\"pointerdrag\", function () {\n return _this2._hideSuggestedLocation();\n });\n };\n\n /**\n * this method is called by event 'click' on 'GPautoCompleteResultsList' tag div\n * (cf. this._createAutoCompleteListElement), and it selects the location.\n * this location displays a marker on the map.\n * FIXME\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n LocationSelector.prototype.onAutoCompletedResultsItemClick = function (e) {\n var idx = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_9__[\"default\"].index(e.target.id);\n if (!idx) {\n return;\n }\n\n // FIXME\n // les coordonnées sont inversées entre les 2 services !?\n // AutoCompletion : lon/lat (\"EPSG:4326\")\n // Geocoding : lat/lon\n var position = [this._suggestedLocations[idx].position.x, this._suggestedLocations[idx].position.y];\n // on sauvegarde le point courant (en EPSG:4326, [lon, lat])\n this._coordinate = position;\n var info = {\n type: this._suggestedLocations[idx].type,\n fields: this._suggestedLocations[idx]\n };\n\n // on ajoute le texte de l'autocomplétion dans l'input\n var label = _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_8__[\"default\"].getSuggestedLocationFreeform(this._suggestedLocations[idx]);\n this._setLabel(label);\n\n // Info : la position est en EPSG:4326, à transformer dans la projection de la carte\n var view = this.getMap().getView();\n var mapProj = view.getProjection().getCode();\n if (mapProj !== \"EPSG:4326\") {\n // on retransforme les coordonnées de la position dans la projection de la carte\n position = Object(ol_proj__WEBPACK_IMPORTED_MODULE_3__[\"transform\"])(position, \"EPSG:4326\", mapProj);\n }\n // on centre la vue et positionne le marker, à la position reprojetée dans la projection de la carte\n this._setPosition(position);\n this._setMarker(position, info, this.options.displayInfo);\n };\n\n /**\n * this method is called by event 'click' on 'GProuteOriginPointerImg' tag input\n * (cf. this._createRoutePointerInputElement), and it create or remove the event of click map.\n *\n * @private\n */\n LocationSelector.prototype.onActivateMapPointClick = function () {\n var _this3 = this;\n var map = this.getMap();\n if (this._inputShowPointerContainer.checked) {\n // on efface l'ancien resultat\n this.clearResults();\n this.listenerKey = map.on(\"click\", function (e) {\n return _this3.onMouseMapClick(e);\n });\n this._setCursor(\"crosshair\");\n } else {\n // map.un(\"click\", (e) => this.onMouseMapClick(e));\n Object(ol_Observable__WEBPACK_IMPORTED_MODULE_4__[\"unByKey\"])(this.listenerKey);\n this._setCursor();\n }\n };\n\n /**\n * this method is called by event 'click' on 'GProuteOriginLabel' tag label\n * (cf. this._createRoutePointLabelElement).\n * this point is erased.\n *Missing\n * @private\n */\n LocationSelector.prototype.onLocationClearPointClick = function () {\n this._setCursor();\n this.clearResults();\n };\n\n /**\n * this method is called by event 'click' on 'GProuteStageRemove' tag input\n * (cf. this._createRouteRemovePointElement).\n * this point is deleted\n *\n * @private\n */\n LocationSelector.prototype.onLocationRemovePointClick = function () {\n this._setCursor();\n this.clearResults();\n };\n\n /**\n * TODO this method is called by event 'click' on 'GProuteStageAdd' tag input\n * (cf. this._createRouteAddPointElement).\n * this point is added as a parameter for the service route.\n *\n * @param {Object} e - HTMLElement\n */\n LocationSelector.prototype.onLocationAddPointClick = function (e) {\n logger.log(\"onRouteAddPointClick\", e);\n };\n\n // ################################################################### //\n // #################### handlers events (control) #################### //\n // ################################################################### //\n\n /**\n * this method is called by event 'click' on map\n * (cf. this.onRouteMapPointClick), and it gets the coordinate of click on map.\n * this point is saved as a parameter for the service route.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n LocationSelector.prototype.onMouseMapClick = function (e) {\n var coordinate = e.coordinate;\n if (!e.map || !e.map.getView()) {\n return;\n }\n var crs = e.map.getView().getProjection();\n this._setCoordinate(coordinate, crs);\n this._setMarker([coordinate[0], coordinate[1]], null, false);\n\n // on desactive l'event sur la map !\n this.onActivateMapPointClick(e);\n };\n\n // ################################################################### //\n // ################# pivates methods use by events ################### //\n // ################################################################### //\n\n /**\n * this sends the label to the panel.\n *\n * @param {String} label - label suggested location\n * @private\n */\n LocationSelector.prototype._setLabel = function (label) {\n this._inputAutoCompleteContainer.value = label;\n };\n\n /**\n * this change the cursor of the map when entering a point.\n *\n * @param {String} cursor - cursor style\n * @private\n */\n LocationSelector.prototype._setCursor = function (cursor) {\n var map = this.getMap();\n var div = map.getTargetElement();\n if (cursor) {\n div.style.cursor = cursor;\n } else {\n div.style.cursor = null;\n }\n };\n\n /**\n * this sends the coordinates to the panel.\n *\n * @method _setCoordinate\n * @param {Array} olCoordinate - ol.Coordinate object [lon, lat] ou [x, y] (proj = map proj system)\n * @param {Object} crs - coordinate CRS (ol.proj.Projection)\n * @private\n */\n LocationSelector.prototype._setCoordinate = function (olCoordinate, crs) {\n // structure\n // ol.Coordinate\n // [\n // 4 // lon ou x\n // 48 // lat ou y\n // ]\n\n // on transforme olCoodinate (dont la projection est celle de la carte) en EPSG:4326\n this._coordinate = Object(ol_proj__WEBPACK_IMPORTED_MODULE_3__[\"transform\"])(olCoordinate, crs, \"EPSG:4326\");\n\n // INFO : si on veut des DMS\n // var coords = ol.coordinate.toStringHDMS(this._coordinate, 2).split(\"N \");\n // // coords est du type : \"48° 00′ 00″ N 2° 00′ 00″ E\". On veut récupérer les 2 coordonnées séparément.\n // var lat = coords[0] + \"N\";\n // var lng = coords[1];\n\n // Pour avoir des degrés décimaux :\n var lat = this._coordinate[0].toFixed(4);\n var lng = this._coordinate[1].toFixed(4);\n var value = lng + \" / \" + lat;\n this.GPdisplayCoordinate(value);\n };\n\n /**\n * this method is called by this.on*ResultsItemClick()\n * and set center at given position.\n *\n * @param {Array} position - ol.Coordinate object [lon, lat] (en lat/lon : \"EPSG:4326\")\n * @private\n */\n LocationSelector.prototype._setPosition = function (position) {\n var view = this.getMap().getView();\n view.setCenter(position);\n };\n\n /**\n * this method is called by this.on*ResultsItemClick()\n * and displays a marker.\n * FIXME : marker IGN et informations ?\n *\n * @param {Array} position - ol.Coordinate object [lon, lat] ou [x, y]\n * @param {Object} information - suggested or geocoded information\n * @param {Boolean} display - display a popup information\n * @private\n */\n LocationSelector.prototype._setMarker = function (position, information, display) {\n var map = this.getMap();\n // remove previous markers\n if (this._marker != null) {\n map.removeOverlay(this._marker);\n this._marker = null;\n }\n if (position) {\n var markerDiv = document.createElement(\"img\");\n markerDiv.src = this._markerUrl;\n this._marker = new ol_Overlay__WEBPACK_IMPORTED_MODULE_2___default.a({\n position: position,\n offset: this._markerOffset,\n element: markerDiv,\n stopEvent: false\n });\n map.addOverlay(this._marker);\n if (display) {\n logger.log(\"marker information : \", information);\n }\n // // FIXME\n // // doit on mettre une information\n // // - correctement construite ?\n // // - uniquement informatif ?\n // // - RIEN ?\n // if (display) {\n // var popupContent = null;\n //\n // var values = [];\n //\n // values.push(information.fields.fullText || \"\");\n // values.push(information.fields.street || \"\");\n // values.push(information.fields.postalCode || \"\");\n // values.push(information.fields.commune || \"\");\n //\n // if (information.type === \"PositionOfInterest\") {\n // values.push(information.fields.poi || \"\");\n // values.push(information.fields.kind || \"\");\n // }\n //\n // popupContent = values.join(\" | \");\n //\n // this._marker.bindPopup(popupContent);\n // }\n }\n };\n\n /**\n * this method is called by this.onAutoCompleteSearchText()\n * and it clears all suggested location.\n *\n * @private\n */\n LocationSelector.prototype._clearSuggestedLocation = function () {\n // suppression du dom\n this._suggestedLocations = [];\n if (this._suggestedContainer) {\n while (this._suggestedContainer.firstChild) {\n this._suggestedContainer.removeChild(this._suggestedContainer.firstChild);\n }\n }\n };\n\n /**\n * this method is called by event 'click' on map\n * and it hide suggested locations\n *\n * @private\n */\n LocationSelector.prototype._hideSuggestedLocation = function () {\n if (this._suggestedContainer) {\n this._suggestedContainer.style.display = \"none\";\n }\n };\n\n /**\n * this method is called by this.onAutoCompleteSearchText()\n * and it clears all suggested location.\n *\n * @private\n */\n LocationSelector.prototype._displaySuggestedLocation = function () {\n if (this._suggestedContainer) {\n this._suggestedContainer.style.display = \"block\";\n }\n };\n\n /**\n * this method is called by this.onAutoCompleteSearch()\n * and executes a request to the service.\n *\n * @param {Object} settings - service settings\n * @param {String} settings.text - text\n * @param {Function} settings.onSuccess - callback\n * @param {Function} settings.onFailure - callback\n * @private\n */\n LocationSelector.prototype._requestAutoComplete = function (settings) {\n logger.log(\"_requestAutoComplete()\", settings);\n\n // on ne fait pas de requête si on n'a pas renseigné de parametres !\n if (!settings || Object.keys(settings).length === 0) {\n return;\n }\n\n // on ne fait pas de requête si la parametre 'text' est vide !\n if (!settings.text) {\n return;\n }\n logger.log(settings);\n var options = {};\n // on recupere les options du service\n _Common_Utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].assign(options, this.options.autocompleteOptions);\n // ainsi que la recherche et les callbacks\n _Common_Utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].assign(options, settings);\n\n // les ressources\n var resources = this._resources[\"AutoCompletion\"] || null;\n if (resources && Array.isArray(resources)) {\n if (!options.filterOptions) {\n options.filterOptions = {};\n }\n options.filterOptions.type = resources;\n }\n\n // cas où la clef API n'est pas renseignée dans les options du service,\n // on utilise celle renseignée au niveau du controle ou la clé \"calcul\" par défaut.\n options.apiKey = options.apiKey || this.options.apiKey;\n\n // si l'utilisateur a spécifié le paramètre ssl au niveau du control, on s'en sert\n // true par défaut (https)\n if (typeof options.ssl !== \"boolean\") {\n if (typeof this.options.ssl === \"boolean\") {\n options.ssl = this.options.ssl;\n } else {\n options.ssl = true;\n }\n }\n logger.log(options);\n geoportal_access_lib__WEBPACK_IMPORTED_MODULE_5__[\"default\"].Services.autoComplete(options);\n };\n\n /**\n * this method is called by this.onAutoCompleteSearchText()\n * and fills the container of the location list.\n * it creates a HTML Element per location\n * (cf. this. ...)\n *\n * @param {Object[]} locations - locations\n *\n * @private\n */\n LocationSelector.prototype._fillAutoCompletedLocationListContainer = function (locations) {\n if (!locations || locations.length === 0) {\n return;\n }\n\n // on vide la liste avant de la construire\n var element = this._suggestedContainer;\n if (element.childElementCount) {\n while (element.firstChild) {\n element.removeChild(element.firstChild);\n }\n }\n for (var i = 0; i < locations.length; i++) {\n // Proposals are dynamically filled in Javascript by autocomplete service\n this._createLocationAutoCompletedLocationElement(this.options.tag.id, locations[i], i);\n }\n\n // sauvegarde de l'etat des locations\n this._suggestedLocations = locations;\n };\n return LocationSelector;\n}(ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default.a);\n/* harmony default export */ __webpack_exports__[\"default\"] = (LocationSelector);\n\n// Expose LocationSelector as ol.control.LocationSelector (for a build bundle)\nif (window.ol && window.ol.control) {\n window.ol.control.LocationSelector = LocationSelector;\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9PcGVuTGF5ZXJzL0NvbnRyb2xzL0xvY2F0aW9uU2VsZWN0b3IuanM/NGI2ZiJdLCJuYW1lcyI6WyJsb2dnZXIiLCJMb2dnZXIiLCJnZXRMb2dnZXIiLCJMb2NhdGlvblNlbGVjdG9yIiwiQ29udHJvbCIsIm9wdGlvbnMiLCJUeXBlRXJyb3IiLCJpbml0aWFsaXplIiwiX2NvbnRhaW5lciIsIl9pbml0Q29ud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L1xuICAgICAgICB0aGlzLl9zdWdnZXN0ZWRDb250YWluZXIgPSBudWxsO1xuXG4gICAgICAgIC8qKiBsaXN0ZXMgZGVzIHJlcG9uc2VzIGRlIGwnYXV0b2NvbXBsZXRpb24gKi9cbiAgICAgICAgdGhpcy5fc3VnZ2VzdGVkTG9jYXRpb25zID0gW107XG5cbiAgICAgICAgLyoqIGxvY2FsaXNhbnQgKi9cbiAgICAgICAgdGhpcy5fY3VycmVudExvY2F0aW9uID0gbnVsbDtcblxuICAgICAgICAvKiogbWFya2VyICovXG4gICAgICAgIHRoaXMuX2luaXRNYXJrZXIoKTtcblxuICAgICAgICAvKiogcmVzc291cmNlcyBkdSBzZXJ2aWNlcyBkJ2F1dG9jb21wbGV0aW9uIChheWFudCBkcm9pdCEpICovXG4gICAgICAgIHRoaXMuX3Jlc291cmNlcyA9IHt9O1xuXG4gICAgICAgIC8vIGxpc3RlbmVyIGtleSBmb3IgZXZlbnQgY2xpY2sgb24gbWFwXG4gICAgICAgIHRoaXMubGlzdGVuZXJLZXkgPSBudWxsO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBpbml0aWFsaXplIG1hcmtlciA6IHVybCBhbmQgb2Zmc2V0XG4gICAgICpcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqL1xuICAgIExvY2F0aW9uU2VsZWN0b3IucHJvdG90eXBlLl9pbml0TWFya2VyID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAvLyBpbml0IG1hcmtlciBwcm9wZXJ0aWVzXG4gICAgICAgIHRoaXMuX21hcmtlciA9IG51bGw7XG4gICAgICAgIHRoaXMuX21hcmtlclVybCA9IFwiXCI7XG4gICAgICAgIHRoaXMuX21hcmtlck9mZnNldCA9IFswLCAwXTtcblxuICAgICAgICBpZiAodGhpcy5vcHRpb25zLnRhZy5tYXJrZXJPcHRzICYmIHRoaXMub3B0aW9ucy50YWcubWFya2VyT3B0cy51cmwpIHtcbiAgICAgICAgICAgIC8vIGdldCBtYXJrZX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hZmluIGRlIHJlY3VwZXJlciBsZXMgcmVzdWx0YXRzIG91XG4gICAgICAgIC8vIGxlcyBtZXNzYWdlcyBkJ2VycmV1cnMgZHUgc2VydmljZS5cbiAgICAgICAgLy8gbGVzIHJlc3VsdGF0cyBzb250IGFmZmljaMOpcyBkYW5zIHVuZSBsaXN0ZSBkZXJvdWxhbnRlLlxuICAgICAgICAvLyBsZXMgbWVzc2FnZXMgZCdlcnJldXJzIHNvbnQgYWZmaWNow6lzIHN1ciBsYSBjb25zb2xlICg/KVxuICAgICAgICB2YXIgY29udGV4dCA9IHRoaXM7XG4gICAgICAgIHRoaXMuX3JlcXVlc3RBdXRvQ29tcGxldGUoe1xuICAgICAgICAgICAgdGV4dCA6IHZhbHVlLFxuICAgICAgICAgICAgbWF4aW11bVJlc3BvbnNlcyA6IDUsIC8vIEZJWE1FIGplIGxpbWl0ZSBsZSBub21icmUgZGUgcmVwb25zZSBjYXIgbGUgY29udGFpbmVyIERPTSBlc3QgbGltaXTDqSBkYW5zIGwnYWZmaWNoYWdlICEhIVxuICAgICAgICAgICAgLy8gY2FsbGJhY2sgb25TdWNjZXNzXG4gICAgICAgICAgICBvblN1Y2Nlc3MgOiBmdW5jdGlvbiAocmVzdWx0cykge1xuICAgICAgICAgICAgICAgIGlmIChyZXN1bHRzKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBsb2NhdGlvbnMgPSByZXN1bHRzLnN1Z2dlc3RlZExvY2F0aW9ucztcbiAgICAgICAgICAgICAgICAgICAgY29udGV4dC5fZmlsbEF1dG9Db21wbGV0ZWRMb2NhdGlvbkxpc3RDb250YWluZXIobG9jYXRpb25zKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgLy8gY2FsbGJhY2sgb25GYWlsdXJlXG4gICAgICAgICAgICBvbkZhaWx1cmUgOiBmdW5jdGlvbiAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgICAvLyBGSVhNRVxuICAgICAgICAg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V2ZW50IDogZmFsc2VcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgbWFwLmFkZE92ZXJsYXkodGhpcy5fbWFya2VyKTtcblxuICAgICAgICAgICAgaWYgKGRpc3BsYXkpIHtcbiAgICAgICAgICAgICAgICBsb2dnZXIubG9nKFwibWFya2VyIGluZm9ybWF0aW9uIDogXCIsIGluZm9ybWF0aW9uKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIC8vIEZJWE1FXG4gICAgICAgICAgICAvLyAvLyBkb2l0IG9uIG1ldHRyZSB1bmUgaW5mb3JtYXRpb25cbiAgICAgICAgICAgIC8vIC8vIC0gY29ycmVjdGVtZW50IGNvbnN0cnVpdGUgP1xuICAgICAgICAgICAgLy8gLy8gLSB1bmlxdWVtZW50IGluZm9ybWF0aWYgP1xuICAgICAgICAgICAgLy8gLy8gLSBSSUVOID9cbiAgICAgICAgICAgIC8vIGlmIChkaXNwbGF5KSB7XG4gICAgICAgICAgICAvLyAgICAgdmFyIHBvcHVwQ29udGVudCA9IG51bGw7XG4gICAgICAgICAgICAvL1xuICAgICAgICAgICAgLy8gICAgIHZhciB2YWx1ZXMgPSBbXTtcbiAgICAgICAgICAgIC8vXG4gICAgICAgICAgICAvLyAgICAgdmFsdWVzLnB1c2goaW5mb3JtYXRpb24uZmllbGRzLmZ1bGxUZXh0IHx8IFwiXCIpO1xuICAgICAgICAgICAgLy8gICAgIHZhbHVlcy5wdXNoKGluZm9ybWF0aW9uLmZpZWxkcy5zdHJlZXQgfHwgXCJcIik7XG4gICAgICAgICAgICAvLyAgICAgdmFsdWVzLnB1c2goaW5mb3JtYXRpb24uZmllbGRzLnBvc3RhbENvZGUgfHwgXCJcIik7XG4gICAgICAgICAgICAvLyAgICAgdmFsdWVzLnB1c2goaW5mb3JtYXRpb24uZmllbGRzLmNvbW11bmUgfHwgXCJcIik7XG4gICAgICAgICAgICAvL1xuICAgICAgICAgICAgLy8gICAgIGlmIChpbmZvcm1hdGlvbi50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bGUpXG5pZiAod2luZG93Lm9sICYmIHdpbmRvdy5vbC5jb250cm9sKSB7XG4gICAgd2luZG93Lm9sLmNvbnRyb2wuTG9jYXRpb25TZWxlY3RvciA9IExvY2F0aW9uU2VsZWN0b3I7XG59XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/OpenLayers/Controls/LocationSelector.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CSS_Controls_LocationSelector_GPlocationOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../CSS/Controls/LocationSelector/GPlocationOpenLayers.css */ \"./src/OpenLayers/CSS/Controls/LocationSelector/GPlocationOpenLayers.css\");\n/* harmony import */ var _CSS_Controls_LocationSelector_GPlocationOpenLayers_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_LocationSelector_GPlocationOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ol/control/Control */ \"ol/control/Control\");\n/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_control_Control__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ol/Overlay */ \"ol/Overlay\");\n/* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ol_Overlay__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ol/proj */ \"ol/proj\");\n/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ol_proj__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ol/Observable */ \"ol/Observable\");\n/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(ol_Observable__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! geoportal-access-lib */ \"./node_modules/geoportal-access-lib/src/Gp.js\");\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Common/Utils */ \"./src/Common/Utils.js\");\n/* harmony import */ var _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Common/Utils/GeocodeUtils */ \"./src/Common/Utils/GeocodeUtils.js\");\n/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Common/Utils/SelectorID */ \"./src/Common/Utils/SelectorID.js\");\n/* harmony import */ var _Utils_Markers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Utils/Markers */ \"./src/OpenLayers/Controls/Utils/Markers.js\");\n/* harmony import */ var _Common_Controls_LocationSelectorDOM__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Common/Controls/LocationSelectorDOM */ \"./src/Common/Controls/LocationSelectorDOM.js\");\n// import CSS\n\n// import OpenLayers\n\n\n\n\n// import geoportal library access\n\n// import local\n\n\n\n\n\n// DOM\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_6__[\"default\"].getLogger(\"locationselector\");\n\n/**\n * @classdesc\n *\n * LocationSelector component. Enables to select a location, using autocompletion or picking location on the map\n * @type {ol.control.LocationSelector}\n * @param {Object} [options] - component options\n * @param {String} [options.apiKey] - API key for autocomplete service call. The key \"calcul\" is used by default.\n * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol)\n * @param {Boolean} [options.displayInfo = true] - whether to display info in a popup or not (not implemented yet) Default is true\n * @param {Object} [options.tag] - tag options\n * @param {Number} [options.tag.id = 1] - order id number in a locations group, in case several LocationSelector are used. For instance in route case : departure tag id should be 0, arrival tag id should be 1, and other ones : 2, 3, ...\n * @param {Number} [options.tag.groupId = null] - locationSelector global component id (in case locationSelector is called by another graphic component, e.g. route control)\n * @param {String} [options.tag.label] - text to display in component (e.g. \"Departure\"). Default is \">\"\n * @param {Object} [options.tag.markerOpts] - options to use your own marker. Default is a lightOrange marker.\n * @param {String} [options.tag.markerOpts.url] - marker base64 encoded url (ex \"data:image/png;base64,...\"\"). Mandatory for a custom marker\n * @param {Array} [options.tag.markerOpts.offset] - 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. Default is [0, 0]. (see {@link http://openlayers.org/en/latest/apidoc/ol.Overlay.html ol.Overlay})\n * @param {Boolean} [options.tag.display = true] - whether to display or hide component. Default is true\n * @param {Boolean} [options.tag.addOption = false] - whether to display picto to add another LocationSelector (in case of route control)\n * @param {Boolean} [options.tag.removeOption = false] - whether to display picto to remove a LocationSelector (in case of route control)\n * @param {Object} [options.autocompleteOptions] - autocomplete service options (see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~autoComplete Gp.Services.autoComplete()} to know all autocomplete options)\n * @example\n * var locationselector = new LocationSelector({\n * apiKey : \"\",\n * tag : {\n * id : 1,\n * groupId : null,\n * label : \"Départ\",\n * markerOpts : {\n * url : \"...\",\n * offset : [0,0]\n * },\n * display : true\n * },\n * autocompleteOptions : {}\n * });\n */\nvar LocationSelector = function (Control) {\n /**\n * See {@link ol.control.LocationSelector}\n * @module LocationSelector\n * @alias module:~Controls/LocationSelector\n * @param {*} options - options\n * @example\n * import LocationSelector from \"src/OpenLayers/Controls/LocationSelector\"\n */\n function LocationSelector(options) {\n options = options || {};\n if (!(this instanceof LocationSelector)) {\n throw new TypeError(\"ERROR CLASS_CONSTRUCTOR\");\n }\n\n // initialisation du composant\n this.initialize(options);\n\n // creation du DOM\n this._container = this._initContainer();\n\n // on peut éventuellement encapsuler le composant dans une div passée par l'utilisateur\n // (le composant étant positionné en relatif, il doit être positionné dans une div si utilisé seul)\n if (options.element && options.element.appendChild) {\n options.element.appendChild(this._container);\n this._container = options.element;\n }\n\n // call ol.control.Control constructor\n Control.call(this, {\n element: this._container,\n target: options.target,\n render: options.render\n });\n }\n ;\n // Inherits from ol.control.Control\n if (Control) LocationSelector.__proto__ = Control;\n\n /**\n * @lends module:LocationSelector\n */\n LocationSelector.prototype = Object.create(Control.prototype, {});\n _Common_Utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].assign(LocationSelector.prototype, _Common_Controls_LocationSelectorDOM__WEBPACK_IMPORTED_MODULE_11__[\"default\"]);\n\n /**\n * Constructor (alias)\n */\n LocationSelector.prototype.constructor = LocationSelector;\n\n /**\n * initialize component\n *\n * @param {Object} options - options\n */\n LocationSelector.prototype.initialize = function (options) {\n // set default options\n this.options = {\n tag: {\n id: 1,\n // numero d'ordre sur un groupe de locations\n groupId: null,\n // id du composant global contenant le LocationSelector\n label: \">\",\n display: true,\n addOption: false,\n removeOption: false\n },\n displayInfo: true,\n autocompleteOptions: {\n oldAutocompleteService: true\n }\n };\n\n // merge with user options\n _Common_Utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].mergeParams(this.options, options);\n\n /** uuid */\n this._uid = this.options.tag.groupId || _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_9__[\"default\"].generate();\n // info : si un uid (groupId) est spécifié\n // (par ex si ce composant est appélé par un autre composant graphique)\n // alors on le récupère, sinon c'est qu'il est indépendant : on génère donc un uuid\n\n /** container map */\n this._map = null;\n\n /** container principal des entrées */\n this._inputsContainer = null;\n\n /** container du label du point */\n this._inputLabelContainer = null;\n\n /** container de la saisi de l'autocompletion */\n this._inputAutoCompleteContainer = null;\n\n /** container du pointer de saisi sur la carte */\n this._inputShowPointerContainer = null;\n\n /** label du pointer de saisi sur la carte (avec img) */\n this._inputShowPointer = null;\n\n /** container des coordonnées */\n this._inputCoordinateContainer = null;\n\n /** elements pour ajouter ou supprimer un nouveau point */\n this._addPointElement = null;\n this._removePointElement = null;\n\n /** coordonnées du point selectionné, en EPSG:4326 */\n this._coordinate = null;\n\n /** container des reponses de l'autocompletion */\n this._suggestedContainer = null;\n\n /** listes des reponses de l'autocompletion */\n this._suggestedLocations = [];\n\n /** localisant */\n this._currentLocation = null;\n\n /** marker */\n this._initMarker();\n\n /** ressources du services d'autocompletion (ayant droit!) */\n this._resources = {};\n\n // listener key for event click on map\n this.listenerKey = null;\n };\n\n /**\n * initialize marker : url and offset\n *\n * @private\n */\n LocationSelector.prototype._initMarker = function () {\n // init marker properties\n this._marker = null;\n this._markerUrl = \"\";\n this._markerOffset = [0, 0];\n if (this.options.tag.markerOpts && this.options.tag.markerOpts.url) {\n // get marker src url\n this._markerUrl = this.options.tag.markerOpts.url;\n\n // get marker offset\n var offset = this.options.tag.markerOpts.offset;\n if (offset) {\n if (Array.isArray(offset) && offset.length === 2) {\n this._markerOffset = offset;\n } else {\n logger.log(\"markerOpts.offset should be an array. e.g. : [0,0]\");\n }\n }\n } else {\n // set default options for marker\n this._markerUrl = _Utils_Markers__WEBPACK_IMPORTED_MODULE_10__[\"default\"][\"lightOrange\"];\n this._markerOffset = _Utils_Markers__WEBPACK_IMPORTED_MODULE_10__[\"default\"].defaultOffset;\n }\n };\n\n // ################################################################### //\n // ########################## publics methods ######################## //\n // ################################################################### //\n\n /**\n * get coordinate\n *\n * @returns {Array} this._coordinate - point coordinate (EPSG:4326) : [lon, lat]\n */\n LocationSelector.prototype.getCoordinate = function () {\n return this._coordinate;\n };\n\n /**\n * set coordinate\n * @param {Object} coordinate - Coordinate in the map projection by default, otherwise, the projection is entered in the following parameter\n * @param {String} crs - Coordinate projection\n */\n LocationSelector.prototype.setCoordinate = function (coordinate, crs) {\n var map = this.getMap();\n var proj = map.getView().getProjection().getCode();\n // on utilise la projection de la carte\n if (!crs) {\n crs = proj;\n }\n this._setCoordinate(coordinate, crs);\n\n // on utilise toujours la projection de la carte pour placer le marker\n coordinate = Object(ol_proj__WEBPACK_IMPORTED_MODULE_3__[\"transform\"])(coordinate, crs, proj);\n this._setMarker([coordinate[0], coordinate[1]], null, false);\n };\n\n /**\n * clean all and input\n */\n LocationSelector.prototype.clear = function () {\n this.clearResults();\n this._inputLabelContainer.click();\n };\n\n /**\n * clear all results and the marker.\n */\n LocationSelector.prototype.clearResults = function () {\n this._currentLocation = null;\n this._coordinate = null;\n this._hideSuggestedLocation();\n this._clearSuggestedLocation();\n this._setMarker();\n // map.un(\"click\", (e) => this.onMouseMapClick(e));\n Object(ol_Observable__WEBPACK_IMPORTED_MODULE_4__[\"unByKey\"])(this.listenerKey);\n };\n\n // ################################################################### //\n // ##################### init component (private) #################### //\n // ################################################################### //\n\n /**\n * initialize component container\n *\n * @returns {DOMElement} DOM element\n */\n LocationSelector.prototype._initContainer = function () {\n var _this = this;\n var id = this.options.tag.id;\n\n // create main container\n var container = this._createMainContainerElement();\n var inputs = this._inputsContainer = this._createLocationPointElement(id, this.options.tag.display);\n container.appendChild(inputs);\n var _inputLabel = this._inputLabelContainer = this._createLocationPointLabelElement(id, this.options.tag.label);\n inputs.appendChild(_inputLabel);\n var _inputAutoComplete = this._inputAutoCompleteContainer = this._createLocationAutoCompleteteInputElement(id);\n if (_inputAutoComplete.addEventListener) {\n _inputAutoComplete.addEventListener(\"click\", function () {\n return _this.onAutoCompleteInputClick();\n });\n } else if (_inputAutoComplete.attachEvent) {\n _inputAutoComplete.attachEvent(\"onclick\", function () {\n return _this.onAutoCompleteInputClick();\n });\n }\n inputs.appendChild(_inputAutoComplete);\n var _inputCoordinate = this._inputCoordinateContainer = this._createLocationCoordinateInputElement(id);\n inputs.appendChild(_inputCoordinate);\n var _inputShowPointer = this._inputShowPointerContainer = this._createLocationPointerShowInputElement(id);\n inputs.appendChild(_inputShowPointer);\n var _inputPointer = this._inputShowPointer = this._createLocationPointerInputElement(id);\n inputs.appendChild(_inputPointer);\n if (this.options.tag.addOption) {\n var _inputAddStage = this._addPointElement = this._createLocationAddPointElement();\n inputs.appendChild(_inputAddStage);\n }\n if (this.options.tag.removeOption) {\n var _inputRemoveStage = this._removePointElement = this._createLocationRemovePointElement(id);\n inputs.appendChild(_inputRemoveStage);\n }\n var results = this._suggestedContainer = this._createLocationAutoCompleteResultElement(id);\n container.appendChild(results);\n return container;\n };\n\n // ################################################################### //\n // ###################### handlers events (dom) ###################### //\n // ################################################################### //\n\n /**\n * this method is called by event 'click' on 'GPlocationOrigin' input\n *\n * @private\n */\n LocationSelector.prototype.onAutoCompleteInputClick = function () {\n if (this._inputAutoCompleteContainer && this._inputAutoCompleteContainer.value.length > 2) {\n this._displaySuggestedLocation();\n }\n };\n\n /**\n * this method is called by event 'keyup' on 'GProuteOrigin' tag input\n * (cf. this._createRouteAutoCompleteteInputElement), and it gets the value of input.\n * this value is passed as a parameter for the service autocomplete (text).\n * the results of the request are displayed into a drop down menu.\n * FIXME\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n LocationSelector.prototype.onAutoCompleteSearchText = function (e) {\n var _this2 = this;\n var value = e.target.value;\n if (!value) {\n return;\n }\n // on recupere les options du service\n var serviceOptions = this.options.autocompleteOptions || {};\n var _customOnSuccess = serviceOptions.onSuccess || null;\n var _customOnFailure = serviceOptions.onFailure || null;\n\n // on sauvegarde le localisant\n this._currentLocation = value;\n\n // on limite les requêtes à partir de 3 car. saisie !\n if (value.length < 3) {\n this._clearSuggestedLocation();\n return;\n }\n\n // INFORMATION\n // on effectue la requête au service d'autocompletion.\n // on met en place des callbacks afin de recuperer les resultats ou\n // les messages d'erreurs du service.\n // les resultats sont affichés dans une liste deroulante.\n // les messages d'erreurs sont affichés sur la console (?)\n var context = this;\n this._requestAutoComplete({\n text: value,\n maximumResponses: 5,\n // FIXME je limite le nombre de reponse car le container DOM est limité dans l'affichage !!!\n // callback onSuccess\n onSuccess: function onSuccess(results) {\n if (results) {\n var locations = results.suggestedLocations;\n context._fillAutoCompletedLocationListContainer(locations);\n if (_customOnSuccess) {\n _customOnSuccess.call(this, results);\n }\n }\n },\n // callback onFailure\n onFailure: function onFailure(error) {\n // FIXME\n // où affiche t on les messages : ex. 'No suggestion matching the search' ?\n // doit on nettoyer la liste des suggestions dernierement enregistrée :\n context._clearSuggestedLocation();\n logger.log(error.message);\n if (_customOnFailure) {\n _customOnFailure.call(this, error);\n }\n }\n });\n var map = this.getMap();\n map.on(\"click\", function () {\n return _this2._hideSuggestedLocation();\n });\n map.on(\"pointerdrag\", function () {\n return _this2._hideSuggestedLocation();\n });\n };\n\n /**\n * this method is called by event 'click' on 'GPautoCompleteResultsList' tag div\n * (cf. this._createAutoCompleteListElement), and it selects the location.\n * this location displays a marker on the map.\n * FIXME\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n LocationSelector.prototype.onAutoCompletedResultsItemClick = function (e) {\n var idx = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_9__[\"default\"].index(e.target.id);\n if (!idx) {\n return;\n }\n\n // FIXME\n // les coordonnées sont inversées entre les 2 services !?\n // AutoCompletion : lon/lat (\"EPSG:4326\")\n // Geocoding : lat/lon\n var position = [this._suggestedLocations[idx].position.x, this._suggestedLocations[idx].position.y];\n // on sauvegarde le point courant (en EPSG:4326, [lon, lat])\n this._coordinate = position;\n var info = {\n type: this._suggestedLocations[idx].type,\n fields: this._suggestedLocations[idx]\n };\n\n // on ajoute le texte de l'autocomplétion dans l'input\n var label = _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_8__[\"default\"].getSuggestedLocationFreeform(this._suggestedLocations[idx]);\n this._setLabel(label);\n\n // Info : la position est en EPSG:4326, à transformer dans la projection de la carte\n var view = this.getMap().getView();\n var mapProj = view.getProjection().getCode();\n if (mapProj !== \"EPSG:4326\") {\n // on retransforme les coordonnées de la position dans la projection de la carte\n position = Object(ol_proj__WEBPACK_IMPORTED_MODULE_3__[\"transform\"])(position, \"EPSG:4326\", mapProj);\n }\n // on centre la vue et positionne le marker, à la position reprojetée dans la projection de la carte\n this._setPosition(position);\n this._setMarker(position, info, this.options.displayInfo);\n };\n\n /**\n * this method is called by event 'click' on 'GProuteOriginPointerImg' tag input\n * (cf. this._createRoutePointerInputElement), and it create or remove the event of click map.\n *\n * @private\n */\n LocationSelector.prototype.onActivateMapPointClick = function () {\n var _this3 = this;\n var map = this.getMap();\n if (this._inputShowPointerContainer.checked) {\n // on efface l'ancien resultat\n this.clearResults();\n this.listenerKey = map.on(\"click\", function (e) {\n return _this3.onMouseMapClick(e);\n });\n this._setCursor(\"crosshair\");\n } else {\n // map.un(\"click\", (e) => this.onMouseMapClick(e));\n Object(ol_Observable__WEBPACK_IMPORTED_MODULE_4__[\"unByKey\"])(this.listenerKey);\n this._setCursor();\n }\n };\n\n /**\n * this method is called by event 'click' on 'GProuteOriginLabel' tag label\n * (cf. this._createRoutePointLabelElement).\n * this point is erased.\n *Missing\n * @private\n */\n LocationSelector.prototype.onLocationClearPointClick = function () {\n this._setCursor();\n this.clearResults();\n };\n\n /**\n * this method is called by event 'click' on 'GProuteStageRemove' tag input\n * (cf. this._createRouteRemovePointElement).\n * this point is deleted\n *\n * @private\n */\n LocationSelector.prototype.onLocationRemovePointClick = function () {\n this._setCursor();\n this.clearResults();\n };\n\n /**\n * TODO this method is called by event 'click' on 'GProuteStageAdd' tag input\n * (cf. this._createRouteAddPointElement).\n * this point is added as a parameter for the service route.\n *\n * @param {Object} e - HTMLElement\n */\n LocationSelector.prototype.onLocationAddPointClick = function (e) {\n logger.log(\"onRouteAddPointClick\", e);\n };\n\n // ################################################################### //\n // #################### handlers events (control) #################### //\n // ################################################################### //\n\n /**\n * this method is called by event 'click' on map\n * (cf. this.onRouteMapPointClick), and it gets the coordinate of click on map.\n * this point is saved as a parameter for the service route.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n LocationSelector.prototype.onMouseMapClick = function (e) {\n var coordinate = e.coordinate;\n if (!e.map || !e.map.getView()) {\n return;\n }\n var crs = e.map.getView().getProjection();\n this._setCoordinate(coordinate, crs);\n this._setMarker([coordinate[0], coordinate[1]], null, false);\n\n // on desactive l'event sur la map !\n this.onActivateMapPointClick(e);\n };\n\n // ################################################################### //\n // ################# pivates methods use by events ################### //\n // ################################################################### //\n\n /**\n * this sends the label to the panel.\n *\n * @param {String} label - label suggested location\n * @private\n */\n LocationSelector.prototype._setLabel = function (label) {\n this._inputAutoCompleteContainer.value = label;\n };\n\n /**\n * this change the cursor of the map when entering a point.\n *\n * @param {String} cursor - cursor style\n * @private\n */\n LocationSelector.prototype._setCursor = function (cursor) {\n var map = this.getMap();\n var div = map.getTargetElement();\n if (cursor) {\n div.style.cursor = cursor;\n } else {\n div.style.cursor = null;\n }\n };\n\n /**\n * this sends the coordinates to the panel.\n *\n * @method _setCoordinate\n * @param {Array} olCoordinate - ol.Coordinate object [lon, lat] ou [x, y] (proj = map proj system)\n * @param {Object} crs - coordinate CRS (ol.proj.Projection)\n * @private\n */\n LocationSelector.prototype._setCoordinate = function (olCoordinate, crs) {\n // structure\n // ol.Coordinate\n // [\n // 4 // lon ou x\n // 48 // lat ou y\n // ]\n\n // on transforme olCoodinate (dont la projection est celle de la carte) en EPSG:4326\n this._coordinate = Object(ol_proj__WEBPACK_IMPORTED_MODULE_3__[\"transform\"])(olCoordinate, crs, \"EPSG:4326\");\n\n // INFO : si on veut des DMS\n // var coords = ol.coordinate.toStringHDMS(this._coordinate, 2).split(\"N \");\n // // coords est du type : \"48° 00′ 00″ N 2° 00′ 00″ E\". On veut récupérer les 2 coordonnées séparément.\n // var lat = coords[0] + \"N\";\n // var lng = coords[1];\n\n // Pour avoir des degrés décimaux :\n var lat = this._coordinate[0].toFixed(4);\n var lng = this._coordinate[1].toFixed(4);\n var value = lng + \" / \" + lat;\n this.GPdisplayCoordinate(value);\n };\n\n /**\n * this method is called by this.on*ResultsItemClick()\n * and set center at given position.\n *\n * @param {Array} position - ol.Coordinate object [lon, lat] (en lat/lon : \"EPSG:4326\")\n * @private\n */\n LocationSelector.prototype._setPosition = function (position) {\n var view = this.getMap().getView();\n view.setCenter(position);\n };\n\n /**\n * this method is called by this.on*ResultsItemClick()\n * and displays a marker.\n * FIXME : marker IGN et informations ?\n *\n * @param {Array} position - ol.Coordinate object [lon, lat] ou [x, y]\n * @param {Object} information - suggested or geocoded information\n * @param {Boolean} display - display a popup information\n * @private\n */\n LocationSelector.prototype._setMarker = function (position, information, display) {\n var map = this.getMap();\n // remove previous markers\n if (this._marker != null) {\n map.removeOverlay(this._marker);\n this._marker = null;\n }\n if (position) {\n var markerDiv = document.createElement(\"img\");\n markerDiv.src = this._markerUrl;\n this._marker = new ol_Overlay__WEBPACK_IMPORTED_MODULE_2___default.a({\n position: position,\n offset: this._markerOffset,\n element: markerDiv,\n stopEvent: false\n });\n map.addOverlay(this._marker);\n if (display) {\n logger.log(\"marker information : \", information);\n }\n // // FIXME\n // // doit on mettre une information\n // // - correctement construite ?\n // // - uniquement informatif ?\n // // - RIEN ?\n // if (display) {\n // var popupContent = null;\n //\n // var values = [];\n //\n // values.push(information.fields.fullText || \"\");\n // values.push(information.fields.street || \"\");\n // values.push(information.fields.postalCode || \"\");\n // values.push(information.fields.commune || \"\");\n //\n // if (information.type === \"PositionOfInterest\") {\n // values.push(information.fields.poi || \"\");\n // values.push(information.fields.kind || \"\");\n // }\n //\n // popupContent = values.join(\" | \");\n //\n // this._marker.bindPopup(popupContent);\n // }\n }\n };\n\n /**\n * this method is called by this.onAutoCompleteSearchText()\n * and it clears all suggested location.\n *\n * @private\n */\n LocationSelector.prototype._clearSuggestedLocation = function () {\n // suppression du dom\n this._suggestedLocations = [];\n if (this._suggestedContainer) {\n while (this._suggestedContainer.firstChild) {\n this._suggestedContainer.removeChild(this._suggestedContainer.firstChild);\n }\n }\n };\n\n /**\n * this method is called by event 'click' on map\n * and it hide suggested locations\n *\n * @private\n */\n LocationSelector.prototype._hideSuggestedLocation = function () {\n if (this._suggestedContainer) {\n this._suggestedContainer.style.display = \"none\";\n }\n };\n\n /**\n * this method is called by this.onAutoCompleteSearchText()\n * and it clears all suggested location.\n *\n * @private\n */\n LocationSelector.prototype._displaySuggestedLocation = function () {\n if (this._suggestedContainer) {\n this._suggestedContainer.style.display = \"block\";\n }\n };\n\n /**\n * this method is called by this.onAutoCompleteSearch()\n * and executes a request to the service.\n *\n * @param {Object} settings - service settings\n * @param {String} settings.text - text\n * @param {Function} settings.onSuccess - callback\n * @param {Function} settings.onFailure - callback\n * @private\n */\n LocationSelector.prototype._requestAutoComplete = function (settings) {\n logger.log(\"_requestAutoComplete()\", settings);\n\n // on ne fait pas de requête si on n'a pas renseigné de parametres !\n if (!settings || Object.keys(settings).length === 0) {\n return;\n }\n\n // on ne fait pas de requête si la parametre 'text' est vide !\n if (!settings.text) {\n return;\n }\n logger.log(settings);\n var options = {};\n // on recupere les options du service\n _Common_Utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].assign(options, this.options.autocompleteOptions);\n // ainsi que la recherche et les callbacks\n _Common_Utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].assign(options, settings);\n options.oldAutocompleteService = options.oldAutocompleteService || true;\n\n // les ressources\n var resources = this._resources[\"AutoCompletion\"] || null;\n if (resources && Array.isArray(resources)) {\n if (!options.filterOptions) {\n options.filterOptions = {};\n }\n options.filterOptions.type = resources;\n }\n\n // cas où la clef API n'est pas renseignée dans les options du service,\n // on utilise celle renseignée au niveau du controle ou la clé \"calcul\" par défaut.\n options.apiKey = options.apiKey || this.options.apiKey;\n\n // si l'utilisateur a spécifié le paramètre ssl au niveau du control, on s'en sert\n // true par défaut (https)\n if (typeof options.ssl !== \"boolean\") {\n if (typeof this.options.ssl === \"boolean\") {\n options.ssl = this.options.ssl;\n } else {\n options.ssl = true;\n }\n }\n logger.log(options);\n geoportal_access_lib__WEBPACK_IMPORTED_MODULE_5__[\"default\"].Services.autoComplete(options);\n };\n\n /**\n * this method is called by this.onAutoCompleteSearchText()\n * and fills the container of the location list.\n * it creates a HTML Element per location\n * (cf. this. ...)\n *\n * @param {Object[]} locations - locations\n *\n * @private\n */\n LocationSelector.prototype._fillAutoCompletedLocationListContainer = function (locations) {\n if (!locations || locations.length === 0) {\n return;\n }\n\n // on vide la liste avant de la construire\n var element = this._suggestedContainer;\n if (element.childElementCount) {\n while (element.firstChild) {\n element.removeChild(element.firstChild);\n }\n }\n for (var i = 0; i < locations.length; i++) {\n // Proposals are dynamically filled in Javascript by autocomplete service\n this._createLocationAutoCompletedLocationElement(this.options.tag.id, locations[i], i);\n }\n\n // sauvegarde de l'etat des locations\n this._suggestedLocations = locations;\n };\n return LocationSelector;\n}(ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default.a);\n/* harmony default export */ __webpack_exports__[\"default\"] = (LocationSelector);\n\n// Expose LocationSelector as ol.control.LocationSelector (for a build bundle)\nif (window.ol && window.ol.control) {\n window.ol.control.LocationSelector = LocationSelector;\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9PcGVuTGF5ZXJzL0NvbnRyb2xzL0xvY2F0aW9uU2VsZWN0b3IuanM/NGI2ZiJdLCJuYW1lcyI6WyJsb2dnZXIiLCJMb2dnZXIiLCJnZXRMb2dnZXIiLCJMb2NhdGlvblNlbGVjdG9yIiwiQ29udHJvbCIsIm9wdGlvbnMiLCJUeXBlRXJyb3IiLCJpbml0aWFsaXplIiwiX2NvbnRhaW5lciIsIl9pbml0Q29udGFpbmVyIiwiZWxlbWVudCIsImFwcGVuZENoaWxkIiwiY2FsbCIsInRhcmdldCIsInJlbmRlciIsIl9fcHJvdG9fXyIs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AgICAgICAgLy8gbGVzIHJlc3VsdGF0cyBzb250IGFmZmljaMOpcyBkYW5zIHVuZSBsaXN0ZSBkZXJvdWxhbnRlLlxuICAgICAgICAvLyBsZXMgbWVzc2FnZXMgZCdlcnJldXJzIHNvbnQgYWZmaWNow6lzIHN1ciBsYSBjb25zb2xlICg/KVxuICAgICAgICB2YXIgY29udGV4dCA9IHRoaXM7XG4gICAgICAgIHRoaXMuX3JlcXVlc3RBdXRvQ29tcGxldGUoe1xuICAgICAgICAgICAgdGV4dCA6IHZhbHVlLFxuICAgICAgICAgICAgbWF4aW11bVJlc3BvbnNlcyA6IDUsIC8vIEZJWE1FIGplIGxpbWl0ZSBsZSBub21icmUgZGUgcmVwb25zZSBjYXIgbGUgY29udGFpbmVyIERPTSBlc3QgbGltaXTDqSBkYW5zIGwnYWZmaWNoYWdlICEhIVxuICAgICAgICAgICAgLy8gY2FsbGJhY2sgb25TdWNjZXNzXG4gICAgICAgICAgICBvblN1Y2Nlc3MgOiBmdW5jdGlvbiAocmVzdWx0cykge1xuICAgICAgICAgICAgICAgIGlmIChyZXN1bHRzKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBsb2NhdGlvbnMgPSByZXN1bHRzLnN1Z2dlc3RlZExvY2F0aW9ucztcbiAgICAgICAgICAgICAgICAgICAgY29udGV4dC5fZmlsbEF1dG9Db21wbGV0ZWRMb2NhdGlvbkxpc3RDb250YWluZXIobG9jYXRpb25zKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKF9jdXN0b21PblN1Y2Nlc3MpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIF9jdXN0b21PblN1Y2Nlc3MuY2FsbCh0aGlzLCByZXN1bHRzKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAvLyBjYWxsYmFjayBvbkZhaWx1cmVcbiAgICAgICAgICAgIG9uRmFpbHVyZSA6IGZ1bmN0aW9uI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aXRpb24gOiBwb3NpdGlvbixcbiAgICAgICAgICAgICAgICBvZmZzZXQgOiB0aGlzLl9tYXJrZXJPZmZzZXQsXG4gICAgICAgICAgICAgICAgZWxlbWVudCA6IG1hcmtlckRpdixcbiAgICAgICAgICAgICAgICBzdG9wRXZlbnQgOiBmYWxzZVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBtYXAuYWRkT3ZlcmxheSh0aGlzLl9tYXJrZXIpO1xuXG4gICAgICAgICAgICBpZiAoZGlzcGxheSkge1xuICAgICAgICAgICAgICAgIGxvZ2dlci5sb2coXCJtYXJrZXIgaW5mb3JtYXRpb24gOiBcIiwgaW5mb3JtYXRpb24pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gLy8gRklYTUVcbiAgICAgICAgICAgIC8vIC8vIGRvaXQgb24gbWV0dHJlIHVuZSBpbmZvcm1hdGlvblxuICAgICAgICAgICAgLy8gLy8gLSBjb3JyZWN0ZW1lbnQgY29uc3RydWl0ZSA/XG4gICAgICAgICAgICAvLyAvLyAtIHVuaXF1ZW1lbnQgaW5mb3JtYXRpZiA/XG4gICAgICAgICAgICAvLyAvLyAtIFJJRU4gP1xuICAgICAgICAgICAgLy8gaWYgKGRpc3BsYXkpIHtcbiAgICAgICAgICAgIC8vICAgICB2YXIgcG9wdXBDb250ZW50ID0gbnVsbDtcbiAgICAgICAgICAgIC8vXG4gICAgICAgICAgICAvLyAgICAgdmFyIHZhbHVlcyA9IFtdO1xuICAgICAgICAgICAgLy9cbiAgICAgICAgICAgIC8vICAgICB2YWx1ZXMucHVzaChpbmZvcm1hdGlvbi5maWVsZHMuZnVsbFRleHQgfHwgXCJcIik7XG4gICAgICAgICAgICAvLyAgICAgdmFsdWVzLnB1c2goaW5mb3JtYXRpb24uZmllbGRzLnN0cmVldCB8fCBcIlwiKTtcbiAgICAgICAgICAgIC8vICAgICB2YWx1ZXMucHVzaChpbmZvcm1hdGlvbi5maWVsZHMucG9zdGFsQ29kZSB8fCBc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NcbiAgICAgICAgdGhpcy5fc3VnZ2VzdGVkTG9jYXRpb25zID0gbG9jYXRpb25zO1xuICAgIH07XG5cbiAgICByZXR1cm4gTG9jYXRpb25TZWxlY3Rvcjtcbn0oQ29udHJvbCkpO1xuXG5leHBvcnQgZGVmYXVsdCBMb2NhdGlvblNlbGVjdG9yO1xuXG4vLyBFeHBvc2UgTG9jYXRpb25TZWxlY3RvciBhcyBvbC5jb250cm9sLkxvY2F0aW9uU2VsZWN0b3IgKGZvciBhIGJ1aWxkIGJ1bmRsZSlcbmlmICh3aW5kb3cub2wgJiYgd2luZG93Lm9sLmNvbnRyb2wpIHtcbiAgICB3aW5kb3cub2wuY29udHJvbC5Mb2NhdGlvblNlbGVjdG9yID0gTG9jYXRpb25TZWxlY3Rvcjtcbn1cbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/OpenLayers/Controls/LocationSelector.js\n"); /***/ }), @@ -2529,7 +2541,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var ol_O /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CSS_Controls_MousePosition_GPmousePositionOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../CSS/Controls/MousePosition/GPmousePositionOpenLayers.css */ \"./src/OpenLayers/CSS/Controls/MousePosition/GPmousePositionOpenLayers.css\");\n/* harmony import */ var _CSS_Controls_MousePosition_GPmousePositionOpenLayers_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_MousePosition_GPmousePositionOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ol/control/Control */ \"ol/control/Control\");\n/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_control_Control__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ol/Overlay */ \"ol/Overlay\");\n/* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ol_Overlay__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ol/Observable */ \"ol/Observable\");\n/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ol_Observable__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ol/proj */ \"ol/proj\");\n/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(ol_proj__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! geoportal-access-lib */ \"./node_modules/geoportal-access-lib/src/Gp.js\");\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Common/Utils */ \"./src/Common/Utils.js\");\n/* harmony import */ var _Utils_Interactions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Utils/Interactions */ \"./src/OpenLayers/Controls/Utils/Interactions.js\");\n/* harmony import */ var _Utils_Markers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Utils/Markers */ \"./src/OpenLayers/Controls/Utils/Markers.js\");\n/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../Common/Utils/SelectorID */ \"./src/Common/Utils/SelectorID.js\");\n/* harmony import */ var _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Common/Utils/MathUtils */ \"./src/Common/Utils/MathUtils.js\");\n/* harmony import */ var _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Common/Utils/Draggable */ \"./src/Common/Utils/Draggable.js\");\n/* harmony import */ var _CRS_CRS__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../CRS/CRS */ \"./src/OpenLayers/CRS/CRS.js\");\n/* harmony import */ var _Common_Controls_MousePositionDOM__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../Common/Controls/MousePositionDOM */ \"./src/Common/Controls/MousePositionDOM.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n// import CSS\n\n// import OpenLayers\n\n\n\n\n// import geoportal library access\n\n// import local\n\n\n\n\n\n\n\n// import defs proj4 manually (cf. line 125)\n// import Proj4 from \"proj4\";\n// import { register } from \"ol/proj/proj4\";\n// import Register from \"../../Common/Utils/Register\";\n// import local with ol dependencies\n\n// import \"../CRS/AutoLoadCRS\";\n\n// DOM\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_6__[\"default\"].getLogger(\"GeoportalMousePosition\");\n\n/**\n * @classdesc\n * MousePosition Control.\n *\n * @constructor\n * @alias ol.control.GeoportalMousePosition\n * @type {ol.control.GeoportalMousePosition}\n * @extends {ol.control.Control}\n * @param {Object} options - options for function call.\n * @param {String} [options.apiKey] - API key. The key \"calcul\" is used by default.\n * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol)\n * @param {Boolean} [options.draggable = false] - Specify if widget is draggable\n * @param {Boolean} [options.collapsed = true] - Specify if MousePosition control should be collapsed at startup. Default is true.\n * @param {Array} [options.units] - list of coordinates units, to be displayed in control units list.\n * Values may be \"DEC\" (decimal degrees), \"DMS\" (sexagecimal), \"RAD\" (radians) and \"GON\" (grades) for geographical coordinates,\n * and \"M\" or \"KM\" for metric coordinates\n * @param {Boolean} [options.displayAltitude = true] - activate (true) or deactivate (false) the altitude panel. True by default\n * @param {Boolean} [options.displayCoordinates = true] - activate (true) or deactivate (false) the coordinates panel. True by default\n * @param {Boolean} [options.editCoordinates = false] - If true, coordinates from the MousePosition control can be edited by users to re-center the view. False by default.\n * @param {Function} [options.mapCenterCallback] - callback...\n * @param {Array} [options.systems] - list of projection systems, default are Geographical (\"EPSG:4326\"), Web Mercator (\"EPSG:3857\"), Lambert 93 (\"EPSG:2154\") and extended Lambert 2 (\"EPSG:27572\").\n * Each array element (=system) is an object with following properties :\n * @param {String} options.systems.crs - Proj4 crs alias (from proj4 defs). e.g. : \"EPSG:4326\". Required\n * @param {String} [options.systems.label] - CRS label to be displayed in control. Default is crs code (e.g. \"EPSG:4326\")\n * @param {String} options.systems.type - CRS units type for coordinates conversion : \"Geographical\" or \"Metric\". Default: \"Metric\"\n * @param {Object} [options.systems.geoBBox] - Aera covered by the system (WGS84 coordinates).\n * @param {Number} options.systems.geoBBox.right - Right bound.\n * @param {Number} options.systems.geoBBox.left - Left bound.\n * @param {Number} options.systems.geoBBox.top - Top bound.\n * @param {Number} options.systems.geoBBox.bottom - Bottom bound.\n * @param {Object} [options.positionMarker] - options for position marker\n * @param {String} options.positionMarker.url - Marker url (define in src/Openlayers/Controls/Utils/Markers.js)\n * @param {Array} options.positionMarker.offset - Offsets in pixels used when positioning the marker towards targeted point.\n * The first element in the array is the horizontal offset. A positive value shifts the marker right.\n * The second element in the array is the vertical offset. A positive value shifts the marker down. [0,0] value positions the top-left corner of the marker image to the targeted point.\n * Default is offset associated to default marker image.\n * @param {Boolean} options.positionMarker.hide - if true, marker is not displayed, otherwise displayed (False by default.)\n * @param {Object} [options.altitude] - elevation configuration\n * @param {Object} [options.altitude.serviceOptions] - options of elevation service\n * @param {Number} [options.altitude.responseDelay] - latency for altitude request, 500 ms by default\n * @param {Number} [options.altitude.triggerDelay] - immobilisation time of movement on the map to trigger the elevation calculation, 200 ms by default\n * @param {Number} [options.altitude.noDataValue] - value used for altitude service no data (default is -99999). In this case, \"---m\" will be displayed instead of \"-99999m\"\n * @param {Number} [options.altitude.noDataValueTolerance] - tolerance for no data value :\n * values in [noDataValue + noDataValueTolerance ; noDataValue - noDataValueTolerance] interval will not be displayed, but \"---m\" will be displayed instead.\n * Default is 90000 (no data values = [-9999 ; -189999])\n * @example\n * var MousePosition = new ol.control.GeoportalMousePosition({\n * \"collapsed\" : false,\n * \"graggable\" : true,\n * \"displayCoordinates\" : true,\n * \"displayAltitude\" : true,\n * \"altitude\" : {\n * \"triggerDelay\" : 100,\n * \"responseDelay\" : 500,\n * \"noDataValue\" : -99999,\n * \"noDataValueTolerance\" : 99000,\n * \"serviceOptions\" : {}\n * },\n * \"systems\" : [\n * {\n * \"crs\" : \"EPSG:3857\",\n * \"label\" : \"Web Mercator\",\n * \"type\" : \"Metric\"\n * },\n * {\n * \"crs\" : \"EPSG:4326\",\n * \"label\" : \"Géographiques\",\n * \"type\" : \"Geographical\"\n * },\n * {\n * \"label\" : \"Lambert 93\",\n * \"crs\" : \"EPSG:2154\",\n * \"type\" : \"Metric\",\n * \"geoBBox\" : {\n * \"left\" : -9.86,\n * \"bottom\" : 41.15,\n * \"right\" : 10.38,\n * \"top\" : 51.56\n * }\n * }\n * ],\n * \"units\" : [\"DEC\", \"DMS\"]\n * });\n */\nvar MousePosition = function (Control) {\n /**\n * See {@link ol.control.GeoportalMousePosition}\n * @module MousePosition\n * @alias module:~Controls/MousePosition\n * @param {*} options - options\n * @example\n * import GeoportalMousePosition from \"src/OpenLayers/Controls/MousePosition\"\n */\n function MousePosition(options) {\n options = options || {};\n if (!(this instanceof MousePosition)) {\n throw new TypeError(\"ERROR CLASS_CONSTRUCTOR\");\n }\n\n // init Proj4 defs manually\n // Register.load(Proj4);\n // try {\n // register(Proj4);\n // } catch (e) {}\n\n this._initialize(options);\n\n // init control DOM container\n var container = this._container = this._initContainer(options);\n\n // call ol.control.Control constructor\n Control.call(this, {\n element: container,\n target: options.target,\n render: options.render\n });\n }\n ;\n\n // Inherits from ol.control.Control\n if (Control) MousePosition.__proto__ = Control;\n\n /**\n * @lends module:GeoportalMousePosition\n */\n MousePosition.prototype = Object.create(Control.prototype, {});\n\n // on récupère les méthodes de la classe commune MousePositionDOM\n _Common_Utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].assign(MousePosition.prototype, _Common_Controls_MousePositionDOM__WEBPACK_IMPORTED_MODULE_14__[\"default\"]);\n\n /**\n * Constructor (alias)\n *\n * @private\n */\n MousePosition.prototype.constructor = MousePosition;\n\n /**\n * Overload ol.control.Control setMap method, called when\n *\n * @param {Object} map - the map\n *\n */\n MousePosition.prototype.setMap = function (map) {\n var _this = this;\n var context = this;\n if (map) {\n // dans le cas de l'ajout du contrôle à la map\n var center = this._createMapCenter();\n map.getViewport().appendChild(center);\n if (!this.collapsed && !this._isDesktop) {\n center.className = \"GPmapCenterVisible\";\n }\n\n // mode \"draggable\"\n if (this.draggable) {\n _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_12__[\"default\"].dragElement(this._panelMousePositionContainer, this._panelHeaderMousePositionContainer, map.getTargetElement());\n }\n\n // on met en place l'evenement sur la carte pour recuperer les coordonnées,\n // on l'active à l'ouverture du panneau uniquement !\n if (!this.collapsed) {\n // evenement valable pour le mode desktop !\n if (this._isDesktop) {\n this.listenerKey = map.on(\"pointermove\", function (e) {\n _this.onMouseMove(e);\n });\n } else {\n this.listenerKey = map.on(\"moveend\", function (e) {\n return _this.onMapMove(e);\n });\n }\n }\n\n // add overlay only if option editCoordinates is true\n if (this.options.editCoordinates) {\n // création de l'élément DOM\n var markerDiv = document.createElement(\"img\");\n markerDiv.id = this._addUID(\"GPmousePositionMarker\");\n markerDiv.src = this._markerUrl;\n markerDiv.title = \"Cliquer pour supprimer\";\n markerDiv.addEventListener(\"click\", function () {\n context._markerOverlay.setPosition(undefined);\n });\n this._markerOverlay = new ol_Overlay__WEBPACK_IMPORTED_MODULE_2___default.a({\n offset: this._markerOffset,\n element: markerDiv,\n stopEvent: false\n });\n map.addOverlay(this._markerOverlay);\n }\n } else {\n Object(ol_Observable__WEBPACK_IMPORTED_MODULE_3__[\"unByKey\"])(this.listenerKey);\n }\n\n // call original setMap method\n Control.prototype.setMap.call(this, map);\n\n // HACK: on arrête l'execution de la fonction...\n if (map === null) {\n return;\n }\n\n // mode \"collapsed\"\n if (!this.collapsed) {\n var inputShow = document.getElementById(\"GPshowMousePosition-\" + this._uid);\n inputShow.checked = \"checked\";\n this._setElevationPanel(this.options.displayAltitude);\n this._setCoordinatesPanel(this.options.displayCoordinates);\n if (!this.options.displayCoordinates) {\n this._setSettingsPanel(false);\n }\n }\n };\n\n // ################################################################### //\n // #################### user interface methods ####################### //\n // ################################################################### //\n\n /**\n * Set additional projection system\n *\n * @param {Object} system - projection system\n * @param {String} system.crs - Proj4 crs alias (from proj4 defs) e.g. \"EPSG:4326\"\n * @param {String} [system.label] - CRS label to be displayed in control. Default is system.crs alias\n * @param {String} [system.type] - CRS units type for coordinates conversion (one of control options.units). Default is \"Metric\"\n */\n MousePosition.prototype.addSystem = function (system) {\n if (_typeof(system) !== \"object\") {\n logger.log(\"[ERROR] MousePosition:addSystem - system parameter should be an object\");\n return;\n }\n if (!system.crs) {\n logger.error(\"crs not defined !\");\n return;\n }\n if (!system.label) {\n logger.warn(\"crs label not defined, use crs code by default.\");\n system.label = system.crs;\n }\n if (!system.type) {\n logger.warn(\"type srs not defined, use 'Metric' by default.\");\n system.type = \"Metric\";\n }\n\n // chargement de la definition de la projection\n // même si déjà chargé...\n _CRS_CRS__WEBPACK_IMPORTED_MODULE_13__[\"default\"].loadByName(system.crs);\n if (!Object(ol_proj__WEBPACK_IMPORTED_MODULE_4__[\"get\"])(system.crs)) {\n logger.error(\"crs '{}' not available into proj4 definitions !\", system.crs);\n return;\n }\n\n // 1. add system to control systems\n for (var j = 0; j < this._projectionSystems.length; j++) {\n var obj = this._projectionSystems[j];\n if (system.crs === obj.crs) {\n // warn user\n logger.info(\"crs '{}' already configured\", obj.crs);\n }\n }\n system.code = this._projectionSystems.length;\n this._projectionSystems.push(system);\n\n // 2. add system settings option to container (if it was already build)\n var selectSystem = document.getElementById(\"GPmousePositionProjectionSystem-\" + this._uid);\n if (selectSystem) {\n var option = document.createElement(\"option\");\n option.value = system.code;\n option.text = system.label;\n selectSystem.appendChild(option);\n }\n };\n\n /**\n * Set additional projection systems\n *\n * @param {Array} systems - Array of system object, with following properties :\n * @param {String} systems.crs - Proj4 CRS alias (from proj4 defs) e.g. \"EPSG:4326\"\n * @param {String} systems.label - CRS label (for coordinates conversion)\n * @param {String} systems.type - CRS units type to be displayed in control (one of control options.units). Default is \"Metric\"\n */\n MousePosition.prototype.addSystems = function (systems) {\n if (!systems) {\n return;\n }\n if (!Array.isArray(systems)) {\n logger.log(\"[ERROR] MousePosition:addSystems - systems parameter should be an array\");\n return;\n }\n for (var i = 0; i < systems.length; i++) {\n this.addSystem(systems[i]);\n }\n };\n\n /**\n * Remove projection system (in case there are several system with same code, only the first one will be removed)\n *\n * @param {String} systemCrs - CRS alias (from proj4 defs)\n */\n MousePosition.prototype.removeSystem = function (systemCrs) {\n if (!systemCrs || typeof systemCrs !== \"string\") {\n logger.log(\"[ERROR] MousePosition:removeSystem - systemCode parameter should be a string\");\n return;\n }\n var systemList = document.getElementById(\"GPmousePositionProjectionSystem-\" + this._uid);\n var systemCode = null;\n // find system in control projection systems list\n for (var i = 0; i < this._projectionSystems.length; i++) {\n var proj = this._projectionSystems[i];\n if (systemCrs === proj.crs) {\n systemCode = proj.code;\n // remove system from control projection systems list\n this._projectionSystems.splice(i, 1);\n break;\n }\n }\n if (systemCode == null) {\n logger.log(\"[WARN] MousePosition:removeSystem - system not found\");\n return;\n }\n\n /* re-initialization of codes */\n var oldNewCodeMap = [];\n for (var j = 0; j < this._projectionSystems.length; j++) {\n oldNewCodeMap[Number(this._projectionSystems[j].code)] = j;\n this._projectionSystems[j].code = j;\n }\n\n /* find system in control container systems list */\n var indexChildToRemove = null;\n for (var k = 0; k < systemList.childNodes.length; k++) {\n if (systemCode === systemList.childNodes[j].value) {\n indexChildToRemove = k;\n continue;\n }\n systemList.childNodes[j].value = oldNewCodeMap[Number(systemList.childNodes[j].value)];\n }\n /* remove system from control container systems list */\n if (indexChildToRemove != null) {\n systemList.removeChild(systemList.childNodes[indexChildToRemove]);\n }\n\n // choose arbitrarily a new current system if needed\n if (this._currentProjectionSystems.code === Number(systemCode)) {\n systemList.childNodes[0].setAttribute(\"selected\", \"selected\");\n this._setCurrentSystem(systemList.childNodes[0].value);\n }\n };\n\n /**\n * Set control units (to be displayed)\n *\n * @param {Array} units - list of all coordinates units, to be displayed in control units list.\n * Values may be \"DEC\" (decimal degrees), \"DMS\" (sexagecimal), \"RAD\" (radians) and \"GON\" (grades) for geographical coordinates,\n * and \"M\" or \"KM\" for metric coordinates\n */\n MousePosition.prototype.setUnits = function (units) {\n if (!units || !Array.isArray(units)) {\n return;\n }\n this.options.units = units;\n this._projectionUnits = [];\n this._initProjectionUnits();\n if (this._currentProjectionType) {\n this._setTypeUnitsPanel(this._currentProjectionType);\n }\n };\n\n /**\n * Set control altitude options (useless if displayAltitude == false)\n *\n * @param {Object} options - altitude options\n * @param {Object} [options.serviceOptions] - options of elevation service\n * @param {Number} [options.responseDelay] - latency for elevation request, 500 ms by default\n * @param {Number} [options.triggerDelay] - immobilisation time of movement on the map to trigger the elevation calculation, 200 ms by default\n */\n MousePosition.prototype.setAltitudeOptions = function (options) {\n if (!options || _typeof(options) !== \"object\") {\n return;\n }\n this.options.altitude.triggerDelay = options.triggerDelay;\n this.options.altitude.responseDelay = options.responseDelay;\n if (options.serviceOptions) {\n for (var opt in options.serviceOptions) {\n if (options.serviceOptions.hasOwnProperty(opt)) {\n this.options.altitude.serviceOptions[opt] = options.serviceOptions[opt];\n }\n }\n }\n };\n\n /**\n * Display or hide elevation panel\n *\n * @param {Boolean} displayAltitude - true to display elevation panel, false to hide it\n */\n MousePosition.prototype.displayAltitude = function (displayAltitude) {\n if (displayAltitude === undefined) {\n return;\n }\n this.options.displayAltitude = displayAltitude;\n this._setElevationPanel(displayAltitude);\n };\n\n /**\n * Display or hide coordinates panel\n *\n * @param {Boolean} displayCoordinates - true to display coordinates panel, false to hide it\n */\n MousePosition.prototype.displayCoordinates = function (displayCoordinates) {\n if (displayCoordinates === undefined) {\n return;\n }\n this.options.displayCoordinates = displayCoordinates;\n this._setCoordinatesPanel(displayCoordinates);\n this._setSettingsPanel(displayCoordinates);\n };\n\n /**\n * Collapse or display control main container\n *\n * @param {Boolean} collapsed - True to collapse control, False to display it\n */\n MousePosition.prototype.setCollapsed = function (collapsed) {\n if (collapsed === undefined) {\n logger.log(\"[ERROR] MousePosition:setCollapsed - missing collapsed parameter\");\n return;\n }\n if (collapsed && this.collapsed || !collapsed && !this.collapsed) {\n return;\n }\n if (!this._isDesktop) {\n document.getElementById(\"GPmapCenter\").className = collapsed ? \"\" : \"GPmapCenterVisible\";\n }\n // on simule l'ouverture du panneau après un click\n this.onShowMousePositionClick();\n this._showMousePositionContainer.checked = !collapsed;\n };\n\n // ################################################################### //\n // ######################## initialize control ####################### //\n // ################################################################### //\n\n /**\n * Initialize control (called by MousePosition constructor)\n *\n * @param {Object} options - control options (set by user)\n * @private\n */\n MousePosition.prototype._initialize = function (options) {\n // Set default options\n options = options || {};\n // {Object} control options - set by user or by default\n this.options = options;\n this.options.collapsed = options.collapsed !== undefined ? options.collapsed : true;\n /** {Boolean} specify if MousePosition control is collapsed (true) or not (false) */\n this.collapsed = this.options.collapsed;\n this.options.draggable = options.draggable !== undefined ? options.draggable : false;\n /** {Boolean} specify if MousePosition control is draggable (true) or not (false) */\n this.draggable = this.options.draggable;\n\n // position marker\n this._markerOverlay = null;\n this._markerUrl = null;\n this._markerOffset = [0, 0];\n this._hideMarker = false;\n this._initMarker(options.positionMarker);\n this.options.units = options.units || [];\n this.options.displayAltitude = options.displayAltitude !== undefined ? options.displayAltitude : true;\n this.options.displayCoordinates = options.displayCoordinates !== undefined ? options.displayCoordinates : true;\n if (this.options.displayCoordinates) {\n this.options.editCoordinates = options.editCoordinates !== undefined ? options.editCoordinates : false;\n } else {\n // si les coordonnées ne sont pas affichées : pas besoin de les éditer...\n this.options.editCoordinates = false;\n }\n this.editing = false;\n this.options.systems = options.systems || [];\n if (options.altitude) {\n var altitude = options.altitude;\n this.options.altitude = {\n triggerDelay: altitude.triggerDelay !== undefined ? altitude.triggerDelay : 200,\n responseDelay: altitude.responseDelay !== undefined ? altitude.responseDelay : 500,\n serviceOptions: altitude.serviceOptions || {},\n noDataValue: altitude.noDataValue !== undefined ? altitude.noDataValue : -99999,\n noDataValueTolerance: altitude.noDataValueTolerance !== undefined ? altitude.noDataValueTolerance : 90000\n };\n } else {\n this.options.altitude = {\n triggerDelay: 200,\n responseDelay: 500,\n serviceOptions: {}\n };\n }\n\n // identifiant du contrôle : utile pour suffixer les identifiants CSS (pour gérer le cas où il y en a plusieurs dans la même page)\n this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_10__[\"default\"].generate();\n\n // initialisation des systemes de projections\n this._projectionSystems = [];\n this._initProjectionSystems();\n\n // initialisation des systemes des unités\n this._projectionUnits = {};\n this._initProjectionUnits();\n\n // detection du support : desktop ou tactile\n this._isDesktop = _Common_Utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].detectSupport();\n\n // on met en place un seuil sur le timer\n if (this.options.altitude.triggerDelay < 100) {\n this.options.altitude.triggerDelay = 100;\n }\n\n // {Number} timer on movestopped delay (altitude calculation)\n this._timer = this.options.altitude.triggerDelay;\n\n // {Object} Selected projection system\n this._currentProjectionSystems = this._projectionSystems[0];\n\n // {String} Selected projection units typs : Geographical or metric\n this._currentProjectionType = this._projectionSystems[0].type;\n\n // {String} Selected projection unit\n this._currentProjectionUnits = this._projectionUnits[this._currentProjectionType][0].code;\n\n // {Object} Projection units container (DOM Element)\n this._projectionUnitsContainer = null;\n\n // {Object} control panel container (DOM Element)\n this._showMousePositionContainer = null;\n this._panelMousePositionContainer = null;\n this._panelHeaderMousePositionContainer = null;\n\n // gestion de l'affichage du panneau de l'altitude\n if (!this.options.displayAltitude && !this.options.displayCoordinates) {\n // on reactive l'affichage des coordonnées, pour ne pas afficher un panneau vide !\n this.options.displayCoordinates = true;\n }\n\n // listener key for event on pointermove or moveend map\n this.listenerKey = null;\n };\n\n /**\n *\n * @param {Object} option - positionMarker option\n * @private\n */\n MousePosition.prototype._initMarker = function (option) {\n if (!this.options.editCoordinates) {\n return;\n }\n if (!option) {\n this._markerUrl = _Utils_Markers__WEBPACK_IMPORTED_MODULE_9__[\"default\"][\"lightOrange\"];\n this._markerOffset = _Utils_Markers__WEBPACK_IMPORTED_MODULE_9__[\"default\"].defaultOffset;\n return;\n }\n\n // hide\n this._hideMarker = option.hide !== undefined ? option.hide : false;\n\n // offset\n if (option.offset) {\n if (Array.isArray(option.offset) && option.offset.length === 2) {\n this._markerOffset = option.offset;\n } else {\n logger.log(\"positionMarker.offset should be an array. e.g. : [0,0]\");\n this._markerOffset = _Utils_Markers__WEBPACK_IMPORTED_MODULE_9__[\"default\"].defaultOffset;\n }\n } else {\n this._markerOffset = _Utils_Markers__WEBPACK_IMPORTED_MODULE_9__[\"default\"].defaultOffset;\n }\n var url = option.url;\n if (!url) {\n this._markerUrl = _Utils_Markers__WEBPACK_IMPORTED_MODULE_9__[\"default\"][\"lightOrange\"];\n } else if (url.match(/^[a-zA-Z]+$/)) {\n // un seul mot\n this._markerUrl = _Utils_Markers__WEBPACK_IMPORTED_MODULE_9__[\"default\"][url] !== undefined ? _Utils_Markers__WEBPACK_IMPORTED_MODULE_9__[\"default\"][url] : _Utils_Markers__WEBPACK_IMPORTED_MODULE_9__[\"default\"][\"lightOrange\"];\n } else {\n this._markerUrl = url;\n }\n };\n\n /**\n * this method is called by the constructor and initialize the projection\n * systems.\n * getting coordinates in the requested projection :\n * see this.onMousePositionProjectionSystemChange()\n *\n * @private\n */\n MousePosition.prototype._initProjectionSystems = function () {\n // on donne la possibilité à l'utilisateur de modifier\n // la liste des systèmes à afficher\n // Ex. this.options.systems\n\n // FIXME doit on charger des projections par defaut dans ce composant ?\n // chargement des projections par defaut\n // CRS.loadByDefault();\n // CRS.overload();\n\n // systemes de projection disponible par defaut\n var projectionSystemsByDefault = [{\n label: \"G\\xE9ographique\",\n crs: Object(ol_proj__WEBPACK_IMPORTED_MODULE_4__[\"get\"])(\"EPSG:4326\").getCode(),\n type: \"Geographical\"\n }, {\n label: \"Web Mercator\",\n crs: Object(ol_proj__WEBPACK_IMPORTED_MODULE_4__[\"get\"])(\"EPSG:3857\").getCode(),\n type: \"Metric\"\n }, {\n label: \"Lambert 93\",\n crs: Object(ol_proj__WEBPACK_IMPORTED_MODULE_4__[\"get\"])(\"EPSG:2154\").getCode(),\n type: \"Metric\",\n geoBBox: {\n left: -9.86,\n bottom: 41.15,\n right: 10.38,\n top: 51.56\n }\n }, {\n label: \"Lambert II \\xE9tendu\",\n crs: Object(ol_proj__WEBPACK_IMPORTED_MODULE_4__[\"get\"])(\"EPSG:27572\").getCode(),\n type: \"Metric\",\n geoBBox: {\n left: -4.87,\n bottom: 42.33,\n right: 8.23,\n top: 51.14\n }\n }];\n var systems = this.options.systems;\n for (var i = 0; i < systems.length; i++) {\n /* definition d'un systeme de reference */\n var sys = systems[i];\n this.addSystem(sys);\n }\n if (this._projectionSystems.length === 0) {\n // on ajoute les systèmes de projections par défaut\n for (var j = 0; j < projectionSystemsByDefault.length; j++) {\n this.addSystem(projectionSystemsByDefault[j]);\n }\n }\n };\n\n /**\n * this method is called by the constructor and initialize the units.\n * getting coordinates in the requested units :\n * see this.onMousePositionProjectionUnitsChange()\n *\n * @private\n */\n MousePosition.prototype._initProjectionUnits = function () {\n // on donne la possibilité à l'utilisateur de modifier\n // la liste des unités à afficher\n // Ex.\n // this.options.units : [\"DEC\", \"DMS\"]\n\n // unités disponible par defaut\n var projectionUnitsByDefault = {\n Geographical: [{\n code: \"DEC\",\n label: \"degrés décimaux\",\n format: this._displayDEC\n }, {\n code: \"DMS\",\n label: \"degrés sexagésimaux\",\n format: this._displayDMS\n }, {\n code: \"RAD\",\n label: \"radians\",\n format: this._displayRAD\n }, {\n code: \"GON\",\n label: \"grades\",\n format: this._displayGON\n }],\n Metric: [{\n code: \"M\",\n label: \"mètres\",\n format: this._displayMeter\n }, {\n code: \"KM\",\n label: \"kilomètres\",\n format: this._displayKMeter\n }]\n };\n var units = this.options.units;\n for (var type in projectionUnitsByDefault) {\n if (projectionUnitsByDefault.hasOwnProperty(type)) {\n var found = false;\n for (var j = 0; j < projectionUnitsByDefault[type].length; j++) {\n var obj = projectionUnitsByDefault[type][j];\n for (var i = 0; i < units.length; i++) {\n var unit = units[i];\n if (obj.code === unit) {\n found = true;\n if (!this._projectionUnits[type]) {\n this._projectionUnits[type] = [];\n }\n this._projectionUnits[type].push(obj);\n }\n }\n }\n if (!found) {\n this._projectionUnits[type] = projectionUnitsByDefault[type];\n }\n }\n }\n\n // au cas où...\n if (_typeof(this._projectionUnits) === \"object\" && Object.keys(this._projectionUnits).length === 0) {\n this._projectionUnits = projectionUnitsByDefault;\n }\n };\n\n /**\n * this method get label from the current projection units\n *\n * @returns {String} projection information\n *\n * @private\n */\n MousePosition.prototype._getCurrentProjectionInformation = function () {\n var systemInfo = [this._currentProjectionSystems.label, \"en\"];\n var units = this._projectionUnits[this._currentProjectionType];\n for (var u = 0; u < units.length; ++u) {\n if (units[u].code === this._currentProjectionUnits) {\n systemInfo.push(units[u].label);\n break;\n }\n }\n return systemInfo.join(\" \");\n };\n\n // ################################################################### //\n // ######################## methods handle dom ####################### //\n // ################################################################### //\n\n /**\n * Create control main container (called by MousePosition constructor)\n *\n * @returns {DOMElement} DOM element\n *\n * @private\n */\n MousePosition.prototype._initContainer = function () {\n // creation du container principal\n var container = this._createMainContainerElement();\n var inputShow = this._showMousePositionContainer = this._createShowMousePositionElement();\n container.appendChild(inputShow);\n var picto = this._createShowMousePositionPictoElement(this._isDesktop);\n container.appendChild(picto);\n var panel = this._panelMousePositionContainer = this._createMousePositionPanelElement();\n var header = this._panelHeaderMousePositionContainer = this._createMousePositionPanelHeaderElement();\n panel.appendChild(header);\n var basic = this._createMousePositionPanelBasicElement(this.options.displayAltitude, this.options.displayCoordinates, this.options.editCoordinates, this._currentProjectionUnits);\n panel.appendChild(basic);\n var arraySettings = this._createShowMousePositionSettingsElement(this.options.displayCoordinates);\n for (var j = 0; j < arraySettings.length; j++) {\n panel.appendChild(arraySettings[j]);\n }\n var settings = this._createMousePositionSettingsElement();\n var systems = this._projectionSystemsContainer = this._createMousePositionSettingsSystemsElement(this._projectionSystems);\n var units = this._projectionUnitsContainer = this._createMousePositionSettingsUnitsElement(this._projectionUnits[this._currentProjectionType]);\n settings.appendChild(systems);\n settings.appendChild(units);\n panel.appendChild(settings);\n container.appendChild(panel);\n return container;\n };\n\n /**\n * this method is called by this.()\n * and it changes the elevation view panel into the dom.\n *\n * @param {Boolean} active - true:active, false:disable\n * @private\n */\n MousePosition.prototype._setElevationPanel = function (active) {\n var div = null;\n if (!active) {\n div = document.getElementById(\"GPmousePositionAltitude-\" + this._uid);\n div.style.display = \"none\";\n } else {\n div = document.getElementById(\"GPmousePositionAltitude-\" + this._uid);\n div.style.display = \"\";\n }\n };\n\n /**\n * this method is called by this.()\n * and it changes the coordinate view panel into the dom.\n *\n * @param {Boolean} active - true:active, false:disable\n * @private\n */\n MousePosition.prototype._setCoordinatesPanel = function (active) {\n var div = document.getElementById(\"GPmousePositionCoordinate-\" + this._uid);\n if (!active) {\n div.style.display = \"none\";\n } else {\n div.style.display = \"\";\n }\n };\n\n /**\n * this method is called by this.()\n * and it changes the settings view panel into the dom.\n *\n * @param {Boolean} active - true:active, false:disable\n * @private\n */\n MousePosition.prototype._setSettingsPanel = function (active) {\n var divPicto = document.getElementById(\"GPshowMousePositionSettingsPicto-\" + this._uid);\n var divPanel = document.getElementById(\"GPmousePositionSettings-\" + this._uid);\n if (!active) {\n divPicto.style.display = \"none\";\n divPanel.style.display = \"none\";\n } else {\n divPicto.style.display = \"\";\n divPanel.style.display = \"\";\n }\n };\n\n /**\n * this method is called by this.onMousePositionProjectionSystemChange()\n * when changes to a metric or a geographical units.\n *\n * @param {String} type - Geographical or Metric\n * @private\n */\n MousePosition.prototype._setTypeUnitsPanel = function (type) {\n var container = this._projectionUnitsContainer;\n\n // on supprime les enfants...\n while (container.firstChild) {\n container.removeChild(container.firstChild);\n }\n var units = this._projectionUnits[type];\n for (var j = 0; j < units.length; j++) {\n var obj = units[j];\n var option = document.createElement(\"option\");\n option.value = obj.code ? obj.code : j;\n option.text = obj.label || j;\n // option.label = obj.label;\n container.appendChild(option);\n }\n var projectionUnits = this._projectionUnits[type][0].code;\n if (this._currentProjectionUnits === \"DMS\" || projectionUnits === \"DMS\") {\n this._resetCoordinateElements(this.options.editCoordinates, type, projectionUnits);\n this._setEditMode(this.editing);\n }\n\n // le nouveau type de system ...\n this._currentProjectionType = type;\n\n // Mise a jour des elements labels et unites\n this._resetLabelElements(type);\n this._resetUnitElements(projectionUnits);\n\n // et comme on a changé de type de systeme,\n // il faut changer aussi d'unité !\n this._currentProjectionUnits = projectionUnits;\n };\n\n // ################################################################### //\n // ######################## method units format ###################### //\n // ################################################################### //\n\n /**\n * degreedecimal\n *\n * @param {Array} olCoordinate - ol.Coordinate object [lon, lat]\n * @return {Object} coordinate - coordinate object : {lat : 48, lng : 2} par exemple\n * @private\n */\n MousePosition.prototype._displayDEC = function (olCoordinate) {\n var coordinate = {};\n coordinate.lat = olCoordinate[1].toFixed(6);\n coordinate.lng = olCoordinate[0].toFixed(6);\n coordinate.unit = \"°\";\n return coordinate;\n };\n\n /**\n * degreedecimal2sexagecimal\n *\n * @param {Array} olCoordinate - ol.Coordinate object [lon, lat]\n * @return {Object} coordinate - coordinate object : {lng : \"2° 00′ 00″ E\", lat : \"48° 00′ 00″ N\"} par exemple\n * @private\n */\n MousePosition.prototype._displayDMS = function (olCoordinate) {\n return {\n lng: _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_11__[\"default\"].decimalToDMS(olCoordinate[0], \"EO\", 2),\n lat: _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_11__[\"default\"].decimalToDMS(olCoordinate[1], \"NS\", 2),\n unit: \"DMS\"\n };\n };\n\n /**\n * degreedecimal2radian\n *\n * @param {Array} olCoordinate - ol.Coordinate object [lon, lat]\n * @return {Object} coordinate - coordinate object : {lng : \"0.02837864\", lat : \"0.84300269\"} par exemple\n * @private\n */\n MousePosition.prototype._displayRAD = function (olCoordinate) {\n var coordinate = {};\n var d = 0.01745329251994329577;\n coordinate.lng = olCoordinate[0] * d;\n coordinate.lng = coordinate.lng.toFixed(8);\n coordinate.lat = olCoordinate[1] * d;\n coordinate.lat = coordinate.lat.toFixed(8);\n coordinate.unit = \"rad\";\n return coordinate;\n };\n\n /**\n * degreedecimal2grade\n *\n * @param {Array} olCoordinate - ol.Coordinate object [lon, lat]\n * @return {Object} coordinate - coordinate object : {lng : \"4.09545898\", lat : \"53.68751528\"} par exemple\n * @private\n */\n MousePosition.prototype._displayGON = function (olCoordinate) {\n var coordinate = {};\n var d = 1.11111111111111111111;\n coordinate.lng = olCoordinate[0] * d;\n coordinate.lng = coordinate.lng.toFixed(8);\n coordinate.lat = olCoordinate[1] * d;\n coordinate.lat = coordinate.lat.toFixed(8);\n coordinate.unit = \"gon\";\n return coordinate;\n };\n\n /**\n * meter\n *\n * @param {Array} olCoordinate - ol.Coordinate object [lon, lat]\n * @return {Object} coordinate - coordinate object : {x : \"148593.58\", y : \"6176560.95\"} par exemple\n * @private\n */\n MousePosition.prototype._displayMeter = function (olCoordinate) {\n // on recoit toujours des coordonnées metriques\n var coordinate = {};\n coordinate.x = olCoordinate[0].toFixed(2);\n coordinate.y = olCoordinate[1].toFixed(2);\n coordinate.unit = \"m\";\n return coordinate;\n };\n\n /**\n * kilometer\n *\n * @param {Array} olCoordinate - ol.Coordinate object [lon, lat]\n * @return {Object} coordinate - coordinate object : {x : \"214.96\", y : \"6250.09\"} par exemple\n * @private\n */\n MousePosition.prototype._displayKMeter = function (olCoordinate) {\n var coordinate = {};\n coordinate.x = (olCoordinate[0] / 1000).toFixed(2);\n coordinate.y = (olCoordinate[1] / 1000).toFixed(2);\n coordinate.unit = \"km\";\n return coordinate;\n };\n\n // ################################################################### //\n // ##################### handlers events to control ################## //\n // ################################################################### //\n\n /**\n * this sends the coordinates to the panel.\n * (cf. this.GPdisplayCoords() into the DOM functions)\n *\n * @param {Array} olCoordinate - ol.Coordinate object [lon, lat]\n * @param {Object} crs - coordinate CRS (ol.proj.Projection)\n * @private\n */\n MousePosition.prototype._setCoordinate = function (olCoordinate, crs) {\n // structure\n // ol.Coordinate\n // [\n // 4 // lon\n // 48 // lat\n // ]\n\n // structure pour les coordonnées en fonctin du type demandé :\n // {x:, y:, unit:} ou {lng:, lat:} ou {lon:, lat:} ou {e:, n:, unit:}...\n var coordinate = {};\n // on projete le point dans le systeme demandé\n var oSrs = this._currentProjectionSystems.crs;\n if (!oSrs) {\n logger.log(\"ERROR : system crs not found\");\n return;\n }\n // on reprojette les coordonnées depuis leur CRS d'origine (CRS) vers le CRS demandé (oSrs)\n olCoordinate = Object(ol_proj__WEBPACK_IMPORTED_MODULE_4__[\"transform\"])(olCoordinate, crs, oSrs);\n\n // type de systeme : Geographical ou Metric\n var type = this._currentProjectionSystems.type;\n\n // on recherche la fonction de formatage dans l'unité demandée\n var format = null;\n var units = this._projectionUnits[type];\n for (var i = 0; i < units.length; i++) {\n if (units[i].code === this._currentProjectionUnits) {\n format = units[i].format;\n break;\n }\n }\n if (!format || typeof format !== \"function\") {\n logger.log(\"WARNING : coordinates format function not found\");\n return;\n } else {\n coordinate = format(olCoordinate);\n }\n if (!coordinate || Object.keys(coordinate).length === 0) {\n return;\n }\n this.GPdisplayCoords(coordinate);\n };\n\n /**\n * this sends the coordinates to the panel.\n * (cf. this.GPdisplayElevation() into the DOM functions)\n *\n * @param {Array} olCoordinate - ol.Coordinate object [lon, lat]\n * @private\n */\n MousePosition.prototype._setElevation = function (olCoordinate) {\n // gestion du timer de la requete du service d'altitude\n var delay = this.options.altitude.responseDelay;\n var noDataValue = this.options.altitude.noDataValue;\n var noDataValueTolerance = this.options.altitude.noDataValueTolerance;\n this.GPdisplayElevation(olCoordinate, delay, noDataValue, noDataValueTolerance);\n };\n\n /**\n * this method is triggered when the mouse or the map is stopped.\n * (cf. onMouseMove and onMapMove)\n *\n * @param {Array} olCoordinate - ol.Coordinate object [lon, lat]\n * @param {Object} crs - coordinate CRS (ol.proj.Projection)\n * @private\n */\n MousePosition.prototype.onMoveStopped = function (olCoordinate, crs) {\n // reprojection en CRS:84 (EPSG:4326) pour le calcul alti\n var oLatLng = Object(ol_proj__WEBPACK_IMPORTED_MODULE_4__[\"transform\"])(olCoordinate, crs, \"EPSG:4326\");\n this._setElevation(oLatLng);\n };\n\n /**\n * this method is an handler event to control. The event is 'mousemove' on\n * the map. The handler sends the coordinates to the panel.\n * (cf. this.GPdisplayCoords() into the DOM functions)\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n MousePosition.prototype.onMouseMove = function (e) {\n var self = this;\n\n // info: coordinate = [x, y]\n var coordinate = e.coordinate;\n if (!e.map || !e.map.getView()) {\n return;\n }\n var crs = e.map.getView().getProjection();\n this._setCoordinate(coordinate, crs);\n\n // calcul de l'altitude après un certain délai après l'arrêt du mouvement de la souris\n clearTimeout(this._timer);\n this._timer = setTimeout(function () {\n self.onMoveStopped(coordinate, crs);\n }, this.options.altitude.triggerDelay);\n };\n\n /**\n * this method is an handler event to control. The event is 'moveend' on\n * the map. The handler sends the coordinates to the panel.\n * (cf. this.GPdisplayCoords() into the DOM functions)\n *\n * @private\n */\n MousePosition.prototype.onMapMove = function () {\n var self = this;\n var map = this.getMap();\n if (!map || !map.getView()) {\n return;\n }\n var view = map.getView();\n var coordinate = view.getCenter();\n var crs = view.getProjection();\n this._setCoordinate(coordinate, crs);\n\n // calcul de l'altitude après un certain délai après l'arrêt du mouvement de la souris\n clearTimeout(this._timer);\n this._timer = setTimeout(function () {\n self.onMoveStopped(coordinate, crs);\n }, this.options.altitude.triggerDelay);\n };\n\n // ################################################################### //\n // ####################### handlers events to dom #################### //\n // ################################################################### //\n\n /**\n * this method is called by this.GPdisplayElevation() in the dom, and\n * it executes a request to the elevation service.\n *\n * @param {Object} coordinate - {lat:..., lng:...}\n * @param {Function} callback - callback\n * @private\n */\n MousePosition.prototype.onRequestAltitude = function (coordinate, callback) {\n // INFORMATION\n // on effectue la requête au service d'altitude...\n // on met en place des callbacks afin de recuperer les resultats ou\n // les messages d'erreurs du service.\n // le resultat est affiché dans une balise du dom.\n\n if (!coordinate || Object.keys(coordinate).length === 0) {\n return;\n }\n\n // si on ne veut pas de calcul d'altitude, on ne continue pas !\n if (!this.options.displayAltitude) {\n return;\n }\n\n // on recupere les options du service\n var options = this.options.altitude.serviceOptions || {};\n\n // gestion du protocole et du timeout\n // le timeout est indispensable sur le protocole JSONP.\n var _protocol = options.protocol || \"XHR\";\n var _timeout = options.timeOut || 0;\n if (_protocol === \"JSONP\" && _timeout === 0) {\n _timeout = 15000;\n }\n\n // format de sortie si spécifié\n var _outputFormat = options.outputFormat || \"json\";\n\n // ainsi que les coordonnées\n var _zonly = true;\n var _positions = [{\n lon: coordinate[0],\n lat: coordinate[1]\n }];\n\n // et les callbacks\n var _scope = this;\n var _rawResponse = options.rawResponse || false;\n var _onSuccess = null;\n var _onFailure = null;\n if (!_rawResponse) {\n // dans le cas général\n // callback onSuccess\n _onSuccess = function _onSuccess(results) {\n if (results && Object.keys(results).length) {\n callback.call(this, results.elevations[0].z);\n }\n };\n } else {\n // callback onSuccess\n _onSuccess = function _onSuccess(results) {\n logger.log(\"alti service raw response : \", results);\n };\n }\n\n // callback onFailure\n _onFailure = function _onFailure(error) {\n logger.log(\"[getAltitude] ERROR : \" + error.message);\n };\n\n // cas où la clef API n'est pas renseignée dans les options du service,\n // on utilise celle renseignée au niveau du controle ou la clé \"calcul\" par défaut.\n var _apiKey = options.apiKey || this.options.apiKey;\n\n // si l'utilisateur a spécifié le paramètre ssl au niveau du control, on s'en sert\n // true par défaut (https)\n if (typeof options.ssl !== \"boolean\") {\n if (typeof this.options.ssl === \"boolean\") {\n options.ssl = this.options.ssl;\n } else {\n options.ssl = true;\n }\n }\n var _ssl = options.ssl;\n geoportal_access_lib__WEBPACK_IMPORTED_MODULE_5__[\"default\"].Services.getAltitude({\n apiKey: _apiKey,\n protocol: _protocol,\n ssl: _ssl,\n timeOut: _timeout,\n scope: _scope,\n outputFormat: _outputFormat,\n rawResponse: _rawResponse,\n onSuccess: _onSuccess,\n onFailure: _onFailure,\n zonly: _zonly,\n positions: _positions\n });\n };\n\n /**\n * this method is called by event 'click' on 'GPshowMousePositionPicto' tag label\n * (cf. this._createShowMousePositionPictoElement),\n * and toggles event 'mousemove' on map.\n *\n * @private\n */\n MousePosition.prototype.onShowMousePositionClick = function () {\n var _this2 = this;\n // checked : true - panel close\n // checked : false - panel open\n var map = this.getMap();\n // on supprime toutes les interactions\n _Utils_Interactions__WEBPACK_IMPORTED_MODULE_8__[\"default\"].unset(map);\n this.collapsed = this._showMousePositionContainer.checked;\n // on génère nous même l'evenement OpenLayers de changement de propriété\n // (utiliser mousePosition.on(\"change:collapsed\", function(e) ) pour s'abonner à cet évènement)\n this.dispatchEvent(\"change:collapsed\");\n\n // evenement declenché à l'ouverture/fermeture du panneau,\n // et en fonction du mode : desktop ou tactile !\n if (this._showMousePositionContainer.checked) {\n Object(ol_Observable__WEBPACK_IMPORTED_MODULE_3__[\"unByKey\"])(this.listenerKey);\n } else if (!this.editing) {\n if (this._isDesktop) {\n this.listenerKey = map.on(\"pointermove\", function (e) {\n _this2.onMouseMove(e);\n });\n } else {\n this.listenerKey = map.on(\"moveend\", function (e) {\n return _this2.onMapMove(e);\n });\n // on simule un deplacement en mode tactile\n this.onMapMove();\n }\n }\n\n // FIXME\n // on gère l'affichage des panneaux ici..., même si ce n'est pas l'endroit\n // adequate...\n this._setElevationPanel(this.options.displayAltitude);\n this._setCoordinatesPanel(this.options.displayCoordinates);\n if (!this.options.displayCoordinates) {\n this._setSettingsPanel(false);\n }\n };\n\n /**\n * this method is called by event 'click' on 'GPshowMousePositionPicto' tag label\n * (cf. this._createShowMousePositionPictoElement),\n * and toggles event 'mousemove' on map.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n MousePosition.prototype.onShowMousePositionSettingsClick = function (e) {\n if (!this.draggable) {\n this._panelMousePositionContainer.style.transition = \"top 0.5s ease-out 0s\";\n this._panelMousePositionContainer.style.transitionProperty = \"top\";\n this._panelMousePositionContainer.style.transitionDuration = \"0.5s\";\n this._panelMousePositionContainer.style.transitionTimingFunction = \"ease-out\";\n this._panelMousePositionContainer.style.transitionDelay = \"0s\";\n var height = -95;\n var top = this._panelMousePositionContainer.offsetTop;\n if (!document.getElementById(e.target.htmlFor).checked) {\n this._panelMousePositionContainer.style.top = top + height + \"px\";\n } else {\n this._panelMousePositionContainer.style.top = top - height + \"px\";\n }\n }\n };\n\n /**\n * this method is called by event 'click' on input coordinate\n *\n * @param {Boolean} editing - editing mode\n */\n MousePosition.prototype.onMousePositionEditModeClick = function (editing) {\n var _this3 = this;\n if (!this.options.editCoordinates) {\n return;\n }\n if (this.editing === editing) {\n return;\n }\n this.editing = editing;\n\n // Affichage des outils, input en ecriture\n this._setEditMode(this.editing);\n var map = this.getMap();\n if (this._isDesktop) {\n if (this.editing) {\n // Unlisten for 'pointermove' events\n // map.un(\"pointermove\", (e) => { this.onMouseMove(e); });\n Object(ol_Observable__WEBPACK_IMPORTED_MODULE_3__[\"unByKey\"])(this.listenerKey);\n } else {\n // Listen for 'pointermove' events\n this.listenerKey = map.on(\"pointermove\", function (e) {\n _this3.onMouseMove(e);\n });\n // on simule un deplacement\n this.onMapMove();\n }\n } else {\n if (this.editing) {\n // Unlisten for 'moveend' events\n // map.un(\"moveend\", (e) => this.onMapMove(e));\n Object(ol_Observable__WEBPACK_IMPORTED_MODULE_3__[\"unByKey\"])(this.listenerKey);\n } else {\n // Listen for moveend' events\n this.listenerKey = map.on(\"moveend\", function (e) {\n return _this3.onMapMove(e);\n });\n // on simule un deplacement\n this.onMapMove();\n }\n }\n\n // clear _markerOverlay\n if (!this.editing && this._markerOverlay) {\n this._markerOverlay.setPosition(undefined);\n }\n };\n\n /**\n * Get coordinate from inputs and select in decimal degrees\n *\n * @param {String} coordType - \"Lon\" or \"Lat\"\n * @returns {undefined}\n * @private\n */\n MousePosition.prototype.getCoordinate = function (coordType) {\n var inputDegrees = document.getElementById(this._addUID(\"GPmousePosition\" + coordType + \"Degrees\"));\n var degrees = inputDegrees.value;\n if (!degrees) {\n return null;\n }\n degrees = degrees.replace(\",\", \".\");\n if (!_Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_11__[\"default\"].isInteger(degrees)) {\n return null;\n }\n var result = _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_11__[\"default\"].toInteger(degrees);\n if (result < Number(inputDegrees.dataset.min) || result > Number(inputDegrees.dataset.max)) {\n return null;\n }\n var direction = document.getElementById(this._addUID(\"GPmousePosition\" + coordType + \"Direction\")).value;\n var inputMinutes = document.getElementById(this._addUID(\"GPmousePosition\" + coordType + \"Minutes\"));\n var minutes = inputMinutes.value;\n if (minutes) {\n minutes = minutes.replace(\",\", \".\");\n if (_Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_11__[\"default\"].isInteger(minutes)) {\n var mins = _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_11__[\"default\"].toInteger(minutes);\n if (mins >= Number(inputMinutes.dataset.min) && mins <= Number(inputMinutes.dataset.max)) {\n result += mins / 60;\n }\n }\n }\n var inputSeconds = document.getElementById(this._addUID(\"GPmousePosition\" + coordType + \"Seconds\"));\n var seconds = inputSeconds.value;\n if (seconds) {\n seconds = seconds.replace(\",\", \".\");\n var secs = _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_11__[\"default\"].toFloat(seconds);\n if (secs && secs >= Number(inputSeconds.dataset.min) && secs <= Number(inputSeconds.dataset.max)) {\n result += secs / 3600;\n }\n }\n if (direction === \"O\" || direction === \"S\") {\n result = -result;\n }\n return result;\n };\n\n /**\n * locate DMS coordinates on map\n *\n * @private\n */\n MousePosition.prototype.locateDMSCoordinates = function () {\n var lonlat = [this.getCoordinate(\"Lon\"), this.getCoordinate(\"Lat\")];\n if (lonlat[0] === null || lonlat[1] === null) {\n return;\n }\n var oSrs = this._currentProjectionSystems.crs;\n if (!oSrs) {\n logger.log(\"ERROR : system crs not found\");\n return;\n }\n var view = this.getMap().getView();\n var coordinate = Object(ol_proj__WEBPACK_IMPORTED_MODULE_4__[\"transform\"])(lonlat, oSrs, view.getProjection());\n view.setCenter(coordinate);\n if (this._markerOverlay && !this._hideMarker) {\n this._markerOverlay.setPosition(coordinate);\n }\n };\n\n /**\n * locate coordinates on map (not DMS)\n *\n * @private\n */\n MousePosition.prototype.locateCoordinates = function () {\n var lon = document.getElementById(this._addUID(\"GPmousePositionLon\")).value;\n lon = lon.replace(\",\", \".\");\n lon = _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_11__[\"default\"].toFloat(lon);\n if (lon === null) {\n return;\n }\n var lat = document.getElementById(this._addUID(\"GPmousePositionLat\")).value;\n lat = lat.replace(\",\", \".\");\n lat = _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_11__[\"default\"].toFloat(lat);\n if (lat === null) {\n return;\n }\n var oSrs = this._currentProjectionSystems.crs;\n if (!oSrs) {\n logger.log(\"ERROR : system crs not found\");\n return;\n }\n var xy;\n if (this._currentProjectionSystems.type === \"Geographical\") {\n xy = [this.convert(lon), this.convert(lat)];\n } else {\n xy = [this.convert(lat), this.convert(lon)];\n }\n var xyWGS84 = Object(ol_proj__WEBPACK_IMPORTED_MODULE_4__[\"transform\"])(xy, this._currentProjectionSystems.crs, \"EPSG:4326\");\n var geoBBox = this._currentProjectionSystems.geoBBox;\n if (geoBBox) {\n // check if coordinates are in the extent\n var extent = [geoBBox.left, geoBBox.bottom, geoBBox.right, geoBBox.top];\n if (xyWGS84[0] < extent[0] || xyWGS84[0] > extent[2]) {\n return;\n }\n if (xyWGS84[1] < extent[1] || xyWGS84[1] > extent[3]) {\n return;\n }\n }\n var view = this.getMap().getView();\n var coordinate = Object(ol_proj__WEBPACK_IMPORTED_MODULE_4__[\"transform\"])(xy, oSrs, view.getProjection());\n view.setCenter(coordinate);\n if (this._markerOverlay && !this._hideMarker) {\n this._markerOverlay.setPosition(coordinate);\n }\n };\n\n /**\n * locate coordinates on map\n *\n * @private\n */\n MousePosition.prototype.onMousePositionEditModeLocateClick = function () {\n if (!this.options.editCoordinates) {\n return;\n }\n if (!this.editing) {\n this.onMousePositionEditModeClick(true);\n return;\n }\n if (this._currentProjectionUnits === \"DMS\") {\n this.locateDMSCoordinates();\n } else {\n this.locateCoordinates();\n }\n\n // fonction\n var mapCenterFunction = this.options.mapCenterCallback;\n\n // execution...\n if (typeof mapCenterFunction === \"function\") {\n var view = this.getMap().getView();\n var center = view.getCenter();\n mapCenterFunction.call(this, center);\n }\n };\n\n /**\n * this method is called by event 'change' on 'GPmousePositionProjectionSystem'\n * tag select (cf. this._createMousePositionSettingsElement),\n * and selects the system projection.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n MousePosition.prototype.onMousePositionProjectionSystemChange = function (e) {\n var idx = e.target.selectedIndex; // index\n var value = e.target.options[idx].value; // crs\n\n this._setCurrentSystem(value);\n };\n\n /**\n * this method selects the current system projection.\n *\n * @param {String} systemCode - inner code (rank in array _projectionSystems)\n * @private\n */\n MousePosition.prototype._setCurrentSystem = function (systemCode) {\n // si on change de type de systeme, on doit aussi changer le type d'unités !\n var type = null;\n for (var i = 0; i < this._projectionSystems.length; ++i) {\n if (this._projectionSystems[i].code === Number(systemCode)) {\n type = this._projectionSystems[i].type;\n break;\n }\n }\n if (!type) {\n logger.log(\"system not found in projection systems container\");\n return;\n }\n\n // on enregistre le systeme courant\n this._currentProjectionSystems = this._projectionSystems[Number(systemCode)];\n if (type !== this._currentProjectionType) {\n this._setTypeUnitsPanel(type);\n }\n\n // on simule un deplacement en mode tactile pour mettre à jour les\n // resultats\n if (!this._isDesktop) {\n this.onMapMove();\n }\n };\n\n /**\n * this method is called by event 'mouseover' on 'GPmousePositionProjectionSystem'\n * tag select (cf. this._createMousePositionSettingsElement),\n * and selects the system projection.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n MousePosition.prototype.onMousePositionProjectionSystemMouseOver = function (e) {\n logger.trace(e);\n\n // map infos\n var map = this.getMap();\n if (!map || !map.getView()) {\n return;\n }\n var view = map.getView();\n var crs = view.getProjection();\n var mapExtent = view.calculateExtent(map.getSize());\n\n // get extent in WGS84 coordinates\n mapExtent = Object(ol_proj__WEBPACK_IMPORTED_MODULE_4__[\"transformExtent\"])(mapExtent, crs, \"EPSG:4326\");\n\n /* clear select */\n var systemList = document.getElementById(this._addUID(\"GPmousePositionProjectionSystem\"));\n systemList.innerHTML = \"\";\n\n // add systems whose extent intersects the map extent\n for (var j = 0; j < this._projectionSystems.length; j++) {\n var proj = this._projectionSystems[j];\n var option = null;\n if (proj.geoBBox) {\n /* bboxes intersection test */\n if (mapExtent[0] > proj.geoBBox.right || mapExtent[1] > proj.geoBBox.top || mapExtent[2] < proj.geoBBox.left || mapExtent[3] < proj.geoBBox.bottom) {\n if (proj === this._currentProjectionSystems) {\n option = document.createElement(\"option\");\n option.value = proj.code;\n option.text = proj.label || j;\n option.setAttribute(\"selected\", \"selected\");\n option.setAttribute(\"disabled\", \"disabled\");\n systemList.appendChild(option);\n }\n continue; // do not intersect\n }\n }\n\n var optionElement = document.createElement(\"option\");\n optionElement.value = proj.code;\n optionElement.text = proj.label || j;\n if (proj === this._currentProjectionSystems) {\n optionElement.setAttribute(\"selected\", \"selected\");\n }\n systemList.appendChild(optionElement);\n }\n };\n\n /**\n * this method is called by event 'change' on 'GPmousePositionProjectionUnits'\n * tag select (cf. this._createMousePositionSettingsElement),\n * and selects the units projection.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n MousePosition.prototype.onMousePositionProjectionUnitsChange = function (e) {\n var idx = e.target.selectedIndex;\n var value = e.target.options[idx].value;\n var oldProjectionUnits = this._currentProjectionUnits;\n this._currentProjectionUnits = value;\n\n // Mise a jour des elements lebels et unites\n this._resetLabelElements(this._currentProjectionType);\n this._resetUnitElements(this._currentProjectionUnits);\n\n // mise a jour des inputs pour les coordonnees\n if (oldProjectionUnits === \"DMS\" || this._currentProjectionUnits === \"DMS\") {\n this._resetCoordinateElements(this.options.editCoordinates, this._currentProjectionType, this._currentProjectionUnits);\n this._setEditMode(this.editing);\n }\n\n // on simule un deplacement en mode tactile pour mettre à jour les\n // resultats\n if (!this._isDesktop) {\n this.onMapMove();\n }\n };\n\n /**\n *\n * @param {Number} value - value to convert (km to meters, radians, grades to decimal degrees)\n * @returns {undefined}\n * @private\n */\n MousePosition.prototype.convert = function (value) {\n var result;\n if (this._currentProjectionUnits === \"M\" || this._currentProjectionUnits === \"DEC\") {\n result = value;\n } else if (this._currentProjectionUnits === \"KM\") {\n result = value * 1000;\n } else if (this._currentProjectionUnits === \"RAD\") {\n var rd = (180 / Math.PI).toFixed(20);\n result = (value * rd).toFixed(20);\n } else if (this._currentProjectionUnits === \"GON\") {\n var d = (9 / 10).toFixed(20);\n result = (value * d).toFixed(20);\n }\n return result;\n };\n\n /**\n * @param {String} coordType - \"Lon\" or \"Lat\"\n * @param {String} value - input value\n *\n * @returns {Boolean} value is within extent\n *\n * @private\n */\n MousePosition.prototype.validateExtentCoordinate = function (coordType, value) {\n if ([\"Lon\", \"Lat\"].indexOf(coordType) === -1) {\n return false;\n }\n var coord = value.replace(\",\", \".\");\n coord = _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_11__[\"default\"].toFloat(coord);\n if (coord === null) {\n return false;\n }\n\n // convert depending on _currentProjectionUnits\n coord = this.convert(coord);\n var geoBBox = this._currentProjectionSystems.geoBBox;\n if (geoBBox === undefined) {\n return true;\n }\n\n // convert to current projection system\n var extent = [geoBBox.left, geoBBox.bottom, geoBBox.right, geoBBox.top];\n extent = Object(ol_proj__WEBPACK_IMPORTED_MODULE_4__[\"transformExtent\"])(extent, \"EPSG:4326\", this._currentProjectionSystems.crs);\n\n // checking if value is in the right interval\n if (coordType === \"Lat\" && (coord < extent[0] || coord > extent[2])) {\n return false;\n }\n if (coordType === \"Lon\" && (coord < extent[1] || coord > extent[3])) {\n return false;\n }\n return true;\n };\n return MousePosition;\n}(ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default.a);\n/* harmony default export */ __webpack_exports__[\"default\"] = (MousePosition);\n\n// Expose MousePosition as ol.control.MousePosition (for a build bundle)\nif (window.ol && window.ol.control) {\n window.ol.control.GeoportalMousePosition = MousePosition;\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9PcGVuTGF5ZXJzL0NvbnRyb2xzL01vdXNlUG9zaXRpb24uanM/NDViNCJdLCJuYW1lcyI6WyJsb2dnZXIiLCJMb2dnZXIiLCJnZXRMb2dnZXIiLCJNb3VzZVBvc2l0aW9uIiwiQ29udHJvbCIsIm9wdGlvbnMiLCJUeXBlRXJyb3IiLCJfaW5pdGlhbGl6ZSIsImNvbnRhaW5lciIsIl9jb250YWluZXIiLCJfaW5pdENvbnRhaW5lciIsImNhbGwiLCJlbGVtZW50IiwidGFyZ2V0IiwicmVuZGVyIiwiX19wcm90b19fIiwicHJvdG90eXBlIiwiT2JqZWN0IiwiY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ICAgICAgICAgIFwic2VydmljZU9wdGlvbnNcIiA6IHt9XG4gKiAgICAgIH0sXG4gKiAgICAgIFwic3lzdGVtc1wiIDogW1xuICogICAgICAge1xuICogICAgICAgICAgXCJjcnNcIiA6IFwiRVBTRzozODU3XCIsXG4gKiAgICAgICAgICBcImxhYmVsXCIgOiBcIldlYiBNZXJjYXRvclwiLFxuICogICAgICAgICAgXCJ0eXBlXCIgOiBcIk1ldHJpY1wiXG4gKiAgICAgICB9LFxuICogICAgICAge1xuICogICAgICAgICAgXCJjcnNcIiA6IFwiRVBTRzo0MzI2XCIsXG4gKiAgICAgICAgICBcImxhYmVsXCIgOiBcIkfDqW9ncmFwaGlxdWVzXCIsXG4gKiAgICAgICAgICBcInR5cGVcIiA6IFwiR2VvZ3JhcGhpY2FsXCJcbiAqICAgICAgIH0sXG4gKiAgICAgICB7XG4gKiAgICAgICAgICAgXCJsYWJlbFwiIDogXCJMYW1iZXJ0IDkzXCIsXG4gKiAgICAgICAgICAgXCJjcnNcIiA6IFwiRVBTRzoyMTU0XCIsXG4gKiAgICAgICAgICAgXCJ0eXBlXCIgOiBcIk1ldHJpY1wiLFxuICogICAgICAgICAgIFwiZ2VvQkJveFwiIDoge1xuICogICAgICAgICAgICAgICBcImxlZnRcIiA6IC05Ljg2LFxuICogICAgICAgICAgICAgICBcImJvdHRvbVwiIDogNDEuMTUsXG4gKiAgICAgICAgICAgICAgIFwicmlnaHRcIiA6IDEwLjM4LFxuICogICAgICAgICAgICAgICBcInRvcFwiIDogNTEuNTZcbiAqICAgICAgICAgICB9XG4gKiAgICAgICAgfVxuICogICAgICBdLFxuICogICAgICBcInVuaXRzXCIgOiBbXCJERUNcIiwgXCJETVNcIl1cbiAqIH0pO1xuICovXG52YXIgTW91c2VQb3NpdGlvbiA9IChmdW5jdGlvbiAoQ29udHJvbCkge1xuICAgIC8qKlxuICAgICAqIFNlZSB7QGxpbmsgb2wuY29udHJvbC5HZW9wb3J0YWxNb3VzZVBvc2l0aW9ufVxuICAgICAqIEBtb2R1bGUgTW91c2VQb3NpdGlvblxuICAgICAqIEBhbGlhcyBtb2R1bGU6fkNvbnRyb2xzL01vdXNlUG9zaXRpb25cbiAgICAgKiBAcGFyYW0geyp9IG9wdGlvbnMgLSBvcHRpb25zXG4gICAgICogQGV4YW1wbGVcbiAgICAgKiBpbXBvcnQgR2VvcG9ydGFsTW91c2VQb3NpdGlvbiBmcm9tIFwic3JjL09wZW5MYXllcnMvQ29udHJvbHMvTW91c2VQb3NpdGlvblwiXG4gICAgICovXG4gICAgZnVuY3Rpb24gTW91c2VQb3NpdGlvbiAob3B0aW9ucykge1xuICAgICAgICBvcHRpb25zID0gb3B0aW9ucyB8fCB7fTtcblxuICAgICAgICBpZiAoISh0aGlzIGluc3RhbmNlb2YgTW91c2VQb3NpdGlvbikpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXCJFUlJPUiBDTEFTU19DT05TVFJVQ1RPUlwiKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIGluaXQgUHJvajQgZGVmcyBtYW51YWxseVxuICAgICAgICAvLyBSZWdpc3Rlci5sb2FkKFByb2o0KTtcbiAgICAgICAgLy8gdHJ5IHtcbiAgICAgICAgLy8gICAgIHJlZ2lzdGVyKFByb2o0KTtcbiAgICAgICAgLy8gfSBjYXRjaCAoZSkge31cblxuICAgICAgICB0aGlzLl9pbml0aWFsaXplKG9wdGlvbnMpO1xuXG4gICAgICAgIC8vIGluaXQgY29udHJvbCBET00gY29udGFpbmVyXG4gICAgICAgIHZhciBjb250YWluZXIgPSB0aGlzLl9jb250YWluZXIgPSB0aGlzLl9pbml0Q29udGFpbmVyKG9wdGlvbnMpO1xuXG4gICAgICAgIC8vIGNhbGwgb2wuY29udHJvbC5Db250cm9sIGNvbnN0cnVjdG9yXG4gICAgICAgIENvbnRyb2wuY2FsbCh0aGlzLCB7XG4gICAgICAgICAgICBlbGVtZW50IDogY29udGFpbmVyLFxuICAgICAgICAgICAgd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ICAgICAgICAgICAgICAgIGlmICh0aGlzLl9pc0Rlc2t0b3ApIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5saXN0ZW5lcktleSA9IG1hcC5vbihcbiAgICAgICAgICAgICAgICAgICAgICAgIFwicG9pbnRlcm1vdmVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIChlKSA9PiB7IHRoaXMub25Nb3VzZU1vdmUoZSk7IH1cbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmxpc3RlbmVyS2V5ID0gbWFwLm9uKFxuICAgICAgICAgICAgICAgICAgICAgICAgXCJtb3ZlZW5kXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAoZSkgPT4gdGhpcy5vbk1hcE1vdmUoZSlcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIGFkZCBvdmVybGF5IG9ubHkgaWYgb3B0aW9uIGVkaXRDb29yZGluYXRlcyBpcyB0cnVlXG4gICAgICAgICAgICBpZiAodGhpcy5vcHRpb25zLmVkaXRDb29yZGluYXRlcykge1xuICAgICAgICAgICAgICAgIC8vIGNyw6lhdGlvbiBkZSBsJ8OpbMOpbWVudCBET01cbiAgICAgICAgICAgICAgICB2YXIgbWFya2VyRGl2ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImltZ1wiKTtcbiAgICAgICAgICAgICAgICBtYXJrZXJEaXYuaWQgPSB0aGlzLl9hZGRVSUQoXCJHUG1vdXNlUG9zaXRpb25NYXJrZXJcIik7XG4gICAgICAgICAgICAgICAgbWFya2VyRGl2LnNyYyA9IHRoaXMuX21hcmtlclVybDtcbiAgICAgICAgICAgICAgICBtYXJrZXJEaXYudGl0bGUgPSBcIkNsaXF1ZXIgcG91ciBzdXBwcmltZXJcIjtcbiAgICAgICAgICAgICAgICBtYXJrZXJEaXYuYWRkRXZlbnRMaXN0ZW5lcihcImNsaWNrXCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgY29udGV4dC5fbWFya2VyT3ZlcmxheS5zZXRQb3NpdGlvbih1bmRlZmluZWQpO1xuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgdGhpcy5fbWFya2VyT3ZlcmxheSA9IG5ldyBPdmVybGF5KHtcbiAgICAgICAgICAgICAgICAgICAgb2Zmc2V0IDogdGhpcy5fbWFya2VyT2Zmc2V0LFxuICAgICAgICAgICAgICAgICAgICBlbGVtZW50IDogbWFya2VyRGl2LFxuICAgICAgICAgICAgICAgICAgICBzdG9wRXZlbnQgOiBmYWxzZVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIG1hcC5hZGRPdmVybGF5KHRoaXMuX21hcmtlck92ZXJsYXkpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgb2xPYnNlcnZhYmxlVW5CeUtleSh0aGlzLmxpc3RlbmVyS2V5KTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIGNhbGwgb3JpZ2luYWwgc2V0TWFwIG1ldGhvZFxuICAgICAgICBDb250cm9sLnByb3RvdHlwZS5zZXRNYXAuY2FsbCh0aGlzLCBtYXApO1xuXG4gICAgICAgIC8vIEhBQ0s6IG9uIGFycsOqdGUgbCdleGVjdXRpb24gZGUgbGEgZm9uY3Rpb24uLi5cbiAgICAgICAgaWYgKG1hcCA9PT0gbnVsbCkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gbW9kZSBcImNvbGxhcHNlZFwiXG4gICAgICAgIGlmICghdGhpcy5jb2xsYXBzZWQpIHtcbiAgICAgICAgICAgIHZhciBpbnB1dFNob3cgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChcIkdQc2hvd01vdXNlUG9zaXRpb24tXCIgKyB0aG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ZXIgPSBmdW5jdGlvbiAob3B0aW9uKSB7XG4gICAgICAgIGlmICghdGhpcy5vcHRpb25zLmVkaXRDb29yZGluYXRlcykge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCFvcHRpb24pIHtcbiAgICAgICAgICAgIHRoaXMuX21hcmtlclVybCA9IE1hcmtlcnNbXCJsaWdodE9yYW5nZVwiXTtcbiAgICAgICAgICAgIHRoaXMuX21hcmtlck9mZnNldCA9IE1hcmtlcnMuZGVmYXVsdE9mZnNldDtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIGhpZGVcbiAgICAgICAgdGhpcy5faGlkZU1hcmtlciA9IChvcHRpb24uaGlkZSAhPT0gdW5kZWZpbmVkKSA/IG9wdGlvbi5oaWRlIDogZmFsc2U7XG5cbiAgICAgICAgLy8gb2Zmc2V0XG4gICAgICAgIGlmIChvcHRpb24ub2Zmc2V0KSB7XG4gICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShvcHRpb24ub2Zmc2V0KSAmJiBvcHRpb24ub2Zmc2V0Lmxlbmd0aCA9PT0gMikge1xuICAgICAgICAgICAgICAgIHRoaXMuX21hcmtlck9mZnNldCA9IG9wdGlvbi5vZmZzZXQ7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGxvZ2dlci5sb2coXCJwb3NpdGlvbk1hcmtlci5vZmZzZXQgc2hvdWxkIGJlIGFuIGFycmF5LiBlLmcuIDogWzAsMF1cIik7XG4gICAgICAgICAgICAgICAgdGhpcy5fbWFya2VyT2Zmc2V0ID0gTWFya2Vycy5kZWZhdWx0T2Zmc2V0O1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5fbWFya2VyT2Zmc2V0ID0gTWFya2Vycy5kZWZhdWx0T2Zmc2V0O1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHV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b2l0IG9uIGNoYXJnZXIgZGVzIHByb2plY3Rpb25zIHBhciBkZWZhdXQgZGFucyBjZSBjb21wb3NhbnQgP1xuICAgICAgICAvLyBjaGFyZ2VtZW50IGRlcyBwcm9qZWN0aW9ucyBwYXIgZGVmYXV0XG4gICAgICAgIC8vIENSUy5sb2FkQnlEZWZhdWx0KCk7XG4gICAgICAgIC8vIENSUy5vdmVybG9hZCgpO1xuXG4gICAgICAgIC8vIHN5c3RlbWVzIGRlIHByb2plY3Rpb24gZGlzcG9uaWJsZSBwYXIgZGVmYXV0XG4gICAgICAgIHZhciBwcm9qZWN0aW9uU3lzdGVtc0J5RGVmYXVsdCA9IFt7XG4gICAgICAgICAgICBsYWJlbCA6IFwiR1xcdTAwZTlvZ3JhcGhpcXVlXCIsXG4gICAgICAgICAgICBjcnMgOiBvbEdldFByb2ooXCJFUFNHOjQzMjZcIikuZ2V0Q29kZSgpLFxuICAgICAgICAgICAgdHlwZSA6IFwiR2VvZ3JhcGhpY2FsXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgbGFiZWwgOiBcIldlYiBNZXJjYXRvclwiLFxuICAgICAgICAgICAgY3JzIDogb2xHZXRQcm9qKFwiRVBTRzozODU3XCIpLmdldENvZGUoKSxcbiAgICAgICAgICAgIHR5cGUgOiBcIk1ldHJpY1wiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIGxhYmVsIDogXCJMYW1iZXJ0IDkzXCIsXG4gICAgICAgICAgICBjcnMgOiBvbEdldFByb2ooXCJFUFNHOjIxNTRcIikuZ2V0Q29kZSgpLFxuICAgICAgICAgICAgdHlwZSA6IFwiTWV0cmljXCIsXG4gICAgICAgICAgICBnZW9CQm94IDoge1xuICAgICAgICAgICAgICAgIGxlZnQgOiAtOS44NixcbiAgICAgICAgICAgICAgICBib3R0b20gOiA0MS4xNSxcbiAgICAgICAgICAgICAgICByaWdodCA6IDEwLjM4LFxuICAgICAgICAgICAgICAgIHRvcCA6IDUxLjU2XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIGxhYmVsIDogXCJMYW1iZXJ0IElJIFxcdTAwZTl0ZW5kdVwiLFxuICAgICAgICAgICAgY3JzIDogb2xHZXRQcm9qKFwiRVBTRzoyNzU3MlwiKS5nZXRDb2RlKCksXG4gICAgICAgICAgICB0eXBlIDogXCJNZXRyaWNcIixcbiAgICAgICAgICAgIGdlb0JCb3ggOiB7XG4gICAgICAgICAgICAgICAgbGVmdCA6IC00Ljg3LFxuICAgICAgICAgICAgICAgIGJvdHRvbSA6IDQyLjMzLFxuICAgICAgICAgICAgICAgIHJpZ2h0IDogOC4yMyxcbiAgICAgICAgICAgICAgICB0b3AgOiA1MS4xNFxuICAgICAgICAgICAgfVxuICAgICAgICB9XTtcblxuICAgICAgICB2YXIgc3lzdGVtcyA9IHRoaXMub3B0aW9ucy5zeXN0ZW1zO1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHN5c3RlbXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIC8qIGRlZmluaXRpb24gZCd1biBzeXN0ZW1lIGRlIHJlZmVyZW5jZSAqL1xuICAgICAgICAgICAgdmFyIHN5cyA9IHN5c3RlbXNbaV07XG4gICAgICAgICAgICB0aGlzLmFkZFN5c3RlbShzeXMpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHRoaXMuX3Byb2plY3Rpb25TeXN0ZW1zLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgLy8gb24gYWpvdXRlIGxlcyBzeXN0w6htZXMgZGUgcHJvamVjdGlvbnMgcGFyIGTDqWZhdXRcbiAgICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgcHJvamVjdGlvblN5c3RlbXNCeURlZmF1bHQubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgICAgICB0aGlzLmFkZFN5c3RlbShwcm9qZWN0aW9uU3lzdGVtc0J5RGVmYXVsdFtqXSk7XG4gICAgICAgICAgICB9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c2ltYXV4XCIsXG4gICAgICAgICAgICAgICAgZm9ybWF0IDogdGhpcy5fZGlzcGxheURNU1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGNvZGUgOiBcIlJBRFwiLFxuICAgICAgICAgICAgICAgIGxhYmVsIDogXCJyYWRpYW5zXCIsXG4gICAgICAgICAgICAgICAgZm9ybWF0IDogdGhpcy5fZGlzcGxheVJBRFxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGNvZGUgOiBcIkdPTlwiLFxuICAgICAgICAgICAgICAgIGxhYmVsIDogXCJncmFkZXNcIixcbiAgICAgICAgICAgICAgICBmb3JtYXQgOiB0aGlzLl9kaXNwbGF5R09OXG4gICAgICAgICAgICB9XSxcbiAgICAgICAgICAgIE1ldHJpYyA6IFt7XG4gICAgICAgICAgICAgICAgY29kZSA6IFwiTVwiLFxuICAgICAgICAgICAgICAgIGxhYmVsIDogXCJtw6h0cmVzXCIsXG4gICAgICAgICAgICAgICAgZm9ybWF0IDogdGhpcy5fZGlzcGxheU1ldGVyXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgY29kZSA6IFwiS01cIixcbiAgICAgICAgICAgICAgICBsYWJlbCA6IFwia2lsb23DqHRyZXNcIixcbiAgICAgICAgICAgICAgICBmb3JtYXQgOiB0aGlzLl9kaXNwbGF5S01ldGVyXG4gICAgICAgICAgICB9XVxuICAgICAgICB9O1xuXG4gICAgICAgIHZhciB1bml0cyA9IHRoaXMub3B0aW9ucy51bml0cztcblxuICAgICAgICBmb3IgKHZhciB0eXBlIGluIHByb2plY3Rpb25Vbml0c0J5RGVmYXVsdCkge1xuICAgICAgICAgICAgaWYgKHByb2plY3Rpb25Vbml0c0J5RGVmYXVsdC5oYXNPd25Qcm9wZXJ0eSh0eXBlKSkge1xuICAgICAgICAgICAgICAgIHZhciBmb3VuZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgcHJvamVjdGlvblVuaXRzQnlEZWZhdWx0W3R5cGVdLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBvYmogPSBwcm9qZWN0aW9uVW5pdHNCeURlZmF1bHRbdHlwZV1bal07XG4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdW5pdHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB1bml0ID0gdW5pdHNbaV07XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAob2JqLmNvZGUgPT09IHVuaXQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3VuZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCF0aGlzLl9wcm9qZWN0aW9uVW5pdHNbdHlwZV0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fcHJvamVjdGlvblVuaXRzW3R5cGVdID0gW107XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3Byb2plY3Rpb25Vbml0c1t0eXBlXS5wdXNoKG9iaik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKCFmb3VuZCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9wcm9qZWN0aW9uVW5pdHNbdHlwZV0gPSBwcm9qZWN0aW9uVW5pdHNCeURlZmF1bHRbdHlwZV07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gYXUgY2FzIG/DuS4uLlxuICAgICAgICBpZiAodHlwZW9mIHRoaXMuX3Byb2plY3Rpb25Vbml0cyA9PT0gXCJvYmplY3RcIiAmJiBPYmplY3Qua2V5cyh0aGlzLl9wcm9qZWN0aW9uVW5pdHMpLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgdGhpcy5fcHJvamVjdGlvblVuaXRzID0gcHJvamVjdGlvblVuaXRzQnlEZWZhdWx0O1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIHRoaXMgbWV0aG9kIGdldCBsYWJlbCBmcm9tIHRoZSBjdXJyZW50IHByb2plY3Rpb24gdW5pdHNcbiAgICAgKlxuICAgICAqIEByZXR1cm5zIHtTdHJpbmd9IHByb2plY3Rpb24gaW5mb3JtYXRpb25cbiAgICAgKlxuICAgICAqIEBwcml2YXRlXG4gICAgICovXG4gICAgTW91c2VQb3NpdGlvbi5wcm90b3R5cGUuX2dldEN1cnJlbnRQcm9qZWN0aW9uSW5mb3JtYXRpb24gPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciBzeXN0ZW1JbmZvID0gW1xuICAgICAgICAgICAgdGhpcy5fY3VycmVudFByb2plY3Rpb25TeXN0ZW1zLmxhYmVsLFxuICAgICAgICAgICAgXCJlblwiXG4gICAgICAgIF07XG5cbiAgICAgICAgdmFyIHVuaXRzID0gdGhpcy5fcHJvamVjdGlvblVuaXRzW3RoaXMuX2N1cnJlbnRQcm9qZWN0aW9uVHlwZV07XG4gICAgICAgIGZvciAodmFyIHUgPSAwOyB1IDwgdW5pdHMubGVuZ3RoOyArK3UpIHtcbiAgICAgICAgICAgIGlmICh1bml0c1t1XS5jb2RlID09PSB0aGlzLl9jdXJyZW50UHJvamVjdGlvblVuaXRzKSB7XG4gICAgICAgICAgICAgICAgc3lzdGVtSW5mby5wdXNoKHVuaXRzW3VdLmxhYmVsKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gc3lzdGVtSW5mby5qb2luKFwiIFwiKTtcbiAgICB9O1xuXG4gICAgLy8gIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjI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4gICAgICpcbiAgICAgKiBAcGFyYW0ge1N0cmluZ30gdHlwZSAtIEdlb2dyYXBoaWNhbCBvciBNZXRyaWNcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqL1xuICAgIE1vdXNlUG9zaXRpb24ucHJvdG90eXBlLl9zZXRUeXBlVW5pdHNQYW5lbCA9IGZ1bmN0aW9uICh0eXBlKSB7XG4gICAgICAgIHZhciBjb250YWluZXIgPSB0aGlzLl9wcm9qZWN0aW9uVW5pdHNDb250YWluZXI7XG5cbiAgICAgICAgLy8gb24gc3VwcHJpbWUgbGVzIGVuZmFudHMuLi5cbiAgICAgICAgd2hpbGUgKGNvbnRhaW5lci5maXJzdENoaWxkKSB7XG4gICAgICAgICAgICBjb250YWluZXIucmVtb3ZlQ2hpbGQoY29udGFpbmVyLmZpcnN0Q2hpbGQpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHVuaXRzID0gdGhpcy5fcHJvamVjdGlvblVuaXRzW3R5cGVdO1xuICAgICAgICBmb3IgKHZhciBqID0gMDsgaiA8IHVuaXRzLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICB2YXIgb2JqID0gdW5pdHNbal07XG4gICAgICAgICAgICB2YXIgb3B0aW9uID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcIm9wdGlvblwiKTtcbiAgICAgICAgICAgIG9wdGlvbi52YWx1ZSA9IChvYmouY29kZSkgPyBvYmouY29kZSA6IGo7XG4gICAgICAgICAgICBvcHRpb24udGV4dCA9IG9iai5sYWJlbCB8fCBqO1xuICAgICAgICAgICAgLy8gb3B0aW9uLmxhYmVsID0gb2JqLmxhYmVsO1xuICAgICAgICAgICAgY29udGFpbmVyLmFwcGVuZENoaWxkKG9wdGlvbik7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgcHJvamVjdGlvblVuaXRzID0gdGhpcy5fcHJvamVjdGlvblVuaXRzW3R5cGVdWzBdLmNvZGU7XG5cbiAgICAgICAgaWYgKHRoaXMuX2N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c2VjcyA8PSBOdW1iZXIoaW5wdXRTZWNvbmRzLmRhdGFzZXQubWF4KSkge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSAoc2VjcyAvIDM2MDApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGRpcmVjdGlvbiA9PT0gXCJPXCIgfHwgZGlyZWN0aW9uID09PSBcIlNcIikge1xuICAgICAgICAgICAgcmVzdWx0ID0gLXJlc3VsdDtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIGxvY2F0ZSBETVMgY29vcmRpbmF0ZXMgb24gbWFwXG4gICAgICpcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqL1xuICAgIE1vdXNlUG9zaXRpb24ucHJvdG90eXBlLmxvY2F0ZURNU0Nvb3JkaW5hdGVzID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgbG9ubGF0ID0gW1xuICAgICAgICAgICAgdGhpcy5nZXRDb29yZGluYXRlKFwiTG9uXCIpLFxuICAgICAgICAgICAgdGhpcy5nZXRDb29yZGluYXRlKFwiTGF0XCIpXG4gICAgICAgIF07XG5cbiAgICAgICAgaWYgKGxvbmxhdFswXSA9PT0gbnVsbCB8fCBsb25sYXRbMV0gPT09IG51bGwpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBvU3JzID0gdGhpcy5fY3VycmVudFByb2plY3Rpb25TeXN0ZW1zLmNycztcbiAgICAgICAgaWYgKCFvU3JzKSB7XG4gICAgICAgICAgICBsb2dnZXIubG9nKFwiRVJST1IgOiBzeXN0ZW0gY3JzIG5vdCBmb3VuZFwiKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciB2aWV3ID0gdGhpcy5nZXRNYXAoKS5nZXRWaWV3KCk7XG5cbiAgICAgICAgdmFyIGNvb3Jka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AgICAgICAgICAgIHZhciBvcHRpb24gPSBudWxsO1xuXG4gICAgICAgICAgICBpZiAocHJvai5nZW9CQm94KSB7XG4gICAgICAgICAgICAgICAgLyogYmJveGVzIGludGVyc2VjdGlvbiB0ZXN0ICovXG4gICAgICAgICAgICAgICAgaWYgKG1hcEV4dGVudFswXSA+IHByb2ouZ2VvQkJveC5yaWdodCB8fFxuICAgICAgICAgICAgICAgICAgICBtYXBFeHRlbnRbMV0gPiBwcm9qLmdlb0JCb3gudG9wIHx8XG4gICAgICAgICAgICAgICAgICAgIG1hcEV4dGVudFsyXSA8IHByb2ouZ2VvQkJveC5sZWZ0IHx8XG4gICAgICAgICAgICAgICAgICAgIG1hcEV4dGVudFszXSA8IHByb2ouZ2VvQkJveC5ib3R0b21cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHByb2ogPT09IHRoaXMuX2N1cnJlbnRQcm9qZWN0aW9uU3lzdGVtcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9uID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcIm9wdGlvblwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbi52YWx1ZSA9IHByb2ouY29kZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbi50ZXh0ID0gcHJvai5sYWJlbCB8fCBqO1xuICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9uLnNldEF0dHJpYnV0ZShcInNlbGVjdGVkXCIsIFwic2VsZWN0ZWRcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb24uc2V0QXR0cmlidXRlKFwiZGlzYWJsZWRcIiwgXCJkaXNhYmxlZFwiKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgc3lzdGVtTGlzdC5hcHBlbmRDaGlsZChvcHRpb24pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOyAvLyBkbyBub3Qga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n//# sourceURL=webpack-internal:///./src/OpenLayers/Controls/MousePosition.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CSS_Controls_MousePosition_GPmousePositionOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../CSS/Controls/MousePosition/GPmousePositionOpenLayers.css */ \"./src/OpenLayers/CSS/Controls/MousePosition/GPmousePositionOpenLayers.css\");\n/* harmony import */ var _CSS_Controls_MousePosition_GPmousePositionOpenLayers_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_MousePosition_GPmousePositionOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ol/control/Control */ \"ol/control/Control\");\n/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_control_Control__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ol/Overlay */ \"ol/Overlay\");\n/* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ol_Overlay__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ol/Observable */ \"ol/Observable\");\n/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ol_Observable__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ol/proj */ \"ol/proj\");\n/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(ol_proj__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! geoportal-access-lib */ \"./node_modules/geoportal-access-lib/src/Gp.js\");\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Common/Utils */ \"./src/Common/Utils.js\");\n/* harmony import */ var _Utils_Interactions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Utils/Interactions */ \"./src/OpenLayers/Controls/Utils/Interactions.js\");\n/* harmony import */ var _Utils_Markers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Utils/Markers */ \"./src/OpenLayers/Controls/Utils/Markers.js\");\n/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../Common/Utils/SelectorID */ \"./src/Common/Utils/SelectorID.js\");\n/* harmony import */ var _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Common/Utils/MathUtils */ \"./src/Common/Utils/MathUtils.js\");\n/* harmony import */ var _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Common/Utils/Draggable */ \"./src/Common/Utils/Draggable.js\");\n/* harmony import */ var _CRS_CRS__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../CRS/CRS */ \"./src/OpenLayers/CRS/CRS.js\");\n/* harmony import */ var _Common_Controls_MousePositionDOM__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../Common/Controls/MousePositionDOM */ \"./src/Common/Controls/MousePositionDOM.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n// import CSS\n\n// import OpenLayers\n\n\n\n\n// import geoportal library access\n\n// import local\n\n\n\n\n\n\n\n// import defs proj4 manually (cf. line 125)\n// import Proj4 from \"proj4\";\n// import { register } from \"ol/proj/proj4\";\n// import Register from \"../../Common/Utils/Register\";\n// import local with ol dependencies\n\n// import \"../CRS/AutoLoadCRS\";\n\n// DOM\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_6__[\"default\"].getLogger(\"GeoportalMousePosition\");\n\n/**\n * @classdesc\n * MousePosition Control.\n *\n * @constructor\n * @alias ol.control.GeoportalMousePosition\n * @type {ol.control.GeoportalMousePosition}\n * @extends {ol.control.Control}\n * @param {Object} options - options for function call.\n * @param {String} [options.apiKey] - API key. The key \"calcul\" is used by default.\n * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol)\n * @param {Boolean} [options.draggable = false] - Specify if widget is draggable\n * @param {Boolean} [options.collapsed = true] - Specify if MousePosition control should be collapsed at startup. Default is true.\n * @param {Array} [options.units] - list of coordinates units, to be displayed in control units list.\n * Values may be \"DEC\" (decimal degrees), \"DMS\" (sexagecimal), \"RAD\" (radians) and \"GON\" (grades) for geographical coordinates,\n * and \"M\" or \"KM\" for metric coordinates\n * @param {Boolean} [options.displayAltitude = true] - activate (true) or deactivate (false) the altitude panel. True by default\n * @param {Boolean} [options.displayCoordinates = true] - activate (true) or deactivate (false) the coordinates panel. True by default\n * @param {Boolean} [options.editCoordinates = false] - If true, coordinates from the MousePosition control can be edited by users to re-center the view. False by default.\n * @param {Function} [options.mapCenterCallback] - callback...\n * @param {Array} [options.systems] - list of projection systems, default are Geographical (\"EPSG:4326\"), Web Mercator (\"EPSG:3857\"), Lambert 93 (\"EPSG:2154\") and extended Lambert 2 (\"EPSG:27572\").\n * Each array element (=system) is an object with following properties :\n * @param {String} options.systems.crs - Proj4 crs alias (from proj4 defs). e.g. : \"EPSG:4326\". Required\n * @param {String} [options.systems.label] - CRS label to be displayed in control. Default is crs code (e.g. \"EPSG:4326\")\n * @param {String} options.systems.type - CRS units type for coordinates conversion : \"Geographical\" or \"Metric\". Default: \"Metric\"\n * @param {Object} [options.systems.geoBBox] - Aera covered by the system (WGS84 coordinates).\n * @param {Number} options.systems.geoBBox.right - Right bound.\n * @param {Number} options.systems.geoBBox.left - Left bound.\n * @param {Number} options.systems.geoBBox.top - Top bound.\n * @param {Number} options.systems.geoBBox.bottom - Bottom bound.\n * @param {Object} [options.positionMarker] - options for position marker\n * @param {String} options.positionMarker.url - Marker url (define in src/Openlayers/Controls/Utils/Markers.js)\n * @param {Array} options.positionMarker.offset - Offsets in pixels used when positioning the marker towards targeted point.\n * The first element in the array is the horizontal offset. A positive value shifts the marker right.\n * The second element in the array is the vertical offset. A positive value shifts the marker down. [0,0] value positions the top-left corner of the marker image to the targeted point.\n * Default is offset associated to default marker image.\n * @param {Boolean} options.positionMarker.hide - if true, marker is not displayed, otherwise displayed (False by default.)\n * @param {Object} [options.altitude] - elevation configuration\n * @param {Object} [options.altitude.serviceOptions] - options of elevation service\n * @param {Number} [options.altitude.responseDelay] - latency for altitude request, 500 ms by default\n * @param {Number} [options.altitude.triggerDelay] - immobilisation time of movement on the map to trigger the elevation calculation, 200 ms by default\n * @param {Number} [options.altitude.noDataValue] - value used for altitude service no data (default is -99999). In this case, \"---m\" will be displayed instead of \"-99999m\"\n * @param {Number} [options.altitude.noDataValueTolerance] - tolerance for no data value :\n * values in [noDataValue + noDataValueTolerance ; noDataValue - noDataValueTolerance] interval will not be displayed, but \"---m\" will be displayed instead.\n * Default is 90000 (no data values = [-9999 ; -189999])\n * @example\n * var MousePosition = new ol.control.GeoportalMousePosition({\n * \"collapsed\" : false,\n * \"graggable\" : true,\n * \"displayCoordinates\" : true,\n * \"displayAltitude\" : true,\n * \"altitude\" : {\n * \"triggerDelay\" : 100,\n * \"responseDelay\" : 500,\n * \"noDataValue\" : -99999,\n * \"noDataValueTolerance\" : 99000,\n * \"serviceOptions\" : {}\n * },\n * \"systems\" : [\n * {\n * \"crs\" : \"EPSG:3857\",\n * \"label\" : \"Web Mercator\",\n * \"type\" : \"Metric\"\n * },\n * {\n * \"crs\" : \"EPSG:4326\",\n * \"label\" : \"Géographiques\",\n * \"type\" : \"Geographical\"\n * },\n * {\n * \"label\" : \"Lambert 93\",\n * \"crs\" : \"EPSG:2154\",\n * \"type\" : \"Metric\",\n * \"geoBBox\" : {\n * \"left\" : -9.86,\n * \"bottom\" : 41.15,\n * \"right\" : 10.38,\n * \"top\" : 51.56\n * }\n * }\n * ],\n * \"units\" : [\"DEC\", \"DMS\"]\n * });\n */\nvar MousePosition = function (Control) {\n /**\n * See {@link ol.control.GeoportalMousePosition}\n * @module MousePosition\n * @alias module:~Controls/MousePosition\n * @param {*} options - options\n * @example\n * import GeoportalMousePosition from \"src/OpenLayers/Controls/MousePosition\"\n */\n function MousePosition(options) {\n options = options || {};\n if (!(this instanceof MousePosition)) {\n throw new TypeError(\"ERROR CLASS_CONSTRUCTOR\");\n }\n\n // init Proj4 defs manually\n // Register.load(Proj4);\n // try {\n // register(Proj4);\n // } catch (e) {}\n\n this._initialize(options);\n\n // init control DOM container\n var container = this._container = this._initContainer(options);\n\n // call ol.control.Control constructor\n Control.call(this, {\n element: container,\n target: options.target,\n render: options.render\n });\n }\n ;\n\n // Inherits from ol.control.Control\n if (Control) MousePosition.__proto__ = Control;\n\n /**\n * @lends module:GeoportalMousePosition\n */\n MousePosition.prototype = Object.create(Control.prototype, {});\n\n // on récupère les méthodes de la classe commune MousePositionDOM\n _Common_Utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].assign(MousePosition.prototype, _Common_Controls_MousePositionDOM__WEBPACK_IMPORTED_MODULE_14__[\"default\"]);\n\n /**\n * Constructor (alias)\n *\n * @private\n */\n MousePosition.prototype.constructor = MousePosition;\n\n /**\n * Overload ol.control.Control setMap method, called when\n *\n * @param {Object} map - the map\n *\n */\n MousePosition.prototype.setMap = function (map) {\n var _this = this;\n var context = this;\n if (map) {\n // dans le cas de l'ajout du contrôle à la map\n var center = this._createMapCenter();\n map.getViewport().appendChild(center);\n if (!this.collapsed && !this._isDesktop) {\n center.className = \"GPmapCenterVisible\";\n }\n\n // mode \"draggable\"\n if (this.draggable) {\n _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_12__[\"default\"].dragElement(this._panelMousePositionContainer, this._panelHeaderMousePositionContainer, map.getTargetElement());\n }\n\n // on met en place l'evenement sur la carte pour recuperer les coordonnées,\n // on l'active à l'ouverture du panneau uniquement !\n if (!this.collapsed) {\n // evenement valable pour le mode desktop !\n if (this._isDesktop) {\n this.listenerKey = map.on(\"pointermove\", function (e) {\n _this.onMouseMove(e);\n });\n } else {\n this.listenerKey = map.on(\"moveend\", function (e) {\n return _this.onMapMove(e);\n });\n }\n }\n\n // add overlay only if option editCoordinates is true\n if (this.options.editCoordinates) {\n // création de l'élément DOM\n var markerDiv = document.createElement(\"img\");\n markerDiv.id = this._addUID(\"GPmousePositionMarker\");\n markerDiv.src = this._markerUrl;\n markerDiv.title = \"Cliquer pour supprimer\";\n markerDiv.addEventListener(\"click\", function () {\n context._markerOverlay.setPosition(undefined);\n });\n this._markerOverlay = new ol_Overlay__WEBPACK_IMPORTED_MODULE_2___default.a({\n offset: this._markerOffset,\n element: markerDiv,\n stopEvent: false\n });\n map.addOverlay(this._markerOverlay);\n }\n } else {\n Object(ol_Observable__WEBPACK_IMPORTED_MODULE_3__[\"unByKey\"])(this.listenerKey);\n }\n\n // call original setMap method\n Control.prototype.setMap.call(this, map);\n\n // HACK: on arrête l'execution de la fonction...\n if (map === null) {\n return;\n }\n\n // mode \"collapsed\"\n if (!this.collapsed) {\n var inputShow = document.getElementById(\"GPshowMousePosition-\" + this._uid);\n inputShow.checked = \"checked\";\n this._setElevationPanel(this.options.displayAltitude);\n this._setCoordinatesPanel(this.options.displayCoordinates);\n if (!this.options.displayCoordinates) {\n this._setSettingsPanel(false);\n }\n }\n };\n\n // ################################################################### //\n // #################### user interface methods ####################### //\n // ################################################################### //\n\n /**\n * Set additional projection system\n *\n * @param {Object} system - projection system\n * @param {String} system.crs - Proj4 crs alias (from proj4 defs) e.g. \"EPSG:4326\"\n * @param {String} [system.label] - CRS label to be displayed in control. Default is system.crs alias\n * @param {String} [system.type] - CRS units type for coordinates conversion (one of control options.units). Default is \"Metric\"\n */\n MousePosition.prototype.addSystem = function (system) {\n if (_typeof(system) !== \"object\") {\n logger.log(\"[ERROR] MousePosition:addSystem - system parameter should be an object\");\n return;\n }\n if (!system.crs) {\n logger.error(\"crs not defined !\");\n return;\n }\n if (!system.label) {\n logger.warn(\"crs label not defined, use crs code by default.\");\n system.label = system.crs;\n }\n if (!system.type) {\n logger.warn(\"type srs not defined, use 'Metric' by default.\");\n system.type = \"Metric\";\n }\n\n // chargement de la definition de la projection\n // même si déjà chargé...\n _CRS_CRS__WEBPACK_IMPORTED_MODULE_13__[\"default\"].loadByName(system.crs);\n if (!Object(ol_proj__WEBPACK_IMPORTED_MODULE_4__[\"get\"])(system.crs)) {\n logger.error(\"crs '{}' not available into proj4 definitions !\", system.crs);\n return;\n }\n\n // 1. add system to control systems\n for (var j = 0; j < this._projectionSystems.length; j++) {\n var obj = this._projectionSystems[j];\n if (system.crs === obj.crs) {\n // warn user\n logger.info(\"crs '{}' already configured\", obj.crs);\n }\n }\n system.code = this._projectionSystems.length;\n this._projectionSystems.push(system);\n\n // 2. add system settings option to container (if it was already build)\n var selectSystem = document.getElementById(\"GPmousePositionProjectionSystem-\" + this._uid);\n if (selectSystem) {\n var option = document.createElement(\"option\");\n option.value = system.code;\n option.text = system.label;\n selectSystem.appendChild(option);\n }\n };\n\n /**\n * Set additional projection systems\n *\n * @param {Array} systems - Array of system object, with following properties :\n * @param {String} systems.crs - Proj4 CRS alias (from proj4 defs) e.g. \"EPSG:4326\"\n * @param {String} systems.label - CRS label (for coordinates conversion)\n * @param {String} systems.type - CRS units type to be displayed in control (one of control options.units). Default is \"Metric\"\n */\n MousePosition.prototype.addSystems = function (systems) {\n if (!systems) {\n return;\n }\n if (!Array.isArray(systems)) {\n logger.log(\"[ERROR] MousePosition:addSystems - systems parameter should be an array\");\n return;\n }\n for (var i = 0; i < systems.length; i++) {\n this.addSystem(systems[i]);\n }\n };\n\n /**\n * Remove projection system (in case there are several system with same code, only the first one will be removed)\n *\n * @param {String} systemCrs - CRS alias (from proj4 defs)\n */\n MousePosition.prototype.removeSystem = function (systemCrs) {\n if (!systemCrs || typeof systemCrs !== \"string\") {\n logger.log(\"[ERROR] MousePosition:removeSystem - systemCode parameter should be a string\");\n return;\n }\n var systemList = document.getElementById(\"GPmousePositionProjectionSystem-\" + this._uid);\n var systemCode = null;\n // find system in control projection systems list\n for (var i = 0; i < this._projectionSystems.length; i++) {\n var proj = this._projectionSystems[i];\n if (systemCrs === proj.crs) {\n systemCode = proj.code;\n // remove system from control projection systems list\n this._projectionSystems.splice(i, 1);\n break;\n }\n }\n if (systemCode == null) {\n logger.log(\"[WARN] MousePosition:removeSystem - system not found\");\n return;\n }\n\n /* re-initialization of codes */\n var oldNewCodeMap = [];\n for (var j = 0; j < this._projectionSystems.length; j++) {\n oldNewCodeMap[Number(this._projectionSystems[j].code)] = j;\n this._projectionSystems[j].code = j;\n }\n\n /* find system in control container systems list */\n var indexChildToRemove = null;\n for (var k = 0; k < systemList.childNodes.length; k++) {\n if (systemCode === systemList.childNodes[j].value) {\n indexChildToRemove = k;\n continue;\n }\n systemList.childNodes[j].value = oldNewCodeMap[Number(systemList.childNodes[j].value)];\n }\n /* remove system from control container systems list */\n if (indexChildToRemove != null) {\n systemList.removeChild(systemList.childNodes[indexChildToRemove]);\n }\n\n // choose arbitrarily a new current system if needed\n if (this._currentProjectionSystems.code === Number(systemCode)) {\n systemList.childNodes[0].setAttribute(\"selected\", \"selected\");\n this._setCurrentSystem(systemList.childNodes[0].value);\n }\n };\n\n /**\n * Set control units (to be displayed)\n *\n * @param {Array} units - list of all coordinates units, to be displayed in control units list.\n * Values may be \"DEC\" (decimal degrees), \"DMS\" (sexagecimal), \"RAD\" (radians) and \"GON\" (grades) for geographical coordinates,\n * and \"M\" or \"KM\" for metric coordinates\n */\n MousePosition.prototype.setUnits = function (units) {\n if (!units || !Array.isArray(units)) {\n return;\n }\n this.options.units = units;\n this._projectionUnits = [];\n this._initProjectionUnits();\n if (this._currentProjectionType) {\n this._setTypeUnitsPanel(this._currentProjectionType);\n }\n };\n\n /**\n * Set control altitude options (useless if displayAltitude == false)\n *\n * @param {Object} options - altitude options\n * @param {Object} [options.serviceOptions] - options of elevation service\n * @param {Number} [options.responseDelay] - latency for elevation request, 500 ms by default\n * @param {Number} [options.triggerDelay] - immobilisation time of movement on the map to trigger the elevation calculation, 200 ms by default\n */\n MousePosition.prototype.setAltitudeOptions = function (options) {\n if (!options || _typeof(options) !== \"object\") {\n return;\n }\n this.options.altitude.triggerDelay = options.triggerDelay;\n this.options.altitude.responseDelay = options.responseDelay;\n if (options.serviceOptions) {\n for (var opt in options.serviceOptions) {\n if (options.serviceOptions.hasOwnProperty(opt)) {\n this.options.altitude.serviceOptions[opt] = options.serviceOptions[opt];\n }\n }\n }\n };\n\n /**\n * Display or hide elevation panel\n *\n * @param {Boolean} displayAltitude - true to display elevation panel, false to hide it\n */\n MousePosition.prototype.displayAltitude = function (displayAltitude) {\n if (displayAltitude === undefined) {\n return;\n }\n this.options.displayAltitude = displayAltitude;\n this._setElevationPanel(displayAltitude);\n };\n\n /**\n * Display or hide coordinates panel\n *\n * @param {Boolean} displayCoordinates - true to display coordinates panel, false to hide it\n */\n MousePosition.prototype.displayCoordinates = function (displayCoordinates) {\n if (displayCoordinates === undefined) {\n return;\n }\n this.options.displayCoordinates = displayCoordinates;\n this._setCoordinatesPanel(displayCoordinates);\n this._setSettingsPanel(displayCoordinates);\n };\n\n /**\n * Collapse or display control main container\n *\n * @param {Boolean} collapsed - True to collapse control, False to display it\n */\n MousePosition.prototype.setCollapsed = function (collapsed) {\n if (collapsed === undefined) {\n logger.log(\"[ERROR] MousePosition:setCollapsed - missing collapsed parameter\");\n return;\n }\n if (collapsed && this.collapsed || !collapsed && !this.collapsed) {\n return;\n }\n if (!this._isDesktop) {\n document.getElementById(\"GPmapCenter\").className = collapsed ? \"\" : \"GPmapCenterVisible\";\n }\n // on simule l'ouverture du panneau après un click\n this.onShowMousePositionClick();\n this._showMousePositionContainer.checked = !collapsed;\n };\n\n // ################################################################### //\n // ######################## initialize control ####################### //\n // ################################################################### //\n\n /**\n * Initialize control (called by MousePosition constructor)\n *\n * @param {Object} options - control options (set by user)\n * @private\n */\n MousePosition.prototype._initialize = function (options) {\n // Set default options\n options = options || {};\n // {Object} control options - set by user or by default\n this.options = options;\n this.options.collapsed = options.collapsed !== undefined ? options.collapsed : true;\n /** {Boolean} specify if MousePosition control is collapsed (true) or not (false) */\n this.collapsed = this.options.collapsed;\n this.options.draggable = options.draggable !== undefined ? options.draggable : false;\n /** {Boolean} specify if MousePosition control is draggable (true) or not (false) */\n this.draggable = this.options.draggable;\n\n // position marker\n this._markerOverlay = null;\n this._markerUrl = null;\n this._markerOffset = [0, 0];\n this._hideMarker = false;\n this._initMarker(options.positionMarker);\n this.options.units = options.units || [];\n this.options.displayAltitude = options.displayAltitude !== undefined ? options.displayAltitude : true;\n this.options.displayCoordinates = options.displayCoordinates !== undefined ? options.displayCoordinates : true;\n if (this.options.displayCoordinates) {\n this.options.editCoordinates = options.editCoordinates !== undefined ? options.editCoordinates : false;\n } else {\n // si les coordonnées ne sont pas affichées : pas besoin de les éditer...\n this.options.editCoordinates = false;\n }\n this.editing = false;\n this.options.systems = options.systems || [];\n if (options.altitude) {\n var altitude = options.altitude;\n this.options.altitude = {\n triggerDelay: altitude.triggerDelay !== undefined ? altitude.triggerDelay : 200,\n responseDelay: altitude.responseDelay !== undefined ? altitude.responseDelay : 500,\n serviceOptions: altitude.serviceOptions || {},\n noDataValue: altitude.noDataValue !== undefined ? altitude.noDataValue : -99999,\n noDataValueTolerance: altitude.noDataValueTolerance !== undefined ? altitude.noDataValueTolerance : 90000\n };\n } else {\n this.options.altitude = {\n triggerDelay: 200,\n responseDelay: 500,\n serviceOptions: {}\n };\n }\n\n // identifiant du contrôle : utile pour suffixer les identifiants CSS (pour gérer le cas où il y en a plusieurs dans la même page)\n this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_10__[\"default\"].generate();\n\n // initialisation des systemes de projections\n this._projectionSystems = [];\n this._initProjectionSystems();\n\n // initialisation des systemes des unités\n this._projectionUnits = {};\n this._initProjectionUnits();\n\n // detection du support : desktop ou tactile\n this._isDesktop = _Common_Utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].detectSupport();\n\n // on met en place un seuil sur le timer\n if (this.options.altitude.triggerDelay < 100) {\n this.options.altitude.triggerDelay = 100;\n }\n\n // {Number} timer on movestopped delay (altitude calculation)\n this._timer = this.options.altitude.triggerDelay;\n\n // {Object} Selected projection system\n this._currentProjectionSystems = this._projectionSystems[0];\n\n // {String} Selected projection units typs : Geographical or metric\n this._currentProjectionType = this._projectionSystems[0].type;\n\n // {String} Selected projection unit\n this._currentProjectionUnits = this._projectionUnits[this._currentProjectionType][0].code;\n\n // {Object} Projection units container (DOM Element)\n this._projectionUnitsContainer = null;\n\n // {Object} control panel container (DOM Element)\n this._showMousePositionContainer = null;\n this._panelMousePositionContainer = null;\n this._panelHeaderMousePositionContainer = null;\n\n // gestion de l'affichage du panneau de l'altitude\n if (!this.options.displayAltitude && !this.options.displayCoordinates) {\n // on reactive l'affichage des coordonnées, pour ne pas afficher un panneau vide !\n this.options.displayCoordinates = true;\n }\n\n // listener key for event on pointermove or moveend map\n this.listenerKey = null;\n };\n\n /**\n *\n * @param {Object} option - positionMarker option\n * @private\n */\n MousePosition.prototype._initMarker = function (option) {\n if (!this.options.editCoordinates) {\n return;\n }\n if (!option) {\n this._markerUrl = _Utils_Markers__WEBPACK_IMPORTED_MODULE_9__[\"default\"][\"lightOrange\"];\n this._markerOffset = _Utils_Markers__WEBPACK_IMPORTED_MODULE_9__[\"default\"].defaultOffset;\n return;\n }\n\n // hide\n this._hideMarker = option.hide !== undefined ? option.hide : false;\n\n // offset\n if (option.offset) {\n if (Array.isArray(option.offset) && option.offset.length === 2) {\n this._markerOffset = option.offset;\n } else {\n logger.log(\"positionMarker.offset should be an array. e.g. : [0,0]\");\n this._markerOffset = _Utils_Markers__WEBPACK_IMPORTED_MODULE_9__[\"default\"].defaultOffset;\n }\n } else {\n this._markerOffset = _Utils_Markers__WEBPACK_IMPORTED_MODULE_9__[\"default\"].defaultOffset;\n }\n var url = option.url;\n if (!url) {\n this._markerUrl = _Utils_Markers__WEBPACK_IMPORTED_MODULE_9__[\"default\"][\"lightOrange\"];\n } else if (url.match(/^[a-zA-Z]+$/)) {\n // un seul mot\n this._markerUrl = _Utils_Markers__WEBPACK_IMPORTED_MODULE_9__[\"default\"][url] !== undefined ? _Utils_Markers__WEBPACK_IMPORTED_MODULE_9__[\"default\"][url] : _Utils_Markers__WEBPACK_IMPORTED_MODULE_9__[\"default\"][\"lightOrange\"];\n } else {\n this._markerUrl = url;\n }\n };\n\n /**\n * this method is called by the constructor and initialize the projection\n * systems.\n * getting coordinates in the requested projection :\n * see this.onMousePositionProjectionSystemChange()\n *\n * @private\n */\n MousePosition.prototype._initProjectionSystems = function () {\n // on donne la possibilité à l'utilisateur de modifier\n // la liste des systèmes à afficher\n // Ex. this.options.systems\n\n // FIXME doit on charger des projections par defaut dans ce composant ?\n // chargement des projections par defaut\n // CRS.loadByDefault();\n // CRS.overload();\n\n // systemes de projection disponible par defaut\n var projectionSystemsByDefault = [{\n label: \"G\\xE9ographique\",\n crs: Object(ol_proj__WEBPACK_IMPORTED_MODULE_4__[\"get\"])(\"EPSG:4326\").getCode(),\n type: \"Geographical\"\n }, {\n label: \"Web Mercator\",\n crs: Object(ol_proj__WEBPACK_IMPORTED_MODULE_4__[\"get\"])(\"EPSG:3857\").getCode(),\n type: \"Metric\"\n }, {\n label: \"Lambert 93\",\n crs: Object(ol_proj__WEBPACK_IMPORTED_MODULE_4__[\"get\"])(\"EPSG:2154\").getCode(),\n type: \"Metric\",\n geoBBox: {\n left: -9.86,\n bottom: 41.15,\n right: 10.38,\n top: 51.56\n }\n }, {\n label: \"Lambert II \\xE9tendu\",\n crs: Object(ol_proj__WEBPACK_IMPORTED_MODULE_4__[\"get\"])(\"EPSG:27572\").getCode(),\n type: \"Metric\",\n geoBBox: {\n left: -4.87,\n bottom: 42.33,\n right: 8.23,\n top: 51.14\n }\n }];\n var systems = this.options.systems;\n for (var i = 0; i < systems.length; i++) {\n /* definition d'un systeme de reference */\n var sys = systems[i];\n this.addSystem(sys);\n }\n if (this._projectionSystems.length === 0) {\n // on ajoute les systèmes de projections par défaut\n for (var j = 0; j < projectionSystemsByDefault.length; j++) {\n this.addSystem(projectionSystemsByDefault[j]);\n }\n }\n };\n\n /**\n * this method is called by the constructor and initialize the units.\n * getting coordinates in the requested units :\n * see this.onMousePositionProjectionUnitsChange()\n *\n * @private\n */\n MousePosition.prototype._initProjectionUnits = function () {\n // on donne la possibilité à l'utilisateur de modifier\n // la liste des unités à afficher\n // Ex.\n // this.options.units : [\"DEC\", \"DMS\"]\n\n // unités disponible par defaut\n var projectionUnitsByDefault = {\n Geographical: [{\n code: \"DEC\",\n label: \"degrés décimaux\",\n format: this._displayDEC\n }, {\n code: \"DMS\",\n label: \"degrés sexagésimaux\",\n format: this._displayDMS\n }, {\n code: \"RAD\",\n label: \"radians\",\n format: this._displayRAD\n }, {\n code: \"GON\",\n label: \"grades\",\n format: this._displayGON\n }],\n Metric: [{\n code: \"M\",\n label: \"mètres\",\n format: this._displayMeter\n }, {\n code: \"KM\",\n label: \"kilomètres\",\n format: this._displayKMeter\n }]\n };\n var units = this.options.units;\n for (var type in projectionUnitsByDefault) {\n if (projectionUnitsByDefault.hasOwnProperty(type)) {\n var found = false;\n for (var j = 0; j < projectionUnitsByDefault[type].length; j++) {\n var obj = projectionUnitsByDefault[type][j];\n for (var i = 0; i < units.length; i++) {\n var unit = units[i];\n if (obj.code === unit) {\n found = true;\n if (!this._projectionUnits[type]) {\n this._projectionUnits[type] = [];\n }\n this._projectionUnits[type].push(obj);\n }\n }\n }\n if (!found) {\n this._projectionUnits[type] = projectionUnitsByDefault[type];\n }\n }\n }\n\n // au cas où...\n if (_typeof(this._projectionUnits) === \"object\" && Object.keys(this._projectionUnits).length === 0) {\n this._projectionUnits = projectionUnitsByDefault;\n }\n };\n\n /**\n * this method get label from the current projection units\n *\n * @returns {String} projection information\n *\n * @private\n */\n MousePosition.prototype._getCurrentProjectionInformation = function () {\n var systemInfo = [this._currentProjectionSystems.label, \"en\"];\n var units = this._projectionUnits[this._currentProjectionType];\n for (var u = 0; u < units.length; ++u) {\n if (units[u].code === this._currentProjectionUnits) {\n systemInfo.push(units[u].label);\n break;\n }\n }\n return systemInfo.join(\" \");\n };\n\n // ################################################################### //\n // ######################## methods handle dom ####################### //\n // ################################################################### //\n\n /**\n * Create control main container (called by MousePosition constructor)\n *\n * @returns {DOMElement} DOM element\n *\n * @private\n */\n MousePosition.prototype._initContainer = function () {\n // creation du container principal\n var container = this._createMainContainerElement();\n var inputShow = this._showMousePositionContainer = this._createShowMousePositionElement();\n container.appendChild(inputShow);\n var picto = this._createShowMousePositionPictoElement(this._isDesktop);\n container.appendChild(picto);\n var panel = this._panelMousePositionContainer = this._createMousePositionPanelElement();\n var header = this._panelHeaderMousePositionContainer = this._createMousePositionPanelHeaderElement();\n panel.appendChild(header);\n var basic = this._createMousePositionPanelBasicElement(this.options.displayAltitude, this.options.displayCoordinates, this.options.editCoordinates, this._currentProjectionUnits);\n panel.appendChild(basic);\n var arraySettings = this._createShowMousePositionSettingsElement(this.options.displayCoordinates);\n for (var j = 0; j < arraySettings.length; j++) {\n panel.appendChild(arraySettings[j]);\n }\n var settings = this._createMousePositionSettingsElement();\n var systems = this._projectionSystemsContainer = this._createMousePositionSettingsSystemsElement(this._projectionSystems);\n var units = this._projectionUnitsContainer = this._createMousePositionSettingsUnitsElement(this._projectionUnits[this._currentProjectionType]);\n settings.appendChild(systems);\n settings.appendChild(units);\n panel.appendChild(settings);\n container.appendChild(panel);\n return container;\n };\n\n /**\n * this method is called by this.()\n * and it changes the elevation view panel into the dom.\n *\n * @param {Boolean} active - true:active, false:disable\n * @private\n */\n MousePosition.prototype._setElevationPanel = function (active) {\n var div = null;\n if (!active) {\n div = document.getElementById(\"GPmousePositionAltitude-\" + this._uid);\n div.style.display = \"none\";\n } else {\n div = document.getElementById(\"GPmousePositionAltitude-\" + this._uid);\n div.style.display = \"\";\n }\n };\n\n /**\n * this method is called by this.()\n * and it changes the coordinate view panel into the dom.\n *\n * @param {Boolean} active - true:active, false:disable\n * @private\n */\n MousePosition.prototype._setCoordinatesPanel = function (active) {\n var div = document.getElementById(\"GPmousePositionCoordinate-\" + this._uid);\n if (!active) {\n div.style.display = \"none\";\n } else {\n div.style.display = \"\";\n }\n };\n\n /**\n * this method is called by this.()\n * and it changes the settings view panel into the dom.\n *\n * @param {Boolean} active - true:active, false:disable\n * @private\n */\n MousePosition.prototype._setSettingsPanel = function (active) {\n var divPicto = document.getElementById(\"GPshowMousePositionSettingsPicto-\" + this._uid);\n var divPanel = document.getElementById(\"GPmousePositionSettings-\" + this._uid);\n if (!active) {\n divPicto.style.display = \"none\";\n divPanel.style.display = \"none\";\n } else {\n divPicto.style.display = \"\";\n divPanel.style.display = \"\";\n }\n };\n\n /**\n * this method is called by this.onMousePositionProjectionSystemChange()\n * when changes to a metric or a geographical units.\n *\n * @param {String} type - Geographical or Metric\n * @private\n */\n MousePosition.prototype._setTypeUnitsPanel = function (type) {\n var container = this._projectionUnitsContainer;\n\n // on supprime les enfants...\n while (container.firstChild) {\n container.removeChild(container.firstChild);\n }\n var units = this._projectionUnits[type];\n for (var j = 0; j < units.length; j++) {\n var obj = units[j];\n var option = document.createElement(\"option\");\n option.value = obj.code ? obj.code : j;\n option.text = obj.label || j;\n // option.label = obj.label;\n container.appendChild(option);\n }\n var projectionUnits = this._projectionUnits[type][0].code;\n if (this._currentProjectionUnits === \"DMS\" || projectionUnits === \"DMS\") {\n this._resetCoordinateElements(this.options.editCoordinates, type, projectionUnits);\n this._setEditMode(this.editing);\n }\n\n // le nouveau type de system ...\n this._currentProjectionType = type;\n\n // Mise a jour des elements labels et unites\n this._resetLabelElements(type);\n this._resetUnitElements(projectionUnits);\n\n // et comme on a changé de type de systeme,\n // il faut changer aussi d'unité !\n this._currentProjectionUnits = projectionUnits;\n };\n\n // ################################################################### //\n // ######################## method units format ###################### //\n // ################################################################### //\n\n /**\n * degreedecimal\n *\n * @param {Array} olCoordinate - ol.Coordinate object [lon, lat]\n * @return {Object} coordinate - coordinate object : {lat : 48, lng : 2} par exemple\n * @private\n */\n MousePosition.prototype._displayDEC = function (olCoordinate) {\n var coordinate = {};\n coordinate.lat = olCoordinate[1].toFixed(6);\n coordinate.lng = olCoordinate[0].toFixed(6);\n coordinate.unit = \"°\";\n return coordinate;\n };\n\n /**\n * degreedecimal2sexagecimal\n *\n * @param {Array} olCoordinate - ol.Coordinate object [lon, lat]\n * @return {Object} coordinate - coordinate object : {lng : \"2° 00′ 00″ E\", lat : \"48° 00′ 00″ N\"} par exemple\n * @private\n */\n MousePosition.prototype._displayDMS = function (olCoordinate) {\n return {\n lng: _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_11__[\"default\"].decimalToDMS(olCoordinate[0], \"EO\", 2),\n lat: _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_11__[\"default\"].decimalToDMS(olCoordinate[1], \"NS\", 2),\n unit: \"DMS\"\n };\n };\n\n /**\n * degreedecimal2radian\n *\n * @param {Array} olCoordinate - ol.Coordinate object [lon, lat]\n * @return {Object} coordinate - coordinate object : {lng : \"0.02837864\", lat : \"0.84300269\"} par exemple\n * @private\n */\n MousePosition.prototype._displayRAD = function (olCoordinate) {\n var coordinate = {};\n var d = 0.01745329251994329577;\n coordinate.lng = olCoordinate[0] * d;\n coordinate.lng = coordinate.lng.toFixed(8);\n coordinate.lat = olCoordinate[1] * d;\n coordinate.lat = coordinate.lat.toFixed(8);\n coordinate.unit = \"rad\";\n return coordinate;\n };\n\n /**\n * degreedecimal2grade\n *\n * @param {Array} olCoordinate - ol.Coordinate object [lon, lat]\n * @return {Object} coordinate - coordinate object : {lng : \"4.09545898\", lat : \"53.68751528\"} par exemple\n * @private\n */\n MousePosition.prototype._displayGON = function (olCoordinate) {\n var coordinate = {};\n var d = 1.11111111111111111111;\n coordinate.lng = olCoordinate[0] * d;\n coordinate.lng = coordinate.lng.toFixed(8);\n coordinate.lat = olCoordinate[1] * d;\n coordinate.lat = coordinate.lat.toFixed(8);\n coordinate.unit = \"gon\";\n return coordinate;\n };\n\n /**\n * meter\n *\n * @param {Array} olCoordinate - ol.Coordinate object [lon, lat]\n * @return {Object} coordinate - coordinate object : {x : \"148593.58\", y : \"6176560.95\"} par exemple\n * @private\n */\n MousePosition.prototype._displayMeter = function (olCoordinate) {\n // on recoit toujours des coordonnées metriques\n var coordinate = {};\n coordinate.x = olCoordinate[0].toFixed(2);\n coordinate.y = olCoordinate[1].toFixed(2);\n coordinate.unit = \"m\";\n return coordinate;\n };\n\n /**\n * kilometer\n *\n * @param {Array} olCoordinate - ol.Coordinate object [lon, lat]\n * @return {Object} coordinate - coordinate object : {x : \"214.96\", y : \"6250.09\"} par exemple\n * @private\n */\n MousePosition.prototype._displayKMeter = function (olCoordinate) {\n var coordinate = {};\n coordinate.x = (olCoordinate[0] / 1000).toFixed(2);\n coordinate.y = (olCoordinate[1] / 1000).toFixed(2);\n coordinate.unit = \"km\";\n return coordinate;\n };\n\n // ################################################################### //\n // ##################### handlers events to control ################## //\n // ################################################################### //\n\n /**\n * this sends the coordinates to the panel.\n * (cf. this.GPdisplayCoords() into the DOM functions)\n *\n * @param {Array} olCoordinate - ol.Coordinate object [lon, lat]\n * @param {Object} crs - coordinate CRS (ol.proj.Projection)\n * @private\n */\n MousePosition.prototype._setCoordinate = function (olCoordinate, crs) {\n // structure\n // ol.Coordinate\n // [\n // 4 // lon\n // 48 // lat\n // ]\n\n // structure pour les coordonnées en fonctin du type demandé :\n // {x:, y:, unit :} ou {lng :, lat :} ou {lon :, lat :} ou {e:, n:, unit :}...\n var coordinate = {};\n // on projete le point dans le systeme demandé\n var oSrs = this._currentProjectionSystems.crs;\n if (!oSrs) {\n logger.log(\"ERROR : system crs not found\");\n return;\n }\n // on reprojette les coordonnées depuis leur CRS d'origine (CRS) vers le CRS demandé (oSrs)\n olCoordinate = Object(ol_proj__WEBPACK_IMPORTED_MODULE_4__[\"transform\"])(olCoordinate, crs, oSrs);\n\n // type de systeme : Geographical ou Metric\n var type = this._currentProjectionSystems.type;\n\n // on recherche la fonction de formatage dans l'unité demandée\n var format = null;\n var units = this._projectionUnits[type];\n for (var i = 0; i < units.length; i++) {\n if (units[i].code === this._currentProjectionUnits) {\n format = units[i].format;\n break;\n }\n }\n if (!format || typeof format !== \"function\") {\n logger.log(\"WARNING : coordinates format function not found\");\n return;\n } else {\n coordinate = format(olCoordinate);\n }\n if (!coordinate || Object.keys(coordinate).length === 0) {\n return;\n }\n this.GPdisplayCoords(coordinate);\n };\n\n /**\n * this sends the coordinates to the panel.\n * (cf. this.GPdisplayElevation() into the DOM functions)\n *\n * @param {Array} olCoordinate - ol.Coordinate object [lon, lat]\n * @private\n */\n MousePosition.prototype._setElevation = function (olCoordinate) {\n // gestion du timer de la requete du service d'altitude\n var delay = this.options.altitude.responseDelay;\n var noDataValue = this.options.altitude.noDataValue;\n var noDataValueTolerance = this.options.altitude.noDataValueTolerance;\n this.GPdisplayElevation(olCoordinate, delay, noDataValue, noDataValueTolerance);\n };\n\n /**\n * this method is triggered when the mouse or the map is stopped.\n * (cf. onMouseMove and onMapMove)\n *\n * @param {Array} olCoordinate - ol.Coordinate object [lon, lat]\n * @param {Object} crs - coordinate CRS (ol.proj.Projection)\n * @private\n */\n MousePosition.prototype.onMoveStopped = function (olCoordinate, crs) {\n // reprojection en crs :84 (EPSG:4326) pour le calcul alti\n var oLatLng = Object(ol_proj__WEBPACK_IMPORTED_MODULE_4__[\"transform\"])(olCoordinate, crs, \"EPSG:4326\");\n this._setElevation(oLatLng);\n };\n\n /**\n * this method is an handler event to control. The event is 'mousemove' on\n * the map. The handler sends the coordinates to the panel.\n * (cf. this.GPdisplayCoords() into the DOM functions)\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n MousePosition.prototype.onMouseMove = function (e) {\n var self = this;\n\n // info: coordinate = [x, y]\n var coordinate = e.coordinate;\n if (!e.map || !e.map.getView()) {\n return;\n }\n var crs = e.map.getView().getProjection();\n this._setCoordinate(coordinate, crs);\n\n // calcul de l'altitude après un certain délai après l'arrêt du mouvement de la souris\n clearTimeout(this._timer);\n this._timer = setTimeout(function () {\n self.onMoveStopped(coordinate, crs);\n }, this.options.altitude.triggerDelay);\n };\n\n /**\n * this method is an handler event to control. The event is 'moveend' on\n * the map. The handler sends the coordinates to the panel.\n * (cf. this.GPdisplayCoords() into the DOM functions)\n *\n * @private\n */\n MousePosition.prototype.onMapMove = function () {\n var self = this;\n var map = this.getMap();\n if (!map || !map.getView()) {\n return;\n }\n var view = map.getView();\n var coordinate = view.getCenter();\n var crs = view.getProjection();\n this._setCoordinate(coordinate, crs);\n\n // calcul de l'altitude après un certain délai après l'arrêt du mouvement de la souris\n clearTimeout(this._timer);\n this._timer = setTimeout(function () {\n self.onMoveStopped(coordinate, crs);\n }, this.options.altitude.triggerDelay);\n };\n\n // ################################################################### //\n // ####################### handlers events to dom #################### //\n // ################################################################### //\n\n /**\n * this method is called by this.GPdisplayElevation() in the dom, and\n * it executes a request to the elevation service.\n *\n * @param {Object} coordinate - {lat :..., lng :...}\n * @param {Function} callback - callback\n * @private\n */\n MousePosition.prototype.onRequestAltitude = function (coordinate, callback) {\n // INFORMATION\n // on effectue la requête au service d'altitude...\n // on met en place des callbacks afin de recuperer les resultats ou\n // les messages d'erreurs du service.\n // le resultat est affiché dans une balise du dom.\n\n if (!coordinate || Object.keys(coordinate).length === 0) {\n return;\n }\n\n // si on ne veut pas de calcul d'altitude, on ne continue pas !\n if (!this.options.displayAltitude) {\n return;\n }\n\n // on recupere les options du service\n var options = this.options.altitude.serviceOptions || {};\n\n // gestion du protocole et du timeout\n // le timeout est indispensable sur le protocole JSONP.\n var _protocol = options.protocol || \"XHR\";\n var _timeout = options.timeOut || 0;\n if (_protocol === \"JSONP\" && _timeout === 0) {\n _timeout = 15000;\n }\n\n // format de sortie si spécifié\n var _outputFormat = options.outputFormat || \"json\";\n\n // ainsi que les coordonnées : si l'utilisateur explicite zonly false\n // cela permet d'activer l'option measures côté service d'alti (surchargée si zonly = true)\n var _zonly;\n if (options.zonly === false) {\n _zonly = options.zonly;\n } else {\n _zonly = true;\n }\n\n // récupération d'une réponse complète avec source et précision\n var _measures = options.measures || false;\n var _positions = [{\n lon: coordinate[0],\n lat: coordinate[1]\n }];\n\n // utilisation de l'ancien service\n var _oldAltiService = options.oldAltiService || true;\n\n // utilisation d'une ressource spécifique\n var _resource = options.resource;\n\n // et les callbacks\n var _scope = this;\n var _rawResponse = options.rawResponse || false;\n var _customOnSuccess = options.onSuccess || null;\n var _onSuccess = null;\n var _onFailure = null;\n if (!_rawResponse) {\n // dans le cas général\n // callback onSuccess\n _onSuccess = function _onSuccess(results) {\n if (results && Object.keys(results).length) {\n if (_customOnSuccess) {\n _customOnSuccess.call(this, results);\n }\n callback.call(this, results.elevations[0].z);\n }\n };\n } else {\n // callback onSuccess\n _onSuccess = function _onSuccess(results) {\n if (_customOnSuccess) {\n _customOnSuccess.call(this, results);\n }\n logger.log(\"alti service raw response : \", results);\n };\n }\n\n // callback onFailure\n _onFailure = function _onFailure(error) {\n logger.log(\"[getAltitude] ERROR : \" + error.message);\n };\n\n // cas où la clef API n'est pas renseignée dans les options du service,\n // on utilise celle renseignée au niveau du controle ou la clé \"calcul\" par défaut.\n var _apiKey = options.apiKey || this.options.apiKey;\n\n // si l'utilisateur a spécifié le paramètre ssl au niveau du control, on s'en sert\n // true par défaut (https)\n if (typeof options.ssl !== \"boolean\") {\n if (typeof this.options.ssl === \"boolean\") {\n options.ssl = this.options.ssl;\n } else {\n options.ssl = true;\n }\n }\n var _ssl = options.ssl;\n geoportal_access_lib__WEBPACK_IMPORTED_MODULE_5__[\"default\"].Services.getAltitude({\n apiKey: _apiKey,\n protocol: _protocol,\n ssl: _ssl,\n timeOut: _timeout,\n scope: _scope,\n outputFormat: _outputFormat,\n rawResponse: _rawResponse,\n onSuccess: _onSuccess,\n onFailure: _onFailure,\n zonly: _zonly,\n measures: _measures,\n resource: _resource,\n oldAltiService: _oldAltiService,\n positions: _positions\n });\n };\n\n /**\n * this method is called by event 'click' on 'GPshowMousePositionPicto' tag label\n * (cf. this._createShowMousePositionPictoElement),\n * and toggles event 'mousemove' on map.\n *\n * @private\n */\n MousePosition.prototype.onShowMousePositionClick = function () {\n var _this2 = this;\n // checked : true - panel close\n // checked : false - panel open\n var map = this.getMap();\n // on supprime toutes les interactions\n _Utils_Interactions__WEBPACK_IMPORTED_MODULE_8__[\"default\"].unset(map);\n this.collapsed = this._showMousePositionContainer.checked;\n // on génère nous même l'evenement OpenLayers de changement de propriété\n // (utiliser mousePosition.on(\"change:collapsed\", function(e) ) pour s'abonner à cet évènement)\n this.dispatchEvent(\"change:collapsed\");\n\n // evenement declenché à l'ouverture/fermeture du panneau,\n // et en fonction du mode : desktop ou tactile !\n if (this._showMousePositionContainer.checked) {\n Object(ol_Observable__WEBPACK_IMPORTED_MODULE_3__[\"unByKey\"])(this.listenerKey);\n } else if (!this.editing) {\n if (this._isDesktop) {\n this.listenerKey = map.on(\"pointermove\", function (e) {\n _this2.onMouseMove(e);\n });\n } else {\n this.listenerKey = map.on(\"moveend\", function (e) {\n return _this2.onMapMove(e);\n });\n // on simule un deplacement en mode tactile\n this.onMapMove();\n }\n }\n\n // FIXME\n // on gère l'affichage des panneaux ici..., même si ce n'est pas l'endroit\n // adequate...\n this._setElevationPanel(this.options.displayAltitude);\n this._setCoordinatesPanel(this.options.displayCoordinates);\n if (!this.options.displayCoordinates) {\n this._setSettingsPanel(false);\n }\n };\n\n /**\n * this method is called by event 'click' on 'GPshowMousePositionPicto' tag label\n * (cf. this._createShowMousePositionPictoElement),\n * and toggles event 'mousemove' on map.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n MousePosition.prototype.onShowMousePositionSettingsClick = function (e) {\n if (!this.draggable) {\n this._panelMousePositionContainer.style.transition = \"top 0.5s ease-out 0s\";\n this._panelMousePositionContainer.style.transitionProperty = \"top\";\n this._panelMousePositionContainer.style.transitionDuration = \"0.5s\";\n this._panelMousePositionContainer.style.transitionTimingFunction = \"ease-out\";\n this._panelMousePositionContainer.style.transitionDelay = \"0s\";\n var height = -95;\n var top = this._panelMousePositionContainer.offsetTop;\n if (!document.getElementById(e.target.htmlFor).checked) {\n this._panelMousePositionContainer.style.top = top + height + \"px\";\n } else {\n this._panelMousePositionContainer.style.top = top - height + \"px\";\n }\n }\n };\n\n /**\n * this method is called by event 'click' on input coordinate\n *\n * @param {Boolean} editing - editing mode\n */\n MousePosition.prototype.onMousePositionEditModeClick = function (editing) {\n var _this3 = this;\n if (!this.options.editCoordinates) {\n return;\n }\n if (this.editing === editing) {\n return;\n }\n this.editing = editing;\n\n // Affichage des outils, input en ecriture\n this._setEditMode(this.editing);\n var map = this.getMap();\n if (this._isDesktop) {\n if (this.editing) {\n // Unlisten for 'pointermove' events\n // map.un(\"pointermove\", (e) => { this.onMouseMove(e); });\n Object(ol_Observable__WEBPACK_IMPORTED_MODULE_3__[\"unByKey\"])(this.listenerKey);\n } else {\n // Listen for 'pointermove' events\n this.listenerKey = map.on(\"pointermove\", function (e) {\n _this3.onMouseMove(e);\n });\n // on simule un deplacement\n this.onMapMove();\n }\n } else {\n if (this.editing) {\n // Unlisten for 'moveend' events\n // map.un(\"moveend\", (e) => this.onMapMove(e));\n Object(ol_Observable__WEBPACK_IMPORTED_MODULE_3__[\"unByKey\"])(this.listenerKey);\n } else {\n // Listen for moveend' events\n this.listenerKey = map.on(\"moveend\", function (e) {\n return _this3.onMapMove(e);\n });\n // on simule un deplacement\n this.onMapMove();\n }\n }\n\n // clear _markerOverlay\n if (!this.editing && this._markerOverlay) {\n this._markerOverlay.setPosition(undefined);\n }\n };\n\n /**\n * Get coordinate from inputs and select in decimal degrees\n *\n * @param {String} coordType - \"Lon\" or \"Lat\"\n * @returns {undefined}\n * @private\n */\n MousePosition.prototype.getCoordinate = function (coordType) {\n var inputDegrees = document.getElementById(this._addUID(\"GPmousePosition\" + coordType + \"Degrees\"));\n var degrees = inputDegrees.value;\n if (!degrees) {\n return null;\n }\n degrees = degrees.replace(\",\", \".\");\n if (!_Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_11__[\"default\"].isInteger(degrees)) {\n return null;\n }\n var result = _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_11__[\"default\"].toInteger(degrees);\n if (result < Number(inputDegrees.dataset.min) || result > Number(inputDegrees.dataset.max)) {\n return null;\n }\n var direction = document.getElementById(this._addUID(\"GPmousePosition\" + coordType + \"Direction\")).value;\n var inputMinutes = document.getElementById(this._addUID(\"GPmousePosition\" + coordType + \"Minutes\"));\n var minutes = inputMinutes.value;\n if (minutes) {\n minutes = minutes.replace(\",\", \".\");\n if (_Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_11__[\"default\"].isInteger(minutes)) {\n var mins = _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_11__[\"default\"].toInteger(minutes);\n if (mins >= Number(inputMinutes.dataset.min) && mins <= Number(inputMinutes.dataset.max)) {\n result += mins / 60;\n }\n }\n }\n var inputSeconds = document.getElementById(this._addUID(\"GPmousePosition\" + coordType + \"Seconds\"));\n var seconds = inputSeconds.value;\n if (seconds) {\n seconds = seconds.replace(\",\", \".\");\n var secs = _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_11__[\"default\"].toFloat(seconds);\n if (secs && secs >= Number(inputSeconds.dataset.min) && secs <= Number(inputSeconds.dataset.max)) {\n result += secs / 3600;\n }\n }\n if (direction === \"O\" || direction === \"S\") {\n result = -result;\n }\n return result;\n };\n\n /**\n * locate DMS coordinates on map\n *\n * @private\n */\n MousePosition.prototype.locateDMSCoordinates = function () {\n var lonlat = [this.getCoordinate(\"Lon\"), this.getCoordinate(\"Lat\")];\n if (lonlat[0] === null || lonlat[1] === null) {\n return;\n }\n var oSrs = this._currentProjectionSystems.crs;\n if (!oSrs) {\n logger.log(\"ERROR : system crs not found\");\n return;\n }\n var view = this.getMap().getView();\n var coordinate = Object(ol_proj__WEBPACK_IMPORTED_MODULE_4__[\"transform\"])(lonlat, oSrs, view.getProjection());\n view.setCenter(coordinate);\n if (this._markerOverlay && !this._hideMarker) {\n this._markerOverlay.setPosition(coordinate);\n }\n };\n\n /**\n * locate coordinates on map (not DMS)\n *\n * @private\n */\n MousePosition.prototype.locateCoordinates = function () {\n var lon = document.getElementById(this._addUID(\"GPmousePositionLon\")).value;\n lon = lon.replace(\",\", \".\");\n lon = _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_11__[\"default\"].toFloat(lon);\n if (lon === null) {\n return;\n }\n var lat = document.getElementById(this._addUID(\"GPmousePositionLat\")).value;\n lat = lat.replace(\",\", \".\");\n lat = _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_11__[\"default\"].toFloat(lat);\n if (lat === null) {\n return;\n }\n var oSrs = this._currentProjectionSystems.crs;\n if (!oSrs) {\n logger.log(\"ERROR : system crs not found\");\n return;\n }\n var xy;\n if (this._currentProjectionSystems.type === \"Geographical\") {\n xy = [this.convert(lon), this.convert(lat)];\n } else {\n xy = [this.convert(lat), this.convert(lon)];\n }\n var xyWGS84 = Object(ol_proj__WEBPACK_IMPORTED_MODULE_4__[\"transform\"])(xy, this._currentProjectionSystems.crs, \"EPSG:4326\");\n var geoBBox = this._currentProjectionSystems.geoBBox;\n if (geoBBox) {\n // check if coordinates are in the extent\n var extent = [geoBBox.left, geoBBox.bottom, geoBBox.right, geoBBox.top];\n if (xyWGS84[0] < extent[0] || xyWGS84[0] > extent[2]) {\n return;\n }\n if (xyWGS84[1] < extent[1] || xyWGS84[1] > extent[3]) {\n return;\n }\n }\n var view = this.getMap().getView();\n var coordinate = Object(ol_proj__WEBPACK_IMPORTED_MODULE_4__[\"transform\"])(xy, oSrs, view.getProjection());\n view.setCenter(coordinate);\n if (this._markerOverlay && !this._hideMarker) {\n this._markerOverlay.setPosition(coordinate);\n }\n };\n\n /**\n * locate coordinates on map\n *\n * @private\n */\n MousePosition.prototype.onMousePositionEditModeLocateClick = function () {\n if (!this.options.editCoordinates) {\n return;\n }\n if (!this.editing) {\n this.onMousePositionEditModeClick(true);\n return;\n }\n if (this._currentProjectionUnits === \"DMS\") {\n this.locateDMSCoordinates();\n } else {\n this.locateCoordinates();\n }\n\n // fonction\n var mapCenterFunction = this.options.mapCenterCallback;\n\n // execution...\n if (typeof mapCenterFunction === \"function\") {\n var view = this.getMap().getView();\n var center = view.getCenter();\n mapCenterFunction.call(this, center);\n }\n };\n\n /**\n * this method is called by event 'change' on 'GPmousePositionProjectionSystem'\n * tag select (cf. this._createMousePositionSettingsElement),\n * and selects the system projection.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n MousePosition.prototype.onMousePositionProjectionSystemChange = function (e) {\n var idx = e.target.selectedIndex; // index\n var value = e.target.options[idx].value; // crs\n\n this._setCurrentSystem(value);\n };\n\n /**\n * this method selects the current system projection.\n *\n * @param {String} systemCode - inner code (rank in array _projectionSystems)\n * @private\n */\n MousePosition.prototype._setCurrentSystem = function (systemCode) {\n // si on change de type de systeme, on doit aussi changer le type d'unités !\n var type = null;\n for (var i = 0; i < this._projectionSystems.length; ++i) {\n if (this._projectionSystems[i].code === Number(systemCode)) {\n type = this._projectionSystems[i].type;\n break;\n }\n }\n if (!type) {\n logger.log(\"system not found in projection systems container\");\n return;\n }\n\n // on enregistre le systeme courant\n this._currentProjectionSystems = this._projectionSystems[Number(systemCode)];\n if (type !== this._currentProjectionType) {\n this._setTypeUnitsPanel(type);\n }\n\n // on simule un deplacement en mode tactile pour mettre à jour les\n // resultats\n if (!this._isDesktop) {\n this.onMapMove();\n }\n };\n\n /**\n * this method is called by event 'mouseover' on 'GPmousePositionProjectionSystem'\n * tag select (cf. this._createMousePositionSettingsElement),\n * and selects the system projection.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n MousePosition.prototype.onMousePositionProjectionSystemMouseOver = function (e) {\n logger.trace(e);\n\n // map infos\n var map = this.getMap();\n if (!map || !map.getView()) {\n return;\n }\n var view = map.getView();\n var crs = view.getProjection();\n var mapExtent = view.calculateExtent(map.getSize());\n\n // get extent in WGS84 coordinates\n mapExtent = Object(ol_proj__WEBPACK_IMPORTED_MODULE_4__[\"transformExtent\"])(mapExtent, crs, \"EPSG:4326\");\n\n /* clear select */\n var systemList = document.getElementById(this._addUID(\"GPmousePositionProjectionSystem\"));\n systemList.innerHTML = \"\";\n\n // add systems whose extent intersects the map extent\n for (var j = 0; j < this._projectionSystems.length; j++) {\n var proj = this._projectionSystems[j];\n var option = null;\n if (proj.geoBBox) {\n /* bboxes intersection test */\n if (mapExtent[0] > proj.geoBBox.right || mapExtent[1] > proj.geoBBox.top || mapExtent[2] < proj.geoBBox.left || mapExtent[3] < proj.geoBBox.bottom) {\n if (proj === this._currentProjectionSystems) {\n option = document.createElement(\"option\");\n option.value = proj.code;\n option.text = proj.label || j;\n option.setAttribute(\"selected\", \"selected\");\n option.setAttribute(\"disabled\", \"disabled\");\n systemList.appendChild(option);\n }\n continue; // do not intersect\n }\n }\n\n var optionElement = document.createElement(\"option\");\n optionElement.value = proj.code;\n optionElement.text = proj.label || j;\n if (proj === this._currentProjectionSystems) {\n optionElement.setAttribute(\"selected\", \"selected\");\n }\n systemList.appendChild(optionElement);\n }\n };\n\n /**\n * this method is called by event 'change' on 'GPmousePositionProjectionUnits'\n * tag select (cf. this._createMousePositionSettingsElement),\n * and selects the units projection.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n MousePosition.prototype.onMousePositionProjectionUnitsChange = function (e) {\n var idx = e.target.selectedIndex;\n var value = e.target.options[idx].value;\n var oldProjectionUnits = this._currentProjectionUnits;\n this._currentProjectionUnits = value;\n\n // Mise a jour des elements lebels et unites\n this._resetLabelElements(this._currentProjectionType);\n this._resetUnitElements(this._currentProjectionUnits);\n\n // mise a jour des inputs pour les coordonnees\n if (oldProjectionUnits === \"DMS\" || this._currentProjectionUnits === \"DMS\") {\n this._resetCoordinateElements(this.options.editCoordinates, this._currentProjectionType, this._currentProjectionUnits);\n this._setEditMode(this.editing);\n }\n\n // on simule un deplacement en mode tactile pour mettre à jour les\n // resultats\n if (!this._isDesktop) {\n this.onMapMove();\n }\n };\n\n /**\n *\n * @param {Number} value - value to convert (km to meters, radians, grades to decimal degrees)\n * @returns {undefined}\n * @private\n */\n MousePosition.prototype.convert = function (value) {\n var result;\n if (this._currentProjectionUnits === \"M\" || this._currentProjectionUnits === \"DEC\") {\n result = value;\n } else if (this._currentProjectionUnits === \"KM\") {\n result = value * 1000;\n } else if (this._currentProjectionUnits === \"RAD\") {\n var rd = (180 / Math.PI).toFixed(20);\n result = (value * rd).toFixed(20);\n } else if (this._currentProjectionUnits === \"GON\") {\n var d = (9 / 10).toFixed(20);\n result = (value * d).toFixed(20);\n }\n return result;\n };\n\n /**\n * @param {String} coordType - \"Lon\" or \"Lat\"\n * @param {String} value - input value\n *\n * @returns {Boolean} value is within extent\n *\n * @private\n */\n MousePosition.prototype.validateExtentCoordinate = function (coordType, value) {\n if ([\"Lon\", \"Lat\"].indexOf(coordType) === -1) {\n return false;\n }\n var coord = value.replace(\",\", \".\");\n coord = _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_11__[\"default\"].toFloat(coord);\n if (coord === null) {\n return false;\n }\n\n // convert depending on _currentProjectionUnits\n coord = this.convert(coord);\n var geoBBox = this._currentProjectionSystems.geoBBox;\n if (geoBBox === undefined) {\n return true;\n }\n\n // convert to current projection system\n var extent = [geoBBox.left, geoBBox.bottom, geoBBox.right, geoBBox.top];\n extent = Object(ol_proj__WEBPACK_IMPORTED_MODULE_4__[\"transformExtent\"])(extent, \"EPSG:4326\", this._currentProjectionSystems.crs);\n\n // checking if value is in the right interval\n if (coordType === \"Lat\" && (coord < extent[0] || coord > extent[2])) {\n return false;\n }\n if (coordType === \"Lon\" && (coord < extent[1] || coord > extent[3])) {\n return false;\n }\n return true;\n };\n return MousePosition;\n}(ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default.a);\n/* harmony default export */ __webpack_exports__[\"default\"] = (MousePosition);\n\n// Expose MousePosition as ol.control.MousePosition (for a build bundle)\nif (window.ol && window.ol.control) {\n window.ol.control.GeoportalMousePosition = MousePosition;\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9PcGVuTGF5ZXJzL0NvbnRyb2xzL01vdXNlUG9zaXRpb24uanM/NDViNCJdLCJuYW1lcyI6WyJsb2dnZXIiLCJMb2dnZXIiLCJnZXRMb2dnZXIiLCJNb3VzZVBvc2l0aW9uIiwiQ29udHJvbCIsIm9wdGlvbnMiLCJUeXBlRXJyb3IiLCJfaW5pdGlhbGl6ZSIsImNvbnRhaW5lciIsIl9jb250YWluZXIiLCJfaW5pdENvbnRhaW5lciIsImNhbGwiLCJlbGVtZW50IiwidGFyZ2V0IiwicmVuZGVyIiwiX19wcm90b19fIiwicHJvdG90eXBlIiwiT2JqZWN0IiwiY3JlYXRlIiwiVXRpbHMiLCJhc3NpZ24iLCJNb3VzZVBvc2l0aW9uRE9NIiwiY29uc3RydWN0b3IiLCJzZXRNYXAiLCJtYXAiLCJfdGhpcyIsImNvbnRleHQiLCJjZW50ZXIiLCJfY3JlYXRlTWFwQ2VudGVyIiwiZ2V0Vmlld3BvcnQiLCJhcHBlbmRDaGlsZCIsImNvbGxhcHNlZCIsIl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TkgOyAtMTg5OTk5XSlcbiAqICBAZXhhbXBsZVxuICogIHZhciBNb3VzZVBvc2l0aW9uID0gbmV3IG9sLmNvbnRyb2wuR2VvcG9ydGFsTW91c2VQb3NpdGlvbih7XG4gKiAgICAgIFwiY29sbGFwc2VkXCIgOiBmYWxzZSxcbiAqICAgICAgXCJncmFnZ2FibGVcIiA6IHRydWUsXG4gKiAgICAgIFwiZGlzcGxheUNvb3JkaW5hdGVzXCIgOiB0cnVlLFxuICogICAgICBcImRpc3BsYXlBbHRpdHVkZVwiIDogdHJ1ZSxcbiAqICAgICAgXCJhbHRpdHVkZVwiIDoge1xuICogICAgICAgICAgIFwidHJpZ2dlckRlbGF5XCIgOiAxMDAsXG4gKiAgICAgICAgICAgXCJyZXNwb25zZURlbGF5XCIgOiA1MDAsXG4gKiAgICAgICAgICAgXCJub0RhdGFWYWx1ZVwiIDogLTk5OTk5LFxuICogICAgICAgICAgIFwibm9EYXRhVmFsdWVUb2xlcmFuY2VcIiA6IDk5MDAwLFxuICogICAgICAgICAgIFwic2VydmljZU9wdGlvbnNcIiA6IHt9XG4gKiAgICAgIH0sXG4gKiAgICAgIFwic3lzdGVtc1wiIDogW1xuICogICAgICAge1xuICogICAgICAgICAgXCJjcnNcIiA6IFwiRVBTRzozODU3XCIsXG4gKiAgICAgICAgICBcImxhYmVsXCIgOiBcIldlYiBNZXJjYXRvclwiLFxuICogICAgICAgICAgXCJ0eXBlXCIgOiBcIk1ldHJpY1wiXG4gKiAgICAgICB9LFxuICogICAgICAge1xuICogICAgICAgICAgXCJjcnNcIiA6IFwiRVBTRzo0MzI2XCIsXG4gKiAgICAgICAgICBcImxhYmVsXCIgOiBcIkfDqW9ncmFwaGlxdWVzXCIsXG4gKiAgICAgICAgICBcInR5cGVcIiA6IFwiR2VvZ3JhcGhpY2FsXCJcbiAqICAgICAgIH0sXG4gKiAgICAgICB7XG4gKiAgICAgICAgICAgXCJsYWJlbFwiIDogXCJMYW1iZXJ0IDkzXCIsXG4gKiAgICAgICAgICAgXCJjcnNcIiA6IFwiRVBTRzoyMTU0XCIsXG4gKiAgICAgICAgICAgXCJ0eXBlXCIgOiBcIk1ldHJpY1wiLFxuICogICAgICAgICAgIFwiZ2VvQkJveFwiIDoge1xuICogICAgICAgICAgICAgICBcImxlZnRcIiA6IC05Ljg2LFxuICogICAgICAgICAgICAgICBcImJvdHRvbVwiIDogNDEuMTUsXG4gKiAgICAgICAgICAgICAgIFwicmlnaHRcIiA6IDEwLjM4LFxuICogICAgICAgICAgICAgICBcInRvcFwiIDogNTEuNTZcbiAqICAgICAgICAgICB9XG4gKiAgICAgICAgfVxuICogICAgICBdLFxuICogICAgICBcInVuaXRzXCIgOiBbXCJERUNcIiwgXCJETVNcIl1cbiAqIH0pO1xuICovXG52YXIgTW91c2VQb3NpdGlvbiA9IChmdW5jdGlvbiAoQ29udHJvbCkge1xuICAgIC8qKlxuICAgICAqIFNlZSB7QGxpbmsgb2wuY29udHJvbC5HZW9wb3J0YWxNb3VzZVBvc2l0aW9ufVxuICAgICAqIEBtb2R1bGUgTW91c2VQb3NpdGlvblxuICAgICAqIEBhbGlhcyBtb2R1bGU6fkNvbnRyb2xzL01vdXNlUG9zaXRpb25cbiAgICAgKiBAcGFyYW0geyp9IG9wdGlvbnMgLSBvcHRpb25zXG4gICAgICogQGV4YW1wbGVcbiAgICAgKiBpbXBvcnQgR2VvcG9ydGFsTW91c2VQb3NpdGlvbiBmcm9tIFwic3JjL09wZW5MYXllcnMvQ29udHJvbHMvTW91c2VQb3NpdGlvblwiXG4gICAgICovXG4gICAgZnVuY3Rpb24gTW91c2VQb3NpdGlvbiAob3B0aW9ucykge1xuICAgICAgICBvcHRpb25zID0gb3B0aW9ucyB8fCB7fTtcblxuICAgICAgICBpZiAoISh0aGlzIGluc3RhbmNlb2YgTW91c2VQb3NpdGlvbikpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXCJFUlJPUiBDTEFTU19DT05TVFJVQ1RPUlwiKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIGluaXQgUHJvajQgZGVmcyBtYW51YWxseVxuICAgICAgICAvLyBSZWdpc3Rlci5sb2FkKFByb2o0KTtcbiAgICAgICAgLy8gdHJ5IHtcbiAgICAgICAgLy8gICAgIHJlZ2lzdGVyKFByb2o0KTtcbiAgICAgICAgLy8gfSBjYXRjaCAoZSkge31cblxuICAgICAgICB0aGlzLl9pbml0aWFsaXplKG9wdGlvbnMpO1xuXG4gICAgICAgIC8vIGluaXQgY29udHJvbCBET00gY29udGFpbmVyXG4gICAgICAgIHZhciBjb250YWluZXIgPSB0aGlzLl9jb250YWluZXIgPSB0aGlzLl9pbml0Q29udGFpbmVyKG9wdGlvbnMpO1xuXG4gICAgICAgIC8vIGNhbGwgb2wuY29udHJvbC5Db250cm9sIGNvbnN0cnVjdG9yXG4gICAgICAgIENvbnRyb2wuY2FsbCh0aGlzLCB7XG4gICAgICAgICAgICBlbGVtZW50IDogY29udGFpbmVyLFxuICAgICAgICAgICAgdGFyZ2V0IDogb3B0aW9ucy50YXJnZXQsXG4gICAgICAgICAgICByZW5kZXIgOiBvcHRpb25zLnJlbmRlclxuICAgICAgICB9KTtcbiAgICB9O1xuXG4gICAgLy8gSW5oZXJpdHMgZnJvbSBvbC5jb250cm9sLkNvbnRyb2xcbiAgICBpZiAoQ29udHJvbCkgTW91c2VQb3NpdGlvbi5fX3Byb3RvX18gPSBDb250cm9sO1xuXG4gICAgLyoqXG4gICAgICogQGxlbmRzIG1vZHVsZTpHZW9wb3J0YWxNb3VzZVBvc2l0aW9uXG4gICAgICovXG4gICAgTW91c2VQb3NpdGlvbi5wcm90b3R5cGUgPSBPYmplY3QuY3JlYXRlKENvbnRyb2wucHJvdG90eXBlLCB7fSk7XG5cbiAgICAvLyBvbiByw6ljdXDDqHJlIGxlcyBtw6l0aG9kZXMgZGUgbGEgY2xhc3NlIGNvbW11bmUgTW91c2VQb3NpdGlvbkRPTVxuICAgIFV0aWxzLmFzc2l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0aGlzLl9wYW5lbE1vdXNlUG9zaXRpb25Db250YWluZXIsXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3BhbmVsSGVhZGVyTW91c2VQb3NpdGlvbkNvbnRhaW5lcixcbiAgICAgICAgICAgICAgICAgICAgbWFwLmdldFRhcmdldEVsZW1lbnQoKVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIG9uIG1ldCBlbiBwbGFjZSBsJ2V2ZW5lbWVudCBzdXIgbGEgY2FydGUgcG91ciByZWN1cGVyZXIgbGVzIGNvb3Jkb25uw6llcyxcbiAgICAgICAgICAgIC8vIG9uIGwnYWN0aXZlIMOgIGwnb3V2ZXJ0dXJlIGR1IHBhbm5lYXUgdW5pcXVlbWVudCAhXG4gICAgICAgICAgICBpZiAoIXRoaXMuY29sbGFwc2VkKSB7XG4gICAgICAgICAgICAgICAgLy8gZXZlbmVtZW50IHZhbGFibGUgcG91ciBsZSBtb2RlIGRlc2t0b3AgIVxuICAgICAgICAgICAgICAgIGlmICh0aGlzLl9pc0Rlc2t0b3ApIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5saXN0ZW5lcktleSA9IG1hcC5vbihcbiAgICAgICAgICAgICAgICAgICAgICAgIFwicG9pbnRlcm1vdmVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIChlKSA9PiB7IHRoaXMub25Nb3VzZU1vdmUoZSk7IH1cbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmxpc3RlbmVyS2V5ID0gbWFwLm9uKFxuICAgICAgICAgICAgICAgICAgICAgICAgXCJtb3ZlZW5kXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAoZSkgPT4gdGhpcy5vbk1hcE1vdmUoZSlcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIGFkZCBvdmVybGF5IG9ubHkgaWYgb3B0aW9uIGVkaXRDb29yZGluYXRlcyBpcyB0cnVlXG4gICAgICAgICAgICBpZiAodGhpcy5vcHRpb25zLmVkaXRDb29yZGluYXRlcykge1xuICAgICAgICAgICAgICAgIC8vIGNyw6lhdGlvbiBkZSBsJ8OpbMOpbWVudCBET01cbiAgICAgICAgICAgICAgICB2YXIgbWFya2VyRGl2ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImltZ1wiKTtcbiAgICAgICAgICAgICAgICBtYXJrZXJEaXYuaWQgPSB0aGlzLl9hZGRVSUQoXCJHUG1vdXNlUG9zaXRpb25NYXJrZXJcIik7XG4gICAgICAgICAgICAgICAgbWFya2VyRGl2LnNyYyA9IHRoaXMuX21hcmtlclVybDtcbiAgICAgICAgICAgICAgICBtYXJrZXJEaXYudGl0bGUgPSBcIkNsaXF1ZXIgcG91ciBzdXBwcmltZXJcIjtcbiAgICAgICAgICAgICAgICBtYXJrZXJEaXYuYWRkRXZlbnRMaXN0ZW5lcihcImNsaWNrXCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgY29udGV4dC5fbWFya2VyT3ZlcmxheS5zZXRQb3NpdGlvbih1bmRlZmluZWQpO1xuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgdGhpcy5fbWFya2VyT3ZlcmxheSA9IG5ldyBPdmVybGF5KHtcbiAgICAgICAgICAgICAgICAgICAgb2Zmc2V0IDogdGhpcy5fbWFya2VyT2Zmc2V0LFxuICAgICAgICAgICAgICAgICAgICBlbGVtZW50IDogbWFya2VyRGl2LFxuICAgICAgICAgICAgICAgICAgICBzdG9wRXZlbnQgOiBmYWxzZVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIG1hcC5hZGRPdmVybGF5KHRoaXMuX21hcmtlck92ZXJsYXkpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc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3RlbXNbaV07XG4gICAgICAgICAgICBpZiAoc3lzdGVtQ3JzID09PSBwcm9qLmNycykge1xuICAgICAgICAgICAgICAgIHN5c3RlbUNvZGUgPSBwcm9qLmNvZGU7XG4gICAgICAgICAgICAgICAgLy8gcmVtb3ZlIHN5c3RlbSBmcm9tIGNvbnRyb2wgcHJvamVjdGlvbiBzeXN0ZW1zIGxpc3RcbiAgICAgICAgICAgICAgICB0aGlzLl9wcm9qZWN0aW9uU3lzdGVtcy5zcGxpY2UoaSwgMSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoc3lzdGVtQ29kZSA9PSBudWxsKSB7XG4gICAgICAgICAgICBsb2dnZXIubG9nKFwiW1dBUk5dIE1vdXNlUG9zaXRpb246cmVtb3ZlU3lzdGVtIC0gc3lzdGVtIG5vdCBmb3VuZFwiKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIC8qIHJlLWluaXRpYWxpemF0aW9uIG9mIGNvZGVzICovXG4gICAgICAgIHZhciBvbGROZXdDb2RlTWFwID0gW107XG5cbiAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCB0aGlzLl9wcm9qZWN0aW9uU3lzdGVtcy5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgb2xkTmV3Q29kZU1hcFtOdW1iZXIodGhpcy5fcHJvamVjdGlvblN5c3RlbXNbal0uY29kZSldID0gajtcbiAgICAgICAgICAgIHRoaXMuX3Byb2plY3Rpb25TeXN0ZW1zW2pdLmNvZGUgPSBqO1xuICAgICAgICB9XG5cbiAgICAgICAgLyogZmluZCBzeXN0ZW0gaW4gY29udHJvbCBjb250YWluZXIgc3lzdGVtcyBsaXN0ICovXG4gICAgICAgIHZhciBpbmRleENoaWxkVG9SZW1vdmUgPSBudWxsO1xuXG4gICAgICAgIGZvciAodmFyIGsgPSAwOyBrIDwgc3lzdGVtTGlzdC5jaG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2VvZ3JhcGhpY2FsXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgbGFiZWwgOiBcIldlYiBNZXJjYXRvclwiLFxuICAgICAgICAgICAgY3JzIDogb2xHZXRQcm9qKFwiRVBTRzozODU3XCIpLmdldENvZGUoKSxcbiAgICAgICAgICAgIHR5cGUgOiBcIk1ldHJpY1wiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIGxhYmVsIDogXCJMYW1iZXJ0IDkzXCIsXG4gICAgICAgICAgICBjcnMgOiBvbEdldFByb2ooXCJFUFNHOjIxNTRcIikuZ2V0Q29kZSgpLFxuICAgICAgICAgICAgdHlwZSA6IFwiTWV0cmljXCIsXG4gICAgICAgICAgICBnZW9CQm94IDoge1xuICAgICAgICAgICAgICAgIGxlZnQgOiAtOS44NixcbiAgICAgICAgICAgICAgICBib3R0b20gOiA0MS4xNSxcbiAgICAgICAgICAgICAgICByaWdodCA6IDEwLjM4LFxuICAgICAgICAgICAgICAgIHRvcCA6IDUxLjU2XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIGxhYmVsIDogXCJMYW1iZXJ0IElJIFxcdTAwZTl0ZW5kdVwiLFxuICAgICAgICAgICAgY3JzIDogb2xHZXRQcm9qKFwiRVBTRzoyNzU3MlwiKS5nZXRDb2RlKCksXG4gICAgICAgICAgICB0eXBlIDogXCJNZXRyaWNcIixcbiAgICAgICAgICAgIGdlb0JCb3ggOiB7XG4gICAgICAgICAgICAgICAgbGVmdCA6IC00Ljg3LFxuICAgICAgICAgICAgICAgIGJvdHRvbSA6IDQyLjMzLFxuICAgICAgICAgICAgICAgIHJpZ2h0IDogOC4yMyxcbiAgICAgICAgICAgICAgICB0b3AgOiA1MS4xNFxuICAgICAgICAgICAgfVxuICAgICAgICB9XTtcblxuICAgICAgICB2YXIgc3lzdGVtcyA9IHRoaXMub3B0aW9ucy5zeXN0ZW1zO1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHN5c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GlzdGUgZGVzIHVuaXTDqXMgw6AgYWZmaWNoZXJcbiAgICAgICAgLy8gRXguXG4gICAgICAgIC8vIHRoaXMub3B0aW9ucy51bml0cyA6IFtcIkRFQ1wiLCBcIkRNU1wiXVxuXG4gICAgICAgIC8vIHVuaXTDqXMgZGlzcG9uaWJsZSBwYXIgZGVmYXV0XG4gICAgICAgIHZhciBwcm9qZWN0aW9uVW5pdHNCeURlZmF1bHQgPSB7XG4gICAgICAgICAgICBHZW9ncmFwaGljYWwgOiBbe1xuICAgICAgICAgICAgICAgIGNvZGUgOiBcIkRFQ1wiLFxuICAgICAgICAgICAgICAgIGxhYmVsIDogXCJkZWdyw6lzIGTDqWNpbWF1eFwiLFxuICAgICAgICAgICAgICAgIGZvcm1hdCA6IHRoaXMuX2Rpc3BsYXlERUNcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBjb2RlIDogXCJETVNcIixcbiAgICAgICAgICAgICAgICBsYWJlbCA6IFwiZGVncsOpcyBzZXhhZ8Opc2ltYXV4XCIsXG4gICAgICAgICAgICAgICAgZm9ybWF0IDogdGhpcy5fZGlzcGxheURNU1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGNvZGUgOiBcIlJBRFwiLFxuICAgICAgICAgICAgICAgIGxhYmVsIDogXCJyYWRpYW5zXCIsXG4gICAgICAgICAgICAgICAgZm9ybWF0IDogdGhpcy5fZGlzcGxheVJBRFxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGNvZGUgOiBcIkdPTlwiLFxuICAgICAgICAgICAgICAgIGxhYmVsIDogXCJncmFkZXNcIixcbiAgICAgICAgICAgICAgICBmb3JtYXQgOiB0aGlzLl9kaXNwbGF5R09OXG4gICAgICAgICAgICB9XSxcbiAgICAgICAgICAgIE1ldHJpYyA6IFt7XG4gICAgICAgICAgICAgICAgY29kZSA6IFwiTVwiLFxuICAgICAgICAgICAgICAgIGxhYmVsIDogXCJtw6h0cmVzXCIsXG4gICAgICAgICAgICAgICAgZm9ybWF0IDogdGhpcy5fZGlzcGxheU1ldGVyXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgY29kZSA6IFwiS01cIixcbiAgICAgICAgICAgICAgICBsYWJlbCA6IFwia2lsb23DqHRyZXNcIixcbiAgICAgICAgICAgICAgICBmb3JtYXQgOiB0aGlzLl9kaXNwbGF5S01ldGVyXG4gICAgICAgICAgICB9XVxuICAgICAgICB9O1xuXG4gICAgICAgIHZhciB1bml0cyA9IHRoaXMub3B0aW9ucy51bml0cztcblxuICAgICAgICBmb3IgKHZhciB0eXBlIGluIHByb2plY3Rpb25Vbml0c0J5RGVmYXVsdCkge1xuICAgICAgICAgICAgaWYgKHByb2plY3Rpb25Vbml0c0J5RGVmYXVsdC5oYXNPd25Qcm9wZXJ0eSh0eXBlKSkge1xuICAgICAgICAgICAgICAgIHZhciBmb3VuZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgcHJvamVjdGlvblVuaXRzQnlEZWZhdWx0W3R5cGVdLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBvYmogPSBwcm9qZWN0aW9uVW5pdHNCeURlZmF1bHRbdHlwZV1bal07XG4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdW5pdHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB1bml0ID0gdW5pdHNbaV07XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAob2JqLmNvZGUgPT09IHVuaXQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3VuZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCF0aGlzLl9wcm9qZWN0aW9uVW5pdHNbdHlwZV0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fcHJvamVjdGlvblVuaXRzW3R5cGVdID0gW107XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3Byb2plY3Rpb25Vbml0c1t0eXBlXS5wdXNoKG9iaik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKCFmb3VuZCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9wcm9qZWN0aW9uVW5pdHNbdHlwZV0gPSBwcm9qZWN0aW9uVW5pdHNCeURlZmF1bHRbdHlwZV07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gYXUgY2FzIG/DuS4uLlxuICAgICAgICBpZiAodHlwZW9mIHRoaXMuX3Byb2plY3Rpb25Vbml0cyA9PT0gXCJvYmplY3RcIiAmJiBPYmplY3Qua2V5cyh0aGlzLl9wcm9qZWN0aW9uVW5pdHMpLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgdGhpcy5fcHJvamVjdGlvblVuaXRzID0gcHJvamVjdGlvblVuaXRzQnlEZWZhdWx0O1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIHRoaXMgbWV0aG9kIGdldCBsYWJlbCBmcm9tIHRoZSBjdXJyZW50IHByb2plY3Rpb24gdW5pdHNcbiAgICAgKlxuICAgICAqIEByZXR1cm5zIHtTdHJpbmd9IHByb2plY3Rpb24gaW5mb3JtYXRpb25cbiAgICAgKlxuICAgICAqIEBwcml2YXRlXG4gICAgICovXG4gICAgTW91c2VQb3NpdGlvbi5wcm90b3R5cGUuX2dldEN1cnJlbnRQcm9qZWN0aW9uSW5mb3JtYXRpb24gPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciBzeXN0ZW1JbmZvID0gW1xuICAgICAgICAgICAgdGhpcy5fY3VycmVudFByb2plY3Rp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AgICAgICBpZiAodHlwZW9mIG9wdGlvbnMuc3NsICE9PSBcImJvb2xlYW5cIikge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiB0aGlzLm9wdGlvbnMuc3NsID09PSBcImJvb2xlYW5cIikge1xuICAgICAgICAgICAgICAgIG9wdGlvbnMuc3NsID0gdGhpcy5vcHRpb25zLnNzbDtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgb3B0aW9ucy5zc2wgPSB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHZhciBfc3NsID0gb3B0aW9ucy5zc2w7XG5cbiAgICAgICAgR3AuU2VydmljZXMuZ2V0QWx0aXR1ZGUoe1xuICAgICAgICAgICAgYXBpS2V5IDogX2FwaUtleSxcbiAgICAgICAgICAgIHByb3RvY29sIDogX3Byb3RvY29sLFxuICAgICAgICAgICAgc3NsIDogX3NzbCxcbiAgICAgICAgICAgIHRpbWVPdXQgOiBfdGltZW91dCxcbiAgICAgICAgICAgIHNjb3BlIDogX3Njb3BlLFxuICAgICAgICAgICAgb3V0cHV0Rm9ybWF0IDogX291dHB1dEZvcm1hdCxcbiAgICAgICAgICAgIHJhd1Jlc3BvbnNlIDogX3Jhd1Jlc3BvbnNlLFxuICAgICAgICAgICAgb25TdWNjZXNzIDogX29uU3VjY2VzcyxcbiAgICAgICAgICAgIG9uRmFpbHVyZSA6IF9vbkZhaWx1cmUsXG4gICAgICAgICAgICB6b25seSA6IF96b25seSxcbiAgICAgICAgICAgIG1lYXN1cmVzIDogX21lYXN1cmVzLFxuICAgICAgICAgICAgcmVzb3VyY2UgOiBfcmVzb3VyY2UsXG4gICAgICAgICAgICBvbGRBbHRpU2VydmljZSA6IF9vbGRBbHRpU2VydmljZSxcbiAgICAgICAgICAgIHBvc2l0aW9ucyA6IF9wb3NpdGlvbnNcbiAgICAgICAgfSk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIHRoaXMgbWV0aG9kIGlzIG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biAgICAgICAgaWYgKHRoaXMuZWRpdGluZyA9PT0gZWRpdGluZykge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5lZGl0aW5nID0gZWRpdGluZztcblxuICAgICAgICAvLyBBZmZpY2hhZ2UgZGVzIG91dGlscywgaW5wdXQgZW4gZWNyaXR1cmVcbiAgICAgICAgdGhpcy5fc2V0RWRpdE1vZGUodGhpcy5lZGl0aW5nKTtcblxuICAgICAgICB2YXIgbWFwID0gdGhpcy5nZXRNYXAoKTtcbiAgICAgICAgaWYgKHRoaXMuX2lzRGVza3RvcCkge1xuICAgICAgICAgICAgaWYgKHRoaXMuZWRpdGluZykgeyAvLyBVbmxpc3RlbiBmb3IgJ3BvaW50ZXJtb3ZlJyBldmVudHNcbiAgICAgICAgICAgICAgICAvLyBtYXAudW4oXCJwb2ludGVybW92ZVwiLCAoZSkgPT4geyB0aGlzLm9uTW91c2VNb3ZlKGUpOyB9KTtcbiAgICAgICAgICAgICAgICBvbE9ic2VydmFibGVVbkJ5S2V5KHRoaXMubGlzdGVuZXJLZXkpO1xuICAgICAgICAgICAgfSBlbHNlIHsgLy8gTGlzdGVuIGZvciAncG9pbnRlcm1vdmUnIGV2ZW50c1xuICAgICAgICAgICAgICAgIHRoaXMubGlzdGVuZXJLZXkgPSBtYXAub24oXCJwb2ludGVybW92ZVwiLCAoZSkgPT4geyB0aGlzLm9uTW91c2VNb3ZlKGUpOyB9KTtcbiAgICAgICAgICAgICAgICAvLyBvbiBzaW11bGUgdW4gZGVwbGFjZW1lbnRcbiAgICAgICAgICAgICAgICB0aGlzLm9uTWFwTW92ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKHRoaXMuZWRpdGluZykgeyAvLyBVbmxpc3RlbiBmb3IgJ21vdmVlbmQnIGV2ZW50c1xuICAgICAgICAgICAgICAgIC8vIG1hcC51bihcIm1vdmVlbmRcIiwgKG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V0gPiBwcm9qLmdlb0JCb3gudG9wIHx8XG4gICAgICAgICAgICAgICAgICAgIG1hcEV4dGVudFsyXSA8IHByb2ouZ2VvQkJveC5sZWZ0IHx8XG4gICAgICAgICAgICAgICAgICAgIG1hcEV4dGVudFszXSA8IHByb2ouZ2VvQkJveC5ib3R0b21cbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHByb2ogPT09IHRoaXMuX2N1cnJlbnRQcm9qZWN0aW9uU3lzdGVtcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9uID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcIm9wdGlvblwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbi52YWx1ZSA9IHByb2ouY29kZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbi50ZXh0ID0gcHJvai5sYWJlbCB8fCBqO1xuICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9uLnNldEF0dHJpYnV0ZShcInNlbGVjdGVkXCIsIFwic2VsZWN0ZWRcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb24uc2V0QXR0cmlidXRlKFwiZGlzYWJsZWRcIiwgXCJkaXNhYmxlZFwiKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgc3lzdGVtTGlzdC5hcHBlbmRDaGlsZChvcHRpb24pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOyAvLyBkbyBub3QgaW50ZXJzZWN0XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgb3B0aW9uRWxlbWVudCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoXCJvcHRpb25cIik7XG4gICAgICAgICAgICBvcHRpb25FbGVtZW50LnZhbHVlID0gcHJvai5jb2RlO1xuICAgICAgICAgICAgb3B0aW9uRWxlbWVudC50ZXh0ID0gcHJ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GlzLl9jdXJyZW50UHJvamVjdGlvblN5c3RlbXMuY3JzKTtcblxuICAgICAgICAvLyBjaGVja2luZyBpZiB2YWx1ZSBpcyBpbiB0aGUgcmlnaHQgaW50ZXJ2YWxcbiAgICAgICAgaWYgKGNvb3JkVHlwZSA9PT0gXCJMYXRcIiAmJiAoY29vcmQgPCBleHRlbnRbMF0gfHwgY29vcmQgPiBleHRlbnRbMl0pKSB7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGNvb3JkVHlwZSA9PT0gXCJMb25cIiAmJiAoY29vcmQgPCBleHRlbnRbMV0gfHwgY29vcmQgPiBleHRlbnRbM10pKSB7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9O1xuXG4gICAgcmV0dXJuIE1vdXNlUG9zaXRpb247XG59KENvbnRyb2wpKTtcblxuZXhwb3J0IGRlZmF1bHQgTW91c2VQb3NpdGlvbjtcblxuLy8gRXhwb3NlIE1vdXNlUG9zaXRpb24gYXMgb2wuY29udHJvbC5Nb3VzZVBvc2l0aW9uIChmb3IgYSBidWlsZCBidW5kbGUpXG5pZiAod2luZG93Lm9sICYmIHdpbmRvdy5vbC5jb250cm9sKSB7XG4gICAgd2luZG93Lm9sLmNvbnRyb2wuR2VvcG9ydGFsTW91c2VQb3NpdGlvbiA9IE1vdXNlUG9zaXRpb247XG59XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/OpenLayers/Controls/MousePosition.js\n"); /***/ }), @@ -2541,7 +2553,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CSS /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CSS_Controls_ReverseGeocoding_GPreverseGeocodingOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../CSS/Controls/ReverseGeocoding/GPreverseGeocodingOpenLayers.css */ \"./src/OpenLayers/CSS/Controls/ReverseGeocoding/GPreverseGeocodingOpenLayers.css\");\n/* harmony import */ var _CSS_Controls_ReverseGeocoding_GPreverseGeocodingOpenLayers_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_ReverseGeocoding_GPreverseGeocodingOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ol/control/Control */ \"ol/control/Control\");\n/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_control_Control__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ol/Overlay */ \"ol/Overlay\");\n/* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ol_Overlay__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var ol_Collection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ol/Collection */ \"ol/Collection\");\n/* harmony import */ var ol_Collection__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ol_Collection__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var ol_Feature__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ol/Feature */ \"ol/Feature\");\n/* harmony import */ var ol_Feature__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(ol_Feature__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ol/style */ \"ol/style\");\n/* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(ol_style__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var ol_geom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ol/geom */ \"ol/geom\");\n/* harmony import */ var ol_geom__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(ol_geom__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var ol_interaction__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ol/interaction */ \"ol/interaction\");\n/* harmony import */ var ol_interaction__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(ol_interaction__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var ol_events_condition__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ol/events/condition */ \"ol/events/condition\");\n/* harmony import */ var ol_events_condition__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(ol_events_condition__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ol/proj */ \"ol/proj\");\n/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(ol_proj__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ol/layer/Vector */ \"ol/layer/Vector\");\n/* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(ol_layer_Vector__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var ol_source_Vector__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ol/source/Vector */ \"ol/source/Vector\");\n/* harmony import */ var ol_source_Vector__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(ol_source_Vector__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! geoportal-access-lib */ \"./node_modules/geoportal-access-lib/src/Gp.js\");\n/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Common/Utils */ \"./src/Common/Utils.js\");\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../Common/Utils/SelectorID */ \"./src/Common/Utils/SelectorID.js\");\n/* harmony import */ var _Utils_Markers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Utils/Markers */ \"./src/OpenLayers/Controls/Utils/Markers.js\");\n/* harmony import */ var _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../Common/Utils/Draggable */ \"./src/Common/Utils/Draggable.js\");\n/* harmony import */ var _Utils_Interactions__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Utils/Interactions */ \"./src/OpenLayers/Controls/Utils/Interactions.js\");\n/* harmony import */ var _LayerSwitcher__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./LayerSwitcher */ \"./src/OpenLayers/Controls/LayerSwitcher.js\");\n/* harmony import */ var _Common_Controls_ReverseGeocodingDOM__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../Common/Controls/ReverseGeocodingDOM */ \"./src/Common/Controls/ReverseGeocodingDOM.js\");\n// import CSS\n\n// import OpenLayers\n\n\n\n\n\n\n\n\n\n\n\n// import geoportal library access\n\n// import local\n\n\n\n\n\n\n// import local with ol dependencies\n\n// DOM\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_14__[\"default\"].getLogger(\"reversegeocoding\");\n\n/**\n * @classdesc\n *\n * ReverseGeocode Control.\n *\n * @constructor\n * @alias ol.control.ReverseGeocode\n * @type {ol.control.ReverseGeocode}\n * @extends {ol.control.Control}\n * @param {Object} options - ReverseGeocode control options\n * @param {String} [options.apiKey] - API key for services call (reverse geocode service). The key \"calcul\" is used by default.\n * @param {String} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol)\n * @param {Boolean} [options.collapsed = true] - Specify if widget has to be collapsed (true) or not (false) on map loading. Default is true.\n * @param {Boolean} [options.draggable = false] - Specify if widget is draggable\n * @param {Object} [options.resources = [\"StreetAddress\", \"PositionOfInterest\", \"CadastralParcel\"]] - resources for geocoding, by default : [\"StreetAddress\", \"PositionOfInterest\", \"CadastralParcel\"]. Possible values are : \"StreetAddress\", \"PositionOfInterest\", \"CadastralParcel\". Resources will be displayed in the same order in widget list.\n * @param {Object} [options.delimitations = [\"Point\", \"Circle\", \"Extent\"]] - delimitations for reverse geocoding, by default : [\"Point\", \"Circle\", \"Extent\"]. Possible values are : \"Point\", \"Circle\", \"Extent\". Delimitations will be displayed in the same order in widget list.\n * @param {Object} [options.reverseGeocodeOptions = {}] - reverse geocode service options. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~reverseGeocode Gp.Services.reverseGeocode()} to know all reverse geocode options.\n * @param {Object} [options.layerDescription = {}] - Layer informations to be displayed in LayerSwitcher widget (only if a LayerSwitcher is also added to the map)\n * @param {String} [options.layerDescription.title = \"Saisie (recherche inverse)\"] - Layer title to be displayed in LayerSwitcher\n * @param {String} [options.layerDescription.description = \"Couche de saisie d'une zone de recherche pour la recherche inverse\"] - Layer description to be displayed in LayerSwitcher\n * @fires reversegeocode:compute\n * @fires reversegeocode:onclickresult\n * @example\n * var iso = ol.control.ReverseGeocode({\n * \"collapsed\" : false,\n * \"draggable\" : true,\n * \"resources\" : [\"StreetAddress\", \"PositionOfInterest\"],\n * \"delimitations\" : [\"Point\", \"Circle\"],\n * \"reverseGeocodeOptions\" : {}\n * });\n */\nvar ReverseGeocode = function (Control) {\n /**\n * See {@link ol.control.ReverseGeocode}\n * @module ReverseGeocode\n * @alias module:~Controls/ReverseGeocode\n * @param {*} options - options\n * @example\n * import ReverseGeocode from \"src/OpenLayers/Controls/ReverseGeocode\"\n */\n function ReverseGeocode(options) {\n options = options || {};\n if (!(this instanceof ReverseGeocode)) {\n throw new TypeError(\"ERROR CLASS_CONSTRUCTOR\");\n }\n\n // initialisation du composant\n this.initialize(options);\n\n // Widget main DOM container\n this._container = this._initContainer();\n this._containerElement = null;\n\n // on peut éventuellement encapsuler le composant dans une div passée par l'utilisateur\n if (options.element && options.element.appendChild) {\n // dans ce cas on stocke les deux container\n options.element.appendChild(this._container);\n this._containerElement = options.element;\n }\n\n // call ol.control.Control constructor\n Control.call(this, {\n element: this._containerElement || this._container,\n target: options.target,\n render: options.render\n });\n }\n ;\n\n // Inherits from ol.control.Control\n if (Control) ReverseGeocode.__proto__ = Control;\n\n /**\n * @lends module:ReverseGeocode\n */\n ReverseGeocode.prototype = Object.create(Control.prototype, {});\n\n // on récupère les méthodes de la classe commune ReverseGeocodingDOM\n _Common_Utils__WEBPACK_IMPORTED_MODULE_13__[\"default\"].assign(ReverseGeocode.prototype, _Common_Controls_ReverseGeocodingDOM__WEBPACK_IMPORTED_MODULE_20__[\"default\"]);\n\n /**\n * Constructor (alias)\n *\n * @private\n */\n ReverseGeocode.prototype.constructor = ReverseGeocode;\n\n // ################################################################### //\n // ############## public methods (getters, setters) ################## //\n // ################################################################### //\n\n /**\n * Returns true if widget is collapsed (minimized), false otherwise\n *\n * @returns {Boolean} collapsed - true if widget is collapsed\n */\n ReverseGeocode.prototype.getCollapsed = function () {\n return this.collapsed;\n };\n\n /**\n * Collapse or display widget main container\n *\n * @param {Boolean} collapsed - True to collapse widget, False to display it\n */\n ReverseGeocode.prototype.setCollapsed = function (collapsed) {\n if (collapsed === undefined) {\n logger.log(\"[ERROR] ReverseGeocode:setCollapsed - missing collapsed parameter\");\n return;\n }\n if (collapsed && this.collapsed || !collapsed && !this.collapsed) {\n return;\n }\n if (collapsed) {\n document.getElementById(\"GPreverseGeocodingPanelClose-\" + this._uid).click();\n } else {\n document.getElementById(\"GPshowReverseGeocoding-\" + this._uid).click();\n }\n this.collapsed = collapsed;\n };\n\n /**\n * Overwrite OpenLayers setMap method\n *\n * @param {ol.Map} map - Map.\n */\n ReverseGeocode.prototype.setMap = function (map) {\n if (map) {\n // lors de l'ajout à la map, on active la saisie du point ou de la zone de recherche sur la carte,\n // mais seulement si le widget est ouvert\n this._activateMapInteraction(map);\n\n // mode \"draggable\"\n if (this.draggable) {\n _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_17__[\"default\"].dragElement(this._panelContainer, this._panelHeaderContainer, map.getTargetElement());\n }\n } else {\n var _map = this.getMap();\n // on remet à zéro = on efface les géométries + interactions + valeurs stockées\n // suppression des résultats précédents\n this._clearResults();\n // on efface les points qui ont pu être saisis précédemment\n this._clearInputFeatures();\n // on supprime l'éventuelle précédente interaction\n this._removeMapInteraction(_map);\n // on retire aussi la couche de saisie de la zone de recherche à la fermeture du widget\n if (this._inputFeaturesLayer != null) {\n _map.removeLayer(this._inputFeaturesLayer);\n this._inputFeaturesLayer = null;\n this._inputFeaturesSources = null;\n this._inputFeatures = null;\n }\n }\n\n // on appelle la méthode setMap originale d'OpenLayers\n Control.prototype.setMap.call(this, map);\n };\n\n /**\n * Get locations data\n *\n * @returns {Object} data - locations\n */\n ReverseGeocode.prototype.getData = function () {\n return this._reverseGeocodingLocations;\n };\n\n // ################################################################### //\n // ##################### init component ############################## //\n // ################################################################### //\n\n /**\n * Initialize ReverseGeocode control (called by ReverseGeocode constructor)\n *\n * @param {Object} options - constructor options\n * @private\n */\n ReverseGeocode.prototype.initialize = function (options) {\n // ############################################################ //\n // ################### Options du composant ################### //\n\n // check input options format (resources and delimitations arrays)\n this._checkInputOptions(options);\n\n // set default options\n this.options = {\n collapsed: true,\n draggable: false,\n resources: [\"StreetAddress\", \"PositionOfInterest\", \"CadastralParcel\"],\n delimitations: [\"Point\", \"Circle\", \"Extent\"],\n reverseGeocodeOptions: {},\n layerDescription: {\n title: \"Saisie (recherche inverse)\",\n description: \"Couche de saisie d'une zone de recherche pour la recherche inverse\"\n }\n };\n\n // merge with user options\n _Common_Utils__WEBPACK_IMPORTED_MODULE_13__[\"default\"].assign(this.options, options);\n\n /** {Boolean} specify if reverseGeocoding control is collapsed (true) or not (false) */\n this.collapsed = this.options.collapsed;\n\n /** {Boolean} specify if reverseGeocoding control is draggable (true) or not (false) */\n this.draggable = this.options.draggable;\n\n // identifiant du contrôle : utile pour suffixer les identifiants CSS (pour gérer le cas où il y en a plusieurs dans la même page)\n this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_15__[\"default\"].generate();\n\n // #################################################################### //\n // ################### informations sur les droits #################### //\n\n // Type de géocodage sélectionné (StreetAddress, PositionOfInterest, ...)\n this._currentGeocodingType = null;\n this._initGeocodingType();\n\n // Type de délimitation à utiliser pour la requête + pour sélection sur la containerDistance\n this._currentGeocodingDelimitation = null;\n this._initGeocodingDelimitation();\n\n // ################################################################## //\n // ################### Elements principaux du DOM ################### //\n\n // containers principaux\n this._showReverseGeocodingInput = null;\n // panel\n this._panelContainer = null;\n this._panelHeaderContainer = null;\n this._panelTitleContainer = null;\n this._returnPictoContainer = null;\n // form\n this._formContainer = null;\n // results\n this._resultsContainer = null;\n this._resultsListContainer = null;\n // waiting\n this._waitingContainer = null;\n\n // ###################################################################### //\n // ################### informations des points saisis ################### //\n\n // collection des points saisis sur la carte\n this._inputFeatures = null;\n // source contenant les features ci-dessus\n this._inputFeaturesSource = null;\n // couche vectorielle dans laquelle seront saisis les points (features ci-dessus)\n this._inputFeaturesLayer = null;\n // interaction avec la carte (de type \"Point\", \"Circle\" ou \"Polygon\")\n this._mapInteraction = null;\n\n // #################################################################### //\n // ################### informations pour la requête ################### //\n\n // options pour la requête de géocodage inverse\n this._requestOptions = null;\n // geometrie de recherche du géocodage inverse qui sera envoyée dans la requête\n this._requestGeom = null;\n // pour savoir si un calcul est en cours ou non\n this._waiting = false;\n // timer pour cacher la patience après un certain temps\n this._timer = null;\n\n // #################################################################### //\n // #################### informations des résultats #################### //\n\n this._reverseGeocodingLocations = [];\n this._reverseGeocodingLocationsMarkers = [];\n this._resultsDefaultStyle = new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Style\"]({\n image: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Icon\"]({\n src: _Utils_Markers__WEBPACK_IMPORTED_MODULE_16__[\"default\"][\"lightOrange\"],\n anchor: [0.5, 1]\n })\n });\n this._resultsSelectedStyle = new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Style\"]({\n image: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Icon\"]({\n src: _Utils_Markers__WEBPACK_IMPORTED_MODULE_16__[\"default\"][\"red\"],\n anchor: [0.5, 1]\n })\n });\n this._resultsHoverInteraction = null;\n this._resultsSelectInteraction = null;\n // container de la popup (affichage des infos au clic sur les markers)\n this._popupContent = null;\n this._popupDiv = this._initPopupDiv();\n this._popupOverlay = null;\n };\n\n /**\n * this method is called by this.initialize()\n * and makes sure input options are correctly formated\n *\n * @param {Object} options - options\n *\n * @private\n */\n ReverseGeocode.prototype._checkInputOptions = function (options) {\n var i;\n var j;\n\n // on vérifie le tableau des resources\n if (options.resources) {\n var resources = options.resources;\n // on vérifie que la liste des ressources de geocodage est bien un tableau\n if (Array.isArray(resources)) {\n var resourcesList = [\"StreetAddress\", \"PositionOfInterest\", \"CadastralParcel\"];\n var wrongResourcesIndexes = [];\n for (i = 0; i < resources.length; i++) {\n if (resourcesList.indexOf(resources[i]) === -1) {\n // si la resource n'est pas référencée, on stocke son index pour la retirer du tableau (après avoir terminé de parcourir le tableau)\n wrongResourcesIndexes.push(i);\n logger.log(\"[ReverseGeocode] options.resources : \" + resources[i] + \" is not a resource for reverse geocode\");\n }\n }\n // on retire les ressoures non référencées qu'on a pu rencontrer\n if (wrongResourcesIndexes.length !== 0) {\n for (j = 0; j < wrongResourcesIndexes.length; j++) {\n resources.splice(wrongResourcesIndexes[j], 1);\n }\n }\n } else {\n logger.log(\"[ReverseGeocode] 'options.resources' parameter should be an array\");\n resources = null;\n }\n }\n\n // et le tableau des délimitations\n if (options.delimitations) {\n var delimitations = options.delimitations;\n // on vérifie que la liste des delimitations est bien un tableau\n if (Array.isArray(delimitations)) {\n var delimitationsList = [\"Circle\", \"Point\", \"Extent\"];\n var wrongDelimitationsIndexes = [];\n for (i = 0; i < delimitations.length; i++) {\n if (delimitationsList.indexOf(delimitations[i]) === -1) {\n // si la delimitations n'est pas référencée, on stocke son index pour la retirer du tableau (après avoir terminé de parcourir le tableau)\n wrongDelimitationsIndexes.push(i);\n logger.log(\"[ReverseGeocode] options.delimitations : \" + delimitations[i] + \" is not a delimitation for reverse geocode\");\n }\n }\n // on retire les ressoures non référencées qu'on a pu rencontrer\n if (wrongDelimitationsIndexes.length !== 0) {\n for (j = 0; j < wrongDelimitationsIndexes.length; j++) {\n delimitations.splice(wrongDelimitationsIndexes[j], 1);\n }\n }\n } else {\n logger.log(\"[ReverseGeocode] 'options.delimitations' parameter should be an array\");\n delimitations = null;\n }\n }\n };\n\n /**\n * this method is called by this.initialize() and initialize geocoding type (=resource)\n * (\"StreetAddress\", \"PositionOfInterest\", \"CadastralParcel\")\n *\n * @private\n */\n ReverseGeocode.prototype._initGeocodingType = function () {\n // Type de géocodage selectionné\n this._currentGeocodingType = \"StreetAddress\"; // par defaut\n\n // par defaut\n var resources = this.options.resources;\n if (!resources || resources.length === 0) {\n this.options.resources = [\"StreetAddress\", \"PositionOfInterest\", \"CadastralParcel\"];\n }\n\n // options utilisateur\n if (Array.isArray(resources) && resources.length) {\n // récupération du type par défaut\n if (resources[0] === \"StreetAddress\" || resources[0] === \"PositionOfInterest\" || resources[0] === \"CadastralParcel\") {\n this._currentGeocodingType = resources[0];\n }\n }\n\n // si l'utilisateur a spécifié au moins une ressource dans le service, on surcharge les options du widget\n var serviceOptions = this.options.reverseGeocodeOptions;\n if (serviceOptions.filterOptions && Array.isArray(serviceOptions.filterOptions.type) && serviceOptions.filterOptions.type.length !== 0) {\n this._currentGeocodingType = serviceOptions.filterOptions.type[0];\n }\n };\n\n /**\n * this method is called by this.initialize() and initialize geocoding delimitation\n * (\"Point\", \"Circle\", \"Extent\")\n *\n * @private\n */\n ReverseGeocode.prototype._initGeocodingDelimitation = function () {\n // Type de délimitation selectionné\n this._currentGeocodingDelimitation = \"Point\"; // par defaut\n\n // par defaut\n var delimitations = this.options.delimitations;\n if (!delimitations || delimitations.length === 0) {\n this.options.delimitations = [\"Point\", \"Circle\", \"Extent\"];\n }\n\n // options utilisateur\n if (Array.isArray(delimitations) && delimitations.length) {\n var d = delimitations[0].toLowerCase();\n if (d === \"point\" || d === \"circle\" || d === \"extent\") {\n this._currentGeocodingDelimitation = delimitations[0];\n }\n }\n };\n\n /**\n * this method is called by this.initialize() and initialize popup div\n * (to display results information on marker click)\n *\n * @return {Object} element - DOM element for popup\n * @private\n */\n ReverseGeocode.prototype._initPopupDiv = function () {\n var context = this;\n var element = document.createElement(\"div\");\n element.className = \"gp-feature-info-div\";\n var closer = document.createElement(\"input\");\n closer.type = \"button\";\n closer.className = \"gp-styling-button closer\";\n // on closer click : remove popup\n closer.onclick = function () {\n if (context._popupOverlay != null) {\n context._popupOverlay.setPosition(undefined);\n }\n return false;\n };\n this._popupContent = document.createElement(\"div\");\n this._popupContent.className = \"gp-features-content-div\";\n element.appendChild(this._popupContent);\n element.appendChild(closer);\n return element;\n };\n\n /**\n * Create control main container (DOM initialize)\n *\n * @returns {DOMElement} DOM element\n *\n * @private\n */\n ReverseGeocode.prototype._initContainer = function () {\n // create main container\n var container = this._createMainContainerElement();\n\n // create show ReverseGeocode element\n var inputShow = this._showReverseGeocodingInput = this._createShowReverseGeocodingElement();\n container.appendChild(inputShow);\n\n // mode \"collapsed\"\n if (!this.collapsed) {\n inputShow.checked = true;\n }\n\n // create ReverseGeocode picto\n var picto = this._createShowReverseGeocodingPictoElement();\n container.appendChild(picto);\n\n // panel\n var reverseGeocodingPanel = this._panelContainer = this._createReverseGeocodingPanelElement();\n\n // header\n var panelHeader = this._panelHeaderContainer = this._createReverseGeocodingPanelHeaderElement();\n\n // return picto (hidden at start)\n var returnPicto = this._returnPictoContainer = this._createReverseGeocodingPanelReturnPictoElement();\n panelHeader.appendChild(returnPicto);\n // pane title\n var panelTitle = this._panelTitleContainer = this._createReverseGeocodingPanelTitleElement();\n panelHeader.appendChild(panelTitle);\n // close picto\n var closeDiv = this._createReverseGeocodingPanelCloseElement();\n panelHeader.appendChild(closeDiv);\n reverseGeocodingPanel.appendChild(panelHeader);\n\n // form\n var reverseGeocodingForm = this._formContainer = this._createReverseGeocodingPanelFormElement();\n // choices element\n reverseGeocodingForm.appendChild(this._createReverseGeocodingFormModeChoiceGeocodingTypeElement(this.options.resources));\n reverseGeocodingForm.appendChild(this._createReverseGeocodingFormModeChoiceGeocodingDelimitationElement(this.options.delimitations));\n\n // submit (bouton \"Chercher\")\n var submit = this._createReverseGeocodingSubmitFormElement();\n reverseGeocodingForm.appendChild(submit);\n reverseGeocodingPanel.appendChild(reverseGeocodingForm);\n\n // waiting\n var waiting = this._waitingContainer = this._createReverseGeocodingWaitingElement();\n reverseGeocodingPanel.appendChild(waiting);\n\n // results (dans le panel)\n var resultsPanel = this._resultsContainer = this._createReverseGeocodingResultsPanelElement();\n var reverseGeocodingResultsList = this._resultsListContainer = this._createReverseGeocodingResultsListElement();\n resultsPanel.appendChild(reverseGeocodingResultsList);\n reverseGeocodingPanel.appendChild(resultsPanel);\n container.appendChild(reverseGeocodingPanel);\n logger.log(container);\n return container;\n };\n\n // ################################################################### //\n // ################### Map interactions management ################### //\n // ################################################################### //\n\n /**\n * this method is called by this.setMap,\n * or by this.onShowReverseGeocodingClick,\n * and calls method corresponding to current delimitation, if widget is not collapsed.\n *\n * @param {ol.Map} map - control map.\n * @private\n */\n ReverseGeocode.prototype._activateMapInteraction = function (map) {\n var _this = this;\n if (!this.collapsed) {\n // 1. Creation de la couche vectorielle sur laquelle on va dessiner\n if (this._inputFeaturesLayer == null) {\n // on crée une collection, qui accueillera les points saisis sur la carte par les interactions,\n // sous formes de features (dans une couche vectorielle).\n // on les stocke de sorte à pouvoir les supprimer facilement\n this._inputFeatures = new ol_Collection__WEBPACK_IMPORTED_MODULE_3___default.a();\n\n // on crée la couche qui va accueillir les features\n this._inputFeaturesSource = new ol_source_Vector__WEBPACK_IMPORTED_MODULE_11___default.a({\n features: this._inputFeatures\n });\n this._inputFeaturesLayer = new ol_layer_Vector__WEBPACK_IMPORTED_MODULE_10___default.a({\n source: this._inputFeaturesSource,\n style: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Style\"]({\n fill: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Fill\"]({\n color: \"rgba(0, 183, 152, 0.3)\"\n }),\n stroke: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Stroke\"]({\n color: \"rgba(0, 183, 152, 0.8)\",\n width: 3\n }),\n image: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Icon\"]({\n src: _Utils_Markers__WEBPACK_IMPORTED_MODULE_16__[\"default\"][\"turquoiseBlue\"],\n anchor: [0.5, 1]\n })\n })\n });\n // on rajoute le champ gpResultLayerId permettant d'identifier une couche crée par le composant. (pour layerSwitcher par ex)\n this._inputFeaturesLayer.gpResultLayerId = \"reverseGeocoding\";\n // on ajoute la couche à la carte\n map.addLayer(this._inputFeaturesLayer);\n }\n\n // 2. Création de l'interaction de dessin, selon le type de délimitation sélectionné\n var delimitation = this._currentGeocodingDelimitation.toLowerCase();\n switch (delimitation) {\n case \"point\":\n this._activatePointInteraction(map);\n break;\n case \"circle\":\n this._activateCircleInteraction(map);\n break;\n case \"extent\":\n this._activateBoxInteraction(map);\n break;\n default:\n break;\n }\n\n // 3. Si un layer switcher est présent dans la carte, on lui affecte des informations pour cette couche\n map.getControls().forEach(function (control) {\n if (control instanceof _LayerSwitcher__WEBPACK_IMPORTED_MODULE_19__[\"default\"]) {\n // un layer switcher est présent dans la carte\n var layerId = _this._inputFeaturesLayer.gpLayerId;\n // on n'ajoute des informations que s'il n'y en a pas déjà (si le titre est le numéro par défaut)\n if (control._layers[layerId].title === layerId) {\n control.addLayer(_this._inputFeaturesLayer, {\n title: _this.options.layerDescription.title,\n description: _this.options.layerDescription.description\n });\n control.setRemovable(_this._inputFeaturesLayer, false);\n }\n }\n });\n }\n };\n\n /**\n * this method is called by this._activateMapInteraction,\n * and creates map point drawing interaction.\n *\n * @param {ol.Map} map - control map.\n * @private\n */\n ReverseGeocode.prototype._activatePointInteraction = function (map) {\n var _this2 = this;\n // interaction permettant de dessiner un point\n this._mapInteraction = new ol_interaction__WEBPACK_IMPORTED_MODULE_7__[\"Draw\"]({\n style: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Style\"]({\n image: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Circle\"]({\n radius: 0,\n fill: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Fill\"]({\n color: \"rgba(0, 183, 152, 0.8)\"\n })\n })\n }),\n type: \"Point\",\n source: this._inputFeaturesSource\n });\n this._mapInteraction.on(\"drawstart\", function (e) {\n logger.log(\"on drawstart \", e);\n\n // on efface les points qui ont pu être saisis précédemment (on vide la collection des features de la couche)\n _this2._inputFeatures.clear();\n\n // on récupère les coordonnées du point qui vient d'être saisi\n _this2._onDrawStart(e, \"point\");\n });\n this._mapInteraction.on(\"drawend\", function (e) {\n logger.log(\"on drawend\", e);\n\n // on récupère le rayon du cercle qui vient d'être tracé\n if (e.feature && e.feature.getGeometry) {\n _this2._requestGeom = {\n type: \"Point\",\n coordinates: [_this2._requestPosition.lon, _this2._requestPosition.lat]\n };\n }\n });\n map.addInteraction(this._mapInteraction);\n this._setCursor(\"crosshair\", map);\n };\n\n /**\n * this method is called by this._activateMapInteraction,\n * and creates map circle drawing interaction.\n *\n * @param {ol.Map} map - control map.\n * @private\n */\n ReverseGeocode.prototype._activateCircleInteraction = function (map) {\n var _this3 = this;\n // interaction permettant de dessiner un cercle\n this._mapInteraction = new ol_interaction__WEBPACK_IMPORTED_MODULE_7__[\"Draw\"]({\n style: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Style\"]({\n fill: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Fill\"]({\n color: \"rgba(0, 183, 152, 0.3)\"\n }),\n stroke: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Stroke\"]({\n color: \"rgba(0, 183, 152, 0.8)\",\n width: 3\n }),\n image: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Circle\"]({\n radius: 4,\n fill: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Fill\"]({\n color: \"rgba(0, 183, 152, 0.8)\"\n })\n })\n }),\n type: \"Circle\",\n source: this._inputFeaturesSource\n });\n this._mapInteraction.on(\"drawstart\", function (e) {\n logger.log(\"on drawstart \", e);\n // on efface les points qui ont pu être saisis précédemment (on vide la collection des features de la couche)\n _this3._inputFeatures.clear();\n // on récupère les coordonnées du centre du cercle = premier point du tracé\n _this3._onDrawStart(e, \"circle\");\n });\n this._mapInteraction.on(\"drawend\", function (e) {\n logger.log(\"on drawend\", e);\n\n // on récupère le rayon du cercle qui vient d'être tracé\n if (e.feature && e.feature.getGeometry) {\n var radius = e.feature.getGeometry().getRadius();\n // et on le stocke comme filtre pour la requête\n _this3._requestGeom = {};\n _this3._requestGeom.type = \"Circle\";\n _this3._requestGeom.radius = radius;\n if (_this3._requestPosition) {\n _this3._requestGeom.coordinates = [_this3._requestPosition.lon, _this3._requestPosition.lat];\n }\n logger.log(\"circle radius : \", radius);\n }\n });\n map.addInteraction(this._mapInteraction);\n };\n\n /**\n * this method is called by this._activateMapInteraction,\n * and creates map box drawing interaction.\n *\n * @param {ol.Map} map - control map.\n * @private\n */\n ReverseGeocode.prototype._activateBoxInteraction = function (map) {\n var _this4 = this;\n // info : il n'y a pas de geometry de type rectangle, donc on va créer un objet de type \"LineString\",\n // avec seulement 2 points qui formeront les extrémités du rectangle.\n // on aura donc une géométrie LineString avec 5 coordonnées : start, point2, end, point4, start,\n // où les coordonnées de point2 et point4 sont calculées à partir de start et end, et start est répété à la fin pour fermer la géométrie.\n\n // function to draw rectangle with only 2 points\n var geometryFunction = function geometryFunction(coordinates, geometry) {\n if (!geometry) {\n geometry = new ol_geom__WEBPACK_IMPORTED_MODULE_6__[\"Polygon\"]([]);\n }\n var start = coordinates[0];\n var end = coordinates[1];\n // on crée les 5 coordonnées de la ligne à partir des 2 points saisis.\n geometry.setCoordinates([[start, [start[0], end[1]], end, [end[0], start[1]], start]]);\n return geometry;\n };\n\n // interaction permettant de dessiner un rectangle (= LineString de 5 points, à partir de 2 points saisis)\n this._mapInteraction = new ol_interaction__WEBPACK_IMPORTED_MODULE_7__[\"Draw\"]({\n style: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Style\"]({\n fill: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Fill\"]({\n color: \"rgba(0, 183, 152, 0.3)\"\n }),\n stroke: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Stroke\"]({\n color: \"rgba(0, 183, 152, 0.8)\",\n width: 3\n }),\n image: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Circle\"]({\n radius: 4,\n fill: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Fill\"]({\n color: \"rgba(0, 183, 152, 0.8)\"\n })\n })\n }),\n type: \"LineString\",\n source: this._inputFeaturesSource,\n maxPoints: 2,\n geometryFunction: geometryFunction\n });\n this._mapInteraction.on(\"drawstart\", function (e) {\n logger.log(\"on drawstart\", e);\n // on efface les points qui ont pu être saisis précédemment (on vide la collection des features de la couche)\n _this4._inputFeatures.clear();\n });\n this._mapInteraction.on(\"drawend\", function (e) {\n logger.log(\"on drawend\", e);\n // on va récupérer les coordonnées du rectangle qui vient d'être tracé\n _this4._onBoxDrawEnd(e);\n });\n map.addInteraction(this._mapInteraction);\n };\n\n /**\n * remove draw interaction from map (if exists)\n *\n * @param {ol.Map} map - control map.\n * @private\n */\n ReverseGeocode.prototype._removeMapInteraction = function (map) {\n if (this._mapInteraction != null) {\n map.removeInteraction(this._mapInteraction);\n this._mapInteraction = null;\n }\n this._setCursor();\n };\n\n /**\n * this method is called by event 'drawstart' on map point or circle drawing interaction\n * (cf. this._activatePointInteraction), and it gets map click coordinates.\n * this point is saved as a parameter for reverse Geocode service.\n *\n * @param {Object} e - HTMLElement\n * @param {String} type - geometry type : \"point\" or \"circle\"\n * @private\n */\n ReverseGeocode.prototype._onDrawStart = function (e, type) {\n var coordinate;\n if (e.feature && e.feature.getGeometry) {\n var geometry = e.feature.getGeometry();\n if (type === \"point\") {\n coordinate = geometry.getCoordinates();\n }\n if (type === \"circle\") {\n coordinate = geometry.getCenter();\n }\n }\n if (!coordinate) {\n return;\n }\n var crs;\n if (this.options.reverseGeocodeOptions && this.options.reverseGeocodeOptions.srs) {\n crs = this.options.reverseGeocodeOptions.srs;\n } else {\n var map = this.getMap();\n if (!map || !map.getView()) {\n return;\n }\n crs = map.getView().getProjection();\n }\n var geoCoordinate = Object(ol_proj__WEBPACK_IMPORTED_MODULE_9__[\"transform\"])(coordinate, crs, \"EPSG:4326\");\n this._requestPosition = {\n lon: geoCoordinate[0],\n lat: geoCoordinate[1]\n };\n logger.log(\"position coordinates : \", this._requestPosition);\n };\n\n /**\n * this method is called by event 'drawend' on map box drawing interaction\n * (cf. this._activateBoxInteraction), and it gets geometry coordinates,\n * to be saved as a filter parameter for reverse Geocode service.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n ReverseGeocode.prototype._onBoxDrawEnd = function (e) {\n // on va récupérer les coordonnées du rectangle qui vient d'être tracé\n if (e.feature && e.feature.getGeometry) {\n // info: coordinates est un tableau [start, point2, end, point4, start]\n // car c'est une linestring donc on a 5 coordonnées pour boucler\n var coordinates = e.feature.getGeometry().getCoordinates()[0];\n var start = coordinates[0];\n var end = coordinates[2];\n var crs;\n if (this.options.reverseGeocodeOptions && this.options.reverseGeocodeOptions.srs) {\n crs = this.options.reverseGeocodeOptions.srs;\n } else {\n var map = this.getMap();\n if (!map || !map.getView()) {\n return;\n }\n crs = map.getView().getProjection();\n }\n\n // on reprojette les coordonnées des deux extrémités du rectangle (start et end)\n var startGeoCoordinate = Object(ol_proj__WEBPACK_IMPORTED_MODULE_9__[\"transform\"])(start, crs, \"EPSG:4326\");\n var endGeoCoordinate = Object(ol_proj__WEBPACK_IMPORTED_MODULE_9__[\"transform\"])(end, crs, \"EPSG:4326\");\n var bbox = {};\n // on récupère les valeurs left, right, top et bottom, pour le filtre bbox du service reverseGeocode\n if (startGeoCoordinate[0] < endGeoCoordinate[0]) {\n bbox.left = startGeoCoordinate[0];\n bbox.right = endGeoCoordinate[0];\n } else {\n bbox.left = endGeoCoordinate[0];\n bbox.right = startGeoCoordinate[0];\n }\n if (startGeoCoordinate[1] < endGeoCoordinate[1]) {\n bbox.bottom = startGeoCoordinate[1];\n bbox.top = endGeoCoordinate[1];\n } else {\n bbox.bottom = endGeoCoordinate[1];\n bbox.top = startGeoCoordinate[1];\n }\n this._requestGeom = {\n type: \"Polygon\",\n coordinates: [[[bbox.left, bbox.top], [bbox.right, bbox.top], [bbox.right, bbox.bottom], [bbox.left, bbox.bottom], [bbox.left, bbox.top]]]\n };\n logger.log(\"searchGeometry filter : \", this._requestGeom);\n }\n };\n\n /**\n * this change the cursor of the map when entering a point.\n *\n * @param {String} cursor - cursor style\n * @param {ol.Map} map - control map (optional)\n * @private\n */\n ReverseGeocode.prototype._setCursor = function (cursor, map) {\n map = map || this.getMap();\n if (!map) {\n return;\n }\n var div = map.getTargetElement();\n if (cursor) {\n div.style.cursor = cursor;\n } else {\n div.style.cursor = null;\n }\n };\n\n // ################################################################### //\n // ##################### Reverse Geocoding request ################### //\n // ################################################################### //\n\n /**\n * this methode is called by this.onReverseGeocodingSubmit method,\n * it generates and sends reverse geocode request, then displays results\n *\n * @private\n */\n ReverseGeocode.prototype._reverseGeocodingRequest = function () {\n var map = this.getMap();\n\n // on construit les options pour la requête\n this._requestOptions = this._getReverseGeocodingRequestOptions();\n\n // retrait de l'interaction sur la map pendant l'attente (et l'affichage des résultats)\n this._removeMapInteraction(map);\n // affichage d'une patience pendant l'attente\n this._displayWaitingContainer();\n\n // envoi de la requête\n geoportal_access_lib__WEBPACK_IMPORTED_MODULE_12__[\"default\"].Services.reverseGeocode(this._requestOptions);\n };\n\n /**\n * this methode is called by this._reverseGeocodingRequest method,\n * and returns options object for Gp.Services.reverseGeocode request\n *\n * @returns {Object} requestOptions - reverse geocode options\n * @private\n */\n ReverseGeocode.prototype._getReverseGeocodingRequestOptions = function () {\n var map = this.getMap();\n\n // on recupere les éventuelles options du service passées par l'utilisateur\n var reverseGeocodeOptions = this.options.reverseGeocodeOptions;\n\n // on crée les options pour le service reverseGeocode\n var context = this;\n if (typeof this.options.ssl !== \"boolean\") {\n this.options.ssl = true;\n }\n // gestion des callback\n var bOnFailure = !!(reverseGeocodeOptions.onFailure !== null && typeof reverseGeocodeOptions.onFailure === \"function\"); // cast variable to boolean\n var bOnSuccess = !!(reverseGeocodeOptions.onSuccess !== null && typeof reverseGeocodeOptions.onSuccess === \"function\");\n var requestOptions = {\n apiKey: reverseGeocodeOptions.apiKey || this.options.apiKey,\n ssl: this.options.ssl,\n position: this._requestPosition,\n filterOptions: {\n type: [this._currentGeocodingType]\n },\n srs: \"CRS:84\",\n returnFreeForm: false,\n maximumResponses: reverseGeocodeOptions.maximumResponses || 18,\n timeOut: reverseGeocodeOptions.timeOut || 30000,\n // protocol : reverseGeocodeOptions.protocol || \"XHR\",\n // callback onSuccess\n onSuccess: function onSuccess(response) {\n if (response.locations) {\n logger.log(\"reverseGeocode results : \", response.locations);\n context._displayGeocodedLocations(response.locations);\n }\n if (bOnSuccess) {\n reverseGeocodeOptions.onSuccess.call(context, response.locations);\n }\n },\n // callback onFailure\n onFailure: function onFailure(error) {\n // FIXME mise à jour du controle mais le service ne repond pas en 200 !?\n\n // on cache la patience\n context._hideWaitingContainer();\n\n // suppression d'éventuels résultats précédents\n context._clearResults();\n // on efface les points qui ont été saisis précédemment\n context._clearInputFeatures();\n\n // et on réactive l'interaction sur la map\n context._activateMapInteraction(map);\n logger.log(error.message);\n if (bOnFailure) {\n reverseGeocodeOptions.onFailure.call(context, error);\n }\n }\n };\n\n // on récupère d'éventuels filtres\n if (this._requestGeom.type.toLowerCase() === \"circle\") {\n // FIXME : a confirmer en fonction du service !\n if (this._requestGeom.radius > 500) {\n logger.log(\"INFO : initial circle radius (\" + this._requestGeom.radius + \") limited to 1000m.\");\n this._requestGeom.radius = 500;\n }\n requestOptions.searchGeometry = this._requestGeom;\n } else if (this._requestGeom.type.toLowerCase() === \"polygon\") {\n requestOptions.searchGeometry = this._requestGeom;\n } else if (this._requestGeom.type.toLowerCase() === \"point\") {\n if (this._currentGeocodingType === \"StreetAddress\") {\n requestOptions.searchGeometry = {\n type: \"Circle\",\n radius: 50,\n coordinates: this._requestGeom.coordinates\n };\n requestOptions.maximumResponses = 1;\n } else {\n requestOptions.searchGeometry = this._requestGeom;\n }\n }\n logger.log(\"reverseGeocode request options : \", requestOptions);\n return requestOptions;\n };\n\n /**\n * this method is called by this._reverseGeocodingRequest() (in case of reverse geocode success)\n * and display results : in both container list and map\n *\n * @param {Array} locations - array of geocoded locations (reverse geocode results)\n * @private\n */\n ReverseGeocode.prototype._displayGeocodedLocations = function (locations) {\n // 1. on vide les résultats précédents\n this._clearResults();\n this._reverseGeocodingLocations = locations;\n\n /**\n * event triggered when the compute is finished\n *\n * @event reversegeocode:compute\n * @property {Object} type - event\n * @property {Object} target - instance ReverseGeocode\n * @example\n * ReverseGeocode.on(\"reversegeocode:compute\", function (e) {\n * console.log(e.target.getData());\n * })\n */\n this.dispatchEvent({\n type: \"reversegeocode:compute\"\n });\n\n // 2. cache de la patience et du formulaire\n this._formContainer.className = \"GPreverseGeocodingComponentHidden\";\n this._hideWaitingContainer();\n // affichage de la div des résultats (et changement du titre)\n this._panelTitleContainer.innerHTML = \"Résultats de la recherche\";\n this._returnPictoContainer.className = \"\";\n this._resultsContainer.className = \"GPpanel\";\n\n // 3. ajout de la liste des résultats dans le container des resultats\n this._fillGeocodedLocationListContainer(locations);\n\n // 4. affichage des résultats sur la carte (+ zoom ?)\n this._displayGeocodedLocationsOnMap(locations);\n };\n\n // ################################################################### //\n // ############################# results list ######################## //\n // ################################################################### //\n\n /**\n * this method is called by this._displayGeocodedLocations()\n * and fills the container with results list\n *\n * @param {Array} locations - array of geocoded locations (reverse geocode results)\n * @private\n */\n ReverseGeocode.prototype._fillGeocodedLocationListContainer = function (locations) {\n // ajout de la liste des résultats dans le container des resultats\n for (var i = 0; i < locations.length; i++) {\n var location = locations[i];\n logger.log(location);\n // on récupère la description à afficher dans la liste\n var locationDescription = this._fillGeocodedLocationDescription(location);\n // on ajoute chaque résutat à la liste\n if (locationDescription.length !== 0) {\n this._createReverseGeocodingResultElement(locationDescription, i);\n }\n }\n };\n\n /**\n * this method is called by this._fillGeocodedLocationListContainer()\n * and fills location description (String), depending on matchType\n *\n * @param {Object} location - geocoded location (from reverse geocode results)\n * @returns {String} locationDescription - geocoded location description to be displayed\n * @private\n */\n ReverseGeocode.prototype._fillGeocodedLocationDescription = function (location) {\n if (!location || !location.placeAttributes) {\n return;\n }\n var attr = location.placeAttributes;\n var locationDescription = \"\";\n // on sélectionne les infos à afficher selon le type\n switch (location.type) {\n case \"StreetAddress\":\n if (attr.street) {\n locationDescription += attr.housenumber ? attr.housenumber + \" \" : \"\";\n locationDescription += attr.street + \", \";\n }\n locationDescription += attr.postcode + \" \" + attr.city;\n break;\n case \"PositionOfInterest\":\n locationDescription += attr.toponym;\n if (attr.postcode.length === 1) {\n locationDescription += \", \" + attr.postcode[0];\n }\n locationDescription += \" (\" + attr.category.join(\",\") + \")\";\n break;\n case \"CadastralParcel\":\n locationDescription += attr.id;\n locationDescription += attr.city ? \" (\" + attr.city + \")\" : \"\";\n break;\n default:\n locationDescription += attr.city ? attr.city : \"\";\n break;\n }\n ;\n return locationDescription;\n };\n\n // ################################################################### //\n // ######################## map results (markers) #################### //\n // ################################################################### //\n\n /**\n * this method is called by this._displayGeocodedLocations()\n * and display locations in map (markers)\n *\n * @param {Object} locations - geocoded locations (reverse geocode result)\n * @private\n */\n ReverseGeocode.prototype._displayGeocodedLocationsOnMap = function (locations) {\n var _this5 = this;\n if (this._reverseGeocodingLocations.length !== 0) {\n var map = this.getMap();\n\n // 1. création de la couche où seront ajoutés les résultats\n this._createResultsLayer();\n // ajout de chaque résultat à la couche (marker)\n for (var i = 0; i < locations.length; i++) {\n this._addResultFeature(locations[i], i);\n }\n\n // 2. Zoom sur l'étendue des résultats (features)\n if (this._resultsFeatures.getLength() > 1) {\n if (this._resultsFeaturesSource && this._resultsFeaturesSource.getExtent) {\n var extent = this._resultsFeaturesSource.getExtent();\n map.getView().fit(extent, map.getSize());\n }\n } else {\n // dans le cas où on n'a qu'un seul résultat, l'étendue n'est pas définie, on zoome donc sur le résulat\n var feature = this._resultsFeatures.item(0);\n var coords = feature.getGeometry().getCoordinates();\n map.getView().setCenter(coords);\n map.getView().setZoom(17);\n }\n\n // 3. ajout des interactions (survol, click)\n // au survol : modification des styles (marker et list)\n this._resultsHoverInteraction = new ol_interaction__WEBPACK_IMPORTED_MODULE_7__[\"Select\"]({\n condition: ol_events_condition__WEBPACK_IMPORTED_MODULE_8__[\"pointerMove\"],\n layers: [this._resultsFeaturesLayer]\n });\n this._resultsHoverInteraction.on(\"select\", function (e) {\n return _this5._onResultsFeatureMouseOver(e);\n });\n map.addInteraction(this._resultsHoverInteraction);\n\n // au click : affichage popup\n this._resultsSelectInteraction = new ol_interaction__WEBPACK_IMPORTED_MODULE_7__[\"Select\"]({\n layers: [this._resultsFeaturesLayer]\n });\n this._resultsSelectInteraction.on(\"select\", function (e) {\n return _this5._onResultsFeatureSelect(e);\n });\n map.addInteraction(this._resultsSelectInteraction);\n\n // 4. Si un layer switcher est présent dans la carte, on lui affecte des informations pour cette couche\n var geocodeType = \"\";\n switch (this._currentGeocodingType) {\n case \"StreetAddress\":\n geocodeType = \"adresses\";\n break;\n case \"PositionOfInterest\":\n geocodeType = \"toponymes\";\n break;\n case \"CadastralParcel\":\n geocodeType = \"parcelles cadastrales\";\n break;\n default:\n break;\n }\n map.getControls().forEach(function (control) {\n if (control instanceof _LayerSwitcher__WEBPACK_IMPORTED_MODULE_19__[\"default\"]) {\n // un layer switcher est présent dans la carte\n var layerId = _this5._resultsFeaturesLayer.gpLayerId;\n // on n'ajoute des informations que s'il n'y en a pas déjà (si le titre est le numéro par défaut)\n if (control._layers[layerId].title === layerId) {\n control.addLayer(_this5._resultsFeaturesLayer, {\n title: \"Résultats de la recherche inverse\",\n description: \"Résultats de la recherche inverse sur les \" + geocodeType\n });\n control.setRemovable(_this5._resultsFeaturesLayer, false);\n }\n }\n });\n }\n };\n\n /**\n * this method is called by this._displayGeocodedLocations()\n * and creates result layer (where geocoded locations will be displayed)\n *\n * @private\n */\n ReverseGeocode.prototype._createResultsLayer = function () {\n var map = this.getMap();\n this._resultsFeatures = new ol_Collection__WEBPACK_IMPORTED_MODULE_3___default.a();\n\n // on crée la couche qui va accueillir les features\n this._resultsFeaturesSource = new ol_source_Vector__WEBPACK_IMPORTED_MODULE_11___default.a({\n features: this._resultsFeatures\n });\n this._resultsFeaturesLayer = new ol_layer_Vector__WEBPACK_IMPORTED_MODULE_10___default.a({\n source: this._resultsFeaturesSource\n });\n // on rajoute le champ gpResultLayerId permettant d'identifier une couche crée par le composant. (pour layerSwitcher par ex)\n this._resultsFeaturesLayer.gpResultLayerId = \"reverseGeocodingResults\";\n // on ajoute la couche à la carte\n map.addLayer(this._resultsFeaturesLayer);\n };\n\n /**\n * this method is called by this._displayGeocodedLocations()\n * and displays locations in map (markers) : add new feature to results layer\n *\n * @param {Object} location - geocoded location (reverse geocode result)\n * @param {Number} i - geocoded location index in response list\n * @private\n */\n ReverseGeocode.prototype._addResultFeature = function (location, i) {\n var map = this.getMap();\n // récupération de la position\n var position = [location.position.lon, location.position.lat];\n if (position.length === 0) {\n return;\n }\n var view = map.getView();\n var mapProj = view.getProjection().getCode();\n if (mapProj !== \"EPSG:4326\") {\n // on retransforme les coordonnées de la position dans la projection de la carte\n position = Object(ol_proj__WEBPACK_IMPORTED_MODULE_9__[\"transform\"])(position, \"EPSG:4326\", mapProj);\n }\n\n // on ajoute le résultat à la collection de points existantes (composant la couche vectorielle this._inputFeaturesLayer)\n var feature = new ol_Feature__WEBPACK_IMPORTED_MODULE_4___default.a({\n geometry: new ol_geom__WEBPACK_IMPORTED_MODULE_6__[\"Point\"](position)\n });\n feature.setStyle(this._resultsDefaultStyle);\n feature.setId(i);\n feature.setProperties({\n location: location,\n popupContent: this._fillPopupContent(location)\n });\n this._resultsFeatures.push(feature);\n };\n\n /**\n * this method is called by this._addResultFeature()\n * and fills popup content (to be displayed on marker click) for a given geocoded location\n *\n * @param {Object} location - geocoded location (reverse geocode result)\n * @returns {String} popupContent - text to be displayed in popup\n * @private\n */\n ReverseGeocode.prototype._fillPopupContent = function (location) {\n var popupContent = \"
    \";\n var attributes = location.placeAttributes;\n for (var attr in attributes) {\n if (attributes.hasOwnProperty(attr)) {\n if (attr !== \"trueGeometry\" && attr !== \"extraFields\" && attr !== \"houseNumberInfos\" && attr !== \"_count\") {\n popupContent += \"
  • \";\n popupContent += \"\" + attr.toUpperCase() + \" : \";\n popupContent += attributes[attr];\n popupContent += \"
  • \";\n }\n }\n }\n popupContent += \"
\";\n return popupContent;\n };\n\n /**\n * this method is called on 'pointerMove' on this._resultsFeaturesLayer (ol.interaction.Select)\n * (cf. this._displayGeocodedLocationsOnMap() )\n * and highlights result in list container\n *\n * @param {Object} e - on select event\n * @private\n */\n ReverseGeocode.prototype._onResultsFeatureMouseOver = function (e) {\n var f;\n\n // si on survole un résultat, on change son style (marker)\n if (e.selected.length !== 0) {\n // on change le style du marker (red)\n f = e.selected[0];\n f.setStyle(this._resultsSelectedStyle);\n\n // on surligne le résultat correspondant dans la liste des résultats\n if (f.getId() != null) {\n var selectedResultDiv = document.getElementById(\"ReverseGeocodedLocation_\" + f.getId() + \"-\" + this._uid);\n if (selectedResultDiv && selectedResultDiv.classList) {\n selectedResultDiv.classList.add(\"GPreverseGeocodedLocationHighlight\");\n }\n }\n document.getElementById(\"ReverseGeocodedLocation_\" + f.getId() + \"-\" + this._uid);\n }\n\n // si on déselectionne un résultat (mouseout), on rétablit un style normal pour le marker\n if (e.deselected.length !== 0) {\n // on change le style du marker (lightOrange)\n f = e.deselected[0];\n f.setStyle(this._resultsDefaultStyle);\n\n // on rétablit un style normal pour le résultat correspondant dans la liste des résultats\n var deSelectedResultDiv = document.getElementById(\"ReverseGeocodedLocation_\" + f.getId() + \"-\" + this._uid);\n if (deSelectedResultDiv && deSelectedResultDiv.classList) {\n deSelectedResultDiv.classList.remove(\"GPreverseGeocodedLocationHighlight\");\n }\n }\n };\n\n /**\n * this method is called on 'click' on this._resultsFeaturesLayer (ol.interaction.Select)\n * (cf. this._displayGeocodedLocationsOnMap() )\n * and sets a popup with feature information\n *\n * @param {Object} e - on select event\n * @private\n */\n ReverseGeocode.prototype._onResultsFeatureSelect = function (e) {\n var map = this.getMap();\n if (e.selected.length !== 0) {\n // si on a sélectionné un marker, on lui ajoute une popup\n var f = e.selected[0];\n this._popupContent.innerHTML = f.getProperties().popupContent;\n if (!this._popupOverlay) {\n // ajout de la popup a la carte comme un overlay\n this._popupOverlay = new ol_Overlay__WEBPACK_IMPORTED_MODULE_2___default.a({\n element: this._popupDiv,\n positioning: \"bottom-center\",\n position: e.mapBrowserEvent.coordinate\n });\n map.addOverlay(this._popupOverlay);\n } else {\n // si l'overlay est déjà créé, on modifie juste sa position\n this._popupOverlay.setPosition(e.mapBrowserEvent.coordinate);\n }\n\n /**\n * event triggered when an element of the results is clicked\n *\n * @event reversegeocode:onclickresult\n * @property {Object} type - event\n * @property {Object} location - location\n * @property {Object} target - instance ReverseGeocode\n * @example\n * Reverse.on(\"reverse:onclickresult\", function (e) {\n * console.log(e.location);\n * })\n */\n this.dispatchEvent({\n type: \"reversegeocode:onclickresult\",\n location: f.getProperties().location\n });\n } else {\n // si aucun troncon n'est sélectionné (click à côté du tracé),\n // on fait disparaitre la popup si elle existe\n if (this._popupOverlay != null) {\n this._popupOverlay.setPosition(undefined);\n }\n }\n };\n\n // ################################################################### //\n // ####################### handlers events to dom #################### //\n // ################################################################### //\n\n /**\n * this method is called by event 'click' on 'GPshowReverseGeocodingPicto' tag label\n * (cf. ReverseGeocodingDOM._createShowReverseGeocodingPictoElement), and it cleans the component\n * when it's closed.\n *\n * @private\n */\n ReverseGeocode.prototype.onShowReverseGeocodingClick = function () {\n var map = this.getMap();\n // on supprime toutes les interactions\n _Utils_Interactions__WEBPACK_IMPORTED_MODULE_18__[\"default\"].unset(map);\n this.collapsed = this._showReverseGeocodingInput.checked;\n // info : on génère nous même l'evenement OpenLayers de changement de propriété\n // (utiliser ol.control.ReverseGeocode.on(\"change:collapsed\", function ) pour s'abonner à cet évènement)\n this.dispatchEvent(\"change:collapsed\");\n if (!this._waiting && !this._reverseGeocodingLocations.length) {\n // Cas 1 : input panel (ni en attente, ni sur le panel des résultats)\n if (this.collapsed) {\n // on remet à zéro = on efface les géométries + interactions + valeurs stockées\n // suppression des résultats précédents\n this._clearResults();\n // on efface les points qui ont pu être saisis précédemment\n this._clearInputFeatures();\n // on supprime l'éventuelle précédente interaction\n this._removeMapInteraction(map);\n // on retire aussi la couche de saisie de la zone de recherche à la fermeture du widget\n if (this._inputFeaturesLayer != null) {\n map.removeLayer(this._inputFeaturesLayer);\n this._inputFeaturesLayer = null;\n this._inputFeaturesSources = null;\n this._inputFeatures = null;\n }\n } else {\n // on réactive l'interaction\n this._activateMapInteraction(map);\n }\n }\n // info : si on est en attente ou sur le panel des résultats : on ne fait rien.\n };\n\n /**\n * this method is called by event 'change' on 'GPreverseGeocodingCode' tag select\n * (cf. ReverseGeocodingDOM._createReverseGeocodingFormModeChoiceGeocodingTypeElement).\n * this value is saved as a parameter for reverseGeocode service.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n ReverseGeocode.prototype.onReverseGeocodingTypeChange = function (e) {\n var idx = e.target.selectedIndex;\n var value = e.target.options[idx].value;\n if (!value) {\n return;\n }\n logger.log(value);\n this._currentGeocodingType = value;\n };\n\n /**\n * this method is called by event 'change' on 'GPreverseGeocodingCode' tag select\n * (cf. ReverseGeocodingDOM._createReverseGeocodingFormModeChoiceGeocodingDelimitationElement).\n * this value is saved as a parameter for reverseGeocode service.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n ReverseGeocode.prototype.onReverseGeocodingDelimitationChange = function (e) {\n var idx = e.target.selectedIndex;\n var value = e.target.options[idx].value;\n if (!value) {\n return;\n }\n logger.log(value);\n this._currentGeocodingDelimitation = value;\n\n // on met à jour l'interaction de la map en fonction de la nouvelle délimitation\n var map = this.getMap();\n // on supprime l'interaction précédente, ainsi que les géométries et valeurs stockées (filtres, position)\n this._clearInputFeatures();\n // on supprime l'éventuelle précédente interaction\n this._removeMapInteraction(map);\n // on crée une nouvelle interaction\n this._activateMapInteraction(map);\n };\n\n /**\n * this method is called by event 'click' on 'GPreverseGeocodingReturnPicto' div\n * (cf. ReverseGeocodingDOM._createReverseGeocodingPanelReturnPictoElement),\n * and clear geocoded location (from both list container and map)\n *\n * @private\n */\n ReverseGeocode.prototype.onGPreverseGeocodingReturnPictoClick = function () {\n // suppression des résultats précédents\n this._clearResults();\n // on efface les points qui ont pu être saisis précédemment\n this._clearInputFeatures();\n // et on réactive l'interaction sur la map\n this._activateMapInteraction(this.getMap());\n };\n\n /**\n * this methode is called by event 'submit' on reverseGeocoding form ('GPreverseGeocodingForm')\n * (cf. ReverseGeocodingDOM._createReverseGeocodingPanelFormElement),\n * it checks reverse geocode mandatory parameters,\n * then call this._reverseGeocodingRequest() to generate and send request\n *\n * @private\n */\n ReverseGeocode.prototype.onReverseGeocodingSubmit = function () {\n // le paramètre position est obligatoire\n if (!this._requestPosition) {\n logger.log(\"missing position\");\n return;\n }\n this._reverseGeocodingRequest();\n };\n\n /**\n * this method is called by event 'click' on 'ReverseGeocodedLocation_' div\n * (cf. ReverseGeocodingDOM._createReverseGeocodingResultElement),\n * and zoom to location ?\n * TODO\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n ReverseGeocode.prototype.onReverseGeocodingResultClick = function (e) {\n // récupération de l'id du résultat survolé\n var tagid = e.target.id; // ex ReverseGeocodedLocation_21\n var idx = tagid.substring(tagid.indexOf(\"_\") + 1); // ex. 21\n\n var f = this._resultsFeaturesSource.getFeatureById(parseInt(idx, 10));\n this.dispatchEvent({\n type: \"reversegeocode:onclickresult\",\n location: f.getProperties().location\n });\n };\n\n /**\n * this method is called by event 'mouseover' on 'ReverseGeocodedLocation_' div\n * (cf. ReverseGeocodingDOM._createReverseGeocodingResultElement),\n * and changes style of matching marker on map (selected)\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n ReverseGeocode.prototype.onReverseGeocodingResultMouseOver = function (e) {\n // récupération de l'id du résultat survolé\n var tagid = e.target.id; // ex ReverseGeocodedLocation_21\n var idx = tagid.substring(tagid.indexOf(\"_\") + 1); // ex. 21\n\n // on passe le texte en gras\n if (e.target.classList) {\n e.target.classList.add(\"GPreverseGeocodedLocationHighlight\");\n }\n if (!this._resultsFeaturesSource) {\n return;\n }\n\n // on récupère l'entité correspondante au résultat survolé\n var f = this._resultsFeaturesSource.getFeatureById(parseInt(idx, 10));\n // et on lui affecte un nouveau style\n f.setStyle(this._resultsSelectedStyle);\n };\n\n /**\n * this method is called by event 'mouseout' on 'ReverseGeocodedLocation_' div\n * (cf. ReverseGeocodingDOM._createReverseGeocodingResultElement),\n * and changes style of matching marker on map (default)\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n ReverseGeocode.prototype.onReverseGeocodingResultMouseOut = function (e) {\n // récupération de l'id du résultat survolé\n var tagid = e.target.id; // ex GProuteResultsDetailsInstruction_125\n var idx = tagid.substring(tagid.indexOf(\"_\") + 1); // ex. 125\n\n // on repasse le texte en style normal\n if (e.target.classList) {\n e.target.classList.remove(\"GPreverseGeocodedLocationHighlight\");\n }\n if (!this._resultsFeaturesSource) {\n return;\n }\n // on récupère l'entité correspondante au résultat qui était survolé\n var f = this._resultsFeaturesSource.getFeatureById(parseInt(idx, 10));\n // et on lui réaffecte un style normal\n f.setStyle(this._resultsDefaultStyle);\n };\n\n // ################################################################### //\n // ################################ clean ############################ //\n // ################################################################### //\n\n /**\n * this method clears previous location results\n *\n * @private\n */\n ReverseGeocode.prototype._clearResults = function () {\n var map = this.getMap();\n this._reverseGeocodingLocations = [];\n // on vide le container avec la liste des résultats\n if (this._resultsListContainer) {\n while (this._resultsListContainer.firstChild) {\n this._resultsListContainer.removeChild(this._resultsListContainer.firstChild);\n }\n }\n // on retire la couche des résultats\n if (this._resultsFeaturesLayer) {\n map.removeLayer(this._resultsFeaturesLayer);\n this._resultsFeaturesLayer = null;\n }\n // on retire l'overlay de la popup de la carte\n if (this._popupOverlay != null) {\n map.removeOverlay(this._popupOverlay);\n this._popupOverlay = null;\n }\n // on retire les interactions sur les markers (select et mouseover)\n if (this._resultsSelectInteraction != null) {\n map.removeInteraction(this._resultsSelectInteraction);\n this._resultsSelectInteraction = null;\n }\n if (this._resultsHoverInteraction != null) {\n map.removeInteraction(this._resultsHoverInteraction);\n this._resultsHoverInteraction = null;\n }\n };\n\n /**\n * this method clears previous input features (features, layer, position and filters)\n *\n * @private\n */\n ReverseGeocode.prototype._clearInputFeatures = function () {\n // on efface les points qui ont pu être saisis précédemment (on vide la collection des features de la couche)\n if (this._inputFeatures) {\n this._inputFeatures.clear();\n }\n\n // on supprime les valeurs stockées\n this._requestGeom = null;\n };\n\n /**\n * this method displays waiting container and sets a timeout\n *\n * @private\n */\n ReverseGeocode.prototype._displayWaitingContainer = function () {\n this._waitingContainer.className = \"GProuteCalcWaitingContainerVisible\";\n this._waiting = true;\n\n // mise en place d'un timeout pour réinitialiser le panel (cacher la patience)\n // si on est toujours en attente (si la requête est bloquée par exemple)\n if (this._timer) {\n clearTimeout(this._timer);\n this._timer = null;\n }\n var context = this;\n this._timer = setTimeout(function () {\n if (context._waiting === true) {\n context._hideWaitingContainer();\n } else {\n if (context._timer) {\n clearTimeout(context._timer);\n }\n }\n }, 16000);\n };\n\n /**\n * this method hides waiting container and clears timeout\n *\n * @private\n */\n ReverseGeocode.prototype._hideWaitingContainer = function () {\n if (this._waiting) {\n this._waitingContainer.className = \"GProuteCalcWaitingContainerHidden\";\n this._waiting = false;\n clearTimeout(this._timer);\n this._timer = null;\n }\n };\n return ReverseGeocode;\n}(ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default.a);\n/* harmony default export */ __webpack_exports__[\"default\"] = (ReverseGeocode);\n\n// Expose ReverseGeocode as ol.control.ReverseGeocode (for a build bundle)\nif (window.ol && window.ol.control) {\n window.ol.control.ReverseGeocode = ReverseGeocode;\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9PcGVuTGF5ZXJzL0NvbnRyb2xzL1JldmVyc2VHZW9jb2RlLmpzPzI2ZTciXSwibmFtZXMiOlsibG9nZ2VyIiwiTG9nZ2VyIiwiZ2V0TG9nZ2VyIiwiUmV2ZXJzZUdlb2NvZGUiLCJDb250cm9sIiwib3B0aW9ucyIsIlR5cGVFcnJvciIsImluaXRpYWxpemUiLCJfY29udGFpbmVyIiwiX2luaXRDb250YWluZXIiLCJfY29udGFpbmVyRWxlbWVudCIsImVsZW1lbnQiLCJhcHBlbmRDaGlsZCIsImNhbGwiLCJ0YXJnZXQiLCJyZW5kZXIiLCJfX3Byb3RvX18iLCJwcm90b3R5cGUiLCJPYmplY3QiLCJjcmVhdGUiLCJVdGlscyIsImFzc2lnbiIsIlJldmVyc2VHZW9jb2RpbmdET00iLCJjb25zdH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Rpb24obWFwKTtcblxuICAgICAgICAgICAgLy8gbW9kZSBcImRyYWdnYWJsZVwiXG4gICAgICAgICAgICBpZiAodGhpcy5kcmFnZ2FibGUpIHtcbiAgICAgICAgICAgICAgICBEcmFnZ2FibGUuZHJhZ0VsZW1lbnQoXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3BhbmVsQ29udGFpbmVyLFxuICAgICAgICAgICAgICAgICAgICB0aGlzLl9wYW5lbEhlYWRlckNvbnRhaW5lcixcbiAgICAgICAgICAgICAgICAgICAgbWFwLmdldFRhcmdldEVsZW1lbnQoKVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIgX21hcCA9IHRoaXMuZ2V0TWFwKCk7XG4gICAgICAgICAgICAvLyBvbiByZW1ldCDDoCB6w6lybyA9IG9uIGVmZmFjZSBsZXMgZ8Opb23DqXRyaWVzICsgaW50ZXJhY3Rpb25zICsgdmFsZXVycyBzdG9ja8OpZXNcbiAgICAgICAgICAgIC8vIHN1cHByZXNzaW9uIGRlcyByw6lzdWx0YXRzIHByw6ljw6lkZW50c1xuICAgICAgICAgICAgdGhpcy5fY2xlYXJSZXN1bHRzKCk7XG4gICAgICAgICAgICAvLyBvbiBlZmZhY2UgbGVzIHBvaW50cyBxdWkgb250IHB1IMOqdHJlIHNhaXNpcyBwcsOpY8OpZGVtbWVudFxuICAgICAgICAgICAgdGhpcy5fY2xlYXJJbnB1dEZlYXR1cmVzKCk7XG4gICAgICAgICAgICAvLyBvbiBzdXBwcmltZSBsJ8OpdmVudHVlbGxlIHByw6ljw6lkZW50ZSBpbnRlcmFjdGlvblxuICAgICAgICAgICAgdGhpcy5fcmVtb3ZlTWFwSW50ZXJhY3Rpb24oX21hcCk7XG4gICAgICAgICAgICAvLyBvbiByZXRpcmUgYXVzc2kgbGEgY291Y2hlIGRlIHNhaXNpZSBkZSBsYSB6b25lIGRlIHJlY2hlcmNoZSDD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3cm9uZ1Jlc291cmNlc0luZGV4ZXMgPSBbXTtcbiAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgcmVzb3VyY2VzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXNvdXJjZXNMaXN0LmluZGV4T2YocmVzb3VyY2VzW2ldKSA9PT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNpIGxhIHJlc291cmNlIG4nZXN0IHBhcyByw6lmw6lyZW5jw6llLCBvbiBzdG9ja2Ugc29uIGluZGV4IHBvdXIgbGEgcmV0aXJlciBkdSB0YWJsZWF1IChhcHLDqHMgYXZvaXIgdGVybWluw6kgZGUgcGFyY291cmlyIGxlIHRhYmxlYXUpXG4gICAgICAgICAgICAgICAgICAgICAgICB3cm9uZ1Jlc291cmNlc0luZGV4ZXMucHVzaChpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZ2dlci5sb2coXCJbUmV2ZXJzZUdlb2NvZGVdIG9wdGlvbnMucmVzb3VyY2VzIDogXCIgKyByZXNvdXJjZXNbaV0gKyBcIiBpcyBub3QgYSByZXNvdXJjZSBmb3IgcmV2ZXJzZSBnZW9jb2RlXCIpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIG9uIHJldGlyZSBsZXMgcmVzc291cmVzIG5vbiByw6lmw6lyZW5jw6llcyBxdSdvbiBhIHB1IHJlbmNvbnRyZXJcbiAgICAgICAgICAgICAgICBpZiAod3JvbmdSZXNvdXJjZXNJbmRleGVzLmxlbmd0aCAhPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBmb3IgKGogPSAwOyBqIDwgd3JvbmdSZXNvdXJjZXNJbmRleGVzLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXNvdXJjZXMuc3BsaWNlKHdyb25nUmVzb3VyY2VzSW5kZXhlc1tqXSwgMSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGxvZ2dlci5sb2coXCJbUmV2ZXJzZUdlb2NvZGVdICdvcHRpb25zLnJlc291cmNlcycgcGFyYW1ldGVyIHNob3VsZCBiZSBhbiBhcnJheVwiKTtcbiAgICAgICAgICAgICAgICByZXNvdXJjZXMgPSBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gZXQgbGUgdGFibGVhdSBkZXMgZMOpbGltaXRhdGlvbnNcbiAgICAgICAgaWYgKG9wdGlvbnMuZGVsaW1pdGF0aW9ucykge1xuICAgICAgICAgICAgdmFyIGRlbGltaXRhdGlvbnMgPSBvcHRpb25zLmRlbGltaXRhdGlvbnM7XG4gICAgICAgICAgICAvLyBvbiB2w6lyaWZpZSBxdWUgbGEgbGlzdGUgZGVzIGRlbGltaXRhdGlvbnMgZXN0IGJpZW4gdW4gdGFibGVhdVxuICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoZGVsaW1pdGF0aW9ucykpIHtcbiAgICAgICAgICAgICAgICB2YXIgZGVsaW1pdGF0aW9uc0xpc3QgPSBbXCJDaXJjbGVcIiwgXCJQb2ludFwiLCBcIkV4dGVudFwiXTtcbiAgICAgICAgICAgICAgICB2YXIgd3JvbmdEZWxpbWl0YXRpb25zSW5kZXhlcyA9IFtdO1xuICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBkZWxpbWl0YXRpb25zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChkZWxpbWl0YXRpb25zTGlzdC5pbmRleE9mKGRlbGltaXRhdGlvbnNbaV0pID09PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gc2kgbGEgZGVsaW1pdGF0aW9ucyBuJ2VzdCBwYXMgcsOpZsOpcmVuY8OpZSwgb24gc3RvY2tlIHNvbiBpbmRleCBwb3VyIGxhIHJldGlyZXIgZHUgdGFibGVhdSAoYXByw6hzIGF2b2lyIHRlcm1pbsOpIGRlIHBhcmNvdXJpciBsZSB0YWJsZWF1KVxuICAgICAgICAgICAgICAgICAgICAgICAgd3JvbmdEZWxpbWl0YXRpb25zSW5kZXhlcy5wdXNoKGkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbG9nZ2VyLmxvZyhcIltSZXZlcnNlR2VvY29kZV0gb3B0aW9ucy5kZWxpbWl0YXRpb25zIDogXCIgKyBkZWxpbWl0YXRpb25zW2ldICsgXCIgaXMgbm90IGEgZGVsaW1pdGF0aW9uIGZvciByZXZlcnNlIGdlb2NvZGVcIik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gb24gcmV0aXJlIGxlcyByZXNzb3VyZXMgbm9uIHLDqWbDqXJlbmPDqWVzIHF1J29uIGEgcHUgcmVuY29udHJlclxuICAgICAgICAgICAgICAgIGlmICh3cm9uZ0RlbGltaXRhdGlvbnNJbmRleGVzLmxlbmd0aCAhPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBmb3IgKGogPSAwOyBqIDwgd3JvbmdEZWxpbWl0YXRpb25zSW5kZXhlcy5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGVsaW1pdGF0aW9ucy5zcGxpY2Uod3JvbmdEZWxpbWl0YXRpb25zSW5kZXhlc1tqXSwgMSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGxvZ2dlci5sb2coXCJbUmV2ZXJzZUdlb2NvZGVdICdvcHRpb25zLmRlbGltaXRhdGlvbnMnIHBhcmFtZXRlciBzaG91bGQgYmUgYW4gYXJyYXlcIik7XG4gICAgICAgICAgICAgICAgZGVsaW1pdGF0aW9ucyA9IG51bGw7X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BvdXZvaXIgbGVzIHN1cHByaW1lciBmYWNpbGVtZW50XG4gICAgICAgICAgICAgICAgdGhpcy5faW5wdXRGZWF0dXJlcyA9IG5ldyBDb2xsZWN0aW9uKCk7XG5cbiAgICAgICAgICAgICAgICAvLyBvbiBjcsOpZSBsYSBjb3VjaGUgcXVpIHZhIGFjY3VlaWxsaXIgbGVzIGZlYXR1cmVzXG4gICAgICAgICAgICAgICAgdGhpcy5faW5wdXRGZWF0dXJlc1NvdXJjZSA9IG5ldyBWZWN0b3JTb3VyY2Uoe1xuICAgICAgICAgICAgICAgICAgICBmZWF0dXJlcyA6IHRoaXMuX2lucHV0RmVhdHVyZXNcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB0aGlzLl9pbnB1dEZlYXR1cmVzTGF5ZXIgPSBuZXcgVmVjdG9yTGF5ZXIoe1xuICAgICAgICAgICAgICAgICAgICBzb3VyY2UgOiB0aGlzLl9pbnB1dEZlYXR1cmVzU291cmNlLFxuICAgICAgICAgICAgICAgICAgICBzdHlsZSA6IG5ldyBTdHlsZSh7XG4gICAgICAgICAgICAgICAgICAgICAgICBmaWxsIDogbmV3IEZpbGwoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yIDogXCJyZ2JhKDAsIDE4MywgMTUyLCAwLjMpXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgc3Ryb2tlIDogbmV3IFN0cm9rZSh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3IgOiBcInJnYmEoMCwgMTgzLCAxNTIsIDAuOClcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aCA6IDNcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgaW1hZ2UgOiBuZXcgSWNvbih7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3JjIDogTWFya2Vyc1tcInR1cnF1b2lzZUJsdWVcIl0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5jaG9yIDogWzAuNSwgMV1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgLy8gb24gcmFqb3V0ZSBsZSBjaGFtcCBncFJlc3VsdExheWVySWQgcGVybWV0dGFudCBkJ2lkZW50aWZpZXIgdW5lIGNvdWNoZSBjcsOpZSBwYXIgbGUgY29tcG9zYW50LiAocG91ciBsYXllclN3aXRjaGVyIHBhciBleClcbiAgICAgICAgICAgICAgICB0aGlzLl9pbnB1dEZlYXR1cmVzTGF5ZXIuZ3BSZXN1bHRMYXllcklkID0gXCJyZXZlcnNlR2VvY29kaW5nXCI7XG4gICAgICAgICAgICAgICAgLy8gb24gYWpvdXRlIGxhIGNvdWNoZSDDoCBsYSBjYXJ0ZVxuICAgICAgICAgICAgICAgIG1hcC5hZGRMYXllcih0aGlzLl9pbnB1dEZlYXR1cmVzTGF5ZXIpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyAyLiBDcsOpYXRpb24gZGUgbCdpbnRlcmFjdGlvbiBkZSBkZXNzaW4sIHNlbG9uIGxlIHR5cGUgZGUgZMOpbGltaXRhdGlvbiBzw6lsZWN0aW9ubsOpXG4gICAgICAgICAgICB2YXIgZGVsaW1pdGF0aW9uID0gdGhpcy5fY3VycmVudEdlb2NvZGluZ0RlbGltaXRhdGlvbi50b0xvd2VyQ2FzZSgpO1xuICAgICAgICAgICAgc3dpdGNoIChkZWxpbWl0YXRpb24pIHtcbiAgICAgICAgICAgICAgICBjYXNlIFwicG9pbnRcIjpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fYWN0aXZhdGVQb2ludEludGVyYWN0aW9uKG1hcCk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgXCJjaXJjbGVcIjpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fYWN0aXZhdGVDaXJjbGVJbnRlcmFjdGlvbihtYXApO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBjYXNlIFwiZXh0ZW50XCI6XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2FjdGl2YXRlQm94SW50ZXJhY3Rpb24obWFwKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIDMuIFNpIHVuIGxheWVyIHN3aXRjaGVyIGVzdCBwcsOpc2VudCBkYW5zIGxhIGNhcnRlLCBvbiBsdWkgYWZmZWN0ZSBkZXMgaW5mb3JtYXRpb25zIHBvdXIgY2V0dGUgY291Y2hlXG4gICAgICAgICAgICBtYXAuZ2V0Q29udHJvbHMoKS5mb3JFYWNoKFxuICAgICAgICAgICAgICAgIChjb250cm9sKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChjb250cm9sIGluc3RhbmNlb2YgTGF5ZXJTd2l0Y2hlcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gdW4gbGF5ZXIgc3dpdGNoZXIgZXN0IHByw6lzZW50IGRhbnMgbGEgY2FydGVcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBsYXllcklkID0gdGhpcy5faW5wdXRGZWF0dXJlc0xheWVyLmdwTGF5ZXJJZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIG9uIG4nYWpvdXRlIGRlcyBpbmZvcm1hdGlvbnMgcXVlIHMnaWwgbid5IGVuIGEgcGFzIGTDqWrDoCAoc2kgbGUgdGl0cmUgZXN0IGxlIG51bcOpcm8gcGFyIGTDqWZhdXQpXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY29udHJvbC5fbGF5ZXJzW2xheWVySWRdLnRpdGxlID09PSBsYXllcklkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5hZGRMYXllcihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5faW5wdXRGZWF0dXJlc0xheWVyLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZSA6IHRoaXMub3B0aW9ucy5sYXllckRlc2NyaXB0aW9uLnRpdGxlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzY3JpcHRpb24gOiB0aGlzLm9wdGlvbnMubGF5ZXJEZXNjcmlwdGlvbi5kZXNjcmlwdGlvblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sLnNldFJlbW92YWJsZSh0aGlzLl9pbnB1dEZlYXR1cmVzTGF5ZXIsIGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogdGhpcyBtZXRob2QgaXMgY2FsbGVkIGJ5IHRoaXMuX2FjdGl2YXRlTWFwSW50ZXJhY3Rpb24sXG4gICAgICogYW5kIGNyZWF0ZXMgbWFwIHBvaW50IGRyYXdpbmcgaW50ZXJhY3Rpb24uXG4gICAgICpcbiAgICAgKiBAcGFyYW0ge29sLk1hcH0gbWFwIC0gY29udHJvbCBtYXAuXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBSZXZlcnNlR2VvY29kZS5wcm90b3R5cGUuX2FjdGl2YXRlUG9pbnRJbnRlcmFjdGlvbiA9IGZ1bmN0aW9uIChtYXApIHtcbiAgICAgICAgLy8gaW50ZXJhY3Rpb24gcGVybWV0dGFudCBkZSBkZXNzaW5lciB1biBwb2ludFxuICAgICAgICB0aGlzLl9tYXBJbnRlcmFjdGlvbiA9IG5ldyBEcmF3SW50ZXJhY3Rpb24oe1xuICAgICAgICAgICAgc3R5bGUgOiBuZXcgU3R5bGUoe1xuICAgICAgICAgICAgICAgIGltYWdlIDogbmV3IENpcmNsZSh7XG4gICAgICAgICAgICAgICAgICAgIHJhZGl1cyA6IDAsXG4gICAgICAgICAgICAgICAgICAgIGZpbGwgOiBuZXcgRmlsbCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xvciA6IFwicmdiYSgwLCAxODMsIDE1MiwgMC44KVwiXG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgdHlwZSA6IChcIlBvaW50XCIpLFxuICAgICAgICAgICAgc291cmNlIDogdGhpcy5faW5wdXRGZWF0dXJlc1NvdXJjZVxuICAgICAgICB9KTtcblxuICAgICAgICB0aGlzLl9tYXBJbnRlcmFjdGlvbi5vbihcbiAgICAgICAgICAgIFwiZHJhd3N0YXJ0XCIsXG4gICAgICAgICAgICAoZSkgPT4ge1xuICAgICAgICAgICAgICAgIGxvZ2dlci5sb2coXCJvbiBkcmF3c3RhcnQgXCIsIGUpO1xuXG4gICAgICAgICAgICAgICAgLy8gb24gZWZmYWNlIGxlcyBwb2ludHMgcXVpIG9udCBwdSDDqnRyZSBzYWlzaXMgcHLDqWPDqWRlbW1lbnQgKG9uIHZpZGUgbGEgY29sbGVjdGlvbiBkZXMgZmVhdHVyZXMgZGUgbGEgY291Y2hlKVxuICAgICAgICAgICAgICAgIHRoaXMuX2lucHV0RmVhdHVyZXMuY2xlYXIoKTtcblxuICAgICAgICAgICAgICAgIC8vIG9uIHLDqWN1cMOocmUgbGVzIGNvb3Jkb25uw6llcyBkdSBwb2ludCBxdWkgdmllbnQgZCfDqnRyZSBzYWlzaVxuICAgICAgICAgICAgICAgIHRoaXMuX29uRHJhd1N0YXJ0KGUsIFwicG9pbnRcIik7XG4gICAgICAgICAgICB9XG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5fbWFwSW50ZXJhY3Rpb24ub24oXG4gICAgICAgICAgICBcImRyYXdlbmRcIixcbiAgICAgICAgICAgIChlKSA9PiB7XG4gICAgICAgICAgICAgICAgbG9nZ2VyLmxvZyhcIm9uIGRyYXdlbmRcIiwgZSk7XG5cbiAgICAgICAgICAgICAgICAvLyBvbiByw6ljdXDDqHJlIGxlIHJheW9uIGR1IGNlcmNsZSBxdWkgdmllbnQgZCfDqnRyZSB0cmFjw6lcbiAgICAgICAgICAgICAgICBpZiAoZS5mZWF0dXJlICYmIGUuZmVhdHVyZS5nZXRHZW9tZXRyeSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9yZXF1ZXN0R2VvbSA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgOiBcIlBvaW50XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBjb29yZGluYXRlcyA6IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9yZXF1ZXN0UG9zaXRpb24ubG9uLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3JlcXVlc3RQb3NpdGlvbi5sYXRcbiAgICAgICAgICAgICAgICAgICAgICAgIF1cbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICk7XG5cbiAgICAgICAgbWFwLmFkZEludGVyYWN0aW9uKHRoaXMuX21hcEludGVyYWN0aW9uKTtcbiAgICAgICAgdGhpcy5fc2V0Q3Vyc29yKFwiY3Jvc3NoYWlyXCIsIG1hcCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIHRoaXMgbWV0aG9kIGlzIGNhbGxlZCBieSB0aGlzLl9hY3RpdmF0ZU1hcEludGVyYWN0aW9uLFxuICAgICAqIGFuZCBjcmVhdGVzIG1hcCBjaXJjbGUgZHJhd2luZyBpbnRlcmFjdGlvbi5cbiAgICAgKlxuICAgICAqIEBwYXJhbSB7b2wuTWFwfSBtYXAgLSBjb250cm9sIG1hcC5cbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqL1xuICAgIFJldmVyc2VHZW9jb2RlLnByb3RvdHlwZS5fYWN0aXZhdGVDaXJjbGVJbnRlcmFjdGlvbiA9IGZ1bmN0aW9uIChtYXApIHtcbiAgICAgICAgLy8gaW50ZXJhY3Rpb24gcGVybWV0dGFudCBkZSBkZXNzaW5lciB1biBjZXJjbGVcbiAgICAgICAgdGhpcy5fbWFwSW50ZXJhY3Rpb24gPSBuZXcgRHJhd0ludGVyYWN0aW9uKHtcbiAgICAgICAgICAgIHN0eWxlIDogbmV3IFN0eWxlKHtcbiAgICAgICAgICAgICAgICBmaWxsIDogbmV3IEZpbGwoe1xuICAgICAgICAgICAgICAgICAgICBjb2xvciA6IFwicmdiYSgwLCAxODMsIDE1MiwgMC4zKVwiXG4gICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgc3Ryb2tlIDogbmV3IFN0cm9rZSh7XG4gICAgICAgICAgICAgICAgICAgIGNvbG9yIDogXCJyZ2JhKDAsIDE4MywgMTUyLCAwLjgpXCIsXG4gICAgICAgICAgICAgICAgICAgIHdpZHRoIDogM1xuICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgIGltYWdlIDogbmV3IENpcmNsZSh7XG4gICAgICAgICAgICAgICAgICAgIHJhZGl1cyA6IDQsXG4gICAgICAgICAgICAgICAgICAgIGZpbGwgOiBuZXcgRmlsbCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xvciA6IFwicmdiYSgwLCAxODMsIDE1MiwgMC44KVwiXG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgdHlwZSA6IChcIkNpcmNsZVwiKSxcbiAgICAgICAgICAgIHNvdXJjZSA6IHRoaXMuX2lucHV0RmVhdHVyZXNTb3VyY2VcbiAgICAgICAgfSk7XG5cbiAgICAgICAgdGhpcy5fbWFwSW50ZXJhY3Rpb24ub24oXG4gICAgICAgICAgICBcImRyYXdzdGFydFwiLFxuICAgICAgICAgICAgKGUpID0+IHtcbiAgICAgICAgICAgICAgICBsb2dnZXIubG9nKFwib24gZHJhd3N0YXJ0IFwiLCBlKTtcbiAgICAgICAgICAgICAgICAvLyBvbiBlZmZhY2UgbGVzIHBvaW50cyBxdWkgb250IHB1IMOqdHJlIHNhaXNpcyBwcsOpY8OpZGVtbWVudCAob24gdmlkZSBsYSBjb2xsZWN0aW9uIGRlcyBmZWF0dXJlcyBkZSBsYSBjb3VjaGUpXG4gICAgICAgICAgICAgICAgdGhpcy5faW5wdXRGZWF0dXJlcy5jbGVhcigpO1xuICAgICAgICAgICAgICAgIC8vIG9uIHLDqWN1cMOocmUgbGVzIGNvb3Jkb25uw6llcyBkdSBjZW50cmUgZHUgY2VyY2xlID0gcHJlbWllciBwb2ludCBkdSB0cmFjw6lcbiAgICAgICAgICAgICAgICB0aGlzLl9vbkRyYXdTdGFydChlLCBcImNpcmNsZVwiKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgKTtcblxuICAgICAgICB0aGlzLl9tYXBJbnRlcmFjdGlvbi5vbihcbiAgICAgICAgICAgIFwiZHJhd2VuZFwiLFxuICAgICAgICAgICAgKGUpID0+IHtcbiAgICAgICAgICAgICAgICBsb2dnZXIubG9nKFwib24gZHJhd2VuZFwiLCBlKTtcblxuICAgICAgICAgICAgICAgIC8vIG9uIHLDqWN1cMOocmUgbGUgcmF5b24gZHUgY2VyY2xlIHF1aSB2aWVudCBkJ8OqdHJlIHRyYWPDqVxuICAgICAgICAgICAgICAgIGlmIChlLmZlYXR1cmUgJiYgZS5mZWF0dXJlLmdldEdlb21ldHJ5KSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciByYWRpdXMgPSBlLmZlYXR1cmUuZ2V0R2VvbWV0cnkoKS5nZXRSYWRpdXMoKTtcbiAgICAgICAgICAgICAgICAgICAgLy8gZXQgb24gbGUgc3RvY2tlIGNvbW1lIGZpbHRyZSBwb3VyIGxhIHJlcXXDqnRlXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3JlcXVlc3RHZW9tID0ge307XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3JlcXVlc3RHZW9tLnR5cGUgPSBcIkNpcmNsZVwiO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9yZXF1ZXN0R2VvbS5yYWRpdXMgPSByYWRpdXM7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl9yZXF1ZXN0UG9zaXRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3JlcXVlc3RHZW9tLmNvb3JkaW5hdGVzID0gW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3JlcXVlc3RQb3NpdGlvbi5sb24sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fcmVxdWVzdFBvc2l0aW9uLmxhdFxuICAgICAgICAgICAgICAgICAgICAgICAgXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBsb2dnZXIubG9nKFwiY2lyY2xlIHJhZGl1cyA6IFwiLCByYWRpdXMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgKTtcblxuICAgICAgICBtYXAuYWRkSW50ZXJhY3Rpb24odGhpcy5fbWFwSW50ZXJhY3Rpb24pO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiB0aGlzIG1ldGhvZCBpcyBjYWxsZWQgYnkgdGhpcy5fYWN0aXZhdGVNYXBJbnRlcmFjdGlvbixcbiAgICAgKiBhbmQgY3JlYXRlcyBtYXAgYm94IGRyYXdpbmcgaW50ZXJhY3Rpb24uXG4gICAgICpcbiAgICAgKiBAcGFyYW0ge29sLk1hc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2YXIgc3RhcnQgPSBjb29yZGluYXRlc1swXTtcbiAgICAgICAgICAgIHZhciBlbmQgPSBjb29yZGluYXRlc1sxXTtcbiAgICAgICAgICAgIC8vIG9uIGNyw6llIGxlcyA1IGNvb3Jkb25uw6llcyBkZSBsYSBsaWduZSDDoCBwYXJ0aXIgZGVzIDIgcG9pbnRzIHNhaXNpcy5cbiAgICAgICAgICAgIGdlb21ldHJ5LnNldENvb3JkaW5hdGVzKFtcbiAgICAgICAgICAgICAgICBbc3RhcnQsIFtzdGFydFswXSwgZW5kWzFdXSwgZW5kLCBbZW5kWzBdLCBzdGFydFsxXV0sIHN0YXJ0XVxuICAgICAgICAgICAgXSk7XG4gICAgICAgICAgICByZXR1cm4gZ2VvbWV0cnk7XG4gICAgICAgIH07XG5cbiAgICAgICAgLy8gaW50ZXJhY3Rpb24gcGVybWV0dGFudCBkZSBkZXNzaW5lciB1biByZWN0YW5nbGUgKD0gTGluZVN0cmluZyBkZSA1IHBvaW50cywgw6AgcGFydGlyIGRlIDIgcG9pbnRzIHNhaXNpcylcbiAgICAgICAgdGhpcy5fbWFwSW50ZXJhY3Rpb24gPSBuZXcgRHJhd0ludGVyYWN0aW9uKHtcbiAgICAgICAgICAgIHN0eWxlIDogbmV3IFN0eWxlKHtcbiAgICAgICAgICAgICAgICBmaWxsIDogbmV3IEZpbGwoe1xuICAgICAgICAgICAgICAgICAgICBjb2xvciA6IFwicmdiYSgwLCAxODMsIDE1MiwgMC4zKVwiXG4gICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgc3Ryb2tlIDogbmV3IFN0cm9rZSh7XG4gICAgICAgICAgICAgICAgICAgIGNvbG9yIDogXCJyZ2JhKDAsIDE4MywgMTUyLCAwLjgpXCIsXG4gICAgICAgICAgICAgICAgICAgIHdpZHRoIDogM1xuICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgIGltYWdlIDogbmV3IENpcmNsZSh7XG4gICAgICAgICAgICAgICAgICAgIHJhZGl1cyA6IDQsXG4gICAgICAgICAgICAgICAgICAgIGZpbGwgOiBuZXcgRmlsbCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xvciA6IFwicmdiYSgwLCAxODMsIDE1MiwgMC44KVwiXG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgdHlwZSA6IChcIkxpbmVTdHJpbmdcIiksXG4gICAgICAgICAgICBzb3VyY2UgOiB0aGlzLl9pbnB1dEZlYXR1cmVzU291cmNlLFxuICAgICAgICAgICAgbWF4UG9pbnRzIDogMixcbiAgICAgICAgICAgIGdlb21ldHJ5RnVuY3Rpb24gOiBnZW9tZXRyeUZ1bmN0aW9uXG4gICAgICAgIH0pO1xuXG4gICAgICAgIHRoaXMuX21hcEludGVyYWN0aW9uLm9uKFxuICAgICAgICAgICAgXCJkcmF3c3RhcnRcIixcbiAgICAgICAgICAgIChlKSA9PiB7XG4gICAgICAgICAgICAgICAgbG9nZ2VyLmxvZyhcIm9uIGRyYXdzdGFydFwiLCBlKTtcbiAgICAgICAgICAgICAgICAvLyBvbiBlZmZhY2UgbGVzIHBvaW50cyBxdWkgb250IHB1IMOqdHJlIHNhaXNpcyBwcsOpY8OpZGVtbWVudCAob24gdmlkZSBsYSBjb2xsZWN0aW9uIGRlcyBmZWF0dXJlcyBkZSBsYSBjb3VjaGUpXG4gICAgICAgICAgICAgICAgdGhpcy5faW5wdXRGZWF0dXJlcy5jbGVhcigpO1xuICAgICAgICAgICAgfVxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuX21hcEludGVyYWN0aW9uLm9uKFxuICAgICAgICAgICAgXCJkcmF3ZW5kXCIsXG4gICAgICAgICAgICAoZSkgPT4ge1xuICAgICAgICAgICAgICAgIGxvZ2dlci5sb2coXCJvbiBkcmF3ZW5kXCIsIGUpO1xuICAgICAgICAgICAgICAgIC8vIG9uIHZhIHLDqWN1cMOpcmVyIGxlc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SBzdGFydEdlb0Nvb3JkaW5hdGVbMV07XG4gICAgICAgICAgICAgICAgYmJveC50b3AgPSBlbmRHZW9Db29yZGluYXRlWzFdO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBiYm94LmJvdHRvbSA9IGVuZEdlb0Nvb3JkaW5hdGVbMV07XG4gICAgICAgICAgICAgICAgYmJveC50b3AgPSBzdGFydEdlb0Nvb3JkaW5hdGVbMV07XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMuX3JlcXVlc3RHZW9tID0ge1xuICAgICAgICAgICAgICAgIHR5cGUgOiBcIlBvbHlnb25cIixcbiAgICAgICAgICAgICAgICBjb29yZGluYXRlcyA6IFtbXG4gICAgICAgICAgICAgICAgICAgIFtiYm94LmxlZnQsIGJib3gudG9wXSxcbiAgICAgICAgICAgICAgICAgICAgW2Jib3gucmlnaHQsIGJib3gudG9wXSxcbiAgICAgICAgICAgICAgICAgICAgW2Jib3gucmlnaHQsIGJib3guYm90dG9tXSxcbiAgICAgICAgICAgICAgICAgICAgW2Jib3gubGVmdCwgYmJveC5ib3R0b21dLFxuICAgICAgICAgICAgICAgICAgICBbYmJveC5sZWZ0LCBiYm94LnRvcF1cbiAgICAgICAgICAgICAgICBdXVxuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgbG9nZ2VyLmxvZyhcInNlYXJjaEdlb21ldHJ5IGZpbHRlciA6IFwiLCB0aGlzLl9yZXF1ZXN0R2VvbSk7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogdGhpcyBjaGFuZ2UgdGhlIGN1cnNvciBvZiB0aGUgbWFwIHdoZW4gZW50ZXJpbmcgYSBwb2ludC5cbiAgICAgKlxuICAgICAqIEBwYXJhbSB7U3RyaW5nfSBjdXJzb3IgLSBjdXJzb3Igc3R5bGVcbiAgICAgKiBAcGFyYW0ge29sLk1hcH0gbWFwIC0gY29udHJvbCBtYXAgKG9wdGlvbmFsK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W9ucyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChiT25TdWNjZXNzKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldmVyc2VHZW9jb2RlT3B0aW9ucy5vblN1Y2Nlc3MuY2FsbChjb250ZXh0LCByZXNwb25zZS5sb2NhdGlvbnMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAvLyBjYWxsYmFjayBvbkZhaWx1cmVcbiAgICAgICAgICAgIG9uRmFpbHVyZSA6IGZ1bmN0aW9uIChlcnJvcikge1xuICAgICAgICAgICAgICAgIC8vIEZJWE1FIG1pc2Ugw6Agam91ciBkdSBjb250cm9sZSBtYWlzIGxlIHNlcnZpY2UgbmUgcmVwb25kIHBhcyBlbiAyMDAgIT9cblxuICAgICAgICAgICAgICAgIC8vIG9uIGNhY2hlIGxhIHBhdGllbmNlXG4gICAgICAgICAgICAgICAgY29udGV4dC5faGlkZVdhaXRpbmdDb250YWluZXIoKTtcblxuICAgICAgICAgICAgICAgIC8vIHN1cHByZXNzaW9uIGQnw6l2ZW50dWVscyByw6lzdWx0YXRzIHByw6ljw6lkZW50c1xuICAgICAgICAgICAgICAgIGNvbnRleHQuX2NsZWFyUmVzdWx0cygpO1xuICAgICAgICAgICAgICAgIC8vIG9uIGVmZmFjZSBsZXMgcG9pbnRzIHF1aSBvbnQgw6l0w6kgc2Fpc2lzIHByw6ljw6lkZW1tZW50XG4gICAgICAgICAgICAgICAgY29udGV4dC5fY2xlYXJJbnB1dEZlYXR1cmVzKCk7XG5cbiAgICAgICAgICAgICAgICAvLyBldCBvbiByw6lhY3RpdmUgbCdpbnRlcmFjdGlvbiBzdXIgbGEgbWFwXG4gICAgICAgICAgICAgICAgY29udGV4dC5fYWN0aXZhdGVNYXBJbnRlcmFjdGlvbihtYXApO1xuICAgICAgICAgICAgICAgIGxvZ2dlci5sb2coZXJyb3IubWVzc2FnZSk7XG5cbiAgICAgICAgICAgIC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Igc2Vsb24gbGUgdHlwZVxuICAgICAgICBzd2l0Y2ggKGxvY2F0aW9uLnR5cGUpIHtcbiAgICAgICAgICAgIGNhc2UgXCJTdHJlZXRBZGRyZXNzXCI6XG4gICAgICAgICAgICAgICAgaWYgKGF0dHIuc3RyZWV0KSB7XG4gICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uRGVzY3JpcHRpb24gKz0gYXR0ci5ob3VzZW51bWJlciA/IGF0dHIuaG91c2VudW1iZXIgKyBcIiBcIiA6IFwiXCI7XG4gICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uRGVzY3JpcHRpb24gKz0gYXR0ci5zdHJlZXQgKyBcIiwgXCI7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGxvY2F0aW9uRGVzY3JpcHRpb24gKz0gYXR0ci5wb3N0Y29kZSArIFwiIFwiICsgYXR0ci5jaXR5O1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlIFwiUG9zaXRpb25PZkludGVyZXN0XCI6XG4gICAgICAgICAgICAgICAgbG9jYXRpb25EZXNjcmlwdGlvbiArPSBhdHRyLnRvcG9ueW07XG4gICAgICAgICAgICAgICAgaWYgKGF0dHIucG9zdGNvZGUubGVuZ3RoID09PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uRGVzY3JpcHRpb24gKz0gXCIsIFwiICsgYXR0ci5wb3N0Y29kZVswXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbG9jYXRpb25EZXNjcmlwdGlvbiArPSBcIiAoXCIgKyBhdHRyLmNhdGVnb3J5LmpvaW4oXCIsXCIpICsgXCIpXCI7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgXCJDYWRhc3RyYWxQYXJjZWxcIjpcbiAgICAgICAgICAgICAgICBsb2NhdGlvbkRlc2NyaXB0aW9uICs9IGF0dHIuaWQ7XG4gICAgICAg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AgICAgICAgICAgICBnZW9jb2RlVHlwZSA9IFwidG9wb255bWVzXCI7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgXCJDYWRhc3RyYWxQYXJjZWxcIjpcbiAgICAgICAgICAgICAgICAgICAgZ2VvY29kZVR5cGUgPSBcInBhcmNlbGxlcyBjYWRhc3RyYWxlc1wiO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIG1hcC5nZXRDb250cm9scygpLmZvckVhY2goXG4gICAgICAgICAgICAgICAgKGNvbnRyb2wpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbnRyb2wgaW5zdGFuY2VvZiBMYXllclN3aXRjaGVyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB1biBsYXllciBzd2l0Y2hlciBlc3QgcHLDqXNlbnQgZGFucyBsYSBjYXJ0ZVxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGxheWVySWQgPSB0aGlzLl9yZXN1bHRzRmVhdHVyZXNMYXllci5ncExheWVySWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBvbiBuJ2Fqb3V0ZSBkZXMgaW5mb3JtYXRpb25zIHF1ZSBzJ2lsIG4neSBlbiBhIHBhcyBkw6lqw6AgKHNpIGxlIHRpdHJlIGVzdCBsZSBudW3DqXJvIHBhciBkw6lmYXV0KVxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbnRyb2wuX2xheWVyc1tsYXllcklkXS50aXRsZSA9PT0gbGF5ZXJJZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRyb2wuYWRkTGF5ZXIoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3Jlc3VsdHNGZWF0dXJlc0xheWVyLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZSA6IFwiUsOpc3VsdGF0cyBkZSBsYSByZWNoZXJjaGUgaW52ZXJzZVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzY3JpcHRpb24gOiBcIlLDqXN1bHRhdHMgZGUgbGEgcmVjaGVyY2hlIGludmVyc2Ugc3VyIGxlcyBcIiArIGdlb2NvZGVUeXBlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRyb2wuc2V0UmVtb3ZhYmxlKHRoaXMuX3Jlc3VsdHNGZWF0dXJlc0xheWVyLCBmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIHRoaXMgbWV0aG9kIGlzIGNhbGxlZCBieSB0aGlzLl9kaXNwbGF5R2VvY29kZWRMb2NhdGlvbnMoKVxuICAgICAqIGFuZCBjcmVhdGVzIHJlc3VsdCBsYXllciAod2hlcmUgZ2VvY29kZWQgbG9jYXRpb25zIHdpbGwgYmUgZGlzcGxheWVkKVxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBSZXZlcnNlR2VvY29kZS5wcm90b3R5cGUuX2NyZWF0ZVJlc3VsdHNMYXllciA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyIG1hcCA9IHRoaXMuZ2V0TWFwKCk7XG5cbiAgICAgICAgdGhpcy5fcmVzdWx0c0ZlYXR1cmVzID0gbmV3IENvbGxlY3Rpb24oKTtcblxuICAgICAgICAvLyBvbiBjcsOpZSBsYSBjb3VjaGUgcXVpIHZhIGFjY3VlaWxsaXIgbGVzIGZlYXR1c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biAgICAgICAgdmFyIGF0dHJpYnV0ZXMgPSBsb2NhdGlvbi5wbGFjZUF0dHJpYnV0ZXM7XG4gICAgICAgIGZvciAodmFyIGF0dHIgaW4gYXR0cmlidXRlcykge1xuICAgICAgICAgICAgaWYgKGF0dHJpYnV0ZXMuaGFzT3duUHJvcGVydHkoYXR0cikpIHtcbiAgICAgICAgICAgICAgICBpZiAoYXR0ciAhPT0gXCJ0cnVlR2VvbWV0cnlcIiAmJiBhdHRyICE9PSBcImV4dHJhRmllbGRzXCIgJiYgYXR0ciAhPT0gXCJob3VzZU51bWJlckluZm9zXCIgJiYgYXR0ciAhPT0gXCJfY291bnRcIikge1xuICAgICAgICAgICAgICAgICAgICBwb3B1cENvbnRlbnQgKz0gXCI8bGk+XCI7XG4gICAgICAgICAgICAgICAgICAgIHBvcHVwQ29udGVudCArPSBcIjxzcGFuIGNsYXNzPVxcXCJncC1hdHRuYW1lLW90aGVycy1zcGFuXFxcIj5cIiArIGF0dHIudG9VcHBlckNhc2UoKSArIFwiIDogPC9zcGFuPlwiO1xuICAgICAgICAgICAgICAgICAgICBwb3B1cENvbnRlbnQgKz0gYXR0cmlidXRlc1thdHRyXTtcbiAgICAgICAgICAgICAgICAgICAgcG9wdXBDb250ZW50ICs9IFwiIDwvbGk+XCI7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHBvcHVwQ29udGVudCArPSBcIiA8L3VsPlwiO1xuXG4gICAgICAgIHJldHVybiBwb3B1cENvbnRlbnQ7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIHRoaXMgbWV0aG9kIGlzIGNhbGxlZCBvbiAncG9pbnRlck1vdmUnIG9uIHRoaXMuX3Jlc3VsdHNGZWF0dXJlc0xheWVyIChvbC5pbnRlcmFjdGlvbi5TZWxlY3QpXG4gICAgICogKGNmLiB0aGlzLl9kaXNwbGF5R2VvY29kZWRMb2NhdGlvbnNPbk1hcCgpIClcbiAgICAgKi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AgdGhpcy5fcG9wdXBPdmVybGF5ID0gbmV3IE92ZXJsYXkoe1xuICAgICAgICAgICAgICAgICAgICBlbGVtZW50IDogdGhpcy5fcG9wdXBEaXYsXG4gICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uaW5nIDogXCJib3R0b20tY2VudGVyXCIsXG4gICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uIDogZS5tYXBCcm93c2VyRXZlbnQuY29vcmRpbmF0ZVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIG1hcC5hZGRPdmVybGF5KHRoaXMuX3BvcHVwT3ZlcmxheSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIHNpIGwnb3ZlcmxheSBlc3QgZMOpasOgIGNyw6nDqSwgb24gbW9kaWZpZSBqdXN0ZSBzYSBwb3NpdGlvblxuICAgICAgICAgICAgICAgIHRoaXMuX3BvcHVwT3ZlcmxheS5zZXRQb3NpdGlvbihlLm1hcEJyb3dzZXJFdmVudC5jb29yZGluYXRlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBldmVudCB0cmlnZ2VyZWQgd2hlbiBhbiBlbGVtZW50IG9mIHRoZSByZXN1bHRzIGlzIGNsaWNrZWRcbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBAZXZlbnQgcmV2ZXJzZWdlb2NvZGU6b25jbGlja3Jlc3VsdFxuICAgICAgICAgICAgICogQHByb3BlcnR5IHtPYmplY3R9IHR5cGUgLSBldmVudFxuICAgICAgICAgICAgICogQHByb3BlcnR5IHtPYmplY3R9IGxvY2F0aW9uIC0gbG9jYXRpb25cbiAgICAgICAgICAgICAqIEBwcm9wZXJ0eSB7T2JqZWN0fSB0YXJnZXQgLSBpbnN0YW5jZSBSZXZlcnNlR2VvY29kZVxuICAgICAgICAgICAgICogQGV4YW1wbGVcbiAgICAgICAgICAgICAqIFJldmVyc2Uub24oXCJ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bCAoY2FjaGVyIGxhIHBhdGllbmNlKVxuICAgICAgICAvLyBzaSBvbiBlc3QgdG91am91cnMgZW4gYXR0ZW50ZSAoc2kgbGEgcmVxdcOqdGUgZXN0IGJsb3F1w6llIHBhciBleGVtcGxlKVxuICAgICAgICBpZiAodGhpcy5fdGltZXIpIHtcbiAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aGlzLl90aW1lcik7XG4gICAgICAgICAgICB0aGlzLl90aW1lciA9IG51bGw7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIGNvbnRleHQgPSB0aGlzO1xuICAgICAgICB0aGlzLl90aW1lciA9IHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgaWYgKGNvbnRleHQuX3dhaXRpbmcgPT09IHRydWUpIHtcbiAgICAgICAgICAgICAgICBjb250ZXh0Ll9oaWRlV2FpdGluZ0NvbnRhaW5lcigpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAoY29udGV4dC5fdGltZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KGNvbnRleHQuX3RpbWVyKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sIDE2MDAwKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogdGhpcyBtZXRob2QgaGlkZXMgd2FpdGluZyBjb250YWluZXIgYW5kIGNsZWFycyB0aW1lb3V0XG4gICAgICpcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqL1xuICAgIFJldmVyc2VHZW9jb2RlLnByb3RvdHlwZS5faGlkZVdhaXRpbmdDb250YWluZXIgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIGlmICh0aGlzLl93YWl0aW5nKSB7XG4gICAgICAgICAgICB0aGlzLl93YWl0aW5nQ29udGFpbmVyLmNsYXNzTmFtZSA9IFwiR1Byb3V0ZUNhbGNXYWl0aW5nQ29udGFpbmVySGlkZGVuXCI7XG4gICAgICAgICAgICB0aGlzLl93YWl0aW5nID0gZmFsc2U7XG4gICAgICAgICAgICBjbGVhclRpbWVvdXQodGhpcy5fdGltZXIpO1xuICAgICAgICAgICAgdGhpcy5fdGltZXIgPSBudWxsO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIHJldHVybiBSZXZlcnNlR2VvY29kZTtcbn0oQ29udHJvbCkpO1xuXG5leHBvcnQgZGVmYXVsdCBSZXZlcnNlR2VvY29kZTtcblxuLy8gRXhwb3NlIFJldmVyc2VHZW9jb2RlIGFzIG9sLmNvbnRyb2wuUmV2ZXJzZUdlb2NvZGUgKGZvciBhIGJ1aWxkIGJ1bmRsZSlcbmlmICh3aW5kb3cub2wgJiYgd2luZG93Lm9sLmNvbnRyb2wpIHtcbiAgICB3aW5kb3cub2wuY29udHJvbC5SZXZlcnNlR2VvY29kZSA9IFJldmVyc2VHZW9jb2RlO1xufVxuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/OpenLayers/Controls/ReverseGeocode.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CSS_Controls_ReverseGeocoding_GPreverseGeocodingOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../CSS/Controls/ReverseGeocoding/GPreverseGeocodingOpenLayers.css */ \"./src/OpenLayers/CSS/Controls/ReverseGeocoding/GPreverseGeocodingOpenLayers.css\");\n/* harmony import */ var _CSS_Controls_ReverseGeocoding_GPreverseGeocodingOpenLayers_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_ReverseGeocoding_GPreverseGeocodingOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ol/control/Control */ \"ol/control/Control\");\n/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_control_Control__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ol/Overlay */ \"ol/Overlay\");\n/* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ol_Overlay__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var ol_Collection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ol/Collection */ \"ol/Collection\");\n/* harmony import */ var ol_Collection__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ol_Collection__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var ol_Feature__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ol/Feature */ \"ol/Feature\");\n/* harmony import */ var ol_Feature__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(ol_Feature__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ol/style */ \"ol/style\");\n/* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(ol_style__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var ol_geom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ol/geom */ \"ol/geom\");\n/* harmony import */ var ol_geom__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(ol_geom__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var ol_interaction__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ol/interaction */ \"ol/interaction\");\n/* harmony import */ var ol_interaction__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(ol_interaction__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var ol_events_condition__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ol/events/condition */ \"ol/events/condition\");\n/* harmony import */ var ol_events_condition__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(ol_events_condition__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ol/proj */ \"ol/proj\");\n/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(ol_proj__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ol/layer/Vector */ \"ol/layer/Vector\");\n/* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(ol_layer_Vector__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var ol_source_Vector__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ol/source/Vector */ \"ol/source/Vector\");\n/* harmony import */ var ol_source_Vector__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(ol_source_Vector__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! geoportal-access-lib */ \"./node_modules/geoportal-access-lib/src/Gp.js\");\n/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Common/Utils */ \"./src/Common/Utils.js\");\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../Common/Utils/SelectorID */ \"./src/Common/Utils/SelectorID.js\");\n/* harmony import */ var _Utils_Markers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Utils/Markers */ \"./src/OpenLayers/Controls/Utils/Markers.js\");\n/* harmony import */ var _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../Common/Utils/Draggable */ \"./src/Common/Utils/Draggable.js\");\n/* harmony import */ var _Utils_Interactions__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Utils/Interactions */ \"./src/OpenLayers/Controls/Utils/Interactions.js\");\n/* harmony import */ var _LayerSwitcher__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./LayerSwitcher */ \"./src/OpenLayers/Controls/LayerSwitcher.js\");\n/* harmony import */ var _Common_Controls_ReverseGeocodingDOM__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../Common/Controls/ReverseGeocodingDOM */ \"./src/Common/Controls/ReverseGeocodingDOM.js\");\n// import CSS\n\n// import OpenLayers\n\n\n\n\n\n\n\n\n\n\n\n// import geoportal library access\n\n// import local\n\n\n\n\n\n\n// import local with ol dependencies\n\n// DOM\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_14__[\"default\"].getLogger(\"reversegeocoding\");\n\n/**\n * @classdesc\n *\n * ReverseGeocode Control.\n *\n * @constructor\n * @alias ol.control.ReverseGeocode\n * @type {ol.control.ReverseGeocode}\n * @extends {ol.control.Control}\n * @param {Object} options - ReverseGeocode control options\n * @param {String} [options.apiKey] - API key for services call (reverse geocode service). The key \"calcul\" is used by default.\n * @param {String} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol)\n * @param {Boolean} [options.collapsed = true] - Specify if widget has to be collapsed (true) or not (false) on map loading. Default is true.\n * @param {Boolean} [options.draggable = false] - Specify if widget is draggable\n * @param {Object} [options.resources = [\"StreetAddress\", \"PositionOfInterest\", \"CadastralParcel\"]] - resources for geocoding, by default : [\"StreetAddress\", \"PositionOfInterest\", \"CadastralParcel\"]. Possible values are : \"StreetAddress\", \"PositionOfInterest\", \"CadastralParcel\". Resources will be displayed in the same order in widget list.\n * @param {Object} [options.delimitations = [\"Point\", \"Circle\", \"Extent\"]] - delimitations for reverse geocoding, by default : [\"Point\", \"Circle\", \"Extent\"]. Possible values are : \"Point\", \"Circle\", \"Extent\". Delimitations will be displayed in the same order in widget list.\n * @param {Object} [options.reverseGeocodeOptions = {}] - reverse geocode service options. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~reverseGeocode Gp.Services.reverseGeocode()} to know all reverse geocode options.\n * @param {Object} [options.layerDescription = {}] - Layer informations to be displayed in LayerSwitcher widget (only if a LayerSwitcher is also added to the map)\n * @param {String} [options.layerDescription.title = \"Saisie (recherche inverse)\"] - Layer title to be displayed in LayerSwitcher\n * @param {String} [options.layerDescription.description = \"Couche de saisie d'une zone de recherche pour la recherche inverse\"] - Layer description to be displayed in LayerSwitcher\n * @fires reversegeocode:compute\n * @fires reversegeocode:onclickresult\n * @example\n * var iso = ol.control.ReverseGeocode({\n * \"collapsed\" : false,\n * \"draggable\" : true,\n * \"resources\" : [\"StreetAddress\", \"PositionOfInterest\"],\n * \"delimitations\" : [\"Point\", \"Circle\"],\n * \"reverseGeocodeOptions\" : {}\n * });\n */\nvar ReverseGeocode = function (Control) {\n /**\n * See {@link ol.control.ReverseGeocode}\n * @module ReverseGeocode\n * @alias module:~Controls/ReverseGeocode\n * @param {*} options - options\n * @example\n * import ReverseGeocode from \"src/OpenLayers/Controls/ReverseGeocode\"\n */\n function ReverseGeocode(options) {\n options = options || {};\n if (!(this instanceof ReverseGeocode)) {\n throw new TypeError(\"ERROR CLASS_CONSTRUCTOR\");\n }\n\n // initialisation du composant\n this.initialize(options);\n\n // Widget main DOM container\n this._container = this._initContainer();\n this._containerElement = null;\n\n // on peut éventuellement encapsuler le composant dans une div passée par l'utilisateur\n if (options.element && options.element.appendChild) {\n // dans ce cas on stocke les deux container\n options.element.appendChild(this._container);\n this._containerElement = options.element;\n }\n\n // call ol.control.Control constructor\n Control.call(this, {\n element: this._containerElement || this._container,\n target: options.target,\n render: options.render\n });\n }\n ;\n\n // Inherits from ol.control.Control\n if (Control) ReverseGeocode.__proto__ = Control;\n\n /**\n * @lends module:ReverseGeocode\n */\n ReverseGeocode.prototype = Object.create(Control.prototype, {});\n\n // on récupère les méthodes de la classe commune ReverseGeocodingDOM\n _Common_Utils__WEBPACK_IMPORTED_MODULE_13__[\"default\"].assign(ReverseGeocode.prototype, _Common_Controls_ReverseGeocodingDOM__WEBPACK_IMPORTED_MODULE_20__[\"default\"]);\n\n /**\n * Constructor (alias)\n *\n * @private\n */\n ReverseGeocode.prototype.constructor = ReverseGeocode;\n\n // ################################################################### //\n // ############## public methods (getters, setters) ################## //\n // ################################################################### //\n\n /**\n * Returns true if widget is collapsed (minimized), false otherwise\n *\n * @returns {Boolean} collapsed - true if widget is collapsed\n */\n ReverseGeocode.prototype.getCollapsed = function () {\n return this.collapsed;\n };\n\n /**\n * Collapse or display widget main container\n *\n * @param {Boolean} collapsed - True to collapse widget, False to display it\n */\n ReverseGeocode.prototype.setCollapsed = function (collapsed) {\n if (collapsed === undefined) {\n logger.log(\"[ERROR] ReverseGeocode:setCollapsed - missing collapsed parameter\");\n return;\n }\n if (collapsed && this.collapsed || !collapsed && !this.collapsed) {\n return;\n }\n if (collapsed) {\n document.getElementById(\"GPreverseGeocodingPanelClose-\" + this._uid).click();\n } else {\n document.getElementById(\"GPshowReverseGeocoding-\" + this._uid).click();\n }\n this.collapsed = collapsed;\n };\n\n /**\n * Overwrite OpenLayers setMap method\n *\n * @param {ol.Map} map - Map.\n */\n ReverseGeocode.prototype.setMap = function (map) {\n if (map) {\n // lors de l'ajout à la map, on active la saisie du point ou de la zone de recherche sur la carte,\n // mais seulement si le widget est ouvert\n this._activateMapInteraction(map);\n\n // mode \"draggable\"\n if (this.draggable) {\n _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_17__[\"default\"].dragElement(this._panelContainer, this._panelHeaderContainer, map.getTargetElement());\n }\n } else {\n var _map = this.getMap();\n // on remet à zéro = on efface les géométries + interactions + valeurs stockées\n // suppression des résultats précédents\n this._clearResults();\n // on efface les points qui ont pu être saisis précédemment\n this._clearInputFeatures();\n // on supprime l'éventuelle précédente interaction\n this._removeMapInteraction(_map);\n // on retire aussi la couche de saisie de la zone de recherche à la fermeture du widget\n if (this._inputFeaturesLayer != null) {\n _map.removeLayer(this._inputFeaturesLayer);\n this._inputFeaturesLayer = null;\n this._inputFeaturesSources = null;\n this._inputFeatures = null;\n }\n }\n\n // on appelle la méthode setMap originale d'OpenLayers\n Control.prototype.setMap.call(this, map);\n };\n\n /**\n * Get locations data\n *\n * @returns {Object} data - locations\n */\n ReverseGeocode.prototype.getData = function () {\n return this._reverseGeocodingLocations;\n };\n\n // ################################################################### //\n // ##################### init component ############################## //\n // ################################################################### //\n\n /**\n * Initialize ReverseGeocode control (called by ReverseGeocode constructor)\n *\n * @param {Object} options - constructor options\n * @private\n */\n ReverseGeocode.prototype.initialize = function (options) {\n // ############################################################ //\n // ################### Options du composant ################### //\n\n // check input options format (resources and delimitations arrays)\n this._checkInputOptions(options);\n\n // set default options\n this.options = {\n collapsed: true,\n draggable: false,\n resources: [\"StreetAddress\", \"PositionOfInterest\", \"CadastralParcel\"],\n delimitations: [\"Point\", \"Circle\", \"Extent\"],\n reverseGeocodeOptions: {},\n layerDescription: {\n title: \"Saisie (recherche inverse)\",\n description: \"Couche de saisie d'une zone de recherche pour la recherche inverse\"\n }\n };\n\n // merge with user options\n _Common_Utils__WEBPACK_IMPORTED_MODULE_13__[\"default\"].assign(this.options, options);\n\n /** {Boolean} specify if reverseGeocoding control is collapsed (true) or not (false) */\n this.collapsed = this.options.collapsed;\n\n /** {Boolean} specify if reverseGeocoding control is draggable (true) or not (false) */\n this.draggable = this.options.draggable;\n\n // identifiant du contrôle : utile pour suffixer les identifiants CSS (pour gérer le cas où il y en a plusieurs dans la même page)\n this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_15__[\"default\"].generate();\n\n // #################################################################### //\n // ################### informations sur les droits #################### //\n\n // Type de géocodage sélectionné (StreetAddress, PositionOfInterest, ...)\n this._currentGeocodingType = null;\n this._initGeocodingType();\n\n // Type de délimitation à utiliser pour la requête + pour sélection sur la containerDistance\n this._currentGeocodingDelimitation = null;\n this._initGeocodingDelimitation();\n\n // ################################################################## //\n // ################### Elements principaux du DOM ################### //\n\n // containers principaux\n this._showReverseGeocodingInput = null;\n // panel\n this._panelContainer = null;\n this._panelHeaderContainer = null;\n this._panelTitleContainer = null;\n this._returnPictoContainer = null;\n // form\n this._formContainer = null;\n // results\n this._resultsContainer = null;\n this._resultsListContainer = null;\n // waiting\n this._waitingContainer = null;\n\n // ###################################################################### //\n // ################### informations des points saisis ################### //\n\n // collection des points saisis sur la carte\n this._inputFeatures = null;\n // source contenant les features ci-dessus\n this._inputFeaturesSource = null;\n // couche vectorielle dans laquelle seront saisis les points (features ci-dessus)\n this._inputFeaturesLayer = null;\n // interaction avec la carte (de type \"Point\", \"Circle\" ou \"Polygon\")\n this._mapInteraction = null;\n\n // #################################################################### //\n // ################### informations pour la requête ################### //\n\n // options pour la requête de géocodage inverse\n this._requestOptions = null;\n // geometrie de recherche du géocodage inverse qui sera envoyée dans la requête\n this._requestGeom = null;\n // pour savoir si un calcul est en cours ou non\n this._waiting = false;\n // timer pour cacher la patience après un certain temps\n this._timer = null;\n\n // #################################################################### //\n // #################### informations des résultats #################### //\n\n this._reverseGeocodingLocations = [];\n this._reverseGeocodingLocationsMarkers = [];\n this._resultsDefaultStyle = new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Style\"]({\n image: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Icon\"]({\n src: _Utils_Markers__WEBPACK_IMPORTED_MODULE_16__[\"default\"][\"lightOrange\"],\n anchor: [0.5, 1]\n })\n });\n this._resultsSelectedStyle = new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Style\"]({\n image: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Icon\"]({\n src: _Utils_Markers__WEBPACK_IMPORTED_MODULE_16__[\"default\"][\"red\"],\n anchor: [0.5, 1]\n })\n });\n this._resultsHoverInteraction = null;\n this._resultsSelectInteraction = null;\n // container de la popup (affichage des infos au clic sur les markers)\n this._popupContent = null;\n this._popupDiv = this._initPopupDiv();\n this._popupOverlay = null;\n };\n\n /**\n * this method is called by this.initialize()\n * and makes sure input options are correctly formated\n *\n * @param {Object} options - options\n *\n * @private\n */\n ReverseGeocode.prototype._checkInputOptions = function (options) {\n var i;\n var j;\n\n // on vérifie le tableau des resources\n if (options.resources) {\n var resources = options.resources;\n // on vérifie que la liste des ressources de geocodage est bien un tableau\n if (Array.isArray(resources)) {\n var resourcesList = [\"StreetAddress\", \"PositionOfInterest\", \"CadastralParcel\"];\n var wrongResourcesIndexes = [];\n for (i = 0; i < resources.length; i++) {\n if (resourcesList.indexOf(resources[i]) === -1) {\n // si la resource n'est pas référencée, on stocke son index pour la retirer du tableau (après avoir terminé de parcourir le tableau)\n wrongResourcesIndexes.push(i);\n logger.log(\"[ReverseGeocode] options.resources : \" + resources[i] + \" is not a resource for reverse geocode\");\n }\n }\n // on retire les ressoures non référencées qu'on a pu rencontrer\n if (wrongResourcesIndexes.length !== 0) {\n for (j = 0; j < wrongResourcesIndexes.length; j++) {\n resources.splice(wrongResourcesIndexes[j], 1);\n }\n }\n } else {\n logger.log(\"[ReverseGeocode] 'options.resources' parameter should be an array\");\n resources = null;\n }\n }\n\n // et le tableau des délimitations\n if (options.delimitations) {\n var delimitations = options.delimitations;\n // on vérifie que la liste des delimitations est bien un tableau\n if (Array.isArray(delimitations)) {\n var delimitationsList = [\"Circle\", \"Point\", \"Extent\"];\n var wrongDelimitationsIndexes = [];\n for (i = 0; i < delimitations.length; i++) {\n if (delimitationsList.indexOf(delimitations[i]) === -1) {\n // si la delimitations n'est pas référencée, on stocke son index pour la retirer du tableau (après avoir terminé de parcourir le tableau)\n wrongDelimitationsIndexes.push(i);\n logger.log(\"[ReverseGeocode] options.delimitations : \" + delimitations[i] + \" is not a delimitation for reverse geocode\");\n }\n }\n // on retire les ressoures non référencées qu'on a pu rencontrer\n if (wrongDelimitationsIndexes.length !== 0) {\n for (j = 0; j < wrongDelimitationsIndexes.length; j++) {\n delimitations.splice(wrongDelimitationsIndexes[j], 1);\n }\n }\n } else {\n logger.log(\"[ReverseGeocode] 'options.delimitations' parameter should be an array\");\n delimitations = null;\n }\n }\n };\n\n /**\n * this method is called by this.initialize() and initialize geocoding type (=resource)\n * (\"StreetAddress\", \"PositionOfInterest\", \"CadastralParcel\")\n *\n * @private\n */\n ReverseGeocode.prototype._initGeocodingType = function () {\n // Type de géocodage selectionné\n this._currentGeocodingType = \"StreetAddress\"; // par defaut\n\n // par defaut\n var resources = this.options.resources;\n if (!resources || resources.length === 0) {\n this.options.resources = [\"StreetAddress\", \"PositionOfInterest\", \"CadastralParcel\"];\n }\n\n // options utilisateur\n if (Array.isArray(resources) && resources.length) {\n // récupération du type par défaut\n if (resources[0] === \"StreetAddress\" || resources[0] === \"PositionOfInterest\" || resources[0] === \"CadastralParcel\") {\n this._currentGeocodingType = resources[0];\n }\n }\n\n // si l'utilisateur a spécifié au moins une ressource dans le service, on surcharge les options du widget\n var serviceOptions = this.options.reverseGeocodeOptions;\n if (serviceOptions.filterOptions && Array.isArray(serviceOptions.filterOptions.type) && serviceOptions.filterOptions.type.length !== 0) {\n this._currentGeocodingType = serviceOptions.filterOptions.type[0];\n }\n };\n\n /**\n * this method is called by this.initialize() and initialize geocoding delimitation\n * (\"Point\", \"Circle\", \"Extent\")\n *\n * @private\n */\n ReverseGeocode.prototype._initGeocodingDelimitation = function () {\n // Type de délimitation selectionné\n this._currentGeocodingDelimitation = \"Point\"; // par defaut\n\n // par defaut\n var delimitations = this.options.delimitations;\n if (!delimitations || delimitations.length === 0) {\n this.options.delimitations = [\"Point\", \"Circle\", \"Extent\"];\n }\n\n // options utilisateur\n if (Array.isArray(delimitations) && delimitations.length) {\n var d = delimitations[0].toLowerCase();\n if (d === \"point\" || d === \"circle\" || d === \"extent\") {\n this._currentGeocodingDelimitation = delimitations[0];\n }\n }\n };\n\n /**\n * this method is called by this.initialize() and initialize popup div\n * (to display results information on marker click)\n *\n * @return {Object} element - DOM element for popup\n * @private\n */\n ReverseGeocode.prototype._initPopupDiv = function () {\n var context = this;\n var element = document.createElement(\"div\");\n element.className = \"gp-feature-info-div\";\n var closer = document.createElement(\"input\");\n closer.type = \"button\";\n closer.className = \"gp-styling-button closer\";\n // on closer click : remove popup\n closer.onclick = function () {\n if (context._popupOverlay != null) {\n context._popupOverlay.setPosition(undefined);\n }\n return false;\n };\n this._popupContent = document.createElement(\"div\");\n this._popupContent.className = \"gp-features-content-div\";\n element.appendChild(this._popupContent);\n element.appendChild(closer);\n return element;\n };\n\n /**\n * Create control main container (DOM initialize)\n *\n * @returns {DOMElement} DOM element\n *\n * @private\n */\n ReverseGeocode.prototype._initContainer = function () {\n // create main container\n var container = this._createMainContainerElement();\n\n // create show ReverseGeocode element\n var inputShow = this._showReverseGeocodingInput = this._createShowReverseGeocodingElement();\n container.appendChild(inputShow);\n\n // mode \"collapsed\"\n if (!this.collapsed) {\n inputShow.checked = true;\n }\n\n // create ReverseGeocode picto\n var picto = this._createShowReverseGeocodingPictoElement();\n container.appendChild(picto);\n\n // panel\n var reverseGeocodingPanel = this._panelContainer = this._createReverseGeocodingPanelElement();\n\n // header\n var panelHeader = this._panelHeaderContainer = this._createReverseGeocodingPanelHeaderElement();\n\n // return picto (hidden at start)\n var returnPicto = this._returnPictoContainer = this._createReverseGeocodingPanelReturnPictoElement();\n panelHeader.appendChild(returnPicto);\n // pane title\n var panelTitle = this._panelTitleContainer = this._createReverseGeocodingPanelTitleElement();\n panelHeader.appendChild(panelTitle);\n // close picto\n var closeDiv = this._createReverseGeocodingPanelCloseElement();\n panelHeader.appendChild(closeDiv);\n reverseGeocodingPanel.appendChild(panelHeader);\n\n // form\n var reverseGeocodingForm = this._formContainer = this._createReverseGeocodingPanelFormElement();\n // choices element\n reverseGeocodingForm.appendChild(this._createReverseGeocodingFormModeChoiceGeocodingTypeElement(this.options.resources));\n reverseGeocodingForm.appendChild(this._createReverseGeocodingFormModeChoiceGeocodingDelimitationElement(this.options.delimitations));\n\n // submit (bouton \"Chercher\")\n var submit = this._createReverseGeocodingSubmitFormElement();\n reverseGeocodingForm.appendChild(submit);\n reverseGeocodingPanel.appendChild(reverseGeocodingForm);\n\n // waiting\n var waiting = this._waitingContainer = this._createReverseGeocodingWaitingElement();\n reverseGeocodingPanel.appendChild(waiting);\n\n // results (dans le panel)\n var resultsPanel = this._resultsContainer = this._createReverseGeocodingResultsPanelElement();\n var reverseGeocodingResultsList = this._resultsListContainer = this._createReverseGeocodingResultsListElement();\n resultsPanel.appendChild(reverseGeocodingResultsList);\n reverseGeocodingPanel.appendChild(resultsPanel);\n container.appendChild(reverseGeocodingPanel);\n logger.log(container);\n return container;\n };\n\n // ################################################################### //\n // ################### Map interactions management ################### //\n // ################################################################### //\n\n /**\n * this method is called by this.setMap,\n * or by this.onShowReverseGeocodingClick,\n * and calls method corresponding to current delimitation, if widget is not collapsed.\n *\n * @param {ol.Map} map - control map.\n * @private\n */\n ReverseGeocode.prototype._activateMapInteraction = function (map) {\n var _this = this;\n if (!this.collapsed) {\n // 1. Creation de la couche vectorielle sur laquelle on va dessiner\n if (this._inputFeaturesLayer == null) {\n // on crée une collection, qui accueillera les points saisis sur la carte par les interactions,\n // sous formes de features (dans une couche vectorielle).\n // on les stocke de sorte à pouvoir les supprimer facilement\n this._inputFeatures = new ol_Collection__WEBPACK_IMPORTED_MODULE_3___default.a();\n\n // on crée la couche qui va accueillir les features\n this._inputFeaturesSource = new ol_source_Vector__WEBPACK_IMPORTED_MODULE_11___default.a({\n features: this._inputFeatures\n });\n this._inputFeaturesLayer = new ol_layer_Vector__WEBPACK_IMPORTED_MODULE_10___default.a({\n source: this._inputFeaturesSource,\n style: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Style\"]({\n fill: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Fill\"]({\n color: \"rgba(0, 183, 152, 0.3)\"\n }),\n stroke: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Stroke\"]({\n color: \"rgba(0, 183, 152, 0.8)\",\n width: 3\n }),\n image: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Icon\"]({\n src: _Utils_Markers__WEBPACK_IMPORTED_MODULE_16__[\"default\"][\"turquoiseBlue\"],\n anchor: [0.5, 1]\n })\n })\n });\n // on rajoute le champ gpResultLayerId permettant d'identifier une couche crée par le composant. (pour layerSwitcher par ex)\n this._inputFeaturesLayer.gpResultLayerId = \"reverseGeocoding\";\n // on ajoute la couche à la carte\n map.addLayer(this._inputFeaturesLayer);\n }\n\n // 2. Création de l'interaction de dessin, selon le type de délimitation sélectionné\n var delimitation = this._currentGeocodingDelimitation.toLowerCase();\n switch (delimitation) {\n case \"point\":\n this._activatePointInteraction(map);\n break;\n case \"circle\":\n this._activateCircleInteraction(map);\n break;\n case \"extent\":\n this._activateBoxInteraction(map);\n break;\n default:\n break;\n }\n\n // 3. Si un layer switcher est présent dans la carte, on lui affecte des informations pour cette couche\n map.getControls().forEach(function (control) {\n if (control instanceof _LayerSwitcher__WEBPACK_IMPORTED_MODULE_19__[\"default\"]) {\n // un layer switcher est présent dans la carte\n var layerId = _this._inputFeaturesLayer.gpLayerId;\n // on n'ajoute des informations que s'il n'y en a pas déjà (si le titre est le numéro par défaut)\n if (control._layers[layerId].title === layerId) {\n control.addLayer(_this._inputFeaturesLayer, {\n title: _this.options.layerDescription.title,\n description: _this.options.layerDescription.description\n });\n control.setRemovable(_this._inputFeaturesLayer, false);\n }\n }\n });\n }\n };\n\n /**\n * this method is called by this._activateMapInteraction,\n * and creates map point drawing interaction.\n *\n * @param {ol.Map} map - control map.\n * @private\n */\n ReverseGeocode.prototype._activatePointInteraction = function (map) {\n var _this2 = this;\n // interaction permettant de dessiner un point\n this._mapInteraction = new ol_interaction__WEBPACK_IMPORTED_MODULE_7__[\"Draw\"]({\n style: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Style\"]({\n image: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Circle\"]({\n radius: 0,\n fill: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Fill\"]({\n color: \"rgba(0, 183, 152, 0.8)\"\n })\n })\n }),\n type: \"Point\",\n source: this._inputFeaturesSource\n });\n this._mapInteraction.on(\"drawstart\", function (e) {\n logger.log(\"on drawstart \", e);\n\n // on efface les points qui ont pu être saisis précédemment (on vide la collection des features de la couche)\n _this2._inputFeatures.clear();\n\n // on récupère les coordonnées du point qui vient d'être saisi\n _this2._onDrawStart(e, \"point\");\n });\n this._mapInteraction.on(\"drawend\", function (e) {\n logger.log(\"on drawend\", e);\n\n // on récupère le rayon du cercle qui vient d'être tracé\n if (e.feature && e.feature.getGeometry) {\n _this2._requestGeom = {\n type: \"Point\",\n coordinates: [_this2._requestPosition.lon, _this2._requestPosition.lat]\n };\n }\n });\n map.addInteraction(this._mapInteraction);\n this._setCursor(\"crosshair\", map);\n };\n\n /**\n * this method is called by this._activateMapInteraction,\n * and creates map circle drawing interaction.\n *\n * @param {ol.Map} map - control map.\n * @private\n */\n ReverseGeocode.prototype._activateCircleInteraction = function (map) {\n var _this3 = this;\n // interaction permettant de dessiner un cercle\n this._mapInteraction = new ol_interaction__WEBPACK_IMPORTED_MODULE_7__[\"Draw\"]({\n style: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Style\"]({\n fill: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Fill\"]({\n color: \"rgba(0, 183, 152, 0.3)\"\n }),\n stroke: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Stroke\"]({\n color: \"rgba(0, 183, 152, 0.8)\",\n width: 3\n }),\n image: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Circle\"]({\n radius: 4,\n fill: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Fill\"]({\n color: \"rgba(0, 183, 152, 0.8)\"\n })\n })\n }),\n type: \"Circle\",\n source: this._inputFeaturesSource\n });\n this._mapInteraction.on(\"drawstart\", function (e) {\n logger.log(\"on drawstart \", e);\n // on efface les points qui ont pu être saisis précédemment (on vide la collection des features de la couche)\n _this3._inputFeatures.clear();\n // on récupère les coordonnées du centre du cercle = premier point du tracé\n _this3._onDrawStart(e, \"circle\");\n });\n this._mapInteraction.on(\"drawend\", function (e) {\n logger.log(\"on drawend\", e);\n\n // on récupère le rayon du cercle qui vient d'être tracé\n if (e.feature && e.feature.getGeometry) {\n var radius = e.feature.getGeometry().getRadius();\n // et on le stocke comme filtre pour la requête\n _this3._requestGeom = {};\n _this3._requestGeom.type = \"Circle\";\n _this3._requestGeom.radius = radius;\n if (_this3._requestPosition) {\n _this3._requestGeom.coordinates = [_this3._requestPosition.lon, _this3._requestPosition.lat];\n }\n logger.log(\"circle radius : \", radius);\n }\n });\n map.addInteraction(this._mapInteraction);\n };\n\n /**\n * this method is called by this._activateMapInteraction,\n * and creates map box drawing interaction.\n *\n * @param {ol.Map} map - control map.\n * @private\n */\n ReverseGeocode.prototype._activateBoxInteraction = function (map) {\n var _this4 = this;\n // info : il n'y a pas de geometry de type rectangle, donc on va créer un objet de type \"LineString\",\n // avec seulement 2 points qui formeront les extrémités du rectangle.\n // on aura donc une géométrie LineString avec 5 coordonnées : start, point2, end, point4, start,\n // où les coordonnées de point2 et point4 sont calculées à partir de start et end, et start est répété à la fin pour fermer la géométrie.\n\n // function to draw rectangle with only 2 points\n var geometryFunction = function geometryFunction(coordinates, geometry) {\n if (!geometry) {\n geometry = new ol_geom__WEBPACK_IMPORTED_MODULE_6__[\"Polygon\"]([]);\n }\n var start = coordinates[0];\n var end = coordinates[1];\n // on crée les 5 coordonnées de la ligne à partir des 2 points saisis.\n geometry.setCoordinates([[start, [start[0], end[1]], end, [end[0], start[1]], start]]);\n return geometry;\n };\n\n // interaction permettant de dessiner un rectangle (= LineString de 5 points, à partir de 2 points saisis)\n this._mapInteraction = new ol_interaction__WEBPACK_IMPORTED_MODULE_7__[\"Draw\"]({\n style: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Style\"]({\n fill: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Fill\"]({\n color: \"rgba(0, 183, 152, 0.3)\"\n }),\n stroke: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Stroke\"]({\n color: \"rgba(0, 183, 152, 0.8)\",\n width: 3\n }),\n image: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Circle\"]({\n radius: 4,\n fill: new ol_style__WEBPACK_IMPORTED_MODULE_5__[\"Fill\"]({\n color: \"rgba(0, 183, 152, 0.8)\"\n })\n })\n }),\n type: \"LineString\",\n source: this._inputFeaturesSource,\n maxPoints: 2,\n geometryFunction: geometryFunction\n });\n this._mapInteraction.on(\"drawstart\", function (e) {\n logger.log(\"on drawstart\", e);\n // on efface les points qui ont pu être saisis précédemment (on vide la collection des features de la couche)\n _this4._inputFeatures.clear();\n });\n this._mapInteraction.on(\"drawend\", function (e) {\n logger.log(\"on drawend\", e);\n // on va récupérer les coordonnées du rectangle qui vient d'être tracé\n _this4._onBoxDrawEnd(e);\n });\n map.addInteraction(this._mapInteraction);\n };\n\n /**\n * remove draw interaction from map (if exists)\n *\n * @param {ol.Map} map - control map.\n * @private\n */\n ReverseGeocode.prototype._removeMapInteraction = function (map) {\n if (this._mapInteraction != null) {\n map.removeInteraction(this._mapInteraction);\n this._mapInteraction = null;\n }\n this._setCursor();\n };\n\n /**\n * this method is called by event 'drawstart' on map point or circle drawing interaction\n * (cf. this._activatePointInteraction), and it gets map click coordinates.\n * this point is saved as a parameter for reverse Geocode service.\n *\n * @param {Object} e - HTMLElement\n * @param {String} type - geometry type : \"point\" or \"circle\"\n * @private\n */\n ReverseGeocode.prototype._onDrawStart = function (e, type) {\n var coordinate;\n if (e.feature && e.feature.getGeometry) {\n var geometry = e.feature.getGeometry();\n if (type === \"point\") {\n coordinate = geometry.getCoordinates();\n }\n if (type === \"circle\") {\n coordinate = geometry.getCenter();\n }\n }\n if (!coordinate) {\n return;\n }\n var crs;\n if (this.options.reverseGeocodeOptions && this.options.reverseGeocodeOptions.srs) {\n crs = this.options.reverseGeocodeOptions.srs;\n } else {\n var map = this.getMap();\n if (!map || !map.getView()) {\n return;\n }\n crs = map.getView().getProjection();\n }\n var geoCoordinate = Object(ol_proj__WEBPACK_IMPORTED_MODULE_9__[\"transform\"])(coordinate, crs, \"EPSG:4326\");\n this._requestPosition = {\n lon: geoCoordinate[0],\n lat: geoCoordinate[1]\n };\n logger.log(\"position coordinates : \", this._requestPosition);\n };\n\n /**\n * this method is called by event 'drawend' on map box drawing interaction\n * (cf. this._activateBoxInteraction), and it gets geometry coordinates,\n * to be saved as a filter parameter for reverse Geocode service.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n ReverseGeocode.prototype._onBoxDrawEnd = function (e) {\n // on va récupérer les coordonnées du rectangle qui vient d'être tracé\n if (e.feature && e.feature.getGeometry) {\n // info: coordinates est un tableau [start, point2, end, point4, start]\n // car c'est une linestring donc on a 5 coordonnées pour boucler\n var coordinates = e.feature.getGeometry().getCoordinates()[0];\n var start = coordinates[0];\n var end = coordinates[2];\n var crs;\n if (this.options.reverseGeocodeOptions && this.options.reverseGeocodeOptions.srs) {\n crs = this.options.reverseGeocodeOptions.srs;\n } else {\n var map = this.getMap();\n if (!map || !map.getView()) {\n return;\n }\n crs = map.getView().getProjection();\n }\n\n // on reprojette les coordonnées des deux extrémités du rectangle (start et end)\n var startGeoCoordinate = Object(ol_proj__WEBPACK_IMPORTED_MODULE_9__[\"transform\"])(start, crs, \"EPSG:4326\");\n var endGeoCoordinate = Object(ol_proj__WEBPACK_IMPORTED_MODULE_9__[\"transform\"])(end, crs, \"EPSG:4326\");\n var bbox = {};\n // on récupère les valeurs left, right, top et bottom, pour le filtre bbox du service reverseGeocode\n if (startGeoCoordinate[0] < endGeoCoordinate[0]) {\n bbox.left = startGeoCoordinate[0];\n bbox.right = endGeoCoordinate[0];\n } else {\n bbox.left = endGeoCoordinate[0];\n bbox.right = startGeoCoordinate[0];\n }\n if (startGeoCoordinate[1] < endGeoCoordinate[1]) {\n bbox.bottom = startGeoCoordinate[1];\n bbox.top = endGeoCoordinate[1];\n } else {\n bbox.bottom = endGeoCoordinate[1];\n bbox.top = startGeoCoordinate[1];\n }\n this._requestGeom = {\n type: \"Polygon\",\n coordinates: [[[bbox.left, bbox.top], [bbox.left, bbox.bottom], [bbox.right, bbox.bottom], [bbox.right, bbox.top], [bbox.left, bbox.top]]]\n };\n logger.log(\"searchGeometry filter : \", this._requestGeom);\n }\n };\n\n /** \n * this change the cursor of the map when entering a point.\n *\n * @param {String} cursor - cursor style\n * @param {ol.Map} map - control map (optional)\n * @private\n */\n ReverseGeocode.prototype._setCursor = function (cursor, map) {\n map = map || this.getMap();\n if (!map) {\n return;\n }\n var div = map.getTargetElement();\n if (cursor) {\n div.style.cursor = cursor;\n } else {\n div.style.cursor = null;\n }\n };\n\n // ################################################################### //\n // ##################### Reverse Geocoding request ################### //\n // ################################################################### //\n\n /**\n * this methode is called by this.onReverseGeocodingSubmit method,\n * it generates and sends reverse geocode request, then displays results\n *\n * @private\n */\n ReverseGeocode.prototype._reverseGeocodingRequest = function () {\n var map = this.getMap();\n\n // on construit les options pour la requête\n this._requestOptions = this._getReverseGeocodingRequestOptions();\n\n // retrait de l'interaction sur la map pendant l'attente (et l'affichage des résultats)\n this._removeMapInteraction(map);\n // affichage d'une patience pendant l'attente\n this._displayWaitingContainer();\n\n // envoi de la requête\n geoportal_access_lib__WEBPACK_IMPORTED_MODULE_12__[\"default\"].Services.reverseGeocode(this._requestOptions);\n };\n\n /**\n * this methode is called by this._reverseGeocodingRequest method,\n * and returns options object for Gp.Services.reverseGeocode request\n *\n * @returns {Object} requestOptions - reverse geocode options\n * @private\n */\n ReverseGeocode.prototype._getReverseGeocodingRequestOptions = function () {\n var map = this.getMap();\n\n // on recupere les éventuelles options du service passées par l'utilisateur\n var reverseGeocodeOptions = this.options.reverseGeocodeOptions;\n\n // on crée les options pour le service reverseGeocode\n var context = this;\n if (typeof this.options.ssl !== \"boolean\") {\n this.options.ssl = true;\n }\n // gestion des callback\n var bOnFailure = !!(reverseGeocodeOptions.onFailure !== null && typeof reverseGeocodeOptions.onFailure === \"function\"); // cast variable to boolean\n var bOnSuccess = !!(reverseGeocodeOptions.onSuccess !== null && typeof reverseGeocodeOptions.onSuccess === \"function\");\n var requestOptions = {\n apiKey: reverseGeocodeOptions.apiKey || this.options.apiKey,\n ssl: this.options.ssl,\n position: this._requestPosition,\n oldReverseService: reverseGeocodeOptions.oldReverseService || true,\n filterOptions: {\n type: [this._currentGeocodingType]\n },\n srs: \"CRS:84\",\n returnFreeForm: false,\n maximumResponses: reverseGeocodeOptions.maximumResponses || 18,\n timeOut: reverseGeocodeOptions.timeOut || 30000,\n // protocol : reverseGeocodeOptions.protocol || \"XHR\",\n // callback onSuccess\n onSuccess: function onSuccess(response) {\n if (response.locations) {\n logger.log(\"reverseGeocode results : \", response.locations);\n context._displayGeocodedLocations(response.locations);\n }\n if (bOnSuccess) {\n reverseGeocodeOptions.onSuccess.call(context, response.locations);\n }\n },\n // callback onFailure\n onFailure: function onFailure(error) {\n // FIXME mise à jour du controle mais le service ne repond pas en 200 !?\n\n // on cache la patience\n context._hideWaitingContainer();\n\n // suppression d'éventuels résultats précédents\n context._clearResults();\n // on efface les points qui ont été saisis précédemment\n context._clearInputFeatures();\n\n // et on réactive l'interaction sur la map\n context._activateMapInteraction(map);\n logger.log(error.message);\n if (bOnFailure) {\n reverseGeocodeOptions.onFailure.call(context, error);\n }\n }\n };\n\n // on récupère d'éventuels filtres\n if (this._requestGeom.type.toLowerCase() === \"circle\") {\n // FIXME : a confirmer en fonction du service !\n if (this._requestGeom.radius > 500) {\n logger.log(\"INFO : initial circle radius (\" + this._requestGeom.radius + \") limited to 1000m.\");\n this._requestGeom.radius = 500;\n }\n requestOptions.searchGeometry = this._requestGeom;\n } else if (this._requestGeom.type.toLowerCase() === \"polygon\") {\n requestOptions.searchGeometry = this._requestGeom;\n } else if (this._requestGeom.type.toLowerCase() === \"point\") {\n if (this._currentGeocodingType === \"StreetAddress\") {\n requestOptions.searchGeometry = {\n type: \"Circle\",\n radius: 50,\n coordinates: this._requestGeom.coordinates\n };\n requestOptions.maximumResponses = 1;\n } else {\n requestOptions.searchGeometry = this._requestGeom;\n }\n }\n logger.log(\"reverseGeocode request options : \", requestOptions);\n return requestOptions;\n };\n\n /**\n * this method is called by this._reverseGeocodingRequest() (in case of reverse geocode success)\n * and display results : in both container list and map\n *\n * @param {Array} locations - array of geocoded locations (reverse geocode results)\n * @private\n */\n ReverseGeocode.prototype._displayGeocodedLocations = function (locations) {\n // 1. on vide les résultats précédents\n this._clearResults();\n this._reverseGeocodingLocations = locations;\n\n /**\n * event triggered when the compute is finished\n *\n * @event reversegeocode:compute\n * @property {Object} type - event\n * @property {Object} target - instance ReverseGeocode\n * @example\n * ReverseGeocode.on(\"reversegeocode:compute\", function (e) {\n * console.log(e.target.getData());\n * })\n */\n this.dispatchEvent({\n type: \"reversegeocode:compute\"\n });\n\n // 2. cache de la patience et du formulaire\n this._formContainer.className = \"GPreverseGeocodingComponentHidden\";\n this._hideWaitingContainer();\n // affichage de la div des résultats (et changement du titre)\n this._panelTitleContainer.innerHTML = \"Résultats de la recherche\";\n this._returnPictoContainer.className = \"\";\n this._resultsContainer.className = \"GPpanel\";\n\n // 3. ajout de la liste des résultats dans le container des resultats\n this._fillGeocodedLocationListContainer(locations);\n\n // 4. affichage des résultats sur la carte (+ zoom ?)\n this._displayGeocodedLocationsOnMap(locations);\n };\n\n // ################################################################### //\n // ############################# results list ######################## //\n // ################################################################### //\n\n /**\n * this method is called by this._displayGeocodedLocations()\n * and fills the container with results list\n *\n * @param {Array} locations - array of geocoded locations (reverse geocode results)\n * @private\n */\n ReverseGeocode.prototype._fillGeocodedLocationListContainer = function (locations) {\n // ajout de la liste des résultats dans le container des resultats\n for (var i = 0; i < locations.length; i++) {\n var location = locations[i];\n logger.log(location);\n // on récupère la description à afficher dans la liste\n var locationDescription = this._fillGeocodedLocationDescription(location);\n // on ajoute chaque résutat à la liste\n if (locationDescription.length !== 0) {\n this._createReverseGeocodingResultElement(locationDescription, i);\n }\n }\n };\n\n /**\n * this method is called by this._fillGeocodedLocationListContainer()\n * and fills location description (String), depending on matchType\n *\n * @param {Object} location - geocoded location (from reverse geocode results)\n * @returns {String} locationDescription - geocoded location description to be displayed\n * @private\n */\n ReverseGeocode.prototype._fillGeocodedLocationDescription = function (location) {\n if (!location || !location.placeAttributes) {\n return;\n }\n var attr = location.placeAttributes;\n var locationDescription = \"\";\n // on sélectionne les infos à afficher selon le type\n switch (location.type) {\n case \"StreetAddress\":\n if (attr.street) {\n locationDescription += attr.housenumber ? attr.housenumber + \" \" : \"\";\n locationDescription += attr.street + \", \";\n }\n locationDescription += attr.postcode + \" \" + attr.city;\n break;\n case \"PositionOfInterest\":\n locationDescription += attr.toponym;\n if (attr.postcode.length === 1) {\n locationDescription += \", \" + attr.postcode[0];\n }\n locationDescription += \" (\" + attr.category.join(\",\") + \")\";\n break;\n case \"CadastralParcel\":\n locationDescription += attr.id;\n locationDescription += attr.city ? \" (\" + attr.city + \")\" : \"\";\n break;\n default:\n locationDescription += attr.city ? attr.city : \"\";\n break;\n }\n ;\n return locationDescription;\n };\n\n // ################################################################### //\n // ######################## map results (markers) #################### //\n // ################################################################### //\n\n /**\n * this method is called by this._displayGeocodedLocations()\n * and display locations in map (markers)\n *\n * @param {Object} locations - geocoded locations (reverse geocode result)\n * @private\n */\n ReverseGeocode.prototype._displayGeocodedLocationsOnMap = function (locations) {\n var _this5 = this;\n if (this._reverseGeocodingLocations.length !== 0) {\n var map = this.getMap();\n\n // 1. création de la couche où seront ajoutés les résultats\n this._createResultsLayer();\n // ajout de chaque résultat à la couche (marker)\n for (var i = 0; i < locations.length; i++) {\n this._addResultFeature(locations[i], i);\n }\n\n // 2. Zoom sur l'étendue des résultats (features)\n if (this._resultsFeatures.getLength() > 1) {\n if (this._resultsFeaturesSource && this._resultsFeaturesSource.getExtent) {\n var extent = this._resultsFeaturesSource.getExtent();\n map.getView().fit(extent, map.getSize());\n }\n } else {\n // dans le cas où on n'a qu'un seul résultat, l'étendue n'est pas définie, on zoome donc sur le résulat\n var feature = this._resultsFeatures.item(0);\n var coords = feature.getGeometry().getCoordinates();\n map.getView().setCenter(coords);\n map.getView().setZoom(17);\n }\n\n // 3. ajout des interactions (survol, click)\n // au survol : modification des styles (marker et list)\n this._resultsHoverInteraction = new ol_interaction__WEBPACK_IMPORTED_MODULE_7__[\"Select\"]({\n condition: ol_events_condition__WEBPACK_IMPORTED_MODULE_8__[\"pointerMove\"],\n layers: [this._resultsFeaturesLayer]\n });\n this._resultsHoverInteraction.on(\"select\", function (e) {\n return _this5._onResultsFeatureMouseOver(e);\n });\n map.addInteraction(this._resultsHoverInteraction);\n\n // au click : affichage popup\n this._resultsSelectInteraction = new ol_interaction__WEBPACK_IMPORTED_MODULE_7__[\"Select\"]({\n layers: [this._resultsFeaturesLayer]\n });\n this._resultsSelectInteraction.on(\"select\", function (e) {\n return _this5._onResultsFeatureSelect(e);\n });\n map.addInteraction(this._resultsSelectInteraction);\n\n // 4. Si un layer switcher est présent dans la carte, on lui affecte des informations pour cette couche\n var geocodeType = \"\";\n switch (this._currentGeocodingType) {\n case \"StreetAddress\":\n geocodeType = \"adresses\";\n break;\n case \"PositionOfInterest\":\n geocodeType = \"toponymes\";\n break;\n case \"CadastralParcel\":\n geocodeType = \"parcelles cadastrales\";\n break;\n default:\n break;\n }\n map.getControls().forEach(function (control) {\n if (control instanceof _LayerSwitcher__WEBPACK_IMPORTED_MODULE_19__[\"default\"]) {\n // un layer switcher est présent dans la carte\n var layerId = _this5._resultsFeaturesLayer.gpLayerId;\n // on n'ajoute des informations que s'il n'y en a pas déjà (si le titre est le numéro par défaut)\n if (control._layers[layerId].title === layerId) {\n control.addLayer(_this5._resultsFeaturesLayer, {\n title: \"Résultats de la recherche inverse\",\n description: \"Résultats de la recherche inverse sur les \" + geocodeType\n });\n control.setRemovable(_this5._resultsFeaturesLayer, false);\n }\n }\n });\n }\n };\n\n /**\n * this method is called by this._displayGeocodedLocations()\n * and creates result layer (where geocoded locations will be displayed)\n *\n * @private\n */\n ReverseGeocode.prototype._createResultsLayer = function () {\n var map = this.getMap();\n this._resultsFeatures = new ol_Collection__WEBPACK_IMPORTED_MODULE_3___default.a();\n\n // on crée la couche qui va accueillir les features\n this._resultsFeaturesSource = new ol_source_Vector__WEBPACK_IMPORTED_MODULE_11___default.a({\n features: this._resultsFeatures\n });\n this._resultsFeaturesLayer = new ol_layer_Vector__WEBPACK_IMPORTED_MODULE_10___default.a({\n source: this._resultsFeaturesSource\n });\n // on rajoute le champ gpResultLayerId permettant d'identifier une couche crée par le composant. (pour layerSwitcher par ex)\n this._resultsFeaturesLayer.gpResultLayerId = \"reverseGeocodingResults\";\n // on ajoute la couche à la carte\n map.addLayer(this._resultsFeaturesLayer);\n };\n\n /**\n * this method is called by this._displayGeocodedLocations()\n * and displays locations in map (markers) : add new feature to results layer\n *\n * @param {Object} location - geocoded location (reverse geocode result)\n * @param {Number} i - geocoded location index in response list\n * @private\n */\n ReverseGeocode.prototype._addResultFeature = function (location, i) {\n var map = this.getMap();\n // récupération de la position\n var position = [location.position.lon, location.position.lat];\n if (position.length === 0) {\n return;\n }\n var view = map.getView();\n var mapProj = view.getProjection().getCode();\n if (mapProj !== \"EPSG:4326\") {\n // on retransforme les coordonnées de la position dans la projection de la carte\n position = Object(ol_proj__WEBPACK_IMPORTED_MODULE_9__[\"transform\"])(position, \"EPSG:4326\", mapProj);\n }\n\n // on ajoute le résultat à la collection de points existantes (composant la couche vectorielle this._inputFeaturesLayer)\n var feature = new ol_Feature__WEBPACK_IMPORTED_MODULE_4___default.a({\n geometry: new ol_geom__WEBPACK_IMPORTED_MODULE_6__[\"Point\"](position)\n });\n feature.setStyle(this._resultsDefaultStyle);\n feature.setId(i);\n feature.setProperties({\n location: location,\n popupContent: this._fillPopupContent(location)\n });\n this._resultsFeatures.push(feature);\n };\n\n /**\n * this method is called by this._addResultFeature()\n * and fills popup content (to be displayed on marker click) for a given geocoded location\n *\n * @param {Object} location - geocoded location (reverse geocode result)\n * @returns {String} popupContent - text to be displayed in popup\n * @private\n */\n ReverseGeocode.prototype._fillPopupContent = function (location) {\n var popupContent = \"
    \";\n var attributes = location.placeAttributes;\n for (var attr in attributes) {\n if (attributes.hasOwnProperty(attr)) {\n if (attr !== \"trueGeometry\" && attr !== \"extraFields\" && attr !== \"houseNumberInfos\" && attr !== \"_count\") {\n popupContent += \"
  • \";\n popupContent += \"\" + attr.toUpperCase() + \" : \";\n popupContent += attributes[attr];\n popupContent += \"
  • \";\n }\n }\n }\n popupContent += \"
\";\n return popupContent;\n };\n\n /**\n * this method is called on 'pointerMove' on this._resultsFeaturesLayer (ol.interaction.Select)\n * (cf. this._displayGeocodedLocationsOnMap() )\n * and highlights result in list container\n *\n * @param {Object} e - on select event\n * @private\n */\n ReverseGeocode.prototype._onResultsFeatureMouseOver = function (e) {\n var f;\n\n // si on survole un résultat, on change son style (marker)\n if (e.selected.length !== 0) {\n // on change le style du marker (red)\n f = e.selected[0];\n f.setStyle(this._resultsSelectedStyle);\n\n // on surligne le résultat correspondant dans la liste des résultats\n if (f.getId() != null) {\n var selectedResultDiv = document.getElementById(\"ReverseGeocodedLocation_\" + f.getId() + \"-\" + this._uid);\n if (selectedResultDiv && selectedResultDiv.classList) {\n selectedResultDiv.classList.add(\"GPreverseGeocodedLocationHighlight\");\n }\n }\n document.getElementById(\"ReverseGeocodedLocation_\" + f.getId() + \"-\" + this._uid);\n }\n\n // si on déselectionne un résultat (mouseout), on rétablit un style normal pour le marker\n if (e.deselected.length !== 0) {\n // on change le style du marker (lightOrange)\n f = e.deselected[0];\n f.setStyle(this._resultsDefaultStyle);\n\n // on rétablit un style normal pour le résultat correspondant dans la liste des résultats\n var deSelectedResultDiv = document.getElementById(\"ReverseGeocodedLocation_\" + f.getId() + \"-\" + this._uid);\n if (deSelectedResultDiv && deSelectedResultDiv.classList) {\n deSelectedResultDiv.classList.remove(\"GPreverseGeocodedLocationHighlight\");\n }\n }\n };\n\n /**\n * this method is called on 'click' on this._resultsFeaturesLayer (ol.interaction.Select)\n * (cf. this._displayGeocodedLocationsOnMap() )\n * and sets a popup with feature information\n *\n * @param {Object} e - on select event\n * @private\n */\n ReverseGeocode.prototype._onResultsFeatureSelect = function (e) {\n var map = this.getMap();\n if (e.selected.length !== 0) {\n // si on a sélectionné un marker, on lui ajoute une popup\n var f = e.selected[0];\n this._popupContent.innerHTML = f.getProperties().popupContent;\n if (!this._popupOverlay) {\n // ajout de la popup a la carte comme un overlay\n this._popupOverlay = new ol_Overlay__WEBPACK_IMPORTED_MODULE_2___default.a({\n element: this._popupDiv,\n positioning: \"bottom-center\",\n position: e.mapBrowserEvent.coordinate\n });\n map.addOverlay(this._popupOverlay);\n } else {\n // si l'overlay est déjà créé, on modifie juste sa position\n this._popupOverlay.setPosition(e.mapBrowserEvent.coordinate);\n }\n\n /**\n * event triggered when an element of the results is clicked\n *\n * @event reversegeocode:onclickresult\n * @property {Object} type - event\n * @property {Object} location - location\n * @property {Object} target - instance ReverseGeocode\n * @example\n * Reverse.on(\"reverse:onclickresult\", function (e) {\n * console.log(e.location);\n * })\n */\n this.dispatchEvent({\n type: \"reversegeocode:onclickresult\",\n location: f.getProperties().location\n });\n } else {\n // si aucun troncon n'est sélectionné (click à côté du tracé),\n // on fait disparaitre la popup si elle existe\n if (this._popupOverlay != null) {\n this._popupOverlay.setPosition(undefined);\n }\n }\n };\n\n // ################################################################### //\n // ####################### handlers events to dom #################### //\n // ################################################################### //\n\n /**\n * this method is called by event 'click' on 'GPshowReverseGeocodingPicto' tag label\n * (cf. ReverseGeocodingDOM._createShowReverseGeocodingPictoElement), and it cleans the component\n * when it's closed.\n *\n * @private\n */\n ReverseGeocode.prototype.onShowReverseGeocodingClick = function () {\n var map = this.getMap();\n // on supprime toutes les interactions\n _Utils_Interactions__WEBPACK_IMPORTED_MODULE_18__[\"default\"].unset(map);\n this.collapsed = this._showReverseGeocodingInput.checked;\n // info : on génère nous même l'evenement OpenLayers de changement de propriété\n // (utiliser ol.control.ReverseGeocode.on(\"change:collapsed\", function ) pour s'abonner à cet évènement)\n this.dispatchEvent(\"change:collapsed\");\n if (!this._waiting && !this._reverseGeocodingLocations.length) {\n // Cas 1 : input panel (ni en attente, ni sur le panel des résultats)\n if (this.collapsed) {\n // on remet à zéro = on efface les géométries + interactions + valeurs stockées\n // suppression des résultats précédents\n this._clearResults();\n // on efface les points qui ont pu être saisis précédemment\n this._clearInputFeatures();\n // on supprime l'éventuelle précédente interaction\n this._removeMapInteraction(map);\n // on retire aussi la couche de saisie de la zone de recherche à la fermeture du widget\n if (this._inputFeaturesLayer != null) {\n map.removeLayer(this._inputFeaturesLayer);\n this._inputFeaturesLayer = null;\n this._inputFeaturesSources = null;\n this._inputFeatures = null;\n }\n } else {\n // on réactive l'interaction\n this._activateMapInteraction(map);\n }\n }\n // info : si on est en attente ou sur le panel des résultats : on ne fait rien.\n };\n\n /**\n * this method is called by event 'change' on 'GPreverseGeocodingCode' tag select\n * (cf. ReverseGeocodingDOM._createReverseGeocodingFormModeChoiceGeocodingTypeElement).\n * this value is saved as a parameter for reverseGeocode service.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n ReverseGeocode.prototype.onReverseGeocodingTypeChange = function (e) {\n var idx = e.target.selectedIndex;\n var value = e.target.options[idx].value;\n if (!value) {\n return;\n }\n logger.log(value);\n this._currentGeocodingType = value;\n };\n\n /**\n * this method is called by event 'change' on 'GPreverseGeocodingCode' tag select\n * (cf. ReverseGeocodingDOM._createReverseGeocodingFormModeChoiceGeocodingDelimitationElement).\n * this value is saved as a parameter for reverseGeocode service.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n ReverseGeocode.prototype.onReverseGeocodingDelimitationChange = function (e) {\n var idx = e.target.selectedIndex;\n var value = e.target.options[idx].value;\n if (!value) {\n return;\n }\n logger.log(value);\n this._currentGeocodingDelimitation = value;\n\n // on met à jour l'interaction de la map en fonction de la nouvelle délimitation\n var map = this.getMap();\n // on supprime l'interaction précédente, ainsi que les géométries et valeurs stockées (filtres, position)\n this._clearInputFeatures();\n // on supprime l'éventuelle précédente interaction\n this._removeMapInteraction(map);\n // on crée une nouvelle interaction\n this._activateMapInteraction(map);\n };\n\n /**\n * this method is called by event 'click' on 'GPreverseGeocodingReturnPicto' div\n * (cf. ReverseGeocodingDOM._createReverseGeocodingPanelReturnPictoElement),\n * and clear geocoded location (from both list container and map)\n *\n * @private\n */\n ReverseGeocode.prototype.onGPreverseGeocodingReturnPictoClick = function () {\n // suppression des résultats précédents\n this._clearResults();\n // on efface les points qui ont pu être saisis précédemment\n this._clearInputFeatures();\n // et on réactive l'interaction sur la map\n this._activateMapInteraction(this.getMap());\n };\n\n /**\n * this methode is called by event 'submit' on reverseGeocoding form ('GPreverseGeocodingForm')\n * (cf. ReverseGeocodingDOM._createReverseGeocodingPanelFormElement),\n * it checks reverse geocode mandatory parameters,\n * then call this._reverseGeocodingRequest() to generate and send request\n *\n * @private\n */\n ReverseGeocode.prototype.onReverseGeocodingSubmit = function () {\n // le paramètre position est obligatoire\n if (!this._requestPosition) {\n logger.log(\"missing position\");\n return;\n }\n this._reverseGeocodingRequest();\n };\n\n /**\n * this method is called by event 'click' on 'ReverseGeocodedLocation_' div\n * (cf. ReverseGeocodingDOM._createReverseGeocodingResultElement),\n * and zoom to location ?\n * TODO\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n ReverseGeocode.prototype.onReverseGeocodingResultClick = function (e) {\n // récupération de l'id du résultat survolé\n var tagid = e.target.id; // ex ReverseGeocodedLocation_21\n var idx = tagid.substring(tagid.indexOf(\"_\") + 1); // ex. 21\n\n var f = this._resultsFeaturesSource.getFeatureById(parseInt(idx, 10));\n this.dispatchEvent({\n type: \"reversegeocode:onclickresult\",\n location: f.getProperties().location\n });\n };\n\n /**\n * this method is called by event 'mouseover' on 'ReverseGeocodedLocation_' div\n * (cf. ReverseGeocodingDOM._createReverseGeocodingResultElement),\n * and changes style of matching marker on map (selected)\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n ReverseGeocode.prototype.onReverseGeocodingResultMouseOver = function (e) {\n // récupération de l'id du résultat survolé\n var tagid = e.target.id; // ex ReverseGeocodedLocation_21\n var idx = tagid.substring(tagid.indexOf(\"_\") + 1); // ex. 21\n\n // on passe le texte en gras\n if (e.target.classList) {\n e.target.classList.add(\"GPreverseGeocodedLocationHighlight\");\n }\n if (!this._resultsFeaturesSource) {\n return;\n }\n\n // on récupère l'entité correspondante au résultat survolé\n var f = this._resultsFeaturesSource.getFeatureById(parseInt(idx, 10));\n // et on lui affecte un nouveau style\n f.setStyle(this._resultsSelectedStyle);\n };\n\n /**\n * this method is called by event 'mouseout' on 'ReverseGeocodedLocation_' div\n * (cf. ReverseGeocodingDOM._createReverseGeocodingResultElement),\n * and changes style of matching marker on map (default)\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n ReverseGeocode.prototype.onReverseGeocodingResultMouseOut = function (e) {\n // récupération de l'id du résultat survolé\n var tagid = e.target.id; // ex GProuteResultsDetailsInstruction_125\n var idx = tagid.substring(tagid.indexOf(\"_\") + 1); // ex. 125\n\n // on repasse le texte en style normal\n if (e.target.classList) {\n e.target.classList.remove(\"GPreverseGeocodedLocationHighlight\");\n }\n if (!this._resultsFeaturesSource) {\n return;\n }\n // on récupère l'entité correspondante au résultat qui était survolé\n var f = this._resultsFeaturesSource.getFeatureById(parseInt(idx, 10));\n // et on lui réaffecte un style normal\n f.setStyle(this._resultsDefaultStyle);\n };\n\n // ################################################################### //\n // ################################ clean ############################ //\n // ################################################################### //\n\n /**\n * this method clears previous location results\n *\n * @private\n */\n ReverseGeocode.prototype._clearResults = function () {\n var map = this.getMap();\n this._reverseGeocodingLocations = [];\n // on vide le container avec la liste des résultats\n if (this._resultsListContainer) {\n while (this._resultsListContainer.firstChild) {\n this._resultsListContainer.removeChild(this._resultsListContainer.firstChild);\n }\n }\n // on retire la couche des résultats\n if (this._resultsFeaturesLayer) {\n map.removeLayer(this._resultsFeaturesLayer);\n this._resultsFeaturesLayer = null;\n }\n // on retire l'overlay de la popup de la carte\n if (this._popupOverlay != null) {\n map.removeOverlay(this._popupOverlay);\n this._popupOverlay = null;\n }\n // on retire les interactions sur les markers (select et mouseover)\n if (this._resultsSelectInteraction != null) {\n map.removeInteraction(this._resultsSelectInteraction);\n this._resultsSelectInteraction = null;\n }\n if (this._resultsHoverInteraction != null) {\n map.removeInteraction(this._resultsHoverInteraction);\n this._resultsHoverInteraction = null;\n }\n };\n\n /**\n * this method clears previous input features (features, layer, position and filters)\n *\n * @private\n */\n ReverseGeocode.prototype._clearInputFeatures = function () {\n // on efface les points qui ont pu être saisis précédemment (on vide la collection des features de la couche)\n if (this._inputFeatures) {\n this._inputFeatures.clear();\n }\n\n // on supprime les valeurs stockées\n this._requestGeom = null;\n };\n\n /**\n * this method displays waiting container and sets a timeout\n *\n * @private\n */\n ReverseGeocode.prototype._displayWaitingContainer = function () {\n this._waitingContainer.className = \"GProuteCalcWaitingContainerVisible\";\n this._waiting = true;\n\n // mise en place d'un timeout pour réinitialiser le panel (cacher la patience)\n // si on est toujours en attente (si la requête est bloquée par exemple)\n if (this._timer) {\n clearTimeout(this._timer);\n this._timer = null;\n }\n var context = this;\n this._timer = setTimeout(function () {\n if (context._waiting === true) {\n context._hideWaitingContainer();\n } else {\n if (context._timer) {\n clearTimeout(context._timer);\n }\n }\n }, 16000);\n };\n\n /**\n * this method hides waiting container and clears timeout\n *\n * @private\n */\n ReverseGeocode.prototype._hideWaitingContainer = function () {\n if (this._waiting) {\n this._waitingContainer.className = \"GProuteCalcWaitingContainerHidden\";\n this._waiting = false;\n clearTimeout(this._timer);\n this._timer = null;\n }\n };\n return ReverseGeocode;\n}(ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default.a);\n/* harmony default export */ __webpack_exports__[\"default\"] = (ReverseGeocode);\n\n// Expose ReverseGeocode as ol.control.ReverseGeocode (for a build bundle)\nif (window.ol && window.ol.control) {\n window.ol.control.ReverseGeocode = ReverseGeocode;\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9PcGVuTGF5ZXJzL0NvbnRyb2xzL1JldmVyc2VHZW9jb2RlLmpzPzI2ZTciXSwibmFtZXMiOlsibG9nZ2VyIiwiTG9nZ2VyIiwiZ2V0TG9nZ2VyIiwiUmV2ZXJzZUdlb2NvZGUiLCJDb250cm9sIiwib3B0aW9ucyIsIlR5cGVFcnJvciIsImluaXRpYWxpemUiLCJfY29udGFpbmVyIiwiX2luaXRDb250YWluZXIiLCJfY29udGFpbmVyRWxlbWVudCIsImVsZW1lbnQiLCJhcHBlbmRDaGlsZCIsImNhbGwiLCJ0YXJnZXQiLCJyZW5kZXIiLCJfX3Byb3RvX18iLCJwcm90b3R5cGUiLCJPYmplY3QiLCJjcmVhdGUiLCJVdGlscyIsImFzc2lnbiIsIlJldmVyc2VHZW9jb2RpbmdET00iLCJjb25zdHJ1Y3RvciIsImdldENvbGxhcHNlZCIsImNvbGxhcHNlZCIsInNldENvbGxhcHNlZCIsInVuZGVmaW5lZCIsImxvZyIsImRvY3VtZW50IiwiZ2V0RWxlbWVudEJ5SWQiLCJfdWlkIiwiY2xpY2siLCJzZXRNYXAiLCJtYXAiLCJfYWN0aXZhdGVNYXBJbnRlcmFjdGlvbiIsImRyYWdnYWJsZSIsIkRyYWdnYWJsZSIsImRyYWdFbGVtZW50IiwiX3BhbmVsQ29udGFpbmVyIiwiX3BhbmVsSGVhZGVyQ29udGFpbmVyIiwiZ2V0VGFyZ2V0RWxlbWVudCIsIl9tYXAiLCJnZXRNYXAiLCJfY2xlYX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lzIGluc3RhbmNlb2YgUmV2ZXJzZUdlb2NvZGUpKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwiRVJST1IgQ0xBU1NfQ09OU1RSVUNUT1JcIik7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBpbml0aWFsaXNhdGlvbiBkdSBjb21wb3NhbnRcbiAgICAgICAgdGhpcy5pbml0aWFsaXplKG9wdGlvbnMpO1xuXG4gICAgICAgIC8vIFdpZGdldCBtYWluIERPTSBjb250YWluZXJcbiAgICAgICAgdGhpcy5fY29udGFpbmVyID0gdGhpcy5faW5pdENvbnRhaW5lcigpO1xuICAgICAgICB0aGlzLl9jb250YWluZXJFbGVtZW50ID0gbnVsbDtcblxuICAgICAgICAvLyBvbiBwZXV0IMOpdmVudHVlbGxlbWVudCBlbmNhcHN1bGVyIGxlIGNvbXBvc2FudCBkYW5zIHVuZSBkaXYgcGFzc8OpZSBwYXIgbCd1dGlsaXNhdGV1clxuICAgICAgICBpZiAob3B0aW9ucy5lbGVtZW50ICYmIG9wdGlvbnMuZWxlbWVudC5hcHBlbmRDaGlsZCkge1xuICAgICAgICAgICAgLy8gZGFucyBjZSBjYXMgb24gc3RvY2tlIGxlcyBkZXV4IGNvbnRhaW5lclxuICAgICAgICAgICAgb3B0aW9ucy5lbGVtZW50LmFwcGVuZENoaWxkKHRoaXMuX2NvbnRhaW5lcik7XG4gICAgICAgICAgICB0aGlzLl9jb250YWluZXJFbGVtZW50ID0gb3B0aW9ucy5lbGVtZW50O1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gY2FsbCBvbC5jb250cm9sLkNvbnRyb2wgY29uc3RydWN0b3JcbiAgICAgICAgQ29udHJvbC5jYWxsKHRoaXMsIHtcbiAgICAgICAgICAgIGVsZW1lbnQgOiB0aGlzLl9jb250YWluZXJFbGVtZW50IHx8IHRoaXMuX2NvbnRhaW5lcixcbiAgICAgICAgICAgIHRhcmdldCA6IG9wdGlvbnMudGFyZ2V0LFxuIC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2NrZSBzb24gaW5kZXggcG91ciBsYSByZXRpcmVyIGR1IHRhYmxlYXUgKGFwcsOocyBhdm9pciB0ZXJtaW7DqSBkZSBwYXJjb3VyaXIgbGUgdGFibGVhdSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHdyb25nUmVzb3VyY2VzSW5kZXhlcy5wdXNoKGkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbG9nZ2VyLmxvZyhcIltSZXZlcnNlR2VvY29kZV0gb3B0aW9ucy5yZXNvdXJjZXMgOiBcIiArIHJlc291cmNlc1tpXSArIFwiIGlzIG5vdCBhIHJlc291cmNlIGZvciByZXZlcnNlIGdlb2NvZGVcIik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gb24gcmV0aXJlIGxlcyByZXNzb3VyZXMgbm9uIHLDqWbDqXJlbmPDqWVzIHF1J29uIGEgcHUgcmVuY29udHJlclxuICAgICAgICAgICAgICAgIGlmICh3cm9uZ1Jlc291cmNlc0luZGV4ZXMubGVuZ3RoICE9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAoaiA9IDA7IGogPCB3cm9uZ1Jlc291cmNlc0luZGV4ZXMubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc291cmNlcy5zcGxpY2Uod3JvbmdSZXNvdXJjZXNJbmRleGVzW2pdLCAxKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbG9nZ2VyLmxvZyhcIltSZXZlcnNlR2VvY29kZV0gJ29wdGlvbnMucmVzb3VyY2VzJyBwYXJhbWV0ZXIgc2hvdWxkIGJlIGFuIGFycmF5XCIpO1xuICAgICAgICAgICAgICAgIHJlc291cmNlcyA9IG51bGw7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBld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XRhdGlvbnNbaV0gKyBcIiBpcyBub3QgYSBkZWxpbWl0YXRpb24gZm9yIHJldmVyc2UgZ2VvY29kZVwiKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBvbiByZXRpcmUgbGVzIHJlc3NvdXJlcyBub24gcsOpZsOpcmVuY8OpZXMgcXUnb24gYSBwdSByZW5jb250cmVyXG4gICAgICAgICAgICAgICAgaWYgKHdyb25nRGVsaW1pdGF0aW9uc0luZGV4ZXMubGVuZ3RoICE9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAoaiA9IDA7IGogPCB3cm9uZ0RlbGltaXRhdGlvbnNJbmRleGVzLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkZWxpbWl0YXRpb25zLnNwbGljZSh3cm9uZ0RlbGltaXRhdGlvbnNJbmRleGVzW2pdLCAxKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbG9nZ2VyLmxvZyhcIltSZXZlcnNlR2VvY29kZV0gJ29wdGlvbnMuZGVsaW1pdGF0aW9ucycgcGFyYW1ldGVyIHNob3VsZCBiZSBhbiBhcnJheVwiKTtcbiAgICAgICAgICAgICAgICBkZWxpbWl0YXRpb25zID0gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiB0aGlzIG1ldGhvZCBpcyBjYWxsZWQgYnkgdGhpcy5pbml0aWFsaXplKCkgYW5kIGluaXRpYWxpemUgZ2VvY29kaW5nIHR5cGUgKD1yZXNvdXJjZSlcbiAgICAgKiAoXCJTdHJlZXRBZGRyZXNzXCIsIFwiUG9zaXRpb25PZkludGVyZXN0XCIsIFwiQ2FkYXN0cmFsUGFyY2VsXCIpXG4gICAgICpcbiAgICAgKiBAc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FZlY3RvclNvdXJjZSh7XG4gICAgICAgICAgICAgICAgICAgIGZlYXR1cmVzIDogdGhpcy5faW5wdXRGZWF0dXJlc1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIHRoaXMuX2lucHV0RmVhdHVyZXNMYXllciA9IG5ldyBWZWN0b3JMYXllcih7XG4gICAgICAgICAgICAgICAgICAgIHNvdXJjZSA6IHRoaXMuX2lucHV0RmVhdHVyZXNTb3VyY2UsXG4gICAgICAgICAgICAgICAgICAgIHN0eWxlIDogbmV3IFN0eWxlKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbGwgOiBuZXcgRmlsbCh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3IgOiBcInJnYmEoMCwgMTgzLCAxNTIsIDAuMylcIlxuICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICBzdHJva2UgOiBuZXcgU3Ryb2tlKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvciA6IFwicmdiYSgwLCAxODMsIDE1MiwgMC44KVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoIDogM1xuICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICBpbWFnZSA6IG5ldyBJY29uKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzcmMgOiBNYXJrZXJzW1widHVycXVvaXNlQmx1ZVwiXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbmNob3IgOiBbMC41LCAxXVxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAvLyBvbiByYWpvdXRlIGxlIGNoYW1wIGdwUmVzdWx0TGF5ZXJJZCBwZXJtZXR0YW50IGQnaWRlbnRpZmllciB1bmUgY291Y2hlIGNyw6llIHBhciBsZSBjb21wb3NhbnQuIChwb3VyIGxheWVyU3dpdGNoZXIgcGFyIGV4KVxuICAgICAgICAgICAgICAgIHRoaXMuX2lucHV0RmVhdHVyZXNMYXllci5ncFJlc3VsdExheWVySWQgPSBcInJldmVyc2VHZW9jb2RpbmdcIjtcbiAgICAgICAgICAgICAgICAvLyBvbiBham91dGUgbGEgY291Y2hlIMOgIGxhIGNhcnRlXG4gICAgICAgICAgICAgICAgbWFwLmFkZExheWVyKHRoaXMuX2lucHV0RmVhdHVyZXNMYXllcik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIDIuIENyw6lhdGlvbiBkZSBsJ2ludGVyYWN0aW9uIGRlIGRlc3Npbiwgc2Vsb24gbGUgdHlwZSBkZSBkw6lsaW1pdGF0aW9uIHPDqWxlY3Rpb25uw6lcbiAgICAgICAgICAgIHZhciBkZWxpbWl0YXRpb24gPSB0aGlzLl9jdXJyZW50R2VvY29kaW5nRGVsaW1pdGF0aW9uLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKGRlbGltaXRhdGlvbikge1xuICAgICAgICAgICAgICAgIGNhc2UgXCJwb2ludFwiOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLl9hY3RpdmF0ZVBvaW50SW50ZXJhY3Rpb24obWFwKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSBcImNpcmNsZVwiOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLl9hY3RpdmF0ZUNpcmNsZUludGVyYWN0aW9uKG1hcCk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgXCJleHRlbnRcIjpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fYWN0aXZhdGVCb3hJbnRlcmFjdGlvbihtYXApO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gMy4gU2kgdW4gbGF5ZXIgc3dpdGNoZXIgZXN0IHByw6lzZW50IGRhbnMgbGEgY2FydGUsIG9uIGx1aSBhZmZlY3RlIGRlcyBpbmZvcm1hdGlvbnMgcG91ciBjZXR0ZSBjb3VjaGVcbiAgICAgICAgICAgIG1hcC5nZXRDb250cm9scygpLmZvckVhY2goXG4gICAgICAgICAgICAgICAgKGNvbnRyb2wpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbnRyb2wgaW5zdGFuY2VvZiBMYXllclN3aXRjaGVyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB1biBsYXllciBzd2l0Y2hlciBlc3QgcHLDqXNlbnQgZGFucyBsYSBjYXJ0ZVxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGxheWVySWQgPSB0aGlzLl9pbnB1dEZlYXR1cmVzTGF5ZXIuZ3BMYXllcklkO1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gb24gbidham91dGUgZGVzIGluZm9ybWF0aW9ucyBxdWUgcydpbCBuJ3kgZW4gYSBwYXMgZMOpasOgIChzaSBsZSB0aXRyZSBlc3QgbGUgbnVtw6lybyBwYXIgZMOpZmF1dClcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb250cm9sLl9sYXllcnNbbGF5ZXJJZF0udGl0bGUgPT09IGxheWVySWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sLmFkZExheWVyKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9pbnB1dEZlYXR1cmVzTGF5ZXIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlIDogdGhpcy5vcHRpb25zLmxheWVyRGVzY3JpcHRpb24udGl0bGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjcmlwdGlvbiA6IHRoaXMub3B0aW9ucy5sYXllckRlc2NyaXB0aW9uLmRlc2NyaXB0aW9uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRyb2wuc2V0UmVtb3ZhYmxlKHRoaXMuX2lucHV0RmVhdHVyZXNMYXllciwgZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiB0aGlzIG1ldGhvZCBpcyBjYWxsZWQgYnkgdGhpcy5fYWN0aXZhdGVNYXBJbnRlcmFjdGlvbixcbiAgICAgKiBhbmQgY3JlYXRlcyBtYXAgcG9pbnQgZHJhd2luZyBpbnRlcmFjdGlvbi5cbiAgICAgKlxuICAgICAqIEBwYXJhbSB7b2wuTWFwfSBtYXAgLSBjb250cm9sIG1hcC5cbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqL1xuICAgIFJldmVyc2VHZW9jb2RlLnByb3RvdHlwZS5fYWN0aXZhdGVQb2ludEludGVyYWN0aW9uID0gZnVuY3Rpb24gKG1hcCkge1xuICAgICAgICAvLyBpbnRlcmFjdGlvbiBwZXJtZXR0YW50IGRlIGRlc3NpbmVyIHVuIHBvaW50XG4gICAgICAgIHRoaXMuX21hcEludGVyYWN0aW9uID0gbmV3IERyYXdJbnRlcmFjdGlvbih7XG4gICAgICAgICAgICBzdHlsZSA6IG5ldyBTdHlsZSh7XG4gICAgICAgICAgICAgICAgaW1hZ2UgOiBuZXcgQ2lyY2xlKHtcbiAgICAgICAgICAgICAgICAgICAgcmFkaXVzIDogMCxcbiAgICAgICAgICAgICAgICAgICAgZmlsbCA6IG5ldyBGaWxsKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yIDogXCJyZ2JhKDAsIDE4MywgMTUyLCAwLjgpXCJcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfSksXG4gICAgICAgICAgICB0eXBlIDogKFwiUG9pbnRcIiksXG4gICAgICAgICAgICBzb3VyY2UgOiB0aGlzLl9pbnB1dEZlYXR1cmVzU291cmNlXG4gICAgICAgIH0pO1xuXG4gICAgICAgIHRoaXMuX21hcEludGVyYWN0aW9uLm9uKFxuICAgICAgICAgICAgXCJkcmF3c3RhcnRcIixcbiAgICAgICAgICAgIChlKSA9PiB7XG4gICAgICAgICAgICAgICAgbG9nZ2VyLmxvZyhcIm9uIGRyYXdzdGFydCBcIiwgZSk7XG5cbiAgICAgICAgICAgICAgICAvLyBvbiBlZmZhY2UgbGVzIHBvaW50cyBxdWkgb250IHB1IMOqdHJlIHNhaXNpcyBwcsOpY8OpZGVtbWVudCAob24gdmlkZSBsYSBjb2xsZWN0aW9uIGRlcyBmZWF0dXJlcyBkZSBsYSBjb3VjaGUpXG4gICAgICAgICAgICAgICAgdGhpcy5faW5wdXRGZWF0dXJlcy5jbGVhcigpO1xuXG4gICAgICAgICAgICAgICAgLy8gb24gcsOpY3Vww6hyZSBsZXMgY29vcmRvbm7DqWVzIGR1IHBvaW50IHF1aSB2aWVudCBkJ8OqdHJlIHNhaXNpXG4gICAgICAgICAgICAgICAgdGhpcy5fb25EcmF3U3RhcnQoZSwgXCJwb2ludFwiKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgKTtcblxuICAgICAgICB0aGlzLl9tYXBJbnRlcmFjdGlvbi5vbihcbiAgICAgICAgICAgIFwiZHJhd2VuZFwiLFxuICAgICAgICAgICAgKGUpID0+IHtcbiAgICAgICAgICAgICAgICBsb2dnZXIubG9nKFwib24gZHJhd2VuZFwiLCBlKTtcblxuICAgICAgICAgICAgICAgIC8vIG9uIHLDqWN1cMOocmUgbGUgcmF5b24gZHUgY2VyY2xlIHF1aSB2aWVudCBkJ8OqdHJlIHRyYWPDqVxuICAgICAgICAgICAgICAgIGlmIChlLmZlYXR1cmUgJiYgZS5mZWF0dXJlLmdldEdlb21ldHJ5KSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3JlcXVlc3RHZW9tID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZSA6IFwiUG9pbnRcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvb3JkaW5hdGVzIDogW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3JlcXVlc3RQb3NpdGlvbi5sb24sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fcmVxdWVzdFBvc2l0aW9uLmxhdFxuICAgICAgICAgICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgKTtcblxuICAgICAgICBtYXAuYWRkSW50ZXJhY3Rpb24odGhpcy5fbWFwSW50ZXJhY3Rpb24pO1xuICAgICAgICB0aGlzLl9zZXRDdXJzb3IoXCJjcm9zc2hhaXJcIiwgbWFwKTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogdGhpcyBtZXRob2QgaXMgY2FsbGVkIGJ5IHRoaXMuX2FjdGl2YXRlTWFwSW50ZXJhY3Rpb24sXG4gICAgICogYW5kIGNyZWF0ZXMgbWFwIGNpcmNsZSBkcmF3aW5nIGludGVyYWN0aW9uLlxuICAgICAqXG4gICAgICogQHBhcmFtIHtvbC5NYXB9IG1hcCAtIGNvbnRyb2wgbWFwLlxuICAgICAqIEBwcml2YXRlXG4gICAgICovXG4gICAgUmV2ZXJzZUdlb2NvZGUucHJvdG90eXBlLl9hY3RpdmF0ZUNpcmNsZUludGVyYWN0aW9uID0gZnVuY3Rpb24gKG1hcCkge1xuICAgICAgICAvLyBpbnRlcmFjdGlvbiBwZXJtZXR0YW50IGRlIGRlc3NpbmVyIHVuIGNlcmNsZVxuICAgICAgICB0aGlzLl9tYXBJbnRlcmFjdGlvbiA9IG5ldyBEcmF3SW50ZXJhY3Rpb24oe1xuICAgICAgICAgICAgc3R5bGUgOiBuZXcgU3R5bGUoe1xuICAgICAgICAgICAgICAgIGZpbGwgOiBuZXcgRmlsbCh7XG4gICAgICAgICAgICAgICAgICAgIGNvbG9yIDogXCJyZ2JhKDAsIDE4MywgMTUyLCAwLjMpXCJcbiAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICBzdHJva2UgOiBuZXcgU3Ryb2tlKHtcbiAgICAgICAgICAgICAgICAgICAgY29sb3IgOiBcInJnYmEoMCwgMTgzLCAxNTIsIDAuOClcIixcbiAgICAgICAgICAgICAgICAgICAgd2lkdGggOiAzXG4gICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgaW1hZ2UgOiBuZXcgQ2lyY2xlKHtcbiAgICAgICAgICAgICAgICAgICAgcmFkaXVzIDogNCxcbiAgICAgICAgICAgICAgICAgICAgZmlsbCA6IG5ldyBGaWxsKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yIDogXCJyZ2JhKDAsIDE4MywgMTUyLCAwLjgpXCJcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfSksXG4gICAgICAgICAgICB0eXBlIDogKFwiQ2lyY2xlXCIpLFxuICAgICAgICAgICAgc291cmNlIDogdGhpcy5faW5wdXRGZWF0dXJlc1NvdXJjZVxuICAgICAgICB9KTtcblxuICAgICAgICB0aGlzLl9tYXBJbnRlcmFjdGlvbi5vbihcbiAgICAgICAgICAgIFwiZHJhd3N0YXJ0XCIsXG4gICAgICAgICAgICAoZSkgPT4ge1xuICAgICAgICAgICAgICAgIGxvZ2dlci5sb2coXCJvbiBkcmF3c3RhcnQgXCIsIGUpO1xuICAgICAgICAgICAgICAgIC8vIG9uIGVmZmFjZSBsZXMgcG9pbnRzIHF1aSBvbnQgcH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LCBlbmRbMV1dLCBlbmQsIFtlbmRbMF0sIHN0YXJ0WzFdXSwgc3RhcnRdXG4gICAgICAgICAgICBdKTtcbiAgICAgICAgICAgIHJldHVybiBnZW9tZXRyeTtcbiAgICAgICAgfTtcblxuICAgICAgICAvLyBpbnRlcmFjdGlvbiBwZXJtZXR0YW50IGRlIGRlc3NpbmVyIHVuIHJlY3RhbmdsZSAoPSBMaW5lU3RyaW5nIGRlIDUgcG9pbnRzLCDDoCBwYXJ0aXIgZGUgMiBwb2ludHMgc2Fpc2lzKVxuICAgICAgICB0aGlzLl9tYXBJbnRlcmFjdGlvbiA9IG5ldyBEcmF3SW50ZXJhY3Rpb24oe1xuICAgICAgICAgICAgc3R5bGUgOiBuZXcgU3R5bGUoe1xuICAgICAgICAgICAgICAgIGZpbGwgOiBuZXcgRmlsbCh7XG4gICAgICAgICAgICAgICAgICAgIGNvbG9yIDogXCJyZ2JhKDAsIDE4MywgMTUyLCAwLjMpXCJcbiAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICBzdHJva2UgOiBuZXcgU3Ryb2tlKHtcbiAgICAgICAgICAgICAgICAgICAgY29sb3IgOiBcInJnYmEoMCwgMTgzLCAxNTIsIDAuOClcIixcbiAgICAgICAgICAgICAgICAgICAgd2lkdGggOiAzXG4gICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgaW1hZ2UgOiBuZXcgQ2lyY2xlKHtcbiAgICAgICAgICAgICAgICAgICAgcmFkaXVzIDogNCxcbiAgICAgICAgICAgICAgICAgICAgZmlsbCA6IG5ldyBGaWxsKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yIDogXCJyZ2JhKDAsIDE4MywgMTUyLCAwLjgpXCJcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfSksXG4gICAgICAgICAgICB0eXBlIDogKFwiTGluZVN0cmluZ1wiKSxcbiAgICAgICAgICAgIHNvdXJ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gKGUsIHR5cGUpIHtcbiAgICAgICAgdmFyIGNvb3JkaW5hdGU7XG4gICAgICAgIGlmIChlLmZlYXR1cmUgJiYgZS5mZWF0dXJlLmdldEdlb21ldHJ5KSB7XG4gICAgICAgICAgICB2YXIgZ2VvbWV0cnkgPSBlLmZlYXR1cmUuZ2V0R2VvbWV0cnkoKTtcbiAgICAgICAgICAgIGlmICh0eXBlID09PSBcInBvaW50XCIpIHtcbiAgICAgICAgICAgICAgICBjb29yZGluYXRlID0gZ2VvbWV0cnkuZ2V0Q29vcmRpbmF0ZXMoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0eXBlID09PSBcImNpcmNsZVwiKSB7XG4gICAgICAgICAgICAgICAgY29vcmRpbmF0ZSA9IGdlb21ldHJ5LmdldENlbnRlcigpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmICghY29vcmRpbmF0ZSkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIGNycztcbiAgICAgICAgaWYgKHRoaXMub3B0aW9ucy5yZXZlcnNlR2VvY29kZU9wdGlvbnMgJiYgdGhpcy5vcHRpb25zLnJldmVyc2VHZW9jb2RlT3B0aW9ucy5zcnMpIHtcbiAgICAgICAgICAgIGNycyA9IHRoaXMub3B0aW9ucy5yZXZlcnNlR2VvY29kZU9wdGlvbnMuc3JzO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIG1hcCA9IHRoaXMuZ2V0TWFwKCk7XG4gICAgICAgICAgICBpZiAoIW1hcCB8fCAhbWFwLmdldFZpZXcoKSkge1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNycyA9IG1hcC5nZXRWaWV3KCkuZ2V0UHJvamVjdGlvbigpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIGdlb0Nvb3JkaW5hdGUgPSBvbFRyYW5zZm9ybVByb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CBwb2ludDQsIHN0YXJ0XVxuICAgICAgICAgICAgLy8gY2FyIGMnZXN0IHVuZSBsaW5lc3RyaW5nIGRvbmMgb24gYSA1IGNvb3Jkb25uw6llcyBwb3VyIGJvdWNsZXJcbiAgICAgICAgICAgIHZhciBjb29yZGluYXRlcyA9IGUuZmVhdHVyZS5nZXRHZW9tZXRyeSgpLmdldENvb3JkaW5hdGVzKClbMF07XG4gICAgICAgICAgICB2YXIgc3RhcnQgPSBjb29yZGluYXRlc1swXTtcbiAgICAgICAgICAgIHZhciBlbmQgPSBjb29yZGluYXRlc1syXTtcblxuICAgICAgICAgICAgdmFyIGNycztcbiAgICAgICAgICAgIGlmICh0aGlzLm9wdGlvbnMucmV2ZXJzZUdlb2NvZGVPcHRpb25zICYmIHRoaXMub3B0aW9ucy5yZXZlcnNlR2VvY29kZU9wdGlvbnMuc3JzKSB7XG4gICAgICAgICAgICAgICAgY3JzID0gdGhpcy5vcHRpb25zLnJldmVyc2VHZW9jb2RlT3B0aW9ucy5zcnM7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhciBtYXAgPSB0aGlzLmdldE1hcCgpO1xuICAgICAgICAgICAgICAgIGlmICghbWFwIHx8ICFtYXAuZ2V0VmlldygpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY3JzID0gbWFwLmdldFZpZXcoKS5nZXRQcm9qZWN0aW9uKCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIG9uIHJlcHJvamV0dGUgbGVzIGNvb3Jkb25uw6llcyBkZXMgZGV1eCBleHRyw6ltaXTDqXMgZHUgcmVjdGFuZ2xlIChzdGFydCBldCBlbmQpXG4gICAgICAgICAgICB2YXIgc3RhcnRHZW9Db29yZGluYXRlID0gb2xUcmFuc2Zvcm1Qcm9qKHN0YXJ0LCBjcnMsIFwiRVBTRzo0MzI2XCIpO1xuICAgICA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1cblxuICAgICAgICAgICAgdGhpcy5fcmVxdWVzdEdlb20gPSB7XG4gICAgICAgICAgICAgICAgdHlwZSA6IFwiUG9seWdvblwiLFxuICAgICAgICAgICAgICAgIGNvb3JkaW5hdGVzIDogW1tcbiAgICAgICAgICAgICAgICAgICAgW2Jib3gubGVmdCwgYmJveC50b3BdLFxuICAgICAgICAgICAgICAgICAgICBbYmJveC5sZWZ0LCBiYm94LmJvdHRvbV0sXG4gICAgICAgICAgICAgICAgICAgIFtiYm94LnJpZ2h0LCBiYm94LmJvdHRvbV0sXG4gICAgICAgICAgICAgICAgICAgIFtiYm94LnJpZ2h0LCBiYm94LnRvcF0sXG4gICAgICAgICAgICAgICAgICAgIFtiYm94LmxlZnQsIGJib3gudG9wXVxuICAgICAgICAgICAgICAgIF1dXG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICBsb2dnZXIubG9nKFwic2VhcmNoR2VvbWV0cnkgZmlsdGVyIDogXCIsIHRoaXMuX3JlcXVlc3RHZW9tKTtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICAvKiogXG4gICAgICogdGhpcyBjaGFuZ2UgdGhlIGN1cnNvciBvZiB0aGUgbWFwIHdoZW4gZW50ZXJpbmcgYSBwb2ludC5cbiAgICAgKlxuICAgICAqIEBwYXJhbSB7U3RyaW5nfSBjdXJzb3IgLSBjdXJzb3Igc3R5bGVcbiAgICAgKiBAcGFyYW0ge29sLk1hcH0gbWFwIC0gY29udHJvbCBtYXAgKG9wdGlvbmFsKVxuICAgICAqIEBwcml2YXRlXG4gICAgICovXG4gICAgUmV2ZXJzZUdlb2NvZGUucHJvdG90eXBlLl9zZXRDdXJzb3IgPSBmdW5jdGlvbiAoY3Vyc29yLCBtYXApIHtcbiAgICAgICAgbWFwID0gbWFwIHx8IHRoaXMuZ2V0TWFwKCk7XG4gICAgICAgIGlmICghbWFwKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgdmFyIGRpdiA9IG1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JldmVyc2VTZXJ2aWNlIDogcmV2ZXJzZUdlb2NvZGVPcHRpb25zLm9sZFJldmVyc2VTZXJ2aWNlIHx8IHRydWUsXG4gICAgICAgICAgICBmaWx0ZXJPcHRpb25zIDoge1xuICAgICAgICAgICAgICAgIHR5cGUgOiBbdGhpcy5fY3VycmVudEdlb2NvZGluZ1R5cGVdXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgc3JzIDogXCJDUlM6ODRcIixcbiAgICAgICAgICAgIHJldHVybkZyZWVGb3JtIDogZmFsc2UsXG4gICAgICAgICAgICBtYXhpbXVtUmVzcG9uc2VzIDogcmV2ZXJzZUdlb2NvZGVPcHRpb25zLm1heGltdW1SZXNwb25zZXMgfHwgMTgsXG4gICAgICAgICAgICB0aW1lT3V0IDogcmV2ZXJzZUdlb2NvZGVPcHRpb25zLnRpbWVPdXQgfHwgMzAwMDAsXG4gICAgICAgICAgICAvLyBwcm90b2NvbCA6IHJldmVyc2VHZW9jb2RlT3B0aW9ucy5wcm90b2NvbCB8fCBcIlhIUlwiLFxuICAgICAgICAgICAgLy8gY2FsbGJhY2sgb25TdWNjZXNzXG4gICAgICAgICAgICBvblN1Y2Nlc3MgOiBmdW5jdGlvbiAocmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2UubG9jYXRpb25zKSB7XG4gICAgICAgICAgICAgICAgICAgIGxvZ2dlci5sb2coXCJyZXZlcnNlR2VvY29kZSByZXN1bHRzIDogXCIsIHJlc3BvbnNlLmxvY2F0aW9ucyk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRleHQuX2Rpc3BsYXlHZW9jb2RlZExvY2F0aW9ucyhyZXNwb25zZS5sb2NhdGlvbnMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoYk9uU3VjY2Vzcykge1xuICAgICAgICAgICAgICAgICAgICByZXZlcnNlR2VvY29kZU9wdGlvbnMub25TdWNjZXNzLmNhbGwoY29udGV4dCwgcmVzcG9uc2UubG9jYXRpb25zKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgLy8gY2FsbGJhY2sgb25GYWlsdXJlXG4gICAgICAgICAgICBvbkZhaWx1cmUgOiBmdW5jdGlvbiAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgICAvLyBGSVhNRSBtaXNlIMOgIGpvdXIgZHUgY29udHJvbGUgbWFpcyBsZSBzZXJ2aWNlIG5lIHJlcG9uZCBwYXMgZW4gMjAwICE/XG5cbiAgICAgICAgICAgICAgICAvLyBvbiBjYWNoZSBsYSBwYXRpZW5jZVxuICAgICAgICAgICAgICAgIGNvbnRleHQuX2hpZGVXYWl0aW5nQ29udGFpbmVyKCk7XG5cbiAgICAgICAgICAgICAgICAvLyBzdXBwcmVzc2lvbiBkJ8OpdmVudHVlbHMgcsOpc3VsdGF0cyBwcsOpY8OpZGVudHNcbiAgICAgICAgICAgICAgICBjb250ZXh0Ll9jbGVhclJlc3VsdHMoKTtcbiAgICAgICAgICAgICAgICAvLyBvbiBlZmZhY2UgbGVzIHBvaW50cyBxdWkgb250IMOpdMOpIHNhaXNpcyBwcsOpY8OpZGVtbWVudFxuICAgICAgICAgICAgICAgIGNvbnRleHQuX2NsZWFySW5wdXRGZWF0dXJlcygpO1xuXG4gICAgICAgICAgICAgICAgLy8gZXQgb24gcsOpYWN0aXZlIGwnaW50ZXJhY3Rpb24gc3VyIGxhIG1hcFxuICAgICAgICAgICAgICAgIGNvbnRleHQuX2FjdGl2YXRlTWFwSW50ZXJhY3Rpb24obWFwKTtcbiAgICAgICAgICAgICAgICBsb2dnZXIubG9nKGVycm9yLm1lc3NhZ2UpO1xuXG4gICAgICAgICAgICAgICAgaWYgKGJPbkZhaWx1cmUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV2ZXJzZUdlb2NvZGVPcHRpb25zLm9uRmFpbHVyZS5jYWxsKGNvbnRleHQsIGVycm9yKTtcbiAgICAgICAgICAgICA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WV0QWRkcmVzc1wiOlxuICAgICAgICAgICAgICAgIGlmIChhdHRyLnN0cmVldCkge1xuICAgICAgICAgICAgICAgICAgICBsb2NhdGlvbkRlc2NyaXB0aW9uICs9IGF0dHIuaG91c2VudW1iZXIgPyBhdHRyLmhvdXNlbnVtYmVyICsgXCIgXCIgOiBcIlwiO1xuICAgICAgICAgICAgICAgICAgICBsb2NhdGlvbkRlc2NyaXB0aW9uICs9IGF0dHIuc3RyZWV0ICsgXCIsIFwiO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsb2NhdGlvbkRlc2NyaXB0aW9uICs9IGF0dHIucG9zdGNvZGUgKyBcIiBcIiArIGF0dHIuY2l0eTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSBcIlBvc2l0aW9uT2ZJbnRlcmVzdFwiOlxuICAgICAgICAgICAgICAgIGxvY2F0aW9uRGVzY3JpcHRpb24gKz0gYXR0ci50b3BvbnltO1xuICAgICAgICAgICAgICAgIGlmIChhdHRyLnBvc3Rjb2RlLmxlbmd0aCA9PT0gMSkge1xuICAgICAgICAgICAgICAgICAgICBsb2NhdGlvbkRlc2NyaXB0aW9uICs9IFwiLCBcIiArIGF0dHIucG9zdGNvZGVbMF07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGxvY2F0aW9uRGVzY3JpcHRpb24gKz0gXCIgKFwiICsgYXR0ci5jYXRlZ29yeS5qb2luKFwiLFwiKSArIFwiKVwiO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlIFwiQ2FkYXN0cmFsUGFyY2VsXCI6XG4gICAgICAgICAgICAgICAgbG9jYXRpb25EZXNjcmlwdGlvbiArPSBhdHRyLmlkO1xuICAgICAgICAgICAgICAgIGxvY2F0aW9uRGVzY3JpcHRpb24gKz0gYXR0ci5jaXR5ID8gXCIgKFwiICsgYXR0ci5jaXR5ICsgXCIpXCIgOiBcIlwiO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kdWUgbidlc3QgcGFzIGTDqWZpbmllLCBvbiB6b29tZSBkb25jIHN1ciBsZSByw6lzdWxhdFxuICAgICAgICAgICAgICAgIHZhciBmZWF0dXJlID0gdGhpcy5fcmVzdWx0c0ZlYXR1cmVzLml0ZW0oMCk7XG4gICAgICAgICAgICAgICAgdmFyIGNvb3JkcyA9IGZlYXR1cmUuZ2V0R2VvbWV0cnkoKS5nZXRDb29yZGluYXRlcygpO1xuICAgICAgICAgICAgICAgIG1hcC5nZXRWaWV3KCkuc2V0Q2VudGVyKGNvb3Jkcyk7XG4gICAgICAgICAgICAgICAgbWFwLmdldFZpZXcoKS5zZXRab29tKDE3KTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gMy4gYWpvdXQgZGVzIGludGVyYWN0aW9ucyAoc3Vydm9sLCBjbGljaylcbiAgICAgICAgICAgIC8vIGF1IHN1cnZvbCA6IG1vZGlmaWNhdGlvbiBkZXMgc3R5bGVzIChtYXJrZXIgZXQgbGlzdClcbiAgICAgICAgICAgIHRoaXMuX3Jlc3VsdHNIb3ZlckludGVyYWN0aW9uID0gbmV3IFNlbGVjdEludGVyYWN0aW9uKHtcbiAgICAgICAgICAgICAgICBjb25kaXRpb24gOiBldmVudFBvaW50ZXJNb3ZlLFxuICAgICAgICAgICAgICAgIGxheWVycyA6IFt0aGlzLl9yZXN1bHRzRmVhdHVyZXNMYXllcl1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgdGhpcy5fcmVzdWx0c0hvdmVySW50ZXJhY3Rpb24ub24oXG4gICAgICAgICAgICAgICAgXCJzZWxlY3RcIixcbiAgICAgICAgICAgICAgICAoZSkgPT4gdGhpcy5fb25SZXN1bHRzRmVhdHVyZU1vdXNlT3ZlcihlKVxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIG1hcC5hZGRJbnRlcmFjdGlvbih0aGlzLl9yZXN1bHRzSG92ZXJJbnRlcmFjdGlvbik7XG5cbiAgICAgICAgICAgIC8vIG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ICAgICBjYXNlIFwiQ2FkYXN0cmFsUGFyY2VsXCI6XG4gICAgICAgICAgICAgICAgICAgIGdlb2NvZGVUeXBlID0gXCJwYXJjZWxsZXMgY2FkYXN0cmFsZXNcIjtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBtYXAuZ2V0Q29udHJvbHMoKS5mb3JFYWNoKFxuICAgICAgICAgICAgICAgIChjb250cm9sKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChjb250cm9sIGluc3RhbmNlb2YgTGF5ZXJTd2l0Y2hlcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gdW4gbGF5ZXIgc3dpdGNoZXIgZXN0IHByw6lzZW50IGRhbnMgbGEgY2FydGVcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBsYXllcklkID0gdGhpcy5fcmVzdWx0c0ZlYXR1cmVzTGF5ZXIuZ3BMYXllcklkO1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gb24gbidham91dGUgZGVzIGluZm9ybWF0aW9ucyBxdWUgcydpbCBuJ3kgZW4gYSBwYXMgZMOpasOgIChzaSBsZSB0aXRyZSBlc3QgbGUgbnVtw6lybyBwYXIgZMOpZmF1dClcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb250cm9sLl9sYXllcnNbbGF5ZXJJZF0udGl0bGUgPT09IGxheWVySWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sLmFkZExheWVyKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9yZXN1bHRzRmVhdHVyZXNMYXllciwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGUgOiBcIlLDqXN1bHRhdHMgZGUgbGEgcmVjaGVyY2hlIGludmVyc2VcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2NyaXB0aW9uIDogXCJSw6lzdWx0YXRzIGRlIGxhIHJlY2hlcmNoZSBpbnZlcnNlIHN1ciBsZXMgXCIgKyBnZW9jb2RlVHlwZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sLnNldFJlbW92YWJsZSh0aGlzLl9yZXN1bHRzRmVhdHVyZXNMYXllciwgZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiB0aGlzIG1ldGhvZCBpcyBjYWxsZWQgYnkgdGhpcy5fZGlzcGxheUdlb2NvZGVkTG9jYXRpb25zKClcbiAgICAgKiBhbmQgY3JlYXRlcyByZXN1bHQgbGF5ZXIgKHdoZXJlIGdlb2NvZGVkIGxvY2F0aW9ucyB3aWxsIGJlIGRpc3BsYXllZClcbiAgICAgKlxuICAgICAqIEBwcml2YXRlXG4gICAgICovXG4gICAgUmV2ZXJzZUdlb2NvZGUucHJvdG90eXBlLl9jcmVhdGVSZXN1bHRzTGF5ZXIgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciBtYXAgPSB0aGlzLmdldE1hcCgpO1xuXG4gICAgICAgIHRoaXMuX3Jlc3VsdHNGZWF0dXJlcyA9IG5ldyBDb2xsZWN0aW9uKCk7XG5cbiAgICAgICAgLy8gb24gY3LDqWUgbGEgY291Y2hlIHF1aSB2YSBhY2N1ZWlsbGlyIGxlcyBmZWF0dXJlc1xuICAgICAgICB0aGlzLl9yZXN1bHRzRmVhdHVyZXNTb3VyY2UgPSBuZXcgVmVjdG9yU291cmNlKHtcbiAgICAgICAgICAgIGZlYXR1cmVzI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8gc2kgb24gZXN0IHRvdWpvdXJzIGVuIGF0dGVudGUgKHNpIGxhIHJlcXXDqnRlIGVzdCBibG9xdcOpZSBwYXIgZXhlbXBsZSlcbiAgICAgICAgaWYgKHRoaXMuX3RpbWVyKSB7XG4gICAgICAgICAgICBjbGVhclRpbWVvdXQodGhpcy5fdGltZXIpO1xuICAgICAgICAgICAgdGhpcy5fdGltZXIgPSBudWxsO1xuICAgICAgICB9XG4gICAgICAgIHZhciBjb250ZXh0ID0gdGhpcztcbiAgICAgICAgdGhpcy5fdGltZXIgPSBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGlmIChjb250ZXh0Ll93YWl0aW5nID09PSB0cnVlKSB7XG4gICAgICAgICAgICAgICAgY29udGV4dC5faGlkZVdhaXRpbmdDb250YWluZXIoKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgaWYgKGNvbnRleHQuX3RpbWVyKSB7XG4gICAgICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dChjb250ZXh0Ll90aW1lcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9LCAxNjAwMCk7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIHRoaXMgbWV0aG9kIGhpZGVzIHdhaXRpbmcgY29udGFpbmVyIGFuZCBjbGVhcnMgdGltZW91dFxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBSZXZlcnNlR2VvY29kZS5wcm90b3R5cGUuX2hpZGVXYWl0aW5nQ29udGFpbmVyID0gZnVuY3Rpb24gKCkge1xuICAgICAgICBpZiAodGhpcy5fd2FpdGluZykge1xuICAgICAgICAgICAgdGhpcy5fd2FpdGluZ0NvbnRhaW5lci5jbGFzc05hbWUgPSBcIkdQcm91dGVDYWxjV2FpdGluZ0NvbnRhaW5lckhpZGRlblwiO1xuICAgICAgICAgICAgdGhpcy5fd2FpdGluZyA9IGZhbHNlO1xuICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHRoaXMuX3RpbWVyKTtcbiAgICAgICAgICAgIHRoaXMuX3RpbWVyID0gbnVsbDtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICByZXR1cm4gUmV2ZXJzZUdlb2NvZGU7XG59KENvbnRyb2wpKTtcblxuZXhwb3J0IGRlZmF1bHQgUmV2ZXJzZUdlb2NvZGU7XG5cbi8vIEV4cG9zZSBSZXZlcnNlR2VvY29kZSBhcyBvbC5jb250cm9sLlJldmVyc2VHZW9jb2RlIChmb3IgYSBidWlsZCBidW5kbGUpXG5pZiAod2luZG93Lm9sICYmIHdpbmRvdy5vbC5jb250cm9sKSB7XG4gICAgd2luZG93Lm9sLmNvbnRyb2wuUmV2ZXJzZUdlb2NvZGUgPSBSZXZlcnNlR2VvY29kZTtcbn1cbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/OpenLayers/Controls/ReverseGeocode.js\n"); /***/ }), @@ -2553,7 +2565,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CSS /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CSS_Controls_Route_GProuteOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../CSS/Controls/Route/GProuteOpenLayers.css */ \"./src/OpenLayers/CSS/Controls/Route/GProuteOpenLayers.css\");\n/* harmony import */ var _CSS_Controls_Route_GProuteOpenLayers_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_Route_GProuteOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ol/control/Control */ \"ol/control/Control\");\n/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_control_Control__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ol/Observable */ \"ol/Observable\");\n/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ol_Observable__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ol/Overlay */ \"ol/Overlay\");\n/* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ol_Overlay__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ol/layer/Vector */ \"ol/layer/Vector\");\n/* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(ol_layer_Vector__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var ol_source_Vector__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ol/source/Vector */ \"ol/source/Vector\");\n/* harmony import */ var ol_source_Vector__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(ol_source_Vector__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var ol_events_condition__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ol/events/condition */ \"ol/events/condition\");\n/* harmony import */ var ol_events_condition__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(ol_events_condition__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var ol_interaction__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ol/interaction */ \"ol/interaction\");\n/* harmony import */ var ol_interaction__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(ol_interaction__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ol/style */ \"ol/style\");\n/* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(ol_style__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ol/proj */ \"ol/proj\");\n/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(ol_proj__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! geoportal-access-lib */ \"./node_modules/geoportal-access-lib/src/Gp.js\");\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Common/Utils */ \"./src/Common/Utils.js\");\n/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Common/Utils/SelectorID */ \"./src/Common/Utils/SelectorID.js\");\n/* harmony import */ var _Utils_Markers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Utils/Markers */ \"./src/OpenLayers/Controls/Utils/Markers.js\");\n/* harmony import */ var _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../Common/Utils/Draggable */ \"./src/Common/Utils/Draggable.js\");\n/* harmony import */ var _Utils_Interactions__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Utils/Interactions */ \"./src/OpenLayers/Controls/Utils/Interactions.js\");\n/* harmony import */ var _LocationSelector__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./LocationSelector */ \"./src/OpenLayers/Controls/LocationSelector.js\");\n/* harmony import */ var _Export__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Export */ \"./src/OpenLayers/Controls/Export.js\");\n/* harmony import */ var _LayerSwitcher__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./LayerSwitcher */ \"./src/OpenLayers/Controls/LayerSwitcher.js\");\n/* harmony import */ var _Formats_GeoJSON__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../Formats/GeoJSON */ \"./src/OpenLayers/Formats/GeoJSON.js\");\n/* harmony import */ var _Common_Controls_RouteDOM__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../Common/Controls/RouteDOM */ \"./src/Common/Controls/RouteDOM.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n// import CSS\n\n// import OpenLayers\n\n\n\n\n\n// import GeoJSON from \"ol/format/GeoJSON\";\n\n\n\n\n// import geoportal library access\n\n// import local\n\n\n\n\n\n\n// import local with ol dependencies\n\n\n\n\n// DOM\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_11__[\"default\"].getLogger(\"route\");\n\n/**\n * @classdesc\n *\n * Route Control.\n *\n * @constructor\n * @alias ol.control.Route\n * @type {ol.control.Route}\n * @extends {ol.control.Control}\n * @param {Object} options - route control options\n * @param {String} [options.apiKey] - API key for services call (route and autocomplete services). The key \"calcul\" is used by default.\n * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol)\n * @param {Boolean} [options.collapsed = true] - Specify if widget has to be collapsed (true) or not (false) on map loading. Default is true.\n * @param {Boolean} [options.draggable = false] - Specify if widget is draggable\n * @param {Boolean|Object} [options.export = false] - Specify if button \"Export\" is displayed. For the use of the options of the \"Export\" control, see {@link ol.control.Export}\n * @param {Object} [options.exclusions = {\"toll\" : false, \"tunnel\" : false, \"bridge\" : false}] - list of exclusions with status (true = checked). By default : no exclusions checked.\n * @param {Array} [options.graphs = [\"Voiture\", \"Pieton\"]] - list of resources, by default : [\"Voiture\", \"Pieton\"]. The first element is selected.\n * @param {Object} [options.routeOptions = {}] - route service options. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~route Gp.Services.route()} to know all route options.\n * @param {Object} [options.autocompleteOptions = {}] - autocomplete service options. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~autoComplete Gp.Services.autoComplete()} to know all autocomplete options\n * @param {Object} [options.markersOpts] - options to use your own markers. Object properties can be \"departure\", \"stages\" or \"arrival\". Corresponding value is an object with following properties :\n * @param {String} [options.markersOpts.url] - marker base64 encoded url (ex \"data:image/png;base64,...\"\"). Mandatory for a custom marker\n * @param {Array} [options.markersOpts.offset] - 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. Default is [0, 0]. (see http://openlayers.org/en/latest/apidoc/ol.Overlay.html)\n * @param {Object} [options.layerDescription = {}] - Layer informations to be displayed in LayerSwitcher widget (only if a LayerSwitcher is also added to the map)\n * @param {String} [options.layerDescription.title = \"Itinéraire\"] - Layer title to be displayed in LayerSwitcher\n * @param {String} [options.layerDescription.description = \"Itinéraire basé sur un graphe\"] - Layer description to be displayed in LayerSwitcher\n * @fires route:drawstart\n * @fires route:drawend\n * @fires route:compute\n * @fires export:compute\n * @example\n * var route = ol.control.Route({\n * \"collapsed\" : true\n * \"draggable\" : true,\n * \"export\" : false,\n * \"exclusions\" : {\n * \"toll\" : true,\n * \"bridge\" : false,\n * \"tunnel\" : true\n * },\n * \"graphs\" : ['Pieton', 'Voiture'],\n * \"markersOpts\" : {\n * \"departure\" : {\n * \"url\" : \"...\",\n * \"offset\" : [0,0]\n * },\n * \"stages\" : {\n * \"url\" : \"...\",\n * \"offset\" : [0,0]\n * },\n * \"arrival\" : {\n * \"url\" : \"...\",\n * \"offset\" : [0,0]\n * }\n * }\n * \"autocompleteOptions\" : {},\n * \"routeOptions\" : {}\n * });\n *\n * // if you want to pluggued the control Export with options :\n * var route = new ol.control.Route({\n * export : {\n * name : \"export\",\n * format : \"geojson\",\n * title : \"Exporter\",\n * menu : false\n * }\n * });\n */\nvar Route = function (Control) {\n /**\n * See {@link ol.control.Route}\n * @module Route\n * @alias module:~Controls/Route\n * @param {*} options - options\n * @example\n * import Route from \"src/OpenLayers/Controls/Route\"\n */\n function Route(options) {\n options = options || {};\n if (!(this instanceof Route)) {\n throw new TypeError(\"ERROR CLASS_CONSTRUCTOR\");\n }\n\n // initialisation du composant\n this.initialize(options);\n\n // Widget main DOM container\n this._container = this._createMainContainerElement();\n this._containerElement = null;\n\n // on peut éventuellement encapsuler le composant dans une div passée par l'utilisateur\n if (options.element && options.element.appendChild) {\n // dans ce cas on stocke les deux container\n options.element.appendChild(this._container);\n this._containerElement = options.element;\n }\n\n // call ol.control.Control constructor\n Control.call(this, {\n element: this._containerElement || this._container,\n target: options.target,\n render: options.render\n });\n }\n\n // Inherits from ol.control.Control\n if (Control) Route.__proto__ = Control;\n\n /**\n * @lends module:Route\n */\n Route.prototype = Object.create(Control.prototype, {});\n\n // on récupère les méthodes de la classe commune RouteDOM\n _Common_Utils__WEBPACK_IMPORTED_MODULE_12__[\"default\"].assign(Route.prototype, _Common_Controls_RouteDOM__WEBPACK_IMPORTED_MODULE_21__[\"default\"]);\n\n /**\n * Constructor (alias)\n * @private\n */\n Route.prototype.constructor = Route;\n\n /**\n * Overwrite OpenLayers setMap method\n *\n * @param {ol.Map} map - Map.\n */\n Route.prototype.setMap = function (map) {\n if (map) {\n // enrichissement du DOM du container\n this._container = this._initContainer(map);\n\n // ajout d'un bouton d'export\n if (this.options[\"export\"]) {\n var opts = _Common_Utils__WEBPACK_IMPORTED_MODULE_12__[\"default\"].assign({\n control: this\n }, this.options[\"export\"]);\n this[\"export\"] = new _Export__WEBPACK_IMPORTED_MODULE_18__[\"default\"](opts);\n this[\"export\"].render();\n var self = this;\n this[\"export\"].on(\"export:compute\", function (e) {\n self.dispatchEvent({\n type: \"export:compute\",\n content: e.content\n });\n });\n }\n\n // mode \"draggable\"\n if (this.draggable) {\n _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_15__[\"default\"].dragElement(this._panelRouteContainer, this._panelHeaderRouteContainer, map.getTargetElement());\n }\n }\n\n // on appelle la méthode setMap originale d'OpenLayers\n Control.prototype.setMap.call(this, map);\n };\n\n // ################################################################### //\n // ##################### public methods ############################## //\n // ################################################################### //\n\n /**\n * Returns true if widget is collapsed (minimized), false otherwise\n *\n * @returns {Boolean} collapsed - true if widget is collapsed\n */\n Route.prototype.getCollapsed = function () {\n return this.collapsed;\n };\n\n /**\n * Collapse or display widget main container\n *\n * @param {Boolean} collapsed - True to collapse widget, False to display it\n */\n Route.prototype.setCollapsed = function (collapsed) {\n if (collapsed === undefined) {\n logger.log(\"[ERROR] Route:setCollapsed - missing collapsed parameter\");\n return;\n }\n if (collapsed && this.collapsed || !collapsed && !this.collapsed) {\n return;\n }\n if (collapsed) {\n document.getElementById(\"GProutePanelClose-\" + this._uid).click();\n } else {\n document.getElementById(\"GPshowRoute-\" + this._uid).click();\n }\n this.collapsed = collapsed;\n };\n\n /**\n * Get vector layer where geoJson route is drawn\n *\n * @returns {Object} layer - ol.layer.Vector route layer\n */\n Route.prototype.getLayer = function () {\n return this._geojsonSections;\n };\n\n /**\n * Set vector layer where route geometry is drawn\n *\n * @param {Object} layer - ol.layer.Vector route layer\n */\n Route.prototype.setLayer = function (layer) {\n if (!layer) {\n this._geojsonSections = null;\n return;\n }\n if (!(layer instanceof ol_layer_Vector__WEBPACK_IMPORTED_MODULE_4___default.a)) {\n logger.log(\"no valid layer given for hosting drawn features.\");\n return;\n }\n\n // application des styles\n layer.setStyle(this._defaultFeatureStyle);\n // sauvegarde\n this._geojsonSections = layer;\n };\n\n /**\n * Get vector layer\n *\n * @returns {String} geojson - GeoJSON format layer\n */\n Route.prototype.getGeoJSON = function () {\n return JSON.stringify(this._geojsonObject);\n };\n\n /**\n * Set vector layer\n *\n * @param {String} geojson - GeoJSON format layer\n */\n Route.prototype.setGeoJSON = function (geojson) {\n try {\n this._geojsonObject = JSON.parse(geojson);\n } catch (e) {\n logger.log(\"no valid geojson given :\" + e.message);\n }\n };\n\n /**\n * Get route informations\n *\n * @returns {Object} data - route informations\n */\n Route.prototype.getData = function () {\n var points = [];\n for (var index = 0; index < this._currentPoints.length; index++) {\n var p = this._currentPoints[index];\n points.push(p.getCoordinate());\n }\n var data = {\n type: \"route\",\n points: points,\n transport: this._currentTransport,\n exclusions: this._currentExclusions,\n computation: this._currentComputation,\n results: {}\n };\n _Common_Utils__WEBPACK_IMPORTED_MODULE_12__[\"default\"].assign(data.results, this._currentRouteInformations);\n return data;\n };\n\n /**\n * Set route data\n *\n * @param {Object} data - control informations\n * @param {String} data.transport - transport type\n * @param {String} data.computation - computation type\n * @param {Array} data.exclusions - list of exclusions\n * @param {Array} data.points - list of points : [[lon, lat]]\n * @param {Object} data.results - service response\n */\n Route.prototype.setData = function (data) {\n // INFO\n // transmettre toutes les informations necessaires pour reconstruire le panneau de resultats\n this._currentTransport = data.transport;\n this._currentComputation = data.computation;\n this._currentExclusions = data.exclusions;\n // INFO\n // nettoyer les points du calcul précedent\n for (var i = 0; i < this._currentPoints.length; i++) {\n var point = this._currentPoints[i];\n if (point.getCoordinate()) {\n // clean de l'objet sans declencher les evenements qui suppriment la couche précedente !\n // /!\\ point.clear()\n point.clearResults();\n // clean du dom\n var id = i + 1 + \"-\" + this._uid;\n document.getElementById(\"GPlocationOriginCoords_\" + id).value = \"\";\n document.getElementById(\"GPlocationOrigin_\" + id).value = \"\";\n document.getElementById(\"GPlocationPoint_\" + id).style.cssText = \"\";\n if (i > 0 && i < 6) {\n // on masque les points intermediaires\n document.getElementById(\"GPlocationPoint_\" + id).className = \"GPflexInput GPlocationStageFlexInputHidden\";\n }\n document.getElementById(\"GPlocationOriginPointer_\" + id).checked = false;\n document.getElementById(\"GPlocationOrigin_\" + id).className = \"GPlocationOriginVisible\";\n document.getElementById(\"GPlocationOriginCoords_\" + id).className = \"GPlocationOriginHidden\";\n }\n }\n // ajout des nouvelles coordonnnées\n for (var j = 0; j < data.points.length; j++) {\n var c = data.points[j];\n if (c) {\n this._currentPoints[j].setCoordinate(c, \"EPSG:4326\");\n }\n }\n this._currentRouteInformations = data.results;\n };\n\n /**\n * Get container\n *\n * @returns {DOMElement} container\n */\n Route.prototype.getContainer = function () {\n return this._container;\n };\n\n /**\n * Get default style\n *\n * @returns {ol.style} style\n */\n Route.prototype.getStyle = function () {\n return this._defaultFeatureStyle;\n };\n\n /**\n * This method is public.\n * It allows to init the control.\n */\n Route.prototype.init = function () {\n // INFO\n // reconstruire le panneau de resultats sans lancer de calcul\n // * construire la liste des points (cf. RouteDOM._createRoutePanelFormElement())\n // * construire les resultats\n\n // init points\n for (var index = 0; index < this._currentPoints.length; index++) {\n var point = this._currentPoints[index];\n var id = index + 1;\n var coordinate = point.getCoordinate();\n if (coordinate) {\n var input = document.getElementById(\"GPlocationOrigin_\" + id + \"-\" + this._uid);\n input.value = coordinate[1].toFixed(4) + \" / \" + coordinate[0].toFixed(4);\n if (index > 0 && index < 6) {\n document.getElementById(\"GPlocationPoint_\" + id + \"-\" + this._uid).className = \"GPflexInput GPlocationStageFlexInput\";\n }\n }\n }\n\n // add points into panel\n var points = document.getElementsByClassName(\"GPlocationPoint-\" + this._uid);\n this._addRouteResultsStagesValuesElement(points);\n\n // set transport mode\n var transportdiv;\n if (this._currentTransport === \"Pieton\") {\n transportdiv = document.getElementById(\"GProuteTransportPedestrian-\" + this._uid);\n if (transportdiv) {\n transportdiv.checked = \"true\";\n }\n } else {\n transportdiv = document.getElementById(\"GProuteTransportCar-\" + this._uid);\n if (transportdiv) {\n transportdiv.checked = \"true\";\n }\n }\n\n // set computation mode\n var computationdiv = document.getElementById(\"GProuteComputationSelect-\" + this._uid);\n if (computationdiv) {\n computationdiv.value = this._currentComputation;\n }\n\n // set exclusions\n var tollInput = document.getElementById(\"GProuteExclusionsToll-\" + this._uid);\n if (tollInput) {\n if (this._currentExclusions.indexOf(\"toll\") !== -1) {\n tollInput.checked = false;\n } else {\n tollInput.checked = true;\n }\n }\n var tunnelInput = document.getElementById(\"GProuteExclusionsTunnel-\" + this._uid);\n if (tunnelInput) {\n if (this._currentExclusions.indexOf(\"tunnel\") !== -1) {\n tunnelInput.checked = false;\n } else {\n tunnelInput.checked = true;\n }\n }\n var bridgeInput = document.getElementById(\"GProuteExclusionsBridge-\" + this._uid);\n if (bridgeInput) {\n if (this._currentExclusions.indexOf(\"bridge\") !== -1) {\n bridgeInput.checked = false;\n } else {\n bridgeInput.checked = true;\n }\n }\n var distance = this._currentRouteInformations.totalDistance;\n var duration = this._currentRouteInformations.totalTime;\n\n // Détails avec simplifications des troncons\n var instructions = this._simplifiedInstructions(this._currentRouteInformations.routeInstructions);\n if (instructions) {\n this._fillRouteResultsDetailsContainer(distance, duration, instructions);\n }\n\n // affichage du panneau de details du controle !\n this._formRouteContainer.className = \"GProuteComponentHidden\";\n this._hideWaitingContainer();\n this._resultsRouteContainer.className = \"\";\n };\n\n /**\n * Clean UI : reinit control\n */\n Route.prototype.clean = function () {\n this._currentTransport = null;\n this._currentExclusions = [];\n this._currentComputation = null;\n for (var i = 0; i < this._currentPoints.length; i++) {\n this._currentPoints[i].clear();\n }\n this._removeRouteStepLocations();\n this._clearRouteInputOptions();\n this._clearRouteResultsDetails();\n this.setLayer();\n this._formRouteContainer.className = \"\";\n this._resultsRouteContainer.className = \"GProuteComponentHidden\";\n };\n\n // ################################################################### //\n // ##################### init component ############################## //\n // ################################################################### //\n\n /**\n * Initialize route control (called by Route constructor)\n *\n * @param {Object} options - constructor options\n * @private\n */\n Route.prototype.initialize = function (options) {\n this._checkInputOptions(options);\n\n // set default options\n this.options = {\n collapsed: true,\n draggable: false,\n \"export\": false,\n graphs: [\"Voiture\", \"Pieton\"],\n exclusions: {\n toll: false,\n tunnel: false,\n bridge: false\n },\n routeOptions: {},\n autocompleteOptions: {},\n layerDescription: {\n title: \"Itinéraire\",\n description: \"Itinéraire basé sur un graphe\"\n }\n };\n\n // merge with user options\n _Common_Utils__WEBPACK_IMPORTED_MODULE_12__[\"default\"].assign(this.options, options);\n\n // cas particulier des markers par défaut\n var defaultMarkersOpts = {\n departure: {\n url: _Utils_Markers__WEBPACK_IMPORTED_MODULE_14__[\"default\"][\"red\"],\n offset: _Utils_Markers__WEBPACK_IMPORTED_MODULE_14__[\"default\"].defaultOffset\n },\n stages: {\n url: _Utils_Markers__WEBPACK_IMPORTED_MODULE_14__[\"default\"][\"lightOrange\"],\n offset: _Utils_Markers__WEBPACK_IMPORTED_MODULE_14__[\"default\"].defaultOffset\n },\n arrival: {\n url: _Utils_Markers__WEBPACK_IMPORTED_MODULE_14__[\"default\"][\"darkOrange\"],\n offset: _Utils_Markers__WEBPACK_IMPORTED_MODULE_14__[\"default\"].defaultOffset\n }\n };\n // on récupère les options de chaque type de marker si spécifié\n this.options.markersOpts = _Common_Utils__WEBPACK_IMPORTED_MODULE_12__[\"default\"].assign(defaultMarkersOpts, options.markersOpts);\n\n /** {Boolean} specify if Route control is collapsed (true) or not (false) */\n this.collapsed = this.options.collapsed;\n\n /** {Boolean} specify if Route control is draggable (true) or not (false) */\n this.draggable = this.options.draggable;\n this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_13__[\"default\"].generate();\n\n // containers principaux\n this._panelRouteContainer = null;\n this._panelHeaderRouteContainer = null;\n this._waitingContainer = null;\n this._formRouteContainer = null;\n this._resultsRouteContainer = null;\n this._showRouteExclusionsElement = null;\n\n // liste de points selectionnée\n this._currentPoints = [];\n\n // Mode de transport selectionné : 'Voiture' ou 'Pieton'\n this._currentTransport = null;\n this._initTransport();\n\n // Mode de calcul selectionné : 'Plus rapide' ou 'plus court'\n this._currentComputation = null;\n this._initComputation();\n\n // Exclusions selectionnées : Tunnel, Toll et Bridge\n this._currentExclusions = [];\n this._initExclusions();\n\n // si un calcul est en cours ou non\n this._waiting = false;\n // timer pour cacher la patience après un certain temps\n this._timer = null;\n\n // la geometrie du parcours\n this._geojsonRoute = null;\n\n // la geometrie des troncons\n this._geojsonSections = null;\n\n // la geometrie des troncons au format GeoJSON\n this._geojsonObject = null;\n\n // bouton export\n this[\"export\"] = null;\n\n // le container de la popup (pour les troncons selectionnés)\n this._popupContent = null;\n this._popupDiv = this._initPopupDiv();\n // l'overlay ol.Overlay correspondant à la popup (pour les troncons selectionnés)\n this._popupOverlay = null;\n\n // ol.interaction.Select associées à la couche des résultats (troncons)\n this._resultsSelectInteraction = null;\n this._resultsHoverInteraction = null;\n\n // styles pour les sélections des features\n this._defaultFeatureStyle = new ol_style__WEBPACK_IMPORTED_MODULE_8__[\"Style\"]({\n stroke: new ol_style__WEBPACK_IMPORTED_MODULE_8__[\"Stroke\"]({\n color: \"rgba(0,183,152,0.9)\",\n width: 12\n })\n });\n this._selectedFeatureStyle = new ol_style__WEBPACK_IMPORTED_MODULE_8__[\"Style\"]({\n stroke: new ol_style__WEBPACK_IMPORTED_MODULE_8__[\"Stroke\"]({\n color: \"rgba(255,102,0,0.9)\",\n width: 12\n })\n });\n\n // reponse du service\n // Ex. {\n // totalTime, totalDistance, bbox, routeGeometry,\n // routeInstructions : [{duration, distance, code, instruction, bbox, geometry}]\n // }\n this._currentRouteInformations = null;\n\n // liste des ressources avec droits par service\n // Ex. {\n // \"Route\" : {\n // key : \"ger4g456re45er456t4er5ge5\",\n // resources : [\"Pieton\", \"Voiture\"]\n // }\n // }\n this._resources = {};\n\n // listener key for event on pointermove or moveend map\n this.listenerKey = null;\n };\n\n /**\n * this method is called by this.initialize()\n *\n * @param {Object} options - options\n *\n * @private\n */\n Route.prototype._checkInputOptions = function (options) {\n // vérification des options\n // mode de transport\n if (options.graphs) {\n // on ne permet pas de passer un tableau vide : on spécifie au moins un graph\n if (Array.isArray(options.graphs) && options.graphs.length) {\n for (var i = 0; i < options.graphs.length; i++) {\n if (typeof options.graphs[i] === \"string\") {\n if (options.graphs[i].toLowerCase() === \"pieton\") {\n options.graphs[i] = \"Pieton\";\n }\n if (options.graphs[i].toLowerCase() === \"voiture\") {\n options.graphs[i] = \"Voiture\";\n }\n } else {\n logger.log(\"[ol.control.Route] ERROR : parameter 'graphs' elements should be of type 'string'\");\n options.graphs[i] = null;\n }\n }\n } else {\n logger.warn(\"'graphs' parameter should be an array\");\n options.graphs = null;\n }\n }\n\n // collapsed\n if (options.collapsed === \"true\") {\n options.collapsed = true;\n }\n if (options.collapsed === \"false\") {\n options.collapsed = false;\n }\n };\n\n /**\n * initialize component container (DOM)\n *\n * @param {Object} map - the map\n *\n * @returns {DOMElement} DOM element\n *\n * @private\n */\n Route.prototype._initContainer = function (map) {\n var _this = this;\n // get main container\n var container = this._container;\n var inputShow = this._showRouteContainer = this._createShowRouteElement();\n container.appendChild(inputShow);\n\n // mode \"collapsed\"\n if (!this.collapsed) {\n inputShow.checked = true;\n }\n var picto = this._createShowRoutePictoElement();\n container.appendChild(picto);\n var routePanel = this._panelRouteContainer = this._createRoutePanelElement();\n\n // header form\n var routeHeader = this._panelHeaderRouteContainer = this._createRoutePanelHeaderElement();\n routePanel.appendChild(routeHeader);\n\n // form\n var routeForm = this._formRouteContainer = this._createRoutePanelFormElement();\n\n // form: menu des points\n var points = this._createRoutePanelFormPointsElement(map);\n for (var i = 0; i < points.length; i++) {\n routeForm.appendChild(points[i]);\n }\n\n // form: menu des modes\n var choice = this._createRoutePanelFormModeChoiceElement();\n choice.appendChild(this._createRoutePanelFormModeChoiceTransportElement(this.options.graphs));\n choice.appendChild(this._createRoutePanelFormModeChoiceComputeElement());\n routeForm.appendChild(choice);\n\n // form: menu des exclusions\n routeForm.appendChild(this._createShowRouteExclusionsElement());\n this._showRouteExclusionsElement = this._createShowRouteExclusionsPictoElement();\n routeForm.appendChild(this._showRouteExclusionsElement);\n var exclusion = this._createRoutePanelFormExclusionsElement();\n exclusion.appendChild(this._createRoutePanelFormExclusionOptionsElement(this.options.exclusions));\n routeForm.appendChild(exclusion);\n var divReset = this._createRouteFormResetElement();\n routeForm.appendChild(divReset);\n\n // form: bouton du calcul\n var submit = this._createRouteSubmitFormElement();\n routeForm.appendChild(submit);\n routePanel.appendChild(routeForm);\n\n // results\n var routeResults = this._resultsRouteContainer = this._createRoutePanelResultsElement();\n routePanel.appendChild(routeResults);\n\n // waiting\n var waiting = this._waitingContainer = this._createRouteWaitingElement();\n routePanel.appendChild(waiting);\n container.appendChild(routePanel);\n // hide autocomplete suggested locations on container click\n if (container.addEventListener) {\n container.addEventListener(\"click\", function (e) {\n return _this._hideRouteSuggestedLocations(e);\n });\n }\n return container;\n };\n\n // ################################################################### //\n // ####################### init application ########################## //\n // ################################################################### //\n\n /**\n * this method is called by the constructor and initialize transport mode\n * (\"Voiture\" ou \"Pieton\")\n *\n * @private\n */\n Route.prototype._initTransport = function () {\n // Mode de transport selectionné\n this._currentTransport = \"Voiture\"; // par defaut\n\n // par defaut\n var transport = this.options.graphs;\n if (!transport || transport.length === 0) {\n this.options.graphs = [\"Voiture\", \"Pieton\"];\n }\n\n // option\n if (Array.isArray(transport) && transport.length) {\n // FIXME pb si le 1er graphe n'est pas une ressource connue !\n if (transport[0] === \"Voiture\" || transport[0] === \"Pieton\") {\n this._currentTransport = transport[0];\n }\n }\n\n // TODO option sur le service\n var serviceOptions = this.options.routeOptions;\n if (serviceOptions.graph) {\n this._currentTransport = serviceOptions.graph;\n }\n };\n\n /**\n * this method is called by the constructor and initialize computation mode\n * (fastest or shortest)\n *\n * @private\n */\n Route.prototype._initComputation = function () {\n // Mode de calcul selectionné\n this._currentComputation = \"fastest\"; // par defaut\n\n // TODO option sur le service\n var serviceOptions = this.options.routeOptions;\n if (serviceOptions.routePreference) {\n this._currentComputation = serviceOptions.routePreference;\n }\n };\n\n /**\n * this method is called by the constructor and initialize exclusions\n *\n * @private\n */\n Route.prototype._initExclusions = function () {\n // Exclusions selectionnées : Tunnel, Toll et Bridge\n this._currentExclusions = []; // par defaut\n\n // par defaut\n var exclusion = this.options.exclusions;\n if (!exclusion || _typeof(exclusion) === \"object\" && Object.keys(exclusion).length === 0) {\n this.options.exclusions = {\n toll: false,\n tunnel: false,\n bridge: false\n };\n }\n\n // option\n if (exclusion && _typeof(exclusion) === \"object\" && Object.keys(exclusion).length) {\n for (var k in exclusion) {\n if (exclusion.hasOwnProperty(k)) {\n if (exclusion[k]) {\n this._currentExclusions.push(k);\n }\n }\n }\n }\n\n // TODO option sur le service\n var serviceOptions = this.options.routeOptions;\n if (Array.isArray(serviceOptions.exclusions)) {\n this._currentExclusions = serviceOptions.exclusions;\n }\n };\n\n /**\n * this method is called by this.initialize() and initialize popup div\n * (to display results information on route result click)\n *\n * @return {Object} element - DOM element for popup\n * @private\n */\n Route.prototype._initPopupDiv = function () {\n var context = this;\n var element = document.createElement(\"div\");\n element.className = \"gp-feature-info-div\";\n var closer = document.createElement(\"input\");\n closer.type = \"button\";\n closer.className = \"gp-styling-button closer\";\n // on closer click : remove popup\n closer.onclick = function () {\n if (context._popupOverlay != null) {\n context._popupOverlay.setPosition(undefined);\n }\n return false;\n };\n this._popupContent = document.createElement(\"div\");\n this._popupContent.className = \"gp-features-content-div\";\n element.appendChild(this._popupContent);\n element.appendChild(closer);\n return element;\n };\n\n // ################################################################### //\n // ############################## DOM ################################ //\n // ################################################################### //\n\n /**\n * Create List Points\n * Overwrite RouteDOM method !\n *\n * @param {Object} map - the map\n *\n * @returns {Array} List DOM element\n * @private\n */\n Route.prototype._createRoutePanelFormPointsElement = function (map) {\n var points = [];\n var count = 1;\n\n // point de depart\n var start = new _LocationSelector__WEBPACK_IMPORTED_MODULE_17__[\"default\"]({\n apiKey: this.options.apiKey || null,\n tag: {\n id: count,\n groupId: this._uid,\n markerOpts: this.options.markersOpts[\"departure\"],\n label: \"Départ\",\n display: true\n },\n autocompleteOptions: this.options.autocompleteOptions || null\n });\n start.setMap(map);\n // on ajoute des écouteurs d'évènements (en plus de ceux de LocationSelector),\n // pour prendre en compte les CSS spécifiques de GProuteForm\n this._addFormPointsEventListeners(start);\n points.push(start._container);\n this._currentPoints.push(start);\n\n // points intermediaires\n for (count = 2; count < 7; count++) {\n var step = new _LocationSelector__WEBPACK_IMPORTED_MODULE_17__[\"default\"]({\n apiKey: this.options.apiKey || null,\n tag: {\n id: count,\n groupId: this._uid,\n label: \"Etape\",\n markerOpts: this.options.markersOpts[\"stages\"],\n display: false,\n removeOption: true\n },\n autocompleteOptions: this.options.autocompleteOptions || null\n });\n step.setMap(map);\n this._addFormPointsEventListeners(step);\n points.push(step._container);\n this._currentPoints.push(step);\n }\n\n // point d'arrivée\n var end = new _LocationSelector__WEBPACK_IMPORTED_MODULE_17__[\"default\"]({\n apiKey: this.options.apiKey || null,\n tag: {\n id: count,\n groupId: this._uid,\n markerOpts: this.options.markersOpts[\"arrival\"],\n label: \"Arrivée\",\n display: true,\n addOption: true\n },\n autocompleteOptions: this.options.autocompleteOptions || null\n });\n end.setMap(map);\n this._addFormPointsEventListeners(end);\n points.push(end._container);\n this._currentPoints.push(end);\n return points;\n };\n\n /**\n * Attach events listeners to route form points (locationSelector)\n *\n * @param {Object} formPoint - route form point (locationSelector)\n * @private\n */\n Route.prototype._addFormPointsEventListeners = function (formPoint) {\n var _this2 = this;\n if (!formPoint) {\n return;\n }\n if (formPoint._inputLabelContainer.addEventListener) {\n // display form on origin label click\n formPoint._inputLabelContainer.addEventListener(\"click\", function (e) {\n return _this2.onRouteOriginLabelClick(e);\n });\n // minimize form on input show pointer, and set map event listeners (see this.onRouteOriginPointerClick)\n formPoint._inputShowPointer.addEventListener(\"click\", function (e) {\n return _this2.onRouteOriginPointerClick(e, formPoint);\n });\n if (formPoint._removePointElement) {\n formPoint._removePointElement.addEventListener(\"click\", function (e) {\n logger.trace(\"click on _removePointElement\", e);\n // Moving up exclusions picto\n // var exclusionsPictoTop = context._showRouteExclusionsElement.style.top;\n // context._showRouteExclusionsElement.style.top = (parseInt(exclusionsPictoTop, 10) - 33).toString() + \"px\";\n });\n }\n\n if (formPoint._addPointElement) {\n formPoint._addPointElement.addEventListener(\"click\", function (e) {\n logger.trace(\"click on _addPointElement\", e);\n // Moving down exclusions picto\n // var exclusionsPictoTop = context._showRouteExclusionsElement.style.top;\n // context._showRouteExclusionsElement.style.top = (parseInt(exclusionsPictoTop, 10) + 33).toString() + \"px\";\n });\n }\n } else if (formPoint._inputLabelContainer.attachEvent) {\n // attachEvent: Internet explorer event listeners management\n formPoint._inputLabelContainer.attachEvent(\"onclick\", function (e) {\n return _this2.onRouteOriginLabelClick(e);\n });\n formPoint._inputShowPointer.attachEvent(\"onclick\", function (e) {\n return _this2.onRouteOriginPointerClick(e, formPoint);\n });\n if (formPoint._removePointElement) {\n formPoint._removePointElement.attachEvent(\"onclick\", function (e) {\n // Moving up exclusions picto\n // var exclusionsPictoTop = context._showRouteExclusionsElement.style.top;\n // context._showRouteExclusionsElement.style.top = (parseInt(exclusionsPictoTop, 10) - 33).toString() + \"px\";\n });\n }\n if (formPoint._addPointElement) {\n formPoint._addPointElement.attachEvent(\"onclick\", function (e) {\n // Moving down exclusions picto\n // var exclusionsPictoTop = context._showRouteExclusionsElement.style.top;\n // context._showRouteExclusionsElement.style.top = (parseInt(exclusionsPictoTop, 10) + 33).toString() + \"px\";\n });\n }\n }\n };\n\n // ################################################################### //\n // ####################### handlers events to dom #################### //\n // ################################################################### //\n\n /**\n * this method is called by event 'submit' on 'GProuteForm' tag form\n * (cf. this._createRoutePanelFormElement), and it displays the results.\n *\n * @param {Object} options - options\n * @private\n */\n Route.prototype.onRouteComputationSubmit = function (options) {\n logger.log(\"onRouteComputationSubmit\", options);\n\n // FIXME on lance une requête en EPSG:4326, les coordonnées\n // doivent donc être du type cad en lat/lon.\n // or, BUG du service du calcul d'itineraire car les\n // coordonnées envoyées doivent être en lon/lat avec une SRS en EPSG:4326 !?\n // sinon, ça plante...\n\n // Liste des points\n var points = this._currentPoints;\n\n // - point de depart (info: points[0].getCoordinate est du type [lon, lat], en EPSG:4326)\n var start;\n if (points[0] && points[0].getCoordinate) {\n var startCoordinate = points[0].getCoordinate();\n start = {\n x: startCoordinate[0],\n y: startCoordinate[1]\n };\n logger.log(\"start\", start);\n }\n\n // - point d'arrivée\n var end;\n var endPoint = points[points.length - 1];\n if (endPoint && endPoint.getCoordinate) {\n var endCoordinate = endPoint.getCoordinate();\n end = {\n x: endCoordinate[0],\n y: endCoordinate[1]\n };\n logger.log(\"end\", end);\n }\n\n // - les étapes\n var step = [];\n for (var i = 1; i < points.length - 1; i++) {\n if (points[i] && points[i].getCoordinate) {\n var iCoordinate = points[i].getCoordinate();\n if (iCoordinate) {\n var coordinate = {\n x: iCoordinate[0],\n y: iCoordinate[1]\n };\n logger.log(\"step\", coordinate);\n step.push(coordinate);\n }\n }\n }\n\n // valeurs selectionnées\n this._currentTransport = options.transport;\n this._currentComputation = options.computation;\n this._currentExclusions = options.exclusions;\n\n // on recupere les éventuelles options du service passées par l'utilisateur\n var routeOptions = this.options.routeOptions;\n\n // gestion du protocole et du timeout\n // le timeout est indispensable sur le protocole JSONP.\n var _protocol = routeOptions.protocol || \"XHR\";\n var _timeout = routeOptions.timeOut || 0;\n if (_protocol === \"JSONP\" && _timeout === 0) {\n // FIXME le timeout est obligatoire pour ce type de protocole...\n _timeout = 15000;\n }\n\n // gestion des callback\n var bOnFailure = !!(routeOptions.onFailure !== null && typeof routeOptions.onFailure === \"function\"); // cast variable to boolean\n var bOnSuccess = !!(routeOptions.onSuccess !== null && typeof routeOptions.onSuccess === \"function\");\n\n // on met en place l'affichage des resultats dans la fenetre de resultats.\n var context = this;\n this._requestRouting({\n startPoint: start,\n endPoint: end,\n viaPoints: step,\n graph: routeOptions.graph || this._currentTransport,\n routePreference: routeOptions.routePreference || this._currentComputation,\n exclusions: routeOptions.exclusions || this._currentExclusions,\n geometryInInstructions: true,\n distanceUnit: \"m\",\n timeOut: _timeout,\n protocol: _protocol,\n // callback onSuccess\n onSuccess: function onSuccess(results) {\n logger.log(results);\n if (results) {\n context._fillRouteResultsDetails(results);\n }\n if (bOnSuccess) {\n routeOptions.onSuccess.call(context, results);\n }\n },\n // callback onFailure\n onFailure: function onFailure(error) {\n context._hideWaitingContainer();\n context._clearRouteResultsDetails();\n logger.log(error.message);\n if (bOnFailure) {\n routeOptions.onFailure.call(context, error);\n }\n }\n });\n };\n\n /**\n * this method is called by event 'click' on 'GPlocationOriginLabel' label\n * and set 'GProuteForm' CSS class to \"\" (normal)\n *\n * @param {Object} routeControl - context : route Control (this)\n * @private\n */\n Route.prototype.onRouteOriginLabelClick = function () {\n this._formRouteContainer.className = \"\";\n // on désactive l'écouteur d'événements sur la carte (pour ne pas placer un marker au clic)\n // map.un(\n // \"click\",\n // () => {\n // // on ne rétablit pas le mode \"normal\" si on est dans le panel des résultats (où className = \"GProuteComponentHidden\")\n // if (this._formRouteContainer.className === \"GProuteFormMini\") {\n // this._formRouteContainer.className = \"\";\n // }\n // }\n // );\n Object(ol_Observable__WEBPACK_IMPORTED_MODULE_2__[\"unByKey\"])(this.listenerKey);\n this.dispatchEvent(\"route:drawend\");\n };\n\n /**\n * this method is called by event 'click' on 'GPlocationOriginPointerImg' label\n * and display or minimize 'GProuteForm', using CSS class (\"GProuteFormMini\" or \"\")\n *\n * @param {Object} e - context : route Control (equivalent to this)\n * @param {Object} locationSelector - context : locationSelector input (one of this._currentPoints)\n * @private\n */\n Route.prototype.onRouteOriginPointerClick = function (e, locationSelector) {\n var _this3 = this;\n var map = this.getMap();\n if (locationSelector._inputShowPointerContainer.checked) {\n // au click sur l'input pour pointer sur la carte: on minimise le formulaire\n this._formRouteContainer.className = \"GProuteFormMini\";\n // et au clic sur la carte, on réaffichera le formulaire \"normal\"\n this.listenerKey = map.on(\"click\", function () {\n // on ne rétablit pas le mode \"normal\" si on est dans le panel des résultats (où className = \"GProuteComponentHidden\")\n if (_this3._formRouteContainer.className === \"GProuteFormMini\") {\n _this3._formRouteContainer.className = \"\";\n }\n Object(ol_Observable__WEBPACK_IMPORTED_MODULE_2__[\"unByKey\"])(_this3.listenerKey);\n /**\n * event triggered at the end of drawing input\n *\n * @event route:drawend\n */\n _this3.dispatchEvent(\"route:drawend\");\n });\n /**\n * event triggered at the start of drawing input\n *\n * @event route:drawstart\n */\n this.dispatchEvent(\"route:drawstart\");\n } else {\n // si on déselectionne le pointer, on rétablit le formulaire en mode normal\n this._formRouteContainer.className = \"\";\n // et on enlève l'écouteur d'évènement sur la carte\n // map.un(\n // \"click\",\n // () => {\n // // on ne rétablit pas le mode \"normal\" si on est dans le panel des résultats (où className = \"GProuteComponentHidden\")\n // if (this._formRouteContainer.className === \"GProuteFormMini\") {\n // this._formRouteContainer.className = \"\";\n // }\n // }\n // );\n Object(ol_Observable__WEBPACK_IMPORTED_MODULE_2__[\"unByKey\"])(this.listenerKey);\n this.dispatchEvent(\"route:drawend\");\n }\n };\n\n /**\n * this method is called by event 'click' on 'GPshowRoutePicto'\n * tag label (cf. this._createShowRoutePictoElement),\n * and it cleans all value of input.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n Route.prototype.onShowRoutePanelClick = function (e) {\n var map = this.getMap();\n // on supprime toutes les interactions\n _Utils_Interactions__WEBPACK_IMPORTED_MODULE_16__[\"default\"].unset(map);\n // clean !\n if (!this._geojsonSections && !this._waiting) {\n this._clear();\n }\n this.collapsed = document.getElementById(\"GPshowRoute-\" + this._uid).checked;\n // on génère nous même l'evenement OpenLayers de changement de pté\n // (utiliser ol.control.Route.on(\"change:collapsed\", function ) pour s'abonner à cet évènement)\n this.dispatchEvent(\"change:collapsed\");\n };\n\n /**\n * this method is called by event 'change' on 'GProuteComputationSelect' tag select\n * (cf. this._createRoutePanelFormModeChoiceComputeElement).\n * this value is saved as a parameter for the service route.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n Route.prototype.onRouteModeComputationChange = function (e) {\n var idx = e.target.selectedIndex;\n var value = e.target.options[idx].value;\n if (!value) {\n return;\n }\n logger.log(value);\n this._currentComputation = value;\n };\n\n /**\n * this method is called by event 'change' on 'GProuteResultsComputationSelect' tag select\n * (cf. this._createRouteResultsElement).\n * this value is saved as a parameter for the service route,\n * and this launches the route request !\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n Route.prototype.onRouteModeComputationChangeAndRun = function (e) {\n // event choice computation\n this.onRouteModeComputationChange(e);\n\n // clean avant un nouveau calcul !\n this._clearRouteResultsDetails();\n this._clearRouteResultsGeometry();\n this._clearRouteResultsFeatureGeometry();\n\n // submit request\n this.onRouteComputationSubmit({\n computation: this._currentComputation,\n transport: this._currentTransport,\n exclusions: this._currentExclusions\n });\n };\n\n /**\n * this method is called by event 'change' on 'GProuteTransportCar' or 'GProuteTransportPedestrian' tag input\n * (cf. this._createRoutePanelFormModeChoiceTransportElement).\n * this value is saved as a parameter for the service route.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n Route.prototype.onRouteModeTransportChange = function (e) {\n var value = e.target.value;\n if (!value) {\n return;\n }\n this._currentTransport = value;\n };\n\n /**\n * TODO this method is called by event 'click' on 'GPshowRouteExclusionsPicto' tag input\n * (cf. this._createShowRouteExclusionsPictoElement), and it displays the panel options of exclusions.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n Route.prototype.onShowRouteExclusionsClick = function (e) {\n logger.log(\"onShowRouteExclusionsClick\", e);\n // FIXME not use ?!\n };\n\n /**\n * this method is called by event 'change' on 'GProuteExclusionsToll'\n * or 'GProuteExclusionsTunnel' or 'GProuteExclusionsBridge' tag input\n * (cf. this._createRoutePanelFormExclusionOptionsElement).\n * this value is saved as a parameter for the service route.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n Route.prototype.onRouteExclusionsChange = function (e) {\n var value = e.target.value;\n var checked = e.target.checked;\n if (!value || typeof value !== \"string\") {\n return;\n }\n value = value.toLowerCase();\n var bFound = false;\n var iFound = null;\n for (var i = 0; i < this._currentExclusions.length; i++) {\n if (this._currentExclusions[i] === value) {\n iFound = i;\n bFound = true;\n }\n }\n // on l'ajoute si la valeur n'existe pas et est déselectionnée\n // info : checked = passage autorisé (ce n'est pas une exclusion)\n if (!bFound && !checked) {\n this._currentExclusions.push(value);\n }\n // on la retire si la valeur existe et est selectionnée\n if (bFound && checked) {\n this._currentExclusions.splice(iFound, 1);\n }\n };\n\n /**\n * this method is called by event 'click' on 'GProuteReset'\n * tag label (cf. this._createRouteFormResetElement),\n * and it cleans all route input options and results.\n *\n * @private\n */\n Route.prototype.onRouteResetClick = function () {\n // clear points\n var currentPoints = this._currentPoints;\n for (var i = 0; i < currentPoints.length; i++) {\n currentPoints[i].clear();\n }\n\n // clear results\n this._clear();\n this._clearRouteInputOptions();\n };\n\n /**\n * this method is called by event 'click' on 'GProuteSubmit'\n * tag label (cf. this._createRouteSubmitFormElement),\n * and it cleans the route geometry.\n *\n * @private\n */\n Route.prototype.onShowRouteResultsNewClick = function () {\n // clean avant un nouveau calcul !\n this._clearRouteResultsDetails();\n this._clearRouteResultsGeometry();\n this._clearRouteResultsFeatureGeometry();\n };\n\n /**\n * this method is called by event 'mouseover' on 'GProuteResultsDetailsInstruction_'\n * tag label (cf. this._addRouteResultsDetailsElement),\n * and it makes a style on feature route.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n Route.prototype.onRouteResultsDetailsMouseOver = function (e) {\n // récupération de l'id de l'instruction survolée\n var tagid = e.target.id; // ex GProuteResultsDetailsInstruction_125\n var idx = tagid.substring(tagid.indexOf(\"_\") + 1); // ex. 125\n\n // on passe le texte en gras\n if (e.target.classList) {\n e.target.classList.add(\"GProuteResultsDetailsInstructionHighlight\");\n }\n if (!this._geojsonSections) {\n return;\n }\n\n // on récupère l'entité correspondante à l'instruction survolée\n var f = this._geojsonSections.getSource().getFeatureById(parseInt(idx, 10));\n // et on lui affecte un nouveau style\n f.setStyle(this._selectedFeatureStyle);\n };\n\n /**\n * this method is called by event 'mouseout' on 'GProuteResultsDetailsInstruction_'\n * tag label (cf. this._addRouteResultsDetailsElement),\n * and it deletes a style on feature route.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n Route.prototype.onRouteResultsDetailsMouseOut = function (e) {\n // récupération de l'id de l'instruction survolée\n var tagid = e.target.id; // ex GProuteResultsDetailsInstruction_125\n var idx = tagid.substring(tagid.indexOf(\"_\") + 1); // ex. 125\n\n // on repasse le texte en style normal\n if (e.target.classList) {\n e.target.classList.remove(\"GProuteResultsDetailsInstructionHighlight\");\n }\n if (!this._geojsonSections) {\n return;\n }\n // on récupère l'entité correspondante à l'instruction qui était survolée\n var f = this._geojsonSections.getSource().getFeatureById(parseInt(idx, 10));\n // et on lui réaffecte un style normal\n f.setStyle(null);\n };\n\n // ################################################################### //\n // ########################### Routing ############################### //\n // ############## (methods to request and results) ################### //\n\n /**\n * this method is called by this.onRouteComputationSubmit()\n * and executes a request to the service.\n *\n * @param {Object} options - route service request options\n * @param {Function} options.onSuccess - callback\n * @param {Function} options.onFailure - callback\n * @private\n */\n Route.prototype._requestRouting = function (options) {\n // on ne fait pas de requête si on n'a pas renseigné de parametres !\n if (!options || _typeof(options) === \"object\" && Object.keys(options).length === 0) {\n return;\n }\n\n // on ne fait pas de requête si\n // - la parametre 'startPoint' est vide !\n if (!options.startPoint) {\n return;\n }\n // - la parametre 'endPoint' est vide !\n if (!options.endPoint) {\n return;\n }\n\n // cas où la clef API n'est pas renseignée dans les options du service,\n // on utilise celle renseignée au niveau du controle (calcul par défaut)\n options.apiKey = this.options.routeOptions.apiKey || this.options.apiKey;\n\n // si l'utilisateur a spécifié le paramètre ssl au niveau du control, on s'en sert\n // true par défaut (https)\n if (typeof options.ssl !== \"boolean\") {\n if (typeof this.options.ssl === \"boolean\") {\n options.ssl = this.options.ssl;\n } else {\n options.ssl = true;\n }\n }\n logger.log(options);\n\n // mise en place de la patience\n this._displayWaitingContainer();\n\n // appel du service de calcul d'itinéraires\n geoportal_access_lib__WEBPACK_IMPORTED_MODULE_10__[\"default\"].Services.route(options);\n };\n\n /**\n * this method is called by this.onRouteComputationSubmit() (in case of route computation success)\n * and fills the container of the route instructions list, distance and time\n * information, also, constructs the geometry route.\n *\n * @param {Object} results - results of the route calculation\n *\n * @private\n */\n Route.prototype._fillRouteResultsDetails = function (results) {\n // 1. Affichage des distances et durées\n var distance = results.totalDistance;\n var duration = results.totalTime;\n // Détails avec simplifications des troncons\n var instructions = this._simplifiedInstructions(results.routeInstructions);\n // var instructions = results.routeInstructions;\n\n if (instructions) {\n this._fillRouteResultsDetailsContainer(distance, duration, instructions);\n }\n\n // 2. Affichage des géométries\n // Geometrie simplifiée (si renseignée)\n var geometry = results.routeGeometry;\n if (geometry) {\n this._fillRouteResultsDetailsGeometry(geometry, this._defaultFeatureStyle);\n }\n\n // Geometries des tronçon (si renseignée)\n if (instructions && instructions[0].geometry) {\n this._fillRouteResultsDetailsFeatureGeometry(instructions, this._defaultFeatureStyle);\n }\n\n // 3. Zoom sur l'emprise de l'itinéraire (si spécifiée)\n var bbox = results.bbox;\n if (bbox) {\n var map = this.getMap();\n var bounds = [bbox.left, bbox.bottom, bbox.right, bbox.top];\n // reprojection dans la projection de la carte (bbox initialement en EPSG:4326)\n var mapProj = map.getView().getProjection().getCode();\n if (mapProj !== \"EPSG:4326\") {\n bounds = Object(ol_proj__WEBPACK_IMPORTED_MODULE_9__[\"transformExtent\"])(bounds, \"EPSG:4326\", mapProj);\n }\n map.getView().fit(bounds, map.getSize());\n }\n\n // sauvegarde de l'etat des resultats\n this._currentRouteInformations = results;\n\n /**\n * event triggered when the compute is finished\n *\n * @event route:compute\n * @property {Object} type - event\n * @property {Object} target - instance Route\n * @example\n * Route.on(\"route:compute\", function (e) {\n * console.log(e.target.getData());\n * })\n */\n this.dispatchEvent({\n type: \"route:compute\"\n });\n\n // mise à jour du controle !\n this._formRouteContainer.className = \"GProuteComponentHidden\";\n this._hideWaitingContainer();\n this._resultsRouteContainer.className = \"\";\n };\n\n /**\n * this method is called by this._fillRouteResultsDetails()\n * and fills the container of the route instructions list, distance and time\n * information.\n *\n * @param {Number} distance - distance\n * @param {Number} duration - duration\n * @param {Object[]} instructions - list of instructions\n *\n * @private\n */\n Route.prototype._fillRouteResultsDetailsContainer = function (distance, duration, instructions) {\n // Distance et Durée\n this._resultsRouteValuesContainer = this._addRouteResultsValuesElement(distance, duration, this._convertSecondsToTime);\n\n // Détails\n this._resultsRouteDetailsContainer = this._addRouteResultsDetailsElement(instructions, this._convertSecondsToTime);\n };\n\n /**\n * this method is called by this._fillRouteResultsDetails()\n * and constructs the geometry route.\n *\n * @param {Object} geometry - geoJSON object for route geometry\n * @param {Object} style - route ol.style.Style object\n * @private\n */\n Route.prototype._fillRouteResultsDetailsGeometry = function (geometry, style) {\n this._clearRouteResultsGeometry();\n var map = this.getMap();\n if (!geometry) {\n return;\n }\n\n // création de l'objet geoJSON\n var geojsonObject = {\n type: \"FeatureCollection\",\n features: [{\n type: \"Feature\",\n crs: {\n type: \"name\",\n properties: {\n name: \"EPSG:4326\"\n }\n },\n geometry: geometry\n }]\n };\n var geojsonformat = new _Formats_GeoJSON__WEBPACK_IMPORTED_MODULE_20__[\"default\"]({\n defaultDataProjection: \"EPSG:4326\",\n defaultStyle: style\n });\n var features = geojsonformat.readFeatures(geojsonObject, {\n dataProjection: \"EPSG:4326\",\n featureProjection: \"EPSG:3857\"\n });\n\n // ajout de la géométrie comme nouvelle couche vecteur à la carte\n this._geojsonRoute = new ol_layer_Vector__WEBPACK_IMPORTED_MODULE_4___default.a({\n source: new ol_source_Vector__WEBPACK_IMPORTED_MODULE_5___default.a({\n features: features\n }),\n style: style\n });\n map.addLayer(this._geojsonRoute);\n };\n\n /**\n * this method is called by this._fillRouteResultsDetails()\n * and constructs the geometries street with informations.\n *\n * @param {Array} instructions - route instructions list (containing geoJSON geometry)\n * @param {Object} style - route ol.style.Style object\n * @private\n */\n Route.prototype._fillRouteResultsDetailsFeatureGeometry = function (instructions, style) {\n var _this4 = this;\n this._clearRouteResultsFeatureGeometry();\n var map = this.getMap();\n\n // 1. création de l'objet geoJSON\n this._geojsonObject = {\n type: \"FeatureCollection\",\n crs: {\n type: \"name\",\n properties: {\n name: \"EPSG:4326\"\n }\n },\n features: []\n };\n\n // 2. Remplissage de l'objet geoJSON : ajout des géométries de chaque instruction\n for (var i = 0; i < instructions.length; i++) {\n var o = instructions[i];\n var id = i + 1;\n var coords = o.geometry.coordinates;\n for (var j = 0; j < coords.length; j++) {\n // remarque : les coordonnées sont au format string, à convertir en nombres\n if (typeof coords[j][0] === \"string\") {\n coords[j][0] = parseFloat(coords[j][0]);\n coords[j][1] = parseFloat(coords[j][1]);\n }\n }\n this._geojsonObject.features.push({\n type: \"Feature\",\n geometry: o.geometry,\n properties: {\n popupContent: \"(\" + id + \") distance : \" + this._convertDistance(o.distance) + \" / temps : \" + this._convertSecondsToTime(o.duration)\n },\n id: id\n });\n }\n\n // Ajout du point de depart du tracé\n this._geojsonObject.features.push({\n type: \"Feature\",\n geometry: {\n type: \"Point\",\n coordinates: this._currentPoints[0].getCoordinate()\n },\n properties: {\n description: \"Point de départ\",\n \"marker-symbol\": this.options.markersOpts.departure.url\n }\n });\n\n // Ajout des points d'étapes\n for (var k = 1; k < this._currentPoints.length - 1; k++) {\n if (this._currentPoints[k] && this._currentPoints[k].getCoordinate) {\n var coordinates = this._currentPoints[k].getCoordinate();\n if (coordinates) {\n this._geojsonObject.features.push({\n type: \"Feature\",\n geometry: {\n type: \"Point\",\n coordinates: coordinates\n },\n properties: {\n description: \"Point d'étape\",\n \"marker-symbol\": this.options.markersOpts.stages.url\n }\n });\n }\n }\n }\n\n // Ajout du point d'arrivée du tracé\n this._geojsonObject.features.push({\n type: \"Feature\",\n geometry: {\n type: \"Point\",\n coordinates: this._currentPoints[this._currentPoints.length - 1].getCoordinate()\n },\n properties: {\n description: \"Point d'arrivée\",\n \"marker-symbol\": this.options.markersOpts.arrival.url\n }\n });\n\n // Création du format GeoJSON, avec reprojection des géométries\n var geojsonformat = new _Formats_GeoJSON__WEBPACK_IMPORTED_MODULE_20__[\"default\"]({\n defaultDataProjection: \"EPSG:4326\",\n defaultStyle: style\n });\n var mapProj = this.getMap().getView().getProjection().getCode();\n var features = geojsonformat.readFeatures(this._geojsonObject, {\n dataProjection: \"EPSG:4326\",\n featureProjection: mapProj\n });\n\n // 3. Ajout du tracé de l'itinéraire (geoJSON) comme nouvelle couche vecteur à la carte\n this._geojsonSections = new ol_layer_Vector__WEBPACK_IMPORTED_MODULE_4___default.a({\n source: new ol_source_Vector__WEBPACK_IMPORTED_MODULE_5___default.a({\n features: features\n }),\n style: style,\n opacity: 0.9\n });\n var graph;\n if (this._currentTransport === \"Pieton\") {\n graph = \"piéton\";\n this._geojsonSections.gpResultLayerId = \"Pieton$OGC:OPENLS;Itineraire\";\n } else {\n graph = \"voiture\";\n this._geojsonSections.gpResultLayerId = \"Voiture$OGC:OPENLS;Itineraire\";\n }\n // ajout à la carte\n map.addLayer(this._geojsonSections);\n\n // 4. Si un layer switcher est présent dans la carte, on lui affecte des informations pour cette couche\n map.getControls().forEach(function (control) {\n if (control instanceof _LayerSwitcher__WEBPACK_IMPORTED_MODULE_19__[\"default\"]) {\n // un layer switcher est présent dans la carte\n var layerId = _this4._geojsonSections.gpLayerId;\n // on n'ajoute des informations que s'il n'y en a pas déjà (si le titre est le numéro par défaut)\n if (control._layers[layerId].title === layerId) {\n control.addLayer(_this4._geojsonSections, {\n title: _this4.options.layerDescription.title + \" (\" + graph + \")\",\n description: _this4.options.layerDescription.description\n });\n }\n }\n }, this);\n\n // 5. Ajout de popups aux troncons\n // Création de l'interaction : survol des features (=troncons de l'itinéraire)\n this._resultsHoverInteraction = new ol_interaction__WEBPACK_IMPORTED_MODULE_7__[\"Select\"]({\n condition: ol_events_condition__WEBPACK_IMPORTED_MODULE_6__[\"pointerMove\"],\n layers: [this._geojsonSections],\n style: this._selectedFeatureStyle\n });\n this._resultsHoverInteraction.on(\"select\", function (e) {\n return _this4._onResultsFeatureMouseOver(e);\n });\n map.addInteraction(this._resultsHoverInteraction);\n\n // Création de l'interaction : selection des features (=troncons de l'itinéraire)\n this._resultsSelectInteraction = new ol_interaction__WEBPACK_IMPORTED_MODULE_7__[\"Select\"]({\n layers: [this._geojsonSections],\n style: this._selectedFeatureStyle\n });\n this._resultsSelectInteraction.on(\"select\", function (e) {\n return _this4._onResultsFeatureSelect(e);\n });\n map.addInteraction(this._resultsSelectInteraction);\n };\n\n /**\n * this method is called on route features hover\n * and highlight instruction label\n *\n * @param {Object} e - event\n *\n * @private\n */\n Route.prototype._onResultsFeatureMouseOver = function (e) {\n if (e.selected.length !== 0) {\n // si on a bien survolé un tronçon, on surligne l'instruction correspondante\n var f = e.selected[0];\n var selectedInstruction = document.getElementById(\"GProuteResultsDetailsInstruction_\" + f.getId() + \"-\" + this._uid);\n if (selectedInstruction && selectedInstruction.classList) {\n selectedInstruction.classList.add(\"GProuteResultsDetailsInstructionHighlight\");\n }\n }\n\n // si on déselectionne un tronçon (mouseout), on rétablit un style normal pour l'instruction\n if (e.deselected.length !== 0) {\n var deselectedFeature = e.deselected[0];\n // on repasse l'instruction correspondante en normal\n var deSelectedInstruction = document.getElementById(\"GProuteResultsDetailsInstruction_\" + deselectedFeature.getId() + \"-\" + this._uid);\n if (deSelectedInstruction && deSelectedInstruction.classList) {\n deSelectedInstruction.classList.remove(\"GProuteResultsDetailsInstructionHighlight\");\n }\n }\n };\n\n /**\n * this method is called on route features select\n * and set a popup with feature information\n *\n * @param {Object} e - on select event\n * @private\n */\n Route.prototype._onResultsFeatureSelect = function (e) {\n var map = this.getMap();\n if (e.selected.length !== 0) {\n // si on a sélectionné un troncon, on lui ajoute une popup\n var f = e.selected[0];\n this._popupContent.innerHTML = f.getProperties().popupContent;\n if (!this._popupOverlay) {\n // ajout de la popup a la carte comme un overlay\n this._popupOverlay = new ol_Overlay__WEBPACK_IMPORTED_MODULE_3___default.a({\n element: this._popupDiv,\n positioning: \"bottom-center\",\n position: e.mapBrowserEvent.coordinate\n });\n map.addOverlay(this._popupOverlay);\n } else {\n // si l'overlay est déjà créé, on modifie juste sa position\n this._popupOverlay.setPosition(e.mapBrowserEvent.coordinate);\n }\n } else {\n // si aucun troncon n'est sélectionné (click à côté du tracé),\n // on fait disparaitre la popup si elle existe\n if (this._popupOverlay != null) {\n this._popupOverlay.setPosition(undefined);\n }\n }\n };\n\n // ################################################################### //\n // ############################# Clean ############################### //\n // ################################################################### //\n\n /**\n * this method is called by this.onShowRoutePanelClick()\n * and it clears all elements (reinit).\n *\n * @private\n */\n Route.prototype._clear = function () {\n this._currentTransport = null;\n this._currentExclusions = [];\n this._currentComputation = null;\n\n // les resultats\n this._clearRouteResultsDetails();\n // la geometrie\n this._clearRouteResultsGeometry();\n this._clearRouteResultsFeatureGeometry();\n // les points\n for (var i = 0; i < this._currentPoints.length; i++) {\n this._currentPoints[i].clear();\n }\n // suppression des points intermédiaires\n this._removeRouteStepLocations();\n };\n\n /**\n * this method is called by this.onRouteResetClick()\n * and it clears all options inputs (reinit).\n *\n * @private\n */\n Route.prototype._clearRouteInputOptions = function () {\n // reinit options to default\n this._initTransport();\n this._initComputation();\n this._initExclusions();\n\n // set transport mode to default\n var transportdiv;\n if (this._currentTransport === \"Pieton\") {\n transportdiv = document.getElementById(\"GProuteTransportPedestrian-\" + this._uid);\n if (transportdiv) {\n transportdiv.checked = \"true\";\n }\n } else {\n transportdiv = document.getElementById(\"GProuteTransportCar-\" + this._uid);\n if (transportdiv) {\n transportdiv.checked = \"true\";\n }\n }\n\n // set computation mode to default\n var computationdiv = document.getElementById(\"GProuteComputationSelect-\" + this._uid);\n if (computationdiv) {\n computationdiv.value = this._currentComputation;\n }\n\n // set exclusions to default\n var tollInput = document.getElementById(\"GProuteExclusionsToll-\" + this._uid);\n if (tollInput) {\n if (this._currentExclusions.indexOf(\"toll\") !== -1) {\n tollInput.checked = false;\n } else {\n tollInput.checked = true;\n }\n }\n var tunnelInput = document.getElementById(\"GProuteExclusionsTunnel-\" + this._uid);\n if (tunnelInput) {\n if (this._currentExclusions.indexOf(\"tunnel\") !== -1) {\n tunnelInput.checked = false;\n } else {\n tunnelInput.checked = true;\n }\n }\n var bridgeInput = document.getElementById(\"GProuteExclusionsBridge-\" + this._uid);\n if (bridgeInput) {\n if (this._currentExclusions.indexOf(\"bridge\") !== -1) {\n bridgeInput.checked = false;\n } else {\n bridgeInput.checked = true;\n }\n }\n };\n\n /**\n * this method is called by this._clear()\n * and it removes step location inputs (excepted departure and arrival)\n *\n * @private\n */\n Route.prototype._removeRouteStepLocations = function () {\n var points = document.querySelectorAll(\"div[id^=\\\"GPlocationPoint\\\"]\");\n if (points.length !== 0) {\n var goodPoints = [];\n for (var k = 0; k < points.length; k++) {\n if (points[k].id.indexOf(this._uid) !== -1) {\n goodPoints.push(points[k]);\n }\n }\n // on boucle sur les points intermédiaires\n for (var i = 1; i < goodPoints.length - 1; i++) {\n // on va regarder les classes associées\n var classList = goodPoints[i].classList;\n if (classList.length !== 0) {\n for (var j = 0; j < classList.length; j++) {\n if (classList[j] === \"GPlocationStageFlexInput\") {\n // si l'élément est visible, on le supprime en simulant un clic sur la croix (x)\n document.getElementById(this._addUID(\"GPlocationStageRemove_\" + (i + 1))).click();\n }\n }\n }\n }\n }\n };\n\n /**\n * this method is called by this.onRouteComputationSubmit() (in case of failure)\n * and it clears all route instructions.\n *\n * @private\n */\n Route.prototype._clearRouteResultsDetails = function () {\n this._currentRouteInformations = null;\n\n // doit on nettoyer le container \"GProuteResultsDetails\" ?\n // il sera de toute façon écrasé par la prochaine requête...\n if (this._resultsRouteDetailsContainer) {\n var detailsDiv = this._resultsRouteDetailsContainer;\n if (detailsDiv.childElementCount) {\n while (detailsDiv.firstChild) {\n detailsDiv.removeChild(detailsDiv.firstChild);\n }\n }\n }\n if (this._resultsRouteValuesContainer) {\n var valuesDiv = this._resultsRouteValuesContainer;\n if (valuesDiv.childElementCount) {\n while (valuesDiv.firstChild) {\n valuesDiv.removeChild(valuesDiv.firstChild);\n }\n }\n }\n };\n\n /**\n * this method is called by this.onRouteComputationSubmit()\n * and it clears all route geometries.\n *\n * @private\n */\n Route.prototype._clearRouteResultsGeometry = function () {\n var map = this.getMap();\n if (this._geojsonRoute != null) {\n map.removeLayer(this._geojsonRoute);\n this._geojsonRoute = null;\n }\n };\n\n /**\n * this method is called by this.onRouteComputationSubmit()\n * and it clears all route geometries.\n *\n * @private\n */\n Route.prototype._clearRouteResultsFeatureGeometry = function () {\n var map = this.getMap();\n\n // on retire la couche itinéraire de la carte\n if (this._geojsonSections != null) {\n map.removeLayer(this._geojsonSections);\n this._geojsonSections = null;\n this._geojsonObject = null;\n }\n // on retire l'overlay de la popup de la carte\n if (this._popupOverlay != null) {\n map.removeOverlay(this._popupOverlay);\n this._popupOverlay = null;\n }\n // et les interactions liées à cette couche\n if (this._resultsSelectInteraction != null) {\n map.removeInteraction(this._resultsSelectInteraction);\n this._resultsSelectInteraction = null;\n }\n if (this._resultsHoverInteraction != null) {\n map.removeInteraction(this._resultsHoverInteraction);\n this._resultsHoverInteraction = null;\n }\n };\n\n /**\n * this method is called by event 'click' on control main container\n * and hide suggested Locations (unless target is an autocomplete input)\n *\n * @param {Object} e - event\n *\n * @private\n */\n Route.prototype._hideRouteSuggestedLocations = function (e) {\n // si on clique sur un input de saisie de locationSelector\n if (e.target && e.target.id && e.target.id.indexOf(\"GPlocationOrigin_\") !== -1) {\n // on récupère le numéro du point\n var pointId = parseInt(e.target.id.split(\"_\")[1][0], 10) - 1;\n // et on cache les autres résultats d'autocomplétion (sauf celui sur lequel on clique)\n for (var j = 0; j < this._currentPoints.length; j++) {\n if (j !== parseInt(pointId, 10)) {\n this._currentPoints[j]._hideSuggestedLocation();\n }\n }\n } else {\n // si on clique ailleurs dans le DOM du control, on cache tous les résultats d'autocomplétion\n for (var i = 0; i < this._currentPoints.length; i++) {\n this._currentPoints[i]._hideSuggestedLocation();\n }\n }\n };\n\n /**\n * this method displays waiting container and sets a timeout\n *\n * @private\n */\n Route.prototype._displayWaitingContainer = function () {\n this._waitingContainer.className = \"GProuteCalcWaitingContainerVisible\";\n this._waiting = true;\n\n // mise en place d'un timeout pour réinitialiser le panel (cacher la patience)\n // si on est toujours en attente (si la requête est bloquée par exemple)\n // ceci est vrai, uniquement sur le protocole JSONP !\n var opts = this.options.routeOptions;\n if (opts && opts.timeOut) {\n if (this._timer) {\n clearTimeout(this._timer);\n this._timer = null;\n }\n var context = this;\n this._timer = setTimeout(function () {\n if (context._waiting === true) {\n context._hideWaitingContainer();\n } else {\n if (context._timer) {\n clearTimeout(context._timer);\n }\n }\n }, 16000);\n }\n };\n\n /**\n * this method hides waiting container and clears timeout\n *\n * @private\n */\n Route.prototype._hideWaitingContainer = function () {\n if (this._waiting) {\n this._waitingContainer.className = \"GProuteCalcWaitingContainerHidden\";\n this._waiting = false;\n var opts = this.options.routeOptions;\n if (opts && opts.timeOut) {\n clearTimeout(this._timer);\n this._timer = null;\n }\n }\n };\n\n // ################################################################### //\n // ########################## Geometry ############################### //\n // ################################################################### //\n\n /**\n * simplified instructions\n *\n * @param {Object[]} instructions - list of instructions\n *\n * @returns {Object[]} simplified instructions\n *\n * @private\n */\n Route.prototype._simplifiedInstructions = function (instructions) {\n var newInstructions = [];\n\n // cas où...\n var current = instructions[0];\n if (instructions.length === 1) {\n newInstructions.push(current);\n }\n for (var i = 1; i < instructions.length; i++) {\n var o = instructions[i];\n if (o.instruction === current.instruction) {\n current.distance = (parseFloat(o.distance) + parseFloat(current.distance)).toString();\n current.duration = (parseFloat(o.duration) + parseFloat(current.duration)).toString();\n for (var j = 1; j < o.geometry.coordinates.length; j++) {\n current.geometry.coordinates.push(o.geometry.coordinates[j]);\n }\n } else {\n newInstructions.push(current);\n current = o;\n // last\n if (i === instructions.length - 1) {\n newInstructions.push(o);\n current = null;\n }\n }\n }\n logger.log(newInstructions);\n return newInstructions;\n };\n\n // ################################################################### //\n // ################# Utils for Distance/Duration ##################### //\n // ################################################################### //\n\n /**\n * convert seconds to time : HH:MM:SS\n *\n * @param {Number} duration - duration in seconds\n *\n * @returns {String} time in hours/minutes/seconds\n *\n * @private\n */\n Route.prototype._convertSecondsToTime = function (duration) {\n var time = \"\";\n duration = Math.round(duration);\n var hours = Math.floor(duration / (60 * 60));\n var divisor4minutes = duration % (60 * 60);\n var minutes = Math.floor(divisor4minutes / 60);\n // if (!minutes) {\n // minutes = \"00\";\n // }\n\n // var divisor4seconds = divisor4minutes % 60;\n // var seconds = Math.ceil(divisor4seconds);\n // if (!seconds) {\n // seconds = \"00\";\n // }\n\n if (hours) {\n time = hours + \"h \";\n }\n time += minutes + \" min\";\n return time;\n };\n\n /**\n * convert distance in meters or kilometers\n *\n * @param {Number} distance - distance in meters\n *\n * @returns {String} distance in km\n *\n * @private\n */\n Route.prototype._convertDistance = function (distance) {\n var d = \"\";\n var distanceKm = parseInt(distance / 1000, 10);\n if (!distanceKm) {\n d = parseInt(distance, 10) + \" m\"; // arrondi !\n } else {\n d = distanceKm + \" km\";\n }\n return d;\n };\n return Route;\n}(ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default.a);\n/* harmony default export */ __webpack_exports__[\"default\"] = (Route);\n\n// Expose Route as ol.control.Route (for a build bundle)\nif (window.ol && window.ol.control) {\n window.ol.control.Route = Route;\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9PcGVuTGF5ZXJzL0NvbnRyb2xzL1JvdXRlLmpzP2QxNTYiXSwibmFtZXMiOlsibG9nZ2VyIiwiTG9nZ2VyIiwiZ2V0TG9nZ2VyIiwiUm91dGUiLCJDb250cm9sIiwib3B0aW9ucyIsIlR5cGVFcnJvciIsImluaXRpYWxpemUiLCJfY29udGFpbmVyIiwiX2NyZWF0ZU1haW5Db250YWluZXJFbGVtZW50IiwiX2NvbnRhaW5lckVsZW1lbnQiLCJlbGVtZW50I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AgICAgIH0sXG4gKiAgICAgIFwiZ3JhcGhzXCIgOiBbJ1BpZXRvbicsICdWb2l0dXJlJ10sXG4gKiAgICAgIFwibWFya2Vyc09wdHNcIiA6IHtcbiAqICAgICAgICAgIFwiZGVwYXJ0dXJlXCIgOiB7XG4gKiAgICAgICAgICAgICAgXCJ1cmxcIiA6IFwiLi4uXCIsXG4gKiAgICAgICAgICAgICAgXCJvZmZzZXRcIiA6IFswLDBdXG4gKiAgICAgICAgICB9LFxuICogICAgICAgICAgXCJzdGFnZXNcIiA6IHtcbiAqICAgICAgICAgICAgICBcInVybFwiIDogXCIuLi5cIixcbiAqICAgICAgICAgICAgICBcIm9mZnNldFwiIDogWzAsMF1cbiAqICAgICAgICAgIH0sXG4gKiAgICAgICAgICBcImFycml2YWxcIiA6IHtcbiAqICAgICAgICAgICAgICBcInVybFwiIDogXCIuLi5cIixcbiAqICAgICAgICAgICAgICBcIm9mZnNldFwiIDogWzAsMF1cbiAqICAgICAgICAgIH1cbiAqICAgICAgfVxuICogICAgICBcImF1dG9jb21wbGV0ZU9wdGlvbnNcIiA6IHt9LFxuICogICAgICBcInJvdXRlT3B0aW9uc1wiIDoge31cbiAqICB9KTtcbiAqXG4gKiAgLy8gaWYgeW91IHdhbnQgdG8gcGx1Z2d1ZWQgdGhlIGNvbnRyb2wgRXhwb3J0IHdpdGggb3B0aW9ucyA6XG4gKiAgdmFyIHJvdXRlID0gbmV3IG9sLmNvbnRyb2wuUm91dGUoe1xuICogICAgZXhwb3J0IDoge1xuICogICAgICBuYW1lIDogXCJleHBvcnRcIixcbiAqICAgICAgZm9ybWF0IDogXCJnZW9qc29uXCIsXG4gKiAgICAgIHRpdGxlIDogXCJFeHBvcnRlclwiLFxuICogICAgICBtZW51IDogZmFsc2VcbiAqICAgIH1cbiAqICB9KTtcbiAqL1xudmFyIFJvdXRlID0gKGZ1bmN0aW9uIChDb250cm9sKSB7XG4gICAgLyoqXG4gICAgICogU2VlIHtAbGluayBvbC5jb250cm9s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XJhbSB7b2wuTWFwfSBtYXAgLSBNYXAuXG4gICAgICovXG4gICAgUm91dGUucHJvdG90eXBlLnNldE1hcCA9IGZ1bmN0aW9uIChtYXApIHtcbiAgICAgICAgaWYgKG1hcCkge1xuICAgICAgICAgICAgLy8gZW5yaWNoaXNzZW1lbnQgZHUgRE9NIGR1IGNvbnRhaW5lclxuICAgICAgICAgICAgdGhpcy5fY29udGFpbmVyID0gdGhpcy5faW5pdENvbnRhaW5lcihtYXApO1xuXG4gICAgICAgICAgICAvLyBham91dCBkJ3VuIGJvdXRvbiBkJ2V4cG9ydFxuICAgICAgICAgICAgaWYgKHRoaXMub3B0aW9ucy5leHBvcnQpIHtcbiAgICAgICAgICAgICAgICB2YXIgb3B0cyA9IFV0aWxzLmFzc2lnbih7IGNvbnRyb2wgOiB0aGlzIH0sIHRoaXMub3B0aW9ucy5leHBvcnQpO1xuICAgICAgICAgICAgICAgIHRoaXMuZXhwb3J0ID0gbmV3IEJ1dHRvbkV4cG9ydChvcHRzKTtcbiAgICAgICAgICAgICAgICB0aGlzLmV4cG9ydC5yZW5kZXIoKTtcbiAgICAgICAgICAgICAgICB2YXIgc2VsZiA9IHRoaXM7XG4gICAgICAgICAgICAgICAgdGhpcy5leHBvcnQub24oXCJleHBvcnQ6Y29tcHV0ZVwiLCAoZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLmRpc3BhdGNoRXZlbnQoe1xuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZSA6IFwiZXhwb3J0OmNvbXB1dGVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnQgOiBlLmNvbnRlbnRcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIG1vZGUgXCJkcmFnZ2FibGVcIlxuICAgICAgICAgICAgaWYgKHRoaXMuZHJhZ2dhYmxlKSB7XG4gICAgICAgICAgICAgICAgRHJ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YWpvdXQgZGVzIG5vdXZlbGxlcyBjb29yZG9ubm7DqWVzXG4gICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgZGF0YS5wb2ludHMubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgIGNvbnN0IGMgPSBkYXRhLnBvaW50c1tqXTtcbiAgICAgICAgICAgIGlmIChjKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudFBvaW50c1tqXS5zZXRDb29yZGluYXRlKGMsIFwiRVBTRzo0MzI2XCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHRoaXMuX2N1cnJlbnRSb3V0ZUluZm9ybWF0aW9ucyA9IGRhdGEucmVzdWx0cztcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogR2V0IGNvbnRhaW5lclxuICAgICAqXG4gICAgICogQHJldHVybnMge0RPTUVsZW1lbnR9IGNvbnRhaW5lclxuICAgICAqL1xuICAgIFJvdXRlLnByb3RvdHlwZS5nZXRDb250YWluZXIgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLl9jb250YWluZXI7XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIEdldCBkZWZhdWx0IHN0eWxlXG4gICAgICpcbiAgICAgKiBAcmV0dXJucyB7b2wuc3R5bGV9IHN0eWxlXG4gICAgICovXG4gICAgUm91dGUucHJvdG90eXBlLmdldFN0eWxlID0gZnVuY3Rpb24gKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5fZGVmYXVsdEZlYXR1cmVTdHlsZTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogVGhpcyBtZXRob2QgaXMgcHVibGljLlxuICAgICAqIEl0IGFsbG93cyB0byBpbml0IHRoZSBjb250cm9sLlxuICAgICAqL1xuICAgIFJvdXRlLnByb3RvdHlwZS5pbml0ID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAvLyBJTkZPXG4gICAgICAgIC8vIHJlY29uc3RydWlyZSBsZS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nRCeUlkKFwiR1Byb3V0ZUNvbXB1dGF0aW9uU2VsZWN0LVwiICsgdGhpcy5fdWlkKTtcbiAgICAgICAgaWYgKGNvbXB1dGF0aW9uZGl2KSB7XG4gICAgICAgICAgICBjb21wdXRhdGlvbmRpdi52YWx1ZSA9IHRoaXMuX2N1cnJlbnRDb21wdXRhdGlvbjtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIHNldCBleGNsdXNpb25zXG4gICAgICAgIHZhciB0b2xsSW5wdXQgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChcIkdQcm91dGVFeGNsdXNpb25zVG9sbC1cIiArIHRoaXMuX3VpZCk7XG4gICAgICAgIGlmICh0b2xsSW5wdXQpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLl9jdXJyZW50RXhjbHVzaW9ucy5pbmRleE9mKFwidG9sbFwiKSAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICB0b2xsSW5wdXQuY2hlY2tlZCA9IGZhbHNlO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0b2xsSW5wdXQuY2hlY2tlZCA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgdHVubmVsSW5wdXQgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChcIkdQcm91dGVFeGNsdXNpb25zVHVubmVsLVwiICsgdGhpcy5fdWlkKTtcbiAgICAgICAgaWYgKHR1bm5lbElucHV0KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5fY3VycmVudEV4Y2x1c2lvbnMuaW5kZXhPZihcInR1bm5lbFwiKSAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICB0dW5uZWxJbnB1dC5jaGVja2VkID0gZmFsc2U7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHR1bm5lbElucHV0LmNoZWNrZWQgPSB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICA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9wdGlvbnMgOiB7fSxcbiAgICAgICAgICAgIGF1dG9jb21wbGV0ZU9wdGlvbnMgOiB7fSxcbiAgICAgICAgICAgIGxheWVyRGVzY3JpcHRpb24gOiB7XG4gICAgICAgICAgICAgICAgdGl0bGUgOiBcIkl0aW7DqXJhaXJlXCIsXG4gICAgICAgICAgICAgICAgZGVzY3JpcHRpb24gOiBcIkl0aW7DqXJhaXJlIGJhc8OpIHN1ciB1biBncmFwaGVcIlxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIC8vIG1lcmdlIHdpdGggdXNlciBvcHRpb25zXG4gICAgICAgIFV0aWxzLmFzc2lnbih0aGlzLm9wdGlvbnMsIG9wdGlvbnMpO1xuXG4gICAgICAgIC8vIGNhcyBwYXJ0aWN1bGllciBkZXMgbWFya2VycyBwYXIgZMOpZmF1dFxuICAgICAgICB2YXIgZGVmYXVsdE1hcmtlcnNPcHRzID0ge1xuICAgICAgICAgICAgZGVwYXJ0dXJlIDoge1xuICAgICAgICAgICAgICAgIHVybCA6IE1hcmtlcnNbXCJyZWRcIl0sXG4gICAgICAgICAgICAgICAgb2Zmc2V0IDogTWFya2Vycy5kZWZhdWx0T2Zmc2V0XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgc3RhZ2VzIDoge1xuICAgICAgICAgICAgICAgIHVybCA6IE1hcmtlcnNbXCJsaWdodE9yYW5nZVwiXSxcbiAgICAgICAgICAgICAgICBvZmZzZXQgOiBNYXJrZXJzLmRlZmF1bHRPZmZzZXRcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBhcnJpdmFsIDoge1xuICAgICAgICAgICAgICAgIHVybCA6IE1hcmtlcnNbXCJkYXJrT3JhbmdlXCJdLFxuICAgICAgICAgICAgICAgIG9mZnNldCA6IE1hcmtlcnMuZGVmYXVsdE9mZnNldFxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICAvLyBvbiByw6ljdXDDqHJlIGxlcyBvcHRpb25zIGR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Fwidm9pdHVyZVwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5ncmFwaHNbaV0gPSBcIlZvaXR1cmVcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZ2dlci5sb2coXCJbb2wuY29udHJvbC5Sb3V0ZV0gRVJST1IgOiBwYXJhbWV0ZXIgJ2dyYXBocycgZWxlbWVudHMgc2hvdWxkIGJlIG9mIHR5cGUgJ3N0cmluZydcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmdyYXBoc1tpXSA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGxvZ2dlci53YXJuKFwiJ2dyYXBocycgcGFyYW1ldGVyIHNob3VsZCBiZSBhbiBhcnJheVwiKTtcbiAgICAgICAgICAgICAgICBvcHRpb25zLmdyYXBocyA9IG51bGw7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBjb2xsYXBzZWRcbiAgICAgICAgaWYgKG9wdGlvbnMuY29sbGFwc2VkID09PSBcInRydWVcIikge1xuICAgICAgICAgICAgb3B0aW9ucy5jb2xsYXBzZWQgPSB0cnVlO1xuICAgICAgICB9XG4gICAgICAgIGlmIChvcHRpb25zLmNvbGxhcHNlZCA9PT0gXCJmYWxzZVwiKSB7XG4gICAgICAgICAgICBvcHRpb25zLmNvbGxhcHNlZCA9IGZhbHNlO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIGluaXRpYWxpemUgY29tcG9uZW50IGNvbnRhaW5lciAoRE9NKVxuICAgICAqXG4gICAgICogQHBhcmFtIHtPYmplY3R9IG1hcCAtIHRoZSBtYXBcbiAgICAgKlxuICAgICAqIEByZXR1cm5zIHtET01FbGVtZW50fSBET00gZWxlbWVudFxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBSb3V0ZS5wcm90b3R5cGUuX2luaXRDb250YWluZXIgPSBmdW5jdGlvbiAobWFwKSB7XG4gICAgICAgIC8vIGdldCBtYWluIGNvbnRhaW5lclxuICAgICAgICB2YXIgY29udGFpbmVyID0gdGhpcy5fY29udGFpbmVyO1xuXG4gICAgICAgIHZhciBpbnB1dFNob3cgPSB0aGlzLl9zaG93Um91dGVDb250YWluZXIgPSB0aGlzLl9jcmVhdGVTaG93Um91dGVFbGVtZW50KCk7XG4gICAgICAgIGNvbnRhaW5lci5hcHBlbmRDaGlsZChpbnB1dFNob3cpO1xuXG4gICAgICAgIC8vIG1vZGUgXCJjb2xsYXBzZWRcIlxuICAgICAgICBpZiAoIXRoaXMuY29sbGFwc2VkKSB7XG4gICAgICAgICAgICBpbnB1dFNob3cuY2hlY2tlZCA9IHRydWU7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgcGljdG8gPSB0aGlzLl9jcmVhdGVTaG93Um91dGVQaWN0b0VsZW1lbnQoKTtcbiAgICAgICAgY29udGFpbmVyLmFwcGVuZENoaWxkKHBpY3RvKTtcblxuICAgICAgICB2YXIgcm91dGVQYW5lbCA9IHRoaXMuX3BhbmVsUm91dGVDb250YWluZXIgPSB0aGlzLl9jcmVhdGVSb3V0ZVBhbmVsRWxlbWVudCgpO1xuXG4gICAgICAgIC8vIGhlYWRlciBmb3JtXG4gICAgICAgIHZhciByb3V0ZUhlYWRlciA9IHRoaXMuX3BhbmVsSGVhZGVyUm91dGVDb250YWluZXIgPSB0aGlzLl9jcmVhdGVSb3V0ZVBhbmVsSGVhZGVyRWxlbWVudCgpO1xuICAgICAgICByb3V0ZVBhbmVsLmFwcGVuZENoaWxkKHJvdXRlSGVhZGVyKTtcblxuICAgICAgICAvLyBmb3JtXG4gICAgICAgIHZhciByb3V0ZUZvcm0gPSB0aGlzLl9mb3JtUm91dGV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yAvLyBwYXIgZGVmYXV0XG5cbiAgICAgICAgLy8gcGFyIGRlZmF1dFxuICAgICAgICB2YXIgZXhjbHVzaW9uID0gdGhpcy5vcHRpb25zLmV4Y2x1c2lvbnM7XG4gICAgICAgIGlmICghZXhjbHVzaW9uIHx8ICh0eXBlb2YgZXhjbHVzaW9uID09PSBcIm9iamVjdFwiICYmIE9iamVjdC5rZXlzKGV4Y2x1c2lvbikubGVuZ3RoID09PSAwKSkge1xuICAgICAgICAgICAgdGhpcy5vcHRpb25zLmV4Y2x1c2lvbnMgPSB7XG4gICAgICAgICAgICAgICAgdG9sbCA6IGZhbHNlLFxuICAgICAgICAgICAgICAgIHR1bm5lbCA6IGZhbHNlLFxuICAgICAgICAgICAgICAgIGJyaWRnZSA6IGZhbHNlXG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gb3B0aW9uXG4gICAgICAgIGlmIChleGNsdXNpb24gJiYgdHlwZW9mIGV4Y2x1c2lvbiA9PT0gXCJvYmplY3RcIiAmJiBPYmplY3Qua2V5cyhleGNsdXNpb24pLmxlbmd0aCkge1xuICAgICAgICAgICAgZm9yICh2YXIgayBpbiBleGNsdXNpb24pIHtcbiAgICAgICAgICAgICAgICBpZiAoZXhjbHVzaW9uLmhhc093blByb3BlcnR5KGspKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChleGNsdXNpb25ba10pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRFeGNsdXNpb25zLnB1c2goayk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBUT0RPIG9wdGlvbiBzdXIgbGUgc2VydmljZVxuICAgICAgICB2YXIgc2VydmljZU9wdGlvbnMgPSB0aGlzLm9wdGlvbnMucm91dGVPcHRpb25zO1xuICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShzZXJ2aWNlT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gIHRoaXMuX2N1cnJlbnRQb2ludHMucHVzaChzdGFydCk7XG5cbiAgICAgICAgLy8gcG9pbnRzIGludGVybWVkaWFpcmVzXG4gICAgICAgIGZvciAoY291bnQgPSAyOyBjb3VudCA8IDc7IGNvdW50KyspIHtcbiAgICAgICAgICAgIHZhciBzdGVwID0gbmV3IExvY2F0aW9uU2VsZWN0b3Ioe1xuICAgICAgICAgICAgICAgIGFwaUtleSA6IHRoaXMub3B0aW9ucy5hcGlLZXkgfHwgbnVsbCxcbiAgICAgICAgICAgICAgICB0YWcgOiB7XG4gICAgICAgICAgICAgICAgICAgIGlkIDogY291bnQsXG4gICAgICAgICAgICAgICAgICAgIGdyb3VwSWQgOiB0aGlzLl91aWQsXG4gICAgICAgICAgICAgICAgICAgIGxhYmVsIDogXCJFdGFwZVwiLFxuICAgICAgICAgICAgICAgICAgICBtYXJrZXJPcHRzIDogdGhpcy5vcHRpb25zLm1hcmtlcnNPcHRzW1wic3RhZ2VzXCJdLFxuICAgICAgICAgICAgICAgICAgICBkaXNwbGF5IDogZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgIHJlbW92ZU9wdGlvbiA6IHRydWVcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGF1dG9jb21wbGV0ZU9wdGlvbnMgOiB0aGlzLm9wdGlvbnMuYXV0b2NvbXBsZXRlT3B0aW9ucyB8fCBudWxsXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHN0ZXAuc2V0TWFwKG1hcCk7XG4gICAgICAgICAgICB0aGlzLl9hZGRGb3JtUG9pbnRzRXZlbnRMaXN0ZW5lcnMoc3RlcCk7XG4gICAgICAgICAgICBwb2ludHMucHVzaChzdGVwLl9jb250YWluZXIpO1xuICAgICAgICAgICAgdGhpcy5fY3VycmVudFBvaW50cy5wdXNoKHN0ZXApO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gcG9pbnQgZCdhcnJpdsOpZVxuICAgICAgICB2YXIgZW5kID0gbmV3IExvY2F0aW9uU2VsZWN0b3Ioe1xuICAgICAgICAgICAgYXBpS2V5IDogdGhpcy5vcHRpb25zLmFwaUtleSB8fCBudWxsLFxuICAgICAgICAgICAgdGFnIDoge1xuICAgICAgICAgICAgICAgIGlkIDogY291bnQsXG4gICAgICAgICAgICAgICAgZ3JvdXBJZCA6IHRoaXMuX3VpZCxcbiAgICAgICAgICAgICAgICBtYXJrZXJPcHRzIDogdGhpcy5vcHRpb25zLm1hcmtlcnNPcHRzW1wiYXJyaXZhbFwiXSxcbiAgICAgICAgICAgICAgICBsYWJlbCA6IFwiQXJyaXbDqWVcIixcbiAgICAgICAgICAgICAgICBkaXNwbGF5IDogdHJ1ZSxcbiAgICAgICAgICAgICAgICBhZGRPcHRpb24gOiB0cnVlXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgYXV0b2NvbXBsZXRlT3B0aW9ucyA6IHRoaXMub3B0aW9ucy5hdXRvY29tcGxldGVPcHRpb25zIHx8IG51bGxcbiAgICAgICAgfSk7XG4gICAgICAgIGVuZC5zZXRNYXAobWFwKTtcbiAgICAgICAgdGhpcy5fYWRkRm9ybVBvaW50c0V2ZW50TGlzdGVuZXJzKGVuZCk7XG4gICAgICAgIHBvaW50cy5wdXNoKGVuZC5fY29udGFpbmVyKTtcbiAgICAgICAgdGhpcy5fY3VycmVudFBvaW50cy5wdXNoKGVuZCk7XG5cbiAgICAgICAgcmV0dXJuIHBvaW50cztcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogQXR0YWNoIGV2ZW50cyBsaXN0ZW5lcnMgdG8gcm91dGUgZm9ybSBwb2ludHMgKGxvY2F0aW9uU2VsZWN0b3IpXG4gICAgICpcbiAgICAgKiBAcGFyYW0ge09iamVjdH0gZm9ybVBvaW50IC0gcm91dGUgZm9ybSBwb2ludCAobG9jYXRpb25TZWxlY3RvcilcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqL1xuICAgIFJvdXRlLnByb3RvdHlwZS5fYWRkRm9ybVBvaW50c0V2ZW50TGlzdGVuZXJzID0gZnVuY3Rpb24gKGZvcm1Qb2ludCkge1xuICAgICAgICBpZiAoIWZvcm1Qb2ludCkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGZvcm1Qb2ludC5faW5wdXRMYWJlbENvbnRhaW5lci5hZGRFdmVudExpc3RlbmVyKSB7XG4gICAgICAgICAgICAvLyBkaXNwbGF5IGZvcm0gb24gb3JpZ2luIGxhYmVsIGNsaWNrXG4gICAgICAgICAgICBmb3JtUG9pbnQuX2lucHV0TGFiZWxDb250YWluZXIuYWRkRXZlbnRMaXN0ZW5lcihcbiAgICAgICAgICAgICAgICBcImNsaWNrXCIsXG4gICAgICAgICAgICAgICAgKGUpID0+IHRoaXMub25Sb3V0ZU9yaWdpbkxhYmVsQ2xpY2soZSlcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICAvLyBtaW5pbWl6ZSBmb3JtIG9uIGlucHV0IHNob3cgcG9pbnRlciwgYW5kIHNldCBtYXAgZXZlbnQgbGlzdGVuZXJzIChzZWUgdGhpcy5vblJvdXRlT3JpZ2luUG9pbnRlckNsaWNrKVxuICAgICAgICAgICAgZm9ybVBvaW50Ll9pbnB1dFNob3dQb2ludGVyLmFkZEV2ZW50TGlzdGVuZXIoXG4gICAgICAgICAgICAgICAgXCJjbGlja1wiLFxuICAgICAgICAgICAgICAgIChlKSA9PiB0aGlzLm9uUm91dGVPcmlnaW5Qb2ludGVyQ2xpY2soZSwgZm9ybVBvaW50KVxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGlmIChmb3JtUG9pbnQuX3JlbW92ZVBvaW50RWxlbWVudCkge1xuICAgICAgICAgICAgICAgIGZvcm1Qb2ludC5fcmVtb3ZlUG9pbnRFbGVtZW50LmFkZEV2ZW50TGlzdGVuZXIoXG4gICAgICAgICAgICAgICAgICAgIFwiY2xpY2tcIixcbiAgICAgICAgICAgICAgICAgICAgKGUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZ2dlci50cmFjZShcImNsaWNrIG9uIF9yZW1vdmVQb2ludEVsZW1lbnRcIiwgZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBNb3ZpbmcgdXAgZXhjbHVzaW9ucyBwaWN0b1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gdmFyIGV4Y2x1c2lvbnNQaWN0b1RvcCA9IGNvbnRleHQuX3Nob3dSb3V0ZUV4Y2x1c2lvbnNFbGVtZW50LnN0eWxlLnRvcDtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNvbnRleHQuX3Nob3dSb3V0ZUV4Y2x1c2lvbnNFbGVtZW50LnN0eWxlLnRvcCA9IChwYXJzZUludChleGNsdXNpb25zUGljdG9Ub3AsIDEwKSAtIDMzKS50b1N0cmluZygpICsgXCJweFwiO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChmb3JtUG9pbnQuX2FkZFBvaW50RWxlbWVudCkge1xuICAgICAgICAgICAgICAgIGZvcm1Qb2ludC5fYWRkUG9pbnRFbGVtZW50LmFkZEV2ZW50TGlzdGVuZXIoXG4gICAgICAgICAgICAgICAgICAgIFwiY2xpY2tcIixcbiAgICAgICAgICAgICAgICAgICAgKGUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZ2dlci50cmFjZShcImNsaWNrIG9uIF9hZGRQb2ludEVsZW1lbnRcIiwgZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBNb3ZpbmcgZG93biBleGNsdXNpb25zIHBpY3RvXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB2YXIgZXhjbHVzaW9uc1BpY3RvVG9wID0gY29udGV4dC5fc2hvd1JvdXRlRXhjbHVzaW9uc0VsZW1lbnQuc3R5bGUudG9wO1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gY29udGV4dC5fc2hvd1JvdXRlRXhjbHVzaW9uc0VsZW1lbnQuc3R5bGUudG9wID0gKHBhcnNlSW50KGV4Y2x1c2lvbnNQaWN0b1RvcCwgMTApICsgMzMpLnRvU3RyaW5nKCkgKyBcInB4XCI7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKGZvcm1Qb2ludC5faW5wdXRMYWJlbENvbnRhaW5lci5hdHRhY2hFdmVudCkge1xuICAgICAgICAgICAgLy8gYXR0YWNoRXZlbnQ6IEludGVybmV0IGV4cGxvcmVyIGV2ZW50IGxpc3RlbmVycyBtYW5hZ2VtZW50XG4gICAgICAgICAgICBmb3JtUG9pbnQuX2lucHV0TGFiZWxDb250YWluZXIuYXR0YWNoRXZlbnQoXG4gICAgICAgICAgICAgICAgXCJvbmNsaWNrXCIsXG4gICAgICAgICAgICAgICAgKGUpID0+IHRoaXMub25Sb3V0ZU9yaWdpbkxhYmVsQ2xpY2soZSlcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBmb3JtUG9pbnQuX2lucHV0U2hvd1BvaW50ZXIuYXR0YWNoRXZlbnQoXG4gICAgICAgICAgICAgICAgXCJvbmNsaWNrXCIsXG4gICAgICAgICAgICAgICAgKGUpID0+IHRoaXMub25Sb3V0ZU9yaWdpblBvaW50ZXJDbGljayhlLCBmb3JtUG9pbnQpXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgaWYgKGZvcm1Qb2ludC5fcmVtb3ZlUG9pbnRFbGVtZW50KSB7XG4gICAgICAgICAgICAgICAgZm9ybVBvaW50Ll9yZW1vdmVQb2ludEVsZW1lbnQuYXR0YWNoRXZlbnQoXG4gICAgICAgICAgICAgICAgICAgIFwib25jbGlja1wiLFxuICAgICAgICAgICAgICAgICAgICAoZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gTW92aW5nIHVwIGV4Y2x1c2lvbnMgcGljdG9cbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHZhciBleGNsdXNpb25zUGljdG9Ub3AgPSBjb250ZXh0Ll9zaG93Um91dGVFeGNsdXNpb25zRWxlbWVudC5zdHlsZS50b3A7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBjb250ZXh0Ll9zaG93Um91dGVFeGNsdXNpb25zRWxlbWVudC5zdHlsZS50b3AgPSAocGFyc2VJbnQoZXhjbHVzaW9uc1BpY3RvVG9wLCAxMCkgLSAzMykudG9TdHJpbmcoKSArIFwicHhcIjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoZm9ybVBvaW50Ll9hZGRQb2ludEVsZW1lbnQpIHtcbiAgICAgICAgICAgICAgICBmb3JtUG9pbnQuX2FkZFBvaW50RWxlbWVudC5hdHRhY2hFdmVudChcbiAgICAgICAgICAgICAgICAgICAgXCJvbmNsaWNrXCIsXG4gICAgICAgICAgICAgICAgICAgIChlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBNb3ZpbmcgZG93biBleGNsdXNpb25zIHBpY3RvXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB2YXIgZXhjbHVzaW9uc1BpY3RvVG9wID0gY29udGV4dC5fc2hvd1JvdXRlRXhjbHVzaW9uc0VsZW1lbnQuc3R5bGUudG9wO1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gY29udGV4dC5fc2hvd1JvdXRlRXhjbHVzaW9uc0VsZW1lbnQuc3R5bGUudG9wID0gKHBhcnNlSW50KGV4Y2x1c2lvbnNQaWN0b1RvcCwgMTApICsgMzMpLnRvU3RyaW5nKCkgKyBcInB4XCI7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcblxuICAgIC8vICMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj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AgICAgICAgICAgICAgeSA6IGVuZENvb3JkaW5hdGVbMV1cbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBsb2dnZXIubG9nKFwiZW5kXCIsIGVuZCk7XG4gICAgICAgIH1cblxuICAgICAgICAvLyAtIGxlcyDDqXRhcGVzXG4gICAgICAgIHZhciBzdGVwID0gW107XG4gICAgICAgIGZvciAodmFyIGkgPSAxOyBpIDwgcG9pbnRzLmxlbmd0aCAtIDE7IGkrKykge1xuICAgICAgICAgICAgaWYgKHBvaW50c1tpXSAmJiBwb2ludHNbaV0uZ2V0Q29vcmRpbmF0ZSkge1xuICAgICAgICAgICAgICAgIHZhciBpQ29vcmRpbmF0ZSA9IHBvaW50c1tpXS5nZXRDb29yZGluYXRlKCk7XG4gICAgICAgICAgICAgICAgaWYgKGlDb29yZGluYXRlKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBjb29yZGluYXRlID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgeCA6IGlDb29yZGluYXRlWzBdLFxuICAgICAgICAgICAgICAgICAgICAgICAgeSA6IGlDb29yZGluYXRlWzFdXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIGxvZ2dlci5sb2coXCJzdGVwXCIsIGNvb3JkaW5hdGUpO1xuICAgICAgICAgICAgICAgICAgICBzdGVwLnB1c2goY29vcmRpbmF0ZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gdmFsZXVycyBzZWxlY3Rpb25uw6llc1xuICAgICAgICB0aGlzLl9jdXJyZW50VHJhbnNwb3J0ID0gb3B0aW9ucy50cmFuc3BvcnQ7XG4gICAgICAgIHRoaXMuX2N1cnJlbnRDb21wdXRhdGlvbiA9IG9wdGlvbnMuY29tcHV0YXRpb247XG4gICAgICAgIHRoaXMuX2N1cnJlbnRFeGNsdXNpb25zID0gb3B0aW9ucy5leGNsdXNpb25zO1xuXG4gICAgICAg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dHMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoYk9uU3VjY2Vzcykge1xuICAgICAgICAgICAgICAgICAgICByb3V0ZU9wdGlvbnMub25TdWNjZXNzLmNhbGwoY29udGV4dCwgcmVzdWx0cyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIC8vIGNhbGxiYWNrIG9uRmFpbHVyZVxuICAgICAgICAgICAgb25GYWlsdXJlIDogZnVuY3Rpb24gKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgY29udGV4dC5faGlkZVdhaXRpbmdDb250YWluZXIoKTtcbiAgICAgICAgICAgICAgICBjb250ZXh0Ll9jbGVhclJvdXRlUmVzdWx0c0RldGFpbHMoKTtcbiAgICAgICAgICAgICAgICBsb2dnZXIubG9nKGVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgICAgICAgIGlmIChiT25GYWlsdXJlKSB7XG4gICAgICAgICAgICAgICAgICAgIHJvdXRlT3B0aW9ucy5vbkZhaWx1cmUuY2FsbChjb250ZXh0LCBlcnJvcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogdGhpcyBtZXRob2QgaXMgY2FsbGVkIGJ5IGV2ZW50ICdjbGljaycgb24gJ0dQbG9jYXRpb25PcmlnaW5MYWJlbCcgbGFiZWxcbiAgICAgKiBhbmQgc2V0ICdHUHJvdXRlRm9ybScgQ1NTIGNsYXNzIHRvIFwiXCIgKG5vcm1hbClcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7T2JqZWN0fSByb3V0ZUNvbnRyb2wgLSBjb250ZXh0IDogcm91dGUgQ29udHJvbCAodGhpcylcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqL1xuICAgIFJvdXRlLnByb3RvdHlwZS5vblJvdXRlT3JpZ2luTGFiZWxDbGljayA9IGZ1bmN0aW9uICgpIHt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3JtYWxcIiBzaSBvbiBlc3QgZGFucyBsZSBwYW5lbCBkZXMgcsOpc3VsdGF0cyAob8O5IGNsYXNzTmFtZSA9IFwiR1Byb3V0ZUNvbXBvbmVudEhpZGRlblwiKVxuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5fZm9ybVJvdXRlQ29udGFpbmVyLmNsYXNzTmFtZSA9PT0gXCJHUHJvdXRlRm9ybU1pbmlcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fZm9ybVJvdXRlQ29udGFpbmVyLmNsYXNzTmFtZSA9IFwiXCI7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgb2xPYnNlcnZhYmxlVW5CeUtleSh0aGlzLmxpc3RlbmVyS2V5KTtcbiAgICAgICAgICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgICAgICAgICogZXZlbnQgdHJpZ2dlcmVkIGF0IHRoZSBlbmQgb2YgZHJhd2luZyBpbnB1dFxuICAgICAgICAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgICAgICAgICogQGV2ZW50IHJvdXRlOmRyYXdlbmRcbiAgICAgICAgICAgICAgICAgICAgKi9cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5kaXNwYXRjaEV2ZW50KFwicm91dGU6ZHJhd2VuZFwiKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAqIGV2ZW50IHRyaWdnZXJlZCBhdCB0aGUgc3RhcnQgb2YgZHJhd2luZyBpbnB1dFxuICAgICAgICAgICAgKlxuICAgICAgICAgICAgKiBAZXZlbnQgcm91dGU6ZHJhd3N0YXJ0XG4gICAgICAgICAgICAqL1xuICAgICAgICAgICAgdGhpcy5kaXNwYXRjaEV2ZW50KFwicm91dGU6ZHJhd3N0YXJ0XCIpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgLy8gc2kgb24gZMOpc2VsZWN0a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amVjdGlvbiBkZSBsYSBjYXJ0ZSAoYmJveCBpbml0aWFsZW1lbnQgZW4gRVBTRzo0MzI2KVxuICAgICAgICAgICAgdmFyIG1hcFByb2ogPSBtYXAuZ2V0VmlldygpLmdldFByb2plY3Rpb24oKS5nZXRDb2RlKCk7XG4gICAgICAgICAgICBpZiAobWFwUHJvaiAhPT0gXCJFUFNHOjQzMjZcIikge1xuICAgICAgICAgICAgICAgIGJvdW5kcyA9IG9sVHJhbnNmb3JtRXh0ZW50UHJvaihib3VuZHMsIFwiRVBTRzo0MzI2XCIsIG1hcFByb2opO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbWFwLmdldFZpZXcoKS5maXQoYm91bmRzLCBtYXAuZ2V0U2l6ZSgpKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIHNhdXZlZ2FyZGUgZGUgbCdldGF0IGRlcyByZXN1bHRhdHNcbiAgICAgICAgdGhpcy5fY3VycmVudFJvdXRlSW5mb3JtYXRpb25zID0gcmVzdWx0cztcblxuICAgICAgICAvKipcbiAgICAgICAgICogZXZlbnQgdHJpZ2dlcmVkIHdoZW4gdGhlIGNvbXB1dGUgaXMgZmluaXNoZWRcbiAgICAgICAgICpcbiAgICAgICAgICogQGV2ZW50IHJvdXRlOmNvbXB1dGVcbiAgICAgICAgICogQHByb3BlcnR5IHtPYmplY3R9IHR5cGUgLSBldmVudFxuICAgICAgICAgKiBAcHJvcGVydHkge09iamVjdH0gdGFyZ2V0IC0gaW5zdGFuY2UgUm91dGVcbiAgICAgICAgICogQGV4YW1wbGVcbiAgICAgICAgICogUm91dGUub24oXCJyb3V0ZTpjb21wdXRlXCIsIGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAqICAgY29uc29sZS5sb2coZS50YXJnZXQuZ2V0RGF0YSgpKTtcbiAgICAgICAgICogfSlcbiAgICAgICAgICovXG4gICAgICAgIHRoaXMuZGlzcGF0Y2hFdmVudCh7XG4gICAgICAgICAgICB0eXBlIDogXCJyb3V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NvbGxlY3Rpb25cIixcbiAgICAgICAgICAgIGZlYXR1cmVzIDogW1xuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZSA6IFwiRmVhdHVyZVwiLFxuICAgICAgICAgICAgICAgICAgICBjcnMgOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlIDogXCJuYW1lXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0aWVzIDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWUgOiBcIkVQU0c6NDMyNlwiXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIGdlb21ldHJ5IDogZ2VvbWV0cnlcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICBdXG4gICAgICAgIH07XG5cbiAgICAgICAgdmFyIGdlb2pzb25mb3JtYXQgPSBuZXcgR2VvSlNPTkV4dGVuZGVkKHtcbiAgICAgICAgICAgIGRlZmF1bHREYXRhUHJvamVjdGlvbiA6IFwiRVBTRzo0MzI2XCIsXG4gICAgICAgICAgICBkZWZhdWx0U3R5bGUgOiBzdHlsZVxuXG4gICAgICAgIH0pO1xuICAgICAgICB2YXIgZmVhdHVyZXMgPSBnZW9qc29uZm9ybWF0LnJlYWRGZWF0dXJlcyhcbiAgICAgICAgICAgIGdlb2pzb25PYmplY3QsIHtcbiAgICAgICAgICAgICAgICBkYXRhUHJvamVjdGlvbiA6IFwiRVBTRzo0MzI2XCIsXG4gICAgICAgICAgICAgICAgZmVhdHVyZVByb2plY3Rpb24gOiBcIkVQU0c6Mzg1N1wiXG4gICAgICAgICAgICB9XG4gICAgICAgICk7XG5cbiAgICAgICAgLy8gYWpvdXQgZGUgbGEgZ8Opb23DqXRyaWUgY29tbWUgbm91dmVsbGUgY291Y2hlIHZlY3RldXIgw6AgbGEgY2FydGVcbiAgICAgICAgdGhpcy5fZ2VvanNvblJvdXR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ZlYXR1cmVDb2xsZWN0aW9uXCIsXG4gICAgICAgICAgICBjcnMgOiB7XG4gICAgICAgICAgICAgICAgdHlwZSA6IFwibmFtZVwiLFxuICAgICAgICAgICAgICAgIHByb3BlcnRpZXMgOiB7XG4gICAgICAgICAgICAgICAgICAgIG5hbWUgOiBcIkVQU0c6NDMyNlwiXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGZlYXR1cmVzIDogW11cbiAgICAgICAgfTtcblxuICAgICAgICAvLyAyLiBSZW1wbGlzc2FnZSBkZSBsJ29iamV0IGdlb0pTT04gOiBham91dCBkZXMgZ8Opb23DqXRyaWVzIGRlIGNoYXF1ZSBpbnN0cnVjdGlvblxuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGluc3RydWN0aW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIG8gPSBpbnN0cnVjdGlvbnNbaV07XG4gICAgICAgICAgICB2YXIgaWQgPSBpICsgMTtcblxuICAgICAgICAgICAgdmFyIGNvb3JkcyA9IG8uZ2VvbWV0cnkuY29vcmRpbmF0ZXM7XG4gICAgICAgICAgICBmb3IgKHZhciBqID0gMDsgaiA8IGNvb3Jkcy5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgICAgIC8vIHJlbWFycXVlIDogbGVzIGNvb3Jkb25uw6llcyBzb250IGF1IGZvcm1hdCBzdHJpbmcsIMOgIGNvbnZlcnRpciBlbiBub21icmVzXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBjb29yZHNbal1bMF0gPT09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgY29vcmRzW2pdWzBdID0gcGFyc2VGbG9hdChjb29yZHNbal1bMF0pO1xuICAgICAgICAgICAgICAgICAgICBjb29yZHNbal1bMV0gPSBwYXJzZUZsb2F0KGNvb3Jkc1tqXVsxXSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0aGlzLl9nZW9qc29uT2JqZWN0LmZlYXR1cmVzLnB1c2goe1xuICAgICAgICAgICAgICAgIHR5cGUgOiBcIkZlYXR1cmVcIixcbiAgICAgICAgICAgICAgICBnZW9tZXRyeSA6IG8uZ2VvbWV0cnksXG4gICAgICAgICAgICAgICAgcHJvcGVydGllcyA6IHtcbiAgICAgICAgICAgICAgICAgICAgcG9wdXBDb250ZW50IDogXCIoXCIgKyBpZCArIFwiKSBkaXN0YW5jZSA6IFwiICsgdGhpcy5fY29udmVydERpc3RhbmNlKG8uZGlzdGFuY2UpICtcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiIC8gdGVtcHMgOiBcIiArIHRoaXMuX2NvbnZlcnRTZWNvbmRzVG9UaW1lKG8uZHVyYXRpb24pXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBpZCA6IGlkXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEFqb3V0IGR1IHBvaW50IGRlIGRlcGFydCBkdSB0cmFjw6lcbiAgICAgICAgdGhpcy5fZ2VvanNvbk9iamVjdC5mZWF0dXJlcy5wdXNoKHtcbiAgICAgICAgICAgIHR5cGUgOiBcIkZlYXR1cmVcIixcbiAgICAgICAgICAgIGdlb21ldHJ5IDoge1xuICAgICAgICAgICAgICAgIHR5cGUgOiBcIlBvaW50XCIsXG4gICAgICAgICAgICAgICAgY29vcmRpbmF0ZXMgOiB0aGlzLl9jdXJyZW50UG9pbnRzWzBdLmdldENvb3JkaW5hdGUoKVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHByb3BlcnRpZXMgOiB7XG4gICAgICAgICAgICAgICAgZGVzY3JpcHRpb24gOiBcIlBvaW50IGRlIGTDqXBhcnRcIixcbiAgICAgICAgICAgICAgICBcIm1hcmtlci1zeW1ib2xcIiA6IHRoaXMub3B0aW9ucy5tYXJrZXJzT3B0cy5kZXBhcnR1cmUudXJsXG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIC8vIEFqb3V0IGRlcyBwb2ludHMgZCfDqXRhcGVzXG4gICAgICAgIGZvciAodmFyIGsgPSAxOyBrIDwgdGhpcy5fY3VycmVudFBvaW50cy5sZW5ndGggLSAxOyBrKyspIHtcbiAgICAgICAgICAgIGlmICh0aGlzLl9jdXJyZW50UG9pbnRzW2tdICYmIHRoaXMuX2N1cnJlbnRQb2ludHNba10uZ2V0Q29vcmRpbmF0ZSkge1xuICAgICAgICAgICAgICAgIHZhciBjb29yZGluYXRlcyA9IHRoaXMuX2N1cnJlbnRQb2ludHNba10uZ2V0Q29vcmRpbmF0ZSgpO1xuICAgICAgICAgICAgICAgIGlmIChjb29yZGluYXRlcykge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9nZW9qc29uT2JqZWN0LmZlYXR1cmVzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZSA6IFwiRmVhdHVyZVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgZ2VvbWV0cnkgOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZSA6IFwiUG9pbnRcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb29yZGluYXRlcyA6IGNvb3JkaW5hdGVzXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgcHJvcGVydGllcyA6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjcmlwdGlvbiA6IFwiUG9pbnQgZCfDqXRhcGVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIm1hcmtlci1zeW1ib2xcIiA6IHRoaXMub3B0aW9ucy5tYXJrZXJzT3B0cy5zdGFnZXMudXJsXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAg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0ZVxuICAgICAgICBtYXAuYWRkTGF5ZXIodGhpcy5fZ2VvanNvblNlY3Rpb25zKTtcblxuICAgICAgICAvLyA0LiBTaSB1biBsYXllciBzd2l0Y2hlciBlc3QgcHLDqXNlbnQgZGFucyBsYSBjYXJ0ZSwgb24gbHVpIGFmZmVjdGUgZGVzIGluZm9ybWF0aW9ucyBwb3VyIGNldHRlIGNvdWNoZVxuICAgICAgICBtYXAuZ2V0Q29udHJvbHMoKS5mb3JFYWNoKFxuICAgICAgICAgICAgKGNvbnRyb2wpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoY29udHJvbCBpbnN0YW5jZW9mIExheWVyU3dpdGNoZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gdW4gbGF5ZXIgc3dpdGNoZXIgZXN0IHByw6lzZW50IGRhbnMgbGEgY2FydGVcbiAgICAgICAgICAgICAgICAgICAgdmFyIGxheWVySWQgPSB0aGlzLl9nZW9qc29uU2VjdGlvbnMuZ3BMYXllcklkO1xuICAgICAgICAgICAgICAgICAgICAvLyBvbiBuJ2Fqb3V0ZSBkZXMgaW5mb3JtYXRpb25zIHF1ZSBzJ2lsIG4neSBlbiBhIHBhcyBkw6lqw6AgKHNpIGxlIHRpdHJlIGVzdCBsZSBudW3DqXJvIHBhciBkw6lmYXV0KVxuICAgICAgICAgICAgICAgICAgICBpZiAoY29udHJvbC5fbGF5ZXJzW2xheWVySWRdLnRpdGxlID09PSBsYXllcklkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sLmFkZExheWVyKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2dlb2pzb25TZWN0aW9ucywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZSA6IHRoaXMub3B0aW9ucy5sYXllckRlc2NyaXB0aW9uLnRpdGxlICsgXCIgKFwiICsgZ3JhcGggKyBcIilcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzY3Jpc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CJkaXZbaWRePVxcXCJHUGxvY2F0aW9uUG9pbnRcXFwiXVwiKTtcbiAgICAgICAgaWYgKHBvaW50cy5sZW5ndGggIT09IDApIHtcbiAgICAgICAgICAgIHZhciBnb29kUG9pbnRzID0gW107XG4gICAgICAgICAgICBmb3IgKHZhciBrID0gMDsgayA8IHBvaW50cy5sZW5ndGg7IGsrKykge1xuICAgICAgICAgICAgICAgIGlmIChwb2ludHNba10uaWQuaW5kZXhPZih0aGlzLl91aWQpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICBnb29kUG9pbnRzLnB1c2gocG9pbnRzW2tdKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBvbiBib3VjbGUgc3VyIGxlcyBwb2ludHMgaW50ZXJtw6lkaWFpcmVzXG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMTsgaSA8IChnb29kUG9pbnRzLmxlbmd0aCAtIDEpOyBpKyspIHtcbiAgICAgICAgICAgICAgICAvLyBvbiB2YSByZWdhcmRlciBsZXMgY2xhc3NlcyBhc3NvY2nDqWVzXG4gICAgICAgICAgICAgICAgdmFyIGNsYXNzTGlzdCA9IGdvb2RQb2ludHNbaV0uY2xhc3NMaXN0O1xuICAgICAgICAgICAgICAgIGlmIChjbGFzc0xpc3QubGVuZ3RoICE9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgY2xhc3NMaXN0Lmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY2xhc3NMaXN0W2pdID09PSBcIkdQbG9jYXRpb25TdGFnZUZsZXhJbnB1dFwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gc2kgbCfDqWzDqW1lbnQgZXN0IHZpc2libGUsIG9uIGxlIHN1cHByaW1lIGVuIHNpbXVsYW50IHVuIGNsaWMgc3VyIGxhIGNyb2l4ICh4KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHRoaXMuX2FkZFVJRChcIkdQbG9jYXRpb25TdGFnZVJlbW92ZV9cIiArIChpICsgMSkpKS5jbGljaygpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIHRoaXMgbWV0aG9kIGlzIGNhbGxlZCBieSB0aGlzLm9uUm91dGVDb21wdXRhdGlvblN1Ym1pdCgpIChpbiBjYXNlIG9mIGZhaWx1cmUpXG4gICAgICogYW5kIGl0IGNsZWFycyBhbGwgcm91dGUgaW5zdHJ1Y3Rpb25zLlxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBSb3V0ZS5wcm90b3R5cGUuX2NsZWFyUm91dGVSZXN1bHRzRGV0YWlscyA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdGhpcy5fY3VycmVudFJvdXRlSW5mb3JtYXRpb25zID0gbnVsbDtcblxuICAgICAgICAvLyBkb2l0IG9uIG5ldHRveWVyIGxlIGNvbnRhaW5lciBcIkdQcm91dGVSZXN1bHRzRGV0YWlsc1wiID9cbiAgICAgICAgLy8gaWwgc2VyYSBkZSB0b3V0ZSBmYcOnb24gw6ljcmFzw6kgcGFyIGxhIHByb2NoYWluZSByZXF1w6p0ZS4uLlxuICAgICAgICBpZiAodGhpcy5fcmVzdWx0c1JvdXRlRGV0YWlsc0NvbnRhaW5lcikge1xuICAgICAgICAgICAgdmFyIGRldGFpbHNEaXYgPSB0aGlzLl9yZXN1bHRzUm91dGVEZXRhaWxzQ29udGFpbmVyO1xuICAgICAgICAgICAgaWYgKGRldGFpbHNEaXYuY2hpbGRFbGVtZW50Q291bnQpIHtcbiAgICAgICAgICAgICAgICB3aGlsZSAoZGV0YWlsc0Rpdi5maXJzdENoaWxk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6hyZSBsZSBudW3DqXJvIGR1IHBvaW50XG4gICAgICAgICAgICB2YXIgcG9pbnRJZCA9IHBhcnNlSW50KGUudGFyZ2V0LmlkLnNwbGl0KFwiX1wiKVsxXVswXSwgMTApIC0gMTtcbiAgICAgICAgICAgIC8vIGV0IG9uIGNhY2hlIGxlcyBhdXRyZXMgcsOpc3VsdGF0cyBkJ2F1dG9jb21wbMOpdGlvbiAoc2F1ZiBjZWx1aSBzdXIgbGVxdWVsIG9uIGNsaXF1ZSlcbiAgICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgdGhpcy5fY3VycmVudFBvaW50cy5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgICAgIGlmIChqICE9PSBwYXJzZUludChwb2ludElkLCAxMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudFBvaW50c1tqXS5faGlkZVN1Z2dlc3RlZExvY2F0aW9uKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgLy8gc2kgb24gY2xpcXVlIGFpbGxldXJzIGRhbnMgbGUgRE9NIGR1IGNvbnRyb2wsIG9uIGNhY2hlIHRvdXMgbGVzIHLDqXN1bHRhdHMgZCdhdXRvY29tcGzDqXRpb25cbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGhpcy5fY3VycmVudFBvaW50cy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRQb2ludHNbaV0uX2hpZGVTdWdnZXN0ZWRMb2NhdGlvbigpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIHRoaXMgbWV0aG9kIGRpc3BsYXlzIHdhaXRpbmcgY29udGFpbmVyIGFuZCBzZXRzIGEgdGltZW91dFxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBSb3V0ZS5w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AgICAgICBpZiAoY29udGV4dC5fdGltZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dChjb250ZXh0Ll90aW1lcik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LCAxNjAwMCk7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogdGhpcyBtZXRob2QgaGlkZXMgd2FpdGluZyBjb250YWluZXIgYW5kIGNsZWFycyB0aW1lb3V0XG4gICAgICpcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqL1xuICAgIFJvdXRlLnByb3RvdHlwZS5faGlkZVdhaXRpbmdDb250YWluZXIgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIGlmICh0aGlzLl93YWl0aW5nKSB7XG4gICAgICAgICAgICB0aGlzLl93YWl0aW5nQ29udGFpbmVyLmNsYXNzTmFtZSA9IFwiR1Byb3V0ZUNhbGNXYWl0aW5nQ29udGFpbmVySGlkZGVuXCI7XG4gICAgICAgICAgICB0aGlzLl93YWl0aW5nID0gZmFsc2U7XG4gICAgICAgICAgICB2YXIgb3B0cyA9IHRoaXMub3B0aW9ucy5yb3V0ZU9wdGlvbnM7XG4gICAgICAgICAgICBpZiAob3B0cyAmJiBvcHRzLnRpbWVPdXQpIHtcbiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGhpcy5fdGltZXIpO1xuICAgICAgICAgICAgICAgIHRoaXMuX3RpbWVyID0gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH07XG5cbiAgICAvLyAjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIC8vXG4gICAgLy8gIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMgR2VvbWV0cnkgIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy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ICAgICAgICAgICAgY3VycmVudC5kdXJhdGlvbiA9IChwYXJzZUZsb2F0KG8uZHVyYXRpb24pICsgcGFyc2VGbG9hdChjdXJyZW50LmR1cmF0aW9uKSkudG9TdHJpbmcoKTtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBqID0gMTsgaiA8IG8uZ2VvbWV0cnkuY29vcmRpbmF0ZXMubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgICAgICAgICAgY3VycmVudC5nZW9tZXRyeS5jb29yZGluYXRlcy5wdXNoKG8uZ2VvbWV0cnkuY29vcmRpbmF0ZXNbal0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbmV3SW5zdHJ1Y3Rpb25zLnB1c2goY3VycmVudCk7XG4gICAgICAgICAgICAgICAgY3VycmVudCA9IG87XG4gICAgICAgICAgICAgICAgLy8gbGFzdFxuICAgICAgICAgICAgICAgIGlmIChpID09PSBpbnN0cnVjdGlvbnMubGVuZ3RoIC0gMSkge1xuICAgICAgICAgICAgICAgICAgICBuZXdJbnN0cnVjdGlvbnMucHVzaChvKTtcbiAgICAgICAgICAgICAgICAgICAgY3VycmVudCA9IG51bGw7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGxvZ2dlci5sb2cobmV3SW5zdHJ1Y3Rpb25zKTtcbiAgICAgICAgcmV0dXJuIG5ld0luc3RydWN0aW9ucztcbiAgICB9O1xuXG4gICAgLy8gIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyAvL1xuICAgIC8vICMjIyMjIyMjIyMjIyMjIyMjIFV0aWxzIGZvciBEaXN0YW5jZS9EdXJhdGlvbiAjIyMjIyMjIyMjIyMjIyMjIyMjIyMgLy9cbiAgICAvLyAjIyMjIyMjIyMjIyMjIyMjIyM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5cbiAgICAgICAgaWYgKGhvdXJzKSB7XG4gICAgICAgICAgICB0aW1lID0gaG91cnMgKyBcImggXCI7XG4gICAgICAgIH1cbiAgICAgICAgdGltZSArPSBtaW51dGVzICsgXCIgbWluXCI7XG4gICAgICAgIHJldHVybiB0aW1lO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBjb252ZXJ0IGRpc3RhbmNlIGluIG1ldGVycyBvciBraWxvbWV0ZXJzXG4gICAgICpcbiAgICAgKiBAcGFyYW0ge051bWJlcn0gZGlzdGFuY2UgLSBkaXN0YW5jZSBpbiBtZXRlcnNcbiAgICAgKlxuICAgICAqIEByZXR1cm5zIHtTdHJpbmd9IGRpc3RhbmNlIGluIGttXG4gICAgICpcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqL1xuICAgIFJvdXRlLnByb3RvdHlwZS5fY29udmVydERpc3RhbmNlID0gZnVuY3Rpb24gKGRpc3RhbmNlKSB7XG4gICAgICAgIHZhciBkID0gXCJcIjtcblxuICAgICAgICB2YXIgZGlzdGFuY2VLbSA9IHBhcnNlSW50KGRpc3RhbmNlIC8gMTAwMCwgMTApO1xuICAgICAgICBpZiAoIWRpc3RhbmNlS20pIHtcbiAgICAgICAgICAgIGQgPSBwYXJzZUludChkaXN0YW5jZSwgMTApICsgXCIgbVwiOyAvLyBhcnJvbmRpICFcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGQgPSBkaXN0YW5jZUttICsgXCIga21cIjtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBkO1xuICAgIH07XG5cbiAgICByZXR1cm4gUm91dGU7XG59KENvbnRyb2wpKTtcblxuZXhwb3J0IGRlZmF1bHQgUm91dGU7XG5cbi8vIEV4cG9zZSBSb3V0ZSBhcyBvbC5jb250cm9sLlJvdXRlIChmb3IgYSBidWlsZCBidW5kbGUpXG5pZiAod2luZG93Lm9sICYmIHdpbmRvdy5vbC5jb250cm9sKSB7XG4gICAgd2luZG93Lm9sLmNvbnRyb2wuUm91dGUgPSBSb3V0ZTtcbn1cbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/OpenLayers/Controls/Route.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CSS_Controls_Route_GProuteOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../CSS/Controls/Route/GProuteOpenLayers.css */ \"./src/OpenLayers/CSS/Controls/Route/GProuteOpenLayers.css\");\n/* harmony import */ var _CSS_Controls_Route_GProuteOpenLayers_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_Route_GProuteOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ol/control/Control */ \"ol/control/Control\");\n/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_control_Control__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ol/Observable */ \"ol/Observable\");\n/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ol_Observable__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ol/Overlay */ \"ol/Overlay\");\n/* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ol_Overlay__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ol/layer/Vector */ \"ol/layer/Vector\");\n/* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(ol_layer_Vector__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var ol_source_Vector__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ol/source/Vector */ \"ol/source/Vector\");\n/* harmony import */ var ol_source_Vector__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(ol_source_Vector__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var ol_events_condition__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ol/events/condition */ \"ol/events/condition\");\n/* harmony import */ var ol_events_condition__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(ol_events_condition__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var ol_interaction__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ol/interaction */ \"ol/interaction\");\n/* harmony import */ var ol_interaction__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(ol_interaction__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ol/style */ \"ol/style\");\n/* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(ol_style__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ol/proj */ \"ol/proj\");\n/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(ol_proj__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! geoportal-access-lib */ \"./node_modules/geoportal-access-lib/src/Gp.js\");\n/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Common/Utils/LoggerByDefault */ \"./src/Common/Utils/LoggerByDefault.js\");\n/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Common/Utils */ \"./src/Common/Utils.js\");\n/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Common/Utils/SelectorID */ \"./src/Common/Utils/SelectorID.js\");\n/* harmony import */ var _Utils_Markers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Utils/Markers */ \"./src/OpenLayers/Controls/Utils/Markers.js\");\n/* harmony import */ var _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../Common/Utils/Draggable */ \"./src/Common/Utils/Draggable.js\");\n/* harmony import */ var _Utils_Interactions__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Utils/Interactions */ \"./src/OpenLayers/Controls/Utils/Interactions.js\");\n/* harmony import */ var _LocationSelector__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./LocationSelector */ \"./src/OpenLayers/Controls/LocationSelector.js\");\n/* harmony import */ var _Export__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Export */ \"./src/OpenLayers/Controls/Export.js\");\n/* harmony import */ var _LayerSwitcher__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./LayerSwitcher */ \"./src/OpenLayers/Controls/LayerSwitcher.js\");\n/* harmony import */ var _Formats_GeoJSON__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../Formats/GeoJSON */ \"./src/OpenLayers/Formats/GeoJSON.js\");\n/* harmony import */ var _Common_Controls_RouteDOM__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../Common/Controls/RouteDOM */ \"./src/Common/Controls/RouteDOM.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n// import CSS\n\n// import OpenLayers\n\n\n\n\n\n// import GeoJSON from \"ol/format/GeoJSON\";\n\n\n\n\n// import geoportal library access\n\n// import local\n\n\n\n\n\n\n// import local with ol dependencies\n\n\n\n\n// DOM\n\nvar logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_11__[\"default\"].getLogger(\"route\");\n\n/**\n * @classdesc\n *\n * Route Control.\n *\n * @constructor\n * @alias ol.control.Route\n * @type {ol.control.Route}\n * @extends {ol.control.Control}\n * @param {Object} options - route control options\n * @param {String} [options.apiKey] - API key for services call (route and autocomplete services). The key \"calcul\" is used by default.\n * @param {Boolean} [options.ssl = true] - use of ssl or not (default true, service requested using https protocol)\n * @param {Boolean} [options.collapsed = true] - Specify if widget has to be collapsed (true) or not (false) on map loading. Default is true.\n * @param {Boolean} [options.draggable = false] - Specify if widget is draggable\n * @param {Boolean|Object} [options.export = false] - Specify if button \"Export\" is displayed. For the use of the options of the \"Export\" control, see {@link ol.control.Export}\n * @param {Object} [options.exclusions = {\"toll\" : false, \"tunnel\" : false, \"bridge\" : false}] - list of exclusions with status (true = checked). By default : no exclusions checked.\n * @param {Array} [options.graphs = [\"Voiture\", \"Pieton\"]] - list of resources, by default : [\"Voiture\", \"Pieton\"]. The first element is selected.\n * @param {Object} [options.routeOptions = {}] - route service options. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~route Gp.Services.route()} to know all route options.\n * @param {Object} [options.autocompleteOptions = {}] - autocomplete service options. see {@link http://ignf.github.io/geoportal-access-lib/latest/jsdoc/module-Services.html#~autoComplete Gp.Services.autoComplete()} to know all autocomplete options\n * @param {Object} [options.markersOpts] - options to use your own markers. Object properties can be \"departure\", \"stages\" or \"arrival\". Corresponding value is an object with following properties :\n * @param {String} [options.markersOpts.url] - marker base64 encoded url (ex \"data:image/png;base64,...\"\"). Mandatory for a custom marker\n * @param {Array} [options.markersOpts.offset] - 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. Default is [0, 0]. (see http://openlayers.org/en/latest/apidoc/ol.Overlay.html)\n * @param {Object} [options.layerDescription = {}] - Layer informations to be displayed in LayerSwitcher widget (only if a LayerSwitcher is also added to the map)\n * @param {String} [options.layerDescription.title = \"Itinéraire\"] - Layer title to be displayed in LayerSwitcher\n * @param {String} [options.layerDescription.description = \"Itinéraire basé sur un graphe\"] - Layer description to be displayed in LayerSwitcher\n * @fires route:drawstart\n * @fires route:drawend\n * @fires route:compute\n * @fires export:compute\n * @example\n * var route = ol.control.Route({\n * \"collapsed\" : true\n * \"draggable\" : true,\n * \"export\" : false,\n * \"exclusions\" : {\n * \"toll\" : true,\n * \"bridge\" : false,\n * \"tunnel\" : true\n * },\n * \"graphs\" : ['Pieton', 'Voiture'],\n * \"markersOpts\" : {\n * \"departure\" : {\n * \"url\" : \"...\",\n * \"offset\" : [0,0]\n * },\n * \"stages\" : {\n * \"url\" : \"...\",\n * \"offset\" : [0,0]\n * },\n * \"arrival\" : {\n * \"url\" : \"...\",\n * \"offset\" : [0,0]\n * }\n * }\n * \"autocompleteOptions\" : {},\n * \"routeOptions\" : {}\n * });\n *\n * // if you want to pluggued the control Export with options :\n * var route = new ol.control.Route({\n * export : {\n * name : \"export\",\n * format : \"geojson\",\n * title : \"Exporter\",\n * menu : false\n * }\n * });\n */\nvar Route = function (Control) {\n /**\n * See {@link ol.control.Route}\n * @module Route\n * @alias module:~Controls/Route\n * @param {*} options - options\n * @example\n * import Route from \"src/OpenLayers/Controls/Route\"\n */\n function Route(options) {\n options = options || {};\n if (!(this instanceof Route)) {\n throw new TypeError(\"ERROR CLASS_CONSTRUCTOR\");\n }\n\n // initialisation du composant\n this.initialize(options);\n\n // Widget main DOM container\n this._container = this._createMainContainerElement();\n this._containerElement = null;\n\n // on peut éventuellement encapsuler le composant dans une div passée par l'utilisateur\n if (options.element && options.element.appendChild) {\n // dans ce cas on stocke les deux container\n options.element.appendChild(this._container);\n this._containerElement = options.element;\n }\n\n // call ol.control.Control constructor\n Control.call(this, {\n element: this._containerElement || this._container,\n target: options.target,\n render: options.render\n });\n }\n\n // Inherits from ol.control.Control\n if (Control) Route.__proto__ = Control;\n\n /**\n * @lends module:Route\n */\n Route.prototype = Object.create(Control.prototype, {});\n\n // on récupère les méthodes de la classe commune RouteDOM\n _Common_Utils__WEBPACK_IMPORTED_MODULE_12__[\"default\"].assign(Route.prototype, _Common_Controls_RouteDOM__WEBPACK_IMPORTED_MODULE_21__[\"default\"]);\n\n /**\n * Constructor (alias)\n * @private\n */\n Route.prototype.constructor = Route;\n\n /**\n * Overwrite OpenLayers setMap method\n *\n * @param {ol.Map} map - Map.\n */\n Route.prototype.setMap = function (map) {\n if (map) {\n // enrichissement du DOM du container\n this._container = this._initContainer(map);\n\n // ajout d'un bouton d'export\n if (this.options[\"export\"]) {\n var opts = _Common_Utils__WEBPACK_IMPORTED_MODULE_12__[\"default\"].assign({\n control: this\n }, this.options[\"export\"]);\n this[\"export\"] = new _Export__WEBPACK_IMPORTED_MODULE_18__[\"default\"](opts);\n this[\"export\"].render();\n var self = this;\n this[\"export\"].on(\"export:compute\", function (e) {\n self.dispatchEvent({\n type: \"export:compute\",\n content: e.content\n });\n });\n }\n\n // mode \"draggable\"\n if (this.draggable) {\n _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_15__[\"default\"].dragElement(this._panelRouteContainer, this._panelHeaderRouteContainer, map.getTargetElement());\n }\n }\n\n // on appelle la méthode setMap originale d'OpenLayers\n Control.prototype.setMap.call(this, map);\n };\n\n // ################################################################### //\n // ##################### public methods ############################## //\n // ################################################################### //\n\n /**\n * Returns true if widget is collapsed (minimized), false otherwise\n *\n * @returns {Boolean} collapsed - true if widget is collapsed\n */\n Route.prototype.getCollapsed = function () {\n return this.collapsed;\n };\n\n /**\n * Collapse or display widget main container\n *\n * @param {Boolean} collapsed - True to collapse widget, False to display it\n */\n Route.prototype.setCollapsed = function (collapsed) {\n if (collapsed === undefined) {\n logger.log(\"[ERROR] Route:setCollapsed - missing collapsed parameter\");\n return;\n }\n if (collapsed && this.collapsed || !collapsed && !this.collapsed) {\n return;\n }\n if (collapsed) {\n document.getElementById(\"GProutePanelClose-\" + this._uid).click();\n } else {\n document.getElementById(\"GPshowRoute-\" + this._uid).click();\n }\n this.collapsed = collapsed;\n };\n\n /**\n * Get vector layer where geoJson route is drawn\n *\n * @returns {Object} layer - ol.layer.Vector route layer\n */\n Route.prototype.getLayer = function () {\n return this._geojsonSections;\n };\n\n /**\n * Set vector layer where route geometry is drawn\n *\n * @param {Object} layer - ol.layer.Vector route layer\n */\n Route.prototype.setLayer = function (layer) {\n if (!layer) {\n this._geojsonSections = null;\n return;\n }\n if (!(layer instanceof ol_layer_Vector__WEBPACK_IMPORTED_MODULE_4___default.a)) {\n logger.log(\"no valid layer given for hosting drawn features.\");\n return;\n }\n\n // application des styles\n layer.setStyle(this._defaultFeatureStyle);\n // sauvegarde\n this._geojsonSections = layer;\n };\n\n /**\n * Get vector layer\n *\n * @returns {String} geojson - GeoJSON format layer\n */\n Route.prototype.getGeoJSON = function () {\n return JSON.stringify(this._geojsonObject);\n };\n\n /**\n * Set vector layer\n *\n * @param {String} geojson - GeoJSON format layer\n */\n Route.prototype.setGeoJSON = function (geojson) {\n try {\n this._geojsonObject = JSON.parse(geojson);\n } catch (e) {\n logger.log(\"no valid geojson given :\" + e.message);\n }\n };\n\n /**\n * Get route informations\n *\n * @returns {Object} data - route informations\n */\n Route.prototype.getData = function () {\n var points = [];\n for (var index = 0; index < this._currentPoints.length; index++) {\n var p = this._currentPoints[index];\n points.push(p.getCoordinate());\n }\n var data = {\n type: \"route\",\n points: points,\n transport: this._currentTransport,\n exclusions: this._currentExclusions,\n computation: this._currentComputation,\n results: {}\n };\n _Common_Utils__WEBPACK_IMPORTED_MODULE_12__[\"default\"].assign(data.results, this._currentRouteInformations);\n return data;\n };\n\n /**\n * Set route data\n *\n * @param {Object} data - control informations\n * @param {String} data.transport - transport type\n * @param {String} data.computation - computation type\n * @param {Array} data.exclusions - list of exclusions\n * @param {Array} data.points - list of points : [[lon, lat]]\n * @param {Object} data.results - service response\n */\n Route.prototype.setData = function (data) {\n // INFO\n // transmettre toutes les informations necessaires pour reconstruire le panneau de resultats\n this._currentTransport = data.transport;\n this._currentComputation = data.computation;\n this._currentExclusions = data.exclusions;\n // INFO\n // nettoyer les points du calcul précedent\n for (var i = 0; i < this._currentPoints.length; i++) {\n var point = this._currentPoints[i];\n if (point.getCoordinate()) {\n // clean de l'objet sans declencher les evenements qui suppriment la couche précedente !\n // /!\\ point.clear()\n point.clearResults();\n // clean du dom\n var id = i + 1 + \"-\" + this._uid;\n document.getElementById(\"GPlocationOriginCoords_\" + id).value = \"\";\n document.getElementById(\"GPlocationOrigin_\" + id).value = \"\";\n document.getElementById(\"GPlocationPoint_\" + id).style.cssText = \"\";\n if (i > 0 && i < 6) {\n // on masque les points intermediaires\n document.getElementById(\"GPlocationPoint_\" + id).className = \"GPflexInput GPlocationStageFlexInputHidden\";\n }\n document.getElementById(\"GPlocationOriginPointer_\" + id).checked = false;\n document.getElementById(\"GPlocationOrigin_\" + id).className = \"GPlocationOriginVisible\";\n document.getElementById(\"GPlocationOriginCoords_\" + id).className = \"GPlocationOriginHidden\";\n }\n }\n // ajout des nouvelles coordonnnées\n for (var j = 0; j < data.points.length; j++) {\n var c = data.points[j];\n if (c) {\n this._currentPoints[j].setCoordinate(c, \"EPSG:4326\");\n }\n }\n this._currentRouteInformations = data.results;\n };\n\n /**\n * Get container\n *\n * @returns {DOMElement} container\n */\n Route.prototype.getContainer = function () {\n return this._container;\n };\n\n /**\n * Get default style\n *\n * @returns {ol.style} style\n */\n Route.prototype.getStyle = function () {\n return this._defaultFeatureStyle;\n };\n\n /**\n * This method is public.\n * It allows to init the control.\n */\n Route.prototype.init = function () {\n // INFO\n // reconstruire le panneau de resultats sans lancer de calcul\n // * construire la liste des points (cf. RouteDOM._createRoutePanelFormElement())\n // * construire les resultats\n\n // init points\n for (var index = 0; index < this._currentPoints.length; index++) {\n var point = this._currentPoints[index];\n var id = index + 1;\n var coordinate = point.getCoordinate();\n if (coordinate) {\n var input = document.getElementById(\"GPlocationOrigin_\" + id + \"-\" + this._uid);\n input.value = coordinate[1].toFixed(4) + \" / \" + coordinate[0].toFixed(4);\n if (index > 0 && index < 6) {\n document.getElementById(\"GPlocationPoint_\" + id + \"-\" + this._uid).className = \"GPflexInput GPlocationStageFlexInput\";\n }\n }\n }\n\n // add points into panel\n var points = document.getElementsByClassName(\"GPlocationPoint-\" + this._uid);\n this._addRouteResultsStagesValuesElement(points);\n\n // set transport mode\n var transportdiv;\n if (this._currentTransport === \"Pieton\") {\n transportdiv = document.getElementById(\"GProuteTransportPedestrian-\" + this._uid);\n if (transportdiv) {\n transportdiv.checked = \"true\";\n }\n } else {\n transportdiv = document.getElementById(\"GProuteTransportCar-\" + this._uid);\n if (transportdiv) {\n transportdiv.checked = \"true\";\n }\n }\n\n // set computation mode\n var computationdiv = document.getElementById(\"GProuteComputationSelect-\" + this._uid);\n if (computationdiv) {\n computationdiv.value = this._currentComputation;\n }\n\n // set exclusions\n var tollInput = document.getElementById(\"GProuteExclusionsToll-\" + this._uid);\n if (tollInput) {\n if (this._currentExclusions.indexOf(\"toll\") !== -1) {\n tollInput.checked = false;\n } else {\n tollInput.checked = true;\n }\n }\n var tunnelInput = document.getElementById(\"GProuteExclusionsTunnel-\" + this._uid);\n if (tunnelInput) {\n if (this._currentExclusions.indexOf(\"tunnel\") !== -1) {\n tunnelInput.checked = false;\n } else {\n tunnelInput.checked = true;\n }\n }\n var bridgeInput = document.getElementById(\"GProuteExclusionsBridge-\" + this._uid);\n if (bridgeInput) {\n if (this._currentExclusions.indexOf(\"bridge\") !== -1) {\n bridgeInput.checked = false;\n } else {\n bridgeInput.checked = true;\n }\n }\n var distance = this._currentRouteInformations.totalDistance;\n var duration = this._currentRouteInformations.totalTime;\n\n // Détails avec simplifications des troncons\n var instructions = this._simplifiedInstructions(this._currentRouteInformations.routeInstructions);\n if (instructions) {\n this._fillRouteResultsDetailsContainer(distance, duration, instructions);\n }\n\n // affichage du panneau de details du controle !\n this._formRouteContainer.className = \"GProuteComponentHidden\";\n this._hideWaitingContainer();\n this._resultsRouteContainer.className = \"\";\n };\n\n /**\n * Clean UI : reinit control\n */\n Route.prototype.clean = function () {\n this._currentTransport = null;\n this._currentExclusions = [];\n this._currentComputation = null;\n for (var i = 0; i < this._currentPoints.length; i++) {\n this._currentPoints[i].clear();\n }\n this._removeRouteStepLocations();\n this._clearRouteInputOptions();\n this._clearRouteResultsDetails();\n this.setLayer();\n this._formRouteContainer.className = \"\";\n this._resultsRouteContainer.className = \"GProuteComponentHidden\";\n };\n\n // ################################################################### //\n // ##################### init component ############################## //\n // ################################################################### //\n\n /**\n * Initialize route control (called by Route constructor)\n *\n * @param {Object} options - constructor options\n * @private\n */\n Route.prototype.initialize = function (options) {\n this._checkInputOptions(options);\n\n // set default options\n this.options = {\n collapsed: true,\n draggable: false,\n \"export\": false,\n graphs: [\"Voiture\", \"Pieton\"],\n exclusions: {\n toll: false,\n tunnel: false,\n bridge: false\n },\n routeOptions: {\n oldRouteService: true\n },\n autocompleteOptions: {},\n layerDescription: {\n title: \"Itinéraire\",\n description: \"Itinéraire basé sur un graphe\"\n }\n };\n\n // merge with user options\n _Common_Utils__WEBPACK_IMPORTED_MODULE_12__[\"default\"].assign(this.options, options);\n\n // cas particulier des markers par défaut\n var defaultMarkersOpts = {\n departure: {\n url: _Utils_Markers__WEBPACK_IMPORTED_MODULE_14__[\"default\"][\"red\"],\n offset: _Utils_Markers__WEBPACK_IMPORTED_MODULE_14__[\"default\"].defaultOffset\n },\n stages: {\n url: _Utils_Markers__WEBPACK_IMPORTED_MODULE_14__[\"default\"][\"lightOrange\"],\n offset: _Utils_Markers__WEBPACK_IMPORTED_MODULE_14__[\"default\"].defaultOffset\n },\n arrival: {\n url: _Utils_Markers__WEBPACK_IMPORTED_MODULE_14__[\"default\"][\"darkOrange\"],\n offset: _Utils_Markers__WEBPACK_IMPORTED_MODULE_14__[\"default\"].defaultOffset\n }\n };\n // on récupère les options de chaque type de marker si spécifié\n this.options.markersOpts = _Common_Utils__WEBPACK_IMPORTED_MODULE_12__[\"default\"].assign(defaultMarkersOpts, options.markersOpts);\n\n /** {Boolean} specify if Route control is collapsed (true) or not (false) */\n this.collapsed = this.options.collapsed;\n\n /** {Boolean} specify if Route control is draggable (true) or not (false) */\n this.draggable = this.options.draggable;\n this._uid = _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_13__[\"default\"].generate();\n\n // containers principaux\n this._panelRouteContainer = null;\n this._panelHeaderRouteContainer = null;\n this._waitingContainer = null;\n this._formRouteContainer = null;\n this._resultsRouteContainer = null;\n this._showRouteExclusionsElement = null;\n\n // liste de points selectionnée\n this._currentPoints = [];\n\n // Mode de transport selectionné : 'Voiture' ou 'Pieton'\n this._currentTransport = null;\n this._initTransport();\n\n // Mode de calcul selectionné : 'Plus rapide' ou 'plus court'\n this._currentComputation = null;\n this._initComputation();\n\n // Exclusions selectionnées : Tunnel, Toll et Bridge\n this._currentExclusions = [];\n this._initExclusions();\n\n // si un calcul est en cours ou non\n this._waiting = false;\n // timer pour cacher la patience après un certain temps\n this._timer = null;\n\n // la geometrie du parcours\n this._geojsonRoute = null;\n\n // la geometrie des troncons\n this._geojsonSections = null;\n\n // la geometrie des troncons au format GeoJSON\n this._geojsonObject = null;\n\n // bouton export\n this[\"export\"] = null;\n\n // le container de la popup (pour les troncons selectionnés)\n this._popupContent = null;\n this._popupDiv = this._initPopupDiv();\n // l'overlay ol.Overlay correspondant à la popup (pour les troncons selectionnés)\n this._popupOverlay = null;\n\n // ol.interaction.Select associées à la couche des résultats (troncons)\n this._resultsSelectInteraction = null;\n this._resultsHoverInteraction = null;\n\n // styles pour les sélections des features\n this._defaultFeatureStyle = new ol_style__WEBPACK_IMPORTED_MODULE_8__[\"Style\"]({\n stroke: new ol_style__WEBPACK_IMPORTED_MODULE_8__[\"Stroke\"]({\n color: \"rgba(0,183,152,0.9)\",\n width: 12\n })\n });\n this._selectedFeatureStyle = new ol_style__WEBPACK_IMPORTED_MODULE_8__[\"Style\"]({\n stroke: new ol_style__WEBPACK_IMPORTED_MODULE_8__[\"Stroke\"]({\n color: \"rgba(255,102,0,0.9)\",\n width: 12\n })\n });\n\n // reponse du service\n // Ex. {\n // totalTime, totalDistance, bbox, routeGeometry,\n // routeInstructions : [{duration, distance, code, instruction, bbox, geometry}]\n // }\n this._currentRouteInformations = null;\n\n // liste des ressources avec droits par service\n // Ex. {\n // \"Route\" : {\n // key : \"ger4g456re45er456t4er5ge5\",\n // resources : [\"Pieton\", \"Voiture\"]\n // }\n // }\n this._resources = {};\n\n // listener key for event on pointermove or moveend map\n this.listenerKey = null;\n };\n\n /**\n * this method is called by this.initialize()\n *\n * @param {Object} options - options\n *\n * @private\n */\n Route.prototype._checkInputOptions = function (options) {\n // vérification des options\n // mode de transport\n if (options.graphs) {\n // on ne permet pas de passer un tableau vide : on spécifie au moins un graph\n if (Array.isArray(options.graphs) && options.graphs.length) {\n for (var i = 0; i < options.graphs.length; i++) {\n if (typeof options.graphs[i] === \"string\") {\n if (options.graphs[i].toLowerCase() === \"pieton\") {\n options.graphs[i] = \"Pieton\";\n }\n if (options.graphs[i].toLowerCase() === \"voiture\") {\n options.graphs[i] = \"Voiture\";\n }\n } else {\n logger.log(\"[ol.control.Route] ERROR : parameter 'graphs' elements should be of type 'string'\");\n options.graphs[i] = null;\n }\n }\n } else {\n logger.warn(\"'graphs' parameter should be an array\");\n options.graphs = null;\n }\n }\n\n // collapsed\n if (options.collapsed === \"true\") {\n options.collapsed = true;\n }\n if (options.collapsed === \"false\") {\n options.collapsed = false;\n }\n };\n\n /**\n * initialize component container (DOM)\n *\n * @param {Object} map - the map\n *\n * @returns {DOMElement} DOM element\n *\n * @private\n */\n Route.prototype._initContainer = function (map) {\n var _this = this;\n // get main container\n var container = this._container;\n var inputShow = this._showRouteContainer = this._createShowRouteElement();\n container.appendChild(inputShow);\n\n // mode \"collapsed\"\n if (!this.collapsed) {\n inputShow.checked = true;\n }\n var picto = this._createShowRoutePictoElement();\n container.appendChild(picto);\n var routePanel = this._panelRouteContainer = this._createRoutePanelElement();\n\n // header form\n var routeHeader = this._panelHeaderRouteContainer = this._createRoutePanelHeaderElement();\n routePanel.appendChild(routeHeader);\n\n // form\n var routeForm = this._formRouteContainer = this._createRoutePanelFormElement();\n\n // form: menu des points\n var points = this._createRoutePanelFormPointsElement(map);\n for (var i = 0; i < points.length; i++) {\n routeForm.appendChild(points[i]);\n }\n\n // form: menu des modes\n var choice = this._createRoutePanelFormModeChoiceElement();\n choice.appendChild(this._createRoutePanelFormModeChoiceTransportElement(this.options.graphs));\n choice.appendChild(this._createRoutePanelFormModeChoiceComputeElement());\n routeForm.appendChild(choice);\n\n // form: menu des exclusions\n routeForm.appendChild(this._createShowRouteExclusionsElement());\n this._showRouteExclusionsElement = this._createShowRouteExclusionsPictoElement();\n routeForm.appendChild(this._showRouteExclusionsElement);\n var exclusion = this._createRoutePanelFormExclusionsElement();\n exclusion.appendChild(this._createRoutePanelFormExclusionOptionsElement(this.options.exclusions));\n routeForm.appendChild(exclusion);\n var divReset = this._createRouteFormResetElement();\n routeForm.appendChild(divReset);\n\n // form: bouton du calcul\n var submit = this._createRouteSubmitFormElement();\n routeForm.appendChild(submit);\n routePanel.appendChild(routeForm);\n\n // results\n var routeResults = this._resultsRouteContainer = this._createRoutePanelResultsElement();\n routePanel.appendChild(routeResults);\n\n // waiting\n var waiting = this._waitingContainer = this._createRouteWaitingElement();\n routePanel.appendChild(waiting);\n container.appendChild(routePanel);\n // hide autocomplete suggested locations on container click\n if (container.addEventListener) {\n container.addEventListener(\"click\", function (e) {\n return _this._hideRouteSuggestedLocations(e);\n });\n }\n return container;\n };\n\n // ################################################################### //\n // ####################### init application ########################## //\n // ################################################################### //\n\n /**\n * this method is called by the constructor and initialize transport mode\n * (\"Voiture\" ou \"Pieton\")\n *\n * @private\n */\n Route.prototype._initTransport = function () {\n // Mode de transport selectionné\n this._currentTransport = \"Voiture\"; // par defaut\n\n // par defaut\n var transport = this.options.graphs;\n if (!transport || transport.length === 0) {\n this.options.graphs = [\"Voiture\", \"Pieton\"];\n }\n\n // option\n if (Array.isArray(transport) && transport.length) {\n // FIXME pb si le 1er graphe n'est pas une ressource connue !\n if (transport[0] === \"Voiture\" || transport[0] === \"Pieton\") {\n this._currentTransport = transport[0];\n }\n }\n\n // TODO option sur le service\n var serviceOptions = this.options.routeOptions;\n if (serviceOptions.graph) {\n this._currentTransport = serviceOptions.graph;\n }\n };\n\n /**\n * this method is called by the constructor and initialize computation mode\n * (fastest or shortest)\n *\n * @private\n */\n Route.prototype._initComputation = function () {\n // Mode de calcul selectionné\n this._currentComputation = \"fastest\"; // par defaut\n\n // TODO option sur le service\n var serviceOptions = this.options.routeOptions;\n if (serviceOptions.routePreference) {\n this._currentComputation = serviceOptions.routePreference;\n }\n };\n\n /**\n * this method is called by the constructor and initialize exclusions\n *\n * @private\n */\n Route.prototype._initExclusions = function () {\n // Exclusions selectionnées : Tunnel, Toll et Bridge\n this._currentExclusions = []; // par defaut\n\n // par defaut\n var exclusion = this.options.exclusions;\n if (!exclusion || _typeof(exclusion) === \"object\" && Object.keys(exclusion).length === 0) {\n this.options.exclusions = {\n toll: false,\n tunnel: false,\n bridge: false\n };\n }\n\n // option\n if (exclusion && _typeof(exclusion) === \"object\" && Object.keys(exclusion).length) {\n for (var k in exclusion) {\n if (exclusion.hasOwnProperty(k)) {\n if (exclusion[k]) {\n this._currentExclusions.push(k);\n }\n }\n }\n }\n\n // TODO option sur le service\n var serviceOptions = this.options.routeOptions;\n if (Array.isArray(serviceOptions.exclusions)) {\n this._currentExclusions = serviceOptions.exclusions;\n }\n };\n\n /**\n * this method is called by this.initialize() and initialize popup div\n * (to display results information on route result click)\n *\n * @return {Object} element - DOM element for popup\n * @private\n */\n Route.prototype._initPopupDiv = function () {\n var context = this;\n var element = document.createElement(\"div\");\n element.className = \"gp-feature-info-div\";\n var closer = document.createElement(\"input\");\n closer.type = \"button\";\n closer.className = \"gp-styling-button closer\";\n // on closer click : remove popup\n closer.onclick = function () {\n if (context._popupOverlay != null) {\n context._popupOverlay.setPosition(undefined);\n }\n return false;\n };\n this._popupContent = document.createElement(\"div\");\n this._popupContent.className = \"gp-features-content-div\";\n element.appendChild(this._popupContent);\n element.appendChild(closer);\n return element;\n };\n\n // ################################################################### //\n // ############################## DOM ################################ //\n // ################################################################### //\n\n /**\n * Create List Points\n * Overwrite RouteDOM method !\n *\n * @param {Object} map - the map\n *\n * @returns {Array} List DOM element\n * @private\n */\n Route.prototype._createRoutePanelFormPointsElement = function (map) {\n var points = [];\n var count = 1;\n\n // point de depart\n var start = new _LocationSelector__WEBPACK_IMPORTED_MODULE_17__[\"default\"]({\n apiKey: this.options.apiKey || null,\n tag: {\n id: count,\n groupId: this._uid,\n markerOpts: this.options.markersOpts[\"departure\"],\n label: \"Départ\",\n display: true\n },\n autocompleteOptions: this.options.autocompleteOptions || null\n });\n start.setMap(map);\n // on ajoute des écouteurs d'évènements (en plus de ceux de LocationSelector),\n // pour prendre en compte les CSS spécifiques de GProuteForm\n this._addFormPointsEventListeners(start);\n points.push(start._container);\n this._currentPoints.push(start);\n\n // points intermediaires\n for (count = 2; count < 7; count++) {\n var step = new _LocationSelector__WEBPACK_IMPORTED_MODULE_17__[\"default\"]({\n apiKey: this.options.apiKey || null,\n tag: {\n id: count,\n groupId: this._uid,\n label: \"Etape\",\n markerOpts: this.options.markersOpts[\"stages\"],\n display: false,\n removeOption: true\n },\n autocompleteOptions: this.options.autocompleteOptions || null\n });\n step.setMap(map);\n this._addFormPointsEventListeners(step);\n points.push(step._container);\n this._currentPoints.push(step);\n }\n\n // point d'arrivée\n var end = new _LocationSelector__WEBPACK_IMPORTED_MODULE_17__[\"default\"]({\n apiKey: this.options.apiKey || null,\n tag: {\n id: count,\n groupId: this._uid,\n markerOpts: this.options.markersOpts[\"arrival\"],\n label: \"Arrivée\",\n display: true,\n addOption: true\n },\n autocompleteOptions: this.options.autocompleteOptions || null\n });\n end.setMap(map);\n this._addFormPointsEventListeners(end);\n points.push(end._container);\n this._currentPoints.push(end);\n return points;\n };\n\n /**\n * Attach events listeners to route form points (locationSelector)\n *\n * @param {Object} formPoint - route form point (locationSelector)\n * @private\n */\n Route.prototype._addFormPointsEventListeners = function (formPoint) {\n var _this2 = this;\n if (!formPoint) {\n return;\n }\n if (formPoint._inputLabelContainer.addEventListener) {\n // display form on origin label click\n formPoint._inputLabelContainer.addEventListener(\"click\", function (e) {\n return _this2.onRouteOriginLabelClick(e);\n });\n // minimize form on input show pointer, and set map event listeners (see this.onRouteOriginPointerClick)\n formPoint._inputShowPointer.addEventListener(\"click\", function (e) {\n return _this2.onRouteOriginPointerClick(e, formPoint);\n });\n if (formPoint._removePointElement) {\n formPoint._removePointElement.addEventListener(\"click\", function (e) {\n logger.trace(\"click on _removePointElement\", e);\n // Moving up exclusions picto\n // var exclusionsPictoTop = context._showRouteExclusionsElement.style.top;\n // context._showRouteExclusionsElement.style.top = (parseInt(exclusionsPictoTop, 10) - 33).toString() + \"px\";\n });\n }\n\n if (formPoint._addPointElement) {\n formPoint._addPointElement.addEventListener(\"click\", function (e) {\n logger.trace(\"click on _addPointElement\", e);\n // Moving down exclusions picto\n // var exclusionsPictoTop = context._showRouteExclusionsElement.style.top;\n // context._showRouteExclusionsElement.style.top = (parseInt(exclusionsPictoTop, 10) + 33).toString() + \"px\";\n });\n }\n } else if (formPoint._inputLabelContainer.attachEvent) {\n // attachEvent: Internet explorer event listeners management\n formPoint._inputLabelContainer.attachEvent(\"onclick\", function (e) {\n return _this2.onRouteOriginLabelClick(e);\n });\n formPoint._inputShowPointer.attachEvent(\"onclick\", function (e) {\n return _this2.onRouteOriginPointerClick(e, formPoint);\n });\n if (formPoint._removePointElement) {\n formPoint._removePointElement.attachEvent(\"onclick\", function (e) {\n // Moving up exclusions picto\n // var exclusionsPictoTop = context._showRouteExclusionsElement.style.top;\n // context._showRouteExclusionsElement.style.top = (parseInt(exclusionsPictoTop, 10) - 33).toString() + \"px\";\n });\n }\n if (formPoint._addPointElement) {\n formPoint._addPointElement.attachEvent(\"onclick\", function (e) {\n // Moving down exclusions picto\n // var exclusionsPictoTop = context._showRouteExclusionsElement.style.top;\n // context._showRouteExclusionsElement.style.top = (parseInt(exclusionsPictoTop, 10) + 33).toString() + \"px\";\n });\n }\n }\n };\n\n // ################################################################### //\n // ####################### handlers events to dom #################### //\n // ################################################################### //\n\n /**\n * this method is called by event 'submit' on 'GProuteForm' tag form\n * (cf. this._createRoutePanelFormElement), and it displays the results.\n *\n * @param {Object} options - options\n * @private\n */\n Route.prototype.onRouteComputationSubmit = function (options) {\n logger.log(\"onRouteComputationSubmit\", options);\n\n // FIXME on lance une requête en EPSG:4326, les coordonnées\n // doivent donc être du type cad en lat/lon.\n // or, BUG du service du calcul d'itineraire car les\n // coordonnées envoyées doivent être en lon/lat avec une SRS en EPSG:4326 !?\n // sinon, ça plante...\n\n // Liste des points\n var points = this._currentPoints;\n\n // - point de depart (info: points[0].getCoordinate est du type [lon, lat], en EPSG:4326)\n var start;\n if (points[0] && points[0].getCoordinate) {\n var startCoordinate = points[0].getCoordinate();\n start = {\n x: startCoordinate[0],\n y: startCoordinate[1]\n };\n logger.log(\"start\", start);\n }\n\n // - point d'arrivée\n var end;\n var endPoint = points[points.length - 1];\n if (endPoint && endPoint.getCoordinate) {\n var endCoordinate = endPoint.getCoordinate();\n end = {\n x: endCoordinate[0],\n y: endCoordinate[1]\n };\n logger.log(\"end\", end);\n }\n\n // - les étapes\n var step = [];\n for (var i = 1; i < points.length - 1; i++) {\n if (points[i] && points[i].getCoordinate) {\n var iCoordinate = points[i].getCoordinate();\n if (iCoordinate) {\n var coordinate = {\n x: iCoordinate[0],\n y: iCoordinate[1]\n };\n logger.log(\"step\", coordinate);\n step.push(coordinate);\n }\n }\n }\n\n // valeurs selectionnées\n this._currentTransport = options.transport;\n this._currentComputation = options.computation;\n this._currentExclusions = options.exclusions;\n\n // on recupere les éventuelles options du service passées par l'utilisateur\n var routeOptions = this.options.routeOptions;\n\n // gestion du protocole et du timeout\n // le timeout est indispensable sur le protocole JSONP.\n var _protocol = routeOptions.protocol || \"XHR\";\n var _timeout = routeOptions.timeOut || 0;\n if (_protocol === \"JSONP\" && _timeout === 0) {\n // FIXME le timeout est obligatoire pour ce type de protocole...\n _timeout = 15000;\n }\n\n // gestion des callback\n var bOnFailure = !!(routeOptions.onFailure !== null && typeof routeOptions.onFailure === \"function\"); // cast variable to boolean\n var bOnSuccess = !!(routeOptions.onSuccess !== null && typeof routeOptions.onSuccess === \"function\");\n\n // on met en place l'affichage des resultats dans la fenetre de resultats.\n var context = this;\n this._requestRouting({\n startPoint: start,\n endPoint: end,\n viaPoints: step,\n graph: routeOptions.graph || this._currentTransport,\n routePreference: routeOptions.routePreference || this._currentComputation,\n exclusions: routeOptions.exclusions || this._currentExclusions,\n geometryInInstructions: true,\n distanceUnit: \"m\",\n timeOut: _timeout,\n protocol: _protocol,\n oldRouteService: routeOptions.oldRouteService || true,\n resource: routeOptions.resource,\n // callback onSuccess\n onSuccess: function onSuccess(results) {\n logger.log(results);\n if (results) {\n context._fillRouteResultsDetails(results);\n }\n if (bOnSuccess) {\n routeOptions.onSuccess.call(context, results);\n }\n },\n // callback onFailure\n onFailure: function onFailure(error) {\n context._hideWaitingContainer();\n context._clearRouteResultsDetails();\n logger.log(error.message);\n if (bOnFailure) {\n routeOptions.onFailure.call(context, error);\n }\n }\n });\n };\n\n /**\n * this method is called by event 'click' on 'GPlocationOriginLabel' label\n * and set 'GProuteForm' CSS class to \"\" (normal)\n *\n * @param {Object} routeControl - context : route Control (this)\n * @private\n */\n Route.prototype.onRouteOriginLabelClick = function () {\n this._formRouteContainer.className = \"\";\n // on désactive l'écouteur d'événements sur la carte (pour ne pas placer un marker au clic)\n // map.un(\n // \"click\",\n // () => {\n // // on ne rétablit pas le mode \"normal\" si on est dans le panel des résultats (où className = \"GProuteComponentHidden\")\n // if (this._formRouteContainer.className === \"GProuteFormMini\") {\n // this._formRouteContainer.className = \"\";\n // }\n // }\n // );\n Object(ol_Observable__WEBPACK_IMPORTED_MODULE_2__[\"unByKey\"])(this.listenerKey);\n this.dispatchEvent(\"route:drawend\");\n };\n\n /**\n * this method is called by event 'click' on 'GPlocationOriginPointerImg' label\n * and display or minimize 'GProuteForm', using CSS class (\"GProuteFormMini\" or \"\")\n *\n * @param {Object} e - context : route Control (equivalent to this)\n * @param {Object} locationSelector - context : locationSelector input (one of this._currentPoints)\n * @private\n */\n Route.prototype.onRouteOriginPointerClick = function (e, locationSelector) {\n var _this3 = this;\n var map = this.getMap();\n if (locationSelector._inputShowPointerContainer.checked) {\n // au click sur l'input pour pointer sur la carte: on minimise le formulaire\n this._formRouteContainer.className = \"GProuteFormMini\";\n // et au clic sur la carte, on réaffichera le formulaire \"normal\"\n this.listenerKey = map.on(\"click\", function () {\n // on ne rétablit pas le mode \"normal\" si on est dans le panel des résultats (où className = \"GProuteComponentHidden\")\n if (_this3._formRouteContainer.className === \"GProuteFormMini\") {\n _this3._formRouteContainer.className = \"\";\n }\n Object(ol_Observable__WEBPACK_IMPORTED_MODULE_2__[\"unByKey\"])(_this3.listenerKey);\n /**\n * event triggered at the end of drawing input\n *\n * @event route:drawend\n */\n _this3.dispatchEvent(\"route:drawend\");\n });\n /**\n * event triggered at the start of drawing input\n *\n * @event route:drawstart\n */\n this.dispatchEvent(\"route:drawstart\");\n } else {\n // si on déselectionne le pointer, on rétablit le formulaire en mode normal\n this._formRouteContainer.className = \"\";\n // et on enlève l'écouteur d'évènement sur la carte\n // map.un(\n // \"click\",\n // () => {\n // // on ne rétablit pas le mode \"normal\" si on est dans le panel des résultats (où className = \"GProuteComponentHidden\")\n // if (this._formRouteContainer.className === \"GProuteFormMini\") {\n // this._formRouteContainer.className = \"\";\n // }\n // }\n // );\n Object(ol_Observable__WEBPACK_IMPORTED_MODULE_2__[\"unByKey\"])(this.listenerKey);\n this.dispatchEvent(\"route:drawend\");\n }\n };\n\n /**\n * this method is called by event 'click' on 'GPshowRoutePicto'\n * tag label (cf. this._createShowRoutePictoElement),\n * and it cleans all value of input.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n Route.prototype.onShowRoutePanelClick = function (e) {\n var map = this.getMap();\n // on supprime toutes les interactions\n _Utils_Interactions__WEBPACK_IMPORTED_MODULE_16__[\"default\"].unset(map);\n // clean !\n if (!this._geojsonSections && !this._waiting) {\n this._clear();\n }\n this.collapsed = document.getElementById(\"GPshowRoute-\" + this._uid).checked;\n // on génère nous même l'evenement OpenLayers de changement de pté\n // (utiliser ol.control.Route.on(\"change:collapsed\", function ) pour s'abonner à cet évènement)\n this.dispatchEvent(\"change:collapsed\");\n };\n\n /**\n * this method is called by event 'change' on 'GProuteComputationSelect' tag select\n * (cf. this._createRoutePanelFormModeChoiceComputeElement).\n * this value is saved as a parameter for the service route.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n Route.prototype.onRouteModeComputationChange = function (e) {\n var idx = e.target.selectedIndex;\n var value = e.target.options[idx].value;\n if (!value) {\n return;\n }\n logger.log(value);\n this._currentComputation = value;\n };\n\n /**\n * this method is called by event 'change' on 'GProuteResultsComputationSelect' tag select\n * (cf. this._createRouteResultsElement).\n * this value is saved as a parameter for the service route,\n * and this launches the route request !\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n Route.prototype.onRouteModeComputationChangeAndRun = function (e) {\n // event choice computation\n this.onRouteModeComputationChange(e);\n\n // clean avant un nouveau calcul !\n this._clearRouteResultsDetails();\n this._clearRouteResultsGeometry();\n this._clearRouteResultsFeatureGeometry();\n\n // submit request\n this.onRouteComputationSubmit({\n computation: this._currentComputation,\n transport: this._currentTransport,\n exclusions: this._currentExclusions\n });\n };\n\n /**\n * this method is called by event 'change' on 'GProuteTransportCar' or 'GProuteTransportPedestrian' tag input\n * (cf. this._createRoutePanelFormModeChoiceTransportElement).\n * this value is saved as a parameter for the service route.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n Route.prototype.onRouteModeTransportChange = function (e) {\n var value = e.target.value;\n if (!value) {\n return;\n }\n this._currentTransport = value;\n };\n\n /**\n * TODO this method is called by event 'click' on 'GPshowRouteExclusionsPicto' tag input\n * (cf. this._createShowRouteExclusionsPictoElement), and it displays the panel options of exclusions.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n Route.prototype.onShowRouteExclusionsClick = function (e) {\n logger.log(\"onShowRouteExclusionsClick\", e);\n // FIXME not use ?!\n };\n\n /**\n * this method is called by event 'change' on 'GProuteExclusionsToll'\n * or 'GProuteExclusionsTunnel' or 'GProuteExclusionsBridge' tag input\n * (cf. this._createRoutePanelFormExclusionOptionsElement).\n * this value is saved as a parameter for the service route.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n Route.prototype.onRouteExclusionsChange = function (e) {\n var value = e.target.value;\n var checked = e.target.checked;\n if (!value || typeof value !== \"string\") {\n return;\n }\n value = value.toLowerCase();\n var bFound = false;\n var iFound = null;\n for (var i = 0; i < this._currentExclusions.length; i++) {\n if (this._currentExclusions[i] === value) {\n iFound = i;\n bFound = true;\n }\n }\n // on l'ajoute si la valeur n'existe pas et est déselectionnée\n // info : checked = passage autorisé (ce n'est pas une exclusion)\n if (!bFound && !checked) {\n this._currentExclusions.push(value);\n }\n // on la retire si la valeur existe et est selectionnée\n if (bFound && checked) {\n this._currentExclusions.splice(iFound, 1);\n }\n };\n\n /**\n * this method is called by event 'click' on 'GProuteReset'\n * tag label (cf. this._createRouteFormResetElement),\n * and it cleans all route input options and results.\n *\n * @private\n */\n Route.prototype.onRouteResetClick = function () {\n // clear points\n var currentPoints = this._currentPoints;\n for (var i = 0; i < currentPoints.length; i++) {\n currentPoints[i].clear();\n }\n\n // clear results\n this._clear();\n this._clearRouteInputOptions();\n };\n\n /**\n * this method is called by event 'click' on 'GProuteSubmit'\n * tag label (cf. this._createRouteSubmitFormElement),\n * and it cleans the route geometry.\n *\n * @private\n */\n Route.prototype.onShowRouteResultsNewClick = function () {\n // clean avant un nouveau calcul !\n this._clearRouteResultsDetails();\n this._clearRouteResultsGeometry();\n this._clearRouteResultsFeatureGeometry();\n };\n\n /**\n * this method is called by event 'mouseover' on 'GProuteResultsDetailsInstruction_'\n * tag label (cf. this._addRouteResultsDetailsElement),\n * and it makes a style on feature route.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n Route.prototype.onRouteResultsDetailsMouseOver = function (e) {\n // récupération de l'id de l'instruction survolée\n var tagid = e.target.id; // ex GProuteResultsDetailsInstruction_125\n var idx = tagid.substring(tagid.indexOf(\"_\") + 1); // ex. 125\n\n // on passe le texte en gras\n if (e.target.classList) {\n e.target.classList.add(\"GProuteResultsDetailsInstructionHighlight\");\n }\n if (!this._geojsonSections) {\n return;\n }\n\n // on récupère l'entité correspondante à l'instruction survolée\n var f = this._geojsonSections.getSource().getFeatureById(parseInt(idx, 10));\n // et on lui affecte un nouveau style\n f.setStyle(this._selectedFeatureStyle);\n };\n\n /**\n * this method is called by event 'mouseout' on 'GProuteResultsDetailsInstruction_'\n * tag label (cf. this._addRouteResultsDetailsElement),\n * and it deletes a style on feature route.\n *\n * @param {Object} e - HTMLElement\n * @private\n */\n Route.prototype.onRouteResultsDetailsMouseOut = function (e) {\n // récupération de l'id de l'instruction survolée\n var tagid = e.target.id; // ex GProuteResultsDetailsInstruction_125\n var idx = tagid.substring(tagid.indexOf(\"_\") + 1); // ex. 125\n\n // on repasse le texte en style normal\n if (e.target.classList) {\n e.target.classList.remove(\"GProuteResultsDetailsInstructionHighlight\");\n }\n if (!this._geojsonSections) {\n return;\n }\n // on récupère l'entité correspondante à l'instruction qui était survolée\n var f = this._geojsonSections.getSource().getFeatureById(parseInt(idx, 10));\n // et on lui réaffecte un style normal\n f.setStyle(null);\n };\n\n // ################################################################### //\n // ########################### Routing ############################### //\n // ############## (methods to request and results) ################### //\n\n /**\n * this method is called by this.onRouteComputationSubmit()\n * and executes a request to the service.\n *\n * @param {Object} options - route service request options\n * @param {Function} options.onSuccess - callback\n * @param {Function} options.onFailure - callback\n * @private\n */\n Route.prototype._requestRouting = function (options) {\n // on ne fait pas de requête si on n'a pas renseigné de parametres !\n if (!options || _typeof(options) === \"object\" && Object.keys(options).length === 0) {\n return;\n }\n\n // on ne fait pas de requête si\n // - la parametre 'startPoint' est vide !\n if (!options.startPoint) {\n return;\n }\n // - la parametre 'endPoint' est vide !\n if (!options.endPoint) {\n return;\n }\n\n // cas où la clef API n'est pas renseignée dans les options du service,\n // on utilise celle renseignée au niveau du controle (calcul par défaut)\n options.apiKey = this.options.routeOptions.apiKey || this.options.apiKey;\n\n // si l'utilisateur a spécifié le paramètre ssl au niveau du control, on s'en sert\n // true par défaut (https)\n if (typeof options.ssl !== \"boolean\") {\n if (typeof this.options.ssl === \"boolean\") {\n options.ssl = this.options.ssl;\n } else {\n options.ssl = true;\n }\n }\n logger.log(options);\n\n // mise en place de la patience\n this._displayWaitingContainer();\n\n // appel du service de calcul d'itinéraires\n geoportal_access_lib__WEBPACK_IMPORTED_MODULE_10__[\"default\"].Services.route(options);\n };\n\n /**\n * this method is called by this.onRouteComputationSubmit() (in case of route computation success)\n * and fills the container of the route instructions list, distance and time\n * information, also, constructs the geometry route.\n *\n * @param {Object} results - results of the route calculation\n *\n * @private\n */\n Route.prototype._fillRouteResultsDetails = function (results) {\n // 1. Affichage des distances et durées\n var distance = results.totalDistance;\n var duration = results.totalTime;\n // Détails avec simplifications des troncons\n var instructions = this._simplifiedInstructions(results.routeInstructions);\n // var instructions = results.routeInstructions;\n\n if (instructions) {\n this._fillRouteResultsDetailsContainer(distance, duration, instructions);\n }\n\n // 2. Affichage des géométries\n // Geometrie simplifiée (si renseignée)\n var geometry = results.routeGeometry;\n if (geometry) {\n this._fillRouteResultsDetailsGeometry(geometry, this._defaultFeatureStyle);\n }\n\n // Geometries des tronçon (si renseignée)\n if (instructions && instructions[0].geometry) {\n this._fillRouteResultsDetailsFeatureGeometry(instructions, this._defaultFeatureStyle);\n }\n\n // 3. Zoom sur l'emprise de l'itinéraire (si spécifiée)\n var bbox = results.bbox;\n if (bbox) {\n var map = this.getMap();\n var bounds = [bbox.left, bbox.bottom, bbox.right, bbox.top];\n // reprojection dans la projection de la carte (bbox initialement en EPSG:4326)\n var mapProj = map.getView().getProjection().getCode();\n if (mapProj !== \"EPSG:4326\") {\n bounds = Object(ol_proj__WEBPACK_IMPORTED_MODULE_9__[\"transformExtent\"])(bounds, \"EPSG:4326\", mapProj);\n }\n map.getView().fit(bounds, map.getSize());\n }\n\n // sauvegarde de l'etat des resultats\n this._currentRouteInformations = results;\n\n /**\n * event triggered when the compute is finished\n *\n * @event route:compute\n * @property {Object} type - event\n * @property {Object} target - instance Route\n * @example\n * Route.on(\"route:compute\", function (e) {\n * console.log(e.target.getData());\n * })\n */\n this.dispatchEvent({\n type: \"route:compute\"\n });\n\n // mise à jour du controle !\n this._formRouteContainer.className = \"GProuteComponentHidden\";\n this._hideWaitingContainer();\n this._resultsRouteContainer.className = \"\";\n };\n\n /**\n * this method is called by this._fillRouteResultsDetails()\n * and fills the container of the route instructions list, distance and time\n * information.\n *\n * @param {Number} distance - distance\n * @param {Number} duration - duration\n * @param {Object[]} instructions - list of instructions\n *\n * @private\n */\n Route.prototype._fillRouteResultsDetailsContainer = function (distance, duration, instructions) {\n // Distance et Durée\n this._resultsRouteValuesContainer = this._addRouteResultsValuesElement(distance, duration, this._convertSecondsToTime);\n\n // Détails\n this._resultsRouteDetailsContainer = this._addRouteResultsDetailsElement(instructions, this._convertSecondsToTime);\n };\n\n /**\n * this method is called by this._fillRouteResultsDetails()\n * and constructs the geometry route.\n *\n * @param {Object} geometry - geoJSON object for route geometry\n * @param {Object} style - route ol.style.Style object\n * @private\n */\n Route.prototype._fillRouteResultsDetailsGeometry = function (geometry, style) {\n this._clearRouteResultsGeometry();\n var map = this.getMap();\n if (!geometry) {\n return;\n }\n\n // création de l'objet geoJSON\n var geojsonObject = {\n type: \"FeatureCollection\",\n features: [{\n type: \"Feature\",\n crs: {\n type: \"name\",\n properties: {\n name: \"EPSG:4326\"\n }\n },\n geometry: geometry\n }]\n };\n var geojsonformat = new _Formats_GeoJSON__WEBPACK_IMPORTED_MODULE_20__[\"default\"]({\n defaultDataProjection: \"EPSG:4326\",\n defaultStyle: style\n });\n var features = geojsonformat.readFeatures(geojsonObject, {\n dataProjection: \"EPSG:4326\",\n featureProjection: \"EPSG:3857\"\n });\n\n // ajout de la géométrie comme nouvelle couche vecteur à la carte\n this._geojsonRoute = new ol_layer_Vector__WEBPACK_IMPORTED_MODULE_4___default.a({\n source: new ol_source_Vector__WEBPACK_IMPORTED_MODULE_5___default.a({\n features: features\n }),\n style: style\n });\n map.addLayer(this._geojsonRoute);\n };\n\n /**\n * this method is called by this._fillRouteResultsDetails()\n * and constructs the geometries street with informations.\n *\n * @param {Array} instructions - route instructions list (containing geoJSON geometry)\n * @param {Object} style - route ol.style.Style object\n * @private\n */\n Route.prototype._fillRouteResultsDetailsFeatureGeometry = function (instructions, style) {\n var _this4 = this;\n this._clearRouteResultsFeatureGeometry();\n var map = this.getMap();\n\n // 1. création de l'objet geoJSON\n this._geojsonObject = {\n type: \"FeatureCollection\",\n crs: {\n type: \"name\",\n properties: {\n name: \"EPSG:4326\"\n }\n },\n features: []\n };\n\n // 2. Remplissage de l'objet geoJSON : ajout des géométries de chaque instruction\n for (var i = 0; i < instructions.length; i++) {\n var o = instructions[i];\n var id = i + 1;\n var coords = o.geometry.coordinates;\n for (var j = 0; j < coords.length; j++) {\n // remarque : les coordonnées sont au format string, à convertir en nombres\n if (typeof coords[j][0] === \"string\") {\n coords[j][0] = parseFloat(coords[j][0]);\n coords[j][1] = parseFloat(coords[j][1]);\n }\n }\n this._geojsonObject.features.push({\n type: \"Feature\",\n geometry: o.geometry,\n properties: {\n popupContent: \"(\" + id + \") distance : \" + this._convertDistance(o.distance) + \" / temps : \" + this._convertSecondsToTime(o.duration)\n },\n id: id\n });\n }\n\n // Ajout du point de depart du tracé\n this._geojsonObject.features.push({\n type: \"Feature\",\n geometry: {\n type: \"Point\",\n coordinates: this._currentPoints[0].getCoordinate()\n },\n properties: {\n description: \"Point de départ\",\n \"marker-symbol\": this.options.markersOpts.departure.url\n }\n });\n\n // Ajout des points d'étapes\n for (var k = 1; k < this._currentPoints.length - 1; k++) {\n if (this._currentPoints[k] && this._currentPoints[k].getCoordinate) {\n var coordinates = this._currentPoints[k].getCoordinate();\n if (coordinates) {\n this._geojsonObject.features.push({\n type: \"Feature\",\n geometry: {\n type: \"Point\",\n coordinates: coordinates\n },\n properties: {\n description: \"Point d'étape\",\n \"marker-symbol\": this.options.markersOpts.stages.url\n }\n });\n }\n }\n }\n\n // Ajout du point d'arrivée du tracé\n this._geojsonObject.features.push({\n type: \"Feature\",\n geometry: {\n type: \"Point\",\n coordinates: this._currentPoints[this._currentPoints.length - 1].getCoordinate()\n },\n properties: {\n description: \"Point d'arrivée\",\n \"marker-symbol\": this.options.markersOpts.arrival.url\n }\n });\n\n // Création du format GeoJSON, avec reprojection des géométries\n var geojsonformat = new _Formats_GeoJSON__WEBPACK_IMPORTED_MODULE_20__[\"default\"]({\n defaultDataProjection: \"EPSG:4326\",\n defaultStyle: style\n });\n var mapProj = this.getMap().getView().getProjection().getCode();\n var features = geojsonformat.readFeatures(this._geojsonObject, {\n dataProjection: \"EPSG:4326\",\n featureProjection: mapProj\n });\n\n // 3. Ajout du tracé de l'itinéraire (geoJSON) comme nouvelle couche vecteur à la carte\n this._geojsonSections = new ol_layer_Vector__WEBPACK_IMPORTED_MODULE_4___default.a({\n source: new ol_source_Vector__WEBPACK_IMPORTED_MODULE_5___default.a({\n features: features\n }),\n style: style,\n opacity: 0.9\n });\n var graph;\n if (this._currentTransport === \"Pieton\") {\n graph = \"piéton\";\n this._geojsonSections.gpResultLayerId = \"Pieton$OGC:OPENLS;Itineraire\";\n } else {\n graph = \"voiture\";\n this._geojsonSections.gpResultLayerId = \"Voiture$OGC:OPENLS;Itineraire\";\n }\n // ajout à la carte\n map.addLayer(this._geojsonSections);\n\n // 4. Si un layer switcher est présent dans la carte, on lui affecte des informations pour cette couche\n map.getControls().forEach(function (control) {\n if (control instanceof _LayerSwitcher__WEBPACK_IMPORTED_MODULE_19__[\"default\"]) {\n // un layer switcher est présent dans la carte\n var layerId = _this4._geojsonSections.gpLayerId;\n // on n'ajoute des informations que s'il n'y en a pas déjà (si le titre est le numéro par défaut)\n if (control._layers[layerId].title === layerId) {\n control.addLayer(_this4._geojsonSections, {\n title: _this4.options.layerDescription.title + \" (\" + graph + \")\",\n description: _this4.options.layerDescription.description\n });\n }\n }\n }, this);\n\n // 5. Ajout de popups aux troncons\n // Création de l'interaction : survol des features (=troncons de l'itinéraire)\n this._resultsHoverInteraction = new ol_interaction__WEBPACK_IMPORTED_MODULE_7__[\"Select\"]({\n condition: ol_events_condition__WEBPACK_IMPORTED_MODULE_6__[\"pointerMove\"],\n layers: [this._geojsonSections],\n style: this._selectedFeatureStyle\n });\n this._resultsHoverInteraction.on(\"select\", function (e) {\n return _this4._onResultsFeatureMouseOver(e);\n });\n map.addInteraction(this._resultsHoverInteraction);\n\n // Création de l'interaction : selection des features (=troncons de l'itinéraire)\n this._resultsSelectInteraction = new ol_interaction__WEBPACK_IMPORTED_MODULE_7__[\"Select\"]({\n layers: [this._geojsonSections],\n style: this._selectedFeatureStyle\n });\n this._resultsSelectInteraction.on(\"select\", function (e) {\n return _this4._onResultsFeatureSelect(e);\n });\n map.addInteraction(this._resultsSelectInteraction);\n };\n\n /**\n * this method is called on route features hover\n * and highlight instruction label\n *\n * @param {Object} e - event\n *\n * @private\n */\n Route.prototype._onResultsFeatureMouseOver = function (e) {\n if (e.selected.length !== 0) {\n // si on a bien survolé un tronçon, on surligne l'instruction correspondante\n var f = e.selected[0];\n var selectedInstruction = document.getElementById(\"GProuteResultsDetailsInstruction_\" + f.getId() + \"-\" + this._uid);\n if (selectedInstruction && selectedInstruction.classList) {\n selectedInstruction.classList.add(\"GProuteResultsDetailsInstructionHighlight\");\n }\n }\n\n // si on déselectionne un tronçon (mouseout), on rétablit un style normal pour l'instruction\n if (e.deselected.length !== 0) {\n var deselectedFeature = e.deselected[0];\n // on repasse l'instruction correspondante en normal\n var deSelectedInstruction = document.getElementById(\"GProuteResultsDetailsInstruction_\" + deselectedFeature.getId() + \"-\" + this._uid);\n if (deSelectedInstruction && deSelectedInstruction.classList) {\n deSelectedInstruction.classList.remove(\"GProuteResultsDetailsInstructionHighlight\");\n }\n }\n };\n\n /**\n * this method is called on route features select\n * and set a popup with feature information\n *\n * @param {Object} e - on select event\n * @private\n */\n Route.prototype._onResultsFeatureSelect = function (e) {\n var map = this.getMap();\n if (e.selected.length !== 0) {\n // si on a sélectionné un troncon, on lui ajoute une popup\n var f = e.selected[0];\n this._popupContent.innerHTML = f.getProperties().popupContent;\n if (!this._popupOverlay) {\n // ajout de la popup a la carte comme un overlay\n this._popupOverlay = new ol_Overlay__WEBPACK_IMPORTED_MODULE_3___default.a({\n element: this._popupDiv,\n positioning: \"bottom-center\",\n position: e.mapBrowserEvent.coordinate\n });\n map.addOverlay(this._popupOverlay);\n } else {\n // si l'overlay est déjà créé, on modifie juste sa position\n this._popupOverlay.setPosition(e.mapBrowserEvent.coordinate);\n }\n } else {\n // si aucun troncon n'est sélectionné (click à côté du tracé),\n // on fait disparaitre la popup si elle existe\n if (this._popupOverlay != null) {\n this._popupOverlay.setPosition(undefined);\n }\n }\n };\n\n // ################################################################### //\n // ############################# Clean ############################### //\n // ################################################################### //\n\n /**\n * this method is called by this.onShowRoutePanelClick()\n * and it clears all elements (reinit).\n *\n * @private\n */\n Route.prototype._clear = function () {\n this._currentTransport = null;\n this._currentExclusions = [];\n this._currentComputation = null;\n\n // les resultats\n this._clearRouteResultsDetails();\n // la geometrie\n this._clearRouteResultsGeometry();\n this._clearRouteResultsFeatureGeometry();\n // les points\n for (var i = 0; i < this._currentPoints.length; i++) {\n this._currentPoints[i].clear();\n }\n // suppression des points intermédiaires\n this._removeRouteStepLocations();\n };\n\n /**\n * this method is called by this.onRouteResetClick()\n * and it clears all options inputs (reinit).\n *\n * @private\n */\n Route.prototype._clearRouteInputOptions = function () {\n // reinit options to default\n this._initTransport();\n this._initComputation();\n this._initExclusions();\n\n // set transport mode to default\n var transportdiv;\n if (this._currentTransport === \"Pieton\") {\n transportdiv = document.getElementById(\"GProuteTransportPedestrian-\" + this._uid);\n if (transportdiv) {\n transportdiv.checked = \"true\";\n }\n } else {\n transportdiv = document.getElementById(\"GProuteTransportCar-\" + this._uid);\n if (transportdiv) {\n transportdiv.checked = \"true\";\n }\n }\n\n // set computation mode to default\n var computationdiv = document.getElementById(\"GProuteComputationSelect-\" + this._uid);\n if (computationdiv) {\n computationdiv.value = this._currentComputation;\n }\n\n // set exclusions to default\n var tollInput = document.getElementById(\"GProuteExclusionsToll-\" + this._uid);\n if (tollInput) {\n if (this._currentExclusions.indexOf(\"toll\") !== -1) {\n tollInput.checked = false;\n } else {\n tollInput.checked = true;\n }\n }\n var tunnelInput = document.getElementById(\"GProuteExclusionsTunnel-\" + this._uid);\n if (tunnelInput) {\n if (this._currentExclusions.indexOf(\"tunnel\") !== -1) {\n tunnelInput.checked = false;\n } else {\n tunnelInput.checked = true;\n }\n }\n var bridgeInput = document.getElementById(\"GProuteExclusionsBridge-\" + this._uid);\n if (bridgeInput) {\n if (this._currentExclusions.indexOf(\"bridge\") !== -1) {\n bridgeInput.checked = false;\n } else {\n bridgeInput.checked = true;\n }\n }\n };\n\n /**\n * this method is called by this._clear()\n * and it removes step location inputs (excepted departure and arrival)\n *\n * @private\n */\n Route.prototype._removeRouteStepLocations = function () {\n var points = document.querySelectorAll(\"div[id^=\\\"GPlocationPoint\\\"]\");\n if (points.length !== 0) {\n var goodPoints = [];\n for (var k = 0; k < points.length; k++) {\n if (points[k].id.indexOf(this._uid) !== -1) {\n goodPoints.push(points[k]);\n }\n }\n // on boucle sur les points intermédiaires\n for (var i = 1; i < goodPoints.length - 1; i++) {\n // on va regarder les classes associées\n var classList = goodPoints[i].classList;\n if (classList.length !== 0) {\n for (var j = 0; j < classList.length; j++) {\n if (classList[j] === \"GPlocationStageFlexInput\") {\n // si l'élément est visible, on le supprime en simulant un clic sur la croix (x)\n document.getElementById(this._addUID(\"GPlocationStageRemove_\" + (i + 1))).click();\n }\n }\n }\n }\n }\n };\n\n /**\n * this method is called by this.onRouteComputationSubmit() (in case of failure)\n * and it clears all route instructions.\n *\n * @private\n */\n Route.prototype._clearRouteResultsDetails = function () {\n this._currentRouteInformations = null;\n\n // doit on nettoyer le container \"GProuteResultsDetails\" ?\n // il sera de toute façon écrasé par la prochaine requête...\n if (this._resultsRouteDetailsContainer) {\n var detailsDiv = this._resultsRouteDetailsContainer;\n if (detailsDiv.childElementCount) {\n while (detailsDiv.firstChild) {\n detailsDiv.removeChild(detailsDiv.firstChild);\n }\n }\n }\n if (this._resultsRouteValuesContainer) {\n var valuesDiv = this._resultsRouteValuesContainer;\n if (valuesDiv.childElementCount) {\n while (valuesDiv.firstChild) {\n valuesDiv.removeChild(valuesDiv.firstChild);\n }\n }\n }\n };\n\n /**\n * this method is called by this.onRouteComputationSubmit()\n * and it clears all route geometries.\n *\n * @private\n */\n Route.prototype._clearRouteResultsGeometry = function () {\n var map = this.getMap();\n if (this._geojsonRoute != null) {\n map.removeLayer(this._geojsonRoute);\n this._geojsonRoute = null;\n }\n };\n\n /**\n * this method is called by this.onRouteComputationSubmit()\n * and it clears all route geometries.\n *\n * @private\n */\n Route.prototype._clearRouteResultsFeatureGeometry = function () {\n var map = this.getMap();\n\n // on retire la couche itinéraire de la carte\n if (this._geojsonSections != null) {\n map.removeLayer(this._geojsonSections);\n this._geojsonSections = null;\n this._geojsonObject = null;\n }\n // on retire l'overlay de la popup de la carte\n if (this._popupOverlay != null) {\n map.removeOverlay(this._popupOverlay);\n this._popupOverlay = null;\n }\n // et les interactions liées à cette couche\n if (this._resultsSelectInteraction != null) {\n map.removeInteraction(this._resultsSelectInteraction);\n this._resultsSelectInteraction = null;\n }\n if (this._resultsHoverInteraction != null) {\n map.removeInteraction(this._resultsHoverInteraction);\n this._resultsHoverInteraction = null;\n }\n };\n\n /**\n * this method is called by event 'click' on control main container\n * and hide suggested Locations (unless target is an autocomplete input)\n *\n * @param {Object} e - event\n *\n * @private\n */\n Route.prototype._hideRouteSuggestedLocations = function (e) {\n // si on clique sur un input de saisie de locationSelector\n if (e.target && e.target.id && e.target.id.indexOf(\"GPlocationOrigin_\") !== -1) {\n // on récupère le numéro du point\n var pointId = parseInt(e.target.id.split(\"_\")[1][0], 10) - 1;\n // et on cache les autres résultats d'autocomplétion (sauf celui sur lequel on clique)\n for (var j = 0; j < this._currentPoints.length; j++) {\n if (j !== parseInt(pointId, 10)) {\n this._currentPoints[j]._hideSuggestedLocation();\n }\n }\n } else {\n // si on clique ailleurs dans le DOM du control, on cache tous les résultats d'autocomplétion\n for (var i = 0; i < this._currentPoints.length; i++) {\n this._currentPoints[i]._hideSuggestedLocation();\n }\n }\n };\n\n /**\n * this method displays waiting container and sets a timeout\n *\n * @private\n */\n Route.prototype._displayWaitingContainer = function () {\n this._waitingContainer.className = \"GProuteCalcWaitingContainerVisible\";\n this._waiting = true;\n\n // mise en place d'un timeout pour réinitialiser le panel (cacher la patience)\n // si on est toujours en attente (si la requête est bloquée par exemple)\n // ceci est vrai, uniquement sur le protocole JSONP !\n var opts = this.options.routeOptions;\n if (opts && opts.timeOut) {\n if (this._timer) {\n clearTimeout(this._timer);\n this._timer = null;\n }\n var context = this;\n this._timer = setTimeout(function () {\n if (context._waiting === true) {\n context._hideWaitingContainer();\n } else {\n if (context._timer) {\n clearTimeout(context._timer);\n }\n }\n }, 16000);\n }\n };\n\n /**\n * this method hides waiting container and clears timeout\n *\n * @private\n */\n Route.prototype._hideWaitingContainer = function () {\n if (this._waiting) {\n this._waitingContainer.className = \"GProuteCalcWaitingContainerHidden\";\n this._waiting = false;\n var opts = this.options.routeOptions;\n if (opts && opts.timeOut) {\n clearTimeout(this._timer);\n this._timer = null;\n }\n }\n };\n\n // ################################################################### //\n // ########################## Geometry ############################### //\n // ################################################################### //\n\n /**\n * simplified instructions\n *\n * @param {Object[]} instructions - list of instructions\n *\n * @returns {Object[]} simplified instructions\n *\n * @private\n */\n Route.prototype._simplifiedInstructions = function (instructions) {\n var newInstructions = [];\n\n // cas où...\n var current = instructions[0];\n if (instructions.length === 1) {\n newInstructions.push(current);\n }\n for (var i = 1; i < instructions.length; i++) {\n var o = instructions[i];\n if (o.instruction === current.instruction) {\n current.distance = (parseFloat(o.distance) + parseFloat(current.distance)).toString();\n current.duration = (parseFloat(o.duration) + parseFloat(current.duration)).toString();\n for (var j = 1; j < o.geometry.coordinates.length; j++) {\n current.geometry.coordinates.push(o.geometry.coordinates[j]);\n }\n } else {\n newInstructions.push(current);\n current = o;\n // last\n if (i === instructions.length - 1) {\n newInstructions.push(o);\n current = null;\n }\n }\n }\n logger.log(newInstructions);\n return newInstructions;\n };\n\n // ################################################################### //\n // ################# Utils for Distance/Duration ##################### //\n // ################################################################### //\n\n /**\n * convert seconds to time : HH:MM:SS\n *\n * @param {Number} duration - duration in seconds\n *\n * @returns {String} time in hours/minutes/seconds\n *\n * @private\n */\n Route.prototype._convertSecondsToTime = function (duration) {\n var time = \"\";\n duration = Math.round(duration);\n var hours = Math.floor(duration / (60 * 60));\n var divisor4minutes = duration % (60 * 60);\n var minutes = Math.floor(divisor4minutes / 60);\n // if (!minutes) {\n // minutes = \"00\";\n // }\n\n // var divisor4seconds = divisor4minutes % 60;\n // var seconds = Math.ceil(divisor4seconds);\n // if (!seconds) {\n // seconds = \"00\";\n // }\n\n if (hours) {\n time = hours + \"h \";\n }\n time += minutes + \" min\";\n return time;\n };\n\n /**\n * convert distance in meters or kilometers\n *\n * @param {Number} distance - distance in meters\n *\n * @returns {String} distance in km\n *\n * @private\n */\n Route.prototype._convertDistance = function (distance) {\n var d = \"\";\n var distanceKm = parseInt(distance / 1000, 10);\n if (!distanceKm) {\n d = parseInt(distance, 10) + \" m\"; // arrondi !\n } else {\n d = distanceKm + \" km\";\n }\n return d;\n };\n return Route;\n}(ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default.a);\n/* harmony default export */ __webpack_exports__[\"default\"] = (Route);\n\n// Expose Route as ol.control.Route (for a build bundle)\nif (window.ol && window.ol.control) {\n window.ol.control.Route = Route;\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9HcC8uL3NyYy9PcGVuTGF5ZXJzL0NvbnRyb2xzL1JvdXRlLmpzP2QxNTYiXSwibmFtZXMiOlsibG9nZ2VyIiwiTG9nZ2VyIiwiZ2V0TG9nZ2VyIiwiUm91dGUiLCJDb250cm9sIiwib3B0aW9ucyIsIlR5cGVFcnJvciIsImluaXRpYWxpemUiLCJfY29udGFpbmVyIiwiX2NyZWF0ZU1haW5Db250YWluZXJFbGVtZW50IiwiX2NvbnRhaW5lckVsZW1lbnQiLCJlbGVtZW50IiwiYXBwZW5kQ2hpbGQiLCJjYWxsIiwidGFyZ2V0IiwicmVuZGVyIiwiX19wcm90b19fIiwicHJvdG90eXBlIiwiT2JqZWN0IiwiY3JlYXRlIiwiVXRpbHMiLCJhc3NpZ24iLCJSb3V0ZURPTSIsImNvbnN0cnVjdG9yIiwic2V0TWFwIiwibWFwIiwiX2luaXRDb250YWluZXIiLCJvcHRzIiwiY29udHJvbCIsIkJ1dHRvbkV4cG9ydCIsInNlbGYiLCJvbiIsImUiLCJkaXNwYXRjaEV2ZW50IiwidHlwZSIsImNvbnRlbnQiLCJkcmFnZ2FibGUiLCJEcmFnZ2FibGUiLCJkcmFnRWxlbWVudCIsIl9wYW5lbFJvdXRlQ29udGFpbmVyIiwiX3BhbmVsSGVhZGVyUm91dGVDb250YWluZXIiLCJnZXRUYXJnZXRFbGVtZW50IiwiZ2V0Q29sbGFwc2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0aGlzLCB7XG4gICAgICAgICAgICBlbGVtZW50IDogdGhpcy5fY29udGFpbmVyRWxlbWVudCB8fCB0aGlzLl9jb250YWluZXIsXG4gICAgICAgICAgICB0YXJnZXQgOiBvcHRpb25zLnRhcmdldCxcbiAgICAgICAgICAgIHJlbmRlciA6IG9wdGlvbnMucmVuZGVyXG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIC8vIEluaGVyaXRzIGZyb20gb2wuY29udHJvbC5Db250cm9sXG4gICAgaWYgKENvbnRyb2wpIFJvdXRlLl9fcHJvdG9fXyA9IENvbnRyb2w7XG5cbiAgICAvKipcbiAgICAgKiBAbGVuZHMgbW9kdWxlOlJvdXRlXG4gICAgICovXG4gICAgUm91dGUucHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZShDb250cm9sLnByb3RvdHlwZSwge30pO1xuXG4gICAgLy8gb24gcsOpY3Vww6hyZSBsZXMgbcOpdGhvZGVzIGRlIGxhIGNsYXNzZSBjb21tdW5lIFJvdXRlRE9NXG4gICAgVXRpbHMuYXNzaWduKFJvdXRlLnByb3RvdHlwZSwgUm91dGVET00pO1xuXG4gICAgLyoqXG4gICAgICogQ29uc3RydWN0b3IgKGFsaWFzKVxuICAgICAqIEBwcml2YXRlXG4gICAgICovXG4gICAgUm91dGUucHJvdG90eXBlLmNvbnN0cnVjdG9yID0gUm91dGU7XG5cbiAgICAvKipcbiAgICAgKiBPdmVyd3JpdGUgT3BlbkxheWVycyBzZXRNYXAgbWV0aG9kXG4gICAgICpcbiAgICAgKiBAcGFyYW0ge29sLk1hcH0gbWFwIC0gTWFwLlxuICAgICAqL1xuICAgIFJvdXRlLnByb3RvdHlwZS5zZXRNYXAgPSBmdW5jdGlvbiAobWFwKSB7XG4gICAgICAgIGlmIChtYXApIHtcbiAgICAgICAgICAgIC8vIGVucmljaGlzc2VtZW50IGR1IERPTSBkdSBjb250YWluZXJcbiAgICAgICAgICAgIHRoaXMuX2NvbnRhaW5lciA9IHRoaXMuX2luaXRDb250YWluZXIobWFwKTtcblxuICAgICAgICAgICAgLy8gYWpvdXQgZCd1biBib3V0b24gZCdleHBvcnRcbiAgICAgICAgICAgIGlmICh0aGlzLm9wdGlvbnMuZXhwb3J0KSB7XG4gICAgICAgICAgICAgICAgdmFyIG9wdHMgPSBVdGlscy5hc3NpZ24oeyBjb250cm9sIDogdGhpcyB9LCB0aGlzLm9wdGlvbnMuZXhwb3J0KTtcbiAgICAgICAgICAgICAgICB0aGlzLmV4cG9ydCA9IG5ldyBCdXR0b25FeHBvcnQob3B0cyk7XG4gICAgICAgICAgICAgICAgdGhpcy5leHBvcnQucmVuZGVyKCk7XG4gICAgICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzO1xuICAgICAgICAgICAgICAgIHRoaXMuZXhwb3J0Lm9uKFwiZXhwb3J0OmNvbXB1dGVcIiwgKGUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5kaXNwYXRjaEV2ZW50KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgOiBcImV4cG9ydDpjb21wdXRlXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50IDogZS5jb250ZW50XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBtb2RlIFwiZHJhZ2dhYmxlXCJcbiAgICAgICAgICAgIGlmICh0aGlzLmRyYWdnYWJsZSkge1xuICAgICAgICAgICAgICAgIERyYWdnYWJsZS5kcmFnRWxlbWVudChcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fcGFuZWxSb3V0ZUNvbnRhaW5lcixcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fcGFuZWxIZWFkZXJSb3V0ZUNvbnRhaW5lcixcbiAgICAgICAgICAgICAgICAgICAgbWFwLmdldFRhcmdldEVsZW1lbnQoKVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG4gICAgICAg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q29sbGFwc2VkID0gZnVuY3Rpb24gKGNvbGxhcHNlZCkge1xuICAgICAgICBpZiAoY29sbGFwc2VkID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIGxvZ2dlci5sb2coXCJbRVJST1JdIFJvdXRlOnNldENvbGxhcHNlZCAtIG1pc3NpbmcgY29sbGFwc2VkIHBhcmFtZXRlclwiKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBpZiAoKGNvbGxhcHNlZCAmJiB0aGlzLmNvbGxhcHNlZCkgfHwgKCFjb2xsYXBzZWQgJiYgIXRoaXMuY29sbGFwc2VkKSkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIGlmIChjb2xsYXBzZWQpIHtcbiAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKFwiR1Byb3V0ZVBhbmVsQ2xvc2UtXCIgKyB0aGlzLl91aWQpLmNsaWNrKCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChcIkdQc2hvd1JvdXRlLVwiICsgdGhpcy5fdWlkKS5jbGljaygpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuY29sbGFwc2VkID0gY29sbGFwc2VkO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBHZXQgdmVjdG9yIGxheWVyIHdoZXJlIGdlb0pzb24gcm91dGUgaXMgZHJhd25cbiAgICAgKlxuICAgICAqIEByZXR1cm5zIHtPYmplY3R9IGxheWVyIC0gb2wubGF5ZXIuVmVjdG9yIHJvdXRlIGxheWVyXG4gICAgICovXG4gICAgUm91dGUucHJvdG90eXBlLmdldExheWVyID0gZnVuY3Rpb24gKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5fZ2VvanNvblNlY3Rpb25zO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBTZXQgdmVjdG9yIGxheWVyIHdoZXJlIHJvdXRlIGdlb21ldHJ5IGlzIGRyYXduXG4gICAgICpcbiAgICAgKiBAcGFyYW0ge09iamVjdH0gbGF5ZXIgLSBvbC5sYXllci5WZWN0b3Igcm91dGUgbGF5ZXJcbiAgICAgKi9cbiAgICBSb3V0ZS5wcm90b3R5cGUuc2V0TGF5ZXIgPSBmdW5jdGlvbiAobGF5ZXIpIHtcbiAgICAgICAgaWYgKCFsYXllcikge1xuICAgICAgICAgICAgdGhpcy5fZ2VvanNvblNlY3Rpb25zID0gbnVsbDtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghKGxheWVyIGluc3RhbmNlb2YgVmVjdG9yTGF5ZXIpKSB7XG4gICAgICAgICAgICBsb2dnZXIubG9nKFwibm8gdmFsaWQgbGF5ZXIgZ2l2ZW4gZm9yIGhvc3RpbmcgZHJhd24gZmVhdHVyZXMuXCIpO1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gYXBwbGljYXRpb24gZGVzIHN0eWxlc1xuICAgICAgICBsYXllci5zZXRTdHlsZSh0aGlzLl9kZWZhdWx0RmVhdHVyZVN0eWxlKTtcbiAgICAgICAgLy8gc2F1dmVnYXJkZVxuICAgICAgICB0aGlzLl9nZW9qc29uU2VjdGlvbnMgPSBsYXllcjtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogR2V0IHZlY3RvciBsYXllclxuICAgICAqXG4gICAgICogQHJldHVybnMge1N0cmluZ30gZ2VvanNvbiAtIEdlb0pTT04gZm9ybWF0IGxheWVyXG4gICAgICovXG4gICAgUm91dGUucHJvdG90eXBlLmdldEdlb0pTT04gPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeSh0aGlzLl9nZW9qc29uT2JqZWN0KTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogU2V0IHZlY3RvciBsYXllclxuICAgICAqXG4gICAgICogQHBhcmFtI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ZhbHVlc0VsZW1lbnQocG9pbnRzKTtcblxuICAgICAgICAvLyBzZXQgdHJhbnNwb3J0IG1vZGVcbiAgICAgICAgdmFyIHRyYW5zcG9ydGRpdjtcbiAgICAgICAgaWYgKHRoaXMuX2N1cnJlbnRUcmFuc3BvcnQgPT09IFwiUGlldG9uXCIpIHtcbiAgICAgICAgICAgIHRyYW5zcG9ydGRpdiA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKFwiR1Byb3V0ZVRyYW5zcG9ydFBlZGVzdHJpYW4tXCIgKyB0aGlzLl91aWQpO1xuICAgICAgICAgICAgaWYgKHRyYW5zcG9ydGRpdikge1xuICAgICAgICAgICAgICAgIHRyYW5zcG9ydGRpdi5jaGVja2VkID0gXCJ0cnVlXCI7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0cmFuc3BvcnRkaXYgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChcIkdQcm91dGVUcmFuc3BvcnRDYXItXCIgKyB0aGlzLl91aWQpO1xuICAgICAgICAgICAgaWYgKHRyYW5zcG9ydGRpdikge1xuICAgICAgICAgICAgICAgIHRyYW5zcG9ydGRpdi5jaGVja2VkID0gXCJ0cnVlXCI7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBzZXQgY29tcHV0YXRpb24gbW9kZVxuICAgICAgICB2YXIgY29tcHV0YXRpb25kaXYgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChcIkdQcm91dGVDb21wdXRhdGlvblNlbGVjdC1cIiArIHRoaXMuX3VpZCk7XG4gICAgICAgIGlmIChjb21wdXRhdGlvbmRpdikge1xuICAgICAgICAgICAgY29tcHV0YXRpb25kaXYudmFsdWUgPSB0aGlzLl9jdXJyZW50Q29tcHV0YXRpb247XG4gICAgICAgIH1cblxuICAgICAgICAvLyBzZXQgZXhjbHVzaW9uc1xuICAgICAgICB2YXIgdG9sbElucHV0ID0gZG9jdW1l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MjIyMjIyMjIyMjIC8vXG5cbiAgICAvKipcbiAgICAgKiBJbml0aWFsaXplIHJvdXRlIGNvbnRyb2wgKGNhbGxlZCBieSBSb3V0ZSBjb25zdHJ1Y3RvcilcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvcHRpb25zIC0gY29uc3RydWN0b3Igb3B0aW9uc1xuICAgICAqIEBwcml2YXRlXG4gICAgICovXG4gICAgUm91dGUucHJvdG90eXBlLmluaXRpYWxpemUgPSBmdW5jdGlvbiAob3B0aW9ucykge1xuICAgICAgICB0aGlzLl9jaGVja0lucHV0T3B0aW9ucyhvcHRpb25zKTtcblxuICAgICAgICAvLyBzZXQgZGVmYXVsdCBvcHRpb25zXG4gICAgICAgIHRoaXMub3B0aW9ucyA9IHtcbiAgICAgICAgICAgIGNvbGxhcHNlZCA6IHRydWUsXG4gICAgICAgICAgICBkcmFnZ2FibGUgOiBmYWxzZSxcbiAgICAgICAgICAgIGV4cG9ydCA6IGZhbHNlLFxuICAgICAgICAgICAgZ3JhcGhzIDogW1wiVm9pdHVyZVwiLCBcIlBpZXRvblwiXSxcbiAgICAgICAgICAgIGV4Y2x1c2lvbnMgOiB7XG4gICAgICAgICAgICAgICAgdG9sbCA6IGZhbHNlLFxuICAgICAgICAgICAgICAgIHR1bm5lbCA6IGZhbHNlLFxuICAgICAgICAgICAgICAgIGJyaWRnZSA6IGZhbHNlXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcm91dGVPcHRpb25zIDoge1xuICAgICAgICAgICAgICAgIG9sZFJvdXRlU2VydmljZSA6IHRydWVcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBhdXRvY29tcGxldGVPcHRpb25zIDoge30sXG4gICAgICAgICAgICBsYXllckRlc2NyaXB0aW9uIDoge1xuICAgICAgICAgICAgICAgIHRpdGxlIDogXCJJdGluw6lyYWlyZVwiLFxuICAgICAgICAgICAgICAgIGRlc2NyaXB0aW9uIDogXCJJdGluw6lyYWlyZSB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PSBmdW5jdGlvbiAob3B0aW9ucykge1xuICAgICAgICAvLyB2w6lyaWZpY2F0aW9uIGRlcyBvcHRpb25zXG4gICAgICAgIC8vIG1vZGUgZGUgdHJhbnNwb3J0XG4gICAgICAgIGlmIChvcHRpb25zLmdyYXBocykge1xuICAgICAgICAgICAgLy8gb24gbmUgcGVybWV0IHBhcyBkZSBwYXNzZXIgdW4gdGFibGVhdSB2aWRlIDogb24gc3DDqWNpZmllIGF1IG1vaW5zIHVuIGdyYXBoXG4gICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShvcHRpb25zLmdyYXBocykgJiYgb3B0aW9ucy5ncmFwaHMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBvcHRpb25zLmdyYXBocy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMuZ3JhcGhzW2ldID09PSBcInN0cmluZ1wiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5ncmFwaHNbaV0udG9Mb3dlckNhc2UoKSA9PT0gXCJwaWV0b25cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnMuZ3JhcGhzW2ldID0gXCJQaWV0b25cIjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLmdyYXBoc1tpXS50b0xvd2VyQ2FzZSgpID09PSBcInZvaXR1cmVcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnMuZ3JhcGhzW2ldID0gXCJWb2l0dXJlXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsb2dnZXIubG9nKFwiW29sLmNvbnRyb2wuUm91dGVdIEVSUk9SIDogcGFyYW1ldGVyICdncmFwaHMnIGVsZW1lbnRzIHNob3VsZCBiZSBvZiB0eXBlICdzdHJpbmcnXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5ncmFwaHNbaV0gPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBsb2dnZXIud2FybihcIidncmFwaHMnIHBhcmFtZXRlciBzaG91bGQgYmUgYW4gYXJyYXlcIik7XG4gICAgICAgICAgICAgICAgb3B0aW9ucy5ncmFwaHMgPSBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gY29sbGFwc2VkXG4gICAgICAgIGlmIChvcHRpb25zLmNvbGxhcHNlZCA9PT0gXCJ0cnVlXCIpIHtcbiAgICAgICAgICAgIG9wdGlvbnMuY29sbGFwc2VkID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICBpZiAob3B0aW9ucy5jb2xsYXBzZWQgPT09IFwiZmFsc2VcIikge1xuICAgICAgICAgICAgb3B0aW9ucy5jb2xsYXBzZWQgPSBmYWxzZTtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBpbml0aWFsaXplIGNvbXBvbmVudCBjb250YWluZXIgKERPTSlcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7T2JqZWN0fSBtYXAgLSB0aGUgbWFwXG4gICAgICpcbiAgICAgKiBAcmV0dXJucyB7RE9NRWxlbWVudH0gRE9NIGVsZW1lbnRcbiAgICAgKlxuICAgICAqIEBwcml2YXRlXG4gICAgICovXG4gICAgUm91dGUucHJvdG90eXBlLl9pbml0Q29udGFpbmVyID0gZnVuY3Rpb24gKG1hcCkge1xuICAgICAgICAvLyBnZXQgbWFpbiBjb250YWluZXJcbiAgICAgICAgdmFyIGNvbnRhaW5lciA9IHRoaXMuX2NvbnRhaW5lcjtcblxuICAgICAgICB2YXIgaW5wdXRTa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dXNpb24pLmxlbmd0aCA9PT0gMCkpIHtcbiAgICAgICAgICAgIHRoaXMub3B0aW9ucy5leGNsdXNpb25zID0ge1xuICAgICAgICAgICAgICAgIHRvbGwgOiBmYWxzZSxcbiAgICAgICAgICAgICAgICB0dW5uZWwgOiBmYWxzZSxcbiAgICAgICAgICAgICAgICBicmlkZ2UgOiBmYWxzZVxuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIG9wdGlvblxuICAgICAgICBpZiAoZXhjbHVzaW9uICYmIHR5cGVvZiBleGNsdXNpb24gPT09IFwib2JqZWN0XCIgJiYgT2JqZWN0LmtleXMoZXhjbHVzaW9uKS5sZW5ndGgpIHtcbiAgICAgICAgICAgIGZvciAodmFyIGsgaW4gZXhjbHVzaW9uKSB7XG4gICAgICAgICAgICAgICAgaWYgKGV4Y2x1c2lvbi5oYXNPd25Qcm9wZXJ0eShrKSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoZXhjbHVzaW9uW2tdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9jdXJyZW50RXhjbHVzaW9ucy5wdXNoKGspO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gVE9ETyBvcHRpb24gc3VyIGxlIHNlcnZpY2VcbiAgICAgICAgdmFyIHNlcnZpY2VPcHRpb25zID0gdGhpcy5vcHRpb25zLnJvdXRlT3B0aW9ucztcbiAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoc2VydmljZU9wdGlvbnMuZXhjbHVzaW9ucykpIHtcbiAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRFeGNsdXNpb25zID0gc2VydmljZU9wdGlvbnMuZXhjbHVzaW9ucztcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiB0aGlzIG1ldGhvZCBpcyBjYWxsZWQgYnkgdGhpcy5pbml0aW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jdG9yKHtcbiAgICAgICAgICAgICAgICBhcGlLZXkgOiB0aGlzLm9wdGlvbnMuYXBpS2V5IHx8IG51bGwsXG4gICAgICAgICAgICAgICAgdGFnIDoge1xuICAgICAgICAgICAgICAgICAgICBpZCA6IGNvdW50LFxuICAgICAgICAgICAgICAgICAgICBncm91cElkIDogdGhpcy5fdWlkLFxuICAgICAgICAgICAgICAgICAgICBsYWJlbCA6IFwiRXRhcGVcIixcbiAgICAgICAgICAgICAgICAgICAgbWFya2VyT3B0cyA6IHRoaXMub3B0aW9ucy5tYXJrZXJzT3B0c1tcInN0YWdlc1wiXSxcbiAgICAgICAgICAgICAgICAgICAgZGlzcGxheSA6IGZhbHNlLFxuICAgICAgICAgICAgICAgICAgICByZW1vdmVPcHRpb24gOiB0cnVlXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBhdXRvY29tcGxldGVPcHRpb25zIDogdGhpcy5vcHRpb25zLmF1dG9jb21wbGV0ZU9wdGlvbnMgfHwgbnVsbFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBzdGVwLnNldE1hcChtYXApO1xuICAgICAgICAgICAgdGhpcy5fYWRkRm9ybVBvaW50c0V2ZW50TGlzdGVuZXJzKHN0ZXApO1xuICAgICAgICAgICAgcG9pbnRzLnB1c2goc3RlcC5fY29udGFpbmVyKTtcbiAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRQb2ludHMucHVzaChzdGVwKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIHBvaW50IGQnYXJyaXbDqWVcbiAgICAgICAgdmFyIGVuZCA9IG5ldyBMb2NhdGlvblNlbGVjdG9yKHtcbiAgICAgICAgICAgIGFwaUtleSA6IHRoaXMub3B0aW9ucy5hcGlLZXkgfHwgbnVsbCxcbiAgICAgICAgICAgIHRhZyA6IHtcbiAgICAgICAgICAgICAgICBpZCA6IGNvdW50LFxuICAgICAgICAgICAgICAgIGdyb3VwSWQgOiB0aGlzLl91aWQsXG4gICAg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5lcikge1xuICAgICAgICAgICAgLy8gZGlzcGxheSBmb3JtIG9uIG9yaWdpbiBsYWJlbCBjbGlja1xuICAgICAgICAgICAgZm9ybVBvaW50Ll9pbnB1dExhYmVsQ29udGFpbmVyLmFkZEV2ZW50TGlzdGVuZXIoXG4gICAgICAgICAgICAgICAgXCJjbGlja1wiLFxuICAgICAgICAgICAgICAgIChlKSA9PiB0aGlzLm9uUm91dGVPcmlnaW5MYWJlbENsaWNrKGUpXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgLy8gbWluaW1pemUgZm9ybSBvbiBpbnB1dCBzaG93IHBvaW50ZXIsIGFuZCBzZXQgbWFwIGV2ZW50IGxpc3RlbmVycyAoc2VlIHRoaXMub25Sb3V0ZU9yaWdpblBvaW50ZXJDbGljaylcbiAgICAgICAgICAgIGZvcm1Qb2ludC5faW5wdXRTaG93UG9pbnRlci5hZGRFdmVudExpc3RlbmVyKFxuICAgICAgICAgICAgICAgIFwiY2xpY2tcIixcbiAgICAgICAgICAgICAgICAoZSkgPT4gdGhpcy5vblJvdXRlT3JpZ2luUG9pbnRlckNsaWNrKGUsIGZvcm1Qb2ludClcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBpZiAoZm9ybVBvaW50Ll9yZW1vdmVQb2ludEVsZW1lbnQpIHtcbiAgICAgICAgICAgICAgICBmb3JtUG9pbnQuX3JlbW92ZVBvaW50RWxlbWVudC5hZGRFdmVudExpc3RlbmVyKFxuICAgICAgICAgICAgICAgICAgICBcImNsaWNrXCIsXG4gICAgICAgICAgICAgICAgICAgIChlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsb2dnZXIudHJhY2UoXCJjbGljayBvbiBfcmVtb3ZlUG9pbnRFbGVtZW50XCIsIGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gTW92aW5nIHVwIGV4Y2x1c2lvbnMgcGljdG9cbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHZhciBleGNsdXNpb25zUGljdG9Ub3AgPSBjb250ZXh0Ll9zaG93Um91dGVFeGNsdXNpb25zRWxlbWVudC5zdHlsZS50b3A7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBjb250ZXh0Ll9zaG93Um91dGVFeGNsdXNpb25zRWxlbWVudC5zdHlsZS50b3AgPSAocGFyc2VJbnQoZXhjbHVzaW9uc1BpY3RvVG9wLCAxMCkgLSAzMykudG9TdHJpbmcoKSArIFwicHhcIjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoZm9ybVBvaW50Ll9hZGRQb2ludEVsZW1lbnQpIHtcbiAgICAgICAgICAgICAgICBmb3JtUG9pbnQuX2FkZFBvaW50RWxlbWVudC5hZGRFdmVudExpc3RlbmVyKFxuICAgICAgICAgICAgICAgICAgICBcImNsaWNrXCIsXG4gICAgICAgICAgICAgICAgICAgIChlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsb2dnZXIudHJhY2UoXCJjbGljayBvbiBfYWRkUG9pbnRFbGVtZW50XCIsIGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gTW92aW5nIGRvd24gZXhjbHVzaW9ucyBwaWN0b1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gdmFyIGV4Y2x1c2lvbnNQaWN0b1RvcCA9IGNvbnRleHQuX3Nob3dSb3V0ZUV4Y2x1c2lvbnNFbGVtZW50LnN0eWxlLnRvcDtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNvbnRleHQuX3Nob3dSb3V0ZUV4Y2x1c2lvbnNFbGVtZW50LnN0eWxlLnRvcCA9IChwYXJzZUludChleGNsdXNpb25zUGljdG9Ub3AsIDEwKSArIDMzKS50b1N0cmluZygpICsgXCJweFwiO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmIChmb3JtUG9pbnQuX2lucHV0TGFiZWxDb250YWluZXIuYXR0YWNoRXZlbnQpIHtcbiAgICAgICAgICAgIC8vIGF0dGFjaEV2ZW50OiBJbnRlcm5ldCBleHBsb3JlciBldmVudCBsaXN0ZW5lcnMgbWFuYWdlbWVudFxuICAgICAgICAgICAgZm9ybVBvaW50Ll9pbnB1dExhYmVsQ29udGFpbmVyLmF0dGFjaEV2ZW50KFxuICAgICAgICAgICAgICAgIFwib25jbGlja1wiLFxuICAgICAgICAgICAgICAgIChlKSA9PiB0aGlzLm9uUm91dGVPcmlnaW5MYWJlbENsaWNrKGUpXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgZm9ybVBvaW50Ll9pbnB1dFNob3dQb2ludGVyLmF0dGFjaEV2ZW50KFxuICAgICAgICAgICAgICAgIFwib25jbGlja1wiLFxuICAgICAgICAgICAgICAgIChlKSA9PiB0aGlzLm9uUm91dGVPcmlnaW5Qb2ludGVyQ2xpY2soZSwgZm9ybVBvaW50KVxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGlmIChmb3JtUG9pbnQuX3JlbW92ZVBvaW50RWxlbWVudCkge1xuICAgICAgICAgICAgICAgIGZvcm1Qb2ludC5fcmVtb3ZlUG9pbnRFbGVtZW50LmF0dGFjaEV2ZW50KFxuICAgICAgICAgICAgICAgICAgICBcIm9uY2xpY2tcIixcbiAgICAgICAgICAgICAgICAgICAgKGUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIE1vdmluZyB1cCBleGNsdXNpb25zIHBpY3RvXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB2YXIgZXhjbHVzaW9uc1BpY3RvVG9wID0gY29udGV4dC5fc2hvd1JvdXRlRXhjbHVzaW9uc0VsZW1lbnQuc3R5bGUudG9wO1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gY29udGV4dC5fc2hvd1JvdXRlRXhjbHVzaW9uc0VsZW1lbnQuc3R5bGUudG9wID0gKHBhcnNlSW50KGV4Y2x1c2lvbnNQaWN0b1RvcCwgMTApIC0gMzMpLnRvU3RyaW5nKCkgKyBcInB4XCI7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGZvcm1Qb2ludC5fYWRkUG9pbnRFbGVtZW50KSB7XG4gICAgICAgICAgICAgICAgZm9ybVBvaW50Ll9hZGRQb2ludEVsZW1lbnQuYXR0YWNoRXZlbnQoXG4gICAgICAgICAgICAgICAgICAgIFwib25jbGlja1wiLFxuICAgICAgICAgICAgICAgICAgICAoZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gTW92aW5nIGRvd24gZXhjbHVzaW9ucyBwaWN0b1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gdmFyIGV4Y2x1c2lvbnNQaWN0b1RvcCA9IGNvbnRleHQuX3Nob3dSb3V0ZUV4Y2x1c2lvbnNFbGVtZW50LnN0eWxlLnRvcDtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNvbnRleHQuX3Nob3dSb3V0ZUV4Y2x1c2lvbnNFbGVtZW50LnN0eWxlLnRvcCA9IChwYXJzZUludChleGNsdXNpb25zUGljdG9Ub3AsIDEwKSArIDMzKS50b1N0cmluZygpICsgXCJweFwiO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH07XG5cbiAgICAvLyAjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIC8vXG4gICAgLy8gIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMgaGFuZGxlcnMgZXZlbnRzIHRvIGRvbSAjIyMjIyMjIyMjIyMjIyMjIyMjIyAvL1xuICAgIC8vICMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy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SBkZXBhcnQgKGluZm86IHBvaW50c1swXS5nZXRDb29yZGluYXRlIGVzdCBkdSB0eXBlIFtsb24sIGxhdF0sIGVuIEVQU0c6NDMyNilcbiAgICAgICAgdmFyIHN0YXJ0O1xuICAgICAgICBpZiAocG9pbnRzWzBdICYmIHBvaW50c1swXS5nZXRDb29yZGluYXRlKSB7XG4gICAgICAgICAgICB2YXIgc3RhcnRDb29yZGluYXRlID0gcG9pbnRzWzBdLmdldENvb3JkaW5hdGUoKTtcbiAgICAgICAgICAgIHN0YXJ0ID0ge1xuICAgICAgICAgICAgICAgIHggOiBzdGFydENvb3JkaW5hdGVbMF0sXG4gICAgICAgICAgICAgICAgeSA6IHN0YXJ0Q29vcmRpbmF0ZVsxXVxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGxvZ2dlci5sb2coXCJzdGFydFwiLCBzdGFydCk7XG4gICAgICAgIH1cblxuICAgICAgICAvLyAtIHBvaW50IGQnYXJyaXbDqWVcbiAgICAgICAgdmFyIGVuZDtcbiAgICAgICAgdmFyIGVuZFBvaW50ID0gcG9pbnRzW3BvaW50cy5sZW5ndGggLSAxXTtcbiAgICAgICAgaWYgKGVuZFBvaW50ICYmIGVuZFBvaW50LmdldENvb3JkaW5hdGUpIHtcbiAgICAgICAgICAgIHZhciBlbmRDb29yZGluYXRlID0gZW5kUG9pbnQuZ2V0Q29vcmRpbmF0ZSgpO1xuICAgICAgICAgICAgZW5kID0ge1xuICAgICAgICAgICAgICAgIHggOiBlbmRDb29yZGluYXRlWzBdLFxuICAgICAgICAgICAgICAgIHkgOiBlbmRDb29yZGluYXRlWzFdXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgbG9nZ2VyLmxvZyhcImVuZFwiLCBlbmQpO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gLSBsZXMgw6l0YXBlc1xuICAgICAgICB2YXIgc3RlcCA9IFtdO1xuICAgICAgICBmb3IgKHZhciBpID0gMTsgaSA8IHBvaW50cy5sZW5ndGggLSAxOyBpKyspIHtcbiAgICAgICAgICAgIGlmIChwb2ludHNbaV0gJiYgcG9pbnRzW2ldLmdldENvb3JkaW5hdGUpIHtcbiAgICAgICAgICAgICAgICB2YXIgaUNvb3JkaW5hdGUgPSBwb2ludHNbaV0uZ2V0Q29vcmRpbmF0ZSgpO1xuICAgICAgICAgICAgICAgIGlmIChpQ29vcmRpbmF0ZSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgY29vcmRpbmF0ZSA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHggOiBpQ29vcmRpbmF0ZVswXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHkgOiBpQ29vcmRpbmF0ZVsxXVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICBsb2dnZXIubG9nKFwic3RlcFwiLCBjb29yZGluYXRlKTtcbiAgICAgICAgICAgICAgICAgICAgc3RlcC5wdXNoKGNvb3JkaW5hdGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIHZhbGV1cnMgc2VsZWN0aW9ubsOpZXNcbiAgICAgICAgdGhpcy5fY3VycmVudFRyYW5zcG9ydCA9IG9wdGlvbnMudHJhbnNwb3J0O1xuICAgICAgICB0aGlzLl9jdXJyZW50Q29tcHV0YXRpb24gPSBvcHRpb25zLmNvbXB1dGF0aW9uO1xuICAgICAgICB0aGlzLl9jdXJyZW50RXhjbHVzaW9ucyA9IG9wdGlvbnMuZXhjbHVzaW9ucztcblxuICAgICAgICAvLyBvbiByZWN1cGVyZSBsZXMgw6l2ZW50dWVsbGVzIG9wdGlvbnMgZHUgc2VydmljZSBwYXNzw6llcyBwYXIgbCd1dGlsaXNhdGV1clxuICAgICAgICB2YXIgcm91dGVPcHRpb25zID0gdGhpcy5vcHRpb25zLnJvdXRlT3B0aW9ucztcblxuICAgICAgICAvLyBnZXN0aW9uIGR1IHByb3RvY29sZSBldCBkdSB0aW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ICAgICAgICByb3V0ZU9wdGlvbnMub25TdWNjZXNzLmNhbGwoY29udGV4dCwgcmVzdWx0cyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIC8vIGNhbGxiYWNrIG9uRmFpbHVyZVxuICAgICAgICAgICAgb25GYWlsdXJlIDogZnVuY3Rpb24gKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgY29udGV4dC5faGlkZVdhaXRpbmdDb250YWluZXIoKTtcbiAgICAgICAgICAgICAgICBjb250ZXh0Ll9jbGVhclJvdXRlUmVzdWx0c0RldGFpbHMoKTtcbiAgICAgICAgICAgICAgICBsb2dnZXIubG9nKGVycm9yLm1lc3NhZ2UpO1xuICAgICAgICAgICAgICAgIGlmIChiT25GYWlsdXJlKSB7XG4gICAgICAgICAgICAgICAgICAgIHJvdXRlT3B0aW9ucy5vbkZhaWx1cmUuY2FsbChjb250ZXh0LCBlcnJvcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9O1xuXG4gICAgLyoqXG4gICAgICogdGhpcyBtZXRob2QgaXMgY2FsbGVkIGJ5IGV2ZW50ICdjbGljaycgb24gJ0dQbG9jYXRpb25PcmlnaW5MYWJlbCcgbGFiZWxcbiAgICAgKiBhbmQgc2V0ICdHUHJvdXRlRm9ybScgQ1NTIGNsYXNzIHRvIFwiXCIgKG5vcm1hbClcbiAgICAgKlxuICAgICAqIEBwYXJhbSB7T2JqZWN0fSByb3V0ZUNvbnRyb2wgLSBjb250ZXh0IDogcm91dGUgQ29udHJvbCAodGhpcylcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqL1xuICAgIFJvdXRlLnByb3RvdHlwZS5vblJvdXRlT3JpZ2luTGFiZWxDbGljayA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdGhpcy5fZm9ybVJvdXRlQ29udGFpbmVyLmNsYXNzTmFtZSA9IFwiXCI7XG4gICAgICAgIC8vI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IFwiR1Byb3V0ZUNvbXBvbmVudEhpZGRlblwiKVxuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5fZm9ybVJvdXRlQ29udGFpbmVyLmNsYXNzTmFtZSA9PT0gXCJHUHJvdXRlRm9ybU1pbmlcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fZm9ybVJvdXRlQ29udGFpbmVyLmNsYXNzTmFtZSA9IFwiXCI7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgb2xPYnNlcnZhYmxlVW5CeUtleSh0aGlzLmxpc3RlbmVyS2V5KTtcbiAgICAgICAgICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgICAgICAgICogZXZlbnQgdHJpZ2dlcmVkIGF0IHRoZSBlbmQgb2YgZHJhd2luZyBpbnB1dFxuICAgICAgICAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgICAgICAgICogQGV2ZW50IHJvdXRlOmRyYXdlbmRcbiAgICAgICAgICAgICAgICAgICAgKi9cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5kaXNwYXRjaEV2ZW50KFwicm91dGU6ZHJhd2VuZFwiKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAqIGV2ZW50IHRyaWdnZXJlZCBhdCB0aGUgc3RhcnQgb2YgZHJhd2luZyBpbnB1dFxuICAgICAgICAgICAgKlxuICAgICAgICAgICAgKiBAZXZlbnQgcm91dGU6ZHJhd3N0YXJ0XG4gICAgICAgICAgICAqL1xuICAgICAgICAgICAgdGhpcy5kaXNwYXRjaEV2ZW50KFwicm91dGU6ZHJhd3N0YXJ0XCIpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgLy8gc2kgb24gZMOpc2VsZWN0aW9ubmUgbGUgcG9pbnRlciwgb24gcsOpdGFibGl0IGxlIGZvcm11bGFpcmUgZW4gbW9kZSBub3JtYWxcbiAgICAg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AgdmFyIG1hcFByb2ogPSBtYXAuZ2V0VmlldygpLmdldFByb2plY3Rpb24oKS5nZXRDb2RlKCk7XG4gICAgICAgICAgICBpZiAobWFwUHJvaiAhPT0gXCJFUFNHOjQzMjZcIikge1xuICAgICAgICAgICAgICAgIGJvdW5kcyA9IG9sVHJhbnNmb3JtRXh0ZW50UHJvaihib3VuZHMsIFwiRVBTRzo0MzI2XCIsIG1hcFByb2opO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbWFwLmdldFZpZXcoKS5maXQoYm91bmRzLCBtYXAuZ2V0U2l6ZSgpKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIHNhdXZlZ2FyZGUgZGUgbCdldGF0IGRlcyByZXN1bHRhdHNcbiAgICAgICAgdGhpcy5fY3VycmVudFJvdXRlSW5mb3JtYXRpb25zID0gcmVzdWx0cztcblxuICAgICAgICAvKipcbiAgICAgICAgICogZXZlbnQgdHJpZ2dlcmVkIHdoZW4gdGhlIGNvbXB1dGUgaXMgZmluaXNoZWRcbiAgICAgICAgICpcbiAgICAgICAgICogQGV2ZW50IHJvdXRlOmNvbXB1dGVcbiAgICAgICAgICogQHByb3BlcnR5IHtPYmplY3R9IHR5cGUgLSBldmVudFxuICAgICAgICAgKiBAcHJvcGVydHkge09iamVjdH0gdGFyZ2V0IC0gaW5zdGFuY2UgUm91dGVcbiAgICAgICAgICogQGV4YW1wbGVcbiAgICAgICAgICogUm91dGUub24oXCJyb3V0ZTpjb21wdXRlXCIsIGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAqICAgY29uc29sZS5sb2coZS50YXJnZXQuZ2V0RGF0YSgpKTtcbiAgICAgICAgICogfSlcbiAgICAgICAgICovXG4gICAgICAgIHRoaXMuZGlzcGF0Y2hFdmVudCh7XG4gICAgICAgICAgICB0eXBlIDogXCJyb3V0ZTpjb21wdXRlXCJcbiAgICAgICAgfSk7XG5cbiAgICAgICAgLy8gbWlzZSDDoCBqb3VyIGR1IGNvbnRyb2xl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ICAgICAgICAgdHlwZSA6IFwiRmVhdHVyZVwiLFxuICAgICAgICAgICAgICAgICAgICBjcnMgOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlIDogXCJuYW1lXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0aWVzIDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWUgOiBcIkVQU0c6NDMyNlwiXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIGdlb21ldHJ5IDogZ2VvbWV0cnlcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICBdXG4gICAgICAgIH07XG5cbiAgICAgICAgdmFyIGdlb2pzb25mb3JtYXQgPSBuZXcgR2VvSlNPTkV4dGVuZGVkKHtcbiAgICAgICAgICAgIGRlZmF1bHREYXRhUHJvamVjdGlvbiA6IFwiRVBTRzo0MzI2XCIsXG4gICAgICAgICAgICBkZWZhdWx0U3R5bGUgOiBzdHlsZVxuXG4gICAgICAgIH0pO1xuICAgICAgICB2YXIgZmVhdHVyZXMgPSBnZW9qc29uZm9ybWF0LnJlYWRGZWF0dXJlcyhcbiAgICAgICAgICAgIGdlb2pzb25PYmplY3QsIHtcbiAgICAgICAgICAgICAgICBkYXRhUHJvamVjdGlvbiA6IFwiRVBTRzo0MzI2XCIsXG4gICAgICAgICAgICAgICAgZmVhdHVyZVByb2plY3Rpb24gOiBcIkVQU0c6Mzg1N1wiXG4gICAgICAgICAgICB9XG4gICAgICAgICk7XG5cbiAgICAgICAgLy8gYWpvdXQgZGUgbGEgZ8Opb23DqXRyaWUgY29tbWUgbm91dmVsbGUgY291Y2hlIHZlY3RldXIgw6AgbGEgY2FydGVcbiAgICAgICAgdGhpcy5fZ2VvanNvblJvdXRlID0gbmV3IFZlY3RvckxheWVyKHtcbiAgICAgICAgICAgIHNvdXJjZSA6IG5ldyBWZWN0b3JTb3VyY2Uoe1xuIC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mFtZVwiLFxuICAgICAgICAgICAgICAgIHByb3BlcnRpZXMgOiB7XG4gICAgICAgICAgICAgICAgICAgIG5hbWUgOiBcIkVQU0c6NDMyNlwiXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGZlYXR1cmVzIDogW11cbiAgICAgICAgfTtcblxuICAgICAgICAvLyAyLiBSZW1wbGlzc2FnZSBkZSBsJ29iamV0IGdlb0pTT04gOiBham91dCBkZXMgZ8Opb23DqXRyaWVzIGRlIGNoYXF1ZSBpbnN0cnVjdGlvblxuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGluc3RydWN0aW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIG8gPSBpbnN0cnVjdGlvbnNbaV07XG4gICAgICAgICAgICB2YXIgaWQgPSBpICsgMTtcblxuICAgICAgICAgICAgdmFyIGNvb3JkcyA9IG8uZ2VvbWV0cnkuY29vcmRpbmF0ZXM7XG4gICAgICAgICAgICBmb3IgKHZhciBqID0gMDsgaiA8IGNvb3Jkcy5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgICAgIC8vIHJlbWFycXVlIDogbGVzIGNvb3Jkb25uw6llcyBzb250IGF1IGZvcm1hdCBzdHJpbmcsIMOgIGNvbnZlcnRpciBlbiBub21icmVzXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBjb29yZHNbal1bMF0gPT09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgY29vcmRzW2pdWzBdID0gcGFyc2VGbG9hdChjb29yZHNbal1bMF0pO1xuICAgICAgICAgICAgICAgICAgICBjb29yZHNbal1bMV0gPSBwYXJzZUZsb2F0KGNvb3Jkc1tqXVsxXSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0aGlzLl9nZW9qc29uT2JqZWN0LmZlYXR1cmVzLnB1c2goe1xuICAgICAgICAgICAgICAgIHR5cGUgOiBcIkZlYXR1cmVcIixcbiAgICAgICAgICAgICAgICBnZW9tZXRyeSA6IG8uZ2VvbWV0cnksXG4gICAgICAgICAgICAgICAgcHJvcGVydGllcyA6IHtcbiAgICAgICAgICAgICAgICAgICAgcG9wdXBDb250ZW50IDogXCIoXCIgKyBpZCArIFwiKSBkaXN0YW5jZSA6IFwiICsgdGhpcy5fY29udmVydERpc3RhbmNlKG8uZGlzdGFuY2UpICtcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiIC8gdGVtcHMgOiBcIiArIHRoaXMuX2NvbnZlcnRTZWNvbmRzVG9UaW1lKG8uZHVyYXRpb24pXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBpZCA6IGlkXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEFqb3V0IGR1IHBvaW50IGRlIGRlcGFydCBkdSB0cmFjw6lcbiAgICAgICAgdGhpcy5fZ2VvanNvbk9iamVjdC5mZWF0dXJlcy5wdXNoKHtcbiAgICAgICAgICAgIHR5cGUgOiBcIkZlYXR1cmVcIixcbiAgICAgICAgICAgIGdlb21ldHJ5IDoge1xuICAgICAgICAgICAgICAgIHR5cGUgOiBcIlBvaW50XCIsXG4gICAgICAgICAgICAgICAgY29vcmRpbmF0ZXMgOiB0aGlzLl9jdXJyZW50UG9pbnRzWzBdLmdldENvb3JkaW5hdGUoKVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHByb3BlcnRpZXMgOiB7XG4gICAgICAgICAgICAgICAgZGVzY3JpcHRpb24gOiBcIlBvaW50IGRlIGTDqXBhcnRcIixcbiAgICAgICAgICAgICAgICBcIm1hcmtlci1zeW1ib2xcIiA6IHRoaXMub3B0aW9ucy5tYXJrZXJzT3B0cy5kZXBhcnR1cmUudXJsXG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIC8vIEFqb3V0IGRlcyBwb2ludHMgZCfDqXRhcGVzXG4gICAgICAgIGZvciAodmFyIGsgPSAxOyBrIDwgdGhpcy5fY3VycmVudFBvaW50cy5sZW5ndGggLSAxOyBrKyspIHtcbiAgICAgICAgICAgIGlmICh0aGlzLl9jdXJyZW50UG9pbnRzW2tdICYmIHRoaXMuX2N1cnJlbnRQb2ludHNba10uZ2V0Q29vcmRpbmF0ZSkge1xuICAgICAgICAgICAgICAgIHZhciBjb29yZGluYXRlcyA9IHRoaXMuX2N1cnJlbnRQb2ludHNba10uZ2V0Q29vcmRpbmF0ZSgpO1xuICAgICAgICAgICAgICAgIGlmIChjb29yZGluYXRlcykge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9nZW9qc29uT2JqZWN0LmZlYXR1cmVzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZSA6IFwiRmVhdHVyZVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgZ2VvbWV0cnkgOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZSA6IFwiUG9pbnRcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb29yZGluYXRlcyA6IGNvb3JkaW5hdGVzXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgcHJvcGVydGllcyA6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjcmlwdGlvbiA6IFwiUG9pbnQgZCfDqXRhcGVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIm1hcmtlci1zeW1ib2xcIiA6IHRoaXMub3B0aW9ucy5tYXJrZXJzT3B0cy5zdGFnZXMudXJsXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEFqb3V0IGR1IHBvaW50IGQnYXJyaXbDqWUgZHUgdHJhY8OpXG4gICAgICAgIHRoaXMuX2dlb2pzb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BTaSB1biBsYXllciBzd2l0Y2hlciBlc3QgcHLDqXNlbnQgZGFucyBsYSBjYXJ0ZSwgb24gbHVpIGFmZmVjdGUgZGVzIGluZm9ybWF0aW9ucyBwb3VyIGNldHRlIGNvdWNoZVxuICAgICAgICBtYXAuZ2V0Q29udHJvbHMoKS5mb3JFYWNoKFxuICAgICAgICAgICAgKGNvbnRyb2wpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoY29udHJvbCBpbnN0YW5jZW9mIExheWVyU3dpdGNoZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gdW4gbGF5ZXIgc3dpdGNoZXIgZXN0IHByw6lzZW50IGRhbnMgbGEgY2FydGVcbiAgICAgICAgICAgICAgICAgICAgdmFyIGxheWVySWQgPSB0aGlzLl9nZW9qc29uU2VjdGlvbnMuZ3BMYXllcklkO1xuICAgICAgICAgICAgICAgICAgICAvLyBvbiBuJ2Fqb3V0ZSBkZXMgaW5mb3JtYXRpb25zIHF1ZSBzJ2lsIG4neSBlbiBhIHBhcyBkw6lqw6AgKHNpIGxlIHRpdHJlIGVzdCBsZSBudW3DqXJvIHBhciBkw6lmYXV0KVxuICAgICAgICAgICAgICAgICAgICBpZiAoY29udHJvbC5fbGF5ZXJzW2xheWVySWRdLnRpdGxlID09PSBsYXllcklkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sLmFkZExheWVyKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2dlb2pzb25TZWN0aW9ucywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZSA6IHRoaXMub3B0aW9ucy5sYXllckRlc2NyaXB0aW9uLnRpdGxlICsgXCIgKFwiICsgZ3JhcGggKyBcIilcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzY3JpcHRpb24gOiB0aGlzLm9wdGlvbnMubGF5ZXJEZXNjcmlwdGlvbi5kZXNjcmlwdGlvblxuICAgICAgICAgICAgICAgIC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ggIT09IDApIHtcbiAgICAgICAgICAgIHZhciBnb29kUG9pbnRzID0gW107XG4gICAgICAgICAgICBmb3IgKHZhciBrID0gMDsgayA8IHBvaW50cy5sZW5ndGg7IGsrKykge1xuICAgICAgICAgICAgICAgIGlmIChwb2ludHNba10uaWQuaW5kZXhPZih0aGlzLl91aWQpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICBnb29kUG9pbnRzLnB1c2gocG9pbnRzW2tdKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBvbiBib3VjbGUgc3VyIGxlcyBwb2ludHMgaW50ZXJtw6lkaWFpcmVzXG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMTsgaSA8IChnb29kUG9pbnRzLmxlbmd0aCAtIDEpOyBpKyspIHtcbiAgICAgICAgICAgICAgICAvLyBvbiB2YSByZWdhcmRlciBsZXMgY2xhc3NlcyBhc3NvY2nDqWVzXG4gICAgICAgICAgICAgICAgdmFyIGNsYXNzTGlzdCA9IGdvb2RQb2ludHNbaV0uY2xhc3NMaXN0O1xuICAgICAgICAgICAgICAgIGlmIChjbGFzc0xpc3QubGVuZ3RoICE9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgY2xhc3NMaXN0Lmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY2xhc3NMaXN0W2pdID09PSBcIkdQbG9jYXRpb25TdGFnZUZsZXhJbnB1dFwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gc2kgbCfDqWzDqW1lbnQgZXN0IHZpc2libGUsIG9uIGxlIHN1cHByaW1lIGVuIHNpbXVsYW50IHVuIGNsaWMgc3VyIGxhIGNyb2l4ICh4KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHRoaXMuX2FkZFVJRChcIkdQbG9jYXRpb25TdGFnZVJlbW92ZV9cIiArIChpICsgMSkpKS5jbGljaygpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIHRoaXMgbWV0aG9kIGlzIGNhbGxlZCBieSB0aGlzLm9uUm91dGVDb21wdXRhdGlvblN1Ym1pdCgpIChpbiBjYXNlIG9mIGZhaWx1cmUpXG4gICAgICogYW5kIGl0IGNsZWFycyBhbGwgcm91dGUgaW5zdHJ1Y3Rpb25zLlxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBSb3V0ZS5wcm90b3R5cGUuX2NsZWFyUm91dGVSZXN1bHRzRGV0YWlscyA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdGhpcy5fY3VycmVudFJvdXRlSW5mb3JtYXRpb25zID0gbnVsbDtcblxuICAgICAgICAvLyBkb2l0IG9uIG5ldHRveWVyIGxlIGNvbnRhaW5lciBcIkdQcm91dGVSZXN1bHRzRGV0YWlsc1wiID9cbiAgICAgICAgLy8gaWwgc2VyYSBkZSB0b3V0ZSBmYcOnb24gw6ljcmFzw6kgcGFyIGxhIHByb2NoYWluZSByZXF1w6p0ZS4uLlxuICAgICAgICBpZiAodGhpcy5fcmVzdWx0c1JvdXRlRGV0YWlsc0NvbnRhaW5lcikge1xuICAgICAgICAgICAgdmFyIGRldGFpbHNEaXYgPSB0aGlzLl9yZXN1bHRzUm91dGVEZXRhaWxzQ29udGFpbmVyO1xuICAgICAgICAgICAgaWYgKGRldGFpbHNEaXYuY2hpbGRFbGVtZW50Q291bnQpIHtcbiAgICAgICAgICAgICAgICB3aGlsZSAoZGV0YWlsc0Rpdi5maXJzdENoaWxkKSB7XG4gICAgICAgICAgICAgICAgICAgIGRldGFpbHNEaXYucmVtb3ZlQ2hpbGQoZGV0YWlsc0Rpdi5maXJzdENo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2V0LmlkLnNwbGl0KFwiX1wiKVsxXVswXSwgMTApIC0gMTtcbiAgICAgICAgICAgIC8vIGV0IG9uIGNhY2hlIGxlcyBhdXRyZXMgcsOpc3VsdGF0cyBkJ2F1dG9jb21wbMOpdGlvbiAoc2F1ZiBjZWx1aSBzdXIgbGVxdWVsIG9uIGNsaXF1ZSlcbiAgICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgdGhpcy5fY3VycmVudFBvaW50cy5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgICAgIGlmIChqICE9PSBwYXJzZUludChwb2ludElkLCAxMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudFBvaW50c1tqXS5faGlkZVN1Z2dlc3RlZExvY2F0aW9uKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgLy8gc2kgb24gY2xpcXVlIGFpbGxldXJzIGRhbnMgbGUgRE9NIGR1IGNvbnRyb2wsIG9uIGNhY2hlIHRvdXMgbGVzIHLDqXN1bHRhdHMgZCdhdXRvY29tcGzDqXRpb25cbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGhpcy5fY3VycmVudFBvaW50cy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRQb2ludHNbaV0uX2hpZGVTdWdnZXN0ZWRMb2NhdGlvbigpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcblxuICAgIC8qKlxuICAgICAqIHRoaXMgbWV0aG9kIGRpc3BsYXlzIHdhaXRpbmcgY29udGFpbmVyIGFuZCBzZXRzIGEgdGltZW91dFxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKi9cbiAgICBSb3V0ZS5wcm90b3R5cGUuX2Rpc3BsYXlXYWl0aW5nQ29udGFpbmVyID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB0aGlzLl93YWl0aW5nQ29udGFpbmVyLmNsYXNzTmFtZSA9IFwiR1Byb3V0ZUNhbGNXYWl0aW5nQ29udGFpbmVyVmlzaWJsZVwiO1xuICAgICAgICB0aGlzLl93YWl0aW5nID0gdHJ1ZTtcblxuICAgICAgICAvLyBtaXNlIGVuIHBsYWNlIGQndW4gdGltZW91dCBwb3VyIHLDqWluaXRpYWxpc2VyIGxlIHBhbmVsIChjYWNoZXIgbGEgcGF0aWVuY2UpXG4gICAgICAgIC8vIHNpIG9uIGVzdCB0b3Vqb3VycyBlbiBhdHRlbnRlIChzaSBsYSByZXF1w6p0ZSBlc3QgYmxvcXXDqWUgcGFyIGV4ZW1wbGUpXG4gICAgICAgIC8vIGNlY2kgZXN0IHZyYWksIHVuaXF1ZW1lbnQgc3VyIGxlIHByb3RvY29sZSBKU09OUCAhXG4gICAgICAgIHZhciBvcHRzID0gdGhpcy5vcHRpb25zLnJvdXRlT3B0aW9ucztcbiAgICAgICAgaWYgKG9wdHMgJiYgb3B0cy50aW1lT3V0KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5fdGltZXIpIHtcbiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGhpcy5fdGltZXIpO1xuICAgICAgICAgICAgICAgIHRoaXMuX3RpbWVyID0gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBjb250ZXh0ID0gdGhpcztcbiAgICAgICAgICAgIHRoaXMuX3RpbWVyID0gc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgaWYgKGNvbnRleHQuX3dhaXRpbmcgPT09IHRydWUpIHtcbiAgICAgICAgICAgICAgICAgICAgY29udGV4dC5faGlkZVdhaXRpbmdDb250YWluZXIoKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBpZiAoY29udGV4dC5fdGltZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dChjb250ZXh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cbiAgICAgICAgdGltZSArPSBtaW51dGVzICsgXCIgbWluXCI7XG4gICAgICAgIHJldHVybiB0aW1lO1xuICAgIH07XG5cbiAgICAvKipcbiAgICAgKiBjb252ZXJ0IGRpc3RhbmNlIGluIG1ldGVycyBvciBraWxvbWV0ZXJzXG4gICAgICpcbiAgICAgKiBAcGFyYW0ge051bWJlcn0gZGlzdGFuY2UgLSBkaXN0YW5jZSBpbiBtZXRlcnNcbiAgICAgKlxuICAgICAqIEByZXR1cm5zIHtTdHJpbmd9IGRpc3RhbmNlIGluIGttXG4gICAgICpcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqL1xuICAgIFJvdXRlLnByb3RvdHlwZS5fY29udmVydERpc3RhbmNlID0gZnVuY3Rpb24gKGRpc3RhbmNlKSB7XG4gICAgICAgIHZhciBkID0gXCJcIjtcblxuICAgICAgICB2YXIgZGlzdGFuY2VLbSA9IHBhcnNlSW50KGRpc3RhbmNlIC8gMTAwMCwgMTApO1xuICAgICAgICBpZiAoIWRpc3RhbmNlS20pIHtcbiAgICAgICAgICAgIGQgPSBwYXJzZUludChkaXN0YW5jZSwgMTApICsgXCIgbVwiOyAvLyBhcnJvbmRpICFcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGQgPSBkaXN0YW5jZUttICsgXCIga21cIjtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBkO1xuICAgIH07XG5cbiAgICByZXR1cm4gUm91dGU7XG59KENvbnRyb2wpKTtcblxuZXhwb3J0IGRlZmF1bHQgUm91dGU7XG5cbi8vIEV4cG9zZSBSb3V0ZSBhcyBvbC5jb250cm9sLlJvdXRlIChmb3IgYSBidWlsZCBidW5kbGUpXG5pZiAod2luZG93Lm9sICYmIHdpbmRvdy5vbC5jb250cm9sKSB7XG4gICAgd2luZG93Lm9sLmNvbnRyb2wuUm91dGUgPSBSb3V0ZTtcbn1cbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/OpenLayers/Controls/Route.js\n"); /***/ }), diff --git a/current/dist/openlayers/GpPluginOpenLayers-src.css b/current/dist/openlayers/GpPluginOpenLayers-src.css index 68697dfa1..ad5ec77ff 100644 --- a/current/dist/openlayers/GpPluginOpenLayers-src.css +++ b/current/dist/openlayers/GpPluginOpenLayers-src.css @@ -9,8 +9,8 @@ * @copyright copyright (c) IGN * @license CeCILL-B * @author IGN - * @version 3.3.4 - * @date 28/08/2023 + * @version 3.4.0-beta + * @date 21/09/2023 * */ diff --git a/current/dist/openlayers/GpPluginOpenLayers-src.js b/current/dist/openlayers/GpPluginOpenLayers-src.js index e6bd83342..ece4579dc 100644 --- a/current/dist/openlayers/GpPluginOpenLayers-src.js +++ b/current/dist/openlayers/GpPluginOpenLayers-src.js @@ -9,8 +9,8 @@ * @copyright copyright (c) IGN * @license CeCILL-B * @author IGN - * @version 3.3.4 - * @date 28/08/2023 + * @version 3.4.0-beta + * @date 21/09/2023 * */ @@ -740,60 +740,60 @@ var _package_json__WEBPACK_IMPORTED_MODULE_0___namespace = /*#__PURE__*/__webpac /* harmony import */ var _Common_Styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4); /* harmony import */ var _Styles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23); /* harmony import */ var _GfiUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42); -/* harmony import */ var _Formats_KML__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(110); -/* harmony import */ var _Formats_GPX__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(127); -/* harmony import */ var _Formats_GeoJSON__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(131); -/* harmony import */ var _Sources_WMTS__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(133); -/* harmony import */ var _Layers_SourceWMTS__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(135); -/* harmony import */ var _Layers_SourceWMS__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(139); -/* harmony import */ var _Layers_LayerWMTS__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(140); -/* harmony import */ var _Layers_LayerWMS__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(143); -/* harmony import */ var _Layers_LayerMapBox__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(144); -/* harmony import */ var _Controls_LayerSwitcher__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(195); -/* harmony import */ var _Controls_GetFeatureInfo__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(200); -/* harmony import */ var _Controls_SearchEngine__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(202); -/* harmony import */ var _Controls_MousePosition__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(207); -/* harmony import */ var _Controls_Drawing__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(218); -/* harmony import */ var _Controls_Route__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(226); -/* harmony import */ var _Controls_Isocurve__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(233); -/* harmony import */ var _Controls_ReverseGeocode__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(235); -/* harmony import */ var _Controls_LocationSelector__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(227); -/* harmony import */ var _Controls_LayerImport__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(237); -/* harmony import */ var _Controls_GeoportalAttribution__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(259); -/* harmony import */ var _Controls_Utils_Markers__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(115); -/* harmony import */ var _Controls_ElevationPath__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(253); -/* harmony import */ var _Controls_Measures_MeasureLength__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(261); -/* harmony import */ var _Controls_Measures_MeasureArea__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(263); -/* harmony import */ var _Controls_Measures_MeasureAzimuth__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(265); -/* harmony import */ var _Controls_Export__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(229); -/* harmony import */ var _Controls_Editor_Style__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(243); -/* harmony import */ var _Controls_Editor_Filter__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(246); -/* harmony import */ var _Controls_Editor_Layer__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(248); -/* harmony import */ var _Controls_Editor_Themes__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(245); -/* harmony import */ var _Controls_Editor_Legend__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(247); -/* harmony import */ var _Controls_Editor_Group__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(249); -/* harmony import */ var _Controls_Editor_Search__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(250); -/* harmony import */ var _Controls_Editor__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(240); -/* harmony import */ var _Common_Utils_AutoLoadConfig__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(267); -/* harmony import */ var _CRS_AutoLoadCRS__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(268); +/* harmony import */ var _Formats_KML__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(111); +/* harmony import */ var _Formats_GPX__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(128); +/* harmony import */ var _Formats_GeoJSON__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(132); +/* harmony import */ var _Sources_WMTS__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(134); +/* harmony import */ var _Layers_SourceWMTS__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(136); +/* harmony import */ var _Layers_SourceWMS__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(140); +/* harmony import */ var _Layers_LayerWMTS__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(141); +/* harmony import */ var _Layers_LayerWMS__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(144); +/* harmony import */ var _Layers_LayerMapBox__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(145); +/* harmony import */ var _Controls_LayerSwitcher__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(196); +/* harmony import */ var _Controls_GetFeatureInfo__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(201); +/* harmony import */ var _Controls_SearchEngine__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(203); +/* harmony import */ var _Controls_MousePosition__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(208); +/* harmony import */ var _Controls_Drawing__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(219); +/* harmony import */ var _Controls_Route__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(227); +/* harmony import */ var _Controls_Isocurve__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(234); +/* harmony import */ var _Controls_ReverseGeocode__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(236); +/* harmony import */ var _Controls_LocationSelector__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(228); +/* harmony import */ var _Controls_LayerImport__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(238); +/* harmony import */ var _Controls_GeoportalAttribution__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(260); +/* harmony import */ var _Controls_Utils_Markers__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(116); +/* harmony import */ var _Controls_ElevationPath__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(254); +/* harmony import */ var _Controls_Measures_MeasureLength__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(262); +/* harmony import */ var _Controls_Measures_MeasureArea__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(264); +/* harmony import */ var _Controls_Measures_MeasureAzimuth__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(266); +/* harmony import */ var _Controls_Export__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(230); +/* harmony import */ var _Controls_Editor_Style__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(244); +/* harmony import */ var _Controls_Editor_Filter__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(247); +/* harmony import */ var _Controls_Editor_Layer__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(249); +/* harmony import */ var _Controls_Editor_Themes__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(246); +/* harmony import */ var _Controls_Editor_Legend__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(248); +/* harmony import */ var _Controls_Editor_Group__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(250); +/* harmony import */ var _Controls_Editor_Search__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(251); +/* harmony import */ var _Controls_Editor__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(241); +/* harmony import */ var _Common_Utils_AutoLoadConfig__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(268); +/* harmony import */ var _CRS_AutoLoadCRS__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(269); /* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(50); -/* harmony import */ var _CRS_CRS__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(210); -/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(126); +/* harmony import */ var _CRS_CRS__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(211); +/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(127); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "olUtils", function() { return _Common_Utils__WEBPACK_IMPORTED_MODULE_42__["default"]; }); -/* harmony import */ var _Common_Utils_LayerUtils__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(137); +/* harmony import */ var _Common_Utils_LayerUtils__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(138); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LayerUtils", function() { return _Common_Utils_LayerUtils__WEBPACK_IMPORTED_MODULE_43__["default"]; }); -/* harmony import */ var _Common_Utils_ProxyUtils__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(109); +/* harmony import */ var _Common_Utils_ProxyUtils__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(110); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ProxyUtils", function() { return _Common_Utils_ProxyUtils__WEBPACK_IMPORTED_MODULE_44__["default"]; }); -/* harmony import */ var _Common_Utils_ColorUtils__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(114); +/* harmony import */ var _Common_Utils_ColorUtils__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(115); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorUtils", function() { return _Common_Utils_ColorUtils__WEBPACK_IMPORTED_MODULE_45__["default"]; }); -/* harmony import */ var _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(208); +/* harmony import */ var _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(209); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MathUtils", function() { return _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_46__["default"]; }); -/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(108); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(109); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Logger", function() { return _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_47__["default"]; }); function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } @@ -1033,7 +1033,7 @@ if (window.ol) { /* 3 */ /***/ (function(module) { -module.exports = JSON.parse("{\"name\":\"geoportal-extensions\",\"description\":\"French Geoportal Extensions for OpenLayers, Leaflet and iTowns libraries\",\"version\":\"2.8.5\",\"date\":\"28/08/2023\",\"leafletExtName\":\"French Geoportal Extension for Leaflet\",\"leafletExtVersion\":\"2.3.3\",\"olExtName\":\"French Geoportal Extension for OpenLayers\",\"olExtVersion\":\"3.3.4\",\"itownsExtName\":\"French Geoportal Extension for Itowns\",\"itownsExtVersion\":\"2.4.3\",\"main\":\"dist/leaflet/GpPluginLeaflet.js, dist/openlayers/GpPluginOpenLayers.js, dist/itowns/GpPluginItowns.js\",\"types\":\"dist/leaflet/index.d.ts, dist/openlayers/index.d.ts, dist/itowns/index.d.ts\",\"module\":\"src/Leaflet/index.js, src/OpenLayers/index.js, src/Itowns/index.js\",\"directories\":{},\"scripts\":{\"setup\":\"npm install\",\"clean\":\"echo \\\"Warning: target not yet implemented!\\\" && exit 0\",\"eslint\":\"eslint src/\",\"test\":\"npm run test:serve\",\"test:serve\":\"cd test && webpack-dev-server --hot --config webpack.test.serve.js\",\"sample\":\"npm run sample:serve\",\"sample:serve\":\"npm run sample:ol:serve\",\"sample:itowns:serve\":\"webpack-dev-server --config build/webpack/webpack.config.itowns --mode=development --https --open-page samples/index-itowns-map.html --content-base . --output-public-path '/dist/itowns/' --port 9001 --open\",\"sample:leaflet:serve\":\"webpack-dev-server --config build/webpack/webpack.config.leaflet --mode=development --https --open-page samples/index-leaflet-map.html --content-base . --output-public-path '/dist/leaflet/' --port 9001 --open\",\"sample:ol:serve\":\"webpack-dev-server --config build/webpack/webpack.config.openlayers --mode=development --https --open-page samples/index-openlayers-map.html --content-base . --output-public-path '/dist/openlayers/' --port 9001 --open\",\"generate-types:ol\":\"npx tsc -p build/types/tsconfig-openlayers.json\",\"generate-types:leaflet\":\"npx tsc -p build/types/tsconfig-leaflet.json\",\"generate-types:itowns\":\"npx tsc -p build/types/tsconfig-itowns.json\",\"generate-jsdoc:ol\":\"jsdoc -c build/jsdoc/jsdoc-openlayers.json\",\"generate-jsdoc:leaflet\":\"jsdoc -c build/jsdoc/jsdoc-leaflet.json\",\"generate-jsdoc:itowns\":\"jsdoc -c build/jsdoc/jsdoc-itowns.json\",\"doc\":\"npm run doc:serve\",\"doc:serve\":\"npm run doc:ol:serve\",\"doc:itowns:serve\":\"webpack-dev-server --hot --config build/webpack/webpack.config.itowns --content-base jsdoc/itowns --port 9001 --open\",\"doc:leaflet:serve\":\"webpack-dev-server --hot --config build/webpack/webpack.config.leaflet --content-base jsdoc/leaflet --port 9001 --open\",\"doc:ol:serve\":\"webpack-dev-server --hot --config build/webpack/webpack.config.openlayers --content-base jsdoc/openlayers --port 9001 --open\",\"build:dev\":\"npm-run-all --print-label --print-name build:*:dev\",\"build:prod\":\"npm-run-all --print-label --print-name build:*:prod\",\"build:src\":\"npm-run-all --print-label --print-name build:*:src\",\"build\":\"npm-run-all --print-label --print-name build:*:*\",\"build:itowns\":\"npm-run-all --print-label --print-name build:itowns:*\",\"build:itowns:dev\":\"webpack --config build/webpack/webpack.config.itowns --mode=development\",\"build:itowns:prod\":\"webpack --config build/webpack/webpack.config.itowns --mode=production\",\"build:itowns:src\":\"webpack --config build/webpack/webpack.config.itowns --mode=none\",\"build:ol\":\"npm-run-all --print-label --print-name build:ol:*\",\"build:ol:dev\":\"webpack --config build/webpack/webpack.config.openlayers --mode=development\",\"build:ol:prod\":\"webpack --config build/webpack/webpack.config.openlayers --mode=production\",\"build:ol:src\":\"webpack --config build/webpack/webpack.config.openlayers --mode=none\",\"build:leaflet\":\"npm-run-all --print-label --print-name build:leaflet:*\",\"build:leaflet:dev\":\"webpack --config build/webpack/webpack.config.leaflet --mode=development\",\"build:leaflet:prod\":\"webpack --config build/webpack/webpack.config.leaflet --mode=production\",\"build:leaflet:src\":\"webpack --config build/webpack/webpack.config.leaflet --mode=none\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/IGNF/geoportal-extensions.git\"},\"author\":\"IGNF\",\"keywords\":[\"geoportail\",\"javascript\",\"OpenLayers\",\"Leaflet\",\"Itowns\",\"3D\"],\"license\":\"CECILL-B\",\"bugs\":{\"url\":\"https://github.com/IGNF/geoportal-extensions/issues\"},\"homepage\":\"https://github.com/IGNF/geoportal-extensions#readme\",\"dependencies\":{\"@mapbox/mapbox-gl-style-spec\":\"13.20.1\",\"eventbusjs\":\"0.2.0\",\"geoportal-access-lib\":\"3.3.3\",\"itowns\":\"2.38.2\",\"leaflet\":\"1.7.1\",\"leaflet-draw\":\"1.0.4\",\"loglevel\":\"^1.6.7\",\"markdown-toc\":\"^1.2.0\",\"ol\":\"6.9.0\",\"ol-mapbox-style\":\"6.7.0\",\"proj4\":\"2.7.5\",\"proj4leaflet\":\"1.0.2\",\"sortablejs\":\"1.14.0\",\"three\":\"0.137.5\",\"typescript\":\"^4.5.5\",\"whatwg-fetch\":\"3.0.0\"},\"devDependencies\":{\"@babel/core\":\"^7.4.4\",\"@babel/plugin-transform-template-literals\":\"^7.7.4\",\"@babel/preset-env\":\"^7.4.4\",\"babel-loader\":\"^8.0.5\",\"chai\":\"^4.2.0\",\"chalk\":\"^4.0.0\",\"clean-webpack-plugin\":\"^3.0.0\",\"copy-webpack-plugin\":\"^5.0.3\",\"core-js\":\"^3.6.4\",\"css-loader\":\"^3.4.2\",\"eslint\":\"^6.8.0\",\"eslint-config-standard\":\"^14.1.1\",\"eslint-loader\":\"^4.0.0\",\"eslint-plugin-import\":\"^2.17.2\",\"eslint-plugin-node\":\"^11.1.0\",\"eslint-plugin-promise\":\"^4.1.1\",\"eslint-plugin-standard\":\"^4.0.0\",\"exports-loader\":\"^0.7.0\",\"expose-loader\":\"^0.7.5\",\"fs-extra\":\"^9.0.0\",\"handlebars\":\"^4.7.5\",\"handlebars-layouts\":\"^3.1.4\",\"html-webpack-plugin\":\"^4.0.4\",\"jsdoc-webpack-plugin\":\"^0.3.0\",\"mini-css-extract-plugin\":\"^0.9.0\",\"mocha\":\"^7.1.1\",\"mocha-loader\":\"^5.0.0\",\"npm-run-all\":\"^4.1.5\",\"optimize-css-assets-webpack-plugin\":\"^5.0.1\",\"path\":\"^0.12.7\",\"replace-bundle-webpack-plugin\":\"^1.0.0\",\"requirejs\":\"^2.3.6\",\"responsive-loader\":\"^1.2.0\",\"speed-measure-webpack-plugin\":\"^1.3.0\",\"string-template\":\"^1.0.0\",\"style-loader\":\"^1.1.3\",\"terser-webpack-plugin\":\"^2.0.0\",\"url-loader\":\"^4.0.0\",\"webpack\":\"^4.30.0\",\"webpack-cli\":\"^3.3.1\",\"webpack-dev-server\":\"^3.3.1\",\"webpack-node-externals\":\"^1.7.2\"}}"); +module.exports = JSON.parse("{\"name\":\"geoportal-extensions\",\"description\":\"French Geoportal Extensions for OpenLayers, Leaflet and iTowns libraries\",\"version\":\"2.9.0\",\"date\":\"21/09/2023\",\"leafletExtName\":\"French Geoportal Extension for Leaflet\",\"leafletExtVersion\":\"2.4.0-beta\",\"olExtName\":\"French Geoportal Extension for OpenLayers\",\"olExtVersion\":\"3.4.0-beta\",\"itownsExtName\":\"French Geoportal Extension for Itowns\",\"itownsExtVersion\":\"2.4.3\",\"main\":\"dist/leaflet/GpPluginLeaflet.js, dist/openlayers/GpPluginOpenLayers.js, dist/itowns/GpPluginItowns.js\",\"types\":\"dist/leaflet/index.d.ts, dist/openlayers/index.d.ts, dist/itowns/index.d.ts\",\"module\":\"src/Leaflet/index.js, src/OpenLayers/index.js, src/Itowns/index.js\",\"directories\":{},\"scripts\":{\"setup\":\"npm install\",\"clean\":\"echo \\\"Warning: target not yet implemented!\\\" && exit 0\",\"eslint\":\"eslint src/\",\"test\":\"npm run test:serve\",\"test:serve\":\"cd test && webpack-dev-server --hot --config webpack.test.serve.js\",\"sample\":\"npm run sample:serve\",\"sample:serve\":\"npm run sample:ol:serve\",\"sample:itowns:serve\":\"webpack-dev-server --config build/webpack/webpack.config.itowns --mode=development --https --open-page samples/index-itowns-map.html --content-base . --output-public-path '/dist/itowns/' --port 9001 --open\",\"sample:leaflet:serve\":\"webpack-dev-server --config build/webpack/webpack.config.leaflet --mode=development --https --open-page samples/index-leaflet-map.html --content-base . --output-public-path '/dist/leaflet/' --port 9001 --open\",\"sample:ol:serve\":\"webpack-dev-server --config build/webpack/webpack.config.openlayers --mode=development --https --open-page samples/index-openlayers-map.html --content-base . --output-public-path '/dist/openlayers/' --port 9001 --open\",\"generate-types:ol\":\"npx tsc -p build/types/tsconfig-openlayers.json\",\"generate-types:leaflet\":\"npx tsc -p build/types/tsconfig-leaflet.json\",\"generate-types:itowns\":\"npx tsc -p build/types/tsconfig-itowns.json\",\"generate-jsdoc:ol\":\"jsdoc -c build/jsdoc/jsdoc-openlayers.json\",\"generate-jsdoc:leaflet\":\"jsdoc -c build/jsdoc/jsdoc-leaflet.json\",\"generate-jsdoc:itowns\":\"jsdoc -c build/jsdoc/jsdoc-itowns.json\",\"doc\":\"npm run doc:serve\",\"doc:serve\":\"npm run doc:ol:serve\",\"doc:itowns:serve\":\"webpack-dev-server --hot --config build/webpack/webpack.config.itowns --content-base jsdoc/itowns --port 9001 --open\",\"doc:leaflet:serve\":\"webpack-dev-server --hot --config build/webpack/webpack.config.leaflet --content-base jsdoc/leaflet --port 9001 --open\",\"doc:ol:serve\":\"webpack-dev-server --hot --config build/webpack/webpack.config.openlayers --content-base jsdoc/openlayers --port 9001 --open\",\"build:dev\":\"npm-run-all --print-label --print-name build:*:dev\",\"build:prod\":\"npm-run-all --print-label --print-name build:*:prod\",\"build:src\":\"npm-run-all --print-label --print-name build:*:src\",\"build\":\"npm-run-all --print-label --print-name build:*:*\",\"build:itowns\":\"npm-run-all --print-label --print-name build:itowns:*\",\"build:itowns:dev\":\"webpack --config build/webpack/webpack.config.itowns --mode=development\",\"build:itowns:prod\":\"webpack --config build/webpack/webpack.config.itowns --mode=production\",\"build:itowns:src\":\"webpack --config build/webpack/webpack.config.itowns --mode=none\",\"build:ol\":\"npm-run-all --print-label --print-name build:ol:*\",\"build:ol:dev\":\"webpack --config build/webpack/webpack.config.openlayers --mode=development\",\"build:ol:prod\":\"webpack --config build/webpack/webpack.config.openlayers --mode=production\",\"build:ol:src\":\"webpack --config build/webpack/webpack.config.openlayers --mode=none\",\"build:leaflet\":\"npm-run-all --print-label --print-name build:leaflet:*\",\"build:leaflet:dev\":\"webpack --config build/webpack/webpack.config.leaflet --mode=development\",\"build:leaflet:prod\":\"webpack --config build/webpack/webpack.config.leaflet --mode=production\",\"build:leaflet:src\":\"webpack --config build/webpack/webpack.config.leaflet --mode=none\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/IGNF/geoportal-extensions.git\"},\"author\":\"IGNF\",\"keywords\":[\"geoportail\",\"javascript\",\"OpenLayers\",\"Leaflet\",\"Itowns\",\"3D\"],\"license\":\"CECILL-B\",\"bugs\":{\"url\":\"https://github.com/IGNF/geoportal-extensions/issues\"},\"homepage\":\"https://github.com/IGNF/geoportal-extensions#readme\",\"dependencies\":{\"@mapbox/mapbox-gl-style-spec\":\"13.20.1\",\"eventbusjs\":\"0.2.0\",\"geoportal-access-lib\":\"https://raw.githubusercontent.com/IGNF/geoportal-access-lib/release-3.4.0-beta/geoportal-access-lib-3.4.0-beta.tgz\",\"itowns\":\"2.38.2\",\"leaflet\":\"1.7.1\",\"leaflet-draw\":\"1.0.4\",\"loglevel\":\"^1.6.7\",\"markdown-toc\":\"^1.2.0\",\"ol\":\"6.9.0\",\"ol-mapbox-style\":\"6.7.0\",\"proj4\":\"2.7.5\",\"proj4leaflet\":\"1.0.2\",\"sortablejs\":\"1.14.0\",\"three\":\"0.137.5\",\"typescript\":\"^4.5.5\",\"whatwg-fetch\":\"3.0.0\"},\"devDependencies\":{\"@babel/core\":\"^7.4.4\",\"@babel/plugin-transform-template-literals\":\"^7.7.4\",\"@babel/preset-env\":\"^7.4.4\",\"babel-loader\":\"^8.0.5\",\"chai\":\"^4.2.0\",\"chalk\":\"^4.0.0\",\"clean-webpack-plugin\":\"^3.0.0\",\"copy-webpack-plugin\":\"^5.0.3\",\"core-js\":\"^3.6.4\",\"css-loader\":\"^3.4.2\",\"eslint\":\"^6.8.0\",\"eslint-config-standard\":\"^14.1.1\",\"eslint-loader\":\"^4.0.0\",\"eslint-plugin-import\":\"^2.17.2\",\"eslint-plugin-node\":\"^11.1.0\",\"eslint-plugin-promise\":\"^4.1.1\",\"eslint-plugin-standard\":\"^4.0.0\",\"exports-loader\":\"^0.7.0\",\"expose-loader\":\"^0.7.5\",\"fs-extra\":\"^9.0.0\",\"handlebars\":\"^4.7.5\",\"handlebars-layouts\":\"^3.1.4\",\"html-webpack-plugin\":\"^4.0.4\",\"jsdoc-webpack-plugin\":\"^0.3.0\",\"mini-css-extract-plugin\":\"^0.9.0\",\"mocha\":\"^7.1.1\",\"mocha-loader\":\"^5.0.0\",\"npm-run-all\":\"^4.1.5\",\"optimize-css-assets-webpack-plugin\":\"^5.0.1\",\"path\":\"^0.12.7\",\"replace-bundle-webpack-plugin\":\"^1.0.0\",\"requirejs\":\"^2.3.6\",\"responsive-loader\":\"^1.2.0\",\"speed-measure-webpack-plugin\":\"^1.3.0\",\"string-template\":\"^1.0.0\",\"style-loader\":\"^1.1.3\",\"terser-webpack-plugin\":\"^2.0.0\",\"url-loader\":\"^4.0.0\",\"webpack\":\"^4.30.0\",\"webpack-cli\":\"^3.3.1\",\"webpack-dev-server\":\"^3.3.1\",\"webpack-node-externals\":\"^1.7.2\"}}"); /***/ }), /* 4 */ @@ -1395,8 +1395,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var ol_interaction__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(49); /* harmony import */ var ol_interaction__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(ol_interaction__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(50); -/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(108); -/* harmony import */ var _Common_Utils_ProxyUtils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(109); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(109); +/* harmony import */ var _Common_Utils_ProxyUtils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(110); function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } // import OpenLayers @@ -2021,11 +2021,11 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Services_DefaultUrlService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67); /* harmony import */ var _Services_Alti_Response_model_AltiResponse__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(81); /* harmony import */ var _Services_Alti_Response_model_Elevation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(82); -/* harmony import */ var _Services_AutoComplete_Response_model_AutoCompleteResponse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(94); -/* harmony import */ var _Services_AutoComplete_Response_model_SuggestedLocation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(95); -/* harmony import */ var _Services_ProcessIsoCurve_Response_model_ProcessIsoCurveResponse__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(107); -/* harmony import */ var _Services_Route_Response_model_RouteResponse__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(101); -/* harmony import */ var _Services_Route_Response_model_RouteInstruction__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(102); +/* harmony import */ var _Services_AutoComplete_Response_model_AutoCompleteResponse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95); +/* harmony import */ var _Services_AutoComplete_Response_model_SuggestedLocation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(96); +/* harmony import */ var _Services_ProcessIsoCurve_Response_model_ProcessIsoCurveResponse__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(108); +/* harmony import */ var _Services_Route_Response_model_RouteResponse__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(102); +/* harmony import */ var _Services_Route_Response_model_RouteInstruction__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(103); /* harmony import */ var _Services_Config_Config__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(52); /* harmony import */ var _Protocols_XHR__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(59); /* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(66); @@ -2151,11 +2151,11 @@ Gp.Helper = _Utils_Helper__WEBPACK_IMPORTED_MODULE_12__["default"]; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Config_Config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(52); /* harmony import */ var _Alti_Alti__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(70); -/* harmony import */ var _Geocode_Geocode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(83); -/* harmony import */ var _Geocode_ReverseGeocode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(91); -/* harmony import */ var _AutoComplete_AutoComplete__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(92); -/* harmony import */ var _Route_Route__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(96); -/* harmony import */ var _ProcessIsoCurve_ProcessIsoCurve__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(103); +/* harmony import */ var _Geocode_Geocode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(84); +/* harmony import */ var _Geocode_ReverseGeocode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(92); +/* harmony import */ var _AutoComplete_AutoComplete__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(93); +/* harmony import */ var _Route_Route__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(97); +/* harmony import */ var _ProcessIsoCurve_ProcessIsoCurve__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(104); /* eslint no-unused-vars: ["error", { "varsIgnorePattern": "point|circle|bbox" }] */ /** @@ -2213,7 +2213,7 @@ var Services = { * @param {String} [options.contentType="application/xml"] - Content-Type to use when requesting underlying web service in case of a XHR protocol use (see above) and if method HTTP is POST. Ignored when options.protocol is set to 'JSONP' value. Only use if you know what you are doing. * @param {Boolean} [options.rawResponse=false] - Setting this parameter to true implies you want to handle the service response by yourself : it will be returned as an unparsed String in onSuccess callback parameter. Only use if you know what you are doing. * @param {Function} [options.onBeforeParse] - Callback function for handling service response before parsing (as an unparsed String). Takes a String as a parameter (the raw service response). Returns a String that will be parsed as the service response. Only use if you know what you are doing. - * @param {String} [options.api='REST'] - What API to use for interacting with underlying web service : 'REST' or 'WPS'. Only use if you know what you are doing. + * @param {String} [options.api='REST'] - What API to use for interacting with underlying web service : 'REST'. Only use if you know what you are doing. * @param {String} [options.outputFormat='xml'] - Output format for underlying web service response : 'xml' or 'json'. Only use if you know what you are doing. */ getAltitude : function (options) { @@ -2510,7 +2510,8 @@ function Config (options) { throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_MISSING", "onSuccess()")); } if (!options.apiKey && !options.customConfigFile) { - throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("PARAM_MISSING", "apiKey", "customConfigFile")); + // si pas de thème spécifié, on récupère toutes les ressources possibles dans l'objet Config + options.apiKey = "full"; } this.options = {}; this.options.onSuccess = options.onSuccess; @@ -3370,20 +3371,21 @@ function CommonService (options) { throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_2__["default"].getMessage("PARAM_MISSING", "onSuccess()")); } + /* FIXME traitement au niveau de chaque composant pour tester service WXS / GPF // gestion de l'url du service par defaut if (!this.options.serverUrl) { // INFO // gestion de l'url du service par defaut pour les services qui ne possèdent qu'une seul url par defaut // les cas particuliers des services avec plusieurs urls (ex. Alti) devront être traité dans la classe du composant // donc si l'url n'est pas renseignée, il faut utiliser les urls par defaut - _DefaultUrlService__WEBPACK_IMPORTED_MODULE_5__["default"].ssl = this.options.ssl; - var urlByDefault = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_5__["default"][this.CLASSNAME].url("calcul"); + DefaultUrlService.ssl = this.options.ssl; + var urlByDefault = DefaultUrlService[this.CLASSNAME].url("calcul"); if (typeof urlByDefault === "string") { this.options.serverUrl = urlByDefault; } else { this.logger.trace("URL par defaut à determiner au niveau du composant..."); } - } + }*/ // FIXME nettoyage des KVP dans l'url du service // if (this.options.serverUrl) { @@ -3563,7 +3565,8 @@ CommonService.prototype = { // INFO : acces au numero de version de package.conf aprés compilation ! if (this.CLASSNAME !== "Geocode" && this.CLASSNAME !== "ReverseGeocode" && this.CLASSNAME !== "AutoComplete") { this.options.serverUrl = _Utils_Helper__WEBPACK_IMPORTED_MODULE_1__["default"].normalyzeUrl(this.options.serverUrl, { - "gp-access-lib" : _package_json__WEBPACK_IMPORTED_MODULE_6__.version + "gp-access-lib" : _package_json__WEBPACK_IMPORTED_MODULE_6__.version, + apiKey : this.options.apiKey || "calcul" }, false); } @@ -6160,7 +6163,6 @@ __webpack_require__.r(__webpack_exports__); // DefaultUrlService.Alti.url(key)[elevation-xml] // DefaultUrlService.Alti.url(key)[profil-json] // DefaultUrlService.Alti.url(key)[profil-xml] -// DefaultUrlService.Alti.url(key)[wps] // DefaultUrlService.ProcessIsoCurve.url(key) // DefaultUrlService.AutoComplete.url(key) // DefaultUrlService.ReverseGeocode.url(key) @@ -6178,7 +6180,6 @@ __webpack_require__.r(__webpack_exports__); // -> http://wxs.ign.fr/calcul/alti/rest/elevation.xml // -> http://wxs.ign.fr/calcul/alti/rest/elevationLine.json // -> http://wxs.ign.fr/calcul/alti/rest/elevationLine.xml -// -> http://wxs.ign.fr/calcul/alti/wps // // ssl by default. // @@ -6205,11 +6206,10 @@ var DefaultUrlService = { /** * base url of services (ssl protocol management) - * @param {String} key - key * @param {String} path - path * @returns {String} url */ - url : function (key, path) { + url : function (path) { // comportement par défaut => https // sinon, il est fixé par l'option 'ssl' (false => http) var _protocol; @@ -6219,7 +6219,25 @@ var DefaultUrlService = { _protocol = "https://"; } - return _protocol + HOSTNAME.concat("/", key, path); + return _protocol + HOSTNAME + path; + }, + + /** + * base new-url of services (ssl protocol management) + * @param {String} path - path + * @returns {String} url + */ + newUrl : function (path, hostname) { + // comportement par défaut => https + // sinon, il est fixé par l'option 'ssl' (false => http) + var _protocol; + if (DefaultUrlService.ssl === false) { + _protocol = "http://"; + } else { + _protocol = "https://"; + } + + return _protocol + hostname + path; }, /** @@ -6229,29 +6247,41 @@ var DefaultUrlService = { * @property {Function} url (key) - Returns elevation service default urls with or without geoportal access key given as a parameter. The result is a javascript object with different urls given used protocols ("elevation-json", "elevation-xml", "profil-json" or "profil-xml"). */ Alti : { + new_key : { + // rest + "elevation-json" : "/altimetrie/1.0/calcul/alti/rest/elevation.json", + "elevation-xml" : "/altimetrie/1.0/calcul/alti/rest/elevation.xml", + "profil-json" : "/altimetrie/1.0/calcul/alti/rest/elevationLine.json", + "profil-xml" : "/altimetrie/1.0/calcul/alti/rest/elevationLine.xml" + }, _key : { // rest - "elevation-json" : "/alti/rest/elevation.json", - "elevation-xml" : "/alti/rest/elevation.xml", - "profil-json" : "/alti/rest/elevationLine.json", - "profil-xml" : "/alti/rest/elevationLine.xml", + "elevation-json" : "/calcul/alti/rest/elevation.json", + "elevation-xml" : "/calcul/alti/rest/elevation.xml", + "profil-json" : "/calcul/alti/rest/elevationLine.json", + "profil-xml" : "/calcul/alti/rest/elevationLine.xml", // other wps : "/alti/wps" }, /** - * url + * newurl from geoplateforme service * @param {String} key - key * @returns {String} url */ - url : function (key) { + newUrl : function () { + return; + }, + /** + * url from wxs service + * @returns {String} url + */ + url : function () { return { // rest - "elevation-json" : DefaultUrlService.url(key, this._key["elevation-json"]), - "elevation-xml" : DefaultUrlService.url(key, this._key["elevation-xml"]), - "profil-json" : DefaultUrlService.url(key, this._key["profil-json"]), - "profil-xml" : DefaultUrlService.url(key, this._key["profil-xml"]), - // other - wps : DefaultUrlService.url(key, this._key["wps"]) + "elevation-json" : DefaultUrlService.url(this._key["elevation-json"]), + "elevation-xml" : DefaultUrlService.url(this._key["elevation-xml"]), + "profil-json" : DefaultUrlService.url(this._key["profil-json"]), + "profil-xml" : DefaultUrlService.url(this._key["profil-xml"]) }; } }, @@ -6262,14 +6292,25 @@ var DefaultUrlService = { * @property {Function} url (key) - Returns isocurve service default urls with or without geoportal access key given as a parameter. The result is a javascript object with different urls given used protocols ("iso-json" or "iso-xml"). */ ProcessIsoCurve : { - _key : "/geoportail/isochrone/rest/1.0.0/isochrone", + + new_key : "/itineraire/isochrone", + + _key : "/calcul/geoportail/isochrone/rest/1.0.0/isochrone", + /** - * url - * @param {String} key - key + * url from geoplateforme service * @returns {String} url */ - url : function (key) { - return DefaultUrlService.url(key, this._key); + newUrl : function () { + return; + }, + + /** + * url from wxs service + * @returns {String} url + */ + url : function () { + return DefaultUrlService.url(this._key); } }, /** @@ -6279,7 +6320,7 @@ var DefaultUrlService = { * @property {Function} url (key) - Returns config service default urls with or without geoportal access key given as a parameter. */ Config : { - _key : "https://raw.githubusercontent.com/IGNF/geoportal-configuration/main/dist/", + _key : "https://raw.githubusercontent.com/IGNF/geoportal-configuration/new-url/dist/", /** * url * @param {String} key - key @@ -6305,14 +6346,24 @@ var DefaultUrlService = { * @property {Function} url (key) - Returns autocomplete service default urls with or without geoportal access key given as a parameter. The result is a String. */ AutoComplete : { - _key : "/ols/apis/completion", + new_key : "/completion", + + _key : "/calcul/geoportail/geocodage/rest/0.1/completion", + + /** + * url from geoplateforme service + * @returns {String} url + */ + newUrl : function () { + return; + }, + /** * url - * @param {String} key - key * @returns {String} url */ url : function (key) { - return DefaultUrlService.url(key, this._key); + return DefaultUrlService.url(this._key); } }, /** @@ -6322,14 +6373,24 @@ var DefaultUrlService = { * @property {Function} url (key) - Returns reverse geocoding service default urls with or without geoportal access key given as a parameter. The result is a String. */ ReverseGeocode : { - _key : "/geoportail/ols", + new_key : "/reverse", + + _key : "/calcul/geoportail/geocodage/rest/0.1/reverse", + + /** + * url from geoplateforme service + * @returns {String} url + */ + newUrl : function () { + return; + }, + /** * url - * @param {String} key - key * @returns {String} url */ - url : function (key) { - return DefaultUrlService.url(key, this._key); + url : function () { + return DefaultUrlService.url(this._key); } }, /** @@ -6339,14 +6400,24 @@ var DefaultUrlService = { * @property {Function} url (key) - Returns geocoding service default urls with or without geoportal access key given as a parameter. The result is a String. */ Geocode : { - _key : "/geoportail/ols", + new_key : "/search", + + _key : "/calcul/geoportail/geocodage/rest/0.1/search", + + /** + * url from geoplateforme service + * @returns {String} url + */ + newUrl : function () { + return; + }, + /** * url - * @param {String} key - key * @returns {String} url */ - url : function (key) { - return DefaultUrlService.url(key, this._key); + url : function () { + return DefaultUrlService.url(this._key); } }, /** @@ -6356,14 +6427,24 @@ var DefaultUrlService = { * @property {Function} url (key) - Returns routing service default urls with or without geoportal access key given as a parameter. The result is a javascript object with different urls given used protocols. */ Route : { - _key : "/geoportail/itineraire/rest/1.0.0/route", + new_key : "/itineraire/route", + + _key : "/calcul/geoportail/itineraire/rest/1.0.0/route", + /** - * url - * @param {String} key - key + * url from geoplateforme service * @returns {String} url */ - url : function (key) { - return DefaultUrlService.url(key, this._key); + newUrl : function () { + return; + }, + + /** + * url from wxs service + * @returns {String} url + */ + url : function () { + return DefaultUrlService.url(this._key); } } }; @@ -6375,7 +6456,7 @@ var DefaultUrlService = { /* 68 */ /***/ (function(module) { -module.exports = JSON.parse("{\"_from\":\"geoportal-access-lib@3.3.3\",\"_id\":\"geoportal-access-lib@3.3.3\",\"_inBundle\":false,\"_integrity\":\"sha512-1S8B84yaU8JrkSxLXVFxqjkL4MMs1RNJwdQQMGjAoH/fXPr3CleoEaoG7z14HgVlWCvdYYqAqQuL6qGVCrlmXQ==\",\"_location\":\"/geoportal-access-lib\",\"_phantomChildren\":{},\"_requested\":{\"type\":\"version\",\"registry\":true,\"raw\":\"geoportal-access-lib@3.3.3\",\"name\":\"geoportal-access-lib\",\"escapedName\":\"geoportal-access-lib\",\"rawSpec\":\"3.3.3\",\"saveSpec\":null,\"fetchSpec\":\"3.3.3\"},\"_requiredBy\":[\"/\"],\"_resolved\":\"https://registry.npmjs.org/geoportal-access-lib/-/geoportal-access-lib-3.3.3.tgz\",\"_shasum\":\"33b1dc313ca8aeadd0adebf3bca4ef75ea48c50b\",\"_spec\":\"geoportal-access-lib@3.3.3\",\"_where\":\"/home/runner/work/geoportal-extensions/geoportal-extensions\",\"author\":{\"name\":\"IGNF\"},\"bugs\":{\"url\":\"https://github.com/IGNF/geoportal-access-lib/issues\"},\"bundleDependencies\":false,\"date\":\"02/08/2023\",\"dependencies\":{\"es6-promise\":\"^4.2.4\",\"node-fetch\":\"^2.6.1\",\"xmldom\":\"^0.1.27\"},\"deprecated\":false,\"description\":\"French Geoportal resources access library\",\"devDependencies\":{\"@babel/core\":\"^7.12.10\",\"@babel/plugin-transform-template-literals\":\"^7.12.1\",\"@babel/preset-env\":\"^7.12.11\",\"babel-loader\":\"^8.2.2\",\"chai\":\"^4.1.2\",\"clean-webpack-plugin\":\"^3.0.0\",\"copy-webpack-plugin\":\"^5.1.2\",\"eslint\":\"^7.18.0\",\"eslint-config-standard\":\"^16.0.2\",\"eslint-loader\":\"^4.0.2\",\"eslint-plugin-import\":\"^2.22.1\",\"eslint-plugin-node\":\"^11.1.0\",\"eslint-plugin-promise\":\"^4.2.1\",\"eslint-plugin-standard\":\"^5.0.0\",\"glob\":\"^7.1.2\",\"handlebars-layouts\":\"^3.1.4\",\"handlebars-webpack-plugin\":\"^1.4.1\",\"html-webpack-plugin\":\"^4.5.1\",\"istanbul-instrumenter-loader\":\"^3.0.1\",\"jsdoc-webpack-plugin\":\"^0.3.0\",\"loglevel\":\"^1.6.1\",\"mocha\":\"^7.2.0\",\"mocha-loader\":\"^5.1.5\",\"mocha-webpack\":\"^2.0.0-beta.0\",\"mochawesome\":\"^6.2.1\",\"nyc\":\"^15.1.0\",\"path\":\"^0.12.7\",\"replace-bundle-webpack-plugin\":\"^1.0.0\",\"sinon\":\"^9.2.4\",\"sinon-es6\":\"0.0.3\",\"speed-measure-webpack-plugin\":\"^1.4.2\",\"string-template\":\"^1.0.0\",\"terser-webpack-plugin\":\"^2.3.8\",\"webpack\":\"^4.46.0\",\"webpack-cli\":\"^3.3.12\",\"webpack-dev-server\":\"^3.11.2\",\"webpack-node-externals\":\"^2.5.2\",\"webpack-shell-plugin\":\"^0.5.0\"},\"homepage\":\"https://github.com/IGNF/geoportal-access-lib#readme\",\"keywords\":[\"geoportail\",\"webservice\",\"javascript\",\"es6\"],\"license\":\"CECILL-B\",\"main\":\"dist/GpServices-src.js\",\"module\":\"src/Gp.js\",\"name\":\"geoportal-access-lib\",\"nyc\":{\"include\":[\"src/**/*.js\"],\"instrument\":false,\"sourceMap\":false},\"optionalDependencies\":{},\"peerDependencies\":{},\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/IGNF/geoportal-access-lib.git\"},\"scripts\":{\"build\":\"webpack --mode=none\",\"build:dev\":\"webpack --mode=development\",\"build:prod\":\"webpack --mode=production\",\"clean\":\"echo \\\"Warning: no yet implemented!\\\" && exit 0\",\"cover\":\"nyc --reporter=lcov --reporter=text npm run test\",\"doc\":\"npm run doc:serve\",\"doc:serve\":\"webpack-dev-server --content-base jsdoc --port 9001 --open\",\"eslint\":\"eslint src/\",\"sample\":\"npm run sample:serve\",\"sample:serve\":\"webpack-dev-server --mode=none --open-page samples/index-src.html --https --content-base . --output-public-path '/dist/' --port 9001 --open\",\"sample:serve:dev\":\"webpack-dev-server --mode=development --open-page samples/index-map.html --content-base . --output-public-path '/dist/' --port 9001 --open\",\"sample:serve:prod\":\"webpack-dev-server --mode=production --open-page samples/index-prod.html --content-base . --output-public-path '/dist/' --port 9001 --open\",\"setup\":\"npm install\",\"test\":\"mocha-webpack --reporter mochawesome --reporter-options reportDir=test-report,reportFilename=index --webpack-config ./test/webpack/webpack.test.js --glob \\\"test_*.js\\\" test/spec/\",\"test:end-to-end:serve\":\"webpack-dev-server --hot --config ./test/webpack/webpack.end-to-end.serve.js\",\"test:end-to-end:serve:docker\":\"webpack-dev-server --hot --config ./test/webpack/webpack.end-to-end.serve.docker.js\",\"test:serve\":\"webpack-dev-server --hot --config ./test/webpack/webpack.test.serve.js\",\"test:serve:docker\":\"webpack-dev-server --hot --config ./test/webpack/webpack.test.serve.docker.js\"},\"version\":\"3.3.3\"}"); +module.exports = JSON.parse("{\"_from\":\"https://raw.githubusercontent.com/IGNF/geoportal-access-lib/release-3.4.0-beta/geoportal-access-lib-3.4.0-beta.tgz\",\"_id\":\"geoportal-access-lib@3.4.0-beta\",\"_inBundle\":false,\"_integrity\":\"sha512-gphFcmz76I5nDU8c5HS1X/afidc1hZMNKVESfzr212WyMpVCNbQhImVlLJakAlffXMCkNb40bVZnehKlKvD+9w==\",\"_location\":\"/geoportal-access-lib\",\"_phantomChildren\":{},\"_requested\":{\"type\":\"remote\",\"raw\":\"geoportal-access-lib@https://raw.githubusercontent.com/IGNF/geoportal-access-lib/release-3.4.0-beta/geoportal-access-lib-3.4.0-beta.tgz\",\"name\":\"geoportal-access-lib\",\"escapedName\":\"geoportal-access-lib\",\"rawSpec\":\"https://raw.githubusercontent.com/IGNF/geoportal-access-lib/release-3.4.0-beta/geoportal-access-lib-3.4.0-beta.tgz\",\"saveSpec\":\"https://raw.githubusercontent.com/IGNF/geoportal-access-lib/release-3.4.0-beta/geoportal-access-lib-3.4.0-beta.tgz\",\"fetchSpec\":\"https://raw.githubusercontent.com/IGNF/geoportal-access-lib/release-3.4.0-beta/geoportal-access-lib-3.4.0-beta.tgz\"},\"_requiredBy\":[\"/\"],\"_resolved\":\"https://raw.githubusercontent.com/IGNF/geoportal-access-lib/release-3.4.0-beta/geoportal-access-lib-3.4.0-beta.tgz\",\"_shasum\":\"4972f1314445354d85baad4d3b0e59f0be27ab82\",\"_spec\":\"geoportal-access-lib@https://raw.githubusercontent.com/IGNF/geoportal-access-lib/release-3.4.0-beta/geoportal-access-lib-3.4.0-beta.tgz\",\"_where\":\"/home/runner/work/geoportal-extensions/geoportal-extensions\",\"author\":{\"name\":\"IGNF\"},\"bugs\":{\"url\":\"https://github.com/IGNF/geoportal-access-lib/issues\"},\"bundleDependencies\":[],\"date\":\"21/09/2023\",\"dependencies\":{\"es6-promise\":\"^4.2.4\",\"node-fetch\":\"^2.6.1\",\"xmldom\":\"^0.1.27\"},\"deprecated\":false,\"description\":\"French Geoportal resources access library\",\"devDependencies\":{\"@babel/core\":\"^7.12.10\",\"@babel/plugin-transform-template-literals\":\"^7.12.1\",\"@babel/preset-env\":\"^7.12.11\",\"babel-loader\":\"^8.2.2\",\"chai\":\"^4.1.2\",\"clean-webpack-plugin\":\"^3.0.0\",\"copy-webpack-plugin\":\"^5.1.2\",\"eslint\":\"^7.18.0\",\"eslint-config-standard\":\"^16.0.2\",\"eslint-loader\":\"^4.0.2\",\"eslint-plugin-import\":\"^2.22.1\",\"eslint-plugin-node\":\"^11.1.0\",\"eslint-plugin-promise\":\"^4.2.1\",\"eslint-plugin-standard\":\"^5.0.0\",\"glob\":\"^7.1.2\",\"handlebars-layouts\":\"^3.1.4\",\"handlebars-webpack-plugin\":\"^1.4.1\",\"html-webpack-plugin\":\"^4.5.1\",\"istanbul-instrumenter-loader\":\"^3.0.1\",\"jsdoc-webpack-plugin\":\"^0.3.0\",\"loglevel\":\"^1.6.1\",\"mocha\":\"^7.2.0\",\"mocha-loader\":\"^5.1.5\",\"mocha-webpack\":\"^2.0.0-beta.0\",\"mochawesome\":\"^6.2.1\",\"nyc\":\"^15.1.0\",\"path\":\"^0.12.7\",\"replace-bundle-webpack-plugin\":\"^1.0.0\",\"sinon\":\"^9.2.4\",\"sinon-es6\":\"0.0.3\",\"speed-measure-webpack-plugin\":\"^1.4.2\",\"string-template\":\"^1.0.0\",\"terser-webpack-plugin\":\"^2.3.8\",\"webpack\":\"^4.46.0\",\"webpack-cli\":\"^3.3.12\",\"webpack-dev-server\":\"^3.11.2\",\"webpack-node-externals\":\"^2.5.2\",\"webpack-shell-plugin\":\"^0.5.0\"},\"homepage\":\"https://github.com/IGNF/geoportal-access-lib#readme\",\"keywords\":[\"geoportail\",\"webservice\",\"javascript\",\"es6\"],\"license\":\"CECILL-B\",\"main\":\"dist/GpServices-src.js\",\"module\":\"src/Gp.js\",\"name\":\"geoportal-access-lib\",\"nyc\":{\"include\":[\"src/**/*.js\"],\"instrument\":false,\"sourceMap\":false},\"optionalDependencies\":{},\"peerDependencies\":{},\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/IGNF/geoportal-access-lib.git\"},\"scripts\":{\"build\":\"webpack --mode=none\",\"build:dev\":\"webpack --mode=development\",\"build:prod\":\"webpack --mode=production\",\"clean\":\"echo \\\"Warning: no yet implemented!\\\" && exit 0\",\"cover\":\"nyc --reporter=lcov --reporter=text npm run test\",\"doc\":\"npm run doc:serve\",\"doc:serve\":\"webpack-dev-server --content-base jsdoc --port 9001 --open\",\"eslint\":\"eslint src/\",\"sample\":\"npm run sample:serve\",\"sample:serve\":\"webpack-dev-server --mode=none --open-page samples/index-src.html --https --content-base . --output-public-path '/dist/' --port 9001 --open\",\"sample:serve:dev\":\"webpack-dev-server --mode=development --open-page samples/index-map.html --content-base . --output-public-path '/dist/' --port 9001 --open\",\"sample:serve:prod\":\"webpack-dev-server --mode=production --open-page samples/index-prod.html --content-base . --output-public-path '/dist/' --port 9001 --open\",\"setup\":\"npm install\",\"test\":\"mocha-webpack --reporter mochawesome --reporter-options reportDir=test-report,reportFilename=index --webpack-config ./test/webpack/webpack.test.js --glob \\\"test_*.js\\\" test/spec/\",\"test:end-to-end:serve\":\"webpack-dev-server --hot --config ./test/webpack/webpack.end-to-end.serve.js\",\"test:end-to-end:serve:docker\":\"webpack-dev-server --hot --config ./test/webpack/webpack.end-to-end.serve.docker.js\",\"test:serve\":\"webpack-dev-server --hot --config ./test/webpack/webpack.test.serve.js\",\"test:serve:docker\":\"webpack-dev-server --hot --config ./test/webpack/webpack.test.serve.docker.js\"},\"version\":\"3.4.0-beta\"}"); /***/ }), /* 69 */ @@ -6582,7 +6663,7 @@ ConfigInterface.prototype = { const wmsTypeRegex = /\/v\//; // WMS vector style always empty (not in getCap) if (wmsTypeRegex.test(params.url)) { - params.styles = ""; + params.styles = " "; } else { // WMS raster style is defined in getCap params.styles = layerConf.styles[0].name; @@ -6767,6 +6848,8 @@ __webpack_require__.r(__webpack_exports__); * @param {Boolean} [options.zonly] - Permet de ne récupérer que les altitudes en sortie s'il vaut 'true'. * Vaut 'false' par défaut. * + * @param {String} [options.resource] - Resource utilisée pour réaliser le calcul. + * * @example * var options = { * apiKey : null, @@ -6784,7 +6867,8 @@ __webpack_require__.r(__webpack_exports__); * outputFormat : 'json' // json|xml * sampling : 3, * api : 'REST', // REST|WPS - * zonly : false // false|true + * zonly : false // false|true, + * resource : "resource-par-defaut" * }; * */ @@ -6823,6 +6907,9 @@ function Alti (options) { // format de réponse du service : "json" ou "xml" (valeur par défaut), en minuscule ! this.options.outputFormat = (typeof options.outputFormat === "string") ? options.outputFormat.toLowerCase() : "xml"; + // ressource utilisée pour le calcul altimétrique + this.options.resource = options.resource || "rge_alti_corse2a_float32_zip_lamb93"; + // sampling this.options.sampling = options.sampling || null; @@ -6837,12 +6924,21 @@ function Alti (options) { // param. zonly this.options.zonly = options.zonly || false; + // param. measures + this.options.measures = options.measures || false; + // gestion de l'url du service par defaut // si l'url n'est pas renseignée, il faut utiliser les urls par defaut // en fonction du type d'api, REST ou WPS, du format de reponse demandé (outputFormat) // ainsi que sur le type de service (profil ou elevation) if (!this.options.serverUrl) { - var lstUrlByDefault = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__["default"].Alti.url("calcul"); + // Code commenté pour Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'alti + /* var lstUrlByDefault = DefaultUrlService.Alti.newUrl(); + if (this.options.oldAltiService) { + lstUrlByDefault = DefaultUrlService.Alti.url(); + }*/ + // Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'alti + var lstUrlByDefault = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__["default"].Alti.url(); var urlFound = null; switch (this.options.api) { case "WPS": @@ -6914,11 +7010,13 @@ Alti.prototype.buildRequest = function (error, success) { onError : error, scope : this, // spécifique au service : + resource : this.options.resource, positions : this.options.positions, outputFormat : this.options.outputFormat, sampling : this.options.sampling, api : this.options.api, - zonly : this.options.zonly + zonly : this.options.zonly, + measures : this.options.measures }; _Request_AltiRequestFactory__WEBPACK_IMPORTED_MODULE_5__["default"].build(options); @@ -7025,7 +7123,8 @@ var AltiRequestFactory = { crs : null, // par defaut format : null, // (only to POST) sampling : null, // (only use by Profil) - zonly : null // (only use by Elevation) + zonly : null, // (only use by Elevation) + measures : null // (only use by Elevation) } }; @@ -7034,6 +7133,8 @@ var AltiRequestFactory = { settings.param.format = options.outputFormat; settings.param.sampling = options.sampling; settings.param.zonly = options.zonly; + settings.param.measures = options.measures; + settings.param.resource = options.resource; // gestion des callback var bOnError = !!(options.onError !== null && typeof options.onError === "function"); // cast variable to boolean @@ -7124,7 +7225,9 @@ __webpack_require__.r(__webpack_exports__); * @param {Boolean} options.param.indent - false|true * @param {String} options.param.crs - 'CRS:84' * @param {String} options.param.sampling - 3 + * @param {String} options.param.resource - 'rge_alti_corse2a_float32_zip_lamb93' * @param {Boolean} options.param.zonly - false|true + * @param {Boolean} options.param.measures - false|true * @param {String} options.param.format - "JSON|XML" * @param {String} options.type - "Profil|Elevation" * @param {String} options.method - GET|POST @@ -7145,6 +7248,7 @@ __webpack_require__.r(__webpack_exports__); * format : 'json', // par defaut (only to POST) * sampling : 3 , // par defaut (only use by Profil) * zonly : false // par defaut (only use by Elevation) + * measures : false // par defaut (only use by Elevation) * } * }; * @@ -7221,7 +7325,7 @@ AltiRequestREST.prototype = { template : { get : { // FIXME on retire le param 'delimiter' : &delimiter='__DELIMITER__' - value : "lon=__LON__&lat=__LAT__&indent=__INDENT__&crs='__CRS__'", + value : "lon=__LON__&lat=__LAT__&indent=__INDENT__&crs='__CRS__'&resource=__RESOURCE__&measures=__MEASURES__", input : { point : "&zonly=__ZONLY__", profil : "&sampling=__SAMPLING__" @@ -7232,9 +7336,11 @@ AltiRequestREST.prototype = { value : "lon=__LON__\n" + "lat=__LAT__\n" + "indent=__INDENT__\n" + - "crs='__CRS__'\n", + "crs='__CRS__'\n" + + "resource='__RESOURCE__'\n" + + "measures='__MEASURES__'\n", input : { - point : "zonly=__ZONLY__", + point : "zonly=__ZONLY__\n", profil : "sampling=__SAMPLING__" } } @@ -7264,6 +7370,8 @@ AltiRequestREST.prototype = { // template = template.replace(/__DELIMITER__/g, this.DataObject.delimiter); template = template.replace(/__INDENT__/g, this.DataObject.indent); template = template.replace(/__CRS__/g, this.DataObject.crs); + template = template.replace(/__RESOURCE__/g, this.DataObject.resource); + template = template.replace(/__MEASURES__/g, this.DataObject.measures); // ajout + template = template + this.__addDataInputs(); @@ -7295,7 +7403,7 @@ AltiRequestREST.prototype = { var tmpl = null; if (this.DataObject.CLASSNAME === "AltiElevationRequest") { tmpl = myTemplate.input.point; - return tmpl.replace(/__ZONLY__/g, this.DataObject.zonly); + return tmpl.replace(/__ZONLY__/g, this.DataObject.zonly.toString()); } else if (this.DataObject.CLASSNAME === "AltiProfilRequest") { tmpl = myTemplate.input.profil; return tmpl.replace(/__SAMPLING__/g, this.DataObject.sampling); @@ -7415,6 +7523,10 @@ AltiElevationRequest.prototype.getData = function () { k : "format", v : this.format }); + map.push({ + k : "resource", + v : this.resource + }); return map; }; @@ -7490,6 +7602,17 @@ function AltiRequest (options) { * Par defaut, "json". */ this.format = this.options.format || "json"; + + /* + * Ressource utilisée + */ + this.resource = this.options.resource; + + /** + * Réponse détaillée (source & accuracy) + * true|false + */ + this.measures = this.options.measures || false; } /** @@ -7745,6 +7868,10 @@ AltiProfilRequest.prototype.getData = function () { k : "format", v : this.format }); + map.push({ + k : "resource", + v : this.resource + }); return map; }; @@ -8331,6 +8458,9 @@ var AltiResponseFactory = { if (elevations[i].acc) { elevation.acc = elevations[i].acc; } + if (elevations[i].measures) { + elevation.measures = elevations[i].measures; + } } else if (typeof elevations[i] === "number") { // elevations[i] est un nombre, dans le cas de zonly=true notamment elevation.z = elevations[i]; @@ -8770,6 +8900,7 @@ function __getAttributes (node) { __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Response_model_AltiResponse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81); /* harmony import */ var _Response_model_Elevation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(82); +/* harmony import */ var _Response_model_Measure__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(83); /** * Fonction retournant un objet contenant des clés de lecture (readers) @@ -8787,6 +8918,7 @@ __webpack_require__.r(__webpack_exports__); + /** * * Objet AltiResponseReader @@ -8803,7 +8935,7 @@ __webpack_require__.r(__webpack_exports__); * du service alti, correspondant logiquement à la racine du document * (contient un ou plusieurs childNodes correspondant chacun à une élévation retournée) * - * @property {Method} AltiResponseReader.READERS.elevation - ecture d'un noeud "elevation" de la réponse xml du service alti. + * @property {Method} AltiResponseReader.READERS.elevation - Lecture d'un noeud "elevation" de la réponse xml du service alti. * (contient un ou 4 childNode (s) correspondant à l'altitude (z) et éventuellement lat, lon, et acc) * * @property {Method} AltiResponseReader.READERS.lat - Lecture d'un noeud "lat" de la réponse xml du service alti. @@ -8818,6 +8950,15 @@ __webpack_require__.r(__webpack_exports__); * @property {Method} AltiResponseReader.READERS.acc - Lecture d'un noeud "acc" de la réponse xml du service alti. * (contient une valeur de précision, qui est un flottant) * + * @property {Method} AltiResponseReader.READERS.measures - Lecture d'un noeud "measures" de la réponse xml du service alti. + * (contient une valeur de précision, qui est un flottant) + * + * @property {Method} AltiResponseReader.READERS.source_name - Lecture d'un noeud "source_name" de la réponse xml du service alti. + * (pour remplir l'éventuel objet measure) + * + * @property {Method} AltiResponseReader.READERS.source_mesure - Lecture d'un noeud "source_mesure" de la réponse xml du service alti. + * (pour remplir l'éventuel objet measure) + * * @property {Method} AltiResponseReader.READERS.exceptionreport - Lecture d'un noeud "ExceptionReport" de la réponse xml du service alti. * * @property {Method} AltiResponseReader.READERS.exception - Lecture d'un noeud "Exception" de la réponse xml du service alti. @@ -8863,9 +9004,9 @@ AltiResponseReader.READERS = { /** * Lecture d'un noeud "elevation" de la réponse xml du service alti. - * (contient un ou 4 childNode (s) correspondant à l'altitude (z) et éventuellement lat, lon, et acc) + * (contient un ou 5 childNode (s) correspondant à l'altitude (z) et éventuellement lat, lon, acc et measures) * - * @param {DOMElement} node - noeud elevation à lire pour récupérer les informations de l'élévation retournée (z [, lon, lat, acc]) + * @param {DOMElement} node - noeud elevation à lire pour récupérer les informations de l'élévation retournée (z [, lon, lat, acc, measures]) * @return {Array} elevationResponse - format de la réponse en sortie, instance de AltiResponse * @static * @memberof AltiResponseReader @@ -8928,19 +9069,19 @@ AltiResponseReader.READERS = { * (contient une valeur d'altitude, qui est un flottant) * * @param {DOMElement} node - noeud à lire pour récupérer l'altitude - * @param {Object} elevation - objet dans lequel stocker l'altitude retournée + * @param {Object} elevationObject - objet dans lequel stocker l'altitude retournée : elevation ou measure * @static * @memberof AltiResponseReader */ - z : function (node, elevation) { + z : function (node, elevationObject) { var textNode = node.firstChild; if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE - if (elevation) { - elevation.z = parseFloat(textNode.nodeValue); + if (elevationObject) { + elevationObject.z = parseFloat(textNode.nodeValue); } else { - elevation = new _Response_model_Elevation__WEBPACK_IMPORTED_MODULE_1__["default"](); - elevation.z = parseFloat(textNode.nodeValue); - return elevation; + elevationObject = new _Response_model_Elevation__WEBPACK_IMPORTED_MODULE_1__["default"](); + elevationObject.z = parseFloat(textNode.nodeValue); + return elevationObject; } } else { throw new Error("Erreur dans la lecture de la réponse du service : altitude attendue mais absente"); @@ -8952,19 +9093,88 @@ AltiResponseReader.READERS = { * (contient une valeur de précision, qui est un flottant) * * @param {DOMElement} node - noeud à lire pour récupérer la précision - * @param {Object} elevation - objet dans lequel stocker la précision retournée + * @param {Object} elevationObject - objet dans lequel stocker la précision retournée : elevation ou measure * @static * @memberof AltiResponseReader */ - acc : function (node, elevation) { + acc : function (node, elevationObject) { var textNode = node.firstChild; if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE - elevation.acc = parseFloat(textNode.nodeValue); + elevationObject.acc = parseFloat(textNode.nodeValue); } else { throw new Error("Erreur dans la lecture de la réponse du service : précision (acc) attendue mais absente"); } }, + /** + * Lecture d'un noeud "source_name" de la réponse xml du service alti. + * (contient le nom de la source, qui est un string) + * + * @param {DOMElement} node - noeud à lire pour récupérer la précision + * @param {Object} measure - objet dans lequel stocker le nom de la source retourné + * @static + * @memberof AltiResponseReader + */ + source_name : function (node, measure) { + var textNode = node.firstChild; + if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE + measure.source_name = textNode.nodeValue; + } else { + throw new Error("Erreur dans la lecture de la réponse du service : source_name attendue mais absente"); + } + }, + + /** + * Lecture d'un noeud "source_measure" de la réponse xml du service alti. + * (contient le nom de la mesure, qui est un string) + * + * @param {DOMElement} node - noeud à lire pour récupérer la précision + * @param {Object} measure - objet dans lequel stocker le nom de la source retourné + * @static + * @memberof AltiResponseReader + */ + source_measure : function (node, measure) { + var textNode = node.firstChild; + if (textNode && textNode.nodeType === 3) { // 3 === node.TEXT_NODE + measure.source_measure = textNode.nodeValue; + } else { + throw new Error("Erreur dans la lecture de la réponse du service : source_measure attendue mais absente"); + } + }, + + /** + * Lecture d'un noeud "measures" et de ses enfants "measure" de la réponse xml du service alti. + * (contient une valeur de précision, qui est un flottant) + * + * @param {DOMElement} node - noeud à lire pour récupérer la précision + * @param {Object} elevation - objet dans lequel stocker la précision retournée + * @static + * @memberof AltiResponseReader + */ + measures : function (node, elevation) { + elevation.measures = []; + var measure; + if (node.hasChildNodes()) { + var children = node.childNodes; + var measureNode; + var measureChildren; + for (var i = 0; i < children.length; i++) { + measure = new _Response_model_Measure__WEBPACK_IMPORTED_MODULE_2__["default"](); + measureNode = children[i]; + measureChildren = measureNode.childNodes; + for (var j = 0; j < measureChildren.length; j++) { + if (AltiResponseReader.READERS[measureChildren[j].nodeName]) { + // INFO : on passe en paramètre l'objet en entrée elevation, vide, à remplir. + AltiResponseReader.READERS[measureChildren[j].nodeName](measureChildren[j], measure); + } else { + throw new Error("Erreur dans la lecture de la réponse du service : measures attendues mais absentes"); + } + } + elevation.measures.push(measure); + } + } + }, + /** * Lecture d'un noeud "ExceptionReport" de la réponse xml du service alti. * @@ -9154,14 +9364,54 @@ Elevation.prototype = { /* 83 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +__webpack_require__.r(__webpack_exports__); + +/** + * Single measure object returned by underlying web service if measures = true and zonly = false + * + * @property {String} source_name - Name of the source + * @property {String} source_measure - Name of the measure + * @property {Float} z - Point elevation. + * @property {Float} acc - Accuracy of elevation for this point. (only if zonly=false) + * + * @namespace + * @alias Gp.Services.Alti.Measure + */ +function Measure () { + if (!(this instanceof Measure)) { + throw new TypeError("Measure constructor cannot be called as a function."); + } + + this.source_name = null; + this.source_measure = null; + this.z = null; + this.acc = null; +} + +Measure.prototype = { + + constructor : Measure + +}; + +/* harmony default export */ __webpack_exports__["default"] = (Measure); + + +/***/ }), +/* 84 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53); /* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55); /* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(66); /* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(56); -/* harmony import */ var _Request_GeocodeRequestFactory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(84); -/* harmony import */ var _Response_GeocodeResponseFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(87); +/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(67); +/* harmony import */ var _Request_GeocodeRequestFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(85); +/* harmony import */ var _Response_GeocodeResponseFactory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(88); + @@ -9246,7 +9496,15 @@ function Geocode (options_) { this.logger.trace("[Constructeur Geocode (options)]"); var options = this.patchOptionConvertor(options_); - options.serverUrl = options.serverUrl || "https://wxs.ign.fr/calcul/geoportail/geocodage/rest/0.1/search"; + if (!options.serverUrl) { + // Code commenté : Release beta services DIFFUSION uniquement : on tape sur l'anvcien service de geocodage + /* options.serverUrl = DefaultUrlService.Geocode.newUrl(); + if (options.oldGeocodeService) { + options.serverUrl = DefaultUrlService.Geocode.url(); + } */ + // Release beta services DIFFUSION uniquement : on tape sur l'anvcien service de geocodage + options.serverUrl = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__["default"].Geocode.url(); + } // appel du constructeur par heritage _CommonService__WEBPACK_IMPORTED_MODULE_3__["default"].apply(this, [options]); @@ -9391,7 +9649,7 @@ Geocode.prototype.buildRequest = function (error, success) { filters : this.options.filters }; - this.request = _Request_GeocodeRequestFactory__WEBPACK_IMPORTED_MODULE_4__["default"].build(options); + this.request = _Request_GeocodeRequestFactory__WEBPACK_IMPORTED_MODULE_5__["default"].build(options); // on teste si la requete a bien été construite ! (!this.request) @@ -9430,7 +9688,7 @@ Geocode.prototype.analyzeResponse = function (error, success) { scope : this }; - _Response_GeocodeResponseFactory__WEBPACK_IMPORTED_MODULE_5__["default"].build(options); + _Response_GeocodeResponseFactory__WEBPACK_IMPORTED_MODULE_6__["default"].build(options); } else { error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_EMPTY"))); } @@ -9440,13 +9698,13 @@ Geocode.prototype.analyzeResponse = function (error, success) { /***/ }), -/* 84 */ +/* 85 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53); -/* harmony import */ var _GeocodeRequestREST__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(85); +/* harmony import */ var _GeocodeRequestREST__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86); @@ -9504,14 +9762,14 @@ var GeocodeRequestFactory = { /***/ }), -/* 85 */ +/* 86 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53); /* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55); -/* harmony import */ var _model_GeocodeParamREST__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(86); +/* harmony import */ var _model_GeocodeParamREST__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(87); @@ -9602,7 +9860,7 @@ GeocodeRequestREST.prototype = { /***/ }), -/* 86 */ +/* 87 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -9786,14 +10044,14 @@ GeocodeParamREST.prototype.getParams = function () { /***/ }), -/* 87 */ +/* 88 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(66); /* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55); -/* harmony import */ var _Formats_GeocodeResponseParser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(88); +/* harmony import */ var _Formats_GeocodeResponseParser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(89); /** * Factory pour générer une reponse JSON à partir d'un XML * (Factory) @@ -9883,15 +10141,15 @@ var GeocodeReponseFactory = { /***/ }), -/* 88 */ +/* 89 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55); /* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(66); -/* harmony import */ var _Response_model_GeocodeResponse__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(89); -/* harmony import */ var _Response_model_GeocodedLocation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(90); +/* harmony import */ var _Response_model_GeocodeResponse__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(90); +/* harmony import */ var _Response_model_GeocodedLocation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(91); // import Logger from "../../../Utils/LoggerByDefault"; @@ -10029,7 +10287,7 @@ function _parseError (error) { /***/ }), -/* 89 */ +/* 90 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -10061,7 +10319,7 @@ GeocodeResponse.prototype = { /***/ }), -/* 90 */ +/* 91 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -10146,7 +10404,7 @@ GeocodedLocation.prototype = { /***/ }), -/* 91 */ +/* 92 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -10155,8 +10413,10 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55); /* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(66); /* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(56); -/* harmony import */ var _Request_GeocodeRequestFactory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(84); -/* harmony import */ var _Response_GeocodeResponseFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(87); +/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(67); +/* harmony import */ var _Request_GeocodeRequestFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(85); +/* harmony import */ var _Response_GeocodeResponseFactory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(88); + @@ -10246,7 +10506,15 @@ function ReverseGeocode (options_) { this.logger.trace("[Constructeur ReverseGeocode (options)]"); var options = this.patchOptionConvertor(options_); - options.serverUrl = options.serverUrl || "https://wxs.ign.fr/calcul/geoportail/geocodage/rest/0.1/reverse"; + if (!options.serverUrl) { + // Code commenté : Release beta services DIFFUSION uniquement : on tape sur l'anvcien service de geocodage inverse + /* options.serverUrl = DefaultUrlService.ReverseGeocode.newUrl(); + if (options.oldReverseService) { + options.serverUrl = DefaultUrlService.ReverseGeocode.url(); + } */ + // Release beta services DIFFUSION uniquement : on tape sur l'anvcien service de geocodage inverse + options.serverUrl = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__["default"].ReverseGeocode.url(); + } // appel du constructeur par heritage _CommonService__WEBPACK_IMPORTED_MODULE_3__["default"].apply(this, [options]); @@ -10403,7 +10671,7 @@ ReverseGeocode.prototype.buildRequest = function (error, success) { filters : this.options.filters }; - this.request = _Request_GeocodeRequestFactory__WEBPACK_IMPORTED_MODULE_4__["default"].build(options); + this.request = _Request_GeocodeRequestFactory__WEBPACK_IMPORTED_MODULE_5__["default"].build(options); // on teste si la requete a bien été construite ! (!this.request) @@ -10428,7 +10696,7 @@ ReverseGeocode.prototype.analyzeResponse = function (error, success) { scope : this }; - _Response_GeocodeResponseFactory__WEBPACK_IMPORTED_MODULE_5__["default"].build(options); + _Response_GeocodeResponseFactory__WEBPACK_IMPORTED_MODULE_6__["default"].build(options); } else { error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__["default"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__["default"].getMessage("SERVICE_RESPONSE_EMPTY"))); } @@ -10495,17 +10763,19 @@ ReverseGeocode.geoEPSG = ["EPSG:4326"]; /***/ }), -/* 92 */ +/* 93 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(56); -/* harmony import */ var _Response_AutoCompleteResponseFactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(93); -/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53); -/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(55); -/* harmony import */ var _Utils_Helper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(57); -/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(66); +/* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(67); +/* harmony import */ var _Response_AutoCompleteResponseFactory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(94); +/* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(53); +/* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(55); +/* harmony import */ var _Utils_Helper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(57); +/* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(66); + @@ -10567,7 +10837,7 @@ __webpack_require__.r(__webpack_exports__); */ function AutoComplete (options_) { if (!(this instanceof AutoComplete)) { - throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_3__["default"].getMessage("CLASS_CONSTRUCTOR", "AutoComplete")); + throw new TypeError(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_4__["default"].getMessage("CLASS_CONSTRUCTOR", "AutoComplete")); } /** @@ -10576,17 +10846,26 @@ function AutoComplete (options_) { */ this.CLASSNAME = "AutoComplete"; - this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__["default"].getLogger("Gp.Services.AutoComplete"); + this.logger = _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_3__["default"].getLogger("Gp.Services.AutoComplete"); this.logger.trace("[Constructeur AutoComplete (options)]"); var options = this.patchOptionConvertor(options_); - options.serverUrl = options.serverUrl || "https://wxs.ign.fr/calcul/geoportail/geocodage/rest/0.1/completion"; + + if (!options.serverUrl) { + // Code commenté : Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'autocomplétion + /* options.serverUrl = DefaultUrlService.AutoComplete.newUrl(); + if (options.oldAutocompleteService) { + options.serverUrl = DefaultUrlService.AutoComplete.url(); + } */ + // Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'autocompletion + options.serverUrl = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_1__["default"].AutoComplete.url(); + } // appel du constructeur par heritage _CommonService__WEBPACK_IMPORTED_MODULE_0__["default"].apply(this, arguments); if (!options.text) { - throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_3__["default"].getMessage("PARAM_MISSING", "text")); + throw new Error(_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_4__["default"].getMessage("PARAM_MISSING", "text")); } // ajout des options spécifiques au service @@ -10690,7 +10969,7 @@ AutoComplete.prototype.buildRequest = function (error, success) { } // normalisation de la requete avec param KPV - this.request = _Utils_Helper__WEBPACK_IMPORTED_MODULE_4__["default"].normalyzeParameters({ + this.request = _Utils_Helper__WEBPACK_IMPORTED_MODULE_5__["default"].normalyzeParameters({ text : encodeURIComponent(this.options.text), type : type, terr : territory, @@ -10698,7 +10977,7 @@ AutoComplete.prototype.buildRequest = function (error, success) { }); (!this.request) - ? error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_5__["default"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_3__["default"].getMessage("SERVICE_REQUEST_BUILD"))) + ? error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_6__["default"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_4__["default"].getMessage("SERVICE_REQUEST_BUILD"))) : success.call(this, this.request); }; @@ -10719,9 +10998,9 @@ AutoComplete.prototype.analyzeResponse = function (error, success) { scope : this }; - _Response_AutoCompleteResponseFactory__WEBPACK_IMPORTED_MODULE_1__["default"].build(options); + _Response_AutoCompleteResponseFactory__WEBPACK_IMPORTED_MODULE_2__["default"].build(options); } else { - error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_5__["default"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_3__["default"].getMessage("SERVICE_RESPONSE_EMPTY"))); + error.call(this, new _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_6__["default"](_Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_4__["default"].getMessage("SERVICE_RESPONSE_EMPTY"))); } }; @@ -10729,7 +11008,7 @@ AutoComplete.prototype.analyzeResponse = function (error, success) { /***/ }), -/* 93 */ +/* 94 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -10737,8 +11016,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53); /* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55); /* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(66); -/* harmony import */ var _model_AutoCompleteResponse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94); -/* harmony import */ var _model_SuggestedLocation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95); +/* harmony import */ var _model_AutoCompleteResponse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(95); +/* harmony import */ var _model_SuggestedLocation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(96); /** * Factory pour générer une reponse JSON à partir d'un XML ou d'un JSON * (Factory) @@ -10884,7 +11163,7 @@ var AutoCompleteResponseFactory = { /***/ }), -/* 94 */ +/* 95 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -10915,7 +11194,7 @@ AutoCompleteResponse.prototype = { /***/ }), -/* 95 */ +/* 96 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -11046,7 +11325,7 @@ SuggestedLocation.prototype = { /***/ }), -/* 96 */ +/* 97 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -11056,8 +11335,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(66); /* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(56); /* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(67); -/* harmony import */ var _Request_RouteRequestFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(97); -/* harmony import */ var _Response_RouteResponseFactory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(100); +/* harmony import */ var _Request_RouteRequestFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(98); +/* harmony import */ var _Response_RouteResponseFactory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(101); @@ -11291,7 +11570,14 @@ function Route (options) { // gestion de l'url du service par defaut // si l'url n'est pas renseignée, il faut utiliser les urls par defaut if (!this.options.serverUrl) { - var UrlByDefault = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__["default"].Route.url("calcul"); + // Code commenté : Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'itinéraire + /* var UrlByDefault = DefaultUrlService.Route.newUrl(); + if (this.options.oldRouteService) { + UrlByDefault = DefaultUrlService.Route.url(); + } */ + // Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'itinéraire + var UrlByDefault = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__["default"].Route.url(); + if (!UrlByDefault) { throw new Error("Url by default not found !"); } @@ -11382,14 +11668,14 @@ Route.prototype.analyzeResponse = function (error, success) { /***/ }), -/* 97 */ +/* 98 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53); /* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(66); -/* harmony import */ var _RouteRequestREST__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(98); +/* harmony import */ var _RouteRequestREST__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(99); @@ -11479,14 +11765,14 @@ var RouteRequestFactory = { /***/ }), -/* 98 */ +/* 99 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53); /* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55); -/* harmony import */ var _model_RouteParamREST__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(99); +/* harmony import */ var _model_RouteParamREST__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(100); @@ -11592,7 +11878,7 @@ RouteRequestREST.prototype = { /***/ }), -/* 99 */ +/* 100 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -11843,7 +12129,7 @@ RouteParamREST.prototype.getParams = function () { /***/ }), -/* 100 */ +/* 101 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -11851,8 +12137,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53); /* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55); /* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(66); -/* harmony import */ var _model_RouteResponse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(101); -/* harmony import */ var _model_RouteInstruction__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(102); +/* harmony import */ var _model_RouteResponse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(102); +/* harmony import */ var _model_RouteInstruction__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(103); @@ -12103,7 +12389,7 @@ var RouteResponseFactory = { /***/ }), -/* 101 */ +/* 102 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -12151,7 +12437,7 @@ RouteResponse.prototype = { /***/ }), -/* 102 */ +/* 103 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -12207,7 +12493,7 @@ RouteInstruction.prototype = { /***/ }), -/* 103 */ +/* 104 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -12217,8 +12503,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(66); /* harmony import */ var _CommonService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(56); /* harmony import */ var _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(67); -/* harmony import */ var _Request_ProcessIsoCurveRequest__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(104); -/* harmony import */ var _Response_ProcessIsoCurveResponseFactory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(106); +/* harmony import */ var _Request_ProcessIsoCurveRequest__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(105); +/* harmony import */ var _Response_ProcessIsoCurveResponseFactory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(107); @@ -12467,7 +12753,13 @@ function ProcessIsoCurve (options) { // gestion de l'url du service par defaut // si l'url n'est pas renseignée, il faut utiliser les urls par defaut if (!this.options.serverUrl) { - var urlFound = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__["default"].ProcessIsoCurve.url("calcul"); + // Code commenté : Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'isochrone + /* var urlFound = DefaultUrlService.ProcessIsoCurve.newUrl(); + if (this.options.oldIsoService) { + urlFound = DefaultUrlService.ProcessIsoCurve.url(); + } */ + // Release beta services DIFFUSION uniquement : on tape sur l'anvcien service d'isochrone + var urlFound = _DefaultUrlService__WEBPACK_IMPORTED_MODULE_4__["default"].ProcessIsoCurve.url(); if (!urlFound) { throw new Error("Url by default not found !"); } @@ -12539,14 +12831,14 @@ ProcessIsoCurve.prototype.analyzeResponse = function (onError, onSuccess) { /***/ }), -/* 104 */ +/* 105 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53); /* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55); -/* harmony import */ var _model_ProcessIsoCurveParam__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(105); +/* harmony import */ var _model_ProcessIsoCurveParam__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(106); @@ -12740,7 +13032,7 @@ ProcessIsoCurveRequest.prototype = { /***/ }), -/* 105 */ +/* 106 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -12951,7 +13243,7 @@ ProcessIsoCurveParam.prototype.getParams = function () { /***/ }), -/* 106 */ +/* 107 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -12959,7 +13251,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53); /* harmony import */ var _Utils_MessagesResources__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55); /* harmony import */ var _Exceptions_ErrorService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(66); -/* harmony import */ var _model_ProcessIsoCurveResponse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(107); +/* harmony import */ var _model_ProcessIsoCurveResponse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(108); @@ -13069,7 +13361,7 @@ var ProcessIsoCurveResponseFactory = { /***/ }), -/* 107 */ +/* 108 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -13122,7 +13414,7 @@ ProcessIsoCurveResponse.prototype = { /***/ }), -/* 108 */ +/* 109 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -13198,12 +13490,12 @@ var LoggerByDefault = { /* harmony default export */ __webpack_exports__["default"] = (LoggerByDefault); /***/ }), -/* 109 */ +/* 110 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(108); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(109); /** @@ -13250,20 +13542,20 @@ var ProxyUtils = { /* harmony default export */ __webpack_exports__["default"] = (ProxyUtils); /***/ }), -/* 110 */ +/* 111 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var ol_format_KML__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(111); +/* harmony import */ var ol_format_KML__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(112); /* harmony import */ var ol_format_KML__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(ol_format_KML__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(112); +/* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(113); /* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_style__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _Styling__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(113); -/* harmony import */ var _Common_Utils_ColorUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(114); -/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(108); -/* harmony import */ var _Common_Utils_Parser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(125); -/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(126); +/* harmony import */ var _Styling__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(114); +/* harmony import */ var _Common_Utils_ColorUtils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(115); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(109); +/* harmony import */ var _Common_Utils_Parser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(126); +/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(127); // import openlayers @@ -14546,43 +14838,43 @@ if (window.ol && window.ol.format) { } /***/ }), -/* 111 */ +/* 112 */ /***/ (function(module, exports) { module.exports = ol.format.KML; /***/ }), -/* 112 */ +/* 113 */ /***/ (function(module, exports) { module.exports = ol.style; /***/ }), -/* 113 */ +/* 114 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _Common_Utils_ColorUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(114); -/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(108); -/* harmony import */ var _Controls_Utils_Markers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(115); -/* harmony import */ var ol_Feature__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(116); +/* harmony import */ var _Common_Utils_ColorUtils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(115); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(109); +/* harmony import */ var _Controls_Utils_Markers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(116); +/* harmony import */ var ol_Feature__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(117); /* harmony import */ var ol_Feature__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ol_Feature__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var ol_style_Style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(117); +/* harmony import */ var ol_style_Style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(118); /* harmony import */ var ol_style_Style__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(ol_style_Style__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var ol_style_Circle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(118); +/* harmony import */ var ol_style_Circle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(119); /* harmony import */ var ol_style_Circle__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(ol_style_Circle__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var ol_style_Icon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(119); +/* harmony import */ var ol_style_Icon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(120); /* harmony import */ var ol_style_Icon__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(ol_style_Icon__WEBPACK_IMPORTED_MODULE_6__); -/* harmony import */ var ol_style_Fill__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(120); +/* harmony import */ var ol_style_Fill__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(121); /* harmony import */ var ol_style_Fill__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(ol_style_Fill__WEBPACK_IMPORTED_MODULE_7__); -/* harmony import */ var ol_style_Stroke__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(121); +/* harmony import */ var ol_style_Stroke__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(122); /* harmony import */ var ol_style_Stroke__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(ol_style_Stroke__WEBPACK_IMPORTED_MODULE_8__); -/* harmony import */ var ol_style_Text__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(122); +/* harmony import */ var ol_style_Text__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(123); /* harmony import */ var ol_style_Text__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(ol_style_Text__WEBPACK_IMPORTED_MODULE_9__); -/* harmony import */ var ol_geom_Polygon__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(123); +/* harmony import */ var ol_geom_Polygon__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(124); /* harmony import */ var ol_geom_Polygon__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(ol_geom_Polygon__WEBPACK_IMPORTED_MODULE_10__); -/* harmony import */ var ol_geom_MultiPolygon__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(124); +/* harmony import */ var ol_geom_MultiPolygon__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(125); /* harmony import */ var ol_geom_MultiPolygon__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(ol_geom_MultiPolygon__WEBPACK_IMPORTED_MODULE_11__); @@ -15398,7 +15690,7 @@ var Styling = { /* harmony default export */ __webpack_exports__["default"] = (Styling); /***/ }), -/* 114 */ +/* 115 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -15575,7 +15867,7 @@ var ColorUtils = { /* harmony default export */ __webpack_exports__["default"] = (ColorUtils); /***/ }), -/* 115 */ +/* 116 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -15590,66 +15882,66 @@ var Marker = { /* harmony default export */ __webpack_exports__["default"] = (Marker); /***/ }), -/* 116 */ +/* 117 */ /***/ (function(module, exports) { module.exports = ol.Feature; /***/ }), -/* 117 */ +/* 118 */ /***/ (function(module, exports) { module.exports = ol.style.Style; /***/ }), -/* 118 */ +/* 119 */ /***/ (function(module, exports) { module.exports = ol.style.Circle; /***/ }), -/* 119 */ +/* 120 */ /***/ (function(module, exports) { module.exports = ol.style.Icon; /***/ }), -/* 120 */ +/* 121 */ /***/ (function(module, exports) { module.exports = ol.style.Fill; /***/ }), -/* 121 */ +/* 122 */ /***/ (function(module, exports) { module.exports = ol.style.Stroke; /***/ }), -/* 122 */ +/* 123 */ /***/ (function(module, exports) { module.exports = ol.style.Text; /***/ }), -/* 123 */ +/* 124 */ /***/ (function(module, exports) { module.exports = ol.geom.Polygon; /***/ }), -/* 124 */ +/* 125 */ /***/ (function(module, exports) { module.exports = ol.geom.MultiPolygon; /***/ }), -/* 125 */ +/* 126 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(108); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(109); function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } var logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("parser"); @@ -15778,7 +16070,7 @@ var Parser = { /* harmony default export */ __webpack_exports__["default"] = (Parser); /***/ }), -/* 126 */ +/* 127 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -15871,19 +16163,19 @@ var Utils = { /* harmony default export */ __webpack_exports__["default"] = (Utils); /***/ }), -/* 127 */ +/* 128 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var ol_format_GPX__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(128); +/* harmony import */ var ol_format_GPX__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(129); /* harmony import */ var ol_format_GPX__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(ol_format_GPX__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var ol_geom_MultiLineString__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(129); +/* harmony import */ var ol_geom_MultiLineString__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(130); /* harmony import */ var ol_geom_MultiLineString__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_geom_MultiLineString__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var ol_geom_LineString__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(130); +/* harmony import */ var ol_geom_LineString__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(131); /* harmony import */ var ol_geom_LineString__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ol_geom_LineString__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _Styling__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(113); -/* harmony import */ var _Common_Utils_Parser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(125); +/* harmony import */ var _Styling__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(114); +/* harmony import */ var _Common_Utils_Parser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(126); // import openlayers // import Geometry @@ -16404,32 +16696,32 @@ if (window.ol && window.ol.format) { } /***/ }), -/* 128 */ +/* 129 */ /***/ (function(module, exports) { module.exports = ol.format.GPX; /***/ }), -/* 129 */ +/* 130 */ /***/ (function(module, exports) { module.exports = ol.geom.MultiLineString; /***/ }), -/* 130 */ +/* 131 */ /***/ (function(module, exports) { module.exports = ol.geom.LineString; /***/ }), -/* 131 */ +/* 132 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var ol_format_GeoJSON__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(132); +/* harmony import */ var ol_format_GeoJSON__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(133); /* harmony import */ var ol_format_GeoJSON__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(ol_format_GeoJSON__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _Styling__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(113); +/* harmony import */ var _Styling__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(114); // import openlayers // import local @@ -16587,23 +16879,23 @@ if (window.ol && window.ol.format) { } /***/ }), -/* 132 */ +/* 133 */ /***/ (function(module, exports) { module.exports = ol.format.GeoJSON; /***/ }), -/* 133 */ +/* 134 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var ol_source_WMTS__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47); /* harmony import */ var ol_source_WMTS__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(ol_source_WMTS__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var ol_extent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(134); +/* harmony import */ var ol_extent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(135); /* harmony import */ var ol_extent__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_extent__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50); -/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(126); +/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(127); // import OpenLayers @@ -16736,25 +17028,25 @@ if (window.ol && window.ol.source) { } /***/ }), -/* 134 */ +/* 135 */ /***/ (function(module, exports) { module.exports = ol.extent; /***/ }), -/* 135 */ +/* 136 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50); -/* harmony import */ var ol_tilegrid_WMTS__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(136); +/* harmony import */ var ol_tilegrid_WMTS__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(137); /* harmony import */ var ol_tilegrid_WMTS__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_tilegrid_WMTS__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _Sources_WMTS__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(133); -/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(126); -/* harmony import */ var _Common_Utils_LayerUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(137); -/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(108); -/* harmony import */ var _Common_Utils_Config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(138); +/* harmony import */ var _Sources_WMTS__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(134); +/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(127); +/* harmony import */ var _Common_Utils_LayerUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(138); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(109); +/* harmony import */ var _Common_Utils_Config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(139); /* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(3); var _package_json__WEBPACK_IMPORTED_MODULE_7___namespace = /*#__PURE__*/__webpack_require__.t(3, 1); @@ -16895,13 +17187,13 @@ if (window.ol && window.ol.source) { } /***/ }), -/* 136 */ +/* 137 */ /***/ (function(module, exports) { module.exports = ol.tilegrid.WMTS; /***/ }), -/* 137 */ +/* 138 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -17209,7 +17501,7 @@ var LayerUtils = { /* harmony default export */ __webpack_exports__["default"] = (LayerUtils); /***/ }), -/* 138 */ +/* 139 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -17253,7 +17545,7 @@ var Config = { /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(62))) /***/ }), -/* 139 */ +/* 140 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -17261,9 +17553,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50); /* harmony import */ var ol_source_TileWMS__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(46); /* harmony import */ var ol_source_TileWMS__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_source_TileWMS__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(126); -/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(108); -/* harmony import */ var _Common_Utils_Config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(138); +/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(127); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(109); +/* harmony import */ var _Common_Utils_Config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(139); /* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3); var _package_json__WEBPACK_IMPORTED_MODULE_5___namespace = /*#__PURE__*/__webpack_require__.t(3, 1); @@ -17400,18 +17692,18 @@ if (window.ol && window.ol.source) { } /***/ }), -/* 140 */ +/* 141 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(141); +/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(142); /* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(ol_proj__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var ol_layer_Tile__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(142); +/* harmony import */ var ol_layer_Tile__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(143); /* harmony import */ var ol_layer_Tile__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_layer_Tile__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(126); -/* harmony import */ var _Common_Utils_Config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(138); -/* harmony import */ var _SourceWMTS__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(135); +/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(127); +/* harmony import */ var _Common_Utils_Config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(139); +/* harmony import */ var _SourceWMTS__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(136); // import openlayers @@ -17559,30 +17851,30 @@ if (window.ol && window.ol.layer) { } /***/ }), -/* 141 */ +/* 142 */ /***/ (function(module, exports) { module.exports = ol.proj; /***/ }), -/* 142 */ +/* 143 */ /***/ (function(module, exports) { module.exports = ol.layer.Tile; /***/ }), -/* 143 */ +/* 144 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(141); +/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(142); /* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(ol_proj__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var ol_layer_Tile__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(142); +/* harmony import */ var ol_layer_Tile__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(143); /* harmony import */ var ol_layer_Tile__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_layer_Tile__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(126); -/* harmony import */ var _Common_Utils_Config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(138); -/* harmony import */ var _SourceWMS__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(139); +/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(127); +/* harmony import */ var _Common_Utils_Config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(139); +/* harmony import */ var _SourceWMS__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(140); function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } // import openlayers @@ -17731,24 +18023,24 @@ if (window.ol && window.ol.layer) { } /***/ }), -/* 144 */ +/* 145 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var ol_layer_VectorTile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(145); +/* harmony import */ var ol_layer_VectorTile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(146); /* harmony import */ var ol_layer_VectorTile__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(ol_layer_VectorTile__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var ol_source_VectorTile__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(44); /* harmony import */ var ol_source_VectorTile__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_source_VectorTile__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var ol_source_TileJSON__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(146); +/* harmony import */ var ol_source_TileJSON__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(147); /* harmony import */ var ol_source_TileJSON__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ol_source_TileJSON__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var ol_format_MVT__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(147); +/* harmony import */ var ol_format_MVT__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(148); /* harmony import */ var ol_format_MVT__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ol_format_MVT__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(148); +/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(149); /* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(ol_Observable__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var ol_mapbox_style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(149); -/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(126); -/* harmony import */ var _Common_Utils_Config__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(138); +/* harmony import */ var ol_mapbox_style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(150); +/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(127); +/* harmony import */ var _Common_Utils_Config__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(139); // import openlayers @@ -18106,31 +18398,31 @@ if (window.ol && window.ol.layer) { } /***/ }), -/* 145 */ +/* 146 */ /***/ (function(module, exports) { module.exports = ol.layer.VectorTile; /***/ }), -/* 146 */ +/* 147 */ /***/ (function(module, exports) { module.exports = ol.source.TileJSON; /***/ }), -/* 147 */ +/* 148 */ /***/ (function(module, exports) { module.exports = ol.format.MVT; /***/ }), -/* 148 */ +/* 149 */ /***/ (function(module, exports) { module.exports = ol.Observable; /***/ }), -/* 149 */ +/* 150 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -18145,40 +18437,40 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSource", function() { return getSource; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_finalizeLayer", function() { return finalizeLayer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_getFonts", function() { return getFonts; }); -/* harmony import */ var ol_format_GeoJSON_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(132); +/* harmony import */ var ol_format_GeoJSON_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(133); /* harmony import */ var ol_format_GeoJSON_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(ol_format_GeoJSON_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var ol_format_MVT_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(147); +/* harmony import */ var ol_format_MVT_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(148); /* harmony import */ var ol_format_MVT_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_format_MVT_js__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var ol_Map_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(150); +/* harmony import */ var ol_Map_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(151); /* harmony import */ var ol_Map_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ol_Map_js__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var ol_tilegrid_TileGrid_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(151); +/* harmony import */ var ol_tilegrid_TileGrid_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(152); /* harmony import */ var ol_tilegrid_TileGrid_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ol_tilegrid_TileGrid_js__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var ol_source_TileJSON_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(146); +/* harmony import */ var ol_source_TileJSON_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(147); /* harmony import */ var ol_source_TileJSON_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(ol_source_TileJSON_js__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var ol_layer_Tile_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(142); +/* harmony import */ var ol_layer_Tile_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(143); /* harmony import */ var ol_layer_Tile_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(ol_layer_Tile_js__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var ol_layer_Vector_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(152); +/* harmony import */ var ol_layer_Vector_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(153); /* harmony import */ var ol_layer_Vector_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(ol_layer_Vector_js__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var ol_source_Vector_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45); /* harmony import */ var ol_source_Vector_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(ol_source_Vector_js__WEBPACK_IMPORTED_MODULE_7__); -/* harmony import */ var ol_layer_VectorTile_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(145); +/* harmony import */ var ol_layer_VectorTile_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(146); /* harmony import */ var ol_layer_VectorTile_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(ol_layer_VectorTile_js__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var ol_source_VectorTile_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(44); /* harmony import */ var ol_source_VectorTile_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(ol_source_VectorTile_js__WEBPACK_IMPORTED_MODULE_9__); -/* harmony import */ var ol_View_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(153); +/* harmony import */ var ol_View_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(154); /* harmony import */ var ol_View_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(ol_View_js__WEBPACK_IMPORTED_MODULE_10__); -/* harmony import */ var _stylefunction_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(154); -/* harmony import */ var webfont_matcher_lib_fonts_google_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(193); +/* harmony import */ var _stylefunction_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(155); +/* harmony import */ var webfont_matcher_lib_fonts_google_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(194); /* harmony import */ var webfont_matcher_lib_fonts_google_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(webfont_matcher_lib_fonts_google_js__WEBPACK_IMPORTED_MODULE_12__); -/* harmony import */ var mapbox_to_css_font__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(183); +/* harmony import */ var mapbox_to_css_font__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(184); /* harmony import */ var mapbox_to_css_font__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(mapbox_to_css_font__WEBPACK_IMPORTED_MODULE_13__); -/* harmony import */ var _mapbox_mapbox_gl_style_spec__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(184); -/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(189); -/* harmony import */ var ol_tilegrid_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(194); +/* harmony import */ var _mapbox_mapbox_gl_style_spec__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(185); +/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(190); +/* harmony import */ var ol_tilegrid_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(195); /* harmony import */ var ol_tilegrid_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(ol_tilegrid_js__WEBPACK_IMPORTED_MODULE_16__); -/* harmony import */ var ol_proj_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(141); +/* harmony import */ var ol_proj_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(142); /* harmony import */ var ol_proj_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(ol_proj_js__WEBPACK_IMPORTED_MODULE_17__); -/* harmony import */ var ol_Observable_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(148); +/* harmony import */ var ol_Observable_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(149); /* harmony import */ var ol_Observable_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(ol_Observable_js__WEBPACK_IMPORTED_MODULE_18__); function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } /* @@ -18951,31 +19243,31 @@ function getSource(map, sourceId) { /***/ }), -/* 150 */ +/* 151 */ /***/ (function(module, exports) { module.exports = ol.Map; /***/ }), -/* 151 */ +/* 152 */ /***/ (function(module, exports) { module.exports = ol.tilegrid.TileGrid; /***/ }), -/* 152 */ +/* 153 */ /***/ (function(module, exports) { module.exports = ol.layer.Vector; /***/ }), -/* 153 */ +/* 154 */ /***/ (function(module, exports) { module.exports = ol.View; /***/ }), -/* 154 */ +/* 155 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -18986,23 +19278,23 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_evaluateFilter", function() { return evaluateFilter; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_fromTemplate", function() { return fromTemplate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_getValue", function() { return getValue; }); -/* harmony import */ var ol_style_Circle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(118); +/* harmony import */ var ol_style_Circle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(119); /* harmony import */ var ol_style_Circle_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(ol_style_Circle_js__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var ol_style_Fill_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(120); +/* harmony import */ var ol_style_Fill_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(121); /* harmony import */ var ol_style_Fill_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_style_Fill_js__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var ol_style_Icon_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(119); +/* harmony import */ var ol_style_Icon_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(120); /* harmony import */ var ol_style_Icon_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ol_style_Icon_js__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var ol_render_Feature_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(155); -/* harmony import */ var ol_style_Stroke_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(121); +/* harmony import */ var ol_render_Feature_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(156); +/* harmony import */ var ol_style_Stroke_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(122); /* harmony import */ var ol_style_Stroke_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(ol_style_Stroke_js__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var ol_style_Style_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(117); +/* harmony import */ var ol_style_Style_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(118); /* harmony import */ var ol_style_Style_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(ol_style_Style_js__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var ol_style_Text_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(122); +/* harmony import */ var ol_style_Text_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(123); /* harmony import */ var ol_style_Text_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(ol_style_Text_js__WEBPACK_IMPORTED_MODULE_6__); -/* harmony import */ var mapbox_to_css_font__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(183); +/* harmony import */ var mapbox_to_css_font__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(184); /* harmony import */ var mapbox_to_css_font__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(mapbox_to_css_font__WEBPACK_IMPORTED_MODULE_7__); -/* harmony import */ var _mapbox_mapbox_gl_style_spec__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(184); -/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(189); +/* harmony import */ var _mapbox_mapbox_gl_style_spec__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(185); +/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(190); /* ol-mapbox-style - Use Mapbox Style objects with OpenLayers Copyright 2016-present ol-mapbox-style contributors @@ -19695,20 +19987,20 @@ function recordStyleLayer(record) { /***/ }), -/* 155 */ +/* 156 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(156); -/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(157); -/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(162); -/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(165); -/* harmony import */ var _geom_flat_interiorpoint_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(166); -/* harmony import */ var _proj_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(168); -/* harmony import */ var _geom_flat_interpolate_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(180); -/* harmony import */ var _geom_flat_center_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(181); -/* harmony import */ var _geom_flat_transform_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(182); +/* harmony import */ var _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(157); +/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(158); +/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(163); +/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(166); +/* harmony import */ var _geom_flat_interiorpoint_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(167); +/* harmony import */ var _proj_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(169); +/* harmony import */ var _geom_flat_interpolate_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(181); +/* harmony import */ var _geom_flat_center_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(182); +/* harmony import */ var _geom_flat_transform_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(183); /** * @module ol/render/Feature */ @@ -19956,7 +20248,7 @@ RenderFeature.prototype.getFlatCoordinates = //# sourceMappingURL=Feature.js.map /***/ }), -/* 156 */ +/* 157 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -19984,7 +20276,7 @@ __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=GeometryType.js.map /***/ }), -/* 157 */ +/* 158 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -20005,8 +20297,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeInverse", function() { return makeInverse; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "determinant", function() { return determinant; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toString", function() { return toString; }); -/* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(158); -/* harmony import */ var _asserts_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(159); +/* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(159); +/* harmony import */ var _asserts_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(160); /** * @module ol/transform */ @@ -20273,7 +20565,7 @@ function toString(mat) { //# sourceMappingURL=transform.js.map /***/ }), -/* 158 */ +/* 159 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -20355,13 +20647,13 @@ var PASSIVE_EVENT_LISTENERS = (function () { //# sourceMappingURL=has.js.map /***/ }), -/* 159 */ +/* 160 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "assert", function() { return assert; }); -/* harmony import */ var _AssertionError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(160); +/* harmony import */ var _AssertionError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(161); /** * @module ol/asserts */ @@ -20378,12 +20670,12 @@ function assert(assertion, errorCode) { //# sourceMappingURL=asserts.js.map /***/ }), -/* 160 */ +/* 161 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(161); +/* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(162); var __extends = (undefined && undefined.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || @@ -20445,7 +20737,7 @@ var AssertionError = /** @class */ (function (_super) { //# sourceMappingURL=AssertionError.js.map /***/ }), -/* 161 */ +/* 162 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -20490,7 +20782,7 @@ var VERSION = '6.9.0'; //# sourceMappingURL=util.js.map /***/ }), -/* 162 */ +/* 163 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -20541,9 +20833,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "intersectsSegment", function() { return intersectsSegment; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applyTransform", function() { return applyTransform; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapX", function() { return wrapX; }); -/* harmony import */ var _extent_Corner_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(163); -/* harmony import */ var _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(164); -/* harmony import */ var _asserts_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(159); +/* harmony import */ var _extent_Corner_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(164); +/* harmony import */ var _extent_Relationship_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(165); +/* harmony import */ var _asserts_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(160); /** * @module ol/extent */ @@ -21327,7 +21619,7 @@ function wrapX(extent, projection) { //# sourceMappingURL=extent.js.map /***/ }), -/* 163 */ +/* 164 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -21348,7 +21640,7 @@ __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=Corner.js.map /***/ }), -/* 164 */ +/* 165 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -21371,7 +21663,7 @@ __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=Relationship.js.map /***/ }), -/* 165 */ +/* 166 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -21642,15 +21934,15 @@ function isSorted(arr, opt_func, opt_strict) { //# sourceMappingURL=array.js.map /***/ }), -/* 166 */ +/* 167 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getInteriorPointOfArray", function() { return getInteriorPointOfArray; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getInteriorPointsOfMultiArray", function() { return getInteriorPointsOfMultiArray; }); -/* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(167); -/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(165); +/* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(168); +/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(166); /** * @module ol/geom/flat/interiorpoint */ @@ -21742,7 +22034,7 @@ function getInteriorPointsOfMultiArray(flatCoordinates, offset, endss, stride, f //# sourceMappingURL=interiorpoint.js.map /***/ }), -/* 167 */ +/* 168 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -21751,7 +22043,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linearRingContainsXY", function() { return linearRingContainsXY; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linearRingsContainsXY", function() { return linearRingsContainsXY; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linearRingssContainsXY", function() { return linearRingssContainsXY; }); -/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(162); +/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(163); /** * @module ol/geom/flat/contains */ @@ -21859,7 +22151,7 @@ function linearRingssContainsXY(flatCoordinates, offset, endss, stride, x, y) { //# sourceMappingURL=contains.js.map /***/ }), -/* 168 */ +/* 169 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -21896,20 +22188,20 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromUserResolution", function() { return fromUserResolution; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createSafeCoordinateTransform", function() { return createSafeCoordinateTransform; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addCommon", function() { return addCommon; }); -/* harmony import */ var _proj_Projection_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169); +/* harmony import */ var _proj_Projection_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Projection", function() { return _proj_Projection_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); -/* harmony import */ var _proj_Units_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(170); +/* harmony import */ var _proj_Units_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(171); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "METERS_PER_UNIT", function() { return _proj_Units_js__WEBPACK_IMPORTED_MODULE_1__["METERS_PER_UNIT"]; }); -/* harmony import */ var _proj_epsg3857_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(171); -/* harmony import */ var _proj_epsg4326_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(173); -/* harmony import */ var _proj_projections_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(174); -/* harmony import */ var _proj_transforms_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(175); -/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(162); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(172); -/* harmony import */ var _sphere_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(177); -/* harmony import */ var _coordinate_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(178); +/* harmony import */ var _proj_epsg3857_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(172); +/* harmony import */ var _proj_epsg4326_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(174); +/* harmony import */ var _proj_projections_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(175); +/* harmony import */ var _proj_transforms_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(176); +/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(163); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(173); +/* harmony import */ var _sphere_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(178); +/* harmony import */ var _coordinate_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(179); /** * @module ol/proj */ @@ -22559,12 +22851,12 @@ addCommon(); //# sourceMappingURL=proj.js.map /***/ }), -/* 169 */ +/* 170 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _Units_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170); +/* harmony import */ var _Units_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(171); /** * @module ol/proj/Projection */ @@ -22813,7 +23105,7 @@ var Projection = /** @class */ (function () { //# sourceMappingURL=Projection.js.map /***/ }), -/* 170 */ +/* 171 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -22900,7 +23192,7 @@ METERS_PER_UNIT[Units.USFEET] = 1200 / 3937; //# sourceMappingURL=Units.js.map /***/ }), -/* 171 */ +/* 172 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -22913,9 +23205,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PROJECTIONS", function() { return PROJECTIONS; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromEPSG4326", function() { return fromEPSG4326; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toEPSG4326", function() { return toEPSG4326; }); -/* harmony import */ var _Projection_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169); -/* harmony import */ var _Units_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(170); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(172); +/* harmony import */ var _Projection_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170); +/* harmony import */ var _Units_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(171); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(173); var __extends = (undefined && undefined.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || @@ -23067,7 +23359,7 @@ function toEPSG4326(input, opt_output, opt_dimension) { //# sourceMappingURL=epsg3857.js.map /***/ }), -/* 172 */ +/* 173 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -23280,7 +23572,7 @@ function lerp(a, b, x) { //# sourceMappingURL=math.js.map /***/ }), -/* 173 */ +/* 174 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -23289,8 +23581,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EXTENT", function() { return EXTENT; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "METERS_PER_UNIT", function() { return METERS_PER_UNIT; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PROJECTIONS", function() { return PROJECTIONS; }); -/* harmony import */ var _Projection_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(169); -/* harmony import */ var _Units_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(170); +/* harmony import */ var _Projection_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(170); +/* harmony import */ var _Units_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(171); var __extends = (undefined && undefined.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || @@ -23375,7 +23667,7 @@ var PROJECTIONS = [ //# sourceMappingURL=epsg4326.js.map /***/ }), -/* 174 */ +/* 175 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -23417,7 +23709,7 @@ function add(code, projection) { //# sourceMappingURL=projections.js.map /***/ }), -/* 175 */ +/* 176 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -23426,7 +23718,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "add", function() { return add; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "remove", function() { return remove; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "get", function() { return get; }); -/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(176); +/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(177); /** * @module ol/proj/transforms */ @@ -23493,7 +23785,7 @@ function get(sourceCode, destinationCode) { //# sourceMappingURL=transforms.js.map /***/ }), -/* 176 */ +/* 177 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -23574,7 +23866,7 @@ function isEmpty(object) { //# sourceMappingURL=obj.js.map /***/ }), -/* 177 */ +/* 178 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -23584,8 +23876,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLength", function() { return getLength; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getArea", function() { return getArea; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "offset", function() { return offset; }); -/* harmony import */ var _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(156); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172); +/* harmony import */ var _geom_GeometryType_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(157); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(173); /** * @module ol/sphere */ @@ -23824,7 +24116,7 @@ function offset(c1, distance, bearing, opt_radius) { //# sourceMappingURL=sphere.js.map /***/ }), -/* 178 */ +/* 179 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -23845,9 +24137,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toStringXY", function() { return toStringXY; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapX", function() { return wrapX; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getWorldsAway", function() { return getWorldsAway; }); -/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(162); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172); -/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(179); +/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(163); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(173); +/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(180); /** * @module ol/coordinate */ @@ -24262,7 +24554,7 @@ function getWorldsAway(coordinate, projection, opt_sourceExtentWidth) { //# sourceMappingURL=coordinate.js.map /***/ }), -/* 179 */ +/* 180 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -24310,7 +24602,7 @@ function compareVersions(v1, v2) { //# sourceMappingURL=string.js.map /***/ }), -/* 180 */ +/* 181 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -24318,8 +24610,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interpolatePoint", function() { return interpolatePoint; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lineStringCoordinateAtM", function() { return lineStringCoordinateAtM; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lineStringsCoordinateAtM", function() { return lineStringsCoordinateAtM; }); -/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(165); -/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(172); +/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(166); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(173); /** * @module ol/geom/flat/interpolate */ @@ -24497,13 +24789,13 @@ function lineStringsCoordinateAtM(flatCoordinates, offset, ends, stride, m, extr //# sourceMappingURL=interpolate.js.map /***/ }), -/* 181 */ +/* 182 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linearRingss", function() { return linearRingss; }); -/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(162); +/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(163); /** * @module ol/geom/flat/center */ @@ -24529,7 +24821,7 @@ function linearRingss(flatCoordinates, offset, endss, stride) { //# sourceMappingURL=center.js.map /***/ }), -/* 182 */ +/* 183 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -24654,7 +24946,7 @@ function translate(flatCoordinates, offset, end, stride, deltaX, deltaY, opt_des //# sourceMappingURL=transform.js.map /***/ }), -/* 183 */ +/* 184 */ /***/ (function(module, exports) { var fontWeights = { @@ -24739,7 +25031,7 @@ module.exports = function(fonts, size, lineHeight) { /***/ }), -/* 184 */ +/* 185 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -39360,10 +39652,10 @@ var visit = { validateStyle.parsed = validateStyle; validateStyle.latest = validateStyle; -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(62), __webpack_require__(185).Buffer)) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(62), __webpack_require__(186).Buffer)) /***/ }), -/* 185 */ +/* 186 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -39377,9 +39669,9 @@ validateStyle.latest = validateStyle; -var base64 = __webpack_require__(186) -var ieee754 = __webpack_require__(187) -var isArray = __webpack_require__(188) +var base64 = __webpack_require__(187) +var ieee754 = __webpack_require__(188) +var isArray = __webpack_require__(189) exports.Buffer = Buffer exports.SlowBuffer = SlowBuffer @@ -41160,7 +41452,7 @@ function isnan (val) { /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(62))) /***/ }), -/* 186 */ +/* 187 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -41317,7 +41609,7 @@ function fromByteArray (uint8) { /***/ }), -/* 187 */ +/* 188 */ /***/ (function(module, exports) { /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ @@ -41408,7 +41700,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { /***/ }), -/* 188 */ +/* 189 */ /***/ (function(module, exports) { var toString = {}.toString; @@ -41419,7 +41711,7 @@ module.exports = Array.isArray || function (arr) { /***/ }), -/* 189 */ +/* 190 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -41431,10 +41723,10 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getZoomForResolution", function() { return getZoomForResolution; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applyLetterSpacing", function() { return applyLetterSpacing; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapText", function() { return wrapText; }); -/* harmony import */ var ol_events_EventType_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(190); -/* harmony import */ var ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(191); +/* harmony import */ var ol_events_EventType_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(191); +/* harmony import */ var ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(192); /* harmony import */ var ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_render_canvas_js__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var ol_events_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(192); +/* harmony import */ var ol_events_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(193); @@ -41614,7 +41906,7 @@ function wrapText(text, font, em, letterSpacing) { } /***/ }), -/* 190 */ +/* 191 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -41658,13 +41950,13 @@ __webpack_require__.r(__webpack_exports__); //# sourceMappingURL=EventType.js.map /***/ }), -/* 191 */ +/* 192 */ /***/ (function(module, exports) { module.exports = ol.render.canvas; /***/ }), -/* 192 */ +/* 193 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -41672,7 +41964,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "listen", function() { return listen; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "listenOnce", function() { return listenOnce; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unlistenByKey", function() { return unlistenByKey; }); -/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(176); +/* harmony import */ var _obj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(177); /** * @module ol/events */ @@ -41774,7 +42066,7 @@ function unlistenByKey(key) { //# sourceMappingURL=events.js.map /***/ }), -/* 193 */ +/* 194 */ /***/ (function(module, exports) { // Generated by CoffeeScript 1.10.0 @@ -41803,29 +42095,29 @@ function unlistenByKey(key) { /***/ }), -/* 194 */ +/* 195 */ /***/ (function(module, exports) { module.exports = ol.tilegrid; /***/ }), -/* 195 */ +/* 196 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _CSS_Controls_LayerSwitcher_GPlayerSwitcherOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(32); /* harmony import */ var _CSS_Controls_LayerSwitcher_GPlayerSwitcherOpenLayers_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_LayerSwitcher_GPlayerSwitcherOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(196); +/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197); /* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_control_Control__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(148); +/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(149); /* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ol_Observable__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var ol_extent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(134); +/* harmony import */ var ol_extent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(135); /* harmony import */ var ol_extent__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ol_extent__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(126); -/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(197); -/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(108); -/* harmony import */ var _Common_Controls_LayerSwitcherDOM__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(198); +/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(127); +/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(198); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(109); +/* harmony import */ var _Common_Controls_LayerSwitcherDOM__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(199); function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } // import CSS @@ -42866,13 +43158,13 @@ if (window.ol && window.ol.control) { } /***/ }), -/* 196 */ +/* 197 */ /***/ (function(module, exports) { module.exports = ol.control.Control; /***/ }), -/* 197 */ +/* 198 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -42955,12 +43247,12 @@ var SelectorID = { /* harmony default export */ __webpack_exports__["default"] = (SelectorID); /***/ }), -/* 198 */ +/* 199 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var sortablejs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(199); +/* harmony import */ var sortablejs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(200); var LayerSwitcherDOM = { /** @@ -43556,7 +43848,7 @@ var LayerSwitcherDOM = { /* harmony default export */ __webpack_exports__["default"] = (LayerSwitcherDOM); /***/ }), -/* 199 */ +/* 200 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -47340,20 +47632,20 @@ Sortable.mount(Remove, Revert); /***/ }), -/* 200 */ +/* 201 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _CSS_Controls_GetFeatureInfo_GPgetFeatureInfoOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29); /* harmony import */ var _CSS_Controls_GetFeatureInfo_GPgetFeatureInfoOpenLayers_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_GetFeatureInfo_GPgetFeatureInfoOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(196); +/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197); /* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_control_Control__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(126); -/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(197); -/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(108); +/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(127); +/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(198); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(109); /* harmony import */ var _GfiUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(42); -/* harmony import */ var _Common_Controls_GetFeatureInfoDOM__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(201); +/* harmony import */ var _Common_Controls_GetFeatureInfoDOM__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(202); function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } // import CSS @@ -47987,7 +48279,7 @@ if (window.ol && window.ol.control) { } /***/ }), -/* 201 */ +/* 202 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -48059,28 +48351,28 @@ var GetFeatureInfoDOM = { /* harmony default export */ __webpack_exports__["default"] = (GetFeatureInfoDOM); /***/ }), -/* 202 */ +/* 203 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _CSS_Controls_SearchEngine_GPsearchEngineOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(40); /* harmony import */ var _CSS_Controls_SearchEngine_GPsearchEngineOpenLayers_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_SearchEngine_GPsearchEngineOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(196); +/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197); /* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_control_Control__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(43); /* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ol_Overlay__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(141); +/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(142); /* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ol_proj__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50); -/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(108); -/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(126); -/* harmony import */ var _Utils_Markers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(115); -/* harmony import */ var _Utils_Interactions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(203); -/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(197); -/* harmony import */ var _Common_Utils_SearchEngineUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(204); -/* harmony import */ var _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(205); -/* harmony import */ var _Common_Controls_SearchEngineDOM__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(206); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(109); +/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(127); +/* harmony import */ var _Utils_Markers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(116); +/* harmony import */ var _Utils_Interactions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(204); +/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(198); +/* harmony import */ var _Common_Utils_SearchEngineUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(205); +/* harmony import */ var _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(206); +/* harmony import */ var _Common_Controls_SearchEngineDOM__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(207); function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } // import CSS @@ -49726,17 +50018,17 @@ if (window.ol && window.ol.control) { } /***/ }), -/* 203 */ +/* 204 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196); +/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(197); /* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(ol_control_Control__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var ol_interaction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49); /* harmony import */ var ol_interaction__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_interaction__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(108); -/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(126); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(109); +/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(127); // import OpenLayers @@ -49844,7 +50136,7 @@ var Interactions = { /* harmony default export */ __webpack_exports__["default"] = (Interactions); /***/ }), -/* 204 */ +/* 205 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -49972,7 +50264,7 @@ var SearchEngineUtils = { /* harmony default export */ __webpack_exports__["default"] = (SearchEngineUtils); /***/ }), -/* 205 */ +/* 206 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -50023,13 +50315,13 @@ var GeocodeUtils = { /* harmony default export */ __webpack_exports__["default"] = (GeocodeUtils); /***/ }), -/* 206 */ +/* 207 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(197); -/* harmony import */ var _Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(205); +/* harmony import */ var _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(198); +/* harmony import */ var _Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(206); var SearchEngineDOM = { @@ -50700,31 +50992,31 @@ var SearchEngineDOM = { /* harmony default export */ __webpack_exports__["default"] = (SearchEngineDOM); /***/ }), -/* 207 */ +/* 208 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _CSS_Controls_MousePosition_GPmousePositionOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(37); /* harmony import */ var _CSS_Controls_MousePosition_GPmousePositionOpenLayers_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_MousePosition_GPmousePositionOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(196); +/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197); /* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_control_Control__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(43); /* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ol_Overlay__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(148); +/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(149); /* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ol_Observable__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(141); +/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(142); /* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(ol_proj__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50); -/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(108); -/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(126); -/* harmony import */ var _Utils_Interactions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(203); -/* harmony import */ var _Utils_Markers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(115); -/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(197); -/* harmony import */ var _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(208); -/* harmony import */ var _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(209); -/* harmony import */ var _CRS_CRS__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(210); -/* harmony import */ var _Common_Controls_MousePositionDOM__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(217); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(109); +/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(127); +/* harmony import */ var _Utils_Interactions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(204); +/* harmony import */ var _Utils_Markers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(116); +/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(198); +/* harmony import */ var _Common_Utils_MathUtils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(209); +/* harmony import */ var _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(210); +/* harmony import */ var _CRS_CRS__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(211); +/* harmony import */ var _Common_Controls_MousePositionDOM__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(218); function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } // import CSS @@ -51745,7 +52037,7 @@ var MousePosition = function (Control) { // ] // structure pour les coordonnées en fonctin du type demandé : - // {x:, y:, unit:} ou {lng:, lat:} ou {lon:, lat:} ou {e:, n:, unit:}... + // {x:, y:, unit :} ou {lng :, lat :} ou {lon :, lat :} ou {e:, n:, unit :}... var coordinate = {}; // on projete le point dans le systeme demandé var oSrs = this._currentProjectionSystems.crs; @@ -51804,7 +52096,7 @@ var MousePosition = function (Control) { * @private */ MousePosition.prototype.onMoveStopped = function (olCoordinate, crs) { - // reprojection en CRS:84 (EPSG:4326) pour le calcul alti + // reprojection en crs :84 (EPSG:4326) pour le calcul alti var oLatLng = Object(ol_proj__WEBPACK_IMPORTED_MODULE_4__["transform"])(olCoordinate, crs, "EPSG:4326"); this._setElevation(oLatLng); }; @@ -51868,7 +52160,7 @@ var MousePosition = function (Control) { * this method is called by this.GPdisplayElevation() in the dom, and * it executes a request to the elevation service. * - * @param {Object} coordinate - {lat:..., lng:...} + * @param {Object} coordinate - {lat :..., lng :...} * @param {Function} callback - callback * @private */ @@ -51902,16 +52194,32 @@ var MousePosition = function (Control) { // format de sortie si spécifié var _outputFormat = options.outputFormat || "json"; - // ainsi que les coordonnées - var _zonly = true; + // ainsi que les coordonnées : si l'utilisateur explicite zonly false + // cela permet d'activer l'option measures côté service d'alti (surchargée si zonly = true) + var _zonly; + if (options.zonly === false) { + _zonly = options.zonly; + } else { + _zonly = true; + } + + // récupération d'une réponse complète avec source et précision + var _measures = options.measures || false; var _positions = [{ lon: coordinate[0], lat: coordinate[1] }]; + // utilisation de l'ancien service + var _oldAltiService = options.oldAltiService || true; + + // utilisation d'une ressource spécifique + var _resource = options.resource; + // et les callbacks var _scope = this; var _rawResponse = options.rawResponse || false; + var _customOnSuccess = options.onSuccess || null; var _onSuccess = null; var _onFailure = null; if (!_rawResponse) { @@ -51919,12 +52227,18 @@ var MousePosition = function (Control) { // callback onSuccess _onSuccess = function _onSuccess(results) { if (results && Object.keys(results).length) { + if (_customOnSuccess) { + _customOnSuccess.call(this, results); + } callback.call(this, results.elevations[0].z); } }; } else { // callback onSuccess _onSuccess = function _onSuccess(results) { + if (_customOnSuccess) { + _customOnSuccess.call(this, results); + } logger.log("alti service raw response : ", results); }; } @@ -51959,6 +52273,9 @@ var MousePosition = function (Control) { onSuccess: _onSuccess, onFailure: _onFailure, zonly: _zonly, + measures: _measures, + resource: _resource, + oldAltiService: _oldAltiService, positions: _positions }); }; @@ -52442,7 +52759,7 @@ if (window.ol && window.ol.control) { } /***/ }), -/* 208 */ +/* 209 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -52555,12 +52872,12 @@ var MathUtils = { /* harmony default export */ __webpack_exports__["default"] = (MathUtils); /***/ }), -/* 209 */ +/* 210 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(108); +/* harmony import */ var _LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(109); var logger = _LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("draggable"); @@ -52683,20 +53000,20 @@ var Draggable = { /* harmony default export */ __webpack_exports__["default"] = (Draggable); /***/ }), -/* 210 */ +/* 211 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var proj4__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(211); +/* harmony import */ var proj4__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(212); /* harmony import */ var proj4__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(proj4__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _Proj4__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(213); -/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(141); +/* harmony import */ var _Proj4__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(214); +/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(142); /* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ol_proj__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var ol_extent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(134); +/* harmony import */ var ol_extent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(135); /* harmony import */ var ol_extent__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ol_extent__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _Common_Utils_Register__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(216); -/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(108); +/* harmony import */ var _Common_Utils_Register__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(217); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(109); /* * FIXME * en mode bundle, l'action register des methodes de chargement est executée 2 fois. @@ -52856,14 +53173,14 @@ if (window.ol && window.ol.proj && window.ol.proj.proj4) { } /***/ }), -/* 211 */ +/* 212 */ /***/ (function(module, exports, __webpack_require__) { -/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["proj4"] = __webpack_require__(212); +/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["proj4"] = __webpack_require__(213); /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(62))) /***/ }), -/* 212 */ +/* 213 */ /***/ (function(module, exports, __webpack_require__) { (function (global, factory) { @@ -60042,19 +60359,19 @@ if (window.ol && window.ol.proj && window.ol.proj.proj4) { /***/ }), -/* 213 */ +/* 214 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "register", function() { return register; }); -/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(141); +/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(142); /* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(ol_proj__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var ol_proj_transforms__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(214); +/* harmony import */ var ol_proj_transforms__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(215); /* harmony import */ var ol_proj_transforms__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_proj_transforms__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var ol_proj_Projection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(215); +/* harmony import */ var ol_proj_Projection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(216); /* harmony import */ var ol_proj_Projection__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ol_proj_Projection__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(108); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(109); @@ -60096,19 +60413,19 @@ function register(proj4) { } /***/ }), -/* 214 */ +/* 215 */ /***/ (function(module, exports) { module.exports = ol.proj.transforms; /***/ }), -/* 215 */ +/* 216 */ /***/ (function(module, exports) { module.exports = ol.proj.Projection; /***/ }), -/* 216 */ +/* 217 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -60750,7 +61067,7 @@ var Register = { /* harmony default export */ __webpack_exports__["default"] = (Register); /***/ }), -/* 217 */ +/* 218 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -61600,50 +61917,50 @@ var MousePositionDOM = { /* harmony default export */ __webpack_exports__["default"] = (MousePositionDOM); /***/ }), -/* 218 */ +/* 219 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _CSS_Controls_Drawing_GPdrawingOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26); /* harmony import */ var _CSS_Controls_Drawing_GPdrawingOpenLayers_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_Drawing_GPdrawingOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(196); +/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197); /* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_control_Control__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(148); +/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(149); /* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ol_Observable__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var ol_Collection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(219); +/* harmony import */ var ol_Collection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(220); /* harmony import */ var ol_Collection__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ol_Collection__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(43); /* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(ol_Overlay__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(141); +/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(142); /* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(ol_proj__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var ol_source_Vector__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(45); /* harmony import */ var ol_source_Vector__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(ol_source_Vector__WEBPACK_IMPORTED_MODULE_6__); -/* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(152); +/* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(153); /* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(ol_layer_Vector__WEBPACK_IMPORTED_MODULE_7__); -/* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(112); +/* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(113); /* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(ol_style__WEBPACK_IMPORTED_MODULE_8__); -/* harmony import */ var ol_geom__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(220); +/* harmony import */ var ol_geom__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(221); /* harmony import */ var ol_geom__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(ol_geom__WEBPACK_IMPORTED_MODULE_9__); -/* harmony import */ var ol_geom_LinearRing__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(221); +/* harmony import */ var ol_geom_LinearRing__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(222); /* harmony import */ var ol_geom_LinearRing__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(ol_geom_LinearRing__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var ol_interaction__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(49); /* harmony import */ var ol_interaction__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(ol_interaction__WEBPACK_IMPORTED_MODULE_11__); -/* harmony import */ var ol_events_condition__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(222); +/* harmony import */ var ol_events_condition__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(223); /* harmony import */ var ol_events_condition__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(ol_events_condition__WEBPACK_IMPORTED_MODULE_12__); -/* harmony import */ var ol_sphere__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(223); +/* harmony import */ var ol_sphere__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(224); /* harmony import */ var ol_sphere__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(ol_sphere__WEBPACK_IMPORTED_MODULE_13__); -/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(108); -/* harmony import */ var _Utils_Interactions__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(203); -/* harmony import */ var _Utils_MarkersOther__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(224); -/* harmony import */ var _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(209); -/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(197); -/* harmony import */ var _Common_Utils_ColorUtils__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(114); -/* harmony import */ var _Common_Controls_DrawingDOM__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(225); -/* harmony import */ var _Formats_KML__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(110); -/* harmony import */ var _Formats_GeoJSON__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(131); -/* harmony import */ var _Formats_GPX__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(127); -/* harmony import */ var _LayerSwitcher__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(195); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(109); +/* harmony import */ var _Utils_Interactions__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(204); +/* harmony import */ var _Utils_MarkersOther__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(225); +/* harmony import */ var _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(210); +/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(198); +/* harmony import */ var _Common_Utils_ColorUtils__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(115); +/* harmony import */ var _Common_Controls_DrawingDOM__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(226); +/* harmony import */ var _Formats_KML__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(111); +/* harmony import */ var _Formats_GeoJSON__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(132); +/* harmony import */ var _Formats_GPX__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(128); +/* harmony import */ var _LayerSwitcher__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(196); // import CSS // import OpenLayers @@ -63554,37 +63871,37 @@ if (window.ol && window.ol.control) { } /***/ }), -/* 219 */ +/* 220 */ /***/ (function(module, exports) { module.exports = ol.Collection; /***/ }), -/* 220 */ +/* 221 */ /***/ (function(module, exports) { module.exports = ol.geom; /***/ }), -/* 221 */ +/* 222 */ /***/ (function(module, exports) { module.exports = ol.geom.LinearRing; /***/ }), -/* 222 */ +/* 223 */ /***/ (function(module, exports) { module.exports = ol.events.condition; /***/ }), -/* 223 */ +/* 224 */ /***/ (function(module, exports) { module.exports = ol.sphere; /***/ }), -/* 224 */ +/* 225 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -63754,12 +64071,12 @@ var MarkersOther = { /* harmony default export */ __webpack_exports__["default"] = (MarkersOther); /***/ }), -/* 225 */ +/* 226 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(108); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(109); var logger = _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_0__["default"].getLogger("DrawingDOM"); var DrawingDOM = { @@ -64441,43 +64758,43 @@ var DrawingDOM = { /* harmony default export */ __webpack_exports__["default"] = (DrawingDOM); /***/ }), -/* 226 */ +/* 227 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _CSS_Controls_Route_GProuteOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39); /* harmony import */ var _CSS_Controls_Route_GProuteOpenLayers_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_Route_GProuteOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(196); +/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197); /* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_control_Control__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(148); +/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(149); /* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ol_Observable__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43); /* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ol_Overlay__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(152); +/* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(153); /* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(ol_layer_Vector__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var ol_source_Vector__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(45); /* harmony import */ var ol_source_Vector__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(ol_source_Vector__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var ol_events_condition__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(222); +/* harmony import */ var ol_events_condition__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(223); /* harmony import */ var ol_events_condition__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(ol_events_condition__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var ol_interaction__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(49); /* harmony import */ var ol_interaction__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(ol_interaction__WEBPACK_IMPORTED_MODULE_7__); -/* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(112); +/* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(113); /* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(ol_style__WEBPACK_IMPORTED_MODULE_8__); -/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(141); +/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(142); /* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(ol_proj__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(50); -/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(108); -/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(126); -/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(197); -/* harmony import */ var _Utils_Markers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(115); -/* harmony import */ var _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(209); -/* harmony import */ var _Utils_Interactions__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(203); -/* harmony import */ var _LocationSelector__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(227); -/* harmony import */ var _Export__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(229); -/* harmony import */ var _LayerSwitcher__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(195); -/* harmony import */ var _Formats_GeoJSON__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(131); -/* harmony import */ var _Common_Controls_RouteDOM__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(232); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(109); +/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(127); +/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(198); +/* harmony import */ var _Utils_Markers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(116); +/* harmony import */ var _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(210); +/* harmony import */ var _Utils_Interactions__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(204); +/* harmony import */ var _LocationSelector__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(228); +/* harmony import */ var _Export__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(230); +/* harmony import */ var _LayerSwitcher__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(196); +/* harmony import */ var _Formats_GeoJSON__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(132); +/* harmony import */ var _Common_Controls_RouteDOM__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(233); function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } // import CSS @@ -64973,7 +65290,9 @@ var Route = function (Control) { tunnel: false, bridge: false }, - routeOptions: {}, + routeOptions: { + oldRouteService: true + }, autocompleteOptions: {}, layerDescription: { title: "Itinéraire", @@ -65560,6 +65879,8 @@ var Route = function (Control) { distanceUnit: "m", timeOut: _timeout, protocol: _protocol, + oldRouteService: routeOptions.oldRouteService || true, + resource: routeOptions.resource, // callback onSuccess onSuccess: function onSuccess(results) { logger.log(results); @@ -66659,28 +66980,28 @@ if (window.ol && window.ol.control) { } /***/ }), -/* 227 */ +/* 228 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _CSS_Controls_LocationSelector_GPlocationOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33); /* harmony import */ var _CSS_Controls_LocationSelector_GPlocationOpenLayers_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_LocationSelector_GPlocationOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(196); +/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197); /* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_control_Control__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(43); /* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ol_Overlay__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(141); +/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(142); /* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ol_proj__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(148); +/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(149); /* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(ol_Observable__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50); -/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(108); -/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(126); -/* harmony import */ var _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(205); -/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(197); -/* harmony import */ var _Utils_Markers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(115); -/* harmony import */ var _Common_Controls_LocationSelectorDOM__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(228); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(109); +/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(127); +/* harmony import */ var _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(206); +/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(198); +/* harmony import */ var _Utils_Markers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(116); +/* harmony import */ var _Common_Controls_LocationSelectorDOM__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(229); // import CSS // import OpenLayers @@ -66805,7 +67126,9 @@ var LocationSelector = function (Control) { removeOption: false }, displayInfo: true, - autocompleteOptions: {} + autocompleteOptions: { + oldAutocompleteService: true + } }; // merge with user options @@ -66914,9 +67237,9 @@ var LocationSelector = function (Control) { */ LocationSelector.prototype.setCoordinate = function (coordinate, crs) { var map = this.getMap(); - var proj = map.getView().getProjection(); + var proj = map.getView().getProjection().getCode(); // on utilise la projection de la carte - if (crs === null) { + if (!crs) { crs = proj; } this._setCoordinate(coordinate, crs); @@ -67027,6 +67350,10 @@ var LocationSelector = function (Control) { if (!value) { return; } + // on recupere les options du service + var serviceOptions = this.options.autocompleteOptions || {}; + var _customOnSuccess = serviceOptions.onSuccess || null; + var _customOnFailure = serviceOptions.onFailure || null; // on sauvegarde le localisant this._currentLocation = value; @@ -67053,6 +67380,9 @@ var LocationSelector = function (Control) { if (results) { var locations = results.suggestedLocations; context._fillAutoCompletedLocationListContainer(locations); + if (_customOnSuccess) { + _customOnSuccess.call(this, results); + } } }, // callback onFailure @@ -67062,6 +67392,9 @@ var LocationSelector = function (Control) { // doit on nettoyer la liste des suggestions dernierement enregistrée : context._clearSuggestedLocation(); logger.log(error.message); + if (_customOnFailure) { + _customOnFailure.call(this, error); + } } }); var map = this.getMap(); @@ -67398,6 +67731,7 @@ var LocationSelector = function (Control) { _Common_Utils__WEBPACK_IMPORTED_MODULE_7__["default"].assign(options, this.options.autocompleteOptions); // ainsi que la recherche et les callbacks _Common_Utils__WEBPACK_IMPORTED_MODULE_7__["default"].assign(options, settings); + options.oldAutocompleteService = options.oldAutocompleteService || true; // les ressources var resources = this._resources["AutoCompletion"] || null; @@ -67465,14 +67799,14 @@ if (window.ol && window.ol.control) { } /***/ }), -/* 228 */ +/* 229 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(197); -/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(108); -/* harmony import */ var _Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(205); +/* harmony import */ var _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(198); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(109); +/* harmony import */ var _Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(206); @@ -67920,22 +68254,22 @@ var LocationSelectorDOM = { /* harmony default export */ __webpack_exports__["default"] = (LocationSelectorDOM); /***/ }), -/* 229 */ +/* 230 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _CSS_Controls_Export_GPexportOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(230); +/* harmony import */ var _CSS_Controls_Export_GPexportOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(231); /* harmony import */ var _CSS_Controls_Export_GPexportOpenLayers_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_Export_GPexportOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(196); +/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197); /* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_control_Control__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(197); -/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(126); -/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(108); -/* harmony import */ var _Formats_KML__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(110); -/* harmony import */ var _Formats_GeoJSON__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(131); -/* harmony import */ var _Formats_GPX__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(127); -/* harmony import */ var _Common_Controls_ExportDOM__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(231); +/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(198); +/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(127); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(109); +/* harmony import */ var _Formats_KML__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(111); +/* harmony import */ var _Formats_GeoJSON__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(132); +/* harmony import */ var _Formats_GPX__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(128); +/* harmony import */ var _Common_Controls_ExportDOM__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(232); function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } @@ -68630,13 +68964,13 @@ if (window.ol && window.ol.control) { } /***/ }), -/* 230 */ +/* 231 */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin /***/ }), -/* 231 */ +/* 232 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -68655,14 +68989,14 @@ var ExportDOM = { /* harmony default export */ __webpack_exports__["default"] = (ExportDOM); /***/ }), -/* 232 */ +/* 233 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(197); -/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(108); -/* harmony import */ var _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(205); +/* harmony import */ var _Utils_SelectorID__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(198); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(109); +/* harmony import */ var _Common_Utils_GeocodeUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(206); @@ -69755,35 +70089,35 @@ var RouteDOM = { /* harmony default export */ __webpack_exports__["default"] = (RouteDOM); /***/ }), -/* 233 */ +/* 234 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _CSS_Controls_Isochrone_GPisochronOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30); /* harmony import */ var _CSS_Controls_Isochrone_GPisochronOpenLayers_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_Isochrone_GPisochronOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(196); +/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197); /* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_control_Control__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(148); +/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(149); /* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ol_Observable__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(152); +/* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(153); /* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ol_layer_Vector__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var ol_source_Vector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(45); /* harmony import */ var ol_source_Vector__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(ol_source_Vector__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(112); +/* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(113); /* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(ol_style__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(50); -/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(126); -/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(108); -/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(197); -/* harmony import */ var _Utils_Markers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(115); -/* harmony import */ var _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(209); -/* harmony import */ var _Utils_Interactions__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(203); -/* harmony import */ var _LayerSwitcher__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(195); -/* harmony import */ var _LocationSelector__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(227); -/* harmony import */ var _Export__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(229); -/* harmony import */ var _Formats_GeoJSON__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(131); -/* harmony import */ var _Common_Controls_IsoDOM__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(234); +/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(127); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(109); +/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(198); +/* harmony import */ var _Utils_Markers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(116); +/* harmony import */ var _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(210); +/* harmony import */ var _Utils_Interactions__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(204); +/* harmony import */ var _LayerSwitcher__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(196); +/* harmony import */ var _LocationSelector__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(228); +/* harmony import */ var _Export__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(230); +/* harmony import */ var _Formats_GeoJSON__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(132); +/* harmony import */ var _Common_Controls_IsoDOM__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(235); function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } // import CSS @@ -70263,7 +70597,9 @@ var Isocurve = function (Control) { url: _Utils_Markers__WEBPACK_IMPORTED_MODULE_10__["default"]["lightOrange"], offset: _Utils_Markers__WEBPACK_IMPORTED_MODULE_10__["default"].defaultOffset }, - isocurveOptions: {}, + isocurveOptions: { + oldIsoService: true + }, autocompleteOptions: {}, layerDescription: { title: "Isochrone/Isodistance", @@ -70823,6 +71159,8 @@ var Isocurve = function (Control) { smoothing: options.smoothing || true, timeOut: _timeout, protocol: _protocol, + oldIsoService: options.oldIsoService || true, + resource: options.resource, // callback onSuccess onSuccess: function onSuccess(results) { logger.log(results); @@ -71378,7 +71716,7 @@ var deepEqual = function deepEqual(x, y) { }; /***/ }), -/* 234 */ +/* 235 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -72139,44 +72477,44 @@ var IsoDOM = { /* harmony default export */ __webpack_exports__["default"] = (IsoDOM); /***/ }), -/* 235 */ +/* 236 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _CSS_Controls_ReverseGeocoding_GPreverseGeocodingOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38); /* harmony import */ var _CSS_Controls_ReverseGeocoding_GPreverseGeocodingOpenLayers_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_ReverseGeocoding_GPreverseGeocodingOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(196); +/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197); /* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_control_Control__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(43); /* harmony import */ var ol_Overlay__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ol_Overlay__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var ol_Collection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(219); +/* harmony import */ var ol_Collection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(220); /* harmony import */ var ol_Collection__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ol_Collection__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var ol_Feature__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(116); +/* harmony import */ var ol_Feature__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(117); /* harmony import */ var ol_Feature__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(ol_Feature__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(112); +/* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(113); /* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(ol_style__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var ol_geom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(220); +/* harmony import */ var ol_geom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(221); /* harmony import */ var ol_geom__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(ol_geom__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var ol_interaction__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(49); /* harmony import */ var ol_interaction__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(ol_interaction__WEBPACK_IMPORTED_MODULE_7__); -/* harmony import */ var ol_events_condition__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(222); +/* harmony import */ var ol_events_condition__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(223); /* harmony import */ var ol_events_condition__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(ol_events_condition__WEBPACK_IMPORTED_MODULE_8__); -/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(141); +/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(142); /* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(ol_proj__WEBPACK_IMPORTED_MODULE_9__); -/* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(152); +/* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(153); /* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(ol_layer_Vector__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var ol_source_Vector__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(45); /* harmony import */ var ol_source_Vector__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(ol_source_Vector__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(50); -/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(126); -/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(108); -/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(197); -/* harmony import */ var _Utils_Markers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(115); -/* harmony import */ var _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(209); -/* harmony import */ var _Utils_Interactions__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(203); -/* harmony import */ var _LayerSwitcher__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(195); -/* harmony import */ var _Common_Controls_ReverseGeocodingDOM__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(236); +/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(127); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(109); +/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(198); +/* harmony import */ var _Utils_Markers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(116); +/* harmony import */ var _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(210); +/* harmony import */ var _Utils_Interactions__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(204); +/* harmony import */ var _LayerSwitcher__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(196); +/* harmony import */ var _Common_Controls_ReverseGeocodingDOM__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(237); // import CSS // import OpenLayers @@ -73055,13 +73393,13 @@ var ReverseGeocode = function (Control) { } this._requestGeom = { type: "Polygon", - coordinates: [[[bbox.left, bbox.top], [bbox.right, bbox.top], [bbox.right, bbox.bottom], [bbox.left, bbox.bottom], [bbox.left, bbox.top]]] + coordinates: [[[bbox.left, bbox.top], [bbox.left, bbox.bottom], [bbox.right, bbox.bottom], [bbox.right, bbox.top], [bbox.left, bbox.top]]] }; logger.log("searchGeometry filter : ", this._requestGeom); } }; - /** + /** * this change the cursor of the map when entering a point. * * @param {String} cursor - cursor style @@ -73131,6 +73469,7 @@ var ReverseGeocode = function (Control) { apiKey: reverseGeocodeOptions.apiKey || this.options.apiKey, ssl: this.options.ssl, position: this._requestPosition, + oldReverseService: reverseGeocodeOptions.oldReverseService || true, filterOptions: { type: [this._currentGeocodingType] }, @@ -73870,7 +74209,7 @@ if (window.ol && window.ol.control) { } /***/ }), -/* 236 */ +/* 237 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -74287,38 +74626,38 @@ var ReverseGeocodingDOM = { /* harmony default export */ __webpack_exports__["default"] = (ReverseGeocodingDOM); /***/ }), -/* 237 */ +/* 238 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _CSS_Controls_LayerImport_GPimportOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(31); /* harmony import */ var _CSS_Controls_LayerImport_GPimportOpenLayers_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_LayerImport_GPimportOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(196); +/* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197); /* harmony import */ var ol_control_Control__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ol_control_Control__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(148); +/* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(149); /* harmony import */ var ol_Observable__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ol_Observable__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var ol_Collection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(219); +/* harmony import */ var ol_Collection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(220); /* harmony import */ var ol_Collection__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(ol_Collection__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var ol_Feature__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(116); +/* harmony import */ var ol_Feature__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(117); /* harmony import */ var ol_Feature__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(ol_Feature__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var ol_tilegrid_WMTS__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(136); +/* harmony import */ var ol_tilegrid_WMTS__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(137); /* harmony import */ var ol_tilegrid_WMTS__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(ol_tilegrid_WMTS__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var ol_tilegrid__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(194); +/* harmony import */ var ol_tilegrid__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(195); /* harmony import */ var ol_tilegrid__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(ol_tilegrid__WEBPACK_IMPORTED_MODULE_6__); -/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(141); +/* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(142); /* harmony import */ var ol_proj__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(ol_proj__WEBPACK_IMPORTED_MODULE_7__); -/* harmony import */ var ol_format_MVT__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(147); +/* harmony import */ var ol_format_MVT__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(148); /* harmony import */ var ol_format_MVT__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(ol_format_MVT__WEBPACK_IMPORTED_MODULE_8__); -/* harmony import */ var ol_format_WMSCapabilities__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(238); +/* harmony import */ var ol_format_WMSCapabilities__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(239); /* harmony import */ var ol_format_WMSCapabilities__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(ol_format_WMSCapabilities__WEBPACK_IMPORTED_MODULE_9__); -/* harmony import */ var ol_format_WMTSCapabilities__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(239); +/* harmony import */ var ol_format_WMTSCapabilities__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(240); /* harmony import */ var ol_format_WMTSCapabilities__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(ol_format_WMTSCapabilities__WEBPACK_IMPORTED_MODULE_10__); -/* harmony import */ var ol_layer_VectorTile__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(145); +/* harmony import */ var ol_layer_VectorTile__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(146); /* harmony import */ var ol_layer_VectorTile__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(ol_layer_VectorTile__WEBPACK_IMPORTED_MODULE_11__); -/* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(152); +/* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(153); /* harmony import */ var ol_layer_Vector__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(ol_layer_Vector__WEBPACK_IMPORTED_MODULE_12__); -/* harmony import */ var ol_layer_Tile__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(142); +/* harmony import */ var ol_layer_Tile__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(143); /* harmony import */ var ol_layer_Tile__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(ol_layer_Tile__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var ol_source_VectorTile__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(44); /* harmony import */ var ol_source_VectorTile__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(ol_source_VectorTile__WEBPACK_IMPORTED_MODULE_14__); @@ -74328,28 +74667,28 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var ol_source_TileWMS__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(ol_source_TileWMS__WEBPACK_IMPORTED_MODULE_16__); /* harmony import */ var ol_source_WMTS__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(47); /* harmony import */ var ol_source_WMTS__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(ol_source_WMTS__WEBPACK_IMPORTED_MODULE_17__); -/* harmony import */ var ol_source_TileJSON__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(146); +/* harmony import */ var ol_source_TileJSON__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(147); /* harmony import */ var ol_source_TileJSON__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(ol_source_TileJSON__WEBPACK_IMPORTED_MODULE_18__); -/* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(112); +/* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(113); /* harmony import */ var ol_style__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(ol_style__WEBPACK_IMPORTED_MODULE_19__); -/* harmony import */ var ol_mapbox_style__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(149); +/* harmony import */ var ol_mapbox_style__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(150); /* harmony import */ var geoportal_access_lib__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(50); -/* harmony import */ var _Editor__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(240); -/* harmony import */ var _Utils_Markers__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(115); -/* harmony import */ var _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(209); -/* harmony import */ var _Utils_Interactions__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(203); -/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(126); -/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(108); -/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(197); -/* harmony import */ var _Common_Utils_ProxyUtils__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(109); -/* harmony import */ var _Common_Controls_LayerImportDOM__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(252); -/* harmony import */ var _Formats_KML__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(110); -/* harmony import */ var _Formats_GeoJSON__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(131); -/* harmony import */ var _Formats_GPX__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(127); -/* harmony import */ var _LayerSwitcher__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(195); -/* harmony import */ var _Route__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(226); -/* harmony import */ var _Isocurve__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(233); -/* harmony import */ var _ElevationPath__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(253); +/* harmony import */ var _Editor__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(241); +/* harmony import */ var _Utils_Markers__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(116); +/* harmony import */ var _Common_Utils_Draggable__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(210); +/* harmony import */ var _Utils_Interactions__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(204); +/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(127); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(109); +/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(198); +/* harmony import */ var _Common_Utils_ProxyUtils__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(110); +/* harmony import */ var _Common_Controls_LayerImportDOM__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(253); +/* harmony import */ var _Formats_KML__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(111); +/* harmony import */ var _Formats_GeoJSON__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(132); +/* harmony import */ var _Formats_GPX__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(128); +/* harmony import */ var _LayerSwitcher__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(196); +/* harmony import */ var _Route__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(227); +/* harmony import */ var _Isocurve__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(234); +/* harmony import */ var _ElevationPath__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(254); function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } // import CSS @@ -77262,39 +77601,39 @@ if (window.ol && window.ol.control) { } /***/ }), -/* 238 */ +/* 239 */ /***/ (function(module, exports) { module.exports = ol.format.WMSCapabilities; /***/ }), -/* 239 */ +/* 240 */ /***/ (function(module, exports) { module.exports = ol.format.WMTSCapabilities; /***/ }), -/* 240 */ +/* 241 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _CSS_Controls_Editor_GPeditorOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27); /* harmony import */ var _CSS_Controls_Editor_GPeditorOpenLayers_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_CSS_Controls_Editor_GPeditorOpenLayers_css__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var eventbusjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(241); +/* harmony import */ var eventbusjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(242); /* harmony import */ var eventbusjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(eventbusjs__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(126); -/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(197); -/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(108); -/* harmony import */ var _Editor_Style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(243); -/* harmony import */ var _Editor_Themes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(245); -/* harmony import */ var _Editor_Filter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(246); -/* harmony import */ var _Editor_Legend__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(247); -/* harmony import */ var _Editor_Layer__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(248); -/* harmony import */ var _Editor_Group__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(249); -/* harmony import */ var _Editor_Event__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(244); -/* harmony import */ var _Editor_Search__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(250); -/* harmony import */ var _Common_Controls_Editor_EditorDOM__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(251); +/* harmony import */ var _Common_Utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(127); +/* harmony import */ var _Common_Utils_SelectorID__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(198); +/* harmony import */ var _Common_Utils_LoggerByDefault__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(109); +/* harmony import */ var _Editor_Style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(244); +/* harmony import */ var _Editor_Themes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(246); +/* harmony import */ var _Editor_Filter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(247); +/* harmony import */ var _Editor_Legend__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(248); +/* harmony import */ var _Editor_Layer__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(249); +/* harmony import */ var _Editor_Group__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(250); +/* harmony import */ var _Editor_Event__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(245); +/* harmony import */ var _Editor_Search__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(251); +/* harmony import */ var _Common_Controls_Editor_EditorDOM__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(252); function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } // import CSS @@ -78271,29 +78610,29 @@ if (window.ol && window.ol.style) { } /***/ }), -/* 241 */ +/* 242 */ /***/ (function(module, exports, __webpack_require__) { -/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["eventbus"] = __webpack_require__(242); +/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["eventbus"] = __webpack_require__(243); /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(62))) /***/ }), -/* 242 */ +/* 243 */ /***/ (function(module, exports, __webpack_require__) { (function(root,factory){if(true)module.exports=factory();else {}})(this,function(){var EventBusClass={};EventBusClass=function(){this.listeners={}};EventBusClass.prototype={addEventListener:function(type,callback,scope){var args=[];var numOfArgs=arguments.length;for(var i=0;i3?args.splice(3,args.length-1):[];if(typeof this.listeners[type]!="undefined"){this.listeners[type].push({scope:scope,callback:callback,args:args})}else{this.listeners[type]=[{scope:scope,callback:callback,args:args}]}},removeEventListener:function(type,callback,scope){if(typeof this.listeners[type]!="undefined"){var numOfCallbacks=this.listeners[type].length;var newArray=[];for(var i=0;i0}for(var i=0;i2?args.splice(2,args.length-1):[];args=[event].concat(args);if(typeof this.listeners[type]!="undefined"){var listeners=this.listeners[type].slice();var numOfCallbacks=listeners.length;for(var i=0;i=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},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 r,a=!0,s=!1;return{s:function(){o=o.call(e)},n:function(){var e=o.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==o.return||o.return()}finally{if(s)throw r}}}}function v(e,t){if(e){if("string"==typeof e)return C(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?C(e,t):void 0}}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o`."},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 w="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function _(e){var t={exports:{}};return e(t,t.exports),t.exports}function E(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.')} -/*! https://mths.be/punycode v1.3.2 by @mathias */var S=_((function(e,t){!function(o){var n=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,r="object"==I(w)&&w;r.global!==r&&r.window!==r&&r.self!==r||(o=r);var a,s,l=2147483647,c=/^xn--/,u=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,g=String.fromCharCode;function m(e){throw RangeError(p[e])}function f(e,t){for(var o=e.length,n=[];o--;)n[o]=t(e[o]);return n}function y(e,t){var o=e.split("@"),n="";return o.length>1&&(n=o[0]+"@",e=o[1]),n+f((e=e.replace(d,".")).split("."),t).join(".")}function A(e){for(var t,o,n=[],i=0,r=e.length;i=55296&&t<=56319&&i65535&&(t+=g((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=g(e)})).join("")}function C(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function b(e,t,o){var n=0;for(e=o?h(e/700):e>>1,e+=h(e/t);e>455;n+=36)e=h(e/35);return h(n+36*e/(e+38))}function _(e){var t,o,n,i,r,a,s,c,u,d,p,g=[],f=e.length,y=0,A=128,C=72;for((o=e.lastIndexOf("-"))<0&&(o=0),n=0;n=128&&m("not-basic"),g.push(e.charCodeAt(n));for(i=o>0?o+1:0;i=f&&m("invalid-input"),((c=(p=e.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:36)>=36||c>h((l-y)/a))&&m("overflow"),y+=c*a,!(c<(u=s<=C?1:s>=C+26?26:s-C));s+=36)a>h(l/(d=36-u))&&m("overflow"),a*=d;C=b(y-r,t=g.length+1,0==r),h(y/t)>l-A&&m("overflow"),A+=h(y/t),y%=t,g.splice(y++,0,A)}return v(g)}function E(e){var t,o,n,i,r,a,s,c,u,d,p,f,y,v,I,w=[];for(f=(e=A(e)).length,t=128,o=0,r=72,a=0;a=t&&ph((l-o)/(y=n+1))&&m("overflow"),o+=(s-t)*y,t=s,a=0;al&&m("overflow"),p==t){for(c=o,u=36;!(c<(d=u<=r?1:u>=r+26?26:u-r));u+=36)I=c-d,v=36-d,w.push(g(C(d+I%v,0))),c=h(I/v);w.push(g(C(c,0))),r=b(o,y,n==i),o=0,++n}++o,++t}return w.join("")}if(a={version:"1.3.2",ucs2:{decode:A,encode:v},decode:_,encode:E,toASCII:function(e){return y(e,(function(e){return u.test(e)?"xn--"+E(e):e}))},toUnicode:function(e){return y(e,(function(e){return c.test(e)?_(e.slice(4).toLowerCase()):e}))}},n&&i)if(e.exports==n)i.exports=a;else for(s in a)a.hasOwnProperty(s)&&(n[s]=a[s]);else o.punycode=a}(w)})),M=function(e){return"string"==typeof e},P=function(e){return"object"===I(e)&&null!==e},x=function(e){return null===e},k=function(e){return null==e};function G(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var R=function(e,t,o,n){t=t||"&",o=o||"=";var i={};if("string"!=typeof e||0===e.length)return i;var r=/\+/g;e=e.split(t);var a=1e3;n&&"number"==typeof n.maxKeys&&(a=n.maxKeys);var s=e.length;a>0&&s>a&&(s=a);for(var l=0;l=0?(c=h.substr(0,g),u=h.substr(g+1)):(c=h,u=""),d=decodeURIComponent(c),p=decodeURIComponent(u),G(i,d)?Array.isArray(i[d])?i[d].push(p):i[d]=[i[d],p]:i[d]=p}return i},T=function(e){switch(I(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},O=function(e,t,o,n){return t=t||"&",o=o||"=",null===e&&(e=void 0),"object"===I(e)?Object.keys(e).map((function(n){var i=encodeURIComponent(T(n))+o;return Array.isArray(e[n])?e[n].map((function(e){return i+encodeURIComponent(T(e))})).join(t):i+encodeURIComponent(T(e[n]))})).join(t):n?encodeURIComponent(T(n))+o+encodeURIComponent(T(e)):""},L=_((function(e,t){t.decode=t.parse=R,t.encode=t.stringify=O}));function D(){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 j=/^([a-z0-9.+-]+:)/i,U=/:[0-9]*$/,N=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,B=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),F=["'"].concat(B),z=["%","/","?",";","#"].concat(F),V=["/","?","#"],W=/^[+a-z0-9A-Z_-]{0,63}$/,q=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,H={javascript:!0,"javascript:":!0},Y={javascript:!0,"javascript:":!0},J={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Z(e,t,o){if(e&&P(e)&&e instanceof D)return e;var n=new D;return n.parse(e,t,o),n}D.prototype.parse=function(e,t,o){if(!M(e))throw new TypeError("Parameter 'url' must be a string, not "+I(e));var n=e.indexOf("?"),i=-1!==n&&n127?C+="x":C+=v[b];if(!C.match(W)){var _=y.slice(0,g),E=y.slice(g+1),P=v.match(q);P&&(_.push(P[1]),E.unshift(P[2])),E.length&&(a="/"+E.join(".")+a),this.hostname=_.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),f||(this.hostname=S.toASCII(this.hostname));var x=this.port?":"+this.port:"",k=this.hostname||"";this.host=k+x,this.href+=this.host,f&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!H[c])for(g=0,A=F.length;g0)&&o.host.split("@"))&&(o.auth=E.shift(),o.host=o.hostname=E.shift());return o.search=e.search,o.query=e.query,x(o.pathname)&&x(o.search)||(o.path=(o.pathname?o.pathname:"")+(o.search?o.search:"")),o.href=o.format(),o}if(!v.length)return o.pathname=null,o.search?o.path="/"+o.search:o.path=null,o.href=o.format(),o;for(var I=v.slice(-1)[0],b=(o.host||e.host||v.length>1)&&("."===I||".."===I)||""===I,w=0,_=v.length;_>=0;_--)"."===(I=v[_])?v.splice(_,1):".."===I?(v.splice(_,1),w++):w&&(v.splice(_,1),w--);if(!y&&!A)for(;w--;w)v.unshift("..");!y||""===v[0]||v[0]&&"/"===v[0].charAt(0)||v.unshift(""),b&&"/"!==v.join("/").substr(-1)&&v.push("");var E,S=""===v[0]||v[0]&&"/"===v[0].charAt(0);C&&(o.hostname=o.host=S?"":v.length?v.shift():"",(E=!!(o.host&&o.host.indexOf("@")>0)&&o.host.split("@"))&&(o.auth=E.shift(),o.host=o.hostname=E.shift()));return(y=y||o.host&&v.length)&&!S&&v.unshift(""),v.length?o.pathname=v.join("/"):(o.pathname=null,o.path=null),x(o.pathname)&&x(o.search)||(o.path=(o.pathname?o.pathname:"")+(o.search?o.search:"")),o.auth=e.auth||o.auth,o.slashes=o.slashes||e.slashes,o.href=o.format(),o},D.prototype.parseHost=function(){var e=this.host,t=U.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};function K(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),n=1;n1&&void 0!==arguments[1]?arguments[1]:[];d(this,e),this.parent=t,this.bindings={};var n,i=A(o);try{for(i.s();!(n=i.n()).done;){var r=a(n.value,2),s=r[0],l=r[1];this.bindings[s]=l}}catch(e){i.e(e)}finally{i.f()}}return u(e,[{key:"concat",value:function(t){return new e(this,t)}},{key:"get",value:function(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error("".concat(e," not found in scope."))}},{key:"has",value:function(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)}}]),e}(),$={kind:"null"},ee={kind:"number"},te={kind:"string"},oe={kind:"boolean"},ne={kind:"color"},ie={kind:"object"},re={kind:"value"},ae={kind:"collator"},se={kind:"formatted"},le={kind:"resolvedImage"};function ce(e,t){return{kind:"array",itemType:e,N:t}}function ue(e){if("array"===e.kind){var t=ue(e.itemType);return"number"==typeof e.N?"array<".concat(t,", ").concat(e.N,">"):"value"===e.itemType.kind?"array":"array<".concat(t,">")}return e.kind}var de=[$,ee,te,oe,ne,se,ie,ce(re),le];function pe(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!pe(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(var o=0,n=de;o255?255:e}function i(e){return e<0?0:e>1?1:e}function r(e){return"%"===e[e.length-1]?n(parseFloat(e)/100*255):n(parseInt(e))}function a(e){return"%"===e[e.length-1]?i(parseFloat(e)/100):i(parseFloat(e))}function s(e,t,o){return o<0?o+=1:o>1&&(o-=1),6*o<1?e+(t-e)*o*6:2*o<1?t:3*o<2?e+(t-e)*(2/3-o)*6:e}try{t.parseCSSColor=function(e){var t,i=e.replace(/ /g,"").toLowerCase();if(i in o)return o[i].slice();if("#"===i[0])return 4===i.length?(t=parseInt(i.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===i.length&&(t=parseInt(i.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var l=i.indexOf("("),c=i.indexOf(")");if(-1!==l&&c+1===i.length){var u=i.substr(0,l),d=i.substr(l+1,c-(l+1)).split(","),p=1;switch(u){case"rgba":if(4!==d.length)return null;p=a(d.pop());case"rgb":return 3!==d.length?null:[r(d[0]),r(d[1]),r(d[2]),p];case"hsla":if(4!==d.length)return null;p=a(d.pop());case"hsl":if(3!==d.length)return null;var h=(parseFloat(d[0])%360+360)%360/360,g=a(d[1]),m=a(d[2]),f=m<=.5?m*(g+1):m+g-m*g,y=2*m-f;return[n(255*s(y,f,h+1/3)),n(255*s(y,f,h)),n(255*s(y,f,h-1/3)),p];default:return null}}return null}}catch(e){}})),fe=function(){function e(t,o,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;d(this,e),this.r=t,this.g=o,this.b=n,this.a=i}return u(e,[{key:"toString",value:function(){var e=a(this.toArray(),4),t=e[0],o=e[1],n=e[2],i=e[3];return"rgba(".concat(Math.round(t),",").concat(Math.round(o),",").concat(Math.round(n),",").concat(i,")")}},{key:"toArray",value:function(){var e=this.r,t=this.g,o=this.b,n=this.a;return 0===n?[0,0,0,0]:[255*e/n,255*t/n,255*o/n,n]}}],[{key:"parse",value:function(t){if(t){if(t instanceof e)return t;if("string"==typeof t){var o=me.parseCSSColor(t);if(o)return new e(o[0]/255*o[3],o[1]/255*o[3],o[2]/255*o[3],o[3])}}}}]),e}();fe.black=new fe(0,0,0,1),fe.white=new fe(1,1,1,1),fe.transparent=new fe(0,0,0,0),fe.red=new fe(1,0,0,1),fe.blue=new fe(0,0,1,1);var ye=function(){function e(t,o,n){d(this,e),this.sensitivity=t?o?"variant":"case":o?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}return u(e,[{key:"compare",value:function(e,t){return this.collator.compare(e,t)}},{key:"resolvedLocale",value:function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}]),e}(),Ae=u((function e(t,o,n,i,r){d(this,e),this.text=t,this.image=o,this.scale=n,this.fontStack=i,this.textColor=r})),ve=function(){function e(t){d(this,e),this.sections=t}return u(e,[{key:"isEmpty",value:function(){return 0===this.sections.length||!this.sections.some((function(e){return 0!==e.text.length||e.image&&0!==e.image.name.length}))}},{key:"toString",value:function(){return 0===this.sections.length?"":this.sections.map((function(e){return e.text})).join("")}},{key:"serialize",value:function(){var e,t=["format"],o=A(this.sections);try{for(o.s();!(e=o.n()).done;){var n=e.value;if(n.image)t.push(["image",n.image.name]);else{t.push(n.text);var i={};n.fontStack&&(i["text-font"]=["literal",n.fontStack.split(",")]),n.scale&&(i["font-scale"]=n.scale),n.textColor&&(i["text-color"]=["rgba"].concat(n.textColor.toArray())),t.push(i)}}}catch(e){o.e(e)}finally{o.f()}return t}}],[{key:"fromString",value:function(t){return new e([new Ae(t,null,null,null,null)])}},{key:"factory",value:function(t){return t instanceof e?t:e.fromString(t)}}]),e}(),Ce=function(){function e(t){d(this,e),this.name=t.name,this.available=t.available}return u(e,[{key:"toString",value:function(){return this.name}},{key:"serialize",value:function(){return["image",this.name]}}],[{key:"fromString",value:function(t){return t?new e({name:t,available:!1}):null}}]),e}();function Ie(e,t,o,n){return"number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof o&&o>=0&&o<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value [".concat([e,t,o,n].join(", "),"]: 'a' must be between 0 and 1."):"Invalid rgba value [".concat(("number"==typeof n?[e,t,o,n]:[e,t,o]).join(", "),"]: 'r', 'g', and 'b' must be between 0 and 255.")}function be(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof fe)return!0;if(e instanceof ye)return!0;if(e instanceof ve)return!0;if(e instanceof Ce)return!0;if(Array.isArray(e)){var t,o=A(e);try{for(o.s();!(t=o.n()).done;){if(!be(t.value))return!1}}catch(e){o.e(e)}finally{o.f()}return!0}if("object"===I(e)){for(var n in e)if(!be(e[n]))return!1;return!0}return!1}function we(e){if(null===e)return $;if("string"==typeof e)return te;if("boolean"==typeof e)return oe;if("number"==typeof e)return ee;if(e instanceof fe)return ne;if(e instanceof ye)return ae;if(e instanceof ve)return se;if(e instanceof Ce)return le;if(Array.isArray(e)){var t,o,n=e.length,i=A(e);try{for(i.s();!(o=i.n()).done;){var r=we(o.value);if(t){if(t===r)continue;t=re;break}t=r}}catch(e){i.e(e)}finally{i.f()}return ce(t||re,n)}return ie}function _e(e){var t=I(e);return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof fe||e instanceof ve||e instanceof Ce?e.toString():JSON.stringify(e)}var Ee=function(){function e(t,o){d(this,e),this.type=t,this.value=o}return u(e,[{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 fe?["rgba"].concat(this.value.toArray()):this.value instanceof ve?this.value.serialize():this.value}}],[{key:"parse",value:function(t,o){if(2!==t.length)return o.error("'literal' expression requires exactly one argument, but found ".concat(t.length-1," instead."));if(!be(t[1]))return o.error("invalid value");var n=t[1],i=we(n),r=o.expectedType;return"array"!==i.kind||0!==i.N||!r||"array"!==r.kind||"number"==typeof r.N&&0!==r.N||(i=r),new e(i,n)}}]),e}(),Se=function(){function e(t){d(this,e),this.name="ExpressionEvaluationError",this.message=t}return u(e,[{key:"toJSON",value:function(){return this.message}}]),e}(),Me={string:te,number:ee,boolean:oe,object:ie},Pe=function(){function e(t,o){d(this,e),this.type=t,this.args=o}return u(e,[{key:"evaluate",value:function(e){for(var t=0;t1)&&t.push(n)}}return t.concat(this.args.map((function(e){return e.serialize()})))}}],[{key:"parse",value:function(t,o){if(t.length<2)return o.error("Expected at least one argument.");var n,i=1,r=t[0];if("array"===r){var a,s;if(t.length>2){var l=t[1];if("string"!=typeof l||!(l in Me)||"object"===l)return o.error('The item type argument of "array" must be one of string, number, boolean',1);a=Me[l],i++}else a=re;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return o.error('The length argument to "array" must be a positive integer literal',2);s=t[2],i++}n=ce(a,s)}else n=Me[r];for(var c=[];i-1),o}},{key:"eachChild",value:function(e){e(this.input)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){return["image",this.input.serialize()]}}],[{key:"parse",value:function(t,o){if(2!==t.length)return o.error("Expected two arguments.");var n=o.parse(t[1],1,te);return n?new e(n):o.error("No image name provided.")}}]),e}(),Ge={"to-boolean":oe,"to-color":ne,"to-number":ee,"to-string":te},Re=function(){function e(t,o){d(this,e),this.type=t,this.args=o}return u(e,[{key:"evaluate",value:function(e){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(e));if("color"===this.type.kind){var t,o,n,i=A(this.args);try{for(i.s();!(n=i.n()).done;){if(t=n.value.evaluate(e),o=null,t instanceof fe)return t;if("string"==typeof t){var r=e.parseColor(t);if(r)return r}else if(Array.isArray(t)&&!(o=t.length<3||t.length>4?"Invalid rbga value ".concat(JSON.stringify(t),": expected an array containing either three or four numeric values."):Ie(t[0],t[1],t[2],t[3])))return new fe(t[0]/255,t[1]/255,t[2]/255,t[3])}}catch(e){i.e(e)}finally{i.f()}throw new Se(o||"Could not parse color from value '".concat("string"==typeof t?t:String(JSON.stringify(t)),"'"))}if("number"===this.type.kind){var a,s=null,l=A(this.args);try{for(l.s();!(a=l.n()).done;){if(null===(s=a.value.evaluate(e)))return 0;var c=Number(s);if(!isNaN(c))return c}}catch(e){l.e(e)}finally{l.f()}throw new Se("Could not convert ".concat(JSON.stringify(s)," to number."))}return"formatted"===this.type.kind?ve.fromString(_e(this.args[0].evaluate(e))):"resolvedImage"===this.type.kind?Ce.fromString(_e(this.args[0].evaluate(e))):_e(this.args[0].evaluate(e))}},{key:"eachChild",value:function(e){this.args.forEach(e)}},{key:"outputDefined",value:function(){return this.args.every((function(e){return e.outputDefined()}))}},{key:"serialize",value:function(){if("formatted"===this.type.kind)return new xe([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new ke(this.args[0]).serialize();var e=["to-".concat(this.type.kind)];return this.eachChild((function(t){e.push(t.serialize())})),e}}],[{key:"parse",value:function(t,o){if(t.length<2)return o.error("Expected at least one argument.");var n=t[0];if(("to-boolean"===n||"to-string"===n)&&2!==t.length)return o.error("Expected one argument.");for(var i=Ge[n],r=[],a=1;a=t[2])&&(!(e[1]<=t[1])&&!(e[3]>=t[3])))}function Ne(e,t){var o,n=(180+e[0])/360,i=(o=e[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+o*Math.PI/360)))/360),r=Math.pow(2,t.z);return[Math.round(n*r*8192),Math.round(i*r*8192)]}function Be(e,t,o){return t[1]>e[1]!=o[1]>e[1]&&e[0]<(o[0]-t[0])*(e[1]-t[1])/(o[1]-t[1])+t[0]}function Fe(e,t){for(var o,n,i,r,a,s,l,c=!1,u=0,d=t.length;u0&&d<0||u<0&&d>0}function We(e,t,o){var n,i,r,a,s,l,c,u,d,p=A(o);try{for(p.s();!(n=p.n()).done;)for(var h=n.value,g=0;go[2]){var i=.5*n,r=e[0]-o[0]>i?-n:o[0]-e[0]>i?n:0;0===r&&(r=e[0]-o[2]>i?-n:o[2]-e[0]>i?n:0),e[0]+=r}je(t,e)}function Ke(e,t,o,n){var i,r=8192*Math.pow(2,n.z),a=[8192*n.x,8192*n.y],s=[],l=A(e);try{for(l.s();!(i=l.n()).done;){var c,u=A(i.value);try{for(u.s();!(c=u.n()).done;){var d=c.value,p=[d.x+a[0],d.y+a[1]];Ze(p,t,o,r),s.push(p)}}catch(e){u.e(e)}finally{u.f()}}}catch(e){l.e(e)}finally{l.f()}return s}function Xe(e,t,o,n){var i,r,a=8192*Math.pow(2,n.z),s=[8192*n.x,8192*n.y],l=[],c=A(e);try{for(c.s();!(i=c.n()).done;){var u,d=i.value,p=[],h=A(d);try{for(h.s();!(u=h.n()).done;){var g=u.value,m=[g.x+s[0],g.y+s[1]];je(t,m),p.push(m)}}catch(e){h.e(e)}finally{h.f()}l.push(p)}}catch(e){c.e(e)}finally{c.f()}if(t[2]-t[0]<=a/2){(r=t)[0]=r[1]=1/0,r[2]=r[3]=-1/0;var f,y=A(l);try{for(y.s();!(f=y.n()).done;){var v,C=A(f.value);try{for(C.s();!(v=C.n()).done;){Ze(v.value,t,o,a)}}catch(e){C.e(e)}finally{C.f()}}}catch(e){y.e(e)}finally{y.f()}}return l}var Qe=function(){function e(t,o){d(this,e),this.type=oe,this.geojson=t,this.geometries=o}return u(e,[{key:"evaluate",value:function(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return function(e,t){var o=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=e.canonicalID();if("Polygon"===t.type){var r=Ye(t.coordinates,n,i),a=Ke(e.geometry(),o,n,i);if(!Ue(o,n))return!1;var s,l=A(a);try{for(l.s();!(s=l.n()).done;){if(!Fe(s.value,r))return!1}}catch(e){l.e(e)}finally{l.f()}}if("MultiPolygon"===t.type){var c=Je(t.coordinates,n,i),u=Ke(e.geometry(),o,n,i);if(!Ue(o,n))return!1;var d,p=A(u);try{for(p.s();!(d=p.n()).done;){if(!ze(d.value,c))return!1}}catch(e){p.e(e)}finally{p.f()}}return!0}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){var o=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=e.canonicalID();if("Polygon"===t.type){var r=Ye(t.coordinates,n,i),a=Xe(e.geometry(),o,n,i);if(!Ue(o,n))return!1;var s,l=A(a);try{for(l.s();!(s=l.n()).done;){if(!qe(s.value,r))return!1}}catch(e){l.e(e)}finally{l.f()}}if("MultiPolygon"===t.type){var c=Je(t.coordinates,n,i),u=Xe(e.geometry(),o,n,i);if(!Ue(o,n))return!1;var d,p=A(u);try{for(p.s();!(d=p.n()).done;){if(!He(d.value,c))return!1}}catch(e){p.e(e)}finally{p.f()}}return!0}(e,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(t,o){if(2!==t.length)return o.error("'within' expression requires exactly one argument, but found ".concat(t.length-1," instead."));if(be(t[1])){var n=t[1];if("FeatureCollection"===n.type)for(var i=0;i=0)return!1;var o=!0;return e.eachChild((function(e){o&&!tt(e,t)&&(o=!1)})),o}var ot=function(){function e(t,o){d(this,e),this.type=o.type,this.name=t,this.boundExpression=o}return u(e,[{key:"evaluate",value:function(e){return this.boundExpression.evaluate(e)}},{key:"eachChild",value:function(){}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){return["var",this.name]}}],[{key:"parse",value:function(t,o){if(2!==t.length||"string"!=typeof t[1])return o.error("'var' expression requires exactly one string literal argument.");var n=t[1];return o.scope.has(n)?new e(n,o.scope.get(n)):o.error('Unknown variable "'.concat(n,'". Make sure "').concat(n,'" has been bound in an enclosing "let" expression before using it.'),1)}}]),e}(),nt=function(){function e(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Q,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];d(this,e),this.registry=t,this.path=o,this.key=o.map((function(e){return"[".concat(e,"]")})).join(""),this.scope=i,this.errors=r,this.expectedType=n}return u(e,[{key:"parse",value:function(e,t,o,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return t?this.concat(t,o,n)._parse(e,i):this._parse(e,i)}},{key:"_parse",value:function(e,t){function o(e,t,o){return"assert"===o?new Pe(t,[e]):"coerce"===o?new Re(t,[e]):e}if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=e[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found ".concat(I(n),' instead. If you wanted a literal array, use ["literal", [...]].'),0),null;var i=this.registry[n];if(i){var r=i.parse(e,this);if(!r)return null;if(this.expectedType){var a=this.expectedType,s=r.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else r=o(r,a,t.typeAnnotation||"coerce");else r=o(r,a,t.typeAnnotation||"assert")}if(!(r instanceof Ee)&&"resolvedImage"!==r.type.kind&&function e(t){if(t instanceof ot)return e(t.boundExpression);if(t instanceof Le&&"error"===t.name)return!1;if(t instanceof De)return!1;if(t instanceof Qe)return!1;var o=t instanceof Re||t instanceof Pe,n=!0;if(t.eachChild((function(t){n=o?n&&e(t):n&&t instanceof Ee})),!n)return!1;return $e(t)&&tt(t,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script"])}(r)){var l=new Oe;try{r=new Ee(r.type,r.evaluate(l))}catch(e){return this.error(e.message),null}}return r}return this.error('Unknown expression "'.concat(n,'". If you wanted a literal array, use ["literal", [...]].'),0)}return void 0===e?this.error("'undefined' value invalid. Use null instead."):"object"===I(e)?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found ".concat(I(e)," instead."))}},{key:"concat",value:function(t,o,n){var i="number"==typeof t?this.path.concat(t):this.path,r=n?this.scope.concat(n):this.scope;return new e(this.registry,i,o||null,r,this.errors)}},{key:"error",value:function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),n=1;nt))throw new Se("Input is not a number.");a=s-1}return 0}var rt=function(){function e(t,o,n){d(this,e),this.type=t,this.input=o,this.labels=[],this.outputs=[];var i,r=A(n);try{for(r.s();!(i=r.n()).done;){var s=a(i.value,2),l=s[0],c=s[1];this.labels.push(l),this.outputs.push(c)}}catch(e){r.e(e)}finally{r.f()}}return u(e,[{key:"evaluate",value:function(e){var t=this.labels,o=this.outputs;if(1===t.length)return o[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return o[0].evaluate(e);var i=t.length;return n>=t[i-1]?o[i-1].evaluate(e):o[it(t,n)].evaluate(e)}},{key:"eachChild",value:function(e){e(this.input);var t,o=A(this.outputs);try{for(o.s();!(t=o.n()).done;){e(t.value)}}catch(e){o.e(e)}finally{o.f()}}},{key:"outputDefined",value:function(){return this.outputs.every((function(e){return e.outputDefined()}))}},{key:"serialize",value:function(){for(var e=["step",this.input.serialize()],t=0;t0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e}}],[{key:"parse",value:function(t,o){if(t.length-1<4)return o.error("Expected at least 4 arguments, but found only ".concat(t.length-1,"."));if((t.length-1)%2!=0)return o.error("Expected an even number of arguments.");var n=o.parse(t[1],1,ee);if(!n)return null;var i=[],r=null;o.expectedType&&"value"!==o.expectedType.kind&&(r=o.expectedType);for(var a=1;a=s)return o.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',c);var d=o.parse(l,u,r);if(!d)return null;r=r||d.type,i.push([s,d])}return new e(r,n,i)}}]),e}(),at=st;function st(e,t,o,n){this.cx=3*e,this.bx=3*(o-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(n-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=n,this.p2x=o,this.p2y=n}function lt(e,t,o){return e*(1-o)+t*o}st.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e},st.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e},st.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},st.prototype.solveCurveX=function(e,t){var o,n,i,r,a;for(void 0===t&&(t=1e-6),i=e,a=0;a<8;a++){if(r=this.sampleCurveX(i)-e,Math.abs(r)(n=1))return n;for(;or?o=i:n=i,i=.5*(n-o)+o}return i},st.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var ct=Object.freeze({__proto__:null,number:lt,color:function(e,t,o){return new fe(lt(e.r,t.r,o),lt(e.g,t.g,o),lt(e.b,t.b,o),lt(e.a,t.a,o))},array:function(e,t,o){return e.map((function(e,n){return lt(e,t[n],o)}))}}),ut=6/29,dt=3*ut*ut,pt=Math.PI/180,ht=180/Math.PI;function gt(e){return e>.008856451679035631?Math.pow(e,1/3):e/dt+4/29}function mt(e){return e>ut?e*e*e:dt*(e-4/29)}function ft(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function yt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function At(e){var t=yt(e.r),o=yt(e.g),n=yt(e.b),i=gt((.4124564*t+.3575761*o+.1804375*n)/.95047),r=gt((.2126729*t+.7151522*o+.072175*n)/1);return{l:116*r-16,a:500*(i-r),b:200*(r-gt((.0193339*t+.119192*o+.9503041*n)/1.08883)),alpha:e.a}}function vt(e){var t=(e.l+16)/116,o=isNaN(e.a)?t:t+e.a/500,n=isNaN(e.b)?t:t-e.b/200;return t=1*mt(t),o=.95047*mt(o),n=1.08883*mt(n),new fe(ft(3.2404542*o-1.5371385*t-.4985314*n),ft(-.969266*o+1.8760108*t+.041556*n),ft(.0556434*o-.2040259*t+1.0572252*n),e.alpha)}function Ct(e,t,o){var n=t-e;return e+o*(n>180||n<-180?n-360*Math.round(n/360):n)}var It={forward:At,reverse:vt,interpolate:function(e,t,o){return{l:lt(e.l,t.l,o),a:lt(e.a,t.a,o),b:lt(e.b,t.b,o),alpha:lt(e.alpha,t.alpha,o)}}},bt={forward:function(e){var t=At(e),o=t.l,n=t.a,i=t.b,r=Math.atan2(i,n)*ht;return{h:r<0?r+360:r,c:Math.sqrt(n*n+i*i),l:o,alpha:e.a}},reverse:function(e){var t=e.h*pt,o=e.c;return vt({l:e.l,a:Math.cos(t)*o,b:Math.sin(t)*o,alpha:e.alpha})},interpolate:function(e,t,o){return{h:Ct(e.h,t.h,o),c:lt(e.c,t.c,o),l:lt(e.l,t.l,o),alpha:lt(e.alpha,t.alpha,o)}}},wt=Object.freeze({__proto__:null,lab:It,hcl:bt}),_t=function(){function e(t,o,n,i,r){d(this,e),this.type=t,this.operator=o,this.interpolation=n,this.input=i,this.labels=[],this.outputs=[];var s,l=A(r);try{for(l.s();!(s=l.n()).done;){var c=a(s.value,2),u=c[0],p=c[1];this.labels.push(u),this.outputs.push(p)}}catch(e){l.e(e)}finally{l.f()}}return u(e,[{key:"evaluate",value:function(t){var o=this.labels,n=this.outputs;if(1===o.length)return n[0].evaluate(t);var i=this.input.evaluate(t);if(i<=o[0])return n[0].evaluate(t);var r=o.length;if(i>=o[r-1])return n[r-1].evaluate(t);var a=it(o,i),s=o[a],l=o[a+1],c=e.interpolationFactor(this.interpolation,i,s,l),u=n[a].evaluate(t),d=n[a+1].evaluate(t);return"interpolate"===this.operator?ct[this.type.kind.toLowerCase()](u,d,c):"interpolate-hcl"===this.operator?bt.reverse(bt.interpolate(bt.forward(u),bt.forward(d),c)):It.reverse(It.interpolate(It.forward(u),It.forward(d),c))}},{key:"eachChild",value:function(e){e(this.input);var t,o=A(this.outputs);try{for(o.s();!(t=o.n()).done;){e(t.value)}}catch(e){o.e(e)}finally{o.f()}}},{key:"outputDefined",value:function(){return this.outputs.every((function(e){return e.outputDefined()}))}},{key:"serialize",value:function(){var e;e="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 t=[this.operator,e,this.input.serialize()],o=0;o1})))return o.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);c={name:"cubic-bezier",controlPoints:h}}if(t.length-1<4)return o.error("Expected at least 4 arguments, but found only ".concat(t.length-1,"."));if((t.length-1)%2!=0)return o.error("Expected an even number of arguments.");if(!(u=o.parse(u,2,ee)))return null;var g=[],m=null;"interpolate-hcl"===a||"interpolate-lab"===a?m=ne:o.expectedType&&"value"!==o.expectedType.kind&&(m=o.expectedType);for(var f=0;f=y)return o.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',C);var b=o.parse(A,I,m);if(!b)return null;m=m||b.type,g.push([y,b])}return"number"===m.kind||"color"===m.kind||"array"===m.kind&&"number"===m.itemType.kind&&"number"==typeof m.N?new e(m,a,c,u,g):o.error("Type ".concat(ue(m)," is not interpolatable."))}}]),e}();function Et(e,t,o,n){var i=n-o,r=e-o;return 0===i?0:1===t?r/i:(Math.pow(t,r)-1)/(Math.pow(t,i)-1)}var St=function(){function e(t,o){d(this,e),this.type=t,this.args=o}return u(e,[{key:"evaluate",value:function(e){var t,o,n=null,i=0,r=A(this.args);try{for(r.s();!(o=r.n()).done;){var a=o.value;if(i++,(n=a.evaluate(e))&&n instanceof Ce&&!n.available&&(t||(t=n.name),n=null,i===this.args.length&&(n=t)),null!==n)break}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"eachChild",value:function(e){this.args.forEach(e)}},{key:"outputDefined",value:function(){return this.args.every((function(e){return e.outputDefined()}))}},{key:"serialize",value:function(){var e=["coalesce"];return this.eachChild((function(t){e.push(t.serialize())})),e}}],[{key:"parse",value:function(t,o){if(t.length<2)return o.error("Expectected at least one argument.");var n=null,i=o.expectedType;i&&"value"!==i.kind&&(n=i);var r,a=[],s=A(t.slice(1));try{for(s.s();!(r=s.n()).done;){var l=r.value,c=o.parse(l,1+a.length,n,void 0,{typeAnnotation:"omit"});if(!c)return null;n=n||c.type,a.push(c)}}catch(e){s.e(e)}finally{s.f()}return new e(i&&a.some((function(e){return pe(i,e.type)}))?re:n,a)}}]),e}(),Mt=function(){function e(t,o){d(this,e),this.type=o.type,this.bindings=[].concat(t),this.result=o}return u(e,[{key:"evaluate",value:function(e){return this.result.evaluate(e)}},{key:"eachChild",value:function(e){var t,o=A(this.bindings);try{for(o.s();!(t=o.n()).done;){e(t.value[1])}}catch(e){o.e(e)}finally{o.f()}e(this.result)}},{key:"outputDefined",value:function(){return this.result.outputDefined()}},{key:"serialize",value:function(){var e,t=["let"],o=A(this.bindings);try{for(o.s();!(e=o.n()).done;){var n=a(e.value,2),i=n[0],r=n[1];t.push(i,r.serialize())}}catch(e){o.e(e)}finally{o.f()}return t.push(this.result.serialize()),t}}],[{key:"parse",value:function(t,o){if(t.length<4)return o.error("Expected at least 3 arguments, but found ".concat(t.length-1," instead."));for(var n=[],i=1;i=o.length)throw new Se("Array index out of bounds: ".concat(t," > ").concat(o.length-1,"."));if(t!==Math.floor(t))throw new Se("Array index must be an integer, but found ".concat(t," instead."));return o[t]}},{key:"eachChild",value:function(e){e(this.index),e(this.input)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){return["at",this.index.serialize(),this.input.serialize()]}}],[{key:"parse",value:function(t,o){if(3!==t.length)return o.error("Expected 2 arguments, but found ".concat(t.length-1," instead."));var n=o.parse(t[1],1,ee),i=o.parse(t[2],2,ce(o.expectedType||re));return n&&i?new e(i.type.itemType,n,i):null}}]),e}(),xt=function(){function e(t,o){d(this,e),this.type=oe,this.needle=t,this.haystack=o}return u(e,[{key:"evaluate",value:function(e){var t=this.needle.evaluate(e),o=this.haystack.evaluate(e);if(!o)return!1;if(!ge(t,["boolean","string","number","null"]))throw new Se("Expected first argument to be of type boolean, string, number or null, but found ".concat(ue(we(t))," instead."));if(!ge(o,["string","array"]))throw new Se("Expected second argument to be of type array or string, but found ".concat(ue(we(o))," instead."));return o.indexOf(t)>=0}},{key:"eachChild",value:function(e){e(this.needle),e(this.haystack)}},{key:"outputDefined",value:function(){return!0}},{key:"serialize",value:function(){return["in",this.needle.serialize(),this.haystack.serialize()]}}],[{key:"parse",value:function(t,o){if(3!==t.length)return o.error("Expected 2 arguments, but found ".concat(t.length-1," instead."));var n=o.parse(t[1],1,re),i=o.parse(t[2],2,re);return n&&i?he(n.type,[oe,te,ee,$,re])?new e(n,i):o.error("Expected first argument to be of type boolean, string, number or null, but found ".concat(ue(n.type)," instead")):null}}]),e}(),kt=function(){function e(t,o,n){d(this,e),this.type=ee,this.needle=t,this.haystack=o,this.fromIndex=n}return u(e,[{key:"evaluate",value:function(e){var t=this.needle.evaluate(e),o=this.haystack.evaluate(e);if(!ge(t,["boolean","string","number","null"]))throw new Se("Expected first argument to be of type boolean, string, number or null, but found ".concat(ue(we(t))," instead."));if(!ge(o,["string","array"]))throw new Se("Expected second argument to be of type array or string, but found ".concat(ue(we(o))," instead."));if(this.fromIndex){var n=this.fromIndex.evaluate(e);return o.indexOf(t,n)}return o.indexOf(t)}},{key:"eachChild",value:function(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}],[{key:"parse",value:function(t,o){if(t.length<=2||t.length>=5)return o.error("Expected 3 or 4 arguments, but found ".concat(t.length-1," instead."));var n=o.parse(t[1],1,re),i=o.parse(t[2],2,re);if(!n||!i)return null;if(!he(n.type,[oe,te,ee,$,re]))return o.error("Expected first argument to be of type boolean, string, number or null, but found ".concat(ue(n.type)," instead"));if(4===t.length){var r=o.parse(t[3],3,ee);return r?new e(n,i,r):null}return new e(n,i)}}]),e}(),Gt=function(){function e(t,o,n,i,r,a){d(this,e),this.inputType=t,this.type=o,this.input=n,this.cases=i,this.outputs=r,this.otherwise=a}return u(e,[{key:"evaluate",value:function(e){var t=this.input.evaluate(e);return(we(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}},{key:"eachChild",value:function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}},{key:"outputDefined",value:function(){return this.outputs.every((function(e){return e.outputDefined()}))&&this.otherwise.outputDefined()}},{key:"serialize",value:function(){var e,t=this,o=["match",this.input.serialize()],n=[],i={},r=A(Object.keys(this.cases).sort());try{for(r.s();!(e=r.n()).done;){var s=e.value,l=i[this.cases[s]];void 0===l?(i[this.cases[s]]=n.length,n.push([this.cases[s],[s]])):n[l][1].push(s)}}catch(e){r.e(e)}finally{r.f()}for(var c=function(e){return"number"===t.inputType.kind?Number(e):e},u=0,d=n;uNumber.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than ".concat(Number.MAX_SAFE_INTEGER,"."));if("number"==typeof h&&Math.floor(h)!==h)return u.error("Numeric branch labels must be integer values.");if(n){if(u.checkSubtype(n,we(h)))return null}else n=we(h);if(void 0!==r[String(h)])return u.error("Branch labels must be unique.");r[String(h)]=a.length}}catch(e){p.e(e)}finally{p.f()}var g=o.parse(c,s,i);if(!g)return null;i=i||g.type,a.push(g)}var m=o.parse(t[1],1,re);if(!m)return null;var f=o.parse(t[t.length-1],t.length-1,i);return f?"value"!==m.type.kind&&o.concat(1).checkSubtype(n,m.type)?null:new e(n,i,m,r,a,f):null}}]),e}(),Rt=function(){function e(t,o,n){d(this,e),this.type=t,this.branches=o,this.otherwise=n}return u(e,[{key:"evaluate",value:function(e){var t,o=A(this.branches);try{for(o.s();!(t=o.n()).done;){var n=a(t.value,2),i=n[0],r=n[1];if(i.evaluate(e))return r.evaluate(e)}}catch(e){o.e(e)}finally{o.f()}return this.otherwise.evaluate(e)}},{key:"eachChild",value:function(e){var t,o=A(this.branches);try{for(o.s();!(t=o.n()).done;){var n=a(t.value,2),i=n[0],r=n[1];e(i),e(r)}}catch(e){o.e(e)}finally{o.f()}e(this.otherwise)}},{key:"outputDefined",value:function(){return this.branches.every((function(e){var t=a(e,2);t[0];return t[1].outputDefined()}))&&this.otherwise.outputDefined()}},{key:"serialize",value:function(){var e=["case"];return this.eachChild((function(t){e.push(t.serialize())})),e}}],[{key:"parse",value:function(t,o){if(t.length<4)return o.error("Expected at least 3 arguments, but found only ".concat(t.length-1,"."));if(t.length%2!=0)return o.error("Expected an odd number of arguments.");var n;o.expectedType&&"value"!==o.expectedType.kind&&(n=o.expectedType);for(var i=[],r=1;r=5)return o.error("Expected 3 or 4 arguments, but found ".concat(t.length-1," instead."));var n=o.parse(t[1],1,re),i=o.parse(t[2],2,ee);if(!n||!i)return null;if(!he(n.type,[ce(re),te,re]))return o.error("Expected first argument to be of type array or string, but found ".concat(ue(n.type)," instead"));if(4===t.length){var r=o.parse(t[3],3,ee);return r?new e(n.type,n,i,r):null}return new e(n.type,n,i)}}]),e}();function Ot(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function Lt(e,t,o,n){return 0===n.compare(t,o)}function Dt(e,t,o){var n="=="!==e&&"!="!==e;return function(){function i(e,t,o){d(this,i),this.type=oe,this.lhs=e,this.rhs=t,this.collator=o,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}return u(i,[{key:"evaluate",value:function(i){var r=this.lhs.evaluate(i),a=this.rhs.evaluate(i);if(n&&this.hasUntypedArgument){var s=we(r),l=we(a);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new Se('Expected arguments for "'.concat(e,'" to be (string, string) or (number, number), but found (').concat(s.kind,", ").concat(l.kind,") instead."))}if(this.collator&&!n&&this.hasUntypedArgument){var c=we(r),u=we(a);if("string"!==c.kind||"string"!==u.kind)return t(i,r,a)}return this.collator?o(i,r,a,this.collator.evaluate(i)):t(i,r,a)}},{key:"eachChild",value:function(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)}},{key:"outputDefined",value:function(){return!0}},{key:"serialize",value:function(){var t=[e];return this.eachChild((function(e){t.push(e.serialize())})),t}}],[{key:"parse",value:function(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");var o=e[0],r=t.parse(e[1],1,re);if(!r)return null;if(!Ot(o,r.type))return t.concat(1).error('"'.concat(o,"\" comparisons are not supported for type '").concat(ue(r.type),"'."));var a=t.parse(e[2],2,re);if(!a)return null;if(!Ot(o,a.type))return t.concat(2).error('"'.concat(o,"\" comparisons are not supported for type '").concat(ue(a.type),"'."));if(r.type.kind!==a.type.kind&&"value"!==r.type.kind&&"value"!==a.type.kind)return t.error("Cannot compare types '".concat(ue(r.type),"' and '").concat(ue(a.type),"'."));n&&("value"===r.type.kind&&"value"!==a.type.kind?r=new Pe(a.type,[r]):"value"!==r.type.kind&&"value"===a.type.kind&&(a=new Pe(r.type,[a])));var s=null;if(4===e.length){if("string"!==r.type.kind&&"string"!==a.type.kind&&"value"!==r.type.kind&&"value"!==a.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(s=t.parse(e[3],3,ae)))return null}return new i(r,a,s)}}]),i}()}var jt=Dt("==",(function(e,t,o){return t===o}),Lt),Ut=Dt("!=",(function(e,t,o){return t!==o}),(function(e,t,o,n){return!Lt(0,t,o,n)})),Nt=Dt("<",(function(e,t,o){return t",(function(e,t,o){return t>o}),(function(e,t,o,n){return n.compare(t,o)>0})),Ft=Dt("<=",(function(e,t,o){return t<=o}),(function(e,t,o,n){return n.compare(t,o)<=0})),zt=Dt(">=",(function(e,t,o){return t>=o}),(function(e,t,o,n){return n.compare(t,o)>=0})),Vt=function(){function e(t,o,n,i,r){d(this,e),this.type=te,this.number=t,this.locale=o,this.currency=n,this.minFractionDigits=i,this.maxFractionDigits=r}return u(e,[{key:"evaluate",value:function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}},{key:"eachChild",value:function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]}}],[{key:"parse",value:function(t,o){if(3!==t.length)return o.error("Expected two arguments.");var n=o.parse(t[1],1,ee);if(!n)return null;var i=t[2];if("object"!==I(i)||Array.isArray(i))return o.error("NumberFormat options argument must be an object.");var r=null;if(i.locale&&!(r=o.parse(i.locale,1,te)))return null;var a=null;if(i.currency&&!(a=o.parse(i.currency,1,te)))return null;var s=null;if(i["min-fraction-digits"]&&!(s=o.parse(i["min-fraction-digits"],1,ee)))return null;var l=null;return i["max-fraction-digits"]&&!(l=o.parse(i["max-fraction-digits"],1,ee))?null:new e(n,r,a,s,l)}}]),e}(),Wt={"==":jt,"!=":Ut,">":Bt,"<":Nt,">=":zt,"<=":Ft,array:Pe,at:Pt,boolean:Pe,case:Rt,coalesce:St,collator:De,format:xe,image:ke,in:xt,"index-of":kt,interpolate:_t,"interpolate-hcl":_t,"interpolate-lab":_t,length:function(){function e(t){d(this,e),this.type=ee,this.input=t}return u(e,[{key:"evaluate",value:function(e){var t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new Se("Expected value to be of type string or array, but found ".concat(ue(we(t))," instead."))}},{key:"eachChild",value:function(e){e(this.input)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){var e=["length"];return this.eachChild((function(t){e.push(t.serialize())})),e}}],[{key:"parse",value:function(t,o){if(2!==t.length)return o.error("Expected 1 argument, but found ".concat(t.length-1," instead."));var n=o.parse(t[1],1);return n?"array"!==n.type.kind&&"string"!==n.type.kind&&"value"!==n.type.kind?o.error("Expected argument of type string or array, but found ".concat(ue(n.type)," instead.")):new e(n):null}}]),e}(),let:Mt,literal:Ee,match:Gt,number:Pe,"number-format":Vt,object:Pe,slice:Tt,step:rt,string:Pe,"to-boolean":Re,"to-color":Re,"to-number":Re,"to-string":Re,var:ot,within:Qe};function qt(e,t){var o=a(t,4),n=o[0],i=o[1],r=o[2],s=o[3];n=n.evaluate(e),i=i.evaluate(e),r=r.evaluate(e);var l=s?s.evaluate(e):1,c=Ie(n,i,r,l);if(c)throw new Se(c);return new fe(n/255*l,i/255*l,r/255*l,l)}function Ht(e,t){return e in t}function Yt(e,t){var o=t[e];return void 0===o?null:o}function Jt(e){return{type:e}}function Zt(e){return{result:"success",value:e}}function Kt(e){return{result:"error",value:e}}function Xt(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function Qt(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function $t(e){return!!e.expression&&e.expression.interpolated}function eo(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":I(e)}function to(e){return"object"===I(e)&&null!==e&&!Array.isArray(e)}function oo(e){return e}function no(e,t){var o,n,i,r="color"===t.type,a=e.stops&&"object"===I(e.stops[0][0]),s=a||void 0!==e.property,l=a||!s,c=e.type||($t(t)?"exponential":"interval");if(r&&((e=K({},e)).stops&&(e.stops=e.stops.map((function(e){return[e[0],fe.parse(e[1])]}))),e.default?e.default=fe.parse(e.default):e.default=fe.parse(t.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!wt[e.colorSpace])throw new Error("Unknown color space: ".concat(e.colorSpace));if("exponential"===c)o=so;else if("interval"===c)o=ao;else if("categorical"===c){o=ro,n=Object.create(null);var u,d=A(e.stops);try{for(d.s();!(u=d.n()).done;){var p=u.value;n[p[0]]=p[1]}}catch(e){d.e(e)}finally{d.f()}i=I(e.stops[0][0])}else{if("identity"!==c)throw new Error('Unknown function type "'.concat(c,'"'));o=lo}if(a){for(var h={},g=[],m=0;m=e.stops[n-1][0])return e.stops[n-1][1];var i=it(e.stops.map((function(e){return e[0]})),o);return e.stops[i][1]}function so(e,t,o){var n=void 0!==e.base?e.base:1;if("number"!==eo(o))return io(e.default,t.default);var i=e.stops.length;if(1===i)return e.stops[0][1];if(o<=e.stops[0][0])return e.stops[0][1];if(o>=e.stops[i-1][0])return e.stops[i-1][1];var r=it(e.stops.map((function(e){return e[0]})),o),a=function(e,t,o,n){var i=n-o,r=e-o;return 0===i?0:1===t?r/i:(Math.pow(t,r)-1)/(Math.pow(t,i)-1)}(o,n,e.stops[r][0],e.stops[r+1][0]),s=e.stops[r][1],l=e.stops[r+1][1],c=ct[t.type]||oo;if(e.colorSpace&&"rgb"!==e.colorSpace){var u=wt[e.colorSpace];c=function(e,t){return u.reverse(u.interpolate(u.forward(e),u.forward(t),a))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var e=arguments.length,t=new Array(e),o=0;o":[oe,[te,re],function(e,t){var o=a(t,2),n=o[0],i=o[1],r=e.properties()[n.value],s=i.value;return I(r)===I(s)&&r>s}],"filter-id->":[oe,[re],function(e,t){var o=a(t,1)[0],n=e.id(),i=o.value;return I(n)===I(i)&&n>i}],"filter-<=":[oe,[te,re],function(e,t){var o=a(t,2),n=o[0],i=o[1],r=e.properties()[n.value],s=i.value;return I(r)===I(s)&&r<=s}],"filter-id-<=":[oe,[re],function(e,t){var o=a(t,1)[0],n=e.id(),i=o.value;return I(n)===I(i)&&n<=i}],"filter->=":[oe,[te,re],function(e,t){var o=a(t,2),n=o[0],i=o[1],r=e.properties()[n.value],s=i.value;return I(r)===I(s)&&r>=s}],"filter-id->=":[oe,[re],function(e,t){var o=a(t,1)[0],n=e.id(),i=o.value;return I(n)===I(i)&&n>=i}],"filter-has":[oe,[re],function(e,t){return a(t,1)[0].value in e.properties()}],"filter-has-id":[oe,[],function(e){return null!==e.id()&&void 0!==e.id()}],"filter-type-in":[oe,[ce(te)],function(e,t){return a(t,1)[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[oe,[ce(re)],function(e,t){return a(t,1)[0].value.indexOf(e.id())>=0}],"filter-in-small":[oe,[te,ce(re)],function(e,t){var o=a(t,2),n=o[0];return o[1].value.indexOf(e.properties()[n.value])>=0}],"filter-in-large":[oe,[te,ce(re)],function(e,t){var o=a(t,2),n=o[0],i=o[1];return function(e,t,o,n){for(;o<=n;){var i=o+n>>1;if(t[i]===e)return!0;t[i]>e?n=i-1:o=i+1}return!1}(e.properties()[n.value],i.value,0,i.value.length-1)}],all:{type:oe,overloads:[[[oe,oe],function(e,t){var o=a(t,2),n=o[0],i=o[1];return n.evaluate(e)&&i.evaluate(e)}],[Jt(oe),function(e,t){var o,n=A(t);try{for(n.s();!(o=n.n()).done;){if(!o.value.evaluate(e))return!1}}catch(e){n.e(e)}finally{n.f()}return!0}]]},any:{type:oe,overloads:[[[oe,oe],function(e,t){var o=a(t,2),n=o[0],i=o[1];return n.evaluate(e)||i.evaluate(e)}],[Jt(oe),function(e,t){var o,n=A(t);try{for(n.s();!(o=n.n()).done;){if(o.value.evaluate(e))return!0}}catch(e){n.e(e)}finally{n.f()}return!1}]]},"!":[oe,[oe],function(e,t){return!a(t,1)[0].evaluate(e)}],"is-supported-script":[oe,[te],function(e,t){var o=a(t,1)[0],n=e.globals&&e.globals.isSupportedScript;return!n||n(o.evaluate(e))}],upcase:[te,[te],function(e,t){return a(t,1)[0].evaluate(e).toUpperCase()}],downcase:[te,[te],function(e,t){return a(t,1)[0].evaluate(e).toLowerCase()}],concat:[te,Jt(re),function(e,t){return t.map((function(t){return _e(t.evaluate(e))})).join("")}],"resolved-locale":[te,[ae],function(e,t){return a(t,1)[0].evaluate(e).resolvedLocale()}]});var co=function(){function e(t,o){var n;d(this,e),this.expression=t,this._warningHistory={},this._evaluator=new Oe,this._defaultValue=o?"color"===(n=o).type&&to(n.default)?new fe(0,0,0,0):"color"===n.type?fe.parse(n.default)||null:void 0===n.default?null:n.default:null,this._enumValues=o&&"enum"===o.type?o.values:null}return u(e,[{key:"evaluateWithoutErrorHandling",value:function(e,t,o,n,i,r){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=o,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=r,this.expression.evaluate(this._evaluator)}},{key:"evaluate",value:function(e,t,o,n,i,r){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=o||null,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=r||null;try{var a=this.expression.evaluate(this._evaluator);if(null==a||"number"==typeof a&&a!=a)return this._defaultValue;if(this._enumValues&&!(a in this._enumValues))throw new Se("Expected value to be one of ".concat(Object.keys(this._enumValues).map((function(e){return JSON.stringify(e)})).join(", "),", but found ").concat(JSON.stringify(a)," instead."));return a}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,"undefined"!=typeof console&&console.warn(e.message)),this._defaultValue}}}]),e}();function uo(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in Wt}function po(e,t){var o=new nt(Wt,[],t?function(e){var t={color:ne,string:te,number:ee,enum:te,boolean:oe,formatted:se,resolvedImage:le};if("array"===e.type)return ce(t[e.value]||re,e.length);return t[e.type]}(t):void 0),n=o.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?Zt(new co(n,t)):Kt(o.errors)}var ho=function(){function e(t,o){d(this,e),this.kind=t,this._styleExpression=o,this.isStateDependent="constant"!==t&&!et(o.expression)}return u(e,[{key:"evaluateWithoutErrorHandling",value:function(e,t,o,n,i,r){return this._styleExpression.evaluateWithoutErrorHandling(e,t,o,n,i,r)}},{key:"evaluate",value:function(e,t,o,n,i,r){return this._styleExpression.evaluate(e,t,o,n,i,r)}}]),e}(),go=function(){function e(t,o,n,i){d(this,e),this.kind=t,this.zoomStops=n,this._styleExpression=o,this.isStateDependent="camera"!==t&&!et(o.expression),this.interpolationType=i}return u(e,[{key:"evaluateWithoutErrorHandling",value:function(e,t,o,n,i,r){return this._styleExpression.evaluateWithoutErrorHandling(e,t,o,n,i,r)}},{key:"evaluate",value:function(e,t,o,n,i,r){return this._styleExpression.evaluate(e,t,o,n,i,r)}},{key:"interpolationFactor",value:function(e,t,o){return this.interpolationType?_t.interpolationFactor(this.interpolationType,e,t,o):0}}]),e}();function mo(e,t){if("error"===(e=po(e,t)).result)return e;var o=e.value.expression,n=$e(o);if(!n&&!Xt(t))return Kt([new X("","data expressions not supported")]);var i=tt(o,["zoom"]);if(!i&&!Qt(t))return Kt([new X("","zoom expressions not supported")]);var r=function e(t){var o=null;if(t instanceof Mt)o=e(t.result);else if(t instanceof St){var n,i=A(t.args);try{for(i.s();!(n=i.n()).done;){var r=n.value;if(o=e(r))break}}catch(e){i.e(e)}finally{i.f()}}else(t instanceof rt||t instanceof _t)&&t.input instanceof Le&&"zoom"===t.input.name&&(o=t);if(o instanceof X)return o;return t.eachChild((function(t){var n=e(t);n instanceof X?o=n:!o&&n?o=new X("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):o&&n&&o!==n&&(o=new X("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),o}(o);if(!r&&!i)return Kt([new X("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(r instanceof X)return Kt([r]);if(r instanceof _t&&!$t(t))return Kt([new X("",'"interpolate" expressions cannot be used with this property')]);if(!r)return Zt(new ho(n?"constant":"source",e.value));var a=r instanceof _t?r.interpolation:void 0;return Zt(new go(n?"camera":"composite",e.value,r.labels,a))}var fo=function(){function e(t,o){d(this,e),this._parameters=t,this._specification=o,K(this,no(this._parameters,this._specification))}return u(e,null,[{key:"deserialize",value:function(t){return new e(t._parameters,t._specification)}},{key:"serialize",value:function(e){return{_parameters:e._parameters,_specification:e._specification}}}]),e}();function yo(e){return"object"===I(e)?["literal",e]:e}function Ao(e,t){var o=e.stops;if(!o)return function(e,t){var o=["get",e.property];if(void 0===e.default)return"string"===t.type?["string",o]:o;if("enum"===t.type)return["match",o,Object.keys(t.values),o,e.default];var n=["color"===t.type?"to-color":t.type,o,yo(e.default)];return"array"===t.type&&n.splice(1,0,t.value,t.length||null),n}(e,t);var n=o&&"object"===I(o[0][0]),i=n||void 0!==e.property,r=n||!i;return o=o.map((function(e){return!i&&t.tokens&&"string"==typeof e[1]?[e[0],Eo(e[1])]:[e[0],yo(e[1])]})),n?function(e,t,o){for(var n={},i={},r=[],a=0;a3&&void 0!==arguments[3]?arguments[3]:["zoom"],r=_o(e,t),a=!1;if("interval"===r)n=["step",i],a=!0;else{if("exponential"!==r)throw new Error('Unknown zoom function type "'.concat(r,'"'));var s=void 0!==e.base?e.base:1;n=[vo(e),1===s?["linear"]:["exponential",s],i]}var l,c=A(o);try{for(c.s();!(l=c.n()).done;){var u=l.value;wo(n,u[0],u[1],a)}}catch(e){c.e(e)}finally{c.f()}return bo(n),n}(e,t,o):Io(e,t,o)}function vo(e){switch(e.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function Co(e,t){var o,n,i=yo((o=e.default,n=t.default,void 0!==o?o:void 0!==n?n:void 0));return void 0===i&&"resolvedImage"===t.type?"":i}function Io(e,t,o){var n=_o(e,t),i=["get",e.property];if("categorical"===n&&"boolean"==typeof o[0][0]){var r,a=["case"],s=A(o);try{for(s.s();!(r=s.n()).done;){var l=r.value;a.push(["==",i,l[0]],l[1])}}catch(e){s.e(e)}finally{s.f()}return a.push(Co(e,t)),a}if("categorical"===n){var c,u=["match",i],d=A(o);try{for(d.s();!(c=d.n()).done;){var p=c.value;wo(u,p[0],p[1],!1)}}catch(e){d.e(e)}finally{d.f()}return u.push(Co(e,t)),u}if("interval"===n){var h,g=["step",["number",i]],m=A(o);try{for(m.s();!(h=m.n()).done;){var f=h.value;wo(g,f[0],f[1],!0)}}catch(e){m.e(e)}finally{m.f()}return bo(g),void 0===e.default?g:["case",["==",["typeof",i],"number"],g,yo(e.default)]}if("exponential"===n){var y,v=void 0!==e.base?e.base:1,C=[vo(e),1===v?["linear"]:["exponential",v],["number",i]],I=A(o);try{for(I.s();!(y=I.n()).done;){var b=y.value;wo(C,b[0],b[1],!1)}}catch(e){I.e(e)}finally{I.f()}return void 0===e.default?C:["case",["==",["typeof",i],"number"],C,yo(e.default)]}throw new Error("Unknown property function type ".concat(n))}function bo(e){"step"===e[0]&&3===e.length&&(e.push(0),e.push(e[3]))}function wo(e,t,o,n){e.length>3&&t===e[e.length-2]||(n&&2===e.length||e.push(t),e.push(o))}function _o(e,t){return e.type?e.type:t.expression.interpolated?"exponential":"interval"}function Eo(e){for(var t=["concat"],o=/{([^{}]+)}/g,n=0,i=o.exec(e);null!==i;i=o.exec(e)){var r=e.slice(n,o.lastIndex-i[0].length);n=o.lastIndex,r.length>0&&t.push(r),t.push(["get",i[1]])}if(1===t.length)return e;if(n=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!=typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":var t,o=A(e.slice(1));try{for(o.s();!(t=o.n()).done;){var n=t.value;if(!So(n)&&"boolean"!=typeof n)return!1}}catch(e){o.e(e)}finally{o.f()}return!0;default:return!0}}var Mo={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Po(e){if(null==e)return{filter:function(){return!0},needGeometry:!1};So(e)||(e=ko(e));var t=po(e,Mo);if("error"===t.result)throw new Error(t.value.map((function(e){return"".concat(e.key,": ").concat(e.message)})).join(", "));return{filter:function(e,o,n){return t.value.evaluate(e,o,{},n)},needGeometry:function e(t){if(!Array.isArray(t))return!1;if("within"===t[0])return!0;for(var o=1;ot?1:0}function ko(e){if(!e)return!0;var t,o=e[0];return e.length<=1?"any"!==o:"=="===o?Go(e[1],e[2],"=="):"!="===o?Oo(Go(e[1],e[2],"==")):"<"===o||">"===o||"<="===o||">="===o?Go(e[1],e[2],o):"any"===o?(t=e.slice(1),["any"].concat(t.map(ko))):"all"===o?["all"].concat(e.slice(1).map(ko)):"none"===o?["all"].concat(e.slice(1).map(ko).map(Oo)):"in"===o?Ro(e[1],e.slice(2)):"!in"===o?Oo(Ro(e[1],e.slice(2))):"has"===o?To(e[1]):"!has"===o?Oo(To(e[1])):"within"!==o||e}function Go(e,t,o){switch(e){case"$type":return["filter-type-".concat(o),t];case"$id":return["filter-id-".concat(o),t];default:return["filter-".concat(o),e,t]}}function Ro(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((function(e){return I(e)!==I(t[0])}))?["filter-in-large",e,["literal",t.sort(xo)]]:["filter-in-small",e,["literal",t]]}}function To(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function Oo(e){return["!",e]}var Lo=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Do(e,t){var o={};for(var n in e)"ref"!==n&&(o[n]=e[n]);return Lo.forEach((function(e){e in t&&(o[e]=t[e])})),o}function jo(e){e=e.slice();for(var t=Object.create(null),o=0;os)return[new Uo(t,o,"".concat(o," is greater than the maximum value ").concat(s))]}return[]}function Ho(e){var t,o,n,i=e.valueSpec,r=Fo(e.value.type),a={},s="categorical"!==r&&void 0===e.value.property,l=!s,c="array"===eo(e.value.stops)&&"array"===eo(e.value.stops[0])&&"object"===eo(e.value.stops[0][0]),u=Vo({key:e.key,value:e.value,valueSpec:e.styleSpec.function,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(e){if("identity"===r)return[new Uo(e.key,e.value,'identity function may not have a "stops" property')];var t=[],o=e.value;t=t.concat(Wo({key:e.key,value:o,valueSpec:e.valueSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:d})),"array"===eo(o)&&0===o.length&&t.push(new Uo(e.key,o,"array must have at least one stop"));return t},default:function(e){return ln({key:e.key,value:e.value,valueSpec:i,style:e.style,styleSpec:e.styleSpec})}}});return"identity"===r&&s&&u.push(new Uo(e.key,e.value,'missing required property "property"')),"identity"===r||e.value.stops||u.push(new Uo(e.key,e.value,'missing required property "stops"')),"exponential"===r&&e.valueSpec.expression&&!$t(e.valueSpec)&&u.push(new Uo(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l&&!Xt(e.valueSpec)?u.push(new Uo(e.key,e.value,"property functions not supported")):s&&!Qt(e.valueSpec)&&u.push(new Uo(e.key,e.value,"zoom functions not supported"))),"categorical"!==r&&!c||void 0!==e.value.property||u.push(new Uo(e.key,e.value,'"property" property is required')),u;function d(e){var t=[],r=e.value,s=e.key;if("array"!==eo(r))return[new Uo(s,r,"array expected, ".concat(eo(r)," found"))];if(2!==r.length)return[new Uo(s,r,"array length 2 expected, length ".concat(r.length," found"))];if(c){if("object"!==eo(r[0]))return[new Uo(s,r,"object expected, ".concat(eo(r[0])," found"))];if(void 0===r[0].zoom)return[new Uo(s,r,"object stop key must have zoom")];if(void 0===r[0].value)return[new Uo(s,r,"object stop key must have value")];if(n&&n>Fo(r[0].zoom))return[new Uo(s,r[0].zoom,"stop zoom values must appear in ascending order")];Fo(r[0].zoom)!==n&&(n=Fo(r[0].zoom),o=void 0,a={}),t=t.concat(Vo({key:"".concat(s,"[0]"),value:r[0],valueSpec:{zoom:{}},style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:qo,value:p}}))}else t=t.concat(p({key:"".concat(s,"[0]"),value:r[0],valueSpec:{},style:e.style,styleSpec:e.styleSpec},r));return uo(zo(r[1]))?t.concat([new Uo("".concat(s,"[1]"),r[1],"expressions are not allowed in function stops.")]):t.concat(ln({key:"".concat(s,"[1]"),value:r[1],valueSpec:i,style:e.style,styleSpec:e.styleSpec}))}function p(e,n){var s=eo(e.value),l=Fo(e.value),c=null!==e.value?e.value:n;if(t){if(s!==t)return[new Uo(e.key,c,"".concat(s," stop domain type must match previous stop domain type ").concat(t))]}else t=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new Uo(e.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==r){var u="number expected, ".concat(s," found");return Xt(i)&&void 0===r&&(u+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Uo(e.key,c,u)]}return"categorical"!==r||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==r&&"number"===s&&void 0!==o&&l":case">=":o.length>=2&&"$type"===Fo(o[1])&&a.push(new Uo(n,o,'"$type" cannot be use with operator "'.concat(o[0],'"')));case"==":case"!=":3!==o.length&&a.push(new Uo(n,o,'filter array for operator "'.concat(o[0],'" must have 3 elements')));case"in":case"!in":o.length>=2&&"string"!==(i=eo(o[1]))&&a.push(new Uo("".concat(n,"[1]"),o[1],"string expected, ".concat(i," found")));for(var s=2;s1&&void 0!==arguments[1]?arguments[1]:b,o=[];return o=o.concat(ln({key:"",value:e,valueSpec:t.$root,styleSpec:t,style:e,objectElementValidators:{glyphs:cn,"*":function(){return[]}}})),e.constants&&(o=o.concat(Bo({key:"constants",value:e.constants,style:e,styleSpec:t}))),dn(o)}function dn(e){return[].concat(e).sort((function(e,t){return e.line-t.line}))}function pn(e){return function(){for(var t=arguments.length,o=new Array(t),n=0;nc&&E.push("'"+this.terminals_[b]+"'");M=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[A]||A)+"'":"Parse error on line "+(s+1)+": Unexpected "+(A==u?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(M,{text:p.match,token:this.terminals_[A]||A,line:p.yylineno,loc:m,expected:E})}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+A);switch(C[0]){case 1:o.push(A),n.push(p.yytext),i.push(p.yylloc),o.push(C[1]),A=null,l=p.yyleng,a=p.yytext,s=p.yylineno,m=p.yylloc;break;case 2:if(w=this.productions_[C[1]][1],S.$=n[n.length-w],S._$={first_line:i[i.length-(w||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(w||1)].first_column,last_column:i[i.length-1].last_column},f&&(S._$.range=[i[i.length-(w||1)].range[0],i[i.length-1].range[1]]),void 0!==(I=this.performAction.apply(S,[a,l,s,h.yy,C[1],n,i].concat(d))))return I;w&&(o=o.slice(0,-1*w*2),n=n.slice(0,-1*w),i=i.slice(0,-1*w)),o.push(this.productions_[C[1]][0]),n.push(S.$),i.push(S._$),_=r[o[o.length-2]][o[o.length-1]],o.push(_);break;case 3:return!0}}return!0}},p={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,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 e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.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),e},unput:function(e){var t=e.length,o=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var n=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),o.length-1&&(this.yylineno-=o.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:o?(o.length===n.length?this.yylloc.first_column:0)+n[n.length-o.length].length-o[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),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(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var o,n,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))),(n=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],o=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var r in i)this[r]=i[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,o,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),r=0;rt[0].length)){if(t=o,n=r,this.options.backtrack_lexer){if(!1!==(e=this.test_match(o,i[r])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===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 e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},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(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,o,n){switch(o){case 0:break;case 1:return 6;case 2:return t.yytext=t.yytext.substr(1,t.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 h(){this.yy={}}return d.lexer=p,h.prototype=d,d.Parser=h,new h}();void 0!==E&&(t.parser=o,t.Parser=o.Parser,t.parse=function(){return o.parse.apply(o,arguments)})}));function gn(e){if(e instanceof String||"string"==typeof e||e instanceof n)try{return hn.parse(e.toString())}catch(e){throw new No(e)}return e}function mn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b,o=e;try{o=gn(o)}catch(e){return[e]}return un(o,t)}new Set(["vector","raster","raster-dem"]);var fn={StyleExpression:co,isExpression:uo,isExpressionFilter:So,createExpression:po,createPropertyExpression:mo,normalizePropertyExpression:function(e,t){if(to(e))return new fo(e,t);if(uo(e)){var o=mo(e,t);if("error"===o.result)throw new Error(o.value.map((function(e){return"".concat(e.key,": ").concat(e.message)})).join(", "));return o.value}var n=e;return"string"==typeof e&&"color"===t.type&&(n=fe.parse(e)),{kind:"constant",evaluate:function(){return n}}},ZoomConstantExpression:ho,ZoomDependentExpression:go,StylePropertyFunction:fo},yn={convertFunction:Ao,createFunction:no,isFunction:to};mn.parsed=mn,mn.latest=mn}).call(this,o(28),o(99).Buffer)},function(e){e.exports=JSON.parse('{"name":"geoportal-extensions","description":"French Geoportal Extensions for OpenLayers, Leaflet and iTowns libraries","version":"2.8.5","date":"28/08/2023","leafletExtName":"French Geoportal Extension for Leaflet","leafletExtVersion":"2.3.3","olExtName":"French Geoportal Extension for OpenLayers","olExtVersion":"3.3.4","itownsExtName":"French Geoportal Extension for Itowns","itownsExtVersion":"2.4.3","main":"dist/leaflet/GpPluginLeaflet.js, dist/openlayers/GpPluginOpenLayers.js, dist/itowns/GpPluginItowns.js","types":"dist/leaflet/index.d.ts, dist/openlayers/index.d.ts, dist/itowns/index.d.ts","module":"src/Leaflet/index.js, src/OpenLayers/index.js, src/Itowns/index.js","directories":{},"scripts":{"setup":"npm install","clean":"echo \\"Warning: target not yet implemented!\\" && exit 0","eslint":"eslint src/","test":"npm run test:serve","test:serve":"cd test && webpack-dev-server --hot --config webpack.test.serve.js","sample":"npm run sample:serve","sample:serve":"npm run sample:ol:serve","sample:itowns:serve":"webpack-dev-server --config build/webpack/webpack.config.itowns --mode=development --https --open-page samples/index-itowns-map.html --content-base . --output-public-path \'/dist/itowns/\' --port 9001 --open","sample:leaflet:serve":"webpack-dev-server --config build/webpack/webpack.config.leaflet --mode=development --https --open-page samples/index-leaflet-map.html --content-base . --output-public-path \'/dist/leaflet/\' --port 9001 --open","sample:ol:serve":"webpack-dev-server --config build/webpack/webpack.config.openlayers --mode=development --https --open-page samples/index-openlayers-map.html --content-base . --output-public-path \'/dist/openlayers/\' --port 9001 --open","generate-types:ol":"npx tsc -p build/types/tsconfig-openlayers.json","generate-types:leaflet":"npx tsc -p build/types/tsconfig-leaflet.json","generate-types:itowns":"npx tsc -p build/types/tsconfig-itowns.json","generate-jsdoc:ol":"jsdoc -c build/jsdoc/jsdoc-openlayers.json","generate-jsdoc:leaflet":"jsdoc -c build/jsdoc/jsdoc-leaflet.json","generate-jsdoc:itowns":"jsdoc -c build/jsdoc/jsdoc-itowns.json","doc":"npm run doc:serve","doc:serve":"npm run doc:ol:serve","doc:itowns:serve":"webpack-dev-server --hot --config build/webpack/webpack.config.itowns --content-base jsdoc/itowns --port 9001 --open","doc:leaflet:serve":"webpack-dev-server --hot --config build/webpack/webpack.config.leaflet --content-base jsdoc/leaflet --port 9001 --open","doc:ol:serve":"webpack-dev-server --hot --config build/webpack/webpack.config.openlayers --content-base jsdoc/openlayers --port 9001 --open","build:dev":"npm-run-all --print-label --print-name build:*:dev","build:prod":"npm-run-all --print-label --print-name build:*:prod","build:src":"npm-run-all --print-label --print-name build:*:src","build":"npm-run-all --print-label --print-name build:*:*","build:itowns":"npm-run-all --print-label --print-name build:itowns:*","build:itowns:dev":"webpack --config build/webpack/webpack.config.itowns --mode=development","build:itowns:prod":"webpack --config build/webpack/webpack.config.itowns --mode=production","build:itowns:src":"webpack --config build/webpack/webpack.config.itowns --mode=none","build:ol":"npm-run-all --print-label --print-name build:ol:*","build:ol:dev":"webpack --config build/webpack/webpack.config.openlayers --mode=development","build:ol:prod":"webpack --config build/webpack/webpack.config.openlayers --mode=production","build:ol:src":"webpack --config build/webpack/webpack.config.openlayers --mode=none","build:leaflet":"npm-run-all --print-label --print-name build:leaflet:*","build:leaflet:dev":"webpack --config build/webpack/webpack.config.leaflet --mode=development","build:leaflet:prod":"webpack --config build/webpack/webpack.config.leaflet --mode=production","build:leaflet:src":"webpack --config build/webpack/webpack.config.leaflet --mode=none"},"repository":{"type":"git","url":"https://github.com/IGNF/geoportal-extensions.git"},"author":"IGNF","keywords":["geoportail","javascript","OpenLayers","Leaflet","Itowns","3D"],"license":"CECILL-B","bugs":{"url":"https://github.com/IGNF/geoportal-extensions/issues"},"homepage":"https://github.com/IGNF/geoportal-extensions#readme","dependencies":{"@mapbox/mapbox-gl-style-spec":"13.20.1","eventbusjs":"0.2.0","geoportal-access-lib":"3.3.3","itowns":"2.38.2","leaflet":"1.7.1","leaflet-draw":"1.0.4","loglevel":"^1.6.7","markdown-toc":"^1.2.0","ol":"6.9.0","ol-mapbox-style":"6.7.0","proj4":"2.7.5","proj4leaflet":"1.0.2","sortablejs":"1.14.0","three":"0.137.5","typescript":"^4.5.5","whatwg-fetch":"3.0.0"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-transform-template-literals":"^7.7.4","@babel/preset-env":"^7.4.4","babel-loader":"^8.0.5","chai":"^4.2.0","chalk":"^4.0.0","clean-webpack-plugin":"^3.0.0","copy-webpack-plugin":"^5.0.3","core-js":"^3.6.4","css-loader":"^3.4.2","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-loader":"^4.0.0","eslint-plugin-import":"^2.17.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.1.1","eslint-plugin-standard":"^4.0.0","exports-loader":"^0.7.0","expose-loader":"^0.7.5","fs-extra":"^9.0.0","handlebars":"^4.7.5","handlebars-layouts":"^3.1.4","html-webpack-plugin":"^4.0.4","jsdoc-webpack-plugin":"^0.3.0","mini-css-extract-plugin":"^0.9.0","mocha":"^7.1.1","mocha-loader":"^5.0.0","npm-run-all":"^4.1.5","optimize-css-assets-webpack-plugin":"^5.0.1","path":"^0.12.7","replace-bundle-webpack-plugin":"^1.0.0","requirejs":"^2.3.6","responsive-loader":"^1.2.0","speed-measure-webpack-plugin":"^1.3.0","string-template":"^1.0.0","style-loader":"^1.1.3","terser-webpack-plugin":"^2.0.0","url-loader":"^4.0.0","webpack":"^4.30.0","webpack-cli":"^3.3.1","webpack-dev-server":"^3.3.1","webpack-node-externals":"^1.7.2"}}')},function(e,t,o){var n,i;!function(r,a){"use strict";void 0===(i="function"==typeof(n=function(){var e=function(){},t="undefined"!=typeof window&&void 0!==window.navigator&&/Trident\/|MSIE /.test(window.navigator.userAgent),o=["trace","debug","info","warn","error"];function n(e,t){var o=e[t];if("function"==typeof o.bind)return o.bind(e);try{return Function.prototype.bind.call(o,e)}catch(t){return function(){return Function.prototype.apply.apply(o,[e,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function r(o){return"debug"===o&&(o="log"),"undefined"!=typeof console&&("trace"===o&&t?i:void 0!==console[o]?n(console,o):void 0!==console.log?n(console,"log"):e)}function a(t,n){for(var i=0;i=0&&t<=r.levels.SILENT))throw"log.setLevel() called with invalid level: "+t;if(i=t,!1!==n&&function(e){var t=(o[e]||"silent").toUpperCase();if("undefined"!=typeof window&&s){try{return void(window.localStorage[s]=t)}catch(e){}try{window.document.cookie=encodeURIComponent(s)+"="+t+";"}catch(e){}}}(t),a.call(r,t,e),"undefined"==typeof console&&t1?p[p.length-2].toLowerCase():"";if(h==g||h==g.replace("-","")||m+"-"+h==g){s=o[g],p.pop(),m&&g.startsWith(m)&&p.pop();break}}"number"==typeof h&&(s=h);var f=p.join(" ").replace("Klokantech Noto Sans","Noto Sans");-1!==f.indexOf(" ")&&(f='"'+f+'"'),c.push(f)}a=i[e]=[l,s,c]}return a[0]+" "+a[1]+" "+t+"px"+(r?"/"+r:"")+" "+a[2]}},function(e,t){e.exports=ol.Map},function(e,t){e.exports=ol.tilegrid.TileGrid},function(e,t){e.exports=ol.render.canvas},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t){e.exports=void 0},function(e,t){e.exports=ol.source.ImageWMS},function(e,t,o){(function(t,o){ +/*! https://mths.be/punycode v1.3.2 by @mathias */var S=_((function(e,t){!function(o){var n=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,r="object"==I(w)&&w;r.global!==r&&r.window!==r&&r.self!==r||(o=r);var a,s,l=2147483647,c=/^xn--/,u=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,g=String.fromCharCode;function m(e){throw RangeError(p[e])}function f(e,t){for(var o=e.length,n=[];o--;)n[o]=t(e[o]);return n}function y(e,t){var o=e.split("@"),n="";return o.length>1&&(n=o[0]+"@",e=o[1]),n+f((e=e.replace(d,".")).split("."),t).join(".")}function A(e){for(var t,o,n=[],i=0,r=e.length;i=55296&&t<=56319&&i65535&&(t+=g((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=g(e)})).join("")}function C(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function b(e,t,o){var n=0;for(e=o?h(e/700):e>>1,e+=h(e/t);e>455;n+=36)e=h(e/35);return h(n+36*e/(e+38))}function _(e){var t,o,n,i,r,a,s,c,u,d,p,g=[],f=e.length,y=0,A=128,C=72;for((o=e.lastIndexOf("-"))<0&&(o=0),n=0;n=128&&m("not-basic"),g.push(e.charCodeAt(n));for(i=o>0?o+1:0;i=f&&m("invalid-input"),((c=(p=e.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:36)>=36||c>h((l-y)/a))&&m("overflow"),y+=c*a,!(c<(u=s<=C?1:s>=C+26?26:s-C));s+=36)a>h(l/(d=36-u))&&m("overflow"),a*=d;C=b(y-r,t=g.length+1,0==r),h(y/t)>l-A&&m("overflow"),A+=h(y/t),y%=t,g.splice(y++,0,A)}return v(g)}function E(e){var t,o,n,i,r,a,s,c,u,d,p,f,y,v,I,w=[];for(f=(e=A(e)).length,t=128,o=0,r=72,a=0;a=t&&ph((l-o)/(y=n+1))&&m("overflow"),o+=(s-t)*y,t=s,a=0;al&&m("overflow"),p==t){for(c=o,u=36;!(c<(d=u<=r?1:u>=r+26?26:u-r));u+=36)I=c-d,v=36-d,w.push(g(C(d+I%v,0))),c=h(I/v);w.push(g(C(c,0))),r=b(o,y,n==i),o=0,++n}++o,++t}return w.join("")}if(a={version:"1.3.2",ucs2:{decode:A,encode:v},decode:_,encode:E,toASCII:function(e){return y(e,(function(e){return u.test(e)?"xn--"+E(e):e}))},toUnicode:function(e){return y(e,(function(e){return c.test(e)?_(e.slice(4).toLowerCase()):e}))}},n&&i)if(e.exports==n)i.exports=a;else for(s in a)a.hasOwnProperty(s)&&(n[s]=a[s]);else o.punycode=a}(w)})),M=function(e){return"string"==typeof e},P=function(e){return"object"===I(e)&&null!==e},x=function(e){return null===e},k=function(e){return null==e};function G(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var R=function(e,t,o,n){t=t||"&",o=o||"=";var i={};if("string"!=typeof e||0===e.length)return i;var r=/\+/g;e=e.split(t);var a=1e3;n&&"number"==typeof n.maxKeys&&(a=n.maxKeys);var s=e.length;a>0&&s>a&&(s=a);for(var l=0;l=0?(c=h.substr(0,g),u=h.substr(g+1)):(c=h,u=""),d=decodeURIComponent(c),p=decodeURIComponent(u),G(i,d)?Array.isArray(i[d])?i[d].push(p):i[d]=[i[d],p]:i[d]=p}return i},T=function(e){switch(I(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},O=function(e,t,o,n){return t=t||"&",o=o||"=",null===e&&(e=void 0),"object"===I(e)?Object.keys(e).map((function(n){var i=encodeURIComponent(T(n))+o;return Array.isArray(e[n])?e[n].map((function(e){return i+encodeURIComponent(T(e))})).join(t):i+encodeURIComponent(T(e[n]))})).join(t):n?encodeURIComponent(T(n))+o+encodeURIComponent(T(e)):""},L=_((function(e,t){t.decode=t.parse=R,t.encode=t.stringify=O}));function D(){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 j=/^([a-z0-9.+-]+:)/i,N=/:[0-9]*$/,U=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,B=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),F=["'"].concat(B),z=["%","/","?",";","#"].concat(F),V=["/","?","#"],W=/^[+a-z0-9A-Z_-]{0,63}$/,q=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,H={javascript:!0,"javascript:":!0},Y={javascript:!0,"javascript:":!0},J={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Z(e,t,o){if(e&&P(e)&&e instanceof D)return e;var n=new D;return n.parse(e,t,o),n}D.prototype.parse=function(e,t,o){if(!M(e))throw new TypeError("Parameter 'url' must be a string, not "+I(e));var n=e.indexOf("?"),i=-1!==n&&n127?C+="x":C+=v[b];if(!C.match(W)){var _=y.slice(0,g),E=y.slice(g+1),P=v.match(q);P&&(_.push(P[1]),E.unshift(P[2])),E.length&&(a="/"+E.join(".")+a),this.hostname=_.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),f||(this.hostname=S.toASCII(this.hostname));var x=this.port?":"+this.port:"",k=this.hostname||"";this.host=k+x,this.href+=this.host,f&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!H[c])for(g=0,A=F.length;g0)&&o.host.split("@"))&&(o.auth=E.shift(),o.host=o.hostname=E.shift());return o.search=e.search,o.query=e.query,x(o.pathname)&&x(o.search)||(o.path=(o.pathname?o.pathname:"")+(o.search?o.search:"")),o.href=o.format(),o}if(!v.length)return o.pathname=null,o.search?o.path="/"+o.search:o.path=null,o.href=o.format(),o;for(var I=v.slice(-1)[0],b=(o.host||e.host||v.length>1)&&("."===I||".."===I)||""===I,w=0,_=v.length;_>=0;_--)"."===(I=v[_])?v.splice(_,1):".."===I?(v.splice(_,1),w++):w&&(v.splice(_,1),w--);if(!y&&!A)for(;w--;w)v.unshift("..");!y||""===v[0]||v[0]&&"/"===v[0].charAt(0)||v.unshift(""),b&&"/"!==v.join("/").substr(-1)&&v.push("");var E,S=""===v[0]||v[0]&&"/"===v[0].charAt(0);C&&(o.hostname=o.host=S?"":v.length?v.shift():"",(E=!!(o.host&&o.host.indexOf("@")>0)&&o.host.split("@"))&&(o.auth=E.shift(),o.host=o.hostname=E.shift()));return(y=y||o.host&&v.length)&&!S&&v.unshift(""),v.length?o.pathname=v.join("/"):(o.pathname=null,o.path=null),x(o.pathname)&&x(o.search)||(o.path=(o.pathname?o.pathname:"")+(o.search?o.search:"")),o.auth=e.auth||o.auth,o.slashes=o.slashes||e.slashes,o.href=o.format(),o},D.prototype.parseHost=function(){var e=this.host,t=N.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};function K(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),n=1;n1&&void 0!==arguments[1]?arguments[1]:[];d(this,e),this.parent=t,this.bindings={};var n,i=A(o);try{for(i.s();!(n=i.n()).done;){var r=a(n.value,2),s=r[0],l=r[1];this.bindings[s]=l}}catch(e){i.e(e)}finally{i.f()}}return u(e,[{key:"concat",value:function(t){return new e(this,t)}},{key:"get",value:function(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error("".concat(e," not found in scope."))}},{key:"has",value:function(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)}}]),e}(),$={kind:"null"},ee={kind:"number"},te={kind:"string"},oe={kind:"boolean"},ne={kind:"color"},ie={kind:"object"},re={kind:"value"},ae={kind:"collator"},se={kind:"formatted"},le={kind:"resolvedImage"};function ce(e,t){return{kind:"array",itemType:e,N:t}}function ue(e){if("array"===e.kind){var t=ue(e.itemType);return"number"==typeof e.N?"array<".concat(t,", ").concat(e.N,">"):"value"===e.itemType.kind?"array":"array<".concat(t,">")}return e.kind}var de=[$,ee,te,oe,ne,se,ie,ce(re),le];function pe(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!pe(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(var o=0,n=de;o255?255:e}function i(e){return e<0?0:e>1?1:e}function r(e){return"%"===e[e.length-1]?n(parseFloat(e)/100*255):n(parseInt(e))}function a(e){return"%"===e[e.length-1]?i(parseFloat(e)/100):i(parseFloat(e))}function s(e,t,o){return o<0?o+=1:o>1&&(o-=1),6*o<1?e+(t-e)*o*6:2*o<1?t:3*o<2?e+(t-e)*(2/3-o)*6:e}try{t.parseCSSColor=function(e){var t,i=e.replace(/ /g,"").toLowerCase();if(i in o)return o[i].slice();if("#"===i[0])return 4===i.length?(t=parseInt(i.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===i.length&&(t=parseInt(i.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var l=i.indexOf("("),c=i.indexOf(")");if(-1!==l&&c+1===i.length){var u=i.substr(0,l),d=i.substr(l+1,c-(l+1)).split(","),p=1;switch(u){case"rgba":if(4!==d.length)return null;p=a(d.pop());case"rgb":return 3!==d.length?null:[r(d[0]),r(d[1]),r(d[2]),p];case"hsla":if(4!==d.length)return null;p=a(d.pop());case"hsl":if(3!==d.length)return null;var h=(parseFloat(d[0])%360+360)%360/360,g=a(d[1]),m=a(d[2]),f=m<=.5?m*(g+1):m+g-m*g,y=2*m-f;return[n(255*s(y,f,h+1/3)),n(255*s(y,f,h)),n(255*s(y,f,h-1/3)),p];default:return null}}return null}}catch(e){}})),fe=function(){function e(t,o,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;d(this,e),this.r=t,this.g=o,this.b=n,this.a=i}return u(e,[{key:"toString",value:function(){var e=a(this.toArray(),4),t=e[0],o=e[1],n=e[2],i=e[3];return"rgba(".concat(Math.round(t),",").concat(Math.round(o),",").concat(Math.round(n),",").concat(i,")")}},{key:"toArray",value:function(){var e=this.r,t=this.g,o=this.b,n=this.a;return 0===n?[0,0,0,0]:[255*e/n,255*t/n,255*o/n,n]}}],[{key:"parse",value:function(t){if(t){if(t instanceof e)return t;if("string"==typeof t){var o=me.parseCSSColor(t);if(o)return new e(o[0]/255*o[3],o[1]/255*o[3],o[2]/255*o[3],o[3])}}}}]),e}();fe.black=new fe(0,0,0,1),fe.white=new fe(1,1,1,1),fe.transparent=new fe(0,0,0,0),fe.red=new fe(1,0,0,1),fe.blue=new fe(0,0,1,1);var ye=function(){function e(t,o,n){d(this,e),this.sensitivity=t?o?"variant":"case":o?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}return u(e,[{key:"compare",value:function(e,t){return this.collator.compare(e,t)}},{key:"resolvedLocale",value:function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}]),e}(),Ae=u((function e(t,o,n,i,r){d(this,e),this.text=t,this.image=o,this.scale=n,this.fontStack=i,this.textColor=r})),ve=function(){function e(t){d(this,e),this.sections=t}return u(e,[{key:"isEmpty",value:function(){return 0===this.sections.length||!this.sections.some((function(e){return 0!==e.text.length||e.image&&0!==e.image.name.length}))}},{key:"toString",value:function(){return 0===this.sections.length?"":this.sections.map((function(e){return e.text})).join("")}},{key:"serialize",value:function(){var e,t=["format"],o=A(this.sections);try{for(o.s();!(e=o.n()).done;){var n=e.value;if(n.image)t.push(["image",n.image.name]);else{t.push(n.text);var i={};n.fontStack&&(i["text-font"]=["literal",n.fontStack.split(",")]),n.scale&&(i["font-scale"]=n.scale),n.textColor&&(i["text-color"]=["rgba"].concat(n.textColor.toArray())),t.push(i)}}}catch(e){o.e(e)}finally{o.f()}return t}}],[{key:"fromString",value:function(t){return new e([new Ae(t,null,null,null,null)])}},{key:"factory",value:function(t){return t instanceof e?t:e.fromString(t)}}]),e}(),Ce=function(){function e(t){d(this,e),this.name=t.name,this.available=t.available}return u(e,[{key:"toString",value:function(){return this.name}},{key:"serialize",value:function(){return["image",this.name]}}],[{key:"fromString",value:function(t){return t?new e({name:t,available:!1}):null}}]),e}();function Ie(e,t,o,n){return"number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof o&&o>=0&&o<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value [".concat([e,t,o,n].join(", "),"]: 'a' must be between 0 and 1."):"Invalid rgba value [".concat(("number"==typeof n?[e,t,o,n]:[e,t,o]).join(", "),"]: 'r', 'g', and 'b' must be between 0 and 255.")}function be(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof fe)return!0;if(e instanceof ye)return!0;if(e instanceof ve)return!0;if(e instanceof Ce)return!0;if(Array.isArray(e)){var t,o=A(e);try{for(o.s();!(t=o.n()).done;){if(!be(t.value))return!1}}catch(e){o.e(e)}finally{o.f()}return!0}if("object"===I(e)){for(var n in e)if(!be(e[n]))return!1;return!0}return!1}function we(e){if(null===e)return $;if("string"==typeof e)return te;if("boolean"==typeof e)return oe;if("number"==typeof e)return ee;if(e instanceof fe)return ne;if(e instanceof ye)return ae;if(e instanceof ve)return se;if(e instanceof Ce)return le;if(Array.isArray(e)){var t,o,n=e.length,i=A(e);try{for(i.s();!(o=i.n()).done;){var r=we(o.value);if(t){if(t===r)continue;t=re;break}t=r}}catch(e){i.e(e)}finally{i.f()}return ce(t||re,n)}return ie}function _e(e){var t=I(e);return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof fe||e instanceof ve||e instanceof Ce?e.toString():JSON.stringify(e)}var Ee=function(){function e(t,o){d(this,e),this.type=t,this.value=o}return u(e,[{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 fe?["rgba"].concat(this.value.toArray()):this.value instanceof ve?this.value.serialize():this.value}}],[{key:"parse",value:function(t,o){if(2!==t.length)return o.error("'literal' expression requires exactly one argument, but found ".concat(t.length-1," instead."));if(!be(t[1]))return o.error("invalid value");var n=t[1],i=we(n),r=o.expectedType;return"array"!==i.kind||0!==i.N||!r||"array"!==r.kind||"number"==typeof r.N&&0!==r.N||(i=r),new e(i,n)}}]),e}(),Se=function(){function e(t){d(this,e),this.name="ExpressionEvaluationError",this.message=t}return u(e,[{key:"toJSON",value:function(){return this.message}}]),e}(),Me={string:te,number:ee,boolean:oe,object:ie},Pe=function(){function e(t,o){d(this,e),this.type=t,this.args=o}return u(e,[{key:"evaluate",value:function(e){for(var t=0;t1)&&t.push(n)}}return t.concat(this.args.map((function(e){return e.serialize()})))}}],[{key:"parse",value:function(t,o){if(t.length<2)return o.error("Expected at least one argument.");var n,i=1,r=t[0];if("array"===r){var a,s;if(t.length>2){var l=t[1];if("string"!=typeof l||!(l in Me)||"object"===l)return o.error('The item type argument of "array" must be one of string, number, boolean',1);a=Me[l],i++}else a=re;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return o.error('The length argument to "array" must be a positive integer literal',2);s=t[2],i++}n=ce(a,s)}else n=Me[r];for(var c=[];i-1),o}},{key:"eachChild",value:function(e){e(this.input)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){return["image",this.input.serialize()]}}],[{key:"parse",value:function(t,o){if(2!==t.length)return o.error("Expected two arguments.");var n=o.parse(t[1],1,te);return n?new e(n):o.error("No image name provided.")}}]),e}(),Ge={"to-boolean":oe,"to-color":ne,"to-number":ee,"to-string":te},Re=function(){function e(t,o){d(this,e),this.type=t,this.args=o}return u(e,[{key:"evaluate",value:function(e){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(e));if("color"===this.type.kind){var t,o,n,i=A(this.args);try{for(i.s();!(n=i.n()).done;){if(t=n.value.evaluate(e),o=null,t instanceof fe)return t;if("string"==typeof t){var r=e.parseColor(t);if(r)return r}else if(Array.isArray(t)&&!(o=t.length<3||t.length>4?"Invalid rbga value ".concat(JSON.stringify(t),": expected an array containing either three or four numeric values."):Ie(t[0],t[1],t[2],t[3])))return new fe(t[0]/255,t[1]/255,t[2]/255,t[3])}}catch(e){i.e(e)}finally{i.f()}throw new Se(o||"Could not parse color from value '".concat("string"==typeof t?t:String(JSON.stringify(t)),"'"))}if("number"===this.type.kind){var a,s=null,l=A(this.args);try{for(l.s();!(a=l.n()).done;){if(null===(s=a.value.evaluate(e)))return 0;var c=Number(s);if(!isNaN(c))return c}}catch(e){l.e(e)}finally{l.f()}throw new Se("Could not convert ".concat(JSON.stringify(s)," to number."))}return"formatted"===this.type.kind?ve.fromString(_e(this.args[0].evaluate(e))):"resolvedImage"===this.type.kind?Ce.fromString(_e(this.args[0].evaluate(e))):_e(this.args[0].evaluate(e))}},{key:"eachChild",value:function(e){this.args.forEach(e)}},{key:"outputDefined",value:function(){return this.args.every((function(e){return e.outputDefined()}))}},{key:"serialize",value:function(){if("formatted"===this.type.kind)return new xe([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new ke(this.args[0]).serialize();var e=["to-".concat(this.type.kind)];return this.eachChild((function(t){e.push(t.serialize())})),e}}],[{key:"parse",value:function(t,o){if(t.length<2)return o.error("Expected at least one argument.");var n=t[0];if(("to-boolean"===n||"to-string"===n)&&2!==t.length)return o.error("Expected one argument.");for(var i=Ge[n],r=[],a=1;a=t[2])&&(!(e[1]<=t[1])&&!(e[3]>=t[3])))}function Ue(e,t){var o,n=(180+e[0])/360,i=(o=e[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+o*Math.PI/360)))/360),r=Math.pow(2,t.z);return[Math.round(n*r*8192),Math.round(i*r*8192)]}function Be(e,t,o){return t[1]>e[1]!=o[1]>e[1]&&e[0]<(o[0]-t[0])*(e[1]-t[1])/(o[1]-t[1])+t[0]}function Fe(e,t){for(var o,n,i,r,a,s,l,c=!1,u=0,d=t.length;u0&&d<0||u<0&&d>0}function We(e,t,o){var n,i,r,a,s,l,c,u,d,p=A(o);try{for(p.s();!(n=p.n()).done;)for(var h=n.value,g=0;go[2]){var i=.5*n,r=e[0]-o[0]>i?-n:o[0]-e[0]>i?n:0;0===r&&(r=e[0]-o[2]>i?-n:o[2]-e[0]>i?n:0),e[0]+=r}je(t,e)}function Ke(e,t,o,n){var i,r=8192*Math.pow(2,n.z),a=[8192*n.x,8192*n.y],s=[],l=A(e);try{for(l.s();!(i=l.n()).done;){var c,u=A(i.value);try{for(u.s();!(c=u.n()).done;){var d=c.value,p=[d.x+a[0],d.y+a[1]];Ze(p,t,o,r),s.push(p)}}catch(e){u.e(e)}finally{u.f()}}}catch(e){l.e(e)}finally{l.f()}return s}function Xe(e,t,o,n){var i,r,a=8192*Math.pow(2,n.z),s=[8192*n.x,8192*n.y],l=[],c=A(e);try{for(c.s();!(i=c.n()).done;){var u,d=i.value,p=[],h=A(d);try{for(h.s();!(u=h.n()).done;){var g=u.value,m=[g.x+s[0],g.y+s[1]];je(t,m),p.push(m)}}catch(e){h.e(e)}finally{h.f()}l.push(p)}}catch(e){c.e(e)}finally{c.f()}if(t[2]-t[0]<=a/2){(r=t)[0]=r[1]=1/0,r[2]=r[3]=-1/0;var f,y=A(l);try{for(y.s();!(f=y.n()).done;){var v,C=A(f.value);try{for(C.s();!(v=C.n()).done;){Ze(v.value,t,o,a)}}catch(e){C.e(e)}finally{C.f()}}}catch(e){y.e(e)}finally{y.f()}}return l}var Qe=function(){function e(t,o){d(this,e),this.type=oe,this.geojson=t,this.geometries=o}return u(e,[{key:"evaluate",value:function(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return function(e,t){var o=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=e.canonicalID();if("Polygon"===t.type){var r=Ye(t.coordinates,n,i),a=Ke(e.geometry(),o,n,i);if(!Ne(o,n))return!1;var s,l=A(a);try{for(l.s();!(s=l.n()).done;){if(!Fe(s.value,r))return!1}}catch(e){l.e(e)}finally{l.f()}}if("MultiPolygon"===t.type){var c=Je(t.coordinates,n,i),u=Ke(e.geometry(),o,n,i);if(!Ne(o,n))return!1;var d,p=A(u);try{for(p.s();!(d=p.n()).done;){if(!ze(d.value,c))return!1}}catch(e){p.e(e)}finally{p.f()}}return!0}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){var o=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=e.canonicalID();if("Polygon"===t.type){var r=Ye(t.coordinates,n,i),a=Xe(e.geometry(),o,n,i);if(!Ne(o,n))return!1;var s,l=A(a);try{for(l.s();!(s=l.n()).done;){if(!qe(s.value,r))return!1}}catch(e){l.e(e)}finally{l.f()}}if("MultiPolygon"===t.type){var c=Je(t.coordinates,n,i),u=Xe(e.geometry(),o,n,i);if(!Ne(o,n))return!1;var d,p=A(u);try{for(p.s();!(d=p.n()).done;){if(!He(d.value,c))return!1}}catch(e){p.e(e)}finally{p.f()}}return!0}(e,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(t,o){if(2!==t.length)return o.error("'within' expression requires exactly one argument, but found ".concat(t.length-1," instead."));if(be(t[1])){var n=t[1];if("FeatureCollection"===n.type)for(var i=0;i=0)return!1;var o=!0;return e.eachChild((function(e){o&&!tt(e,t)&&(o=!1)})),o}var ot=function(){function e(t,o){d(this,e),this.type=o.type,this.name=t,this.boundExpression=o}return u(e,[{key:"evaluate",value:function(e){return this.boundExpression.evaluate(e)}},{key:"eachChild",value:function(){}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){return["var",this.name]}}],[{key:"parse",value:function(t,o){if(2!==t.length||"string"!=typeof t[1])return o.error("'var' expression requires exactly one string literal argument.");var n=t[1];return o.scope.has(n)?new e(n,o.scope.get(n)):o.error('Unknown variable "'.concat(n,'". Make sure "').concat(n,'" has been bound in an enclosing "let" expression before using it.'),1)}}]),e}(),nt=function(){function e(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Q,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];d(this,e),this.registry=t,this.path=o,this.key=o.map((function(e){return"[".concat(e,"]")})).join(""),this.scope=i,this.errors=r,this.expectedType=n}return u(e,[{key:"parse",value:function(e,t,o,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return t?this.concat(t,o,n)._parse(e,i):this._parse(e,i)}},{key:"_parse",value:function(e,t){function o(e,t,o){return"assert"===o?new Pe(t,[e]):"coerce"===o?new Re(t,[e]):e}if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=e[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found ".concat(I(n),' instead. If you wanted a literal array, use ["literal", [...]].'),0),null;var i=this.registry[n];if(i){var r=i.parse(e,this);if(!r)return null;if(this.expectedType){var a=this.expectedType,s=r.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else r=o(r,a,t.typeAnnotation||"coerce");else r=o(r,a,t.typeAnnotation||"assert")}if(!(r instanceof Ee)&&"resolvedImage"!==r.type.kind&&function e(t){if(t instanceof ot)return e(t.boundExpression);if(t instanceof Le&&"error"===t.name)return!1;if(t instanceof De)return!1;if(t instanceof Qe)return!1;var o=t instanceof Re||t instanceof Pe,n=!0;if(t.eachChild((function(t){n=o?n&&e(t):n&&t instanceof Ee})),!n)return!1;return $e(t)&&tt(t,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script"])}(r)){var l=new Oe;try{r=new Ee(r.type,r.evaluate(l))}catch(e){return this.error(e.message),null}}return r}return this.error('Unknown expression "'.concat(n,'". If you wanted a literal array, use ["literal", [...]].'),0)}return void 0===e?this.error("'undefined' value invalid. Use null instead."):"object"===I(e)?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found ".concat(I(e)," instead."))}},{key:"concat",value:function(t,o,n){var i="number"==typeof t?this.path.concat(t):this.path,r=n?this.scope.concat(n):this.scope;return new e(this.registry,i,o||null,r,this.errors)}},{key:"error",value:function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),n=1;nt))throw new Se("Input is not a number.");a=s-1}return 0}var rt=function(){function e(t,o,n){d(this,e),this.type=t,this.input=o,this.labels=[],this.outputs=[];var i,r=A(n);try{for(r.s();!(i=r.n()).done;){var s=a(i.value,2),l=s[0],c=s[1];this.labels.push(l),this.outputs.push(c)}}catch(e){r.e(e)}finally{r.f()}}return u(e,[{key:"evaluate",value:function(e){var t=this.labels,o=this.outputs;if(1===t.length)return o[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return o[0].evaluate(e);var i=t.length;return n>=t[i-1]?o[i-1].evaluate(e):o[it(t,n)].evaluate(e)}},{key:"eachChild",value:function(e){e(this.input);var t,o=A(this.outputs);try{for(o.s();!(t=o.n()).done;){e(t.value)}}catch(e){o.e(e)}finally{o.f()}}},{key:"outputDefined",value:function(){return this.outputs.every((function(e){return e.outputDefined()}))}},{key:"serialize",value:function(){for(var e=["step",this.input.serialize()],t=0;t0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e}}],[{key:"parse",value:function(t,o){if(t.length-1<4)return o.error("Expected at least 4 arguments, but found only ".concat(t.length-1,"."));if((t.length-1)%2!=0)return o.error("Expected an even number of arguments.");var n=o.parse(t[1],1,ee);if(!n)return null;var i=[],r=null;o.expectedType&&"value"!==o.expectedType.kind&&(r=o.expectedType);for(var a=1;a=s)return o.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',c);var d=o.parse(l,u,r);if(!d)return null;r=r||d.type,i.push([s,d])}return new e(r,n,i)}}]),e}(),at=st;function st(e,t,o,n){this.cx=3*e,this.bx=3*(o-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(n-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=n,this.p2x=o,this.p2y=n}function lt(e,t,o){return e*(1-o)+t*o}st.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e},st.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e},st.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},st.prototype.solveCurveX=function(e,t){var o,n,i,r,a;for(void 0===t&&(t=1e-6),i=e,a=0;a<8;a++){if(r=this.sampleCurveX(i)-e,Math.abs(r)(n=1))return n;for(;or?o=i:n=i,i=.5*(n-o)+o}return i},st.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var ct=Object.freeze({__proto__:null,number:lt,color:function(e,t,o){return new fe(lt(e.r,t.r,o),lt(e.g,t.g,o),lt(e.b,t.b,o),lt(e.a,t.a,o))},array:function(e,t,o){return e.map((function(e,n){return lt(e,t[n],o)}))}}),ut=6/29,dt=3*ut*ut,pt=Math.PI/180,ht=180/Math.PI;function gt(e){return e>.008856451679035631?Math.pow(e,1/3):e/dt+4/29}function mt(e){return e>ut?e*e*e:dt*(e-4/29)}function ft(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function yt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function At(e){var t=yt(e.r),o=yt(e.g),n=yt(e.b),i=gt((.4124564*t+.3575761*o+.1804375*n)/.95047),r=gt((.2126729*t+.7151522*o+.072175*n)/1);return{l:116*r-16,a:500*(i-r),b:200*(r-gt((.0193339*t+.119192*o+.9503041*n)/1.08883)),alpha:e.a}}function vt(e){var t=(e.l+16)/116,o=isNaN(e.a)?t:t+e.a/500,n=isNaN(e.b)?t:t-e.b/200;return t=1*mt(t),o=.95047*mt(o),n=1.08883*mt(n),new fe(ft(3.2404542*o-1.5371385*t-.4985314*n),ft(-.969266*o+1.8760108*t+.041556*n),ft(.0556434*o-.2040259*t+1.0572252*n),e.alpha)}function Ct(e,t,o){var n=t-e;return e+o*(n>180||n<-180?n-360*Math.round(n/360):n)}var It={forward:At,reverse:vt,interpolate:function(e,t,o){return{l:lt(e.l,t.l,o),a:lt(e.a,t.a,o),b:lt(e.b,t.b,o),alpha:lt(e.alpha,t.alpha,o)}}},bt={forward:function(e){var t=At(e),o=t.l,n=t.a,i=t.b,r=Math.atan2(i,n)*ht;return{h:r<0?r+360:r,c:Math.sqrt(n*n+i*i),l:o,alpha:e.a}},reverse:function(e){var t=e.h*pt,o=e.c;return vt({l:e.l,a:Math.cos(t)*o,b:Math.sin(t)*o,alpha:e.alpha})},interpolate:function(e,t,o){return{h:Ct(e.h,t.h,o),c:lt(e.c,t.c,o),l:lt(e.l,t.l,o),alpha:lt(e.alpha,t.alpha,o)}}},wt=Object.freeze({__proto__:null,lab:It,hcl:bt}),_t=function(){function e(t,o,n,i,r){d(this,e),this.type=t,this.operator=o,this.interpolation=n,this.input=i,this.labels=[],this.outputs=[];var s,l=A(r);try{for(l.s();!(s=l.n()).done;){var c=a(s.value,2),u=c[0],p=c[1];this.labels.push(u),this.outputs.push(p)}}catch(e){l.e(e)}finally{l.f()}}return u(e,[{key:"evaluate",value:function(t){var o=this.labels,n=this.outputs;if(1===o.length)return n[0].evaluate(t);var i=this.input.evaluate(t);if(i<=o[0])return n[0].evaluate(t);var r=o.length;if(i>=o[r-1])return n[r-1].evaluate(t);var a=it(o,i),s=o[a],l=o[a+1],c=e.interpolationFactor(this.interpolation,i,s,l),u=n[a].evaluate(t),d=n[a+1].evaluate(t);return"interpolate"===this.operator?ct[this.type.kind.toLowerCase()](u,d,c):"interpolate-hcl"===this.operator?bt.reverse(bt.interpolate(bt.forward(u),bt.forward(d),c)):It.reverse(It.interpolate(It.forward(u),It.forward(d),c))}},{key:"eachChild",value:function(e){e(this.input);var t,o=A(this.outputs);try{for(o.s();!(t=o.n()).done;){e(t.value)}}catch(e){o.e(e)}finally{o.f()}}},{key:"outputDefined",value:function(){return this.outputs.every((function(e){return e.outputDefined()}))}},{key:"serialize",value:function(){var e;e="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 t=[this.operator,e,this.input.serialize()],o=0;o1})))return o.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);c={name:"cubic-bezier",controlPoints:h}}if(t.length-1<4)return o.error("Expected at least 4 arguments, but found only ".concat(t.length-1,"."));if((t.length-1)%2!=0)return o.error("Expected an even number of arguments.");if(!(u=o.parse(u,2,ee)))return null;var g=[],m=null;"interpolate-hcl"===a||"interpolate-lab"===a?m=ne:o.expectedType&&"value"!==o.expectedType.kind&&(m=o.expectedType);for(var f=0;f=y)return o.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',C);var b=o.parse(A,I,m);if(!b)return null;m=m||b.type,g.push([y,b])}return"number"===m.kind||"color"===m.kind||"array"===m.kind&&"number"===m.itemType.kind&&"number"==typeof m.N?new e(m,a,c,u,g):o.error("Type ".concat(ue(m)," is not interpolatable."))}}]),e}();function Et(e,t,o,n){var i=n-o,r=e-o;return 0===i?0:1===t?r/i:(Math.pow(t,r)-1)/(Math.pow(t,i)-1)}var St=function(){function e(t,o){d(this,e),this.type=t,this.args=o}return u(e,[{key:"evaluate",value:function(e){var t,o,n=null,i=0,r=A(this.args);try{for(r.s();!(o=r.n()).done;){var a=o.value;if(i++,(n=a.evaluate(e))&&n instanceof Ce&&!n.available&&(t||(t=n.name),n=null,i===this.args.length&&(n=t)),null!==n)break}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"eachChild",value:function(e){this.args.forEach(e)}},{key:"outputDefined",value:function(){return this.args.every((function(e){return e.outputDefined()}))}},{key:"serialize",value:function(){var e=["coalesce"];return this.eachChild((function(t){e.push(t.serialize())})),e}}],[{key:"parse",value:function(t,o){if(t.length<2)return o.error("Expectected at least one argument.");var n=null,i=o.expectedType;i&&"value"!==i.kind&&(n=i);var r,a=[],s=A(t.slice(1));try{for(s.s();!(r=s.n()).done;){var l=r.value,c=o.parse(l,1+a.length,n,void 0,{typeAnnotation:"omit"});if(!c)return null;n=n||c.type,a.push(c)}}catch(e){s.e(e)}finally{s.f()}return new e(i&&a.some((function(e){return pe(i,e.type)}))?re:n,a)}}]),e}(),Mt=function(){function e(t,o){d(this,e),this.type=o.type,this.bindings=[].concat(t),this.result=o}return u(e,[{key:"evaluate",value:function(e){return this.result.evaluate(e)}},{key:"eachChild",value:function(e){var t,o=A(this.bindings);try{for(o.s();!(t=o.n()).done;){e(t.value[1])}}catch(e){o.e(e)}finally{o.f()}e(this.result)}},{key:"outputDefined",value:function(){return this.result.outputDefined()}},{key:"serialize",value:function(){var e,t=["let"],o=A(this.bindings);try{for(o.s();!(e=o.n()).done;){var n=a(e.value,2),i=n[0],r=n[1];t.push(i,r.serialize())}}catch(e){o.e(e)}finally{o.f()}return t.push(this.result.serialize()),t}}],[{key:"parse",value:function(t,o){if(t.length<4)return o.error("Expected at least 3 arguments, but found ".concat(t.length-1," instead."));for(var n=[],i=1;i=o.length)throw new Se("Array index out of bounds: ".concat(t," > ").concat(o.length-1,"."));if(t!==Math.floor(t))throw new Se("Array index must be an integer, but found ".concat(t," instead."));return o[t]}},{key:"eachChild",value:function(e){e(this.index),e(this.input)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){return["at",this.index.serialize(),this.input.serialize()]}}],[{key:"parse",value:function(t,o){if(3!==t.length)return o.error("Expected 2 arguments, but found ".concat(t.length-1," instead."));var n=o.parse(t[1],1,ee),i=o.parse(t[2],2,ce(o.expectedType||re));return n&&i?new e(i.type.itemType,n,i):null}}]),e}(),xt=function(){function e(t,o){d(this,e),this.type=oe,this.needle=t,this.haystack=o}return u(e,[{key:"evaluate",value:function(e){var t=this.needle.evaluate(e),o=this.haystack.evaluate(e);if(!o)return!1;if(!ge(t,["boolean","string","number","null"]))throw new Se("Expected first argument to be of type boolean, string, number or null, but found ".concat(ue(we(t))," instead."));if(!ge(o,["string","array"]))throw new Se("Expected second argument to be of type array or string, but found ".concat(ue(we(o))," instead."));return o.indexOf(t)>=0}},{key:"eachChild",value:function(e){e(this.needle),e(this.haystack)}},{key:"outputDefined",value:function(){return!0}},{key:"serialize",value:function(){return["in",this.needle.serialize(),this.haystack.serialize()]}}],[{key:"parse",value:function(t,o){if(3!==t.length)return o.error("Expected 2 arguments, but found ".concat(t.length-1," instead."));var n=o.parse(t[1],1,re),i=o.parse(t[2],2,re);return n&&i?he(n.type,[oe,te,ee,$,re])?new e(n,i):o.error("Expected first argument to be of type boolean, string, number or null, but found ".concat(ue(n.type)," instead")):null}}]),e}(),kt=function(){function e(t,o,n){d(this,e),this.type=ee,this.needle=t,this.haystack=o,this.fromIndex=n}return u(e,[{key:"evaluate",value:function(e){var t=this.needle.evaluate(e),o=this.haystack.evaluate(e);if(!ge(t,["boolean","string","number","null"]))throw new Se("Expected first argument to be of type boolean, string, number or null, but found ".concat(ue(we(t))," instead."));if(!ge(o,["string","array"]))throw new Se("Expected second argument to be of type array or string, but found ".concat(ue(we(o))," instead."));if(this.fromIndex){var n=this.fromIndex.evaluate(e);return o.indexOf(t,n)}return o.indexOf(t)}},{key:"eachChild",value:function(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}],[{key:"parse",value:function(t,o){if(t.length<=2||t.length>=5)return o.error("Expected 3 or 4 arguments, but found ".concat(t.length-1," instead."));var n=o.parse(t[1],1,re),i=o.parse(t[2],2,re);if(!n||!i)return null;if(!he(n.type,[oe,te,ee,$,re]))return o.error("Expected first argument to be of type boolean, string, number or null, but found ".concat(ue(n.type)," instead"));if(4===t.length){var r=o.parse(t[3],3,ee);return r?new e(n,i,r):null}return new e(n,i)}}]),e}(),Gt=function(){function e(t,o,n,i,r,a){d(this,e),this.inputType=t,this.type=o,this.input=n,this.cases=i,this.outputs=r,this.otherwise=a}return u(e,[{key:"evaluate",value:function(e){var t=this.input.evaluate(e);return(we(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}},{key:"eachChild",value:function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}},{key:"outputDefined",value:function(){return this.outputs.every((function(e){return e.outputDefined()}))&&this.otherwise.outputDefined()}},{key:"serialize",value:function(){var e,t=this,o=["match",this.input.serialize()],n=[],i={},r=A(Object.keys(this.cases).sort());try{for(r.s();!(e=r.n()).done;){var s=e.value,l=i[this.cases[s]];void 0===l?(i[this.cases[s]]=n.length,n.push([this.cases[s],[s]])):n[l][1].push(s)}}catch(e){r.e(e)}finally{r.f()}for(var c=function(e){return"number"===t.inputType.kind?Number(e):e},u=0,d=n;uNumber.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than ".concat(Number.MAX_SAFE_INTEGER,"."));if("number"==typeof h&&Math.floor(h)!==h)return u.error("Numeric branch labels must be integer values.");if(n){if(u.checkSubtype(n,we(h)))return null}else n=we(h);if(void 0!==r[String(h)])return u.error("Branch labels must be unique.");r[String(h)]=a.length}}catch(e){p.e(e)}finally{p.f()}var g=o.parse(c,s,i);if(!g)return null;i=i||g.type,a.push(g)}var m=o.parse(t[1],1,re);if(!m)return null;var f=o.parse(t[t.length-1],t.length-1,i);return f?"value"!==m.type.kind&&o.concat(1).checkSubtype(n,m.type)?null:new e(n,i,m,r,a,f):null}}]),e}(),Rt=function(){function e(t,o,n){d(this,e),this.type=t,this.branches=o,this.otherwise=n}return u(e,[{key:"evaluate",value:function(e){var t,o=A(this.branches);try{for(o.s();!(t=o.n()).done;){var n=a(t.value,2),i=n[0],r=n[1];if(i.evaluate(e))return r.evaluate(e)}}catch(e){o.e(e)}finally{o.f()}return this.otherwise.evaluate(e)}},{key:"eachChild",value:function(e){var t,o=A(this.branches);try{for(o.s();!(t=o.n()).done;){var n=a(t.value,2),i=n[0],r=n[1];e(i),e(r)}}catch(e){o.e(e)}finally{o.f()}e(this.otherwise)}},{key:"outputDefined",value:function(){return this.branches.every((function(e){var t=a(e,2);t[0];return t[1].outputDefined()}))&&this.otherwise.outputDefined()}},{key:"serialize",value:function(){var e=["case"];return this.eachChild((function(t){e.push(t.serialize())})),e}}],[{key:"parse",value:function(t,o){if(t.length<4)return o.error("Expected at least 3 arguments, but found only ".concat(t.length-1,"."));if(t.length%2!=0)return o.error("Expected an odd number of arguments.");var n;o.expectedType&&"value"!==o.expectedType.kind&&(n=o.expectedType);for(var i=[],r=1;r=5)return o.error("Expected 3 or 4 arguments, but found ".concat(t.length-1," instead."));var n=o.parse(t[1],1,re),i=o.parse(t[2],2,ee);if(!n||!i)return null;if(!he(n.type,[ce(re),te,re]))return o.error("Expected first argument to be of type array or string, but found ".concat(ue(n.type)," instead"));if(4===t.length){var r=o.parse(t[3],3,ee);return r?new e(n.type,n,i,r):null}return new e(n.type,n,i)}}]),e}();function Ot(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function Lt(e,t,o,n){return 0===n.compare(t,o)}function Dt(e,t,o){var n="=="!==e&&"!="!==e;return function(){function i(e,t,o){d(this,i),this.type=oe,this.lhs=e,this.rhs=t,this.collator=o,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}return u(i,[{key:"evaluate",value:function(i){var r=this.lhs.evaluate(i),a=this.rhs.evaluate(i);if(n&&this.hasUntypedArgument){var s=we(r),l=we(a);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new Se('Expected arguments for "'.concat(e,'" to be (string, string) or (number, number), but found (').concat(s.kind,", ").concat(l.kind,") instead."))}if(this.collator&&!n&&this.hasUntypedArgument){var c=we(r),u=we(a);if("string"!==c.kind||"string"!==u.kind)return t(i,r,a)}return this.collator?o(i,r,a,this.collator.evaluate(i)):t(i,r,a)}},{key:"eachChild",value:function(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)}},{key:"outputDefined",value:function(){return!0}},{key:"serialize",value:function(){var t=[e];return this.eachChild((function(e){t.push(e.serialize())})),t}}],[{key:"parse",value:function(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");var o=e[0],r=t.parse(e[1],1,re);if(!r)return null;if(!Ot(o,r.type))return t.concat(1).error('"'.concat(o,"\" comparisons are not supported for type '").concat(ue(r.type),"'."));var a=t.parse(e[2],2,re);if(!a)return null;if(!Ot(o,a.type))return t.concat(2).error('"'.concat(o,"\" comparisons are not supported for type '").concat(ue(a.type),"'."));if(r.type.kind!==a.type.kind&&"value"!==r.type.kind&&"value"!==a.type.kind)return t.error("Cannot compare types '".concat(ue(r.type),"' and '").concat(ue(a.type),"'."));n&&("value"===r.type.kind&&"value"!==a.type.kind?r=new Pe(a.type,[r]):"value"!==r.type.kind&&"value"===a.type.kind&&(a=new Pe(r.type,[a])));var s=null;if(4===e.length){if("string"!==r.type.kind&&"string"!==a.type.kind&&"value"!==r.type.kind&&"value"!==a.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(s=t.parse(e[3],3,ae)))return null}return new i(r,a,s)}}]),i}()}var jt=Dt("==",(function(e,t,o){return t===o}),Lt),Nt=Dt("!=",(function(e,t,o){return t!==o}),(function(e,t,o,n){return!Lt(0,t,o,n)})),Ut=Dt("<",(function(e,t,o){return t",(function(e,t,o){return t>o}),(function(e,t,o,n){return n.compare(t,o)>0})),Ft=Dt("<=",(function(e,t,o){return t<=o}),(function(e,t,o,n){return n.compare(t,o)<=0})),zt=Dt(">=",(function(e,t,o){return t>=o}),(function(e,t,o,n){return n.compare(t,o)>=0})),Vt=function(){function e(t,o,n,i,r){d(this,e),this.type=te,this.number=t,this.locale=o,this.currency=n,this.minFractionDigits=i,this.maxFractionDigits=r}return u(e,[{key:"evaluate",value:function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}},{key:"eachChild",value:function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]}}],[{key:"parse",value:function(t,o){if(3!==t.length)return o.error("Expected two arguments.");var n=o.parse(t[1],1,ee);if(!n)return null;var i=t[2];if("object"!==I(i)||Array.isArray(i))return o.error("NumberFormat options argument must be an object.");var r=null;if(i.locale&&!(r=o.parse(i.locale,1,te)))return null;var a=null;if(i.currency&&!(a=o.parse(i.currency,1,te)))return null;var s=null;if(i["min-fraction-digits"]&&!(s=o.parse(i["min-fraction-digits"],1,ee)))return null;var l=null;return i["max-fraction-digits"]&&!(l=o.parse(i["max-fraction-digits"],1,ee))?null:new e(n,r,a,s,l)}}]),e}(),Wt={"==":jt,"!=":Nt,">":Bt,"<":Ut,">=":zt,"<=":Ft,array:Pe,at:Pt,boolean:Pe,case:Rt,coalesce:St,collator:De,format:xe,image:ke,in:xt,"index-of":kt,interpolate:_t,"interpolate-hcl":_t,"interpolate-lab":_t,length:function(){function e(t){d(this,e),this.type=ee,this.input=t}return u(e,[{key:"evaluate",value:function(e){var t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new Se("Expected value to be of type string or array, but found ".concat(ue(we(t))," instead."))}},{key:"eachChild",value:function(e){e(this.input)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){var e=["length"];return this.eachChild((function(t){e.push(t.serialize())})),e}}],[{key:"parse",value:function(t,o){if(2!==t.length)return o.error("Expected 1 argument, but found ".concat(t.length-1," instead."));var n=o.parse(t[1],1);return n?"array"!==n.type.kind&&"string"!==n.type.kind&&"value"!==n.type.kind?o.error("Expected argument of type string or array, but found ".concat(ue(n.type)," instead.")):new e(n):null}}]),e}(),let:Mt,literal:Ee,match:Gt,number:Pe,"number-format":Vt,object:Pe,slice:Tt,step:rt,string:Pe,"to-boolean":Re,"to-color":Re,"to-number":Re,"to-string":Re,var:ot,within:Qe};function qt(e,t){var o=a(t,4),n=o[0],i=o[1],r=o[2],s=o[3];n=n.evaluate(e),i=i.evaluate(e),r=r.evaluate(e);var l=s?s.evaluate(e):1,c=Ie(n,i,r,l);if(c)throw new Se(c);return new fe(n/255*l,i/255*l,r/255*l,l)}function Ht(e,t){return e in t}function Yt(e,t){var o=t[e];return void 0===o?null:o}function Jt(e){return{type:e}}function Zt(e){return{result:"success",value:e}}function Kt(e){return{result:"error",value:e}}function Xt(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function Qt(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function $t(e){return!!e.expression&&e.expression.interpolated}function eo(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":I(e)}function to(e){return"object"===I(e)&&null!==e&&!Array.isArray(e)}function oo(e){return e}function no(e,t){var o,n,i,r="color"===t.type,a=e.stops&&"object"===I(e.stops[0][0]),s=a||void 0!==e.property,l=a||!s,c=e.type||($t(t)?"exponential":"interval");if(r&&((e=K({},e)).stops&&(e.stops=e.stops.map((function(e){return[e[0],fe.parse(e[1])]}))),e.default?e.default=fe.parse(e.default):e.default=fe.parse(t.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!wt[e.colorSpace])throw new Error("Unknown color space: ".concat(e.colorSpace));if("exponential"===c)o=so;else if("interval"===c)o=ao;else if("categorical"===c){o=ro,n=Object.create(null);var u,d=A(e.stops);try{for(d.s();!(u=d.n()).done;){var p=u.value;n[p[0]]=p[1]}}catch(e){d.e(e)}finally{d.f()}i=I(e.stops[0][0])}else{if("identity"!==c)throw new Error('Unknown function type "'.concat(c,'"'));o=lo}if(a){for(var h={},g=[],m=0;m=e.stops[n-1][0])return e.stops[n-1][1];var i=it(e.stops.map((function(e){return e[0]})),o);return e.stops[i][1]}function so(e,t,o){var n=void 0!==e.base?e.base:1;if("number"!==eo(o))return io(e.default,t.default);var i=e.stops.length;if(1===i)return e.stops[0][1];if(o<=e.stops[0][0])return e.stops[0][1];if(o>=e.stops[i-1][0])return e.stops[i-1][1];var r=it(e.stops.map((function(e){return e[0]})),o),a=function(e,t,o,n){var i=n-o,r=e-o;return 0===i?0:1===t?r/i:(Math.pow(t,r)-1)/(Math.pow(t,i)-1)}(o,n,e.stops[r][0],e.stops[r+1][0]),s=e.stops[r][1],l=e.stops[r+1][1],c=ct[t.type]||oo;if(e.colorSpace&&"rgb"!==e.colorSpace){var u=wt[e.colorSpace];c=function(e,t){return u.reverse(u.interpolate(u.forward(e),u.forward(t),a))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var e=arguments.length,t=new Array(e),o=0;o":[oe,[te,re],function(e,t){var o=a(t,2),n=o[0],i=o[1],r=e.properties()[n.value],s=i.value;return I(r)===I(s)&&r>s}],"filter-id->":[oe,[re],function(e,t){var o=a(t,1)[0],n=e.id(),i=o.value;return I(n)===I(i)&&n>i}],"filter-<=":[oe,[te,re],function(e,t){var o=a(t,2),n=o[0],i=o[1],r=e.properties()[n.value],s=i.value;return I(r)===I(s)&&r<=s}],"filter-id-<=":[oe,[re],function(e,t){var o=a(t,1)[0],n=e.id(),i=o.value;return I(n)===I(i)&&n<=i}],"filter->=":[oe,[te,re],function(e,t){var o=a(t,2),n=o[0],i=o[1],r=e.properties()[n.value],s=i.value;return I(r)===I(s)&&r>=s}],"filter-id->=":[oe,[re],function(e,t){var o=a(t,1)[0],n=e.id(),i=o.value;return I(n)===I(i)&&n>=i}],"filter-has":[oe,[re],function(e,t){return a(t,1)[0].value in e.properties()}],"filter-has-id":[oe,[],function(e){return null!==e.id()&&void 0!==e.id()}],"filter-type-in":[oe,[ce(te)],function(e,t){return a(t,1)[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[oe,[ce(re)],function(e,t){return a(t,1)[0].value.indexOf(e.id())>=0}],"filter-in-small":[oe,[te,ce(re)],function(e,t){var o=a(t,2),n=o[0];return o[1].value.indexOf(e.properties()[n.value])>=0}],"filter-in-large":[oe,[te,ce(re)],function(e,t){var o=a(t,2),n=o[0],i=o[1];return function(e,t,o,n){for(;o<=n;){var i=o+n>>1;if(t[i]===e)return!0;t[i]>e?n=i-1:o=i+1}return!1}(e.properties()[n.value],i.value,0,i.value.length-1)}],all:{type:oe,overloads:[[[oe,oe],function(e,t){var o=a(t,2),n=o[0],i=o[1];return n.evaluate(e)&&i.evaluate(e)}],[Jt(oe),function(e,t){var o,n=A(t);try{for(n.s();!(o=n.n()).done;){if(!o.value.evaluate(e))return!1}}catch(e){n.e(e)}finally{n.f()}return!0}]]},any:{type:oe,overloads:[[[oe,oe],function(e,t){var o=a(t,2),n=o[0],i=o[1];return n.evaluate(e)||i.evaluate(e)}],[Jt(oe),function(e,t){var o,n=A(t);try{for(n.s();!(o=n.n()).done;){if(o.value.evaluate(e))return!0}}catch(e){n.e(e)}finally{n.f()}return!1}]]},"!":[oe,[oe],function(e,t){return!a(t,1)[0].evaluate(e)}],"is-supported-script":[oe,[te],function(e,t){var o=a(t,1)[0],n=e.globals&&e.globals.isSupportedScript;return!n||n(o.evaluate(e))}],upcase:[te,[te],function(e,t){return a(t,1)[0].evaluate(e).toUpperCase()}],downcase:[te,[te],function(e,t){return a(t,1)[0].evaluate(e).toLowerCase()}],concat:[te,Jt(re),function(e,t){return t.map((function(t){return _e(t.evaluate(e))})).join("")}],"resolved-locale":[te,[ae],function(e,t){return a(t,1)[0].evaluate(e).resolvedLocale()}]});var co=function(){function e(t,o){var n;d(this,e),this.expression=t,this._warningHistory={},this._evaluator=new Oe,this._defaultValue=o?"color"===(n=o).type&&to(n.default)?new fe(0,0,0,0):"color"===n.type?fe.parse(n.default)||null:void 0===n.default?null:n.default:null,this._enumValues=o&&"enum"===o.type?o.values:null}return u(e,[{key:"evaluateWithoutErrorHandling",value:function(e,t,o,n,i,r){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=o,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=r,this.expression.evaluate(this._evaluator)}},{key:"evaluate",value:function(e,t,o,n,i,r){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=o||null,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=r||null;try{var a=this.expression.evaluate(this._evaluator);if(null==a||"number"==typeof a&&a!=a)return this._defaultValue;if(this._enumValues&&!(a in this._enumValues))throw new Se("Expected value to be one of ".concat(Object.keys(this._enumValues).map((function(e){return JSON.stringify(e)})).join(", "),", but found ").concat(JSON.stringify(a)," instead."));return a}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,"undefined"!=typeof console&&console.warn(e.message)),this._defaultValue}}}]),e}();function uo(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in Wt}function po(e,t){var o=new nt(Wt,[],t?function(e){var t={color:ne,string:te,number:ee,enum:te,boolean:oe,formatted:se,resolvedImage:le};if("array"===e.type)return ce(t[e.value]||re,e.length);return t[e.type]}(t):void 0),n=o.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?Zt(new co(n,t)):Kt(o.errors)}var ho=function(){function e(t,o){d(this,e),this.kind=t,this._styleExpression=o,this.isStateDependent="constant"!==t&&!et(o.expression)}return u(e,[{key:"evaluateWithoutErrorHandling",value:function(e,t,o,n,i,r){return this._styleExpression.evaluateWithoutErrorHandling(e,t,o,n,i,r)}},{key:"evaluate",value:function(e,t,o,n,i,r){return this._styleExpression.evaluate(e,t,o,n,i,r)}}]),e}(),go=function(){function e(t,o,n,i){d(this,e),this.kind=t,this.zoomStops=n,this._styleExpression=o,this.isStateDependent="camera"!==t&&!et(o.expression),this.interpolationType=i}return u(e,[{key:"evaluateWithoutErrorHandling",value:function(e,t,o,n,i,r){return this._styleExpression.evaluateWithoutErrorHandling(e,t,o,n,i,r)}},{key:"evaluate",value:function(e,t,o,n,i,r){return this._styleExpression.evaluate(e,t,o,n,i,r)}},{key:"interpolationFactor",value:function(e,t,o){return this.interpolationType?_t.interpolationFactor(this.interpolationType,e,t,o):0}}]),e}();function mo(e,t){if("error"===(e=po(e,t)).result)return e;var o=e.value.expression,n=$e(o);if(!n&&!Xt(t))return Kt([new X("","data expressions not supported")]);var i=tt(o,["zoom"]);if(!i&&!Qt(t))return Kt([new X("","zoom expressions not supported")]);var r=function e(t){var o=null;if(t instanceof Mt)o=e(t.result);else if(t instanceof St){var n,i=A(t.args);try{for(i.s();!(n=i.n()).done;){var r=n.value;if(o=e(r))break}}catch(e){i.e(e)}finally{i.f()}}else(t instanceof rt||t instanceof _t)&&t.input instanceof Le&&"zoom"===t.input.name&&(o=t);if(o instanceof X)return o;return t.eachChild((function(t){var n=e(t);n instanceof X?o=n:!o&&n?o=new X("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):o&&n&&o!==n&&(o=new X("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),o}(o);if(!r&&!i)return Kt([new X("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(r instanceof X)return Kt([r]);if(r instanceof _t&&!$t(t))return Kt([new X("",'"interpolate" expressions cannot be used with this property')]);if(!r)return Zt(new ho(n?"constant":"source",e.value));var a=r instanceof _t?r.interpolation:void 0;return Zt(new go(n?"camera":"composite",e.value,r.labels,a))}var fo=function(){function e(t,o){d(this,e),this._parameters=t,this._specification=o,K(this,no(this._parameters,this._specification))}return u(e,null,[{key:"deserialize",value:function(t){return new e(t._parameters,t._specification)}},{key:"serialize",value:function(e){return{_parameters:e._parameters,_specification:e._specification}}}]),e}();function yo(e){return"object"===I(e)?["literal",e]:e}function Ao(e,t){var o=e.stops;if(!o)return function(e,t){var o=["get",e.property];if(void 0===e.default)return"string"===t.type?["string",o]:o;if("enum"===t.type)return["match",o,Object.keys(t.values),o,e.default];var n=["color"===t.type?"to-color":t.type,o,yo(e.default)];return"array"===t.type&&n.splice(1,0,t.value,t.length||null),n}(e,t);var n=o&&"object"===I(o[0][0]),i=n||void 0!==e.property,r=n||!i;return o=o.map((function(e){return!i&&t.tokens&&"string"==typeof e[1]?[e[0],Eo(e[1])]:[e[0],yo(e[1])]})),n?function(e,t,o){for(var n={},i={},r=[],a=0;a3&&void 0!==arguments[3]?arguments[3]:["zoom"],r=_o(e,t),a=!1;if("interval"===r)n=["step",i],a=!0;else{if("exponential"!==r)throw new Error('Unknown zoom function type "'.concat(r,'"'));var s=void 0!==e.base?e.base:1;n=[vo(e),1===s?["linear"]:["exponential",s],i]}var l,c=A(o);try{for(c.s();!(l=c.n()).done;){var u=l.value;wo(n,u[0],u[1],a)}}catch(e){c.e(e)}finally{c.f()}return bo(n),n}(e,t,o):Io(e,t,o)}function vo(e){switch(e.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function Co(e,t){var o,n,i=yo((o=e.default,n=t.default,void 0!==o?o:void 0!==n?n:void 0));return void 0===i&&"resolvedImage"===t.type?"":i}function Io(e,t,o){var n=_o(e,t),i=["get",e.property];if("categorical"===n&&"boolean"==typeof o[0][0]){var r,a=["case"],s=A(o);try{for(s.s();!(r=s.n()).done;){var l=r.value;a.push(["==",i,l[0]],l[1])}}catch(e){s.e(e)}finally{s.f()}return a.push(Co(e,t)),a}if("categorical"===n){var c,u=["match",i],d=A(o);try{for(d.s();!(c=d.n()).done;){var p=c.value;wo(u,p[0],p[1],!1)}}catch(e){d.e(e)}finally{d.f()}return u.push(Co(e,t)),u}if("interval"===n){var h,g=["step",["number",i]],m=A(o);try{for(m.s();!(h=m.n()).done;){var f=h.value;wo(g,f[0],f[1],!0)}}catch(e){m.e(e)}finally{m.f()}return bo(g),void 0===e.default?g:["case",["==",["typeof",i],"number"],g,yo(e.default)]}if("exponential"===n){var y,v=void 0!==e.base?e.base:1,C=[vo(e),1===v?["linear"]:["exponential",v],["number",i]],I=A(o);try{for(I.s();!(y=I.n()).done;){var b=y.value;wo(C,b[0],b[1],!1)}}catch(e){I.e(e)}finally{I.f()}return void 0===e.default?C:["case",["==",["typeof",i],"number"],C,yo(e.default)]}throw new Error("Unknown property function type ".concat(n))}function bo(e){"step"===e[0]&&3===e.length&&(e.push(0),e.push(e[3]))}function wo(e,t,o,n){e.length>3&&t===e[e.length-2]||(n&&2===e.length||e.push(t),e.push(o))}function _o(e,t){return e.type?e.type:t.expression.interpolated?"exponential":"interval"}function Eo(e){for(var t=["concat"],o=/{([^{}]+)}/g,n=0,i=o.exec(e);null!==i;i=o.exec(e)){var r=e.slice(n,o.lastIndex-i[0].length);n=o.lastIndex,r.length>0&&t.push(r),t.push(["get",i[1]])}if(1===t.length)return e;if(n=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!=typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":var t,o=A(e.slice(1));try{for(o.s();!(t=o.n()).done;){var n=t.value;if(!So(n)&&"boolean"!=typeof n)return!1}}catch(e){o.e(e)}finally{o.f()}return!0;default:return!0}}var Mo={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Po(e){if(null==e)return{filter:function(){return!0},needGeometry:!1};So(e)||(e=ko(e));var t=po(e,Mo);if("error"===t.result)throw new Error(t.value.map((function(e){return"".concat(e.key,": ").concat(e.message)})).join(", "));return{filter:function(e,o,n){return t.value.evaluate(e,o,{},n)},needGeometry:function e(t){if(!Array.isArray(t))return!1;if("within"===t[0])return!0;for(var o=1;ot?1:0}function ko(e){if(!e)return!0;var t,o=e[0];return e.length<=1?"any"!==o:"=="===o?Go(e[1],e[2],"=="):"!="===o?Oo(Go(e[1],e[2],"==")):"<"===o||">"===o||"<="===o||">="===o?Go(e[1],e[2],o):"any"===o?(t=e.slice(1),["any"].concat(t.map(ko))):"all"===o?["all"].concat(e.slice(1).map(ko)):"none"===o?["all"].concat(e.slice(1).map(ko).map(Oo)):"in"===o?Ro(e[1],e.slice(2)):"!in"===o?Oo(Ro(e[1],e.slice(2))):"has"===o?To(e[1]):"!has"===o?Oo(To(e[1])):"within"!==o||e}function Go(e,t,o){switch(e){case"$type":return["filter-type-".concat(o),t];case"$id":return["filter-id-".concat(o),t];default:return["filter-".concat(o),e,t]}}function Ro(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((function(e){return I(e)!==I(t[0])}))?["filter-in-large",e,["literal",t.sort(xo)]]:["filter-in-small",e,["literal",t]]}}function To(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function Oo(e){return["!",e]}var Lo=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Do(e,t){var o={};for(var n in e)"ref"!==n&&(o[n]=e[n]);return Lo.forEach((function(e){e in t&&(o[e]=t[e])})),o}function jo(e){e=e.slice();for(var t=Object.create(null),o=0;os)return[new No(t,o,"".concat(o," is greater than the maximum value ").concat(s))]}return[]}function Ho(e){var t,o,n,i=e.valueSpec,r=Fo(e.value.type),a={},s="categorical"!==r&&void 0===e.value.property,l=!s,c="array"===eo(e.value.stops)&&"array"===eo(e.value.stops[0])&&"object"===eo(e.value.stops[0][0]),u=Vo({key:e.key,value:e.value,valueSpec:e.styleSpec.function,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(e){if("identity"===r)return[new No(e.key,e.value,'identity function may not have a "stops" property')];var t=[],o=e.value;t=t.concat(Wo({key:e.key,value:o,valueSpec:e.valueSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:d})),"array"===eo(o)&&0===o.length&&t.push(new No(e.key,o,"array must have at least one stop"));return t},default:function(e){return ln({key:e.key,value:e.value,valueSpec:i,style:e.style,styleSpec:e.styleSpec})}}});return"identity"===r&&s&&u.push(new No(e.key,e.value,'missing required property "property"')),"identity"===r||e.value.stops||u.push(new No(e.key,e.value,'missing required property "stops"')),"exponential"===r&&e.valueSpec.expression&&!$t(e.valueSpec)&&u.push(new No(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l&&!Xt(e.valueSpec)?u.push(new No(e.key,e.value,"property functions not supported")):s&&!Qt(e.valueSpec)&&u.push(new No(e.key,e.value,"zoom functions not supported"))),"categorical"!==r&&!c||void 0!==e.value.property||u.push(new No(e.key,e.value,'"property" property is required')),u;function d(e){var t=[],r=e.value,s=e.key;if("array"!==eo(r))return[new No(s,r,"array expected, ".concat(eo(r)," found"))];if(2!==r.length)return[new No(s,r,"array length 2 expected, length ".concat(r.length," found"))];if(c){if("object"!==eo(r[0]))return[new No(s,r,"object expected, ".concat(eo(r[0])," found"))];if(void 0===r[0].zoom)return[new No(s,r,"object stop key must have zoom")];if(void 0===r[0].value)return[new No(s,r,"object stop key must have value")];if(n&&n>Fo(r[0].zoom))return[new No(s,r[0].zoom,"stop zoom values must appear in ascending order")];Fo(r[0].zoom)!==n&&(n=Fo(r[0].zoom),o=void 0,a={}),t=t.concat(Vo({key:"".concat(s,"[0]"),value:r[0],valueSpec:{zoom:{}},style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:qo,value:p}}))}else t=t.concat(p({key:"".concat(s,"[0]"),value:r[0],valueSpec:{},style:e.style,styleSpec:e.styleSpec},r));return uo(zo(r[1]))?t.concat([new No("".concat(s,"[1]"),r[1],"expressions are not allowed in function stops.")]):t.concat(ln({key:"".concat(s,"[1]"),value:r[1],valueSpec:i,style:e.style,styleSpec:e.styleSpec}))}function p(e,n){var s=eo(e.value),l=Fo(e.value),c=null!==e.value?e.value:n;if(t){if(s!==t)return[new No(e.key,c,"".concat(s," stop domain type must match previous stop domain type ").concat(t))]}else t=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new No(e.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==r){var u="number expected, ".concat(s," found");return Xt(i)&&void 0===r&&(u+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new No(e.key,c,u)]}return"categorical"!==r||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==r&&"number"===s&&void 0!==o&&l":case">=":o.length>=2&&"$type"===Fo(o[1])&&a.push(new No(n,o,'"$type" cannot be use with operator "'.concat(o[0],'"')));case"==":case"!=":3!==o.length&&a.push(new No(n,o,'filter array for operator "'.concat(o[0],'" must have 3 elements')));case"in":case"!in":o.length>=2&&"string"!==(i=eo(o[1]))&&a.push(new No("".concat(n,"[1]"),o[1],"string expected, ".concat(i," found")));for(var s=2;s1&&void 0!==arguments[1]?arguments[1]:b,o=[];return o=o.concat(ln({key:"",value:e,valueSpec:t.$root,styleSpec:t,style:e,objectElementValidators:{glyphs:cn,"*":function(){return[]}}})),e.constants&&(o=o.concat(Bo({key:"constants",value:e.constants,style:e,styleSpec:t}))),dn(o)}function dn(e){return[].concat(e).sort((function(e,t){return e.line-t.line}))}function pn(e){return function(){for(var t=arguments.length,o=new Array(t),n=0;nc&&E.push("'"+this.terminals_[b]+"'");M=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[A]||A)+"'":"Parse error on line "+(s+1)+": Unexpected "+(A==u?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(M,{text:p.match,token:this.terminals_[A]||A,line:p.yylineno,loc:m,expected:E})}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+A);switch(C[0]){case 1:o.push(A),n.push(p.yytext),i.push(p.yylloc),o.push(C[1]),A=null,l=p.yyleng,a=p.yytext,s=p.yylineno,m=p.yylloc;break;case 2:if(w=this.productions_[C[1]][1],S.$=n[n.length-w],S._$={first_line:i[i.length-(w||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(w||1)].first_column,last_column:i[i.length-1].last_column},f&&(S._$.range=[i[i.length-(w||1)].range[0],i[i.length-1].range[1]]),void 0!==(I=this.performAction.apply(S,[a,l,s,h.yy,C[1],n,i].concat(d))))return I;w&&(o=o.slice(0,-1*w*2),n=n.slice(0,-1*w),i=i.slice(0,-1*w)),o.push(this.productions_[C[1]][0]),n.push(S.$),i.push(S._$),_=r[o[o.length-2]][o[o.length-1]],o.push(_);break;case 3:return!0}}return!0}},p={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,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 e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.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),e},unput:function(e){var t=e.length,o=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var n=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),o.length-1&&(this.yylineno-=o.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:o?(o.length===n.length?this.yylloc.first_column:0)+n[n.length-o.length].length-o[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),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(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var o,n,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))),(n=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],o=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var r in i)this[r]=i[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,o,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),r=0;rt[0].length)){if(t=o,n=r,this.options.backtrack_lexer){if(!1!==(e=this.test_match(o,i[r])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&e:""===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 e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},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(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,o,n){switch(o){case 0:break;case 1:return 6;case 2:return t.yytext=t.yytext.substr(1,t.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 h(){this.yy={}}return d.lexer=p,h.prototype=d,d.Parser=h,new h}();void 0!==E&&(t.parser=o,t.Parser=o.Parser,t.parse=function(){return o.parse.apply(o,arguments)})}));function gn(e){if(e instanceof String||"string"==typeof e||e instanceof n)try{return hn.parse(e.toString())}catch(e){throw new Uo(e)}return e}function mn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b,o=e;try{o=gn(o)}catch(e){return[e]}return un(o,t)}new Set(["vector","raster","raster-dem"]);var fn={StyleExpression:co,isExpression:uo,isExpressionFilter:So,createExpression:po,createPropertyExpression:mo,normalizePropertyExpression:function(e,t){if(to(e))return new fo(e,t);if(uo(e)){var o=mo(e,t);if("error"===o.result)throw new Error(o.value.map((function(e){return"".concat(e.key,": ").concat(e.message)})).join(", "));return o.value}var n=e;return"string"==typeof e&&"color"===t.type&&(n=fe.parse(e)),{kind:"constant",evaluate:function(){return n}}},ZoomConstantExpression:ho,ZoomDependentExpression:go,StylePropertyFunction:fo},yn={convertFunction:Ao,createFunction:no,isFunction:to};mn.parsed=mn,mn.latest=mn}).call(this,o(28),o(99).Buffer)},function(e){e.exports=JSON.parse('{"name":"geoportal-extensions","description":"French Geoportal Extensions for OpenLayers, Leaflet and iTowns libraries","version":"2.9.0","date":"21/09/2023","leafletExtName":"French Geoportal Extension for Leaflet","leafletExtVersion":"2.4.0-beta","olExtName":"French Geoportal Extension for OpenLayers","olExtVersion":"3.4.0-beta","itownsExtName":"French Geoportal Extension for Itowns","itownsExtVersion":"2.4.3","main":"dist/leaflet/GpPluginLeaflet.js, dist/openlayers/GpPluginOpenLayers.js, dist/itowns/GpPluginItowns.js","types":"dist/leaflet/index.d.ts, dist/openlayers/index.d.ts, dist/itowns/index.d.ts","module":"src/Leaflet/index.js, src/OpenLayers/index.js, src/Itowns/index.js","directories":{},"scripts":{"setup":"npm install","clean":"echo \\"Warning: target not yet implemented!\\" && exit 0","eslint":"eslint src/","test":"npm run test:serve","test:serve":"cd test && webpack-dev-server --hot --config webpack.test.serve.js","sample":"npm run sample:serve","sample:serve":"npm run sample:ol:serve","sample:itowns:serve":"webpack-dev-server --config build/webpack/webpack.config.itowns --mode=development --https --open-page samples/index-itowns-map.html --content-base . --output-public-path \'/dist/itowns/\' --port 9001 --open","sample:leaflet:serve":"webpack-dev-server --config build/webpack/webpack.config.leaflet --mode=development --https --open-page samples/index-leaflet-map.html --content-base . --output-public-path \'/dist/leaflet/\' --port 9001 --open","sample:ol:serve":"webpack-dev-server --config build/webpack/webpack.config.openlayers --mode=development --https --open-page samples/index-openlayers-map.html --content-base . --output-public-path \'/dist/openlayers/\' --port 9001 --open","generate-types:ol":"npx tsc -p build/types/tsconfig-openlayers.json","generate-types:leaflet":"npx tsc -p build/types/tsconfig-leaflet.json","generate-types:itowns":"npx tsc -p build/types/tsconfig-itowns.json","generate-jsdoc:ol":"jsdoc -c build/jsdoc/jsdoc-openlayers.json","generate-jsdoc:leaflet":"jsdoc -c build/jsdoc/jsdoc-leaflet.json","generate-jsdoc:itowns":"jsdoc -c build/jsdoc/jsdoc-itowns.json","doc":"npm run doc:serve","doc:serve":"npm run doc:ol:serve","doc:itowns:serve":"webpack-dev-server --hot --config build/webpack/webpack.config.itowns --content-base jsdoc/itowns --port 9001 --open","doc:leaflet:serve":"webpack-dev-server --hot --config build/webpack/webpack.config.leaflet --content-base jsdoc/leaflet --port 9001 --open","doc:ol:serve":"webpack-dev-server --hot --config build/webpack/webpack.config.openlayers --content-base jsdoc/openlayers --port 9001 --open","build:dev":"npm-run-all --print-label --print-name build:*:dev","build:prod":"npm-run-all --print-label --print-name build:*:prod","build:src":"npm-run-all --print-label --print-name build:*:src","build":"npm-run-all --print-label --print-name build:*:*","build:itowns":"npm-run-all --print-label --print-name build:itowns:*","build:itowns:dev":"webpack --config build/webpack/webpack.config.itowns --mode=development","build:itowns:prod":"webpack --config build/webpack/webpack.config.itowns --mode=production","build:itowns:src":"webpack --config build/webpack/webpack.config.itowns --mode=none","build:ol":"npm-run-all --print-label --print-name build:ol:*","build:ol:dev":"webpack --config build/webpack/webpack.config.openlayers --mode=development","build:ol:prod":"webpack --config build/webpack/webpack.config.openlayers --mode=production","build:ol:src":"webpack --config build/webpack/webpack.config.openlayers --mode=none","build:leaflet":"npm-run-all --print-label --print-name build:leaflet:*","build:leaflet:dev":"webpack --config build/webpack/webpack.config.leaflet --mode=development","build:leaflet:prod":"webpack --config build/webpack/webpack.config.leaflet --mode=production","build:leaflet:src":"webpack --config build/webpack/webpack.config.leaflet --mode=none"},"repository":{"type":"git","url":"https://github.com/IGNF/geoportal-extensions.git"},"author":"IGNF","keywords":["geoportail","javascript","OpenLayers","Leaflet","Itowns","3D"],"license":"CECILL-B","bugs":{"url":"https://github.com/IGNF/geoportal-extensions/issues"},"homepage":"https://github.com/IGNF/geoportal-extensions#readme","dependencies":{"@mapbox/mapbox-gl-style-spec":"13.20.1","eventbusjs":"0.2.0","geoportal-access-lib":"https://raw.githubusercontent.com/IGNF/geoportal-access-lib/release-3.4.0-beta/geoportal-access-lib-3.4.0-beta.tgz","itowns":"2.38.2","leaflet":"1.7.1","leaflet-draw":"1.0.4","loglevel":"^1.6.7","markdown-toc":"^1.2.0","ol":"6.9.0","ol-mapbox-style":"6.7.0","proj4":"2.7.5","proj4leaflet":"1.0.2","sortablejs":"1.14.0","three":"0.137.5","typescript":"^4.5.5","whatwg-fetch":"3.0.0"},"devDependencies":{"@babel/core":"^7.4.4","@babel/plugin-transform-template-literals":"^7.7.4","@babel/preset-env":"^7.4.4","babel-loader":"^8.0.5","chai":"^4.2.0","chalk":"^4.0.0","clean-webpack-plugin":"^3.0.0","copy-webpack-plugin":"^5.0.3","core-js":"^3.6.4","css-loader":"^3.4.2","eslint":"^6.8.0","eslint-config-standard":"^14.1.1","eslint-loader":"^4.0.0","eslint-plugin-import":"^2.17.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.1.1","eslint-plugin-standard":"^4.0.0","exports-loader":"^0.7.0","expose-loader":"^0.7.5","fs-extra":"^9.0.0","handlebars":"^4.7.5","handlebars-layouts":"^3.1.4","html-webpack-plugin":"^4.0.4","jsdoc-webpack-plugin":"^0.3.0","mini-css-extract-plugin":"^0.9.0","mocha":"^7.1.1","mocha-loader":"^5.0.0","npm-run-all":"^4.1.5","optimize-css-assets-webpack-plugin":"^5.0.1","path":"^0.12.7","replace-bundle-webpack-plugin":"^1.0.0","requirejs":"^2.3.6","responsive-loader":"^1.2.0","speed-measure-webpack-plugin":"^1.3.0","string-template":"^1.0.0","style-loader":"^1.1.3","terser-webpack-plugin":"^2.0.0","url-loader":"^4.0.0","webpack":"^4.30.0","webpack-cli":"^3.3.1","webpack-dev-server":"^3.3.1","webpack-node-externals":"^1.7.2"}}')},function(e,t,o){var n,i;!function(r,a){"use strict";void 0===(i="function"==typeof(n=function(){var e=function(){},t="undefined"!=typeof window&&void 0!==window.navigator&&/Trident\/|MSIE /.test(window.navigator.userAgent),o=["trace","debug","info","warn","error"];function n(e,t){var o=e[t];if("function"==typeof o.bind)return o.bind(e);try{return Function.prototype.bind.call(o,e)}catch(t){return function(){return Function.prototype.apply.apply(o,[e,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function r(o){return"debug"===o&&(o="log"),"undefined"!=typeof console&&("trace"===o&&t?i:void 0!==console[o]?n(console,o):void 0!==console.log?n(console,"log"):e)}function a(t,n){for(var i=0;i=0&&t<=r.levels.SILENT))throw"log.setLevel() called with invalid level: "+t;if(i=t,!1!==n&&function(e){var t=(o[e]||"silent").toUpperCase();if("undefined"!=typeof window&&s){try{return void(window.localStorage[s]=t)}catch(e){}try{window.document.cookie=encodeURIComponent(s)+"="+t+";"}catch(e){}}}(t),a.call(r,t,e),"undefined"==typeof console&&t1?p[p.length-2].toLowerCase():"";if(h==g||h==g.replace("-","")||m+"-"+h==g){s=o[g],p.pop(),m&&g.startsWith(m)&&p.pop();break}}"number"==typeof h&&(s=h);var f=p.join(" ").replace("Klokantech Noto Sans","Noto Sans");-1!==f.indexOf(" ")&&(f='"'+f+'"'),c.push(f)}a=i[e]=[l,s,c]}return a[0]+" "+a[1]+" "+t+"px"+(r?"/"+r:"")+" "+a[2]}},function(e,t){e.exports=ol.Map},function(e,t){e.exports=ol.tilegrid.TileGrid},function(e,t){e.exports=ol.render.canvas},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t){e.exports=void 0},function(e,t){e.exports=ol.source.ImageWMS},function(e,t,o){(function(t,o){ /*! * @overview es6-promise - a tiny implementation of Promises/A+. * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) @@ -103,13 +103,13 @@ var Gp=function(e){var t={};function o(n){if(t[n])return t[n].exports;var i=t[n] * @author Feross Aboukhadijeh * @license MIT */ -var n=o(100),i=o(101),r=o(102);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function g(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var o=e.length;if(0===o)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return o;case"utf8":case"utf-8":case void 0:return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*o;case"hex":return o>>>1;case"base64":return F(e).length;default:if(n)return B(e).length;t=(""+t).toLowerCase(),n=!0}}function m(e,t,o){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===o||o>this.length)&&(o=this.length),o<=0)return"";if((o>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,o);case"utf8":case"utf-8":return S(this,t,o);case"ascii":return M(this,t,o);case"latin1":case"binary":return P(this,t,o);case"base64":return E(this,t,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,o);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function f(e,t,o){var n=e[t];e[t]=e[o],e[o]=n}function y(e,t,o,n,i){if(0===e.length)return-1;if("string"==typeof o?(n=o,o=0):o>2147483647?o=2147483647:o<-2147483648&&(o=-2147483648),o=+o,isNaN(o)&&(o=i?0:e.length-1),o<0&&(o=e.length+o),o>=e.length){if(i)return-1;o=e.length-1}else if(o<0){if(!i)return-1;o=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:A(e,t,o,n,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,o):Uint8Array.prototype.lastIndexOf.call(e,t,o):A(e,[t],o,n,i);throw new TypeError("val must be string, number or Buffer")}function A(e,t,o,n,i){var r,a=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,o/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(r=o;rs&&(o=s-l),r=o;r>=0;r--){for(var d=!0,p=0;pi&&(n=i):n=i;var r=t.length;if(r%2!=0)throw new TypeError("Invalid hex string");n>r/2&&(n=r/2);for(var a=0;a>8,i=o%256,r.push(i),r.push(n);return r}(t,e.length-o),e,o,n)}function E(e,t,o){return 0===t&&o===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,o))}function S(e,t,o){o=Math.min(e.length,o);for(var n=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+d<=o)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(r=e[i+1]))&&(l=(31&c)<<6|63&r)>127&&(u=l);break;case 3:r=e[i+1],a=e[i+2],128==(192&r)&&128==(192&a)&&(l=(15&c)<<12|(63&r)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:r=e[i+1],a=e[i+2],s=e[i+3],128==(192&r)&&128==(192&a)&&128==(192&s)&&(l=(15&c)<<18|(63&r)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var o="",n=0;for(;n0&&(e=this.toString("hex",0,o).match(/.{2}/g).join(" "),this.length>o&&(e+=" ... ")),""},l.prototype.compare=function(e,t,o,n,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===o&&(o=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||o>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=o)return 0;if(n>=i)return-1;if(t>=o)return 1;if(this===e)return 0;for(var r=(i>>>=0)-(n>>>=0),a=(o>>>=0)-(t>>>=0),s=Math.min(r,a),c=this.slice(n,i),u=e.slice(t,o),d=0;di)&&(o=i),e.length>0&&(o<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var r=!1;;)switch(n){case"hex":return v(this,e,t,o);case"utf8":case"utf-8":return C(this,e,t,o);case"ascii":return I(this,e,t,o);case"latin1":case"binary":return b(this,e,t,o);case"base64":return w(this,e,t,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,o);default:if(r)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),r=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function M(e,t,o){var n="";o=Math.min(e.length,o);for(var i=t;in)&&(o=n);for(var i="",r=t;ro)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,o,n,i,r){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function T(e,t,o,n){t<0&&(t=65535+t+1);for(var i=0,r=Math.min(e.length-o,2);i>>8*(n?i:1-i)}function O(e,t,o,n){t<0&&(t=4294967295+t+1);for(var i=0,r=Math.min(e.length-o,4);i>>8*(n?i:3-i)&255}function L(e,t,o,n,i,r){if(o+n>e.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("Index out of range")}function D(e,t,o,n,r){return r||L(e,0,o,4),i.write(e,t,o,n,23,4),o+4}function j(e,t,o,n,r){return r||L(e,0,o,8),i.write(e,t,o,n,52,8),o+8}l.prototype.slice=function(e,t){var o,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},l.prototype.readUInt8=function(e,t){return t||G(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||G(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||G(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||G(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||G(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,o){e|=0,t|=0,o||G(e,t,this.length);for(var n=this[e],i=1,r=0;++r=(i*=128)&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,o){e|=0,t|=0,o||G(e,t,this.length);for(var n=t,i=1,r=this[e+--n];n>0&&(i*=256);)r+=this[e+--n]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readInt8=function(e,t){return t||G(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||G(e,2,this.length);var o=this[e]|this[e+1]<<8;return 32768&o?4294901760|o:o},l.prototype.readInt16BE=function(e,t){t||G(e,2,this.length);var o=this[e+1]|this[e]<<8;return 32768&o?4294901760|o:o},l.prototype.readInt32LE=function(e,t){return t||G(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||G(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||G(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||G(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||G(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||G(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,o,n){(e=+e,t|=0,o|=0,n)||R(this,e,t,o,Math.pow(2,8*o)-1,0);var i=1,r=0;for(this[t]=255&e;++r=0&&(r*=256);)this[t+i]=e/r&255;return t+o},l.prototype.writeUInt8=function(e,t,o){return e=+e,t|=0,o||R(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,o){return e=+e,t|=0,o||R(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,o){return e=+e,t|=0,o||R(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,o){return e=+e,t|=0,o||R(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):O(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,o){return e=+e,t|=0,o||R(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,o,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*o-1);R(this,e,t,o,i-1,-i)}var r=0,a=1,s=0;for(this[t]=255&e;++r>0)-s&255;return t+o},l.prototype.writeIntBE=function(e,t,o,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*o-1);R(this,e,t,o,i-1,-i)}var r=o-1,a=1,s=0;for(this[t+r]=255&e;--r>=0&&(a*=256);)e<0&&0===s&&0!==this[t+r+1]&&(s=1),this[t+r]=(e/a>>0)-s&255;return t+o},l.prototype.writeInt8=function(e,t,o){return e=+e,t|=0,o||R(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,o){return e=+e,t|=0,o||R(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,o){return e=+e,t|=0,o||R(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,o){return e=+e,t|=0,o||R(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):O(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,o){return e=+e,t|=0,o||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,o){return D(this,e,t,!0,o)},l.prototype.writeFloatBE=function(e,t,o){return D(this,e,t,!1,o)},l.prototype.writeDoubleLE=function(e,t,o){return j(this,e,t,!0,o)},l.prototype.writeDoubleBE=function(e,t,o){return j(this,e,t,!1,o)},l.prototype.copy=function(e,t,o,n){if(o||(o=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+o];else if(r<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,o=void 0===o?this.length:o>>>0,e||(e=0),"number"==typeof e)for(r=t;r55295&&o<57344){if(!i){if(o>56319){(t-=3)>-1&&r.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&r.push(239,191,189);continue}i=o;continue}if(o<56320){(t-=3)>-1&&r.push(239,191,189),i=o;continue}o=65536+(i-55296<<10|o-56320)}else i&&(t-=3)>-1&&r.push(239,191,189);if(i=null,o<128){if((t-=1)<0)break;r.push(o)}else if(o<2048){if((t-=2)<0)break;r.push(o>>6|192,63&o|128)}else if(o<65536){if((t-=3)<0)break;r.push(o>>12|224,o>>6&63|128,63&o|128)}else{if(!(o<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;r.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}}return r}function F(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,o,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+o]=e[i];return i}}).call(this,o(28))},function(e,t,o){"use strict";t.byteLength=function(e){var t=c(e),o=t[0],n=t[1];return 3*(o+n)/4-n},t.toByteArray=function(e){var t,o,n=c(e),a=n[0],s=n[1],l=new r(function(e,t,o){return 3*(t+o)/4-o}(0,a,s)),u=0,d=s>0?a-4:a;for(o=0;o>16&255,l[u++]=t>>8&255,l[u++]=255&t;2===s&&(t=i[e.charCodeAt(o)]<<2|i[e.charCodeAt(o+1)]>>4,l[u++]=255&t);1===s&&(t=i[e.charCodeAt(o)]<<10|i[e.charCodeAt(o+1)]<<4|i[e.charCodeAt(o+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t);return l},t.fromByteArray=function(e){for(var t,o=e.length,i=o%3,r=[],a=0,s=o-i;as?s:a+16383));1===i?(t=e[o-1],r.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[o-2]<<8)+e[o-1],r.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return r.join("")};for(var n=[],i=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var o=e.indexOf("=");return-1===o&&(o=t),[o,o===t?0:4-o%4]}function u(e,t,o){for(var i,r,a=[],s=t;s>18&63]+n[r>>12&63]+n[r>>6&63]+n[63&r]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){ +var n=o(100),i=o(101),r=o(102);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function g(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var o=e.length;if(0===o)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return o;case"utf8":case"utf-8":case void 0:return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*o;case"hex":return o>>>1;case"base64":return F(e).length;default:if(n)return B(e).length;t=(""+t).toLowerCase(),n=!0}}function m(e,t,o){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===o||o>this.length)&&(o=this.length),o<=0)return"";if((o>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,o);case"utf8":case"utf-8":return S(this,t,o);case"ascii":return M(this,t,o);case"latin1":case"binary":return P(this,t,o);case"base64":return E(this,t,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,o);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function f(e,t,o){var n=e[t];e[t]=e[o],e[o]=n}function y(e,t,o,n,i){if(0===e.length)return-1;if("string"==typeof o?(n=o,o=0):o>2147483647?o=2147483647:o<-2147483648&&(o=-2147483648),o=+o,isNaN(o)&&(o=i?0:e.length-1),o<0&&(o=e.length+o),o>=e.length){if(i)return-1;o=e.length-1}else if(o<0){if(!i)return-1;o=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:A(e,t,o,n,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,o):Uint8Array.prototype.lastIndexOf.call(e,t,o):A(e,[t],o,n,i);throw new TypeError("val must be string, number or Buffer")}function A(e,t,o,n,i){var r,a=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,o/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(r=o;rs&&(o=s-l),r=o;r>=0;r--){for(var d=!0,p=0;pi&&(n=i):n=i;var r=t.length;if(r%2!=0)throw new TypeError("Invalid hex string");n>r/2&&(n=r/2);for(var a=0;a>8,i=o%256,r.push(i),r.push(n);return r}(t,e.length-o),e,o,n)}function E(e,t,o){return 0===t&&o===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,o))}function S(e,t,o){o=Math.min(e.length,o);for(var n=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+d<=o)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(r=e[i+1]))&&(l=(31&c)<<6|63&r)>127&&(u=l);break;case 3:r=e[i+1],a=e[i+2],128==(192&r)&&128==(192&a)&&(l=(15&c)<<12|(63&r)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:r=e[i+1],a=e[i+2],s=e[i+3],128==(192&r)&&128==(192&a)&&128==(192&s)&&(l=(15&c)<<18|(63&r)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var o="",n=0;for(;n0&&(e=this.toString("hex",0,o).match(/.{2}/g).join(" "),this.length>o&&(e+=" ... ")),""},l.prototype.compare=function(e,t,o,n,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===o&&(o=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||o>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=o)return 0;if(n>=i)return-1;if(t>=o)return 1;if(this===e)return 0;for(var r=(i>>>=0)-(n>>>=0),a=(o>>>=0)-(t>>>=0),s=Math.min(r,a),c=this.slice(n,i),u=e.slice(t,o),d=0;di)&&(o=i),e.length>0&&(o<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var r=!1;;)switch(n){case"hex":return v(this,e,t,o);case"utf8":case"utf-8":return C(this,e,t,o);case"ascii":return I(this,e,t,o);case"latin1":case"binary":return b(this,e,t,o);case"base64":return w(this,e,t,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,o);default:if(r)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),r=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function M(e,t,o){var n="";o=Math.min(e.length,o);for(var i=t;in)&&(o=n);for(var i="",r=t;ro)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,o,n,i,r){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function T(e,t,o,n){t<0&&(t=65535+t+1);for(var i=0,r=Math.min(e.length-o,2);i>>8*(n?i:1-i)}function O(e,t,o,n){t<0&&(t=4294967295+t+1);for(var i=0,r=Math.min(e.length-o,4);i>>8*(n?i:3-i)&255}function L(e,t,o,n,i,r){if(o+n>e.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("Index out of range")}function D(e,t,o,n,r){return r||L(e,0,o,4),i.write(e,t,o,n,23,4),o+4}function j(e,t,o,n,r){return r||L(e,0,o,8),i.write(e,t,o,n,52,8),o+8}l.prototype.slice=function(e,t){var o,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},l.prototype.readUInt8=function(e,t){return t||G(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||G(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||G(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||G(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||G(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,o){e|=0,t|=0,o||G(e,t,this.length);for(var n=this[e],i=1,r=0;++r=(i*=128)&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,o){e|=0,t|=0,o||G(e,t,this.length);for(var n=t,i=1,r=this[e+--n];n>0&&(i*=256);)r+=this[e+--n]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readInt8=function(e,t){return t||G(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||G(e,2,this.length);var o=this[e]|this[e+1]<<8;return 32768&o?4294901760|o:o},l.prototype.readInt16BE=function(e,t){t||G(e,2,this.length);var o=this[e+1]|this[e]<<8;return 32768&o?4294901760|o:o},l.prototype.readInt32LE=function(e,t){return t||G(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||G(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||G(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||G(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||G(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||G(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,o,n){(e=+e,t|=0,o|=0,n)||R(this,e,t,o,Math.pow(2,8*o)-1,0);var i=1,r=0;for(this[t]=255&e;++r=0&&(r*=256);)this[t+i]=e/r&255;return t+o},l.prototype.writeUInt8=function(e,t,o){return e=+e,t|=0,o||R(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,o){return e=+e,t|=0,o||R(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,o){return e=+e,t|=0,o||R(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,o){return e=+e,t|=0,o||R(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):O(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,o){return e=+e,t|=0,o||R(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,o,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*o-1);R(this,e,t,o,i-1,-i)}var r=0,a=1,s=0;for(this[t]=255&e;++r>0)-s&255;return t+o},l.prototype.writeIntBE=function(e,t,o,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*o-1);R(this,e,t,o,i-1,-i)}var r=o-1,a=1,s=0;for(this[t+r]=255&e;--r>=0&&(a*=256);)e<0&&0===s&&0!==this[t+r+1]&&(s=1),this[t+r]=(e/a>>0)-s&255;return t+o},l.prototype.writeInt8=function(e,t,o){return e=+e,t|=0,o||R(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,o){return e=+e,t|=0,o||R(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,o){return e=+e,t|=0,o||R(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,o){return e=+e,t|=0,o||R(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):O(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,o){return e=+e,t|=0,o||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,o){return D(this,e,t,!0,o)},l.prototype.writeFloatBE=function(e,t,o){return D(this,e,t,!1,o)},l.prototype.writeDoubleLE=function(e,t,o){return j(this,e,t,!0,o)},l.prototype.writeDoubleBE=function(e,t,o){return j(this,e,t,!1,o)},l.prototype.copy=function(e,t,o,n){if(o||(o=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+o];else if(r<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,o=void 0===o?this.length:o>>>0,e||(e=0),"number"==typeof e)for(r=t;r55295&&o<57344){if(!i){if(o>56319){(t-=3)>-1&&r.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&r.push(239,191,189);continue}i=o;continue}if(o<56320){(t-=3)>-1&&r.push(239,191,189),i=o;continue}o=65536+(i-55296<<10|o-56320)}else i&&(t-=3)>-1&&r.push(239,191,189);if(i=null,o<128){if((t-=1)<0)break;r.push(o)}else if(o<2048){if((t-=2)<0)break;r.push(o>>6|192,63&o|128)}else if(o<65536){if((t-=3)<0)break;r.push(o>>12|224,o>>6&63|128,63&o|128)}else{if(!(o<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;r.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}}return r}function F(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(N,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,o,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+o]=e[i];return i}}).call(this,o(28))},function(e,t,o){"use strict";t.byteLength=function(e){var t=c(e),o=t[0],n=t[1];return 3*(o+n)/4-n},t.toByteArray=function(e){var t,o,n=c(e),a=n[0],s=n[1],l=new r(function(e,t,o){return 3*(t+o)/4-o}(0,a,s)),u=0,d=s>0?a-4:a;for(o=0;o>16&255,l[u++]=t>>8&255,l[u++]=255&t;2===s&&(t=i[e.charCodeAt(o)]<<2|i[e.charCodeAt(o+1)]>>4,l[u++]=255&t);1===s&&(t=i[e.charCodeAt(o)]<<10|i[e.charCodeAt(o+1)]<<4|i[e.charCodeAt(o+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t);return l},t.fromByteArray=function(e){for(var t,o=e.length,i=o%3,r=[],a=0,s=o-i;as?s:a+16383));1===i?(t=e[o-1],r.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[o-2]<<8)+e[o-1],r.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return r.join("")};for(var n=[],i=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var o=e.indexOf("=");return-1===o&&(o=t),[o,o===t?0:4-o%4]}function u(e,t,o){for(var i,r,a=[],s=t;s>18&63]+n[r>>12&63]+n[r>>6&63]+n[63&r]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ -t.read=function(e,t,o,n,i){var r,a,s=8*i-n-1,l=(1<>1,u=-7,d=o?i-1:0,p=o?-1:1,h=e[t+d];for(d+=p,r=h&(1<<-u)-1,h>>=-u,u+=s;u>0;r=256*r+e[t+d],d+=p,u-=8);for(a=r&(1<<-u)-1,r>>=-u,u+=n;u>0;a=256*a+e[t+d],d+=p,u-=8);if(0===r)r=1-c;else{if(r===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),r-=c}return(h?-1:1)*a*Math.pow(2,r-n)},t.write=function(e,t,o,n,i,r){var a,s,l,c=8*r-i-1,u=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:r-1,g=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?p/l:p*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[o+h]=255&s,h+=g,s/=256,i-=8);for(a=a<0;e[o+h]=255&a,h+=g,a/=256,c-=8);e[o+h-g]|=128*m}},function(e,t){var o={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==o.call(e)}},function(e,t,o){e.exports=function(){"use strict";var e=484813681109536e-20,t=Math.PI/2,o=.017453292519943295,n=57.29577951308232,i=Math.PI/4,r=2*Math.PI,a=3.14159265359,s={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},l={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},c=/[\s_\-\/\(\)]/g;function u(e,t){if(e[t])return e[t];for(var o,n=Object.keys(e),i=t.toLowerCase().replace(c,""),r=-1;++r=this.text.length)return;e=this.text[this.place++]}switch(this.state){case 1:return this.neutral(e);case 2:return this.keyword(e);case 4:return this.quoted(e);case 5:return this.afterquote(e);case 3:return this.number(e);case-1:return}},y.prototype.afterquote=function(e){if('"'===e)return this.word+='"',void(this.state=4);if(m.test(e))return this.word=this.word.trim(),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in afterquote yet, index '+this.place)},y.prototype.afterItem=function(e){return","===e?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=1)):"]"===e?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=1,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},y.prototype.number=function(e){if(!f.test(e)){if(m.test(e))return this.word=parseFloat(this.word),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in number yet, index '+this.place)}this.word+=e},y.prototype.quoted=function(e){'"'!==e?this.word+=e:this.state=5},y.prototype.keyword=function(e){if(g.test(e))this.word+=e;else{if("["===e){var t=[];return t.push(this.word),this.level++,null===this.root?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,void(this.state=1)}if(!m.test(e))throw new Error("havn't handled \""+e+'" in keyword yet, index '+this.place);this.afterItem(e)}},y.prototype.neutral=function(e){if(h.test(e))return this.word=e,void(this.state=2);if('"'===e)return this.word="",void(this.state=4);if(f.test(e))return this.word=e,void(this.state=3);if(!m.test(e))throw new Error("havn't handled \""+e+'" in neutral yet, index '+this.place);this.afterItem(e)},y.prototype.output=function(){for(;this.place0?90:-90),e.lat_ts=e.lat1)}(i),i};function b(e){var t=this;if(2===arguments.length){var o=arguments[1];"string"==typeof o?"+"===o.charAt(0)?b[e]=d(arguments[1]):b[e]=I(arguments[1]):b[e]=o}else if(1===arguments.length){if(Array.isArray(e))return e.map((function(e){Array.isArray(e)?b.apply(t,e):b(e)}));if("string"==typeof e){if(e in b)return b[e]}else"EPSG"in e?b["EPSG:"+e.EPSG]=e:"ESRI"in e?b["ESRI:"+e.ESRI]=e:"IAU2000"in e?b["IAU2000:"+e.IAU2000]=e:console.log(e);return}}!function(e){e("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),e("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),e("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),e.WGS84=e["EPSG:4326"],e["EPSG:3785"]=e["EPSG:3857"],e.GOOGLE=e["EPSG:3857"],e["EPSG:900913"]=e["EPSG:3857"],e["EPSG:102113"]=e["EPSG:3857"]}(b);var w=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"],_=["3857","900913","3785","102113"];function E(e){if(!function(e){return"string"==typeof e}(e))return e;if(function(e){return e in b}(e))return b[e];if(function(e){return w.some((function(t){return e.indexOf(t)>-1}))}(e)){var t=I(e);if(function(e){var t=u(e,"authority");if(t){var o=u(t,"epsg");return o&&_.indexOf(o)>-1}}(t))return b["EPSG:3857"];var o=function(e){var t=u(e,"extension");if(t)return u(t,"proj4")}(t);return o?d(o):t}return function(e){return"+"===e[0]}(e)?d(e):void 0}var S=function(e,t){var o,n;if(e=e||{},!t)return e;for(n in t)void 0!==(o=t[n])&&(e[n]=o);return e},M=function(e,t,o){var n=e*t;return o/Math.sqrt(1-n*n)},P=function(e){return e<0?-1:1},x=function(e){return Math.abs(e)<=a?e:e-P(e)*r},k=function(e,o,n){var i=e*n,r=.5*e;return i=Math.pow((1-i)/(1+i),r),Math.tan(.5*(t-o))/i},G=function(e,o){for(var n,i,r=.5*e,a=t-2*Math.atan(o),s=0;s<=15;s++)if(n=e*Math.sin(a),a+=i=t-2*Math.atan(o*Math.pow((1-n)/(1+n),r))-a,Math.abs(i)<=1e-10)return a;return-9999};function R(e){return e}var T=[{init:function(){var e=this.b/this.a;this.es=1-e*e,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=M(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(e){var o,r,a=e.x,s=e.y;if(s*n>90&&s*n<-90&&a*n>180&&a*n<-180)return null;if(Math.abs(Math.abs(s)-t)<=1e-10)return null;if(this.sphere)o=this.x0+this.a*this.k0*x(a-this.long0),r=this.y0+this.a*this.k0*Math.log(Math.tan(i+.5*s));else{var l=Math.sin(s),c=k(this.e,s,l);o=this.x0+this.a*this.k0*x(a-this.long0),r=this.y0-this.a*this.k0*Math.log(c)}return e.x=o,e.y=r,e},inverse:function(e){var o,n,i=e.x-this.x0,r=e.y-this.y0;if(this.sphere)n=t-2*Math.atan(Math.exp(-r/(this.a*this.k0)));else{var a=Math.exp(-r/(this.a*this.k0));if(-9999===(n=G(this.e,a)))return null}return o=x(this.long0+i/(this.a*this.k0)),e.x=o,e.y=n,e},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:R,inverse:R,names:["longlat","identity"]}],O={},L=[];function D(e,t){var o=L.length;return e.names?(L[o]=e,e.names.forEach((function(e){O[e.toLowerCase()]=o})),this):(console.log(t),!0)}var j={start:function(){T.forEach(D)},add:D,get:function(e){if(!e)return!1;var t=e.toLowerCase();return void 0!==O[t]&&L[O[t]]?L[O[t]]:void 0}},U={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},N=U.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};U.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var B={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"}},F={};function z(e){if(0===e.length)return null;var t="@"===e[0];return t&&(e=e.slice(1)),"null"===e?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:e,mandatory:!t,grid:F[e]||null,isNull:!1}}function V(e){return e/3600*Math.PI/180}function W(e,t,o){return String.fromCharCode.apply(null,new Uint8Array(e.buffer.slice(t,o)))}function q(e){return e.map((function(e){return[V(e.longitudeShift),V(e.latitudeShift)]}))}function H(e,t,o){return{name:W(e,t+8,t+16).trim(),parent:W(e,t+24,t+24+8).trim(),lowerLatitude:e.getFloat64(t+72,o),upperLatitude:e.getFloat64(t+88,o),lowerLongitude:e.getFloat64(t+104,o),upperLongitude:e.getFloat64(t+120,o),latitudeInterval:e.getFloat64(t+136,o),longitudeInterval:e.getFloat64(t+152,o),gridNodeCount:e.getInt32(t+168,o)}}function Y(e,t,o,n){for(var i=t+176,r=[],a=0;a3&&(0===l.datum_params[3]&&0===l.datum_params[4]&&0===l.datum_params[5]&&0===l.datum_params[6]||(l.datum_type=2,l.datum_params[3]*=e,l.datum_params[4]*=e,l.datum_params[5]*=e,l.datum_params[6]=l.datum_params[6]/1e6+1))),s&&(l.datum_type=3,l.grids=s),l.a=n,l.b=i,l.es=r,l.ep2=a,l}(n.datumCode,n.datum_params,g.a,g.b,m.es,m.ep2,f);S(this,n),S(this,i),this.a=g.a,this.b=g.b,this.rf=g.rf,this.sphere=g.sphere,this.es=m.es,this.e=m.e,this.ep2=m.ep2,this.datum=y,this.init(),o(null,this)}else o(t)}else o(t)}function Z(e,o,n){var i,r,a,s,l=e.x,c=e.y,u=e.z?e.z:0;if(c<-t&&c>-1.001*t)c=-t;else if(c>t&&c<1.001*t)c=t;else{if(c<-t)return{x:-1/0,y:-1/0,z:e.z};if(c>t)return{x:1/0,y:1/0,z:e.z}}return l>Math.PI&&(l-=2*Math.PI),r=Math.sin(c),s=Math.cos(c),a=r*r,{x:((i=n/Math.sqrt(1-o*a))+u)*s*Math.cos(l),y:(i+u)*s*Math.sin(l),z:(i*(1-o)+u)*r}}function K(e,t,o,n){var i,r,a,s,l,c,u,d,p,h,g,m,f,y,A,v=e.x,C=e.y,I=e.z?e.z:0;if(i=Math.sqrt(v*v+C*C),r=Math.sqrt(v*v+C*C+I*I),i/o<1e-12){if(y=0,r/o<1e-12)return A=-n,{x:e.x,y:e.y,z:e.z}}else y=Math.atan2(C,v);a=I/r,d=(s=i/r)*(1-t)*(l=1/Math.sqrt(1-t*(2-t)*s*s)),p=a*l,f=0;do{f++,c=t*(u=o/Math.sqrt(1-t*p*p))/(u+(A=i*d+I*p-u*(1-t*p*p))),m=(g=a*(l=1/Math.sqrt(1-c*(2-c)*s*s)))*d-(h=s*(1-c)*l)*p,d=h,p=g}while(m*m>1e-24&&f<30);return{x:y,y:Math.atan(g/Math.abs(h)),z:A}}function X(e){return 1===e||2===e}J.projections=j,J.projections.start();var Q=function(e,t,o){if(function(e,t){return e.datum_type===t.datum_type&&!(e.a!==t.a||Math.abs(e.es-t.es)>5e-11)&&(1===e.datum_type?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]:2!==e.datum_type||e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]&&e.datum_params[3]===t.datum_params[3]&&e.datum_params[4]===t.datum_params[4]&&e.datum_params[5]===t.datum_params[5]&&e.datum_params[6]===t.datum_params[6])}(e,t))return o;if(5===e.datum_type||5===t.datum_type)return o;var n=e.a,i=e.es;if(3===e.datum_type){if(0!==$(e,!1,o))return;n=6378137,i=.0066943799901413165}var r=t.a,a=t.b,s=t.es;return 3===t.datum_type&&(r=6378137,a=6356752.314,s=.0066943799901413165),i!==s||n!==r||X(e.datum_type)||X(t.datum_type)?(o=Z(o,i,n),X(e.datum_type)&&(o=function(e,t,o){if(1===t)return{x:e.x+o[0],y:e.y+o[1],z:e.z+o[2]};if(2===t){var n=o[0],i=o[1],r=o[2],a=o[3],s=o[4],l=o[5],c=o[6];return{x:c*(e.x-l*e.y+s*e.z)+n,y:c*(l*e.x+e.y-a*e.z)+i,z:c*(-s*e.x+a*e.y+e.z)+r}}}(o,e.datum_type,e.datum_params)),X(t.datum_type)&&(o=function(e,t,o){if(1===t)return{x:e.x-o[0],y:e.y-o[1],z:e.z-o[2]};if(2===t){var n=o[0],i=o[1],r=o[2],a=o[3],s=o[4],l=o[5],c=o[6],u=(e.x-n)/c,d=(e.y-i)/c,p=(e.z-r)/c;return{x:u+l*d-s*p,y:-l*u+d+a*p,z:s*u-a*d+p}}}(o,t.datum_type,t.datum_params)),o=K(o,s,r,a),3!==t.datum_type||0===$(t,!0,o)?o:void 0):o};function $(e,t,o){if(null===e.grids||0===e.grids.length)return console.log("Grid shift grids not found"),-1;for(var i={x:-o.x,y:o.y},r={x:Number.NaN,y:Number.NaN},a=[],s=0;si.y||d>i.x||g1e-12&&Math.abs(a.y)>1e-12);if(l<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=x(r.x+o.ll[0]),n.y=r.y+o.ll[1]}else isNaN(r.x)||(n.x=e.x+r.x,n.y=e.y+r.y);return n}function te(e,t){var o,n={x:e.x/t.del[0],y:e.y/t.del[1]},i=Math.floor(n.x),r=Math.floor(n.y),a=n.x-1*i,s=n.y-1*r,l={x:Number.NaN,y:Number.NaN};if(i<0||i>=t.lim[0])return l;if(r<0||r>=t.lim[1])return l;o=r*t.lim[0]+i;var c=t.cvs[o][0],u=t.cvs[o][1];o++;var d=t.cvs[o][0],p=t.cvs[o][1];o+=t.lim[0];var h=t.cvs[o][0],g=t.cvs[o][1];o--;var m=t.cvs[o][0],f=t.cvs[o][1],y=a*s,A=a*(1-s),v=(1-a)*(1-s),C=(1-a)*s;return l.x=v*c+A*d+C*m+y*h,l.y=v*u+A*p+C*f+y*g,l}var oe=function(e,t,o){var n,i,r,a=o.x,s=o.y,l=o.z||0,c={};for(r=0;r<3;r++)if(!t||2!==r||void 0!==o.z)switch(0===r?(n=a,i=-1!=="ew".indexOf(e.axis[r])?"x":"y"):1===r?(n=s,i=-1!=="ns".indexOf(e.axis[r])?"y":"x"):(n=l,i="z"),e.axis[r]){case"e":c[i]=n;break;case"w":c[i]=-n;break;case"n":c[i]=n;break;case"s":c[i]=-n;break;case"u":void 0!==o[i]&&(c.z=n);break;case"d":void 0!==o[i]&&(c.z=-n);break;default:return null}return c},ne=function(e){var t={x:e[0],y:e[1]};return e.length>2&&(t.z=e[2]),e.length>3&&(t.m=e[3]),t};function ie(e){if("function"==typeof Number.isFinite){if(Number.isFinite(e))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof e||e!=e||!isFinite(e))throw new TypeError("coordinates must be finite numbers")}function re(e,t,i,r){var a;if(Array.isArray(i)&&(i=ne(i)),function(e){ie(e.x),ie(e.y)}(i),e.datum&&t.datum&&function(e,t){return(1===e.datum.datum_type||2===e.datum.datum_type)&&"WGS84"!==t.datumCode||(1===t.datum.datum_type||2===t.datum.datum_type)&&"WGS84"!==e.datumCode}(e,t)&&(i=re(e,a=new J("WGS84"),i,r),e=a),r&&"enu"!==e.axis&&(i=oe(e,!1,i)),"longlat"===e.projName)i={x:i.x*o,y:i.y*o,z:i.z||0};else if(e.to_meter&&(i={x:i.x*e.to_meter,y:i.y*e.to_meter,z:i.z||0}),!(i=e.inverse(i)))return;if(e.from_greenwich&&(i.x+=e.from_greenwich),i=Q(e.datum,t.datum,i))return t.from_greenwich&&(i={x:i.x-t.from_greenwich,y:i.y,z:i.z||0}),"longlat"===t.projName?i={x:i.x*n,y:i.y*n,z:i.z||0}:(i=t.forward(i),t.to_meter&&(i={x:i.x/t.to_meter,y:i.y/t.to_meter,z:i.z||0})),r&&"enu"!==t.axis?oe(t,!0,i):i}var ae=J("WGS84");function se(e,t,o,n){var i,r,a;return Array.isArray(o)?(i=re(e,t,o,n)||{x:NaN,y:NaN},o.length>2?void 0!==e.name&&"geocent"===e.name||void 0!==t.name&&"geocent"===t.name?"number"==typeof i.z?[i.x,i.y,i.z].concat(o.splice(3)):[i.x,i.y,o[2]].concat(o.splice(3)):[i.x,i.y].concat(o.splice(2)):[i.x,i.y]):(r=re(e,t,o,n),2===(a=Object.keys(o)).length||a.forEach((function(n){if(void 0!==e.name&&"geocent"===e.name||void 0!==t.name&&"geocent"===t.name){if("x"===n||"y"===n||"z"===n)return}else if("x"===n||"y"===n)return;r[n]=o[n]})),r)}function le(e){return e instanceof J?e:e.oProj?e.oProj:J(e)}function ce(e,t,o){e=le(e);var n,i=!1;return void 0===t?(t=e,e=ae,i=!0):(void 0!==t.x||Array.isArray(t))&&(o=t,t=e,e=ae,i=!0),t=le(t),o?se(e,t,o):(n={forward:function(o,n){return se(e,t,o,n)},inverse:function(o,n){return se(t,e,o,n)}},i&&(n.oProj=t),n)}var ue=65,de=73,pe=79,he={forward:ge,inverse:function(e){var t=Ae(Ce(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]},toPoint:me};function ge(e,t){return t=t||5,function(e,t){var o,n,i,r,a,s,l,c,u,d,p,h,g,m,f="00000"+e.easting,y="00000"+e.northing;return e.zoneNumber+e.zoneLetter+(u=e.easting,d=e.northing,p=e.zoneNumber,h=ve(p),g=Math.floor(u/1e5),m=Math.floor(d/1e5)%20,o=g,n=m,r="AJSAJS".charCodeAt(i=h-1),a="AFAFAF".charCodeAt(i),c=!1,(s=r+o-1)>90&&(s=s-90+ue-1,c=!0),(s===de||rde||(s>de||rpe||(s>pe||r90&&(s=s-90+ue-1),(l=a+n)>86?(l=l-86+ue-1,c=!0):c=!1,(l===de||ade||(l>de||ape||(l>pe||a86&&(l=l-86+ue-1),String.fromCharCode(s)+String.fromCharCode(l))+f.substr(f.length-5,t)+y.substr(y.length-5,t)}(function(e){var t,o,n,i,r,a,s,l=e.lat,c=e.lon,u=6378137,d=fe(l),p=fe(c);s=Math.floor((c+180)/6)+1,180===c&&(s=60),l>=56&&l<64&&c>=3&&c<12&&(s=32),l>=72&&l<84&&(c>=0&&c<9?s=31:c>=9&&c<21?s=33:c>=21&&c<33?s=35:c>=33&&c<42&&(s=37)),a=fe(6*(s-1)-180+3),t=u/Math.sqrt(1-.00669438*Math.sin(d)*Math.sin(d)),o=Math.tan(d)*Math.tan(d),n=.006739496752268451*Math.cos(d)*Math.cos(d),i=Math.cos(d)*(p-a),r=u*(.9983242984503243*d-.002514607064228144*Math.sin(2*d)+2639046602129982e-21*Math.sin(4*d)-3.418046101696858e-9*Math.sin(6*d));var h,g,m=.9996*t*(i+(1-o+n)*i*i*i/6+(5-18*o+o*o+72*n-.39089081163157013)*i*i*i*i*i/120)+5e5,f=.9996*(r+t*Math.tan(d)*(i*i/2+(5-o+9*n+4*n*n)*i*i*i*i/24+(61-58*o+o*o+600*n-2.2240339282485886)*i*i*i*i*i*i/720));return l<0&&(f+=1e7),{northing:Math.round(f),easting:Math.round(m),zoneNumber:s,zoneLetter:(h=l,g="Z",84>=h&&h>=72?g="X":72>h&&h>=64?g="W":64>h&&h>=56?g="V":56>h&&h>=48?g="U":48>h&&h>=40?g="T":40>h&&h>=32?g="S":32>h&&h>=24?g="R":24>h&&h>=16?g="Q":16>h&&h>=8?g="P":8>h&&h>=0?g="N":0>h&&h>=-8?g="M":-8>h&&h>=-16?g="L":-16>h&&h>=-24?g="K":-24>h&&h>=-32?g="J":-32>h&&h>=-40?g="H":-40>h&&h>=-48?g="G":-48>h&&h>=-56?g="F":-56>h&&h>=-64?g="E":-64>h&&h>=-72?g="D":-72>h&&h>=-80&&(g="C"),g)}}({lat:e[1],lon:e[0]}),t)}function me(e){var t=Ae(Ce(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function fe(e){return e*(Math.PI/180)}function ye(e){return e/Math.PI*180}function Ae(e){var t=e.northing,o=e.easting,n=e.zoneLetter,i=e.zoneNumber;if(i<0||i>60)return null;var r,a,s,l,c,u,d,p,h=6378137,g=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),m=o-5e5,f=t;n<"N"&&(f-=1e7),u=6*(i-1)-180+3,p=(d=f/.9996/6367449.145945056)+(3*g/2-27*g*g*g/32)*Math.sin(2*d)+(21*g*g/16-55*g*g*g*g/32)*Math.sin(4*d)+151*g*g*g/96*Math.sin(6*d),r=h/Math.sqrt(1-.00669438*Math.sin(p)*Math.sin(p)),a=Math.tan(p)*Math.tan(p),s=.006739496752268451*Math.cos(p)*Math.cos(p),l=.99330562*h/Math.pow(1-.00669438*Math.sin(p)*Math.sin(p),1.5),c=m/(.9996*r);var y=p-r*Math.tan(p)/l*(c*c/2-(5+3*a+10*s-4*s*s-.06065547077041606)*c*c*c*c/24+(61+90*a+298*s+45*a*a-1.6983531815716497-3*s*s)*c*c*c*c*c*c/720);y=ye(y);var A,v=(c-(1+2*a+s)*c*c*c/6+(5-2*s+28*a-3*s*s+.05391597401814761+24*a*a)*c*c*c*c*c/120)/Math.cos(p);if(v=u+ye(v),e.accuracy){var C=Ae({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});A={top:C.lat,right:C.lon,bottom:y,left:v}}else A={lat:y,lon:v};return A}function ve(e){var t=e%6;return 0===t&&(t=6),t}function Ce(e){if(e&&0===e.length)throw"MGRSPoint coverting from nothing";for(var t,o=e.length,n=null,i="",r=0;!/[A-Z]/.test(t=e.charAt(r));){if(r>=2)throw"MGRSPoint bad conversion from: "+e;i+=t,r++}var a=parseInt(i,10);if(0===r||r+3>o)throw"MGRSPoint bad conversion from: "+e;var s=e.charAt(r++);if(s<="A"||"B"===s||"Y"===s||s>="Z"||"I"===s||"O"===s)throw"MGRSPoint zone letter "+s+" not handled: "+e;n=e.substring(r,r+=2);for(var l=ve(a),c=function(e,t){for(var o="AJSAJS".charCodeAt(t-1),n=1e5,i=!1;o!==e.charCodeAt(0);){if(++o===de&&o++,o===pe&&o++,o>90){if(i)throw"Bad character: "+e;o=ue,i=!0}n+=1e5}return n}(n.charAt(0),l),u=function(e,t){if(e>"V")throw"MGRSPoint given invalid Northing "+e;for(var o="AFAFAF".charCodeAt(t-1),n=0,i=!1;o!==e.charCodeAt(0);){if(++o===de&&o++,o===pe&&o++,o>86){if(i)throw"Bad character: "+e;o=ue,i=!0}n+=1e5}return n}(n.charAt(1),l);u0&&(p=1e5/Math.pow(10,m),h=e.substring(r,r+m),f=parseFloat(h)*p,g=e.substring(r+m),y=parseFloat(g)*p),{easting:f+c,northing:y+u,zoneLetter:s,zoneNumber:a,accuracy:p}}function Ie(e){var t;switch(e){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+e}function be(e,t,o){if(!(this instanceof be))return new be(e,t,o);if(Array.isArray(e))this.x=e[0],this.y=e[1],this.z=e[2]||0;else if("object"==typeof e)this.x=e.x,this.y=e.y,this.z=e.z||0;else if("string"==typeof e&&void 0===t){var n=e.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=e,this.y=t,this.z=o||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}be.fromMGRS=function(e){return new be(me(e))},be.prototype.toMGRS=function(e){return ge([this.x,this.y],e)};var we=.01068115234375,_e=function(e){var t=[];t[0]=1-e*(.25+e*(.046875+e*(.01953125+e*we))),t[1]=e*(.75-e*(.046875+e*(.01953125+e*we)));var o=e*e;return t[2]=o*(.46875-e*(.013020833333333334+.007120768229166667*e)),o*=e,t[3]=o*(.3645833333333333-.005696614583333333*e),t[4]=o*e*.3076171875,t},Ee=function(e,t,o,n){return o*=t,t*=t,n[0]*e-o*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))},Se=function(e,t,o){for(var n=1/(1-t),i=e,r=20;r;--r){var a=Math.sin(i),s=1-t*a*a;if(i-=s=(Ee(i,a,Math.cos(i),o)-e)*(s*Math.sqrt(s))*n,Math.abs(s)<1e-10)return i}return i},Me={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=_e(this.es),this.ml0=Ee(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function(e){var t,o,n,i=e.x,r=e.y,a=x(i-this.long0),s=Math.sin(r),l=Math.cos(r);if(this.es){var c=l*a,u=Math.pow(c,2),d=this.ep2*Math.pow(l,2),p=Math.pow(d,2),h=Math.abs(l)>1e-10?Math.tan(r):0,g=Math.pow(h,2),m=Math.pow(g,2);t=1-this.es*Math.pow(s,2),c/=Math.sqrt(t);var f=Ee(r,s,l,this.en);o=this.a*(this.k0*c*(1+u/6*(1-g+d+u/20*(5-18*g+m+14*d-58*g*d+u/42*(61+179*m-m*g-479*g)))))+this.x0,n=this.a*(this.k0*(f-this.ml0+s*a*c/2*(1+u/12*(5-g+9*d+4*p+u/30*(61+m-58*g+270*d-330*g*d+u/56*(1385+543*m-m*g-3111*g))))))+this.y0}else{var y=l*Math.sin(a);if(Math.abs(Math.abs(y)-1)<1e-10)return 93;if(o=.5*this.a*this.k0*Math.log((1+y)/(1-y))+this.x0,n=l*Math.cos(a)/Math.sqrt(1-Math.pow(y,2)),(y=Math.abs(n))>=1){if(y-1>1e-10)return 93;n=0}else n=Math.acos(n);r<0&&(n=-n),n=this.a*this.k0*(n-this.lat0)+this.y0}return e.x=o,e.y=n,e},inverse:function(e){var o,n,i,r,a=(e.x-this.x0)*(1/this.a),s=(e.y-this.y0)*(1/this.a);if(this.es)if(o=this.ml0+s/this.k0,n=Se(o,this.es,this.en),Math.abs(n)1e-10?Math.tan(n):0,d=this.ep2*Math.pow(c,2),p=Math.pow(d,2),h=Math.pow(u,2),g=Math.pow(h,2);o=1-this.es*Math.pow(l,2);var m=a*Math.sqrt(o)/this.k0,f=Math.pow(m,2);i=n-(o*=u)*f/(1-this.es)*.5*(1-f/12*(5+3*h-9*d*h+d-4*p-f/30*(61+90*h-252*d*h+45*g+46*d-f/56*(1385+3633*h+4095*g+1574*g*h)))),r=x(this.long0+m*(1-f/6*(1+2*h+d-f/20*(5+28*h+24*g+8*d*h+6*d-f/42*(61+662*h+1320*g+720*g*h))))/c)}else i=t*P(s),r=0;else{var y=Math.exp(a/this.k0),A=.5*(y-1/y),v=this.lat0+s/this.k0,C=Math.cos(v);o=Math.sqrt((1-Math.pow(C,2))/(1+Math.pow(A,2))),i=Math.asin(o),s<0&&(i=-i),r=0===A&&0===C?0:x(Math.atan2(A,C)+this.long0)}return e.x=r,e.y=i,e},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]},Pe=function(e){var t=Math.exp(e);return t=(t-1/t)/2},xe=function(e,t){e=Math.abs(e),t=Math.abs(t);var o=Math.max(e,t),n=Math.min(e,t)/(o||1);return o*Math.sqrt(1+Math.pow(n,2))},ke=function(e){var t=Math.abs(e);return t=function(e){var t=1+e,o=t-1;return 0===o?e:e*Math.log(t)/o}(t*(1+t/(xe(1,t)+1))),e<0?-t:t},Ge=function(e,t){for(var o,n=2*Math.cos(2*t),i=e.length-1,r=e[i],a=0;--i>=0;)o=n*r-a+e[i],a=r,r=o;return t+o*Math.sin(2*t)},Re=function(e,t,o){for(var n,i,r=Math.sin(t),a=Math.cos(t),s=Pe(o),l=function(e){var t=Math.exp(e);return t=(t+1/t)/2}(o),c=2*a*l,u=-2*r*s,d=e.length-1,p=e[d],h=0,g=0,m=0;--d>=0;)n=g,i=h,p=c*(g=p)-n-u*(h=m)+e[d],m=u*g-i+c*h;return[(c=r*l)*p-(u=a*s)*m,c*m+u*p]},Te={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(Me.init.apply(this),this.forward=Me.forward,this.inverse=Me.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var e=this.es/(1+Math.sqrt(1-this.es)),t=e/(2-e),o=t;this.cgb[0]=t*(2+t*(-2/3+t*(t*(116/45+t*(26/45+t*(-2854/675)))-2))),this.cbg[0]=t*(t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))-2),o*=t,this.cgb[1]=o*(7/3+t*(t*(-227/45+t*(2704/315+t*(2323/945)))-1.6)),this.cbg[1]=o*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),o*=t,this.cgb[2]=o*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=o*(-26/15+t*(34/21+t*(1.6+t*(-12686/2835)))),o*=t,this.cgb[3]=o*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=o*(1237/630+t*(t*(-24832/14175)-2.4)),o*=t,this.cgb[4]=o*(4174/315+t*(-144838/6237)),this.cbg[4]=o*(-734/315+t*(109598/31185)),o*=t,this.cgb[5]=o*(601676/22275),this.cbg[5]=o*(444337/155925),o=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+o*(1/4+o*(1/64+o/256))),this.utg[0]=t*(t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))-.5),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=o*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=o*(13/48+t*(t*(557/1440+t*(281/630+t*(-1983433/1935360)))-.6)),o*=t,this.utg[2]=o*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=o*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),o*=t,this.utg[3]=o*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=o*(49561/161280+t*(-179/168+t*(6601661/7257600))),o*=t,this.utg[4]=o*(-4583/161280+t*(108847/3991680)),this.gtu[4]=o*(34729/80640+t*(-3418889/1995840)),o*=t,this.utg[5]=o*(-20648693/638668800),this.gtu[5]=.6650675310896665*o;var n=Ge(this.cbg,this.lat0);this.Zb=-this.Qn*(n+function(e,t){for(var o,n=2*Math.cos(t),i=e.length-1,r=e[i],a=0;--i>=0;)o=n*r-a+e[i],a=r,r=o;return Math.sin(t)*o}(this.gtu,2*n))},forward:function(e){var t=x(e.x-this.long0),o=e.y;o=Ge(this.cbg,o);var n=Math.sin(o),i=Math.cos(o),r=Math.sin(t),a=Math.cos(t);o=Math.atan2(n,a*i),t=Math.atan2(r*i,xe(n,i*a)),t=ke(Math.tan(t));var s,l,c=Re(this.gtu,2*o,2*t);return o+=c[0],t+=c[1],Math.abs(t)<=2.623395162778?(s=this.a*(this.Qn*t)+this.x0,l=this.a*(this.Qn*o+this.Zb)+this.y0):(s=1/0,l=1/0),e.x=s,e.y=l,e},inverse:function(e){var t,o,n=(e.x-this.x0)*(1/this.a),i=(e.y-this.y0)*(1/this.a);if(i=(i-this.Zb)/this.Qn,n/=this.Qn,Math.abs(n)<=2.623395162778){var r=Re(this.utg,2*i,2*n);i+=r[0],n+=r[1],n=Math.atan(Pe(n));var a=Math.sin(i),s=Math.cos(i),l=Math.sin(n),c=Math.cos(n);i=Math.atan2(a*c,xe(l,c*s)),n=Math.atan2(l,c*s),t=x(n+this.long0),o=Ge(this.cgb,i)}else t=1/0,o=1/0;return e.x=t,e.y=o,e},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"]},Oe={init:function(){var e=function(e,t){if(void 0===e){if((e=Math.floor(30*(x(t)+Math.PI)/Math.PI)+1)<0)return 0;if(e>60)return 60}return e}(this.zone,this.long0);if(void 0===e)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(e)-183)*o,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Te.init.apply(this),this.forward=Te.forward,this.inverse=Te.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"},Le=function(e,t){return Math.pow((1-e)/(1+e),t)},De={init:function(){var e=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*e*e),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(e/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+i)/(Math.pow(Math.tan(.5*this.lat0+i),this.C)*Le(this.e*e,this.ratexp))},forward:function(e){var o=e.x,n=e.y;return e.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*n+i),this.C)*Le(this.e*Math.sin(n),this.ratexp))-t,e.x=this.C*o,e},inverse:function(e){for(var o=e.x/this.C,n=e.y,r=Math.pow(Math.tan(.5*n+i)/this.K,1/this.C),a=20;a>0&&(n=2*Math.atan(r*Le(this.e*Math.sin(e.y),-.5*this.e))-t,!(Math.abs(n-e.y)<1e-14));--a)e.y=n;return a?(e.x=o,e.y=n,e):null},names:["gauss"]},je={init:function(){De.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(e){var t,o,n,i;return e.x=x(e.x-this.long0),De.forward.apply(this,[e]),t=Math.sin(e.y),o=Math.cos(e.y),n=Math.cos(e.x),i=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*o*n),e.x=i*o*Math.sin(e.x),e.y=i*(this.cosc0*t-this.sinc0*o*n),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e},inverse:function(e){var t,o,n,i,r;if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,r=Math.sqrt(e.x*e.x+e.y*e.y)){var a=2*Math.atan2(r,this.R2);t=Math.sin(a),o=Math.cos(a),i=Math.asin(o*this.sinc0+e.y*t*this.cosc0/r),n=Math.atan2(e.x*t,r*this.cosc0*o-e.y*this.sinc0*t)}else i=this.phic0,n=0;return e.x=n,e.y=i,De.inverse.apply(this,[e]),e.x=x(e.x+this.long0),e},names:["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]},Ue={init:function(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=1e-10&&(this.k0=.5*(1+P(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=1e-10&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=1e-10&&(this.k0=.5*this.cons*M(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/k(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=M(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-t,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(e){var o,n,i,r,a,s,l=e.x,c=e.y,u=Math.sin(c),d=Math.cos(c),p=x(l-this.long0);return Math.abs(Math.abs(l-this.long0)-Math.PI)<=1e-10&&Math.abs(c+this.lat0)<=1e-10?(e.x=NaN,e.y=NaN,e):this.sphere?(o=2*this.k0/(1+this.sinlat0*u+this.coslat0*d*Math.cos(p)),e.x=this.a*o*d*Math.sin(p)+this.x0,e.y=this.a*o*(this.coslat0*u-this.sinlat0*d*Math.cos(p))+this.y0,e):(n=2*Math.atan(this.ssfn_(c,u,this.e))-t,r=Math.cos(n),i=Math.sin(n),Math.abs(this.coslat0)<=1e-10?(a=k(this.e,c*this.con,this.con*u),s=2*this.a*this.k0*a/this.cons,e.x=this.x0+s*Math.sin(l-this.long0),e.y=this.y0-this.con*s*Math.cos(l-this.long0),e):(Math.abs(this.sinlat0)<1e-10?(o=2*this.a*this.k0/(1+r*Math.cos(p)),e.y=o*i):(o=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*i+this.cosX0*r*Math.cos(p))),e.y=o*(this.cosX0*i-this.sinX0*r*Math.cos(p))+this.y0),e.x=o*r*Math.sin(p)+this.x0,e))},inverse:function(e){var o,n,i,r,a;e.x-=this.x0,e.y-=this.y0;var s=Math.sqrt(e.x*e.x+e.y*e.y);if(this.sphere){var l=2*Math.atan(s/(2*this.a*this.k0));return o=this.long0,n=this.lat0,s<=1e-10?(e.x=o,e.y=n,e):(n=Math.asin(Math.cos(l)*this.sinlat0+e.y*Math.sin(l)*this.coslat0/s),o=Math.abs(this.coslat0)<1e-10?this.lat0>0?x(this.long0+Math.atan2(e.x,-1*e.y)):x(this.long0+Math.atan2(e.x,e.y)):x(this.long0+Math.atan2(e.x*Math.sin(l),s*this.coslat0*Math.cos(l)-e.y*this.sinlat0*Math.sin(l))),e.x=o,e.y=n,e)}if(Math.abs(this.coslat0)<=1e-10){if(s<=1e-10)return n=this.lat0,o=this.long0,e.x=o,e.y=n,e;e.x*=this.con,e.y*=this.con,i=s*this.cons/(2*this.a*this.k0),n=this.con*G(this.e,i),o=this.con*x(this.con*this.long0+Math.atan2(e.x,-1*e.y))}else r=2*Math.atan(s*this.cosX0/(2*this.a*this.k0*this.ms1)),o=this.long0,s<=1e-10?a=this.X0:(a=Math.asin(Math.cos(r)*this.sinX0+e.y*Math.sin(r)*this.cosX0/s),o=x(this.long0+Math.atan2(e.x*Math.sin(r),s*this.cosX0*Math.cos(r)-e.y*this.sinX0*Math.sin(r)))),n=-1*G(this.e,Math.tan(.5*(t+a)));return e.x=o,e.y=n,e},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],ssfn_:function(e,o,n){return o*=n,Math.tan(.5*(t+e))*Math.pow((1-o)/(1+o),.5*n)}},Ne={init:function(){var e=this.lat0;this.lambda0=this.long0;var t=Math.sin(e),o=this.a,n=1/this.rf,i=2*n-Math.pow(n,2),r=this.e=Math.sqrt(i);this.R=this.k0*o*Math.sqrt(1-i)/(1-i*Math.pow(t,2)),this.alpha=Math.sqrt(1+i/(1-i)*Math.pow(Math.cos(e),4)),this.b0=Math.asin(t/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),s=Math.log(Math.tan(Math.PI/4+e/2)),l=Math.log((1+r*t)/(1-r*t));this.K=a-this.alpha*s+this.alpha*r/2*l},forward:function(e){var t=Math.log(Math.tan(Math.PI/4-e.y/2)),o=this.e/2*Math.log((1+this.e*Math.sin(e.y))/(1-this.e*Math.sin(e.y))),n=-this.alpha*(t+o)+this.K,i=2*(Math.atan(Math.exp(n))-Math.PI/4),r=this.alpha*(e.x-this.lambda0),a=Math.atan(Math.sin(r)/(Math.sin(this.b0)*Math.tan(i)+Math.cos(this.b0)*Math.cos(r))),s=Math.asin(Math.cos(this.b0)*Math.sin(i)-Math.sin(this.b0)*Math.cos(i)*Math.cos(r));return e.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,e.x=this.R*a+this.x0,e},inverse:function(e){for(var t=e.x-this.x0,o=e.y-this.y0,n=t/this.R,i=2*(Math.atan(Math.exp(o/this.R))-Math.PI/4),r=Math.asin(Math.cos(this.b0)*Math.sin(i)+Math.sin(this.b0)*Math.cos(i)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(i))),s=this.lambda0+a/this.alpha,l=0,c=r,u=-1e3,d=0;Math.abs(c-u)>1e-7;){if(++d>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+r/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(c))/2)),u=c,c=2*Math.atan(Math.exp(l))-Math.PI/2}return e.x=s,e.y=c,e},names:["somerc"]},Be={init:function(){var e,n,a,s,l,c,u,d,p,h,g,m,f,y=0,A=0,v=0,C=0,I=0,b=0,w=0;this.no_off=(f="object"==typeof(m=this).PROJECTION?Object.keys(m.PROJECTION)[0]:m.PROJECTION,"no_uoff"in m||"no_off"in m||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(f)),this.no_rot="no_rot"in this;var _=!1;"alpha"in this&&(_=!0);var E=!1;if("rectified_grid_angle"in this&&(E=!0),_&&(w=this.alpha),E&&(y=this.rectified_grid_angle*o),_||E)A=this.longc;else if(v=this.long1,I=this.lat1,C=this.long2,b=this.lat2,Math.abs(I-b)<=1e-7||(e=Math.abs(I))<=1e-7||Math.abs(e-t)<=1e-7||Math.abs(Math.abs(this.lat0)-t)<=1e-7||Math.abs(Math.abs(b)-t)<=1e-7)throw new Error;var S=1-this.es;n=Math.sqrt(S),Math.abs(this.lat0)>1e-10?(d=Math.sin(this.lat0),a=Math.cos(this.lat0),e=1-this.es*d*d,this.B=a*a,this.B=Math.sqrt(1+this.es*this.B*this.B/S),this.A=this.B*this.k0*n/e,(l=(s=this.B*n/(a*Math.sqrt(e)))*s-1)<=0?l=0:(l=Math.sqrt(l),this.lat0<0&&(l=-l)),this.E=l+=s,this.E*=Math.pow(k(this.e,this.lat0,d),this.B)):(this.B=1/n,this.A=this.k0,this.E=s=l=1),_||E?(_?(g=Math.asin(Math.sin(w)/s),E||(y=w)):(g=y,w=Math.asin(s*Math.sin(g))),this.lam0=A-Math.asin(.5*(l-1/l)*Math.tan(g))/this.B):(c=Math.pow(k(this.e,I,Math.sin(I)),this.B),u=Math.pow(k(this.e,b,Math.sin(b)),this.B),l=this.E/c,p=(u-c)/(u+c),h=((h=this.E*this.E)-u*c)/(h+u*c),(e=v-C)<-Math.pi?C-=r:e>Math.pi&&(C+=r),this.lam0=x(.5*(v+C)-Math.atan(h*Math.tan(.5*this.B*(v-C))/p)/this.B),g=Math.atan(2*Math.sin(this.B*x(v-this.lam0))/(l-1/l)),y=w=Math.asin(s*Math.sin(g))),this.singam=Math.sin(g),this.cosgam=Math.cos(g),this.sinrot=Math.sin(y),this.cosrot=Math.cos(y),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(s*s-1)/Math.cos(w))),this.lat0<0&&(this.u_0=-this.u_0)),l=.5*g,this.v_pole_n=this.ArB*Math.log(Math.tan(i-l)),this.v_pole_s=this.ArB*Math.log(Math.tan(i+l))},forward:function(e){var o,n,i,r,a,s,l,c,u={};if(e.x=e.x-this.lam0,Math.abs(Math.abs(e.y)-t)>1e-10){if(o=.5*((a=this.E/Math.pow(k(this.e,e.y,Math.sin(e.y)),this.B))-(s=1/a)),n=.5*(a+s),r=Math.sin(this.B*e.x),i=(o*this.singam-r*this.cosgam)/n,Math.abs(Math.abs(i)-1)<1e-10)throw new Error;c=.5*this.ArB*Math.log((1-i)/(1+i)),s=Math.cos(this.B*e.x),l=Math.abs(s)<1e-7?this.A*e.x:this.ArB*Math.atan2(o*this.cosgam+r*this.singam,s)}else c=e.y>0?this.v_pole_n:this.v_pole_s,l=this.ArB*e.y;return this.no_rot?(u.x=l,u.y=c):(l-=this.u_0,u.x=c*this.cosrot+l*this.sinrot,u.y=l*this.cosrot-c*this.sinrot),u.x=this.a*u.x+this.x0,u.y=this.a*u.y+this.y0,u},inverse:function(e){var o,n,i,r,a,s,l,c={};if(e.x=(e.x-this.x0)*(1/this.a),e.y=(e.y-this.y0)*(1/this.a),this.no_rot?(n=e.y,o=e.x):(n=e.x*this.cosrot-e.y*this.sinrot,o=e.y*this.cosrot+e.x*this.sinrot+this.u_0),r=.5*((i=Math.exp(-this.BrA*n))-1/i),a=.5*(i+1/i),l=((s=Math.sin(this.BrA*o))*this.cosgam+r*this.singam)/a,Math.abs(Math.abs(l)-1)<1e-10)c.x=0,c.y=l<0?-t:t;else{if(c.y=this.E/Math.sqrt((1+l)/(1-l)),c.y=G(this.e,Math.pow(c.y,1/this.B)),c.y===1/0)throw new Error;c.x=-this.rB*Math.atan2(r*this.cosgam-s*this.singam,Math.cos(this.BrA*o))}return c.x+=this.lam0,c},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"]},Fe={init:function(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<1e-10)){var e=this.b/this.a;this.e=Math.sqrt(1-e*e);var t=Math.sin(this.lat1),o=Math.cos(this.lat1),n=M(this.e,t,o),i=k(this.e,this.lat1,t),r=Math.sin(this.lat2),a=Math.cos(this.lat2),s=M(this.e,r,a),l=k(this.e,this.lat2,r),c=k(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>1e-10?this.ns=Math.log(n/s)/Math.log(i/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(i,this.ns)),this.rh=this.a*this.f0*Math.pow(c,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(e){var o=e.x,n=e.y;Math.abs(2*Math.abs(n)-Math.PI)<=1e-10&&(n=P(n)*(t-2e-10));var i,r,a=Math.abs(Math.abs(n)-t);if(a>1e-10)i=k(this.e,n,Math.sin(n)),r=this.a*this.f0*Math.pow(i,this.ns);else{if((a=n*this.ns)<=0)return null;r=0}var s=this.ns*x(o-this.long0);return e.x=this.k0*(r*Math.sin(s))+this.x0,e.y=this.k0*(this.rh-r*Math.cos(s))+this.y0,e},inverse:function(e){var o,n,i,r,a,s=(e.x-this.x0)/this.k0,l=this.rh-(e.y-this.y0)/this.k0;this.ns>0?(o=Math.sqrt(s*s+l*l),n=1):(o=-Math.sqrt(s*s+l*l),n=-1);var c=0;if(0!==o&&(c=Math.atan2(n*s,n*l)),0!==o||this.ns>0){if(n=1/this.ns,i=Math.pow(o/(this.a*this.f0),n),-9999===(r=G(this.e,i)))return null}else r=-t;return a=x(c/this.ns+this.long0),e.x=a,e.y=r,e},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc"]},ze={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(e){var t,o,n,i,r,a,s,l=e.x,c=e.y,u=x(l-this.long0);return t=Math.pow((1+this.e*Math.sin(c))/(1-this.e*Math.sin(c)),this.alfa*this.e/2),o=2*(Math.atan(this.k*Math.pow(Math.tan(c/2+this.s45),this.alfa)/t)-this.s45),n=-u*this.alfa,i=Math.asin(Math.cos(this.ad)*Math.sin(o)+Math.sin(this.ad)*Math.cos(o)*Math.cos(n)),r=Math.asin(Math.cos(o)*Math.sin(n)/Math.cos(i)),a=this.n*r,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(i/2+this.s45),this.n),e.y=s*Math.cos(a)/1,e.x=s*Math.sin(a)/1,this.czech||(e.y*=-1,e.x*=-1),e},inverse:function(e){var t,o,n,i,r,a,s,l=e.x;e.x=e.y,e.y=l,this.czech||(e.y*=-1,e.x*=-1),r=Math.sqrt(e.x*e.x+e.y*e.y),i=Math.atan2(e.y,e.x)/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/r,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(i)),o=Math.asin(Math.cos(n)*Math.sin(i)/Math.cos(t)),e.x=this.long0-o/this.alfa,a=t,s=0;var c=0;do{e.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-e.y)<1e-10&&(s=1),a=e.y,c+=1}while(0===s&&c<15);return c>=15?null:e},names:["Krovak","krovak"]},Ve=function(e,t,o,n,i){return e*i-t*Math.sin(2*i)+o*Math.sin(4*i)-n*Math.sin(6*i)},We=function(e){return 1-.25*e*(1+e/16*(3+1.25*e))},qe=function(e){return.375*e*(1+.25*e*(1+.46875*e))},He=function(e){return.05859375*e*e*(1+.75*e)},Ye=function(e){return e*e*e*(35/3072)},Je=function(e,t,o){var n=t*o;return e/Math.sqrt(1-n*n)},Ze=function(e){return Math.abs(e)1e-7?(1-e*e)*(t/(1-(o=e*t)*o)-.5/e*Math.log((1-o)/(1+o))):2*t},$e={init:function(){var e,o=Math.abs(this.lat0);if(Math.abs(o-t)<1e-10?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(o)<1e-10?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0)switch(this.qp=Qe(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(e){var t,o=[];return o[0]=.3333333333333333*e,t=e*e,o[0]+=.17222222222222222*t,o[1]=.06388888888888888*t,t*=e,o[0]+=.10257936507936508*t,o[1]+=.0664021164021164*t,o[2]=.016415012942191543*t,o}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),e=Math.sin(this.lat0),this.sinb1=Qe(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(e){var o,n,r,a,s,l,c,u,d,p,h=e.x,g=e.y;if(h=x(h-this.long0),this.sphere){if(s=Math.sin(g),p=Math.cos(g),r=Math.cos(h),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((n=this.mode===this.EQUIT?1+p*r:1+this.sinph0*s+this.cosph0*p*r)<=1e-10)return null;o=(n=Math.sqrt(2/n))*p*Math.sin(h),n*=this.mode===this.EQUIT?s:this.cosph0*s-this.sinph0*p*r}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(r=-r),Math.abs(g+this.lat0)<1e-10)return null;n=i-.5*g,o=(n=2*(this.mode===this.S_POLE?Math.cos(n):Math.sin(n)))*Math.sin(h),n*=r}}else{switch(c=0,u=0,d=0,r=Math.cos(h),a=Math.sin(h),s=Math.sin(g),l=Qe(this.e,s),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(c=l/this.qp,u=Math.sqrt(1-c*c)),this.mode){case this.OBLIQ:d=1+this.sinb1*c+this.cosb1*u*r;break;case this.EQUIT:d=1+u*r;break;case this.N_POLE:d=t+g,l=this.qp-l;break;case this.S_POLE:d=g-t,l=this.qp+l}if(Math.abs(d)<1e-10)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:d=Math.sqrt(2/d),n=this.mode===this.OBLIQ?this.ymf*d*(this.cosb1*c-this.sinb1*u*r):(d=Math.sqrt(2/(1+u*r)))*c*this.ymf,o=this.xmf*d*u*a;break;case this.N_POLE:case this.S_POLE:l>=0?(o=(d=Math.sqrt(l))*a,n=r*(this.mode===this.S_POLE?d:-d)):o=n=0}}return e.x=this.a*o+this.x0,e.y=this.a*n+this.y0,e},inverse:function(e){e.x-=this.x0,e.y-=this.y0;var o,n,i,r,a,s,l,c,u,d,p=e.x/this.a,h=e.y/this.a;if(this.sphere){var g,m=0,f=0;if((n=.5*(g=Math.sqrt(p*p+h*h)))>1)return null;switch(n=2*Math.asin(n),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(f=Math.sin(n),m=Math.cos(n)),this.mode){case this.EQUIT:n=Math.abs(g)<=1e-10?0:Math.asin(h*f/g),p*=f,h=m*g;break;case this.OBLIQ:n=Math.abs(g)<=1e-10?this.lat0:Math.asin(m*this.sinph0+h*f*this.cosph0/g),p*=f*this.cosph0,h=(m-Math.sin(n)*this.sinph0)*g;break;case this.N_POLE:h=-h,n=t-n;break;case this.S_POLE:n-=t}o=0!==h||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(p,h):0}else{if(l=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(p/=this.dd,h*=this.dd,(s=Math.sqrt(p*p+h*h))<1e-10)return e.x=this.long0,e.y=this.lat0,e;r=2*Math.asin(.5*s/this.rq),i=Math.cos(r),p*=r=Math.sin(r),this.mode===this.OBLIQ?(l=i*this.sinb1+h*r*this.cosb1/s,a=this.qp*l,h=s*this.cosb1*i-h*this.sinb1*r):(l=h*r/s,a=this.qp*l,h=s*i)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(h=-h),!(a=p*p+h*h))return e.x=this.long0,e.y=this.lat0,e;l=1-a/this.qp,this.mode===this.S_POLE&&(l=-l)}o=Math.atan2(p,h),c=Math.asin(l),u=this.apa,d=c+c,n=c+u[0]*Math.sin(d)+u[1]*Math.sin(d+d)+u[2]*Math.sin(d+d+d)}return e.x=x(this.long0+o),e.y=n,e},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4},et=function(e){return Math.abs(e)>1&&(e=e>1?1:-1),Math.asin(e)},tt={init:function(){Math.abs(this.lat1+this.lat2)<1e-10||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=M(this.e3,this.sin_po,this.cos_po),this.qs1=Qe(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=M(this.e3,this.sin_po,this.cos_po),this.qs2=Qe(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Qe(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>1e-10?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(e){var t=e.x,o=e.y;this.sin_phi=Math.sin(o),this.cos_phi=Math.cos(o);var n=Qe(this.e3,this.sin_phi,this.cos_phi),i=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,r=this.ns0*x(t-this.long0),a=i*Math.sin(r)+this.x0,s=this.rh-i*Math.cos(r)+this.y0;return e.x=a,e.y=s,e},inverse:function(e){var t,o,n,i,r,a;return e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns0>=0?(t=Math.sqrt(e.x*e.x+e.y*e.y),n=1):(t=-Math.sqrt(e.x*e.x+e.y*e.y),n=-1),i=0,0!==t&&(i=Math.atan2(n*e.x,n*e.y)),n=t*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(o=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,o)),r=x(i/this.ns0+this.long0),e.x=r,e.y=a,e},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(e,t){var o,n,i,r,a=et(.5*t);if(e<1e-10)return a;for(var s=e*e,l=1;l<=25;l++)if(a+=r=.5*(i=1-(n=e*(o=Math.sin(a)))*n)*i/Math.cos(a)*(t/(1-s)-o/i+.5/e*Math.log((1-n)/(1+n))),Math.abs(r)<=1e-7)return a;return null}},ot={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function(e){var t,o,n,i,r,a,s,l=e.x,c=e.y;return n=x(l-this.long0),t=Math.sin(c),o=Math.cos(c),i=Math.cos(n),(r=this.sin_p14*t+this.cos_p14*o*i)>0||Math.abs(r)<=1e-10?(a=this.x0+1*this.a*o*Math.sin(n)/r,s=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*o*i)/r):(a=this.x0+this.infinity_dist*o*Math.sin(n),s=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*o*i)),e.x=a,e.y=s,e},inverse:function(e){var t,o,n,i,r,a;return e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,(t=Math.sqrt(e.x*e.x+e.y*e.y))?(i=Math.atan2(t,this.rc),o=Math.sin(i),n=Math.cos(i),a=et(n*this.sin_p14+e.y*o*this.cos_p14/t),r=Math.atan2(e.x*o,t*this.cos_p14*n-e.y*this.sin_p14*o),r=x(this.long0+r)):(a=this.phic0,r=0),e.x=r,e.y=a,e},names:["gnom"]},nt={init:function(){this.sphere||(this.k0=M(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(e){var t,o,n=e.x,i=e.y,r=x(n-this.long0);if(this.sphere)t=this.x0+this.a*r*Math.cos(this.lat_ts),o=this.y0+this.a*Math.sin(i)/Math.cos(this.lat_ts);else{var a=Qe(this.e,Math.sin(i));t=this.x0+this.a*this.k0*r,o=this.y0+this.a*a*.5/this.k0}return e.x=t,e.y=o,e},inverse:function(e){var o,n;return e.x-=this.x0,e.y-=this.y0,this.sphere?(o=x(this.long0+e.x/this.a/Math.cos(this.lat_ts)),n=Math.asin(e.y/this.a*Math.cos(this.lat_ts))):(n=function(e,o){var n=1-(1-e*e)/(2*e)*Math.log((1-e)/(1+e));if(Math.abs(Math.abs(o)-n)<1e-6)return o<0?-1*t:t;for(var i,r,a,s,l=Math.asin(.5*o),c=0;c<30;c++)if(r=Math.sin(l),a=Math.cos(l),s=e*r,l+=i=Math.pow(1-s*s,2)/(2*a)*(o/(1-e*e)-r/(1-s*s)+.5/e*Math.log((1-s)/(1+s))),Math.abs(i)<=1e-10)return l;return NaN}(this.e,2*e.y*this.k0/this.a),o=x(this.long0+e.x/(this.a*this.k0))),e.x=o,e.y=n,e},names:["cea"]},it={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(e){var t=e.x,o=e.y,n=x(t-this.long0),i=Ze(o-this.lat0);return e.x=this.x0+this.a*n*this.rc,e.y=this.y0+this.a*i,e},inverse:function(e){var t=e.x,o=e.y;return e.x=x(this.long0+(t-this.x0)/(this.a*this.rc)),e.y=Ze(this.lat0+(o-this.y0)/this.a),e},names:["Equirectangular","Equidistant_Cylindrical","eqc"]},rt={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=We(this.es),this.e1=qe(this.es),this.e2=He(this.es),this.e3=Ye(this.es),this.ml0=this.a*Ve(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(e){var t,o,n,i=e.x,r=e.y,a=x(i-this.long0);if(n=a*Math.sin(r),this.sphere)Math.abs(r)<=1e-10?(t=this.a*a,o=-1*this.a*this.lat0):(t=this.a*Math.sin(n)/Math.tan(r),o=this.a*(Ze(r-this.lat0)+(1-Math.cos(n))/Math.tan(r)));else if(Math.abs(r)<=1e-10)t=this.a*a,o=-1*this.ml0;else{var s=Je(this.a,this.e,Math.sin(r))/Math.tan(r);t=s*Math.sin(n),o=this.a*Ve(this.e0,this.e1,this.e2,this.e3,r)-this.ml0+s*(1-Math.cos(n))}return e.x=t+this.x0,e.y=o+this.y0,e},inverse:function(e){var t,o,n,i,r,a,s,l,c;if(n=e.x-this.x0,i=e.y-this.y0,this.sphere)if(Math.abs(i+this.a*this.lat0)<=1e-10)t=x(n/this.a+this.long0),o=0;else{var u;for(a=this.lat0+i/this.a,s=n*n/this.a/this.a+a*a,l=a,r=20;r;--r)if(l+=c=-1*(a*(l*(u=Math.tan(l))+1)-l-.5*(l*l+s)*u)/((l-a)/u-1),Math.abs(c)<=1e-10){o=l;break}t=x(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(o))}else if(Math.abs(i+this.ml0)<=1e-10)o=0,t=x(this.long0+n/this.a);else{var d,p,h,g,m;for(a=(this.ml0+i)/this.a,s=n*n/this.a/this.a+a*a,l=a,r=20;r;--r)if(m=this.e*Math.sin(l),d=Math.sqrt(1-m*m)*Math.tan(l),p=this.a*Ve(this.e0,this.e1,this.e2,this.e3,l),h=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),l-=c=(a*(d*(g=p/this.a)+1)-g-.5*d*(g*g+s))/(this.es*Math.sin(2*l)*(g*g+s-2*a*g)/(4*d)+(a-g)*(d*h-2/Math.sin(2*l))-h),Math.abs(c)<=1e-10){o=l;break}d=Math.sqrt(1-this.es*Math.pow(Math.sin(o),2))*Math.tan(o),t=x(this.long0+Math.asin(n*d/this.a)/Math.sin(o))}return e.x=t,e.y=o,e},names:["Polyconic","poly"]},at={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var o,n=t.x,i=t.y-this.lat0,r=n-this.long0,a=i/e*1e-5,s=r,l=1,c=0;for(o=1;o<=10;o++)l*=a,c+=this.A[o]*l;var u,d=c,p=s,h=1,g=0,m=0,f=0;for(o=1;o<=6;o++)u=g*d+h*p,h=h*d-g*p,g=u,m=m+this.B_re[o]*h-this.B_im[o]*g,f=f+this.B_im[o]*h+this.B_re[o]*g;return t.x=f*this.a+this.x0,t.y=m*this.a+this.y0,t},inverse:function(t){var o,n,i=t.x,r=t.y,a=i-this.x0,s=(r-this.y0)/this.a,l=a/this.a,c=1,u=0,d=0,p=0;for(o=1;o<=6;o++)n=u*s+c*l,c=c*s-u*l,u=n,d=d+this.C_re[o]*c-this.C_im[o]*u,p=p+this.C_im[o]*c+this.C_re[o]*u;for(var h=0;h.999999999999&&(o=.999999999999),t=Math.asin(o);var n=x(this.long0+e.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),o=(2*t+Math.sin(2*t))/Math.PI,Math.abs(o)>1&&(o=1);var i=Math.asin(o);return e.x=n,e.y=i,e},names:["Mollweide","moll"]},ut={init:function(){Math.abs(this.lat1+this.lat2)<1e-10||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=We(this.es),this.e1=qe(this.es),this.e2=He(this.es),this.e3=Ye(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=M(this.e,this.sinphi,this.cosphi),this.ml1=Ve(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<1e-10?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=M(this.e,this.sinphi,this.cosphi),this.ml2=Ve(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Ve(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function(e){var t,o=e.x,n=e.y;if(this.sphere)t=this.a*(this.g-n);else{var i=Ve(this.e0,this.e1,this.e2,this.e3,n);t=this.a*(this.g-i)}var r=this.ns*x(o-this.long0),a=this.x0+t*Math.sin(r),s=this.y0+this.rh-t*Math.cos(r);return e.x=a,e.y=s,e},inverse:function(e){var t,o,n,i;e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns>=0?(o=Math.sqrt(e.x*e.x+e.y*e.y),t=1):(o=-Math.sqrt(e.x*e.x+e.y*e.y),t=-1);var r=0;if(0!==o&&(r=Math.atan2(t*e.x,t*e.y)),this.sphere)return i=x(this.long0+r/this.ns),n=Ze(this.g-o/this.a),e.x=i,e.y=n,e;var a=this.g-o/this.a;return n=Ke(a,this.e0,this.e1,this.e2,this.e3),i=x(this.long0+r/this.ns),e.x=i,e.y=n,e},names:["Equidistant_Conic","eqdc"]},dt={init:function(){this.R=this.a},forward:function(e){var o,n,i=e.x,r=e.y,a=x(i-this.long0);Math.abs(r)<=1e-10&&(o=this.x0+this.R*a,n=this.y0);var s=et(2*Math.abs(r/Math.PI));(Math.abs(a)<=1e-10||Math.abs(Math.abs(r)-t)<=1e-10)&&(o=this.x0,n=r>=0?this.y0+Math.PI*this.R*Math.tan(.5*s):this.y0+Math.PI*this.R*-Math.tan(.5*s));var l=.5*Math.abs(Math.PI/a-a/Math.PI),c=l*l,u=Math.sin(s),d=Math.cos(s),p=d/(u+d-1),h=p*p,g=p*(2/u-1),m=g*g,f=Math.PI*this.R*(l*(p-m)+Math.sqrt(c*(p-m)*(p-m)-(m+c)*(h-m)))/(m+c);a<0&&(f=-f),o=this.x0+f;var y=c+p;return f=Math.PI*this.R*(g*y-l*Math.sqrt((m+c)*(c+1)-y*y))/(m+c),n=r>=0?this.y0+f:this.y0-f,e.x=o,e.y=n,e},inverse:function(e){var t,o,n,i,r,a,s,l,c,u,d,p;return e.x-=this.x0,e.y-=this.y0,d=Math.PI*this.R,r=(n=e.x/d)*n+(i=e.y/d)*i,d=3*(i*i/(l=-2*(a=-Math.abs(i)*(1+r))+1+2*i*i+r*r)+(2*(s=a-2*i*i+n*n)*s*s/l/l/l-9*a*s/l/l)/27)/(c=(a-s*s/3/l)/l)/(u=2*Math.sqrt(-c/3)),Math.abs(d)>1&&(d=d>=0?1:-1),p=Math.acos(d)/3,o=e.y>=0?(-u*Math.cos(p+Math.PI/3)-s/3/l)*Math.PI:-(-u*Math.cos(p+Math.PI/3)-s/3/l)*Math.PI,t=Math.abs(n)<1e-10?this.long0:x(this.long0+Math.PI*(r-1+Math.sqrt(1+2*(n*n-i*i)+r*r))/2/n),e.x=t,e.y=o,e},names:["Van_der_Grinten_I","VanDerGrinten","vandg"]},pt={init:function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)},forward:function(e){var o,n,i,r,a,s,l,c,u,d,p,h,g,m,f,y,A,v,C,I,b,w,_=e.x,E=e.y,S=Math.sin(e.y),M=Math.cos(e.y),P=x(_-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=1e-10?(e.x=this.x0+this.a*(t-E)*Math.sin(P),e.y=this.y0-this.a*(t-E)*Math.cos(P),e):Math.abs(this.sin_p12+1)<=1e-10?(e.x=this.x0+this.a*(t+E)*Math.sin(P),e.y=this.y0+this.a*(t+E)*Math.cos(P),e):(v=this.sin_p12*S+this.cos_p12*M*Math.cos(P),A=(y=Math.acos(v))?y/Math.sin(y):1,e.x=this.x0+this.a*A*M*Math.sin(P),e.y=this.y0+this.a*A*(this.cos_p12*S-this.sin_p12*M*Math.cos(P)),e):(o=We(this.es),n=qe(this.es),i=He(this.es),r=Ye(this.es),Math.abs(this.sin_p12-1)<=1e-10?(a=this.a*Ve(o,n,i,r,t),s=this.a*Ve(o,n,i,r,E),e.x=this.x0+(a-s)*Math.sin(P),e.y=this.y0-(a-s)*Math.cos(P),e):Math.abs(this.sin_p12+1)<=1e-10?(a=this.a*Ve(o,n,i,r,t),s=this.a*Ve(o,n,i,r,E),e.x=this.x0+(a+s)*Math.sin(P),e.y=this.y0+(a+s)*Math.cos(P),e):(l=S/M,c=Je(this.a,this.e,this.sin_p12),u=Je(this.a,this.e,S),d=Math.atan((1-this.es)*l+this.es*c*this.sin_p12/(u*M)),C=0===(p=Math.atan2(Math.sin(P),this.cos_p12*Math.tan(d)-this.sin_p12*Math.cos(P)))?Math.asin(this.cos_p12*Math.sin(d)-this.sin_p12*Math.cos(d)):Math.abs(Math.abs(p)-Math.PI)<=1e-10?-Math.asin(this.cos_p12*Math.sin(d)-this.sin_p12*Math.cos(d)):Math.asin(Math.sin(P)*Math.cos(d)/Math.sin(p)),h=this.e*this.sin_p12/Math.sqrt(1-this.es),y=c*C*(1-(I=C*C)*(f=(g=this.e*this.cos_p12*Math.cos(p)/Math.sqrt(1-this.es))*g)*(1-f)/6+(b=I*C)/8*(m=h*g)*(1-2*f)+(w=b*C)/120*(f*(4-7*f)-3*h*h*(1-7*f))-w*C/48*m),e.x=this.x0+y*Math.sin(p),e.y=this.y0+y*Math.cos(p),e))},inverse:function(e){var o,n,i,r,a,s,l,c,u,d,p,h,g,m,f,y,A,v,C,I,b,w,_;if(e.x-=this.x0,e.y-=this.y0,this.sphere){if((o=Math.sqrt(e.x*e.x+e.y*e.y))>2*t*this.a)return;return n=o/this.a,i=Math.sin(n),r=Math.cos(n),a=this.long0,Math.abs(o)<=1e-10?s=this.lat0:(s=et(r*this.sin_p12+e.y*i*this.cos_p12/o),l=Math.abs(this.lat0)-t,a=Math.abs(l)<=1e-10?this.lat0>=0?x(this.long0+Math.atan2(e.x,-e.y)):x(this.long0-Math.atan2(-e.x,e.y)):x(this.long0+Math.atan2(e.x*i,o*this.cos_p12*r-e.y*this.sin_p12*i))),e.x=a,e.y=s,e}return c=We(this.es),u=qe(this.es),d=He(this.es),p=Ye(this.es),Math.abs(this.sin_p12-1)<=1e-10?(h=this.a*Ve(c,u,d,p,t),o=Math.sqrt(e.x*e.x+e.y*e.y),s=Ke((h-o)/this.a,c,u,d,p),a=x(this.long0+Math.atan2(e.x,-1*e.y)),e.x=a,e.y=s,e):Math.abs(this.sin_p12+1)<=1e-10?(h=this.a*Ve(c,u,d,p,t),o=Math.sqrt(e.x*e.x+e.y*e.y),s=Ke((o-h)/this.a,c,u,d,p),a=x(this.long0+Math.atan2(e.x,e.y)),e.x=a,e.y=s,e):(o=Math.sqrt(e.x*e.x+e.y*e.y),f=Math.atan2(e.x,e.y),g=Je(this.a,this.e,this.sin_p12),y=Math.cos(f),v=-(A=this.e*this.cos_p12*y)*A/(1-this.es),C=3*this.es*(1-v)*this.sin_p12*this.cos_p12*y/(1-this.es),w=1-v*(b=(I=o/g)-v*(1+v)*Math.pow(I,3)/6-C*(1+3*v)*Math.pow(I,4)/24)*b/2-I*b*b*b/6,m=Math.asin(this.sin_p12*Math.cos(b)+this.cos_p12*Math.sin(b)*y),a=x(this.long0+Math.asin(Math.sin(f)*Math.sin(b)/Math.cos(m))),_=Math.sin(m),s=Math.atan2((_-this.es*w*this.sin_p12)*Math.tan(m),_*(1-this.es)),e.x=a,e.y=s,e)},names:["Azimuthal_Equidistant","aeqd"]},ht={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(e){var t,o,n,i,r,a,s,l=e.x,c=e.y;return n=x(l-this.long0),t=Math.sin(c),o=Math.cos(c),i=Math.cos(n),((r=this.sin_p14*t+this.cos_p14*o*i)>0||Math.abs(r)<=1e-10)&&(a=1*this.a*o*Math.sin(n),s=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*o*i)),e.x=a,e.y=s,e},inverse:function(e){var o,n,i,r,a,s,l;return e.x-=this.x0,e.y-=this.y0,o=Math.sqrt(e.x*e.x+e.y*e.y),n=et(o/this.a),i=Math.sin(n),r=Math.cos(n),s=this.long0,Math.abs(o)<=1e-10?(l=this.lat0,e.x=s,e.y=l,e):(l=et(r*this.sin_p14+e.y*i*this.cos_p14/o),a=Math.abs(this.lat0)-t,Math.abs(a)<=1e-10?(s=this.lat0>=0?x(this.long0+Math.atan2(e.x,-e.y)):x(this.long0-Math.atan2(-e.x,e.y)),e.x=s,e.y=l,e):(s=x(this.long0+Math.atan2(e.x*i,o*this.cos_p14*r-e.y*this.sin_p14*i)),e.x=s,e.y=l,e))},names:["ortho"]},gt=1,mt=2,ft=3,yt=4,At=5,vt=6,Ct=1,It=2,bt=3,wt=4;function _t(e,o,n,r){var s;return e<1e-10?(r.value=Ct,s=0):(s=Math.atan2(o,n),Math.abs(s)<=i?r.value=Ct:s>i&&s<=t+i?(r.value=It,s-=t):s>t+i||s<=-(t+i)?(r.value=bt,s=s>=0?s-a:s+a):(r.value=wt,s+=t)),s}function Et(e,t){var o=e+t;return o<-a?o+=r:o>+a&&(o-=r),o}var St,Mt={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=t-i/2?this.face=At:this.lat0<=-(t-i/2)?this.face=vt:Math.abs(this.long0)<=i?this.face=gt:Math.abs(this.long0)<=t+i?this.face=this.long0>0?mt:yt:this.face=ft,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(e){var o,n,r,s,l,c,u={x:0,y:0},d={value:0};if(e.x-=this.long0,o=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(e.y)):e.y,n=e.x,this.face===At)s=t-o,n>=i&&n<=t+i?(d.value=Ct,r=n-t):n>t+i||n<=-(t+i)?(d.value=It,r=n>0?n-a:n+a):n>-(t+i)&&n<=-i?(d.value=bt,r=n+t):(d.value=wt,r=n);else if(this.face===vt)s=t+o,n>=i&&n<=t+i?(d.value=Ct,r=-n+t):n=-i?(d.value=It,r=-n):n<-i&&n>=-(t+i)?(d.value=bt,r=-n-t):(d.value=wt,r=n>0?-n+a:-n-a);else{var p,h,g,m,f,y;this.face===mt?n=Et(n,+t):this.face===ft?n=Et(n,+a):this.face===yt&&(n=Et(n,-t)),m=Math.sin(o),f=Math.cos(o),y=Math.sin(n),p=f*Math.cos(n),h=f*y,g=m,this.face===gt?r=_t(s=Math.acos(p),g,h,d):this.face===mt?r=_t(s=Math.acos(h),g,-p,d):this.face===ft?r=_t(s=Math.acos(-p),g,-h,d):this.face===yt?r=_t(s=Math.acos(-h),g,p,d):(s=r=0,d.value=Ct)}return c=Math.atan(12/a*(r+Math.acos(Math.sin(r)*Math.cos(i))-t)),l=Math.sqrt((1-Math.cos(s))/(Math.cos(c)*Math.cos(c))/(1-Math.cos(Math.atan(1/Math.cos(r))))),d.value===It?c+=t:d.value===bt?c+=a:d.value===wt&&(c+=1.5*a),u.x=l*Math.cos(c),u.y=l*Math.sin(c),u.x=u.x*this.a+this.x0,u.y=u.y*this.a+this.y0,e.x=u.x,e.y=u.y,e},inverse:function(e){var o,n,i,r,s,l,c,u,d,p,h,g,m={lam:0,phi:0},f={value:0};if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,n=Math.atan(Math.sqrt(e.x*e.x+e.y*e.y)),o=Math.atan2(e.y,e.x),e.x>=0&&e.x>=Math.abs(e.y)?f.value=Ct:e.y>=0&&e.y>=Math.abs(e.x)?(f.value=It,o-=t):e.x<0&&-e.x>=Math.abs(e.y)?(f.value=bt,o=o<0?o+a:o-a):(f.value=wt,o+=t),d=a/12*Math.tan(o),s=Math.sin(d)/(Math.cos(d)-1/Math.sqrt(2)),l=Math.atan(s),(c=1-(i=Math.cos(o))*i*(r=Math.tan(n))*r*(1-Math.cos(Math.atan(1/Math.cos(l)))))<-1?c=-1:c>1&&(c=1),this.face===At)u=Math.acos(c),m.phi=t-u,f.value===Ct?m.lam=l+t:f.value===It?m.lam=l<0?l+a:l-a:f.value===bt?m.lam=l-t:m.lam=l;else if(this.face===vt)u=Math.acos(c),m.phi=u-t,f.value===Ct?m.lam=-l+t:f.value===It?m.lam=-l:f.value===bt?m.lam=-l-t:m.lam=l<0?-l-a:-l+a;else{var y,A,v;d=(y=c)*y,A=(d+=(v=d>=1?0:Math.sqrt(1-d)*Math.sin(l))*v)>=1?0:Math.sqrt(1-d),f.value===It?(d=A,A=-v,v=d):f.value===bt?(A=-A,v=-v):f.value===wt&&(d=A,A=v,v=-d),this.face===mt?(d=y,y=-A,A=d):this.face===ft?(y=-y,A=-A):this.face===yt&&(d=y,y=A,A=-d),m.phi=Math.acos(-v)-t,m.lam=Math.atan2(A,y),this.face===mt?m.lam=Et(m.lam,-t):this.face===ft?m.lam=Et(m.lam,-a):this.face===yt&&(m.lam=Et(m.lam,+t))}return 0!==this.es&&(p=m.phi<0?1:0,h=Math.tan(m.phi),g=this.b/Math.sqrt(h*h+this.one_minus_f_squared),m.phi=Math.atan(Math.sqrt(this.a*this.a-g*g)/(this.one_minus_f*g)),p&&(m.phi=-m.phi)),m.lam+=this.long0,e.x=m.lam,e.y=m.phi,e},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},Pt=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],xt=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],kt=n/5,Gt=function(e,t){return e[0]+t*(e[1]+t*(e[2]+t*e[3]))},Rt={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(e){var t=x(e.x-this.long0),o=Math.abs(e.y),i=Math.floor(o*kt);i<0?i=0:i>=18&&(i=17);var r={x:Gt(Pt[i],o=n*(o-.08726646259971647*i))*t,y:Gt(xt[i],o)};return e.y<0&&(r.y=-r.y),r.x=r.x*this.a*.8487+this.x0,r.y=r.y*this.a*1.3523+this.y0,r},inverse:function(e){var n={x:(e.x-this.x0)/(.8487*this.a),y:Math.abs(e.y-this.y0)/(1.3523*this.a)};if(n.y>=1)n.x/=Pt[18][0],n.y=e.y<0?-t:t;else{var i=Math.floor(18*n.y);for(i<0?i=0:i>=18&&(i=17);;)if(xt[i][0]>n.y)--i;else{if(!(xt[i+1][0]<=n.y))break;++i}var r=xt[i],a=5*(n.y-r[0])/(xt[i+1][0]-r[0]);a=function(e,t,o,n){for(var i=t;n;--n){var r=e(i);if(i-=r,Math.abs(r)1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var r=function(e,t,o){for(var n=[],i=0;i3?n.splice(3,n.length-1):[],void 0!==this.listeners[e]?this.listeners[e].push({scope:o,callback:t,args:n}):this.listeners[e]=[{scope:o,callback:t,args:n}]},removeEventListener:function(e,t,o){if(void 0!==this.listeners[e]){for(var n=this.listeners[e].length,i=[],r=0;r0;for(var i=0;i2?n.splice(2,n.length-1):[],n=[o].concat(n),void 0!==this.listeners[e]){var a=this.listeners[e].slice(),s=a.length;for(r=0;r0?r.replace("%var%",i.join(" - ")):r.replace("%var%","%var% (not specified)")}catch(e){}return r}},I={normalyzeParameters:function(e){var t=null;if(e){var o=[];for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];i||(i=""),o.push(n+"="+i)}t=o.join("&")}return t},normalyzeUrl:function(e,t,o){var n=e;if(e){var i=e.indexOf("?");-1===i&&(n+="?"),-1!==i&&i!==e.length-1&&(n+="&")}return t&&(n+="string"==typeof t?t:this.normalyzeParameters(t)),o&&(n=encodeURIComponent(n)),n},indent:function(e,t){return new Array((e||0)+1).join("\t")+t}},b=o(62),w=o.n(b),_={call:function(e){var t=v.getLogger("XHR");if(t.trace("[XHR::call()]"),w.a.polyfill(),!e.url)throw new Error("missing parameter : url is not defined !");if(!e.method)throw new Error("missing parameter : method is not defined !");e.format||(e.format="text");var o={};switch(o.url=e.url,o.data=e.data?e.data:null,o.method=e.method,o.timeOut=e.timeOut||0,o.scope=e.scope||this,o.proxy=e.proxy||null,o.content=e.content||null,o.headers=e.headers||{referer:"http://localhost"},e.method){case"DELETE":case"GET":break;case"PUT":case"POST":o.content=e.content?e.content:"application/x-www-form-urlencoded",o.headers=e.headers?e.headers:{referer:"http://localhost"};break;case"HEAD":case"OPTIONS":throw new Error("HTTP method not yet supported !");default:throw new Error("HTTP method unknown !")}switch(e.format){case"text":this.__call(o).then((function(o){t.trace(o),e.onResponse.call(this,o)})).catch((function(t){e.onFailure.call(this,t)}));break;case"json":this.__callJSON(o).then((function(o){t.trace(o),e.onResponse.call(this,o)})).catch((function(t){e.onFailure.call(this,t)}));break;case"xml":this.__callXML(o).then((function(o){t.trace(o),e.onResponse.call(this,o)})).catch((function(t){e.onFailure.call(this,t)}));break;default:throw new Error("This output Format is not yet supported !")}},__call:function(e){var t=v.getLogger("XHR");return t.trace("[XHR::__call()]"),new Promise((function(n,i){var r="POST"===e.method||"PUT"===e.method?1:0;e.data&&("object"==typeof e.data&&Object.keys(e.data).length||"string"==typeof e.data&&e.data.length)&&!r&&("Geocode"===e.scope.CLASSNAME||"ReverseGeocode"===e.scope.CLASSNAME?e.url=e.url+e.data:e.url=I.normalyzeUrl(e.url,e.data)),t.trace("URL = ",e.url);var a=null;if("undefined"==typeof window){var s=o(60),l={headers:{Referer:"https://localhost"}};return e.data&&"string"==typeof e.data&&r&&(l={method:e.method,body:e.data,headers:{"Content-Type":e.content,Referer:"https://localhost"}}),s(e.url,l).then((function(e){if(e.ok)n(e.text());else{var t="Errors Occured on Http Request (status : '"+e.statusText+"' | url : '"+e.url+"')",o=e.status;i({message:t,status:o})}})).catch((function(e){i({message:e,status:-1})}))}if(window.XMLHttpRequest){t.trace("XMLHttpRequest"),(a=new XMLHttpRequest).open(e.method,e.url,!0),a.overrideMimeType=e.content;var c=null;e.timeOut>0&&(t.trace("XHR - TimeOut actif !"),c=window.setTimeout((function(){i({message:"TimeOut Occured on Http Request with XMLHttpRequest !",status:-1})}),e.timeOut)),r&&(t.trace("data = ",e.data),a.setRequestHeader("Content-type",e.content)),a.onerror=function(e){console.log(e),i(new Error("Errors Occured on Http Request with XMLHttpRequest !"))},a.ontimeout=function(e){console.log(e),i(new Error("TimeOut Occured on Http Request with XMLHttpRequest !"))},a.onreadystatechange=function(e){if(4===a.readyState)if(200===a.status)window.clearTimeout(c),n(a.response);else{var t="Errors Occured on Http Request (status : '"+e.target.statusText+"' | url : '"+e.target.responseURL+"' | response : '"+e.target.response+"')",o=e.target.status;i({message:t,status:o})}};var u=e.data&&r?e.data:null;a.send(u)}else{if(!window.XDomainRequest)throw new Error("CORS not supported");t.trace("XDomainRequest"),(a=new XDomainRequest).open(e.method,e.url),a.overrideMimeType=e.content,e.timeOut>0&&(a.timeout=e.timeout,t.trace("XHR - TimeOut actif !")),r&&a.setRequestHeader("Content-type",e.content),a.onerror=function(){i(new Error("Errors Occured on Http Request with XMLHttpRequest !"))},a.ontimeout=function(){i(new Error("TimeOut Occured on Http Request with XMLHttpRequest !"))},a.onload=function(e){if(200===a.status)n(a.responseText);else{var t="Errors Occured on Http Request (status : '"+e.target.statusText+"' | url : '"+e.target.responseURL+"')",o=e.target.status;i({message:t,status:o})}};var d=e.data&&r?e.data:null;a.send(d)}}))},__callJSON:function(e){return this.__call(e).then(JSON.parse).catch((function(t){console.log("_callJSON failed on : ",e.url,t)}))},__callXML:function(e){return this.__call(e).then((function(e){var t;"undefined"==typeof window?t=(new(0,o(36).DOMParser)).parseFromString(e,"text/xml"):window.DOMParser?t=(new window.DOMParser).parseFromString(e,"text/xml"):((t=new window.ActiveXObject("Microsoft.XMLDOM")).async=!1,t.loadXML(e));return t})).catch((function(t){console.log("__callXML failed on : ",e.url,t)}))}},E={uuid:(n=Math.floor(Date.now()),function(){return n++}),call:function(e){var t=v.getLogger("JSONP");if(t.trace("[JSONP::call ()]"),!e)throw t.error("missing parameter : options !"),new Error("missing parameter : options !");if(!e.url)throw t.error("missing parameter : options.url !"),new Error("missing parameter : options.url !");if(e.timeOut||(t.info("setting 'options.timeOut' default value"),e.timeOut=0),!e.onResponse)throw t.error("missing parameter : options.onResponse !"),new Error("missing parameter : options.onResponse !");var o="string"==typeof e.callbackSuffix?e.callbackSuffix:this.uuid(),n=!1,i=!1,r=e.url.indexOf("callback=");if(-1!==r){n=!0;var a=e.url.indexOf("&",r);-1===a&&(a=e.url.length);var s=e.url.substring(r+9,a);s&&(i=!0,e.callbackName=s,t.info("setting 'options.callbackName' value ("+e.callbackName+") from 'options.url' parameter"))}if(!n){var l=e.url.indexOf("?");-1===l?e.url=e.url+"?callback=":l===e.url.length?e.url=e.url+"callback=":e.url=e.url+"&callback=",t.info("setting callback default key in 'options.url' : "+e.url)}var c=!!e.callbackName||i;if(i||(e.callbackName||(t.info("setting 'options.callbackName' default value"),e.callbackName="callback",(o||""===o)&&(e.callbackName+=o)),e.url=e.url.replace("callback=","callback="+e.callbackName),t.info("setting callback function name in 'options.url' : "+e.url)),e.onTimeOut||(t.info("setting 'options.onTimeOut' default value"),e.onTimeOut=function(){console.log("TimeOut while invoking url : "+e.url)}),!c){var u=this,d=null;e.timeOut>0&&(d=window.setTimeout((function(){window[e.callbackName]=function(){},e.onTimeOut(),u._deleteScript(o)}),e.timeOut)),window[e.callbackName]=function(t){window.clearTimeout(d),e.onResponse(t),u._deleteScript(o)}}this._createScript(o,e.url)},_createScript:function(e,t){var o,n=document.getElementById("results"+e);(o=document.createElement("script")).setAttribute("type","text/javascript"),o.setAttribute("src",t),o.setAttribute("charset","UTF-8"),o.setAttribute("id","results"+e),o.setAttribute("async","true");var i=document.documentElement||document.getElementsByTagName("head")[0];null===n?i.appendChild(o):i.replaceChild(o,n)},_deleteScript:function(e){var t=document.getElementById("results"+e);if(t){var o=t.parentNode||document.documentElement;if(!o)return;o.removeChild(t)}}},S={send:function(e){var t=e||{method:"GET",protocol:"XHR",timeOut:0,format:null,wrap:!0,nocache:!0,output:"json",callback:null,callbackSuffix:null};if("undefined"!=typeof window||"JSONP"!==e.protocol){if("XHR"===e.protocol||"json"===e.format?t.wrap=!1:"JSONP"===e.protocol&&"xml"===e.format&&(t.wrap=!0),t.callback=null,t.output=t.wrap?"json":null,t.wrap){var o={};o.output=t.output,o.callback=t.callback,delete o.callback,t.url=I.normalyzeUrl(e.url,o)}switch(t.protocol){case"XHR":"GET"===e.method&&e.nocache&&(t.url=I.normalyzeUrl(t.url,{t:(new Date).getTime()})),_.call(t);break;case"JSONP":t.data&&(t.url=I.normalyzeUrl(t.url,t.data)),E.call(t);break;default:throw new Error("protocol not supported (XHR|JSONP) !")}}else console.log("Value (s) for parameter (s) 'protocol=JSONP (instead use XHR)' not supported to NodeJS")}};function M(e){if(!(this instanceof M))throw new TypeError("ErrorService constructor cannot be called as a function.");var t=e;"string"==typeof e||e instanceof String?(this.message=e,this.status=-1,this.type=M.TYPE_UNKERR):(this.message=t.message||"undefined!?",this.type=t.type,this.status=t.status||-1),this.name="ErrorService",this.stack=(new Error).stack}M.TYPE_SRVERR="SERVICE_ERROR",M.TYPE_USEERR="USAGE_ERROR",M.TYPE_UNKERR="UNKNOWN_ERROR",M.prototype=Object.create(Error.prototype,{constructor:{value:M,writable:!0,configurable:!0}});var P=M,x={ssl:!0,url:function(e,t){return(!1===x.ssl?"http://":"https://")+"wxs.ign.fr".concat("/",e,t)},Alti:{_key:{"elevation-json":"/alti/rest/elevation.json","elevation-xml":"/alti/rest/elevation.xml","profil-json":"/alti/rest/elevationLine.json","profil-xml":"/alti/rest/elevationLine.xml",wps:"/alti/wps"},url:function(e){return{"elevation-json":x.url(e,this._key["elevation-json"]),"elevation-xml":x.url(e,this._key["elevation-xml"]),"profil-json":x.url(e,this._key["profil-json"]),"profil-xml":x.url(e,this._key["profil-xml"]),wps:x.url(e,this._key.wps)}}},ProcessIsoCurve:{_key:"/geoportail/isochrone/rest/1.0.0/isochrone",url:function(e){return x.url(e,this._key)}},Config:{_key:"https://raw.githubusercontent.com/IGNF/geoportal-configuration/main/dist/",url:function(e){Array.isArray(e)||(e=e.split(","));for(var t=[],o=0;on(e,{credentials:"same-origin"}).then(e=>{if(e.ok)return e.json().then(e=>e).catch(e=>{throw new Error("Exception Json : "+e)});throw new Error("Exception HTTP : "+e.status+" (status code) !")}).catch(e=>new Promise((t,o)=>{o(e)})),a=[];for(let e=0;e{if(!e)throw new Error("results config empty !?");e.forEach(e=>{this.listConfigResults.push(e)})}).then(()=>{t.call(this,this.listConfigResults)}).catch(t=>{e.call(this,t)})},U=function(e,t){this.listConfigResults=[];for(var o=0;ot||e__IDENTIFIER__\x3c!-- __DATAINPUTS__ --\x3e__RAWDATAOUTPUT__',input:"__KEY____DATA__"}},namespaceByDefault:function(){return['xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"','xmlns="http://www.opengis.net/wps/1.0.0"','xmlns:wfs="http://www.opengis.net/wfs"','xmlns:wps="http://www.opengis.net/wps/1.0.0"','xmlns:ows="http://www.opengis.net/ows/1.1"','xmlns:gml="http://www.opengis.net/gml"','xmlns:ogc="http://www.opengis.net/ogc"','xmlns:wcs="http://www.opengis.net/wcs/1.1.1"','xmlns:xlink="http://www.w3.org/1999/xlink"'].join(" ")},schemaLocationByDefault:function(){return'xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd"'},processRequestString:function(){this.logger.trace("WPS::processRequestString ()");var e="";if("POST"===this.method)e=this.template.post.value;else{if("GET"!==this.method)return this.logger.error("No other method supported by the service !"),!1;e=this.template.get.value}return e=(e=(e=(e=(e=e.replace(/__SERVICE__/g,this.paramservice)).replace(/__VERSION__/g,this.paramversion)).replace(/__RAWDATAOUTPUT__/g,this.paramrawdataoutput)).replace(/__IDENTIFIER__/g,this.paramidentifier)).replace(/__REQUEST__/g,this.paramrequest),"POST"===this.method&&(e=(e=e.replace(/__NAMESPACE__/g,this.namespaceByDefault)).replace(/__SCHEMALOCATION__/g,this.schemaLocationByDefault)),(e=e.replace(//g,this.__addDataInputs()))?(this.requestString=e,this.logger.trace("traduction tmpl",e),!0):(this.logger.warn("traduction tmpl : empty request !?"),!1)},__addDataInputs:function(){this.logger.trace("WPS::__addDataInputs ()");for(var e,t="GET"===this.method?this.template.get.input:this.template.post.input,o="GET"===this.method?";":"",n="",i=this,r=this.DataObject.getData(),a=0;a0)for(var a=n.getElementsByTagName("parsererror"),s=0;s0){var n=function(e){if(e.attributes.length>0){for(var t={},o=e.attributes,n=0;n0?t.index=t.filters.type[0]:t.index=t.filters.type),delete t.filters.type),t.filters.bbox&&(this.logger.warn("The parameter 'filterOptions.bbox' is deprecated"),delete t.filters.bbox)),delete t.filterOptions),t.position&&(t.position.x&&(this.logger.warn("The parameter 'position.x' is deprecated"),t.position.lon||(t.position.lon=t.position.x),delete t.position.x),t.position.y&&(this.logger.warn("The parameter 'position.y' is deprecated"),t.position.lat||(t.position.lat=t.position.y),delete t.position.y)),t.returnFreeForm&&(this.logger.warn("The parameter 'returnFreeForm' is deprecated"),delete t.returnFreeForm),t.srs&&(this.logger.warn("The parameter 'srs' is deprecated"),delete t.srs),t},we.prototype.buildRequest=function(e,t){var o={httpMethod:this.options.httpMethod,geocodeMethod:"search",query:this.options.query,index:this.options.index,returnTrueGeometry:this.options.returnTrueGeometry,position:this.options.position,maxResp:this.options.maximumResponses,filters:this.options.filters};this.request=ge.build(o),this.request?t.call(this,this.request):e.call(this,new P(C.getMessage("SERVICE_REQUEST_BUILD")))},we.prototype.analyzeResponse=function(e,t){if(this.response){var o={response:this.response,rawResponse:this.options.rawResponse,onError:e,onSuccess:t,scope:this};be.build(o)}else e.call(this,new P(C.getMessage("SERVICE_RESPONSE_EMPTY")))};var _e=we;function Ee(e){if(!(this instanceof Ee))throw new TypeError(C.getMessage("CLASS_CONSTRUCTOR","ReverseGeocode"));this.CLASSNAME="ReverseGeocode",this.logger=v.getLogger("Gp.Services.ReverseGeocode"),this.logger.trace("[Constructeur ReverseGeocode (options)]");var t=this.patchOptionConvertor(e);if(t.serverUrl=t.serverUrl||"https://wxs.ign.fr/calcul/geoportail/geocodage/rest/0.1/reverse",T.apply(this,[t]),t.searchGeometry)this.options.searchGeometry=t.searchGeometry;else if(!t.position)throw new Error(C.getMessage("PARAM_MISSING","searchGeometry"));if(t.index||(this.options.index=t.index="StreetAddress"),t.filters)for(var o=Object.keys(t.filters),n=0;n0?t.index=t.filterOptions.type[0]:t.index=t.filterOptions.type),delete t.filterOptions.type),t.filterOptions.bbox&&(this.logger.warn("The parameter 'filterOptions.bbox' is deprecated"),t.searchGeometry||(t.searchGeometry=this.bbox2Json(t.filterOptions.bbox)),delete t.filterOptions.bbox),t.filterOptions.circle&&(this.logger.warn("The parameter 'filterOptions.circle' is deprecated"),t.searchGeometry||(t.searchGeometry=this.circle2Json(t.filterOptions.circle)),delete t.filterOptions.circle),t.filterOptions.polygon&&(this.logger.warn("The parameter 'filterOptions.polygon' is deprecated"),t.searchGeometry||(t.searchGeometry=this.polygon2Json(t.filterOptions.polygon)),delete t.filterOptions.polygon),!t.filters&&Object.keys(t.filterOptions).length>0&&(t.filters=t.filterOptions),delete t.filterOptions),t.position&&(t.position.x&&(this.logger.warn("The parameter 'position.x' is deprecated"),t.position.lon||(t.position.lon=t.position.x),delete t.position.x),t.position.y&&(this.logger.warn("The parameter 'position.y' is deprecated"),t.position.lat||(t.position.lat=t.position.y),delete t.position.y)),t.srs&&(this.logger.warn("The parameter 'srs' is deprecated"),delete t.srs),t},Ee.prototype.buildRequest=function(e,t){var o={httpMethod:this.options.httpMethod,geocodeMethod:"reverse",searchGeometry:this.options.searchGeometry,index:this.options.index,position:this.options.position,returnTrueGeometry:this.options.returnTrueGeometry,maxResp:this.options.maximumResponses,filters:this.options.filters};this.request=ge.build(o),this.request?t.call(this,this.request):e.call(this,new P(C.getMessage("SERVICE_REQUEST_BUILD")))},Ee.prototype.analyzeResponse=function(e,t){if(this.response){var o={response:this.response,rawResponse:this.options.rawResponse,onError:e,onSuccess:t,scope:this};be.build(o)}else e.call(this,new P(C.getMessage("SERVICE_RESPONSE_EMPTY")))},Ee.prototype.bbox2Json=function(e){return{type:"Polygon",coordinates:[[[e.left,e.top],[e.right,e.top],[e.right,e.bottom],[e.left,e.bottom],[e.left,e.top]]]}},Ee.prototype.circle2Json=function(e){return{type:"Circle",radius:e.radius,coordinates:[e.x,e.y]}},Ee.prototype.polygon2Json=function(e){for(var t={type:"Polygon",coordinates:[[]]},o=0;o0)for(var n in t.noProxyDomains)if(o.trace("[ProxyUtils] proxifyUrl : analyzing "+t.noProxyDomains[n]),-1!==e.indexOf(t.noProxyDomains[n]))return o.info("[ProxyUtils] proxifyUrl : "+e+" found in noProxyDomains list ("+t.noProxyDomains[n]+")."),e;return t.proxyUrl+encodeURIComponent(e)}};function lt(e){return(lt="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)}var ct=at.getLogger("GfiUtils"),ut={getLayerFormat:function(e){var t="function"==typeof e.getType?e.getType():null,o=e.getSource();if(t){if("VECTOR"===t||"VECTOR_TILE"===t)return"vector";if("TILE"===t)return o.tileGrid?"wmts":"wms";if("IMAGE"===t)return"wms"}else{if(o instanceof p.a||o instanceof f.a)return"wms";if(o instanceof g.a)return"wmts";if(o instanceof u.a||o instanceof l.a)return"vector"}return"unknown"},displayInfo:function(e,t,n,i,r){if(ct.trace("[GfiUtils] : displayInfo..."),i||(i="text/html"),null!==n){var s=null,l=n;l=(l=l.replace(/\n/g,"")).replace(/(>)\s*(<)/g,"$1$2");var c="undefined"!=typeof window?window:null;if("object"===("undefined"==typeof exports?"undefined":lt(exports))&&null===window)s=(new(0,o(36).DOMParser)).parseFromString(l,i);else if(c.DOMParser)s=(new c.DOMParser).parseFromString(l,i);else{if(!c.ActiveXObject)return ct.log("Incompatible environment for DOM Parser !"),!1;(s=new c.ActiveXObject("Microsoft.XMLDOM")).async=!1,s.loadXML(l)}var u=s.getElementsByTagName("body");if(u&&1===u.length&&!u[0].hasChildNodes())return!1;var d=document.createElement("div");d.className="gp-feature-info-div";var p=document.createElement("input");p.type="button",p.className="gp-styling-button closer",p.onclick=function(){return e.featuresOverlay&&(e.removeOverlay(e.featuresOverlay),e.featuresOverlay=null),!1};var h=document.createElement("div");return h.className="gp-features-content-div",h.innerHTML=n,d.appendChild(h),d.appendChild(p),e.featuresOverlay&&(e.removeOverlay(e.featuresOverlay),e.featuresOverlay=null),e.featuresOverlay=new a.a({element:d,autoPan:r.autoPan,autoPanAnimation:r.autoPanAnimation,autoPanMargin:r.autoPanMargin,positioning:"bottom-center",insertFirst:!1,stopEvent:!0}),e.addOverlay(e.featuresOverlay),e.featuresOverlay.setPosition(t),e.featuresOverlay.render(),!0}},features2html:function(e,t){var o=document.createElement("div");return t.forEach((function(e){var t=e.getProperties();if(t.hasOwnProperty("render"))o.insertAdjacentHTML("beforeend",t.render);else{if(t.hasOwnProperty("name")){var n=document.createElement("div");n.className="gp-att-name-div",n.insertAdjacentHTML("afterbegin",t.name),o.appendChild(n)}if(t.hasOwnProperty("description")){var i=document.createElement("div");i.className="gp-att-description-div",i.insertAdjacentHTML("afterbegin",t.description),o.appendChild(i)}var r=null,a=!1,s=null,l=null,c=null,u=["fill","fill-opacity","stroke","stroke-opacity","stroke-width","marker-symbol","marker-color","marker-size","geometry","value","name","description","styleUrl","extensionsNode_","icon"];for(r in t)if(void 0!==t[r]&&-1===u.indexOf(r)){a||((s=document.createElement("div")).className="gp-att-others-div",l=document.createElement("ul"),a=!0),c=document.createElement("li");var d=document.createElement("span");d.className="gp-attname-others-span",d.appendChild(document.createTextNode(r+" : ")),c.appendChild(d),c.appendChild(document.createTextNode(t[r])),l.appendChild(c)}l&&(s.appendChild(l),o.appendChild(s))}}),e),o.hasChildNodes()||(o=null),o},layerGetFeatureAtCoordinates:function(e,t,o){var n=e.getPixelFromCoordinate(o);return e.hasFeatureAtPixel(n,(function(e){return e===t}))},displayVectorFeatureInfo:function(e,t,o,n){var i=e.getPixelFromCoordinate(t),r=[];if(e.forEachFeatureAtPixel(i,(function(e,t){(!o||o.indexOf(t)>-1)&&r.push(e)})),0===r.length)return!1;var a=this.features2html(e,r);return null!==a&&(this.displayInfo(e,t,a.innerHTML,"text/html",n),!0)},displayFeatureInfo:function(e,t,o,n,i){for(var r={},a=0;ae.getResolution()&&(f=!1),f&&g.maxResolution&&g.maxResolution255)throw new Error("'"+e+"'' is greater than 255(0xff);");return("0"+Number(e).toString(16)).slice(-2)},num:function(e){return parseInt(e,16)},arrayToRgba:function(e){if(!Array.isArray(e))throw new Error("Not an array !");var t=e[0],o=e[1],n=e[2],i=e[3]||1;return"rgba("+t+", "+o+", "+n+", "+parseFloat(i)+")"},arrayToHex:function(e){if(!Array.isArray(e))throw new Error("Not an array !");var t=e[0],o=e[1],n=e[2],i=e[3],r=[this.hex(t),this.hex(o),this.hex(n)],a={};return a.hex="#"+r.join(""),i&&(a.opacity=parseFloat(i)),a},rgbaToHex:function(e){var t=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(0?.?\d+)\s*)?\)/.exec(e);if(!t)throw new Error("Invalid format: "+e);var o=t[1],n=t[2],i=t[3],r=t[4],a=[this.hex(o),this.hex(n),this.hex(i)],s={};return s.hex="#"+a.join(""),r&&(s.opacity=parseFloat(r)),s},hexToRgba:function(e,t){if(!e)throw new Error("Invalid format");e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,o,n){return t+t+o+o+n+n}));var o=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return(o=o?{r:parseInt(o[1],16),g:parseInt(o[2],16),b:parseInt(o[3],16)}:null)?"rgba("+o.r+", "+o.g+", "+o.b+", "+t+")":null},isHex:function(e){if(!e)return!1;if("#"!==e.charAt(0))return!1;return!!/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e)},isRGB:function(e){if(!e)return!1;return!!/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(0?.?\d+)\s*)?\)/.exec(e)}},ft={lightOrange:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAgCAYAAAC/40AfAAASf3pUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjapZpptuO4DYX/cxVZAsEBIJfD8ZzsIMvPB8mvpq5OupN6Xc8uW5Yo4OIOdIfzr3/e8A/+lNo1lGpNu2rkT+mlp8GTFt8/4/ktsTy/nz85f96Tn18P6fN6TLzkB30ObPo5/ut1+XaC92HwrP5worY+b8yf3+jlc/72y4k+F8q+Il/F/pyof06U0/uGfE4w3tuK2pv9eAvzvI/7607a+zf4r/tVE3sffv13Maq3K9fJKZ0sOfL7U6ycsv/NIQ+eVH6nXDhQsj3P31fssxIK8rs6ffvTWdH1pZbfHvRTV749+6Vbnwpwa790q6TPIfmXIuu3x9++HqT+vitP6X+4cmmfZ+nn10eVz4p+qf5T/Lvbfe6ZuxhFKbV+burrFp9nHDe5hF+6BZamdEfBUOPRfzo/jZtfQ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YiCiAgIEdJTVA6VmVyc2lvbj0iMi4xMC4zMCIKICAgdGlmZjpPcmllbnRhdGlvbj0iMSIKICAgeG1wOkNyZWF0b3JUb29sPSJHSU1QIDIuMTAiPgogICA8eG1wTU06SGlzdG9yeT4KICAgIDxyZGY6U2VxPgogICAgIDxyZGY6bGkKICAgICAgc3RFdnQ6YWN0aW9uPSJzYXZlZCIKICAgICAgc3RFdnQ6Y2hhbmdlZD0iLyIKICAgICAgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDphM2U3ZWQ1MS0xNTI4LTRhYjAtODVjOS0zNzNkNzgxZGM2ZmMiCiAgICAgIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkdpbXAgMi4xMCAoTGludXgpIgogICAgICBzdEV2dDp3aGVuPSIyMDIzLTA1LTI0VDE3OjI1OjI3KzAyOjAwIi8+CiAgICA8L3JkZjpTZXE+CiAgIDwveG1wTU06SGlzdG9yeT4KICA8L3JkZjpEZXNjcmlwdGlvbj4KIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/PofUkY4AAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfnBRgPGRuA4VZTAAAFcElEQVRYw82YW2xbVRaGv7XP8bHjXByHQkNhWigdVX1AikRBMBoQ8wASl4fRqPDAAxIPKAVxeRqQRohHBEVCaoGKUBCl4qHcNKCZVKMRRQxtgTaACLRKqlwB14NzM2ni2D2XvXjgBFXQOnFiA1uy/HB89u9/7bX+vf4l1HnpK57hTNCE0AzqAS5gAAuEID5KiWSiLPf4tp7YUjcSu4yLZzdi2IJyNXANcBlwAdAKzAHTwDhwDKEPywC+GZWHbPi7IKOvZIWguAnlr8BtwJ+AxDJeDYCPgF6Ed0hkh+Weov5mZLTHJMDeBjwYk0itYJtKTOpZML3SbYNfnYz2SBr0buARYENcFytdFvga2AGyT7p14Vcjoz3ShOgdKDuAi+pUewpM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IKICAgeG1wOkNyZWF0b3JUb29sPSJHSU1QIDIuMTAiPgogICA8eG1wTU06SGlzdG9yeT4KICAgIDxyZGY6U2VxPgogICAgIDxyZGY6bGkKICAgICAgc3RFdnQ6YWN0aW9uPSJzYXZlZCIKICAgICAgc3RFdnQ6Y2hhbmdlZD0iLyIKICAgICAgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDoxYzNjOGRkZi1kMjVkLTQ4YzQtYTAwYS0yMmU3ZDYwMzg1YjYiCiAgICAgIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkdpbXAgMi4xMCAoTGludXgpIgogICAgICBzdEV2dDp3aGVuPSIyMDIzLTA1LTI0VDE3OjI1OjAzKzAyOjAwIi8+CiAgICA8L3JkZjpTZXE+CiAgIDwveG1wTU06SGlzdG9yeT4KICA8L3JkZjpEZXNjcmlwdGlvbj4KIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/PuhCAHgAAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfnBRgPGQOTjc4FAAAFdklEQVRYw82YW2gcZRTHf+eb2dlkc9lsrFYr2notfSgWxKKiog8VvIFI9UFQEaWtYPFJfREfRRSEeqlttViLD/WGisYXrShWpfWC1WpSN5eN3cZumkuTzWY3c/mOD9lI0WSTTXbVA8M8zMz3n//5zvl/5xyhxqb3ewYvaERpAvUAFzCABUIQH6GAHyvKa76tJbbUjMRW4+LbC7GsQbgCWA+sAs4AWoA8MAxkgEMo32LoxDO98oIN/xdk9IGUYEYvRrgduAW4Gogt4NMA+BroQHkfm+qW3aP6n5HRTSYG9hZga5lEwyKWKZVJvQCmQ3bZ4F8no5skAXov8BiwspwXizUL9APPgOyVXTr5r5HRzdKI1TsRngHOqlHuKTCI8hhG3padWqw7GX3IddDwcixvAefXUkTKhH7HcBfifi8vh1E1H1cfGkGYxPI4cM68RGw5zf3y3S7IuedgeZwg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kZvcm1hdD0iaW1hZ2UvcG5nIgogICBHSU1QOkFQST0iMi4wIgogICBHSU1QOlBsYXRmb3JtPSJMaW51eCIKICAgR0lNUDpUaW1lU3RhbXA9IjE2ODQ5NDE2NDAxNTU0MjYiCiAgIEdJTVA6VmVyc2lvbj0iMi4xMC4zMCIKICAgdGlmZjpPcmllbnRhdGlvbj0iMSIKICAgeG1wOkNyZWF0b3JUb29sPSJHSU1QIDIuMTAiPgogICA8eG1wTU06SGlzdG9yeT4KICAgIDxyZGY6U2VxPgogICAgIDxyZGY6bGkKICAgICAgc3RFdnQ6YWN0aW9uPSJzYXZlZCIKICAgICAgc3RFdnQ6Y2hhbmdlZD0iLyIKICAgICAgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDowMjQ4MDc5ZS1kMTYyLTQxZmItOGViYS1lMzY2NTRiNGRjMjYiCiAgICAgIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkdpbXAgMi4xMCAoTGludXgpIgogICAgICBzdEV2dDp3aGVuPSIyMDIzLTA1LTI0VDE3OjIwOjQwKzAyOjAwIi8+CiAgICA8L3JkZjpTZXE+CiAgIDwveG1wTU06SGlzdG9yeT4KICA8L3JkZjpEZXNjcmlwdGlvbj4KIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/PkaovgIAAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfnBRgPFCiKn0kIAAAFfUlEQVRYw82YTWxc1RXHf+e+N2/GH+Px2IEEV02AgqIsIkwgoYS2ahepVGCBUOiCRRdsAAnECthErBBCICGFj4gqRQqBRSABUrVm1URtCSATJ5ASZCPHH0kGgx1/xJl5nvH7uIcFY4iIM/GzZyhHenqL994993/u+f/fOUeos+nNnkHCJoQWRD0UFzCARYhQCVB8NFWWTwNbT99SNxC3GZfIXg9sADYDWxCuRekEskARYQplFPgEOAr045ph6bXRzwKM3pEX5mduQL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hLTQxM2EtYWYyMy1jNzhlNzczNGRlN2QiCiAgIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDoyNzExODVkMi03MWZiLTRhZDMtYTJmMi1iNjM3OWU3MDc1OTEiCiAgIGRjOkZvcm1hdD0iaW1hZ2UvcG5nIgogICBHSU1QOkFQST0iMi4wIgogICBHSU1QOlBsYXRmb3JtPSJMaW51eCIKICAgR0lNUDpUaW1lU3RhbXA9IjE2ODQ5NDE4NjYyMzgzMjQiCiAgIEdJTVA6VmVyc2lvbj0iMi4xMC4zMCIKICAgdGlmZjpPcmllbnRhdGlvbj0iMSIKICAgeG1wOkNyZWF0b3JUb29sPSJHSU1QIDIuMTAiPgogICA8eG1wTU06SGlzdG9yeT4KICAgIDxyZGY6U2VxPgogICAgIDxyZGY6bGkKICAgICAgc3RFdnQ6YWN0aW9uPSJzYXZlZCIKICAgICAgc3RFdnQ6Y2hhbmdlZD0iLyIKICAgICAgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDo1NGFiYzNkYS1lZWJiLTRlZjctYjdjNS04ZDRjODY5OGVjODMiCiAgICAgIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkdpbXAgMi4xMCAoTGludXgpIgogICAgICBzdEV2dDp3aGVuPSIyMDIzLTA1LTI0VDE3OjI0OjI2KzAyOjAwIi8+CiAgICA8L3JkZjpTZXE+CiAgIDwveG1wTU06SGlzdG9yeT4KICA8L3JkZjpEZXNjcmlwdGlvbj4KIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/Pj0tlUwAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfnBRgPGBru/VeEAAAABmJLR0QA/wD/AP+gvaeTAAAFO0lEQVRYw9WYe2xTVRzHTx97dYS5B1UHa+/tY12dDoOKWyIGlfgHkCkSNTHGwHxA3NiAP/A5x4CMKEzdYL29YyAyBxKQZbI+NvYIaowaH9Ogi2G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XbdtwQpuVuRtG7pwhxWA7vJgRib0nDuSDvtkIkjYcHE3aVWjRLL9/zyyETPK2Vq3OidAaOhiPDLcbxo3MRIik0eReWPnO15pHHiqbpYhS6hkNw7wAz0To6GM5hAzH3wkDa6b7x4bEwnkUfMnP6idX7Nex7GxElIDNerV6hU6jSdbp9RHck2w0w/FaGGoJm7KtnCfmWNlF1fOrK3Q6bekMRFABO7QM8yxewFLUi+5JSxPpAmcxy0gjt1Rytir4NcHKCfJTH/al5j1j1hr0pWEML55YD+x2GP6cVqNZZjQYEvUsG4vP4v8jKju5L1p6qnytxGKa6qogyOorBpVbXvxMe69xdxABb9I0DAGvIIRWp7NsBsJIoWVZKfaXuf+jMKp2b6z8+Adb4aErNwpCCh5J2pnfoH0ga08g7invBfaQjXjjuQifhyEgLdNolJP5UqR17y+QnSwvk1i565OZK6F8RzubvWwvDH8LvKZnmHXY8HKws+sNLJtI5muJ/7hYElOzJ1V+fN9R7CVDClPJOVXuqo06vS4HQjTwgDKDZRXk/1JiD7wrieFLk6T1lczCXUVK7aPZinS9XrTw+Q+Tql7SUmvGuQAAAABJRU5ErkJggg==",defaultOffset:[-25.5,-32]},yt=o(12),At=o.n(yt),vt=o(13),Ct=o.n(vt),It=o(32),bt=o.n(It),wt=o(33),_t=o.n(wt),Et=o(15),St=o.n(Et),Mt=o(16),Pt=o.n(Mt),xt=o(34),kt=o.n(xt),Gt=o(64),Rt=o.n(Gt),Tt=o(65),Ot=o.n(Tt),Lt=at.getLogger("styling");At.a.prototype.setPropertyFill=function(){var e=this.getStyle();if(e&&(!Array.isArray(e)||0!==e.length)){var t=e.getFill();if(t){var o=t.getColor();if(Array.isArray(o)){var n="rgba(";n+=o[0]+",",n+=o[1]+",",n+=o[2]+",",o=n+=o[3]+")"}if(mt.isRGB(o)){var i=mt.rgbaToHex(o);this.set("fill",i.hex),this.set("fill-opacity",i.opacity)}else this.set("fill",o),this.set("fill-opacity",1)}}},At.a.prototype.setPropertyStroke=function(){var e=this.getStyle();if(e&&(!Array.isArray(e)||0!==e.length)){var t=e.getStroke();if(t){var o=t.getColor();if(Array.isArray(o)){var n="rgba(";n+=o[0]+",",n+=o[1]+",",n+=o[2]+",",o=n+=o[3]+")"}if(mt.isRGB(o)){var i=mt.rgbaToHex(o);this.set("stroke",i.hex),this.set("stroke-opacity",i.opacity)}else this.set("stroke",o),this.set("stroke-opacity",1);this.set("stroke-width",t.getWidth())}}},At.a.prototype.setPropertyLabel=function(){var e=this.getStyle();if(e&&(!Array.isArray(e)||0!==e.length)){var t=void 0!==this.get("name");if(e.getText()&&t){var o=e.getText().getFill();if(o){var n=o.getColor();if(Array.isArray(n)){var i="rgba(";i+=n[0]+",",i+=n[1]+",",i+=n[2]+",",n=i+=n[3]+")"}if(mt.isRGB(n)){var r=mt.rgbaToHex(n);this.set("label-fill",r.hex),this.set("label-fill-opacity",r.opacity)}else this.set("label-fill",n),this.set("label-fill-opacity",1)}var a=e.getText().getStroke();if(a){var s=a.getColor();if(Array.isArray(s)){var l="rgba(";l+=s[0]+",",l+=s[1]+",",l+=s[2]+",",s=l+=s[3]+")"}if(mt.isRGB(s)){var c=mt.rgbaToHex(s);this.set("label-stroke",c.hex),this.set("label-stroke-opacity",c.opacity)}else this.set("label-stroke",s),this.set("label-stroke-opacity",1);this.set("label-stroke-width",a.getWidth())}this.set("label-font",e.getText().getFont()||Dt.DEFAULT_TEXT.font),this.set("label-textAlign",e.getText().getTextAlign()||Dt.DEFAULT_TEXT.textAlign)}}},At.a.prototype.setPropertyMarker=function(){var e=this.getStyle();if(e&&(!Array.isArray(e)||0!==e.length)){var t=e.getImage();if(t)if(t instanceof _t.a){var o=t.getColor();if(Array.isArray(o)){var n="rgba(";n+=o[0]+",",n+=o[1]+",",n+=o[2]+",",o=n+=o[3]+")"}if(o){var i=mt.rgbaToHex(o);this.set("marker-color",i.hex)}var r=t.getScale();switch(Math.round(2*r)/2){case 0:case.5:this.set("marker-size","small");break;case 1:this.set("marker-size","medium");break;case 1.5:case 2:this.set("marker-size","large")}var a=t.getSrc();a&&this.set("marker-symbol",a),this.unset("circle-fill"),this.unset("circle-fill-opacity"),this.unset("circle-stroke"),this.unset("circle-stroke-width"),this.unset("circle-stroke-opacity"),this.unset("circle-radius")}else{var s=t.getFill();if(s){var l=s.getColor();if(Array.isArray(l)){var c="rgba(";c+=l[0]+",",c+=l[1]+",",c+=l[2]+",",l=c+=l[3]+")"}if(mt.isRGB(l)){var u=mt.rgbaToHex(l);this.set("circle-fill",u.hex),this.set("circle-fill-opacity",u.opacity)}else this.set("circle-fill",l),this.set("circle-fill-opacity",1)}var d=t.getStroke();if(d){var p=d.getColor();if(Array.isArray(p)){var h="rgba(";h+=p[0]+",",h+=p[1]+",",h+=p[2]+",",p=h+=p[3]+")"}if(mt.isRGB(p)){var g=mt.rgbaToHex(p);this.set("circle-stroke",g.hex),this.set("circle-stroke-opacity",g.opacity)}else this.set("circle-stroke",p),this.set("circle-stroke-opacity",1);this.set("circle-stroke-width",d.getWidth())}var m=t.getRadius();this.set("circle-radius",m)}}};var Dt={APPLY_CONVERT_GEOM_GPX:!0,DEFAULT_ICON:{src:ft.lightOrange,anchor:[.5,1],scale:1},DEFAULT_CIRCLE:{radius:10,fill:{opacity:1,color:[0,0,0,1]},stroke:{width:1,opacity:1,color:[0,0,0,1]}},DEFAULT_STROKE:{width:5,opacity:1,color:[250,250,250,1]},DEFAULT_FILL:{opacity:1,color:[0,0,0,1]},DEFAULT_TEXT:{font:"16px sans",textAlign:"left",stroke:{color:[250,250,250,1],width:5,opactity:1},fill:{opacity:1,color:[0,0,0,1]}},getListTags:function(){return["type","fill","fill-opacity","stroke","stroke-opacity","stroke-width","circle-fill","circle-fill-opacity","circle-stroke","circle-stroke-opacity","circle-stroke-width","circle-radius","marker-symbol","marker-color","marker-size","label-fill","label-fill-opacity","label-stroke","label-stroke-width","label-stroke-opacity","label-font","label-textAlign"]},defineStyleFromProperties:function(e){var t=null,o={},n=null;if(e.get("marker-color")||e.get("marker-size")||e.get("marker-symbol")){(n={}).src=this.DEFAULT_ICON.src,n.anchor=this.DEFAULT_ICON.anchor;var i=e.get("marker-symbol");i&&-1!==i.search("data:image/png;base64")&&(n.src=i);var r=e.get("marker-color");mt.isHex(r)&&(n.color=mt.hexToRgba(r,1));var a=e.get("marker-size");if(a)switch(a){case"small":n.scale=.5;break;case"medium":n.scale=1;break;case"large":n.scale=1.5;break;default:n.scale=this.DEFAULT_ICON.scale}}var s=null;(e.get("stroke")||e.get("stroke-opacity")||e.get("stroke-width"))&&((s={}).color=mt.hexToRgba(e.get("stroke"),+e.get("stroke-opacity")||this.DEFAULT_STROKE.opacity),s.width=+e.get("stroke-width")||this.DEFAULT_STROKE.width);var l=null;(e.get("fill")||e.get("fill-opacity"))&&((l={}).color=mt.hexToRgba(e.get("fill"),+e.get("fill-opacity")||this.DEFAULT_FILL.opacity));var c=null,u=null,d=""!==e.get("name");d&&((e.get("label-fill")||e.get("label-fill-opacity"))&&((u={}).color=mt.hexToRgba(e.get("label-fill"),+e.get("label-fill-opacity")||this.DEFAULT_TEXT.fill.opacity)),(e.get("label-stroke")||e.get("label-stroke-opacity")||e.get("label-stroke-width"))&&((c={}).color=mt.hexToRgba(e.get("label-stroke"),+e.get("label-stroke-opacity")||this.DEFAULT_TEXT.stroke.opacity),c.width=+e.get("label-stroke-width")||this.DEFAULT_TEXT.stroke.width));var p=e.get("circle-radius")||this.DEFAULT_CIRCLE.radius,h=null;(e.get("circle-stroke")||e.get("circle-stroke-opacity")||e.get("circle-stroke-width"))&&((h={}).color=mt.hexToRgba(e.get("circle-stroke"),+e.get("circle-stroke-opacity")||this.DEFAULT_CIRCLE.stroke.opacity),h.width=+e.get("circle-stroke-width")||this.DEFAULT_CIRCLE.stroke.width);var g=null;(e.get("circle-fill")||e.get("circle-fill-opacity"))&&((g={}).color=mt.hexToRgba(e.get("circle-fill"),+e.get("circle-fill-opacity")||this.DEFAULT_CIRCLE.fill.opacity));var m=e.getGeometry().getType();switch(m){case"Circle":case"Point":case"MultiPoint":var f=!1,y={};if(h&&(y.stroke=new Pt.a(h)),g&&(y.fill=new St.a(g)),0!==Object.keys(y).length&&(f=!0,y.radius=+p,o.image=new bt.a(y)),n&&(o.image=new _t.a(n)),d){var A={};if(c&&(A.stroke=new Pt.a(c)),u&&(A.fill=new St.a(u)),0!==Object.keys(A).length)A.text=e.get("name"),A.textAlign=e.get("label-textAlign")||this.DEFAULT_TEXT.textAlign,A.font=e.get("label-font")||this.DEFAULT_TEXT.font,o.text=new kt.a(Object.assign({},this.DEFAULT_TEXT,A));else if(n||f){var v=new kt.a(Object.assign({},this.DEFAULT_TEXT,{fill:new St.a(this.DEFAULT_TEXT.fill),stroke:new Pt.a(this.DEFAULT_TEXT.stroke)}));if(v){var C=v.clone();C.setText(e.get("name")),o.text=C}}}break;case"Polygon":case"MultiPolygon":s&&(o.stroke=new Pt.a(s)),l&&(o.fill=new St.a(l));break;case"LineString":case"MultiLineString":if(s&&(o.stroke=new Pt.a(s)),this.APPLY_CONVERT_GEOM_GPX&&l){var I=e.get("type");if(I&&("Polygon"===I||"MultiPolygon"===I)){o.fill=new St.a(l);var b=e.clone(),w="LineString"===m?Rt.a:Ot.a;e.setGeometry(new w([b.getGeometry().getCoordinates()]))}}}return 0!==Object.keys(o).length&&(t=new Ct.a(o)),t},defineStyleFunctionByDefault:function(e){if(!e)return[];if(0===Object.keys(e).length)return[];return function(t,o){var n=null;switch(t.getGeometry().getType()){case"Point":case"MultiPoint":var i={};if(e.getImage()&&(i.image=e.getImage()),e.getText()&&t.get("name")){var r=e.getText().clone();r.setText(t.get("name")),i.text=r}n=new Ct.a(i);break;case"Circle":var a={},s={};if(e.getFill()&&(s.fill=e.getFill()),e.getStroke()&&(s.stroke=e.getStroke()),e.getText()&&t.get("name")){var l=e.getText().clone();l.setText(t.get("name")),a.text=l}0!==Object.keys(s).length&&(s.radius=3,a.image=new bt.a(s)),n=new Ct.a(a);break;case"Polygon":case"MultiPolygon":var c={};e.getFill()&&(c.fill=e.getFill()),e.getStroke()&&(c.stroke=e.getStroke()),n=new Ct.a(c);break;case"LineString":case"LinearRing":case"MultiLineString":var u={};e.getStroke()&&(u.stroke=e.getStroke()),n=new Ct.a(u)}return[n]}},definePropertiesFromStyleByType:function(e){switch(e.getGeometry().getType()){case"Point":case"MultiPoint":e.setPropertyMarker(),e.setPropertyLabel();break;case"LineString":case"MultiLineString":e.setPropertyStroke();break;case"Polygon":case"MultiPolygon":e.setPropertyStroke(),e.setPropertyFill()}},definePropertiesFromStyle:function(e){var t=e.getStyle()||e.getStyleFunction();if(t){if("function"==typeof t){var o=t.call(this,e,0);if(!o||0===o.length)return;t=Array.isArray(o)?o[0]:o,e.setStyle(t)}this.definePropertiesFromStyleByType(e)}},defineTagFromStyle:function(e,t){return Lt.trace("todo..."),null}},jt=Dt;function Ut(e){return(Ut="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)}var Nt=at.getLogger("parser"),Bt={parse:function(e){var t=null,n="undefined"!=typeof window?window:null;"object"===("undefined"==typeof exports?"undefined":Ut(exports))&&null===window?t=(new(0,o(36).DOMParser)).parseFromString(e,"text/xml"):n.DOMParser?t=(new n.DOMParser).parseFromString(e,"text/xml"):n.ActiveXObject?((t=new n.ActiveXObject("Microsoft.XMLDOM")).async=!1,t.loadXML(e)):Nt.log("Incompatible environment for DOM Parser !");var i=t.querySelector("parsererror");return i?(console.error(i),null):(Nt.trace(t),t)},toString:function(e){var t=(new XMLSerializer).serializeToString(e);return Nt.trace(t),t},format:function(e){for(var t="",o=(e=e.replace(/(>)\s*(<)(\/*)/g,"$1\n$2$3").replace(/ *(.*) +\n/g,"$1\n").replace(/(<.+>)(.+\n)/g,"$1\n$2")).split("\n"),n=0,i="other",r={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0},a=0;a/)),c=Boolean(s.match(/<\/.+>/)),u=Boolean(s.match(/<[^!].*>/)),d=l?"single":c?"closing":u?"opening":"other",p=i+"->"+d;i=d;var h="";n+=r[p];for(var g=0;gclosing"===p?t=t.substr(0,t.length-1)+s+"\n":t+=h+s+"\n"}return Nt.trace(t),t}};function Ft(e){return(Ft="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)}var zt={detectSupport:function(){var e=!0,t=window.navigator.userAgent.toLowerCase();return-1===t.indexOf("iphone")&&-1===t.indexOf("ipod")&&-1===t.indexOf("ipad")&&-1===t.indexOf("android")&&-1===t.indexOf("mobile")&&-1===t.indexOf("blackberry")&&-1===t.indexOf("tablet")&&-1===t.indexOf("phone")&&-1===t.indexOf("touch")||(e=!1),-1===t.indexOf("msie")&&-1===t.indexOf("trident")||(e=!0),e},assign:function(e,t){for(var o in e=e||{},t)t.hasOwnProperty(o)&&(e[o]=t[o]);return e},mergeParams:function(e,t,o){if(e&&t)for(var n in void 0===o&&(o=!0),t)t.hasOwnProperty(n)&&("object"===Ft(t[n])?e.hasOwnProperty(n)?this.mergeParams(e[n],t[n],o):e[n]=t[n]:e.hasOwnProperty(n)?o&&(e[n]=t[n]):e[n]=t[n])}},Vt=at.getLogger("extended KML format"),Wt=function(e){function t(o){if(!(this instanceof t))throw new TypeError("ERROR CLASS_CONSTRUCTOR");o=o||{},this.source=null,this.extensions=o.extensions||null,o.defaultStyle&&!Array.isArray(o.defaultStyle)&&(o.defaultStyle=[o.defaultStyle]),null!==o.defaultStyle&&void 0!==o.defaultStyle||(o.defaultStyle=[]),e.call(this,o)}function o(e,t,o){for(var n="#document"===e.nodeName?e.childNodes[0].childNodes:e.childNodes,i=n,r=0;r)\s*(<)/g,"$1$2"),null===(i=Bt.parse(a)))return r;function s(e){var t="";t+=e.substr(6,2),t+=e.substr(4,2),t+=e.substr(2,2);for(var o=parseInt(t,16).toString(16),n="",i=o.length||0,r=0;r<6-i;r++)n+="0";return o="#"+n+o}var l=function(e,t){if(Vt.trace("label with style :",t),e){for(var o=e.getProperties().name,n=s("ff000000"),i="#FFFFFF",r=0,a="Sans",l="16px",c=null,u=5,d="#000000",p="#ffffff",h=1,g=!1,m=!1,f=t.childNodes,y=0;yt&&(n=!1),n&&p&&pt?1:er&&(c-s)*(r-l)-(i-s)*(u-l)>0&&a++:u<=r&&(c-s)*(r-l)-(i-s)*(u-l)<0&&a--,s=c,l=u}return 0!==a}function Zo(e,t,o,n,i,r){if(0===o.length)return!1;if(!Jo(e,t,o[0],n,i,r))return!1;for(var a=1,s=o.length;aC&&Zo(e,t,o,n,c=(u+d)/2,g)&&(v=c,C=I),u=d}return isNaN(v)&&(v=i[r]),a?(a.push(v,g,C),a):[v,g,C]}var Xo={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"};var Qo={};Qo[Xo.RADIANS]=6370997/(2*Math.PI),Qo[Xo.DEGREES]=2*Math.PI*6370997/360,Qo[Xo.FEET]=.3048,Qo[Xo.METERS]=1,Qo[Xo.USFEET]=1200/3937;var $o=Xo,en=function(){function e(e){this.code_=e.code,this.units_=e.units,this.extent_=void 0!==e.extent?e.extent:null,this.worldExtent_=void 0!==e.worldExtent?e.worldExtent:null,this.axisOrientation_=void 0!==e.axisOrientation?e.axisOrientation:"enu",this.global_=void 0!==e.global&&e.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=e.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=e.metersPerUnit}return e.prototype.canWrapX=function(){return this.canWrapX_},e.prototype.getCode=function(){return this.code_},e.prototype.getExtent=function(){return this.extent_},e.prototype.getUnits=function(){return this.units_},e.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||Qo[this.units_]},e.prototype.getWorldExtent=function(){return this.worldExtent_},e.prototype.getAxisOrientation=function(){return this.axisOrientation_},e.prototype.isGlobal=function(){return this.global_},e.prototype.setGlobal=function(e){this.global_=e,this.canWrapX_=!(!e||!this.extent_)},e.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},e.prototype.setDefaultTileGrid=function(e){this.defaultTileGrid_=e},e.prototype.setExtent=function(e){this.extent_=e,this.canWrapX_=!(!this.global_||!e)},e.prototype.setWorldExtent=function(e){this.worldExtent_=e},e.prototype.setGetPointResolution=function(e){this.getPointResolutionFunc_=e},e.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},e}();var tn="cosh"in Math?Math.cosh:function(e){var t=Math.exp(e);return(t+1/t)/2};"log2"in Math&&Math.log2;function on(e,t,o){return e+o*(t-e)}var nn=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),rn=6378137*Math.PI,an=[-rn,-rn,rn,rn],sn=[-180,-85,180,85],ln=6378137*Math.log(Math.tan(Math.PI/2)),cn=function(e){function t(t){return e.call(this,{code:t,units:$o.METERS,extent:an,global:!0,worldExtent:sn,getPointResolution:function(e,t){return e/tn(t[1]/6378137)}})||this}return nn(t,e),t}(en),un=[new cn("EPSG:3857"),new cn("EPSG:102100"),new cn("EPSG:102113"),new cn("EPSG:900913"),new cn("http://www.opengis.net/def/crs/EPSG/0/3857"),new cn("http://www.opengis.net/gml/srs/epsg.xml#3857")];function dn(e,t,o){var n=e.length,i=o>1?o:2,r=t;void 0===r&&(r=i>2?e.slice():new Array(n));for(var a=0;aln?s=ln:s<-ln&&(s=-ln),r[a+1]=s}return r}function pn(e,t,o){var n=e.length,i=o>1?o:2,r=t;void 0===r&&(r=i>2?e.slice():new Array(n));for(var a=0;a>1)],t))<0?a=n+1:(s=n,l=!i);return l?a:~a}(h,y);A<0?(l=(y-h[-A-2])/(h[-A-1]-h[-A-2]),s=t+(-A-2)*n):s=t+A*n}var v=a>1?a:2,C=r||new Array(v);for(g=0;g=.05){for(var o="",n=e.split("\n"),i=Fn.slice(0,Math.round(t/.1)),r=0,a=n.length;r0&&(o+="\n"),o+=n[r].split("").join(i);return o}return e}function Vn(){return Bn||(Bn=Nn(1,1).getContext("2d")),Bn}function Wn(e,t){return Vn().measureText(e).width+(e.length-1)*t}var qn={};Ln.labelCache&&Dn(Ln.labelCache,"clear",(function(){qn={}}));var Hn,Yn,Jn=On.e.isFunction,Zn=On.e.convertFunction,Kn=On.c.isExpression,Xn=On.c.createPropertyExpression,Qn={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},$n={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]},ei={},ti={zoom:0};function oi(e,t,o,n,i,r){var a=e.id;r||(r={},console.warn("No functionCache provided to getValue()")),r[a]||(r[a]={});var s=r[a];if(!s[o]){var l=(e[t]||ei)[o],c=On.f["".concat(t,"_").concat(e.type)][o];void 0===l&&(l=c.default);var u=Kn(l);if(!u&&Jn(l)&&(l=Zn(l,c),u=!0),u){var d=function(e,t){var o=Xn(e,t);if("error"===o.result)throw new Error(o.value.map((function(e){return"".concat(e.key,": ").concat(e.message)})).join(", "));return o.value}(l,c);s[o]=d.evaluate.bind(d)}else"color"==c.type&&(l=On.a.parse(l)),s[o]=function(){return l}}return ti.zoom=n,s[o](ti,i)}function ni(e,t){if(e){if(0===e.a||0===t)return;var o=e.a;return t=void 0===t?1:t,"rgba("+Math.round(255*e.r/o)+","+Math.round(255*e.g/o)+","+Math.round(255*e.b/o)+","+o*t+")"}return e}var ii=/^([^]*)\{(.*)\}([^]*)$/;function ri(e,t){var o;do{if(o=e.match(ii)){var n=t[o[2]]||"";e=o[1]+n+o[3]}}while(o);return e}var ai=!1;var si=function(e,t,o,n,i,r,a){if(void 0===n&&(n=Un),"string"==typeof t&&(t=JSON.parse(t)),8!=t.version)throw new Error("glStyle version 8 required.");var s,l;if(r)if("undefined"!=typeof Image){var c=new Image;c.crossOrigin="anonymous",c.onload=function(){s=c,l=[c.width,c.height],e.changed(),c.onload=null},c.src=r}else if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope){var u=self;u.postMessage({action:"loadImage",src:r}),u.addEventListener("message",(function(e){"imageLoaded"===e.data.action&&e.data.src===r&&(s=e.data.image,l=[s.width,s.height])}))}for(var d,p=Object(On.b)(t.layers),h={},g=[],m={},f={},y={},A={},v=0,C=p.length;v=C.maxzoom)return"continue";var _=C.filter;if(!_||function(e,t,o,n,i){return i||console.warn("No filterCache provided to evaluateFilter()"),e in i||(i[e]=Object(On.d)(t).filter),ti.zoom=n,i[e](ti,o)}(I,_,p,c,A)){u=C;var E=void 0,S=void 0,k=void 0,G=void 0,R=void 0,T=void 0,O=v.index;if(3==d&&("fill"==C.type||"fill-extrusion"==C.type))if(S=oi(C,"paint",C.type+"-opacity",c,p,y),C.type+"-pattern"in w){var L=oi(C,"paint",C.type+"-pattern",c,p,y);if(L){var D="string"==typeof L?ri(L,o):L.toString();if(s&&i&&i[D]){++g,(T=x[g])&&T.getFill()&&!T.getStroke()&&!T.getText()||(T=new Ct.a({fill:new St.a}),x[g]=T),k=T.getFill(),T.setZIndex(O);var j=f[he=D+"."+S];if(!j){var U=Nn((ge=i[D]).width,ge.height),N=U.getContext("2d");N.globalAlpha=S,N.drawImage(s,ge.x,ge.y,ge.width,ge.height,0,0,ge.width,ge.height),j=N.createPattern(U,"repeat"),f[he]=j}k.setColor(j)}}}else(E=ni(oi(C,"paint",C.type+"-color",c,p,y),S))&&(C.type+"-outline-color"in w&&(R=ni(oi(C,"paint",C.type+"-outline-color",c,p,y),S)),R||(R=E),++g,(T=x[g])&&T.getFill()&&T.getStroke()&&!T.getText()||(T=new Ct.a({fill:new St.a,stroke:new Pt.a}),x[g]=T),(k=T.getFill()).setColor(E),(G=T.getStroke()).setColor(R),G.setWidth(1),T.setZIndex(O));if(1!=d&&"line"==C.type){E=!("line-pattern"in w)&&"line-color"in w?ni(oi(C,"paint","line-color",c,p,y),oi(C,"paint","line-opacity",c,p,y)):void 0;var B=oi(C,"paint","line-width",c,p,y);E&&B>0&&(++g,(T=x[g])&&T.getStroke()&&!T.getFill()&&!T.getText()||(T=new Ct.a({stroke:new Pt.a}),x[g]=T),(G=T.getStroke()).setLineCap(oi(C,"layout","line-cap",c,p,y)),G.setLineJoin(oi(C,"layout","line-join",c,p,y)),G.setMiterLimit(oi(C,"layout","line-miter-limit",c,p,y)),G.setColor(E),G.setWidth(B),G.setLineDash(w["line-dasharray"]?oi(C,"paint","line-dasharray",c,p,y).map((function(e){return e*B})):null),T.setZIndex(O))}var F=!1,z=null,V=0,W=void 0,q=void 0,H=void 0;if((1==d||2==d)&&"icon-image"in b){var Y=oi(C,"layout","icon-image",c,p,y);if(Y){W="string"==typeof Y?ri(Y,o):Y.toString();var J=void 0;if(s&&i&&i[W]){var Z=oi(C,"layout","icon-rotation-alignment",c,p,y);if(2==d){var K=e.getGeometry();if(K.getFlatMidpoint||K.getFlatMidpoints){var X=K.getExtent();if(Math.sqrt(Math.max(Math.pow((X[2]-X[0])/t,2),Math.pow((X[3]-X[1])/t,2)))>150){var Q="MultiLineString"===K.getType()?K.getFlatMidpoints():K.getFlatMidpoint();if(Yn||(Yn=new Gn("Point",Hn=[NaN,NaN],[],{},null)),J=Yn,Hn[0]=Q[0],Hn[1]=Q[1],"line"===(ke=oi(C,"layout","symbol-placement",c,p,y))&&"map"===Z)for(var $=K.getStride(),ee=K.getFlatCoordinates(),te=0,oe=ee.length-$;te=se&&Q[0]<=ce&&Q[1]>=le&&Q[1]<=ue){V=Math.atan2(ie-ae,re-ne);break}}}}}if(2!==d||J){var de=oi(C,"layout","icon-size",c,p,y),pe=void 0!==w["icon-color"]?oi(C,"paint","icon-color",c,p,y):null;if(!pe||0!==pe.a){var he=W+"."+de;if(null!==pe&&(he+="."+pe),!(q=m[he])){var ge=i[W];q=new _t.a({color:pe?[255*pe.r,255*pe.g,255*pe.b,pe.a]:void 0,img:s,imgSize:l,size:[ge.width,ge.height],offset:[ge.x,ge.y],rotateWithView:"map"===Z,scale:de/ge.pixelRatio}),m[he]=q}}q&&(++g,(T=x[g])&&T.getImage()&&!T.getFill()&&!T.getStroke()||(T=new Ct.a,x[g]=T),T.setGeometry(J),q.setRotation(V+jn(oi(C,"layout","icon-rotate",c,p,y))),q.setOpacity(oi(C,"paint","icon-opacity",c,p,y)),q.setAnchor($n[oi(C,"layout","icon-anchor",c,p,y)]),T.setImage(q),z=T.getText(),T.setText(void 0),T.setZIndex(O),F=!0,H=!1)}else H=!0}}}if(1==d&&"circle-radius"in w){++g,(T=x[g])&&T.getImage()&&!T.getFill()&&!T.getStroke()||(T=new Ct.a,x[g]=T);var me=oi(C,"paint","circle-radius",c,p,y),fe=ni(oi(C,"paint","circle-stroke-color",c,p,y),oi(C,"paint","circle-stroke-opacity",c,p,y)),ye=ni(oi(C,"paint","circle-color",c,p,y),oi(C,"paint","circle-opacity",c,p,y)),Ae=oi(C,"paint","circle-stroke-width",c,p,y),ve=me+"."+fe+"."+ye+"."+Ae;(q=m[ve])||(q=new bt.a({radius:me,stroke:fe&&Ae>0?new Pt.a({width:Ae,color:fe}):void 0,fill:ye?new St.a({color:ye}):void 0}),m[ve]=q),T.setImage(q),z=T.getText(),T.setText(void 0),T.setGeometry(void 0),T.setZIndex(O),F=!0}var Ce=void 0;if("text-field"in b)Ce=ri(oi(C,"layout","text-field",c,p,y).toString(),o).trim(),S=oi(C,"paint","text-opacity",c,p,y);if(Ce&&S&&!H){F||(++g,(T=x[g])&&T.getText()&&!T.getFill()&&!T.getStroke()||(T=new Ct.a,x[g]=T),T.setImage(void 0),T.setGeometry(void 0)),T.getText()||T.setText(z||new kt.a({padding:[2,2,2,2]})),z=T.getText();var Ie=Math.round(oi(C,"layout","text-size",c,p,y)),be=oi(C,"layout","text-font",c,p,y),we=oi(C,"layout","text-line-height",c,p,y),_e=Tn()(a?a(be):be,Ie,we),Ee=b["text-transform"];"uppercase"==Ee?Ce=Ce.toUpperCase():"lowercase"==Ee&&(Ce=Ce.toLowerCase());var Se=oi(C,"layout","text-max-width",c,p,y),Me=oi(C,"layout","text-letter-spacing",c,p,y),Pe=2==d?zn(Ce,Me):function e(t,o,n,i){if(-1!==t.indexOf("\n")){for(var r=t.split("\n"),a=[],s=0,l=r.length;s1){var p=Vn();p.font=o;var h=p.measureText("M").width*n,g="";for(a=[],s=0,l=d.length;s1;++s){var y=a[s];if(Wn(y,i)<.35*h){var A=s>0?Wn(a[s-1],i):1/0,v=s.7*h&&Wn(I,i)<.6*h){var b=C.split(" "),w=b.pop();Wn(w,i)<.2*h&&(a[s]=b.join(" "),a[s+1]=w+" "+I),l-=1}}u=a.join("\n")}else u=t;u=zn(u,i),qn[c]=u}return u}(Ce,_e,Se,Me);z.setText(Pe),z.setFont(_e),z.setRotation(jn(oi(C,"layout","text-rotate",c,p,y)));var xe=oi(C,"layout","text-anchor",c,p,y),ke=F||1==d?"point":oi(C,"layout","symbol-placement",c,p,y);z.setPlacement(ke);var Ge=oi(C,"paint","text-halo-width",c,p,y),Re=oi(C,"layout","text-offset",c,p,y),Te=oi(C,"paint","text-translate",c,p,y),Oe=0,Le=0;if("point"==ke){var De="center";-1!==xe.indexOf("left")?(De="left",Le=Ge):-1!==xe.indexOf("right")&&(De="right",Le=-Ge),z.setTextAlign(De);var je=oi(C,"layout","text-rotation-alignment",c,p,y);z.setRotateWithView("map"==je)}else z.setMaxAngle(jn(oi(C,"layout","text-max-angle",c,p,y))*Ce.length/Pe.length),z.setTextAlign(),z.setRotateWithView(!1);var Ue="middle";0==xe.indexOf("bottom")?(Ue="bottom",Oe=-Ge-.5*(we-1)*Ie):0==xe.indexOf("top")&&(Ue="top",Oe=Ge+.5*(we-1)*Ie),z.setTextBaseline(Ue),z.setOffsetX(Re[0]*Ie+Le+Te[0]),z.setOffsetY(Re[1]*Ie+Oe+Te[1]),P.setColor(ni(oi(C,"paint","text-color",c,p,y),S)),z.setFill(P);var Ne=ni(oi(C,"paint","text-halo-color",c,p,y),S);if(Ne){M.setColor(Ne),Ge*=2;var Be=.5*Ie;M.setWidth(Ge<=Be?Ge:Be),z.setStroke(M)}else z.setStroke(void 0);var Fe=oi(C,"layout","text-padding",c,p,y),ze=z.getPadding();Fe!==ze[0]&&(ze[0]=Fe,ze[1]=Fe,ze[2]=Fe,ze[3]=Fe),T.setZIndex(O)}}},C=0,I=r.length;C-1?(x.length=g+1,ai&&("function"==typeof e.set?e.set("mapbox-layer",u):e.getProperties()["mapbox-layer"]=u),x):void 0}};return e.setStyle(k),e.set("mapbox-source",d),e.set("mapbox-layers",g),k},li=o(70),ci=o.n(li),ui=o(35);function di(e){return(di="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)}var pi,hi=/font-family: ?([^;]*);/,gi=/("|')/g;function mi(e){if(!pi){pi={};for(var t=document.styleSheets,o=0,n=t.length;o2?n[2]:""):e+o}function bi(e,t,o,n,i){return new Promise((function(r,a){if("object"!=di(t)&&(t=JSON.parse(t)),8!=t.version)return a(new Error("glStyle version 8 required."));if(!(e instanceof Oo.a||e instanceof Mo.a))return a(new Error("Can only apply to VectorLayer or VectorTileLayer"));var s,l,c;function u(){c||t.sprite&&!s?c?(e.setStyle(c),r()):a(new Error("Something went wrong trying to apply style.")):(c=si(e,t,o,i,s,l,Ai),e.getStyle()?r():a(new Error("Nothing to show for source [".concat(o,"]"))))}if(t.sprite){var d=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"",p=Ii(t.sprite,n,d+".json");fetch(p,{credentials:"same-origin"}).then((function(e){return e.ok||""===d?e:(p=Ii(t.sprite,n,".json"),fetch(p,{credentials:"same-origin"}))})).then((function(e){if(e.ok)return e.json();a(new Error("Problem fetching sprite from ".concat(p,": ").concat(e.statusText)))})).then((function(e){if(void 0===e)return a(new Error("No sprites found."));s=e,l=Ii(t.sprite,n,d+".png"),u()})).catch((function(e){a(new Error("Sprites cannot be loaded: ".concat(p,": ").concat(e.message)))}))}else u()}))}new to.a;var wi=function(e){function t(o,n){if(!(this instanceof t))throw new TypeError("ERROR CLASS_CONSTRUCTOR");if(!o.layer)throw new Error("ERROR PARAM_MISSING : layer");if("string"!=typeof o.layer)throw new Error("ERROR WRONG TYPE : layer");if(this.layerName=o.layer,this.styleName=o.style,this.sourceId=o.source,void 0===o.ssl&&(o.ssl=!0),this.protocol=!1===o.ssl?"http://":"https://",!uo.a.isConfigLoaded())throw new Error("ERROR : contract key configuration has to be loaded to load Geoportal layers.");var i=this.layerName+"$GEOPORTAIL:GPP:TMS",r=uo.a.configuration.getLayerConf(i);if(!r)throw new Error("ERROR : Layer ID not found into the catalogue !?");this.styleUrl=null,this.styleTitle="";for(var a=0;a>1,u=-7,d=o?i-1:0,p=o?-1:1,h=e[t+d];for(d+=p,r=h&(1<<-u)-1,h>>=-u,u+=s;u>0;r=256*r+e[t+d],d+=p,u-=8);for(a=r&(1<<-u)-1,r>>=-u,u+=n;u>0;a=256*a+e[t+d],d+=p,u-=8);if(0===r)r=1-c;else{if(r===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),r-=c}return(h?-1:1)*a*Math.pow(2,r-n)},t.write=function(e,t,o,n,i,r){var a,s,l,c=8*r-i-1,u=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:r-1,g=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?p/l:p*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[o+h]=255&s,h+=g,s/=256,i-=8);for(a=a<0;e[o+h]=255&a,h+=g,a/=256,c-=8);e[o+h-g]|=128*m}},function(e,t){var o={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==o.call(e)}},function(e,t,o){e.exports=function(){"use strict";var e=484813681109536e-20,t=Math.PI/2,o=.017453292519943295,n=57.29577951308232,i=Math.PI/4,r=2*Math.PI,a=3.14159265359,s={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},l={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},c=/[\s_\-\/\(\)]/g;function u(e,t){if(e[t])return e[t];for(var o,n=Object.keys(e),i=t.toLowerCase().replace(c,""),r=-1;++r=this.text.length)return;e=this.text[this.place++]}switch(this.state){case 1:return this.neutral(e);case 2:return this.keyword(e);case 4:return this.quoted(e);case 5:return this.afterquote(e);case 3:return this.number(e);case-1:return}},y.prototype.afterquote=function(e){if('"'===e)return this.word+='"',void(this.state=4);if(m.test(e))return this.word=this.word.trim(),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in afterquote yet, index '+this.place)},y.prototype.afterItem=function(e){return","===e?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=1)):"]"===e?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=1,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},y.prototype.number=function(e){if(!f.test(e)){if(m.test(e))return this.word=parseFloat(this.word),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in number yet, index '+this.place)}this.word+=e},y.prototype.quoted=function(e){'"'!==e?this.word+=e:this.state=5},y.prototype.keyword=function(e){if(g.test(e))this.word+=e;else{if("["===e){var t=[];return t.push(this.word),this.level++,null===this.root?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,void(this.state=1)}if(!m.test(e))throw new Error("havn't handled \""+e+'" in keyword yet, index '+this.place);this.afterItem(e)}},y.prototype.neutral=function(e){if(h.test(e))return this.word=e,void(this.state=2);if('"'===e)return this.word="",void(this.state=4);if(f.test(e))return this.word=e,void(this.state=3);if(!m.test(e))throw new Error("havn't handled \""+e+'" in neutral yet, index '+this.place);this.afterItem(e)},y.prototype.output=function(){for(;this.place0?90:-90),e.lat_ts=e.lat1)}(i),i};function b(e){var t=this;if(2===arguments.length){var o=arguments[1];"string"==typeof o?"+"===o.charAt(0)?b[e]=d(arguments[1]):b[e]=I(arguments[1]):b[e]=o}else if(1===arguments.length){if(Array.isArray(e))return e.map((function(e){Array.isArray(e)?b.apply(t,e):b(e)}));if("string"==typeof e){if(e in b)return b[e]}else"EPSG"in e?b["EPSG:"+e.EPSG]=e:"ESRI"in e?b["ESRI:"+e.ESRI]=e:"IAU2000"in e?b["IAU2000:"+e.IAU2000]=e:console.log(e);return}}!function(e){e("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),e("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),e("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),e.WGS84=e["EPSG:4326"],e["EPSG:3785"]=e["EPSG:3857"],e.GOOGLE=e["EPSG:3857"],e["EPSG:900913"]=e["EPSG:3857"],e["EPSG:102113"]=e["EPSG:3857"]}(b);var w=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"],_=["3857","900913","3785","102113"];function E(e){if(!function(e){return"string"==typeof e}(e))return e;if(function(e){return e in b}(e))return b[e];if(function(e){return w.some((function(t){return e.indexOf(t)>-1}))}(e)){var t=I(e);if(function(e){var t=u(e,"authority");if(t){var o=u(t,"epsg");return o&&_.indexOf(o)>-1}}(t))return b["EPSG:3857"];var o=function(e){var t=u(e,"extension");if(t)return u(t,"proj4")}(t);return o?d(o):t}return function(e){return"+"===e[0]}(e)?d(e):void 0}var S=function(e,t){var o,n;if(e=e||{},!t)return e;for(n in t)void 0!==(o=t[n])&&(e[n]=o);return e},M=function(e,t,o){var n=e*t;return o/Math.sqrt(1-n*n)},P=function(e){return e<0?-1:1},x=function(e){return Math.abs(e)<=a?e:e-P(e)*r},k=function(e,o,n){var i=e*n,r=.5*e;return i=Math.pow((1-i)/(1+i),r),Math.tan(.5*(t-o))/i},G=function(e,o){for(var n,i,r=.5*e,a=t-2*Math.atan(o),s=0;s<=15;s++)if(n=e*Math.sin(a),a+=i=t-2*Math.atan(o*Math.pow((1-n)/(1+n),r))-a,Math.abs(i)<=1e-10)return a;return-9999};function R(e){return e}var T=[{init:function(){var e=this.b/this.a;this.es=1-e*e,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=M(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(e){var o,r,a=e.x,s=e.y;if(s*n>90&&s*n<-90&&a*n>180&&a*n<-180)return null;if(Math.abs(Math.abs(s)-t)<=1e-10)return null;if(this.sphere)o=this.x0+this.a*this.k0*x(a-this.long0),r=this.y0+this.a*this.k0*Math.log(Math.tan(i+.5*s));else{var l=Math.sin(s),c=k(this.e,s,l);o=this.x0+this.a*this.k0*x(a-this.long0),r=this.y0-this.a*this.k0*Math.log(c)}return e.x=o,e.y=r,e},inverse:function(e){var o,n,i=e.x-this.x0,r=e.y-this.y0;if(this.sphere)n=t-2*Math.atan(Math.exp(-r/(this.a*this.k0)));else{var a=Math.exp(-r/(this.a*this.k0));if(-9999===(n=G(this.e,a)))return null}return o=x(this.long0+i/(this.a*this.k0)),e.x=o,e.y=n,e},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:R,inverse:R,names:["longlat","identity"]}],O={},L=[];function D(e,t){var o=L.length;return e.names?(L[o]=e,e.names.forEach((function(e){O[e.toLowerCase()]=o})),this):(console.log(t),!0)}var j={start:function(){T.forEach(D)},add:D,get:function(e){if(!e)return!1;var t=e.toLowerCase();return void 0!==O[t]&&L[O[t]]?L[O[t]]:void 0}},N={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},U=N.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};N.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var B={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"}},F={};function z(e){if(0===e.length)return null;var t="@"===e[0];return t&&(e=e.slice(1)),"null"===e?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:e,mandatory:!t,grid:F[e]||null,isNull:!1}}function V(e){return e/3600*Math.PI/180}function W(e,t,o){return String.fromCharCode.apply(null,new Uint8Array(e.buffer.slice(t,o)))}function q(e){return e.map((function(e){return[V(e.longitudeShift),V(e.latitudeShift)]}))}function H(e,t,o){return{name:W(e,t+8,t+16).trim(),parent:W(e,t+24,t+24+8).trim(),lowerLatitude:e.getFloat64(t+72,o),upperLatitude:e.getFloat64(t+88,o),lowerLongitude:e.getFloat64(t+104,o),upperLongitude:e.getFloat64(t+120,o),latitudeInterval:e.getFloat64(t+136,o),longitudeInterval:e.getFloat64(t+152,o),gridNodeCount:e.getInt32(t+168,o)}}function Y(e,t,o,n){for(var i=t+176,r=[],a=0;a3&&(0===l.datum_params[3]&&0===l.datum_params[4]&&0===l.datum_params[5]&&0===l.datum_params[6]||(l.datum_type=2,l.datum_params[3]*=e,l.datum_params[4]*=e,l.datum_params[5]*=e,l.datum_params[6]=l.datum_params[6]/1e6+1))),s&&(l.datum_type=3,l.grids=s),l.a=n,l.b=i,l.es=r,l.ep2=a,l}(n.datumCode,n.datum_params,g.a,g.b,m.es,m.ep2,f);S(this,n),S(this,i),this.a=g.a,this.b=g.b,this.rf=g.rf,this.sphere=g.sphere,this.es=m.es,this.e=m.e,this.ep2=m.ep2,this.datum=y,this.init(),o(null,this)}else o(t)}else o(t)}function Z(e,o,n){var i,r,a,s,l=e.x,c=e.y,u=e.z?e.z:0;if(c<-t&&c>-1.001*t)c=-t;else if(c>t&&c<1.001*t)c=t;else{if(c<-t)return{x:-1/0,y:-1/0,z:e.z};if(c>t)return{x:1/0,y:1/0,z:e.z}}return l>Math.PI&&(l-=2*Math.PI),r=Math.sin(c),s=Math.cos(c),a=r*r,{x:((i=n/Math.sqrt(1-o*a))+u)*s*Math.cos(l),y:(i+u)*s*Math.sin(l),z:(i*(1-o)+u)*r}}function K(e,t,o,n){var i,r,a,s,l,c,u,d,p,h,g,m,f,y,A,v=e.x,C=e.y,I=e.z?e.z:0;if(i=Math.sqrt(v*v+C*C),r=Math.sqrt(v*v+C*C+I*I),i/o<1e-12){if(y=0,r/o<1e-12)return A=-n,{x:e.x,y:e.y,z:e.z}}else y=Math.atan2(C,v);a=I/r,d=(s=i/r)*(1-t)*(l=1/Math.sqrt(1-t*(2-t)*s*s)),p=a*l,f=0;do{f++,c=t*(u=o/Math.sqrt(1-t*p*p))/(u+(A=i*d+I*p-u*(1-t*p*p))),m=(g=a*(l=1/Math.sqrt(1-c*(2-c)*s*s)))*d-(h=s*(1-c)*l)*p,d=h,p=g}while(m*m>1e-24&&f<30);return{x:y,y:Math.atan(g/Math.abs(h)),z:A}}function X(e){return 1===e||2===e}J.projections=j,J.projections.start();var Q=function(e,t,o){if(function(e,t){return e.datum_type===t.datum_type&&!(e.a!==t.a||Math.abs(e.es-t.es)>5e-11)&&(1===e.datum_type?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]:2!==e.datum_type||e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]&&e.datum_params[3]===t.datum_params[3]&&e.datum_params[4]===t.datum_params[4]&&e.datum_params[5]===t.datum_params[5]&&e.datum_params[6]===t.datum_params[6])}(e,t))return o;if(5===e.datum_type||5===t.datum_type)return o;var n=e.a,i=e.es;if(3===e.datum_type){if(0!==$(e,!1,o))return;n=6378137,i=.0066943799901413165}var r=t.a,a=t.b,s=t.es;return 3===t.datum_type&&(r=6378137,a=6356752.314,s=.0066943799901413165),i!==s||n!==r||X(e.datum_type)||X(t.datum_type)?(o=Z(o,i,n),X(e.datum_type)&&(o=function(e,t,o){if(1===t)return{x:e.x+o[0],y:e.y+o[1],z:e.z+o[2]};if(2===t){var n=o[0],i=o[1],r=o[2],a=o[3],s=o[4],l=o[5],c=o[6];return{x:c*(e.x-l*e.y+s*e.z)+n,y:c*(l*e.x+e.y-a*e.z)+i,z:c*(-s*e.x+a*e.y+e.z)+r}}}(o,e.datum_type,e.datum_params)),X(t.datum_type)&&(o=function(e,t,o){if(1===t)return{x:e.x-o[0],y:e.y-o[1],z:e.z-o[2]};if(2===t){var n=o[0],i=o[1],r=o[2],a=o[3],s=o[4],l=o[5],c=o[6],u=(e.x-n)/c,d=(e.y-i)/c,p=(e.z-r)/c;return{x:u+l*d-s*p,y:-l*u+d+a*p,z:s*u-a*d+p}}}(o,t.datum_type,t.datum_params)),o=K(o,s,r,a),3!==t.datum_type||0===$(t,!0,o)?o:void 0):o};function $(e,t,o){if(null===e.grids||0===e.grids.length)return console.log("Grid shift grids not found"),-1;for(var i={x:-o.x,y:o.y},r={x:Number.NaN,y:Number.NaN},a=[],s=0;si.y||d>i.x||g1e-12&&Math.abs(a.y)>1e-12);if(l<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=x(r.x+o.ll[0]),n.y=r.y+o.ll[1]}else isNaN(r.x)||(n.x=e.x+r.x,n.y=e.y+r.y);return n}function te(e,t){var o,n={x:e.x/t.del[0],y:e.y/t.del[1]},i=Math.floor(n.x),r=Math.floor(n.y),a=n.x-1*i,s=n.y-1*r,l={x:Number.NaN,y:Number.NaN};if(i<0||i>=t.lim[0])return l;if(r<0||r>=t.lim[1])return l;o=r*t.lim[0]+i;var c=t.cvs[o][0],u=t.cvs[o][1];o++;var d=t.cvs[o][0],p=t.cvs[o][1];o+=t.lim[0];var h=t.cvs[o][0],g=t.cvs[o][1];o--;var m=t.cvs[o][0],f=t.cvs[o][1],y=a*s,A=a*(1-s),v=(1-a)*(1-s),C=(1-a)*s;return l.x=v*c+A*d+C*m+y*h,l.y=v*u+A*p+C*f+y*g,l}var oe=function(e,t,o){var n,i,r,a=o.x,s=o.y,l=o.z||0,c={};for(r=0;r<3;r++)if(!t||2!==r||void 0!==o.z)switch(0===r?(n=a,i=-1!=="ew".indexOf(e.axis[r])?"x":"y"):1===r?(n=s,i=-1!=="ns".indexOf(e.axis[r])?"y":"x"):(n=l,i="z"),e.axis[r]){case"e":c[i]=n;break;case"w":c[i]=-n;break;case"n":c[i]=n;break;case"s":c[i]=-n;break;case"u":void 0!==o[i]&&(c.z=n);break;case"d":void 0!==o[i]&&(c.z=-n);break;default:return null}return c},ne=function(e){var t={x:e[0],y:e[1]};return e.length>2&&(t.z=e[2]),e.length>3&&(t.m=e[3]),t};function ie(e){if("function"==typeof Number.isFinite){if(Number.isFinite(e))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof e||e!=e||!isFinite(e))throw new TypeError("coordinates must be finite numbers")}function re(e,t,i,r){var a;if(Array.isArray(i)&&(i=ne(i)),function(e){ie(e.x),ie(e.y)}(i),e.datum&&t.datum&&function(e,t){return(1===e.datum.datum_type||2===e.datum.datum_type)&&"WGS84"!==t.datumCode||(1===t.datum.datum_type||2===t.datum.datum_type)&&"WGS84"!==e.datumCode}(e,t)&&(i=re(e,a=new J("WGS84"),i,r),e=a),r&&"enu"!==e.axis&&(i=oe(e,!1,i)),"longlat"===e.projName)i={x:i.x*o,y:i.y*o,z:i.z||0};else if(e.to_meter&&(i={x:i.x*e.to_meter,y:i.y*e.to_meter,z:i.z||0}),!(i=e.inverse(i)))return;if(e.from_greenwich&&(i.x+=e.from_greenwich),i=Q(e.datum,t.datum,i))return t.from_greenwich&&(i={x:i.x-t.from_greenwich,y:i.y,z:i.z||0}),"longlat"===t.projName?i={x:i.x*n,y:i.y*n,z:i.z||0}:(i=t.forward(i),t.to_meter&&(i={x:i.x/t.to_meter,y:i.y/t.to_meter,z:i.z||0})),r&&"enu"!==t.axis?oe(t,!0,i):i}var ae=J("WGS84");function se(e,t,o,n){var i,r,a;return Array.isArray(o)?(i=re(e,t,o,n)||{x:NaN,y:NaN},o.length>2?void 0!==e.name&&"geocent"===e.name||void 0!==t.name&&"geocent"===t.name?"number"==typeof i.z?[i.x,i.y,i.z].concat(o.splice(3)):[i.x,i.y,o[2]].concat(o.splice(3)):[i.x,i.y].concat(o.splice(2)):[i.x,i.y]):(r=re(e,t,o,n),2===(a=Object.keys(o)).length||a.forEach((function(n){if(void 0!==e.name&&"geocent"===e.name||void 0!==t.name&&"geocent"===t.name){if("x"===n||"y"===n||"z"===n)return}else if("x"===n||"y"===n)return;r[n]=o[n]})),r)}function le(e){return e instanceof J?e:e.oProj?e.oProj:J(e)}function ce(e,t,o){e=le(e);var n,i=!1;return void 0===t?(t=e,e=ae,i=!0):(void 0!==t.x||Array.isArray(t))&&(o=t,t=e,e=ae,i=!0),t=le(t),o?se(e,t,o):(n={forward:function(o,n){return se(e,t,o,n)},inverse:function(o,n){return se(t,e,o,n)}},i&&(n.oProj=t),n)}var ue=65,de=73,pe=79,he={forward:ge,inverse:function(e){var t=Ae(Ce(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]},toPoint:me};function ge(e,t){return t=t||5,function(e,t){var o,n,i,r,a,s,l,c,u,d,p,h,g,m,f="00000"+e.easting,y="00000"+e.northing;return e.zoneNumber+e.zoneLetter+(u=e.easting,d=e.northing,p=e.zoneNumber,h=ve(p),g=Math.floor(u/1e5),m=Math.floor(d/1e5)%20,o=g,n=m,r="AJSAJS".charCodeAt(i=h-1),a="AFAFAF".charCodeAt(i),c=!1,(s=r+o-1)>90&&(s=s-90+ue-1,c=!0),(s===de||rde||(s>de||rpe||(s>pe||r90&&(s=s-90+ue-1),(l=a+n)>86?(l=l-86+ue-1,c=!0):c=!1,(l===de||ade||(l>de||ape||(l>pe||a86&&(l=l-86+ue-1),String.fromCharCode(s)+String.fromCharCode(l))+f.substr(f.length-5,t)+y.substr(y.length-5,t)}(function(e){var t,o,n,i,r,a,s,l=e.lat,c=e.lon,u=6378137,d=fe(l),p=fe(c);s=Math.floor((c+180)/6)+1,180===c&&(s=60),l>=56&&l<64&&c>=3&&c<12&&(s=32),l>=72&&l<84&&(c>=0&&c<9?s=31:c>=9&&c<21?s=33:c>=21&&c<33?s=35:c>=33&&c<42&&(s=37)),a=fe(6*(s-1)-180+3),t=u/Math.sqrt(1-.00669438*Math.sin(d)*Math.sin(d)),o=Math.tan(d)*Math.tan(d),n=.006739496752268451*Math.cos(d)*Math.cos(d),i=Math.cos(d)*(p-a),r=u*(.9983242984503243*d-.002514607064228144*Math.sin(2*d)+2639046602129982e-21*Math.sin(4*d)-3.418046101696858e-9*Math.sin(6*d));var h,g,m=.9996*t*(i+(1-o+n)*i*i*i/6+(5-18*o+o*o+72*n-.39089081163157013)*i*i*i*i*i/120)+5e5,f=.9996*(r+t*Math.tan(d)*(i*i/2+(5-o+9*n+4*n*n)*i*i*i*i/24+(61-58*o+o*o+600*n-2.2240339282485886)*i*i*i*i*i*i/720));return l<0&&(f+=1e7),{northing:Math.round(f),easting:Math.round(m),zoneNumber:s,zoneLetter:(h=l,g="Z",84>=h&&h>=72?g="X":72>h&&h>=64?g="W":64>h&&h>=56?g="V":56>h&&h>=48?g="U":48>h&&h>=40?g="T":40>h&&h>=32?g="S":32>h&&h>=24?g="R":24>h&&h>=16?g="Q":16>h&&h>=8?g="P":8>h&&h>=0?g="N":0>h&&h>=-8?g="M":-8>h&&h>=-16?g="L":-16>h&&h>=-24?g="K":-24>h&&h>=-32?g="J":-32>h&&h>=-40?g="H":-40>h&&h>=-48?g="G":-48>h&&h>=-56?g="F":-56>h&&h>=-64?g="E":-64>h&&h>=-72?g="D":-72>h&&h>=-80&&(g="C"),g)}}({lat:e[1],lon:e[0]}),t)}function me(e){var t=Ae(Ce(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function fe(e){return e*(Math.PI/180)}function ye(e){return e/Math.PI*180}function Ae(e){var t=e.northing,o=e.easting,n=e.zoneLetter,i=e.zoneNumber;if(i<0||i>60)return null;var r,a,s,l,c,u,d,p,h=6378137,g=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),m=o-5e5,f=t;n<"N"&&(f-=1e7),u=6*(i-1)-180+3,p=(d=f/.9996/6367449.145945056)+(3*g/2-27*g*g*g/32)*Math.sin(2*d)+(21*g*g/16-55*g*g*g*g/32)*Math.sin(4*d)+151*g*g*g/96*Math.sin(6*d),r=h/Math.sqrt(1-.00669438*Math.sin(p)*Math.sin(p)),a=Math.tan(p)*Math.tan(p),s=.006739496752268451*Math.cos(p)*Math.cos(p),l=.99330562*h/Math.pow(1-.00669438*Math.sin(p)*Math.sin(p),1.5),c=m/(.9996*r);var y=p-r*Math.tan(p)/l*(c*c/2-(5+3*a+10*s-4*s*s-.06065547077041606)*c*c*c*c/24+(61+90*a+298*s+45*a*a-1.6983531815716497-3*s*s)*c*c*c*c*c*c/720);y=ye(y);var A,v=(c-(1+2*a+s)*c*c*c/6+(5-2*s+28*a-3*s*s+.05391597401814761+24*a*a)*c*c*c*c*c/120)/Math.cos(p);if(v=u+ye(v),e.accuracy){var C=Ae({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});A={top:C.lat,right:C.lon,bottom:y,left:v}}else A={lat:y,lon:v};return A}function ve(e){var t=e%6;return 0===t&&(t=6),t}function Ce(e){if(e&&0===e.length)throw"MGRSPoint coverting from nothing";for(var t,o=e.length,n=null,i="",r=0;!/[A-Z]/.test(t=e.charAt(r));){if(r>=2)throw"MGRSPoint bad conversion from: "+e;i+=t,r++}var a=parseInt(i,10);if(0===r||r+3>o)throw"MGRSPoint bad conversion from: "+e;var s=e.charAt(r++);if(s<="A"||"B"===s||"Y"===s||s>="Z"||"I"===s||"O"===s)throw"MGRSPoint zone letter "+s+" not handled: "+e;n=e.substring(r,r+=2);for(var l=ve(a),c=function(e,t){for(var o="AJSAJS".charCodeAt(t-1),n=1e5,i=!1;o!==e.charCodeAt(0);){if(++o===de&&o++,o===pe&&o++,o>90){if(i)throw"Bad character: "+e;o=ue,i=!0}n+=1e5}return n}(n.charAt(0),l),u=function(e,t){if(e>"V")throw"MGRSPoint given invalid Northing "+e;for(var o="AFAFAF".charCodeAt(t-1),n=0,i=!1;o!==e.charCodeAt(0);){if(++o===de&&o++,o===pe&&o++,o>86){if(i)throw"Bad character: "+e;o=ue,i=!0}n+=1e5}return n}(n.charAt(1),l);u0&&(p=1e5/Math.pow(10,m),h=e.substring(r,r+m),f=parseFloat(h)*p,g=e.substring(r+m),y=parseFloat(g)*p),{easting:f+c,northing:y+u,zoneLetter:s,zoneNumber:a,accuracy:p}}function Ie(e){var t;switch(e){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+e}function be(e,t,o){if(!(this instanceof be))return new be(e,t,o);if(Array.isArray(e))this.x=e[0],this.y=e[1],this.z=e[2]||0;else if("object"==typeof e)this.x=e.x,this.y=e.y,this.z=e.z||0;else if("string"==typeof e&&void 0===t){var n=e.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=e,this.y=t,this.z=o||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}be.fromMGRS=function(e){return new be(me(e))},be.prototype.toMGRS=function(e){return ge([this.x,this.y],e)};var we=.01068115234375,_e=function(e){var t=[];t[0]=1-e*(.25+e*(.046875+e*(.01953125+e*we))),t[1]=e*(.75-e*(.046875+e*(.01953125+e*we)));var o=e*e;return t[2]=o*(.46875-e*(.013020833333333334+.007120768229166667*e)),o*=e,t[3]=o*(.3645833333333333-.005696614583333333*e),t[4]=o*e*.3076171875,t},Ee=function(e,t,o,n){return o*=t,t*=t,n[0]*e-o*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))},Se=function(e,t,o){for(var n=1/(1-t),i=e,r=20;r;--r){var a=Math.sin(i),s=1-t*a*a;if(i-=s=(Ee(i,a,Math.cos(i),o)-e)*(s*Math.sqrt(s))*n,Math.abs(s)<1e-10)return i}return i},Me={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=_e(this.es),this.ml0=Ee(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function(e){var t,o,n,i=e.x,r=e.y,a=x(i-this.long0),s=Math.sin(r),l=Math.cos(r);if(this.es){var c=l*a,u=Math.pow(c,2),d=this.ep2*Math.pow(l,2),p=Math.pow(d,2),h=Math.abs(l)>1e-10?Math.tan(r):0,g=Math.pow(h,2),m=Math.pow(g,2);t=1-this.es*Math.pow(s,2),c/=Math.sqrt(t);var f=Ee(r,s,l,this.en);o=this.a*(this.k0*c*(1+u/6*(1-g+d+u/20*(5-18*g+m+14*d-58*g*d+u/42*(61+179*m-m*g-479*g)))))+this.x0,n=this.a*(this.k0*(f-this.ml0+s*a*c/2*(1+u/12*(5-g+9*d+4*p+u/30*(61+m-58*g+270*d-330*g*d+u/56*(1385+543*m-m*g-3111*g))))))+this.y0}else{var y=l*Math.sin(a);if(Math.abs(Math.abs(y)-1)<1e-10)return 93;if(o=.5*this.a*this.k0*Math.log((1+y)/(1-y))+this.x0,n=l*Math.cos(a)/Math.sqrt(1-Math.pow(y,2)),(y=Math.abs(n))>=1){if(y-1>1e-10)return 93;n=0}else n=Math.acos(n);r<0&&(n=-n),n=this.a*this.k0*(n-this.lat0)+this.y0}return e.x=o,e.y=n,e},inverse:function(e){var o,n,i,r,a=(e.x-this.x0)*(1/this.a),s=(e.y-this.y0)*(1/this.a);if(this.es)if(o=this.ml0+s/this.k0,n=Se(o,this.es,this.en),Math.abs(n)1e-10?Math.tan(n):0,d=this.ep2*Math.pow(c,2),p=Math.pow(d,2),h=Math.pow(u,2),g=Math.pow(h,2);o=1-this.es*Math.pow(l,2);var m=a*Math.sqrt(o)/this.k0,f=Math.pow(m,2);i=n-(o*=u)*f/(1-this.es)*.5*(1-f/12*(5+3*h-9*d*h+d-4*p-f/30*(61+90*h-252*d*h+45*g+46*d-f/56*(1385+3633*h+4095*g+1574*g*h)))),r=x(this.long0+m*(1-f/6*(1+2*h+d-f/20*(5+28*h+24*g+8*d*h+6*d-f/42*(61+662*h+1320*g+720*g*h))))/c)}else i=t*P(s),r=0;else{var y=Math.exp(a/this.k0),A=.5*(y-1/y),v=this.lat0+s/this.k0,C=Math.cos(v);o=Math.sqrt((1-Math.pow(C,2))/(1+Math.pow(A,2))),i=Math.asin(o),s<0&&(i=-i),r=0===A&&0===C?0:x(Math.atan2(A,C)+this.long0)}return e.x=r,e.y=i,e},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]},Pe=function(e){var t=Math.exp(e);return t=(t-1/t)/2},xe=function(e,t){e=Math.abs(e),t=Math.abs(t);var o=Math.max(e,t),n=Math.min(e,t)/(o||1);return o*Math.sqrt(1+Math.pow(n,2))},ke=function(e){var t=Math.abs(e);return t=function(e){var t=1+e,o=t-1;return 0===o?e:e*Math.log(t)/o}(t*(1+t/(xe(1,t)+1))),e<0?-t:t},Ge=function(e,t){for(var o,n=2*Math.cos(2*t),i=e.length-1,r=e[i],a=0;--i>=0;)o=n*r-a+e[i],a=r,r=o;return t+o*Math.sin(2*t)},Re=function(e,t,o){for(var n,i,r=Math.sin(t),a=Math.cos(t),s=Pe(o),l=function(e){var t=Math.exp(e);return t=(t+1/t)/2}(o),c=2*a*l,u=-2*r*s,d=e.length-1,p=e[d],h=0,g=0,m=0;--d>=0;)n=g,i=h,p=c*(g=p)-n-u*(h=m)+e[d],m=u*g-i+c*h;return[(c=r*l)*p-(u=a*s)*m,c*m+u*p]},Te={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(Me.init.apply(this),this.forward=Me.forward,this.inverse=Me.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var e=this.es/(1+Math.sqrt(1-this.es)),t=e/(2-e),o=t;this.cgb[0]=t*(2+t*(-2/3+t*(t*(116/45+t*(26/45+t*(-2854/675)))-2))),this.cbg[0]=t*(t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))-2),o*=t,this.cgb[1]=o*(7/3+t*(t*(-227/45+t*(2704/315+t*(2323/945)))-1.6)),this.cbg[1]=o*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),o*=t,this.cgb[2]=o*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=o*(-26/15+t*(34/21+t*(1.6+t*(-12686/2835)))),o*=t,this.cgb[3]=o*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=o*(1237/630+t*(t*(-24832/14175)-2.4)),o*=t,this.cgb[4]=o*(4174/315+t*(-144838/6237)),this.cbg[4]=o*(-734/315+t*(109598/31185)),o*=t,this.cgb[5]=o*(601676/22275),this.cbg[5]=o*(444337/155925),o=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+o*(1/4+o*(1/64+o/256))),this.utg[0]=t*(t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))-.5),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=o*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=o*(13/48+t*(t*(557/1440+t*(281/630+t*(-1983433/1935360)))-.6)),o*=t,this.utg[2]=o*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=o*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),o*=t,this.utg[3]=o*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=o*(49561/161280+t*(-179/168+t*(6601661/7257600))),o*=t,this.utg[4]=o*(-4583/161280+t*(108847/3991680)),this.gtu[4]=o*(34729/80640+t*(-3418889/1995840)),o*=t,this.utg[5]=o*(-20648693/638668800),this.gtu[5]=.6650675310896665*o;var n=Ge(this.cbg,this.lat0);this.Zb=-this.Qn*(n+function(e,t){for(var o,n=2*Math.cos(t),i=e.length-1,r=e[i],a=0;--i>=0;)o=n*r-a+e[i],a=r,r=o;return Math.sin(t)*o}(this.gtu,2*n))},forward:function(e){var t=x(e.x-this.long0),o=e.y;o=Ge(this.cbg,o);var n=Math.sin(o),i=Math.cos(o),r=Math.sin(t),a=Math.cos(t);o=Math.atan2(n,a*i),t=Math.atan2(r*i,xe(n,i*a)),t=ke(Math.tan(t));var s,l,c=Re(this.gtu,2*o,2*t);return o+=c[0],t+=c[1],Math.abs(t)<=2.623395162778?(s=this.a*(this.Qn*t)+this.x0,l=this.a*(this.Qn*o+this.Zb)+this.y0):(s=1/0,l=1/0),e.x=s,e.y=l,e},inverse:function(e){var t,o,n=(e.x-this.x0)*(1/this.a),i=(e.y-this.y0)*(1/this.a);if(i=(i-this.Zb)/this.Qn,n/=this.Qn,Math.abs(n)<=2.623395162778){var r=Re(this.utg,2*i,2*n);i+=r[0],n+=r[1],n=Math.atan(Pe(n));var a=Math.sin(i),s=Math.cos(i),l=Math.sin(n),c=Math.cos(n);i=Math.atan2(a*c,xe(l,c*s)),n=Math.atan2(l,c*s),t=x(n+this.long0),o=Ge(this.cgb,i)}else t=1/0,o=1/0;return e.x=t,e.y=o,e},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"]},Oe={init:function(){var e=function(e,t){if(void 0===e){if((e=Math.floor(30*(x(t)+Math.PI)/Math.PI)+1)<0)return 0;if(e>60)return 60}return e}(this.zone,this.long0);if(void 0===e)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(e)-183)*o,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Te.init.apply(this),this.forward=Te.forward,this.inverse=Te.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"},Le=function(e,t){return Math.pow((1-e)/(1+e),t)},De={init:function(){var e=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*e*e),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(e/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+i)/(Math.pow(Math.tan(.5*this.lat0+i),this.C)*Le(this.e*e,this.ratexp))},forward:function(e){var o=e.x,n=e.y;return e.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*n+i),this.C)*Le(this.e*Math.sin(n),this.ratexp))-t,e.x=this.C*o,e},inverse:function(e){for(var o=e.x/this.C,n=e.y,r=Math.pow(Math.tan(.5*n+i)/this.K,1/this.C),a=20;a>0&&(n=2*Math.atan(r*Le(this.e*Math.sin(e.y),-.5*this.e))-t,!(Math.abs(n-e.y)<1e-14));--a)e.y=n;return a?(e.x=o,e.y=n,e):null},names:["gauss"]},je={init:function(){De.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(e){var t,o,n,i;return e.x=x(e.x-this.long0),De.forward.apply(this,[e]),t=Math.sin(e.y),o=Math.cos(e.y),n=Math.cos(e.x),i=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*o*n),e.x=i*o*Math.sin(e.x),e.y=i*(this.cosc0*t-this.sinc0*o*n),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e},inverse:function(e){var t,o,n,i,r;if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,r=Math.sqrt(e.x*e.x+e.y*e.y)){var a=2*Math.atan2(r,this.R2);t=Math.sin(a),o=Math.cos(a),i=Math.asin(o*this.sinc0+e.y*t*this.cosc0/r),n=Math.atan2(e.x*t,r*this.cosc0*o-e.y*this.sinc0*t)}else i=this.phic0,n=0;return e.x=n,e.y=i,De.inverse.apply(this,[e]),e.x=x(e.x+this.long0),e},names:["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]},Ne={init:function(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=1e-10&&(this.k0=.5*(1+P(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=1e-10&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=1e-10&&(this.k0=.5*this.cons*M(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/k(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=M(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-t,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(e){var o,n,i,r,a,s,l=e.x,c=e.y,u=Math.sin(c),d=Math.cos(c),p=x(l-this.long0);return Math.abs(Math.abs(l-this.long0)-Math.PI)<=1e-10&&Math.abs(c+this.lat0)<=1e-10?(e.x=NaN,e.y=NaN,e):this.sphere?(o=2*this.k0/(1+this.sinlat0*u+this.coslat0*d*Math.cos(p)),e.x=this.a*o*d*Math.sin(p)+this.x0,e.y=this.a*o*(this.coslat0*u-this.sinlat0*d*Math.cos(p))+this.y0,e):(n=2*Math.atan(this.ssfn_(c,u,this.e))-t,r=Math.cos(n),i=Math.sin(n),Math.abs(this.coslat0)<=1e-10?(a=k(this.e,c*this.con,this.con*u),s=2*this.a*this.k0*a/this.cons,e.x=this.x0+s*Math.sin(l-this.long0),e.y=this.y0-this.con*s*Math.cos(l-this.long0),e):(Math.abs(this.sinlat0)<1e-10?(o=2*this.a*this.k0/(1+r*Math.cos(p)),e.y=o*i):(o=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*i+this.cosX0*r*Math.cos(p))),e.y=o*(this.cosX0*i-this.sinX0*r*Math.cos(p))+this.y0),e.x=o*r*Math.sin(p)+this.x0,e))},inverse:function(e){var o,n,i,r,a;e.x-=this.x0,e.y-=this.y0;var s=Math.sqrt(e.x*e.x+e.y*e.y);if(this.sphere){var l=2*Math.atan(s/(2*this.a*this.k0));return o=this.long0,n=this.lat0,s<=1e-10?(e.x=o,e.y=n,e):(n=Math.asin(Math.cos(l)*this.sinlat0+e.y*Math.sin(l)*this.coslat0/s),o=Math.abs(this.coslat0)<1e-10?this.lat0>0?x(this.long0+Math.atan2(e.x,-1*e.y)):x(this.long0+Math.atan2(e.x,e.y)):x(this.long0+Math.atan2(e.x*Math.sin(l),s*this.coslat0*Math.cos(l)-e.y*this.sinlat0*Math.sin(l))),e.x=o,e.y=n,e)}if(Math.abs(this.coslat0)<=1e-10){if(s<=1e-10)return n=this.lat0,o=this.long0,e.x=o,e.y=n,e;e.x*=this.con,e.y*=this.con,i=s*this.cons/(2*this.a*this.k0),n=this.con*G(this.e,i),o=this.con*x(this.con*this.long0+Math.atan2(e.x,-1*e.y))}else r=2*Math.atan(s*this.cosX0/(2*this.a*this.k0*this.ms1)),o=this.long0,s<=1e-10?a=this.X0:(a=Math.asin(Math.cos(r)*this.sinX0+e.y*Math.sin(r)*this.cosX0/s),o=x(this.long0+Math.atan2(e.x*Math.sin(r),s*this.cosX0*Math.cos(r)-e.y*this.sinX0*Math.sin(r)))),n=-1*G(this.e,Math.tan(.5*(t+a)));return e.x=o,e.y=n,e},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],ssfn_:function(e,o,n){return o*=n,Math.tan(.5*(t+e))*Math.pow((1-o)/(1+o),.5*n)}},Ue={init:function(){var e=this.lat0;this.lambda0=this.long0;var t=Math.sin(e),o=this.a,n=1/this.rf,i=2*n-Math.pow(n,2),r=this.e=Math.sqrt(i);this.R=this.k0*o*Math.sqrt(1-i)/(1-i*Math.pow(t,2)),this.alpha=Math.sqrt(1+i/(1-i)*Math.pow(Math.cos(e),4)),this.b0=Math.asin(t/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),s=Math.log(Math.tan(Math.PI/4+e/2)),l=Math.log((1+r*t)/(1-r*t));this.K=a-this.alpha*s+this.alpha*r/2*l},forward:function(e){var t=Math.log(Math.tan(Math.PI/4-e.y/2)),o=this.e/2*Math.log((1+this.e*Math.sin(e.y))/(1-this.e*Math.sin(e.y))),n=-this.alpha*(t+o)+this.K,i=2*(Math.atan(Math.exp(n))-Math.PI/4),r=this.alpha*(e.x-this.lambda0),a=Math.atan(Math.sin(r)/(Math.sin(this.b0)*Math.tan(i)+Math.cos(this.b0)*Math.cos(r))),s=Math.asin(Math.cos(this.b0)*Math.sin(i)-Math.sin(this.b0)*Math.cos(i)*Math.cos(r));return e.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,e.x=this.R*a+this.x0,e},inverse:function(e){for(var t=e.x-this.x0,o=e.y-this.y0,n=t/this.R,i=2*(Math.atan(Math.exp(o/this.R))-Math.PI/4),r=Math.asin(Math.cos(this.b0)*Math.sin(i)+Math.sin(this.b0)*Math.cos(i)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(i))),s=this.lambda0+a/this.alpha,l=0,c=r,u=-1e3,d=0;Math.abs(c-u)>1e-7;){if(++d>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+r/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(c))/2)),u=c,c=2*Math.atan(Math.exp(l))-Math.PI/2}return e.x=s,e.y=c,e},names:["somerc"]},Be={init:function(){var e,n,a,s,l,c,u,d,p,h,g,m,f,y=0,A=0,v=0,C=0,I=0,b=0,w=0;this.no_off=(f="object"==typeof(m=this).PROJECTION?Object.keys(m.PROJECTION)[0]:m.PROJECTION,"no_uoff"in m||"no_off"in m||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(f)),this.no_rot="no_rot"in this;var _=!1;"alpha"in this&&(_=!0);var E=!1;if("rectified_grid_angle"in this&&(E=!0),_&&(w=this.alpha),E&&(y=this.rectified_grid_angle*o),_||E)A=this.longc;else if(v=this.long1,I=this.lat1,C=this.long2,b=this.lat2,Math.abs(I-b)<=1e-7||(e=Math.abs(I))<=1e-7||Math.abs(e-t)<=1e-7||Math.abs(Math.abs(this.lat0)-t)<=1e-7||Math.abs(Math.abs(b)-t)<=1e-7)throw new Error;var S=1-this.es;n=Math.sqrt(S),Math.abs(this.lat0)>1e-10?(d=Math.sin(this.lat0),a=Math.cos(this.lat0),e=1-this.es*d*d,this.B=a*a,this.B=Math.sqrt(1+this.es*this.B*this.B/S),this.A=this.B*this.k0*n/e,(l=(s=this.B*n/(a*Math.sqrt(e)))*s-1)<=0?l=0:(l=Math.sqrt(l),this.lat0<0&&(l=-l)),this.E=l+=s,this.E*=Math.pow(k(this.e,this.lat0,d),this.B)):(this.B=1/n,this.A=this.k0,this.E=s=l=1),_||E?(_?(g=Math.asin(Math.sin(w)/s),E||(y=w)):(g=y,w=Math.asin(s*Math.sin(g))),this.lam0=A-Math.asin(.5*(l-1/l)*Math.tan(g))/this.B):(c=Math.pow(k(this.e,I,Math.sin(I)),this.B),u=Math.pow(k(this.e,b,Math.sin(b)),this.B),l=this.E/c,p=(u-c)/(u+c),h=((h=this.E*this.E)-u*c)/(h+u*c),(e=v-C)<-Math.pi?C-=r:e>Math.pi&&(C+=r),this.lam0=x(.5*(v+C)-Math.atan(h*Math.tan(.5*this.B*(v-C))/p)/this.B),g=Math.atan(2*Math.sin(this.B*x(v-this.lam0))/(l-1/l)),y=w=Math.asin(s*Math.sin(g))),this.singam=Math.sin(g),this.cosgam=Math.cos(g),this.sinrot=Math.sin(y),this.cosrot=Math.cos(y),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(s*s-1)/Math.cos(w))),this.lat0<0&&(this.u_0=-this.u_0)),l=.5*g,this.v_pole_n=this.ArB*Math.log(Math.tan(i-l)),this.v_pole_s=this.ArB*Math.log(Math.tan(i+l))},forward:function(e){var o,n,i,r,a,s,l,c,u={};if(e.x=e.x-this.lam0,Math.abs(Math.abs(e.y)-t)>1e-10){if(o=.5*((a=this.E/Math.pow(k(this.e,e.y,Math.sin(e.y)),this.B))-(s=1/a)),n=.5*(a+s),r=Math.sin(this.B*e.x),i=(o*this.singam-r*this.cosgam)/n,Math.abs(Math.abs(i)-1)<1e-10)throw new Error;c=.5*this.ArB*Math.log((1-i)/(1+i)),s=Math.cos(this.B*e.x),l=Math.abs(s)<1e-7?this.A*e.x:this.ArB*Math.atan2(o*this.cosgam+r*this.singam,s)}else c=e.y>0?this.v_pole_n:this.v_pole_s,l=this.ArB*e.y;return this.no_rot?(u.x=l,u.y=c):(l-=this.u_0,u.x=c*this.cosrot+l*this.sinrot,u.y=l*this.cosrot-c*this.sinrot),u.x=this.a*u.x+this.x0,u.y=this.a*u.y+this.y0,u},inverse:function(e){var o,n,i,r,a,s,l,c={};if(e.x=(e.x-this.x0)*(1/this.a),e.y=(e.y-this.y0)*(1/this.a),this.no_rot?(n=e.y,o=e.x):(n=e.x*this.cosrot-e.y*this.sinrot,o=e.y*this.cosrot+e.x*this.sinrot+this.u_0),r=.5*((i=Math.exp(-this.BrA*n))-1/i),a=.5*(i+1/i),l=((s=Math.sin(this.BrA*o))*this.cosgam+r*this.singam)/a,Math.abs(Math.abs(l)-1)<1e-10)c.x=0,c.y=l<0?-t:t;else{if(c.y=this.E/Math.sqrt((1+l)/(1-l)),c.y=G(this.e,Math.pow(c.y,1/this.B)),c.y===1/0)throw new Error;c.x=-this.rB*Math.atan2(r*this.cosgam-s*this.singam,Math.cos(this.BrA*o))}return c.x+=this.lam0,c},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"]},Fe={init:function(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<1e-10)){var e=this.b/this.a;this.e=Math.sqrt(1-e*e);var t=Math.sin(this.lat1),o=Math.cos(this.lat1),n=M(this.e,t,o),i=k(this.e,this.lat1,t),r=Math.sin(this.lat2),a=Math.cos(this.lat2),s=M(this.e,r,a),l=k(this.e,this.lat2,r),c=k(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>1e-10?this.ns=Math.log(n/s)/Math.log(i/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(i,this.ns)),this.rh=this.a*this.f0*Math.pow(c,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(e){var o=e.x,n=e.y;Math.abs(2*Math.abs(n)-Math.PI)<=1e-10&&(n=P(n)*(t-2e-10));var i,r,a=Math.abs(Math.abs(n)-t);if(a>1e-10)i=k(this.e,n,Math.sin(n)),r=this.a*this.f0*Math.pow(i,this.ns);else{if((a=n*this.ns)<=0)return null;r=0}var s=this.ns*x(o-this.long0);return e.x=this.k0*(r*Math.sin(s))+this.x0,e.y=this.k0*(this.rh-r*Math.cos(s))+this.y0,e},inverse:function(e){var o,n,i,r,a,s=(e.x-this.x0)/this.k0,l=this.rh-(e.y-this.y0)/this.k0;this.ns>0?(o=Math.sqrt(s*s+l*l),n=1):(o=-Math.sqrt(s*s+l*l),n=-1);var c=0;if(0!==o&&(c=Math.atan2(n*s,n*l)),0!==o||this.ns>0){if(n=1/this.ns,i=Math.pow(o/(this.a*this.f0),n),-9999===(r=G(this.e,i)))return null}else r=-t;return a=x(c/this.ns+this.long0),e.x=a,e.y=r,e},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc"]},ze={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(e){var t,o,n,i,r,a,s,l=e.x,c=e.y,u=x(l-this.long0);return t=Math.pow((1+this.e*Math.sin(c))/(1-this.e*Math.sin(c)),this.alfa*this.e/2),o=2*(Math.atan(this.k*Math.pow(Math.tan(c/2+this.s45),this.alfa)/t)-this.s45),n=-u*this.alfa,i=Math.asin(Math.cos(this.ad)*Math.sin(o)+Math.sin(this.ad)*Math.cos(o)*Math.cos(n)),r=Math.asin(Math.cos(o)*Math.sin(n)/Math.cos(i)),a=this.n*r,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(i/2+this.s45),this.n),e.y=s*Math.cos(a)/1,e.x=s*Math.sin(a)/1,this.czech||(e.y*=-1,e.x*=-1),e},inverse:function(e){var t,o,n,i,r,a,s,l=e.x;e.x=e.y,e.y=l,this.czech||(e.y*=-1,e.x*=-1),r=Math.sqrt(e.x*e.x+e.y*e.y),i=Math.atan2(e.y,e.x)/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/r,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(i)),o=Math.asin(Math.cos(n)*Math.sin(i)/Math.cos(t)),e.x=this.long0-o/this.alfa,a=t,s=0;var c=0;do{e.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-e.y)<1e-10&&(s=1),a=e.y,c+=1}while(0===s&&c<15);return c>=15?null:e},names:["Krovak","krovak"]},Ve=function(e,t,o,n,i){return e*i-t*Math.sin(2*i)+o*Math.sin(4*i)-n*Math.sin(6*i)},We=function(e){return 1-.25*e*(1+e/16*(3+1.25*e))},qe=function(e){return.375*e*(1+.25*e*(1+.46875*e))},He=function(e){return.05859375*e*e*(1+.75*e)},Ye=function(e){return e*e*e*(35/3072)},Je=function(e,t,o){var n=t*o;return e/Math.sqrt(1-n*n)},Ze=function(e){return Math.abs(e)1e-7?(1-e*e)*(t/(1-(o=e*t)*o)-.5/e*Math.log((1-o)/(1+o))):2*t},$e={init:function(){var e,o=Math.abs(this.lat0);if(Math.abs(o-t)<1e-10?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(o)<1e-10?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0)switch(this.qp=Qe(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(e){var t,o=[];return o[0]=.3333333333333333*e,t=e*e,o[0]+=.17222222222222222*t,o[1]=.06388888888888888*t,t*=e,o[0]+=.10257936507936508*t,o[1]+=.0664021164021164*t,o[2]=.016415012942191543*t,o}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),e=Math.sin(this.lat0),this.sinb1=Qe(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(e){var o,n,r,a,s,l,c,u,d,p,h=e.x,g=e.y;if(h=x(h-this.long0),this.sphere){if(s=Math.sin(g),p=Math.cos(g),r=Math.cos(h),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((n=this.mode===this.EQUIT?1+p*r:1+this.sinph0*s+this.cosph0*p*r)<=1e-10)return null;o=(n=Math.sqrt(2/n))*p*Math.sin(h),n*=this.mode===this.EQUIT?s:this.cosph0*s-this.sinph0*p*r}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(r=-r),Math.abs(g+this.lat0)<1e-10)return null;n=i-.5*g,o=(n=2*(this.mode===this.S_POLE?Math.cos(n):Math.sin(n)))*Math.sin(h),n*=r}}else{switch(c=0,u=0,d=0,r=Math.cos(h),a=Math.sin(h),s=Math.sin(g),l=Qe(this.e,s),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(c=l/this.qp,u=Math.sqrt(1-c*c)),this.mode){case this.OBLIQ:d=1+this.sinb1*c+this.cosb1*u*r;break;case this.EQUIT:d=1+u*r;break;case this.N_POLE:d=t+g,l=this.qp-l;break;case this.S_POLE:d=g-t,l=this.qp+l}if(Math.abs(d)<1e-10)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:d=Math.sqrt(2/d),n=this.mode===this.OBLIQ?this.ymf*d*(this.cosb1*c-this.sinb1*u*r):(d=Math.sqrt(2/(1+u*r)))*c*this.ymf,o=this.xmf*d*u*a;break;case this.N_POLE:case this.S_POLE:l>=0?(o=(d=Math.sqrt(l))*a,n=r*(this.mode===this.S_POLE?d:-d)):o=n=0}}return e.x=this.a*o+this.x0,e.y=this.a*n+this.y0,e},inverse:function(e){e.x-=this.x0,e.y-=this.y0;var o,n,i,r,a,s,l,c,u,d,p=e.x/this.a,h=e.y/this.a;if(this.sphere){var g,m=0,f=0;if((n=.5*(g=Math.sqrt(p*p+h*h)))>1)return null;switch(n=2*Math.asin(n),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(f=Math.sin(n),m=Math.cos(n)),this.mode){case this.EQUIT:n=Math.abs(g)<=1e-10?0:Math.asin(h*f/g),p*=f,h=m*g;break;case this.OBLIQ:n=Math.abs(g)<=1e-10?this.lat0:Math.asin(m*this.sinph0+h*f*this.cosph0/g),p*=f*this.cosph0,h=(m-Math.sin(n)*this.sinph0)*g;break;case this.N_POLE:h=-h,n=t-n;break;case this.S_POLE:n-=t}o=0!==h||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(p,h):0}else{if(l=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(p/=this.dd,h*=this.dd,(s=Math.sqrt(p*p+h*h))<1e-10)return e.x=this.long0,e.y=this.lat0,e;r=2*Math.asin(.5*s/this.rq),i=Math.cos(r),p*=r=Math.sin(r),this.mode===this.OBLIQ?(l=i*this.sinb1+h*r*this.cosb1/s,a=this.qp*l,h=s*this.cosb1*i-h*this.sinb1*r):(l=h*r/s,a=this.qp*l,h=s*i)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(h=-h),!(a=p*p+h*h))return e.x=this.long0,e.y=this.lat0,e;l=1-a/this.qp,this.mode===this.S_POLE&&(l=-l)}o=Math.atan2(p,h),c=Math.asin(l),u=this.apa,d=c+c,n=c+u[0]*Math.sin(d)+u[1]*Math.sin(d+d)+u[2]*Math.sin(d+d+d)}return e.x=x(this.long0+o),e.y=n,e},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4},et=function(e){return Math.abs(e)>1&&(e=e>1?1:-1),Math.asin(e)},tt={init:function(){Math.abs(this.lat1+this.lat2)<1e-10||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=M(this.e3,this.sin_po,this.cos_po),this.qs1=Qe(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=M(this.e3,this.sin_po,this.cos_po),this.qs2=Qe(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Qe(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>1e-10?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(e){var t=e.x,o=e.y;this.sin_phi=Math.sin(o),this.cos_phi=Math.cos(o);var n=Qe(this.e3,this.sin_phi,this.cos_phi),i=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,r=this.ns0*x(t-this.long0),a=i*Math.sin(r)+this.x0,s=this.rh-i*Math.cos(r)+this.y0;return e.x=a,e.y=s,e},inverse:function(e){var t,o,n,i,r,a;return e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns0>=0?(t=Math.sqrt(e.x*e.x+e.y*e.y),n=1):(t=-Math.sqrt(e.x*e.x+e.y*e.y),n=-1),i=0,0!==t&&(i=Math.atan2(n*e.x,n*e.y)),n=t*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(o=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,o)),r=x(i/this.ns0+this.long0),e.x=r,e.y=a,e},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(e,t){var o,n,i,r,a=et(.5*t);if(e<1e-10)return a;for(var s=e*e,l=1;l<=25;l++)if(a+=r=.5*(i=1-(n=e*(o=Math.sin(a)))*n)*i/Math.cos(a)*(t/(1-s)-o/i+.5/e*Math.log((1-n)/(1+n))),Math.abs(r)<=1e-7)return a;return null}},ot={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function(e){var t,o,n,i,r,a,s,l=e.x,c=e.y;return n=x(l-this.long0),t=Math.sin(c),o=Math.cos(c),i=Math.cos(n),(r=this.sin_p14*t+this.cos_p14*o*i)>0||Math.abs(r)<=1e-10?(a=this.x0+1*this.a*o*Math.sin(n)/r,s=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*o*i)/r):(a=this.x0+this.infinity_dist*o*Math.sin(n),s=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*o*i)),e.x=a,e.y=s,e},inverse:function(e){var t,o,n,i,r,a;return e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,(t=Math.sqrt(e.x*e.x+e.y*e.y))?(i=Math.atan2(t,this.rc),o=Math.sin(i),n=Math.cos(i),a=et(n*this.sin_p14+e.y*o*this.cos_p14/t),r=Math.atan2(e.x*o,t*this.cos_p14*n-e.y*this.sin_p14*o),r=x(this.long0+r)):(a=this.phic0,r=0),e.x=r,e.y=a,e},names:["gnom"]},nt={init:function(){this.sphere||(this.k0=M(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(e){var t,o,n=e.x,i=e.y,r=x(n-this.long0);if(this.sphere)t=this.x0+this.a*r*Math.cos(this.lat_ts),o=this.y0+this.a*Math.sin(i)/Math.cos(this.lat_ts);else{var a=Qe(this.e,Math.sin(i));t=this.x0+this.a*this.k0*r,o=this.y0+this.a*a*.5/this.k0}return e.x=t,e.y=o,e},inverse:function(e){var o,n;return e.x-=this.x0,e.y-=this.y0,this.sphere?(o=x(this.long0+e.x/this.a/Math.cos(this.lat_ts)),n=Math.asin(e.y/this.a*Math.cos(this.lat_ts))):(n=function(e,o){var n=1-(1-e*e)/(2*e)*Math.log((1-e)/(1+e));if(Math.abs(Math.abs(o)-n)<1e-6)return o<0?-1*t:t;for(var i,r,a,s,l=Math.asin(.5*o),c=0;c<30;c++)if(r=Math.sin(l),a=Math.cos(l),s=e*r,l+=i=Math.pow(1-s*s,2)/(2*a)*(o/(1-e*e)-r/(1-s*s)+.5/e*Math.log((1-s)/(1+s))),Math.abs(i)<=1e-10)return l;return NaN}(this.e,2*e.y*this.k0/this.a),o=x(this.long0+e.x/(this.a*this.k0))),e.x=o,e.y=n,e},names:["cea"]},it={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(e){var t=e.x,o=e.y,n=x(t-this.long0),i=Ze(o-this.lat0);return e.x=this.x0+this.a*n*this.rc,e.y=this.y0+this.a*i,e},inverse:function(e){var t=e.x,o=e.y;return e.x=x(this.long0+(t-this.x0)/(this.a*this.rc)),e.y=Ze(this.lat0+(o-this.y0)/this.a),e},names:["Equirectangular","Equidistant_Cylindrical","eqc"]},rt={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=We(this.es),this.e1=qe(this.es),this.e2=He(this.es),this.e3=Ye(this.es),this.ml0=this.a*Ve(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(e){var t,o,n,i=e.x,r=e.y,a=x(i-this.long0);if(n=a*Math.sin(r),this.sphere)Math.abs(r)<=1e-10?(t=this.a*a,o=-1*this.a*this.lat0):(t=this.a*Math.sin(n)/Math.tan(r),o=this.a*(Ze(r-this.lat0)+(1-Math.cos(n))/Math.tan(r)));else if(Math.abs(r)<=1e-10)t=this.a*a,o=-1*this.ml0;else{var s=Je(this.a,this.e,Math.sin(r))/Math.tan(r);t=s*Math.sin(n),o=this.a*Ve(this.e0,this.e1,this.e2,this.e3,r)-this.ml0+s*(1-Math.cos(n))}return e.x=t+this.x0,e.y=o+this.y0,e},inverse:function(e){var t,o,n,i,r,a,s,l,c;if(n=e.x-this.x0,i=e.y-this.y0,this.sphere)if(Math.abs(i+this.a*this.lat0)<=1e-10)t=x(n/this.a+this.long0),o=0;else{var u;for(a=this.lat0+i/this.a,s=n*n/this.a/this.a+a*a,l=a,r=20;r;--r)if(l+=c=-1*(a*(l*(u=Math.tan(l))+1)-l-.5*(l*l+s)*u)/((l-a)/u-1),Math.abs(c)<=1e-10){o=l;break}t=x(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(o))}else if(Math.abs(i+this.ml0)<=1e-10)o=0,t=x(this.long0+n/this.a);else{var d,p,h,g,m;for(a=(this.ml0+i)/this.a,s=n*n/this.a/this.a+a*a,l=a,r=20;r;--r)if(m=this.e*Math.sin(l),d=Math.sqrt(1-m*m)*Math.tan(l),p=this.a*Ve(this.e0,this.e1,this.e2,this.e3,l),h=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),l-=c=(a*(d*(g=p/this.a)+1)-g-.5*d*(g*g+s))/(this.es*Math.sin(2*l)*(g*g+s-2*a*g)/(4*d)+(a-g)*(d*h-2/Math.sin(2*l))-h),Math.abs(c)<=1e-10){o=l;break}d=Math.sqrt(1-this.es*Math.pow(Math.sin(o),2))*Math.tan(o),t=x(this.long0+Math.asin(n*d/this.a)/Math.sin(o))}return e.x=t,e.y=o,e},names:["Polyconic","poly"]},at={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var o,n=t.x,i=t.y-this.lat0,r=n-this.long0,a=i/e*1e-5,s=r,l=1,c=0;for(o=1;o<=10;o++)l*=a,c+=this.A[o]*l;var u,d=c,p=s,h=1,g=0,m=0,f=0;for(o=1;o<=6;o++)u=g*d+h*p,h=h*d-g*p,g=u,m=m+this.B_re[o]*h-this.B_im[o]*g,f=f+this.B_im[o]*h+this.B_re[o]*g;return t.x=f*this.a+this.x0,t.y=m*this.a+this.y0,t},inverse:function(t){var o,n,i=t.x,r=t.y,a=i-this.x0,s=(r-this.y0)/this.a,l=a/this.a,c=1,u=0,d=0,p=0;for(o=1;o<=6;o++)n=u*s+c*l,c=c*s-u*l,u=n,d=d+this.C_re[o]*c-this.C_im[o]*u,p=p+this.C_im[o]*c+this.C_re[o]*u;for(var h=0;h.999999999999&&(o=.999999999999),t=Math.asin(o);var n=x(this.long0+e.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),o=(2*t+Math.sin(2*t))/Math.PI,Math.abs(o)>1&&(o=1);var i=Math.asin(o);return e.x=n,e.y=i,e},names:["Mollweide","moll"]},ut={init:function(){Math.abs(this.lat1+this.lat2)<1e-10||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=We(this.es),this.e1=qe(this.es),this.e2=He(this.es),this.e3=Ye(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=M(this.e,this.sinphi,this.cosphi),this.ml1=Ve(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<1e-10?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=M(this.e,this.sinphi,this.cosphi),this.ml2=Ve(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Ve(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function(e){var t,o=e.x,n=e.y;if(this.sphere)t=this.a*(this.g-n);else{var i=Ve(this.e0,this.e1,this.e2,this.e3,n);t=this.a*(this.g-i)}var r=this.ns*x(o-this.long0),a=this.x0+t*Math.sin(r),s=this.y0+this.rh-t*Math.cos(r);return e.x=a,e.y=s,e},inverse:function(e){var t,o,n,i;e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns>=0?(o=Math.sqrt(e.x*e.x+e.y*e.y),t=1):(o=-Math.sqrt(e.x*e.x+e.y*e.y),t=-1);var r=0;if(0!==o&&(r=Math.atan2(t*e.x,t*e.y)),this.sphere)return i=x(this.long0+r/this.ns),n=Ze(this.g-o/this.a),e.x=i,e.y=n,e;var a=this.g-o/this.a;return n=Ke(a,this.e0,this.e1,this.e2,this.e3),i=x(this.long0+r/this.ns),e.x=i,e.y=n,e},names:["Equidistant_Conic","eqdc"]},dt={init:function(){this.R=this.a},forward:function(e){var o,n,i=e.x,r=e.y,a=x(i-this.long0);Math.abs(r)<=1e-10&&(o=this.x0+this.R*a,n=this.y0);var s=et(2*Math.abs(r/Math.PI));(Math.abs(a)<=1e-10||Math.abs(Math.abs(r)-t)<=1e-10)&&(o=this.x0,n=r>=0?this.y0+Math.PI*this.R*Math.tan(.5*s):this.y0+Math.PI*this.R*-Math.tan(.5*s));var l=.5*Math.abs(Math.PI/a-a/Math.PI),c=l*l,u=Math.sin(s),d=Math.cos(s),p=d/(u+d-1),h=p*p,g=p*(2/u-1),m=g*g,f=Math.PI*this.R*(l*(p-m)+Math.sqrt(c*(p-m)*(p-m)-(m+c)*(h-m)))/(m+c);a<0&&(f=-f),o=this.x0+f;var y=c+p;return f=Math.PI*this.R*(g*y-l*Math.sqrt((m+c)*(c+1)-y*y))/(m+c),n=r>=0?this.y0+f:this.y0-f,e.x=o,e.y=n,e},inverse:function(e){var t,o,n,i,r,a,s,l,c,u,d,p;return e.x-=this.x0,e.y-=this.y0,d=Math.PI*this.R,r=(n=e.x/d)*n+(i=e.y/d)*i,d=3*(i*i/(l=-2*(a=-Math.abs(i)*(1+r))+1+2*i*i+r*r)+(2*(s=a-2*i*i+n*n)*s*s/l/l/l-9*a*s/l/l)/27)/(c=(a-s*s/3/l)/l)/(u=2*Math.sqrt(-c/3)),Math.abs(d)>1&&(d=d>=0?1:-1),p=Math.acos(d)/3,o=e.y>=0?(-u*Math.cos(p+Math.PI/3)-s/3/l)*Math.PI:-(-u*Math.cos(p+Math.PI/3)-s/3/l)*Math.PI,t=Math.abs(n)<1e-10?this.long0:x(this.long0+Math.PI*(r-1+Math.sqrt(1+2*(n*n-i*i)+r*r))/2/n),e.x=t,e.y=o,e},names:["Van_der_Grinten_I","VanDerGrinten","vandg"]},pt={init:function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)},forward:function(e){var o,n,i,r,a,s,l,c,u,d,p,h,g,m,f,y,A,v,C,I,b,w,_=e.x,E=e.y,S=Math.sin(e.y),M=Math.cos(e.y),P=x(_-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=1e-10?(e.x=this.x0+this.a*(t-E)*Math.sin(P),e.y=this.y0-this.a*(t-E)*Math.cos(P),e):Math.abs(this.sin_p12+1)<=1e-10?(e.x=this.x0+this.a*(t+E)*Math.sin(P),e.y=this.y0+this.a*(t+E)*Math.cos(P),e):(v=this.sin_p12*S+this.cos_p12*M*Math.cos(P),A=(y=Math.acos(v))?y/Math.sin(y):1,e.x=this.x0+this.a*A*M*Math.sin(P),e.y=this.y0+this.a*A*(this.cos_p12*S-this.sin_p12*M*Math.cos(P)),e):(o=We(this.es),n=qe(this.es),i=He(this.es),r=Ye(this.es),Math.abs(this.sin_p12-1)<=1e-10?(a=this.a*Ve(o,n,i,r,t),s=this.a*Ve(o,n,i,r,E),e.x=this.x0+(a-s)*Math.sin(P),e.y=this.y0-(a-s)*Math.cos(P),e):Math.abs(this.sin_p12+1)<=1e-10?(a=this.a*Ve(o,n,i,r,t),s=this.a*Ve(o,n,i,r,E),e.x=this.x0+(a+s)*Math.sin(P),e.y=this.y0+(a+s)*Math.cos(P),e):(l=S/M,c=Je(this.a,this.e,this.sin_p12),u=Je(this.a,this.e,S),d=Math.atan((1-this.es)*l+this.es*c*this.sin_p12/(u*M)),C=0===(p=Math.atan2(Math.sin(P),this.cos_p12*Math.tan(d)-this.sin_p12*Math.cos(P)))?Math.asin(this.cos_p12*Math.sin(d)-this.sin_p12*Math.cos(d)):Math.abs(Math.abs(p)-Math.PI)<=1e-10?-Math.asin(this.cos_p12*Math.sin(d)-this.sin_p12*Math.cos(d)):Math.asin(Math.sin(P)*Math.cos(d)/Math.sin(p)),h=this.e*this.sin_p12/Math.sqrt(1-this.es),y=c*C*(1-(I=C*C)*(f=(g=this.e*this.cos_p12*Math.cos(p)/Math.sqrt(1-this.es))*g)*(1-f)/6+(b=I*C)/8*(m=h*g)*(1-2*f)+(w=b*C)/120*(f*(4-7*f)-3*h*h*(1-7*f))-w*C/48*m),e.x=this.x0+y*Math.sin(p),e.y=this.y0+y*Math.cos(p),e))},inverse:function(e){var o,n,i,r,a,s,l,c,u,d,p,h,g,m,f,y,A,v,C,I,b,w,_;if(e.x-=this.x0,e.y-=this.y0,this.sphere){if((o=Math.sqrt(e.x*e.x+e.y*e.y))>2*t*this.a)return;return n=o/this.a,i=Math.sin(n),r=Math.cos(n),a=this.long0,Math.abs(o)<=1e-10?s=this.lat0:(s=et(r*this.sin_p12+e.y*i*this.cos_p12/o),l=Math.abs(this.lat0)-t,a=Math.abs(l)<=1e-10?this.lat0>=0?x(this.long0+Math.atan2(e.x,-e.y)):x(this.long0-Math.atan2(-e.x,e.y)):x(this.long0+Math.atan2(e.x*i,o*this.cos_p12*r-e.y*this.sin_p12*i))),e.x=a,e.y=s,e}return c=We(this.es),u=qe(this.es),d=He(this.es),p=Ye(this.es),Math.abs(this.sin_p12-1)<=1e-10?(h=this.a*Ve(c,u,d,p,t),o=Math.sqrt(e.x*e.x+e.y*e.y),s=Ke((h-o)/this.a,c,u,d,p),a=x(this.long0+Math.atan2(e.x,-1*e.y)),e.x=a,e.y=s,e):Math.abs(this.sin_p12+1)<=1e-10?(h=this.a*Ve(c,u,d,p,t),o=Math.sqrt(e.x*e.x+e.y*e.y),s=Ke((o-h)/this.a,c,u,d,p),a=x(this.long0+Math.atan2(e.x,e.y)),e.x=a,e.y=s,e):(o=Math.sqrt(e.x*e.x+e.y*e.y),f=Math.atan2(e.x,e.y),g=Je(this.a,this.e,this.sin_p12),y=Math.cos(f),v=-(A=this.e*this.cos_p12*y)*A/(1-this.es),C=3*this.es*(1-v)*this.sin_p12*this.cos_p12*y/(1-this.es),w=1-v*(b=(I=o/g)-v*(1+v)*Math.pow(I,3)/6-C*(1+3*v)*Math.pow(I,4)/24)*b/2-I*b*b*b/6,m=Math.asin(this.sin_p12*Math.cos(b)+this.cos_p12*Math.sin(b)*y),a=x(this.long0+Math.asin(Math.sin(f)*Math.sin(b)/Math.cos(m))),_=Math.sin(m),s=Math.atan2((_-this.es*w*this.sin_p12)*Math.tan(m),_*(1-this.es)),e.x=a,e.y=s,e)},names:["Azimuthal_Equidistant","aeqd"]},ht={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(e){var t,o,n,i,r,a,s,l=e.x,c=e.y;return n=x(l-this.long0),t=Math.sin(c),o=Math.cos(c),i=Math.cos(n),((r=this.sin_p14*t+this.cos_p14*o*i)>0||Math.abs(r)<=1e-10)&&(a=1*this.a*o*Math.sin(n),s=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*o*i)),e.x=a,e.y=s,e},inverse:function(e){var o,n,i,r,a,s,l;return e.x-=this.x0,e.y-=this.y0,o=Math.sqrt(e.x*e.x+e.y*e.y),n=et(o/this.a),i=Math.sin(n),r=Math.cos(n),s=this.long0,Math.abs(o)<=1e-10?(l=this.lat0,e.x=s,e.y=l,e):(l=et(r*this.sin_p14+e.y*i*this.cos_p14/o),a=Math.abs(this.lat0)-t,Math.abs(a)<=1e-10?(s=this.lat0>=0?x(this.long0+Math.atan2(e.x,-e.y)):x(this.long0-Math.atan2(-e.x,e.y)),e.x=s,e.y=l,e):(s=x(this.long0+Math.atan2(e.x*i,o*this.cos_p14*r-e.y*this.sin_p14*i)),e.x=s,e.y=l,e))},names:["ortho"]},gt=1,mt=2,ft=3,yt=4,At=5,vt=6,Ct=1,It=2,bt=3,wt=4;function _t(e,o,n,r){var s;return e<1e-10?(r.value=Ct,s=0):(s=Math.atan2(o,n),Math.abs(s)<=i?r.value=Ct:s>i&&s<=t+i?(r.value=It,s-=t):s>t+i||s<=-(t+i)?(r.value=bt,s=s>=0?s-a:s+a):(r.value=wt,s+=t)),s}function Et(e,t){var o=e+t;return o<-a?o+=r:o>+a&&(o-=r),o}var St,Mt={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=t-i/2?this.face=At:this.lat0<=-(t-i/2)?this.face=vt:Math.abs(this.long0)<=i?this.face=gt:Math.abs(this.long0)<=t+i?this.face=this.long0>0?mt:yt:this.face=ft,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(e){var o,n,r,s,l,c,u={x:0,y:0},d={value:0};if(e.x-=this.long0,o=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(e.y)):e.y,n=e.x,this.face===At)s=t-o,n>=i&&n<=t+i?(d.value=Ct,r=n-t):n>t+i||n<=-(t+i)?(d.value=It,r=n>0?n-a:n+a):n>-(t+i)&&n<=-i?(d.value=bt,r=n+t):(d.value=wt,r=n);else if(this.face===vt)s=t+o,n>=i&&n<=t+i?(d.value=Ct,r=-n+t):n=-i?(d.value=It,r=-n):n<-i&&n>=-(t+i)?(d.value=bt,r=-n-t):(d.value=wt,r=n>0?-n+a:-n-a);else{var p,h,g,m,f,y;this.face===mt?n=Et(n,+t):this.face===ft?n=Et(n,+a):this.face===yt&&(n=Et(n,-t)),m=Math.sin(o),f=Math.cos(o),y=Math.sin(n),p=f*Math.cos(n),h=f*y,g=m,this.face===gt?r=_t(s=Math.acos(p),g,h,d):this.face===mt?r=_t(s=Math.acos(h),g,-p,d):this.face===ft?r=_t(s=Math.acos(-p),g,-h,d):this.face===yt?r=_t(s=Math.acos(-h),g,p,d):(s=r=0,d.value=Ct)}return c=Math.atan(12/a*(r+Math.acos(Math.sin(r)*Math.cos(i))-t)),l=Math.sqrt((1-Math.cos(s))/(Math.cos(c)*Math.cos(c))/(1-Math.cos(Math.atan(1/Math.cos(r))))),d.value===It?c+=t:d.value===bt?c+=a:d.value===wt&&(c+=1.5*a),u.x=l*Math.cos(c),u.y=l*Math.sin(c),u.x=u.x*this.a+this.x0,u.y=u.y*this.a+this.y0,e.x=u.x,e.y=u.y,e},inverse:function(e){var o,n,i,r,s,l,c,u,d,p,h,g,m={lam:0,phi:0},f={value:0};if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,n=Math.atan(Math.sqrt(e.x*e.x+e.y*e.y)),o=Math.atan2(e.y,e.x),e.x>=0&&e.x>=Math.abs(e.y)?f.value=Ct:e.y>=0&&e.y>=Math.abs(e.x)?(f.value=It,o-=t):e.x<0&&-e.x>=Math.abs(e.y)?(f.value=bt,o=o<0?o+a:o-a):(f.value=wt,o+=t),d=a/12*Math.tan(o),s=Math.sin(d)/(Math.cos(d)-1/Math.sqrt(2)),l=Math.atan(s),(c=1-(i=Math.cos(o))*i*(r=Math.tan(n))*r*(1-Math.cos(Math.atan(1/Math.cos(l)))))<-1?c=-1:c>1&&(c=1),this.face===At)u=Math.acos(c),m.phi=t-u,f.value===Ct?m.lam=l+t:f.value===It?m.lam=l<0?l+a:l-a:f.value===bt?m.lam=l-t:m.lam=l;else if(this.face===vt)u=Math.acos(c),m.phi=u-t,f.value===Ct?m.lam=-l+t:f.value===It?m.lam=-l:f.value===bt?m.lam=-l-t:m.lam=l<0?-l-a:-l+a;else{var y,A,v;d=(y=c)*y,A=(d+=(v=d>=1?0:Math.sqrt(1-d)*Math.sin(l))*v)>=1?0:Math.sqrt(1-d),f.value===It?(d=A,A=-v,v=d):f.value===bt?(A=-A,v=-v):f.value===wt&&(d=A,A=v,v=-d),this.face===mt?(d=y,y=-A,A=d):this.face===ft?(y=-y,A=-A):this.face===yt&&(d=y,y=A,A=-d),m.phi=Math.acos(-v)-t,m.lam=Math.atan2(A,y),this.face===mt?m.lam=Et(m.lam,-t):this.face===ft?m.lam=Et(m.lam,-a):this.face===yt&&(m.lam=Et(m.lam,+t))}return 0!==this.es&&(p=m.phi<0?1:0,h=Math.tan(m.phi),g=this.b/Math.sqrt(h*h+this.one_minus_f_squared),m.phi=Math.atan(Math.sqrt(this.a*this.a-g*g)/(this.one_minus_f*g)),p&&(m.phi=-m.phi)),m.lam+=this.long0,e.x=m.lam,e.y=m.phi,e},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},Pt=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],xt=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],kt=n/5,Gt=function(e,t){return e[0]+t*(e[1]+t*(e[2]+t*e[3]))},Rt={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(e){var t=x(e.x-this.long0),o=Math.abs(e.y),i=Math.floor(o*kt);i<0?i=0:i>=18&&(i=17);var r={x:Gt(Pt[i],o=n*(o-.08726646259971647*i))*t,y:Gt(xt[i],o)};return e.y<0&&(r.y=-r.y),r.x=r.x*this.a*.8487+this.x0,r.y=r.y*this.a*1.3523+this.y0,r},inverse:function(e){var n={x:(e.x-this.x0)/(.8487*this.a),y:Math.abs(e.y-this.y0)/(1.3523*this.a)};if(n.y>=1)n.x/=Pt[18][0],n.y=e.y<0?-t:t;else{var i=Math.floor(18*n.y);for(i<0?i=0:i>=18&&(i=17);;)if(xt[i][0]>n.y)--i;else{if(!(xt[i+1][0]<=n.y))break;++i}var r=xt[i],a=5*(n.y-r[0])/(xt[i+1][0]-r[0]);a=function(e,t,o,n){for(var i=t;n;--n){var r=e(i);if(i-=r,Math.abs(r)1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var r=function(e,t,o){for(var n=[],i=0;i3?n.splice(3,n.length-1):[],void 0!==this.listeners[e]?this.listeners[e].push({scope:o,callback:t,args:n}):this.listeners[e]=[{scope:o,callback:t,args:n}]},removeEventListener:function(e,t,o){if(void 0!==this.listeners[e]){for(var n=this.listeners[e].length,i=[],r=0;r0;for(var i=0;i2?n.splice(2,n.length-1):[],n=[o].concat(n),void 0!==this.listeners[e]){var a=this.listeners[e].slice(),s=a.length;for(r=0;r0?r.replace("%var%",i.join(" - ")):r.replace("%var%","%var% (not specified)")}catch(e){}return r}},I={normalyzeParameters:function(e){var t=null;if(e){var o=[];for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];i||(i=""),o.push(n+"="+i)}t=o.join("&")}return t},normalyzeUrl:function(e,t,o){var n=e;if(e){var i=e.indexOf("?");-1===i&&(n+="?"),-1!==i&&i!==e.length-1&&(n+="&")}return t&&(n+="string"==typeof t?t:this.normalyzeParameters(t)),o&&(n=encodeURIComponent(n)),n},indent:function(e,t){return new Array((e||0)+1).join("\t")+t}},b=o(62),w=o.n(b),_={call:function(e){var t=v.getLogger("XHR");if(t.trace("[XHR::call()]"),w.a.polyfill(),!e.url)throw new Error("missing parameter : url is not defined !");if(!e.method)throw new Error("missing parameter : method is not defined !");e.format||(e.format="text");var o={};switch(o.url=e.url,o.data=e.data?e.data:null,o.method=e.method,o.timeOut=e.timeOut||0,o.scope=e.scope||this,o.proxy=e.proxy||null,o.content=e.content||null,o.headers=e.headers||{referer:"http://localhost"},e.method){case"DELETE":case"GET":break;case"PUT":case"POST":o.content=e.content?e.content:"application/x-www-form-urlencoded",o.headers=e.headers?e.headers:{referer:"http://localhost"};break;case"HEAD":case"OPTIONS":throw new Error("HTTP method not yet supported !");default:throw new Error("HTTP method unknown !")}switch(e.format){case"text":this.__call(o).then((function(o){t.trace(o),e.onResponse.call(this,o)})).catch((function(t){e.onFailure.call(this,t)}));break;case"json":this.__callJSON(o).then((function(o){t.trace(o),e.onResponse.call(this,o)})).catch((function(t){e.onFailure.call(this,t)}));break;case"xml":this.__callXML(o).then((function(o){t.trace(o),e.onResponse.call(this,o)})).catch((function(t){e.onFailure.call(this,t)}));break;default:throw new Error("This output Format is not yet supported !")}},__call:function(e){var t=v.getLogger("XHR");return t.trace("[XHR::__call()]"),new Promise((function(n,i){var r="POST"===e.method||"PUT"===e.method?1:0;e.data&&("object"==typeof e.data&&Object.keys(e.data).length||"string"==typeof e.data&&e.data.length)&&!r&&("Geocode"===e.scope.CLASSNAME||"ReverseGeocode"===e.scope.CLASSNAME?e.url=e.url+e.data:e.url=I.normalyzeUrl(e.url,e.data)),t.trace("URL = ",e.url);var a=null;if("undefined"==typeof window){var s=o(60),l={headers:{Referer:"https://localhost"}};return e.data&&"string"==typeof e.data&&r&&(l={method:e.method,body:e.data,headers:{"Content-Type":e.content,Referer:"https://localhost"}}),s(e.url,l).then((function(e){if(e.ok)n(e.text());else{var t="Errors Occured on Http Request (status : '"+e.statusText+"' | url : '"+e.url+"')",o=e.status;i({message:t,status:o})}})).catch((function(e){i({message:e,status:-1})}))}if(window.XMLHttpRequest){t.trace("XMLHttpRequest"),(a=new XMLHttpRequest).open(e.method,e.url,!0),a.overrideMimeType=e.content;var c=null;e.timeOut>0&&(t.trace("XHR - TimeOut actif !"),c=window.setTimeout((function(){i({message:"TimeOut Occured on Http Request with XMLHttpRequest !",status:-1})}),e.timeOut)),r&&(t.trace("data = ",e.data),a.setRequestHeader("Content-type",e.content)),a.onerror=function(e){console.log(e),i(new Error("Errors Occured on Http Request with XMLHttpRequest !"))},a.ontimeout=function(e){console.log(e),i(new Error("TimeOut Occured on Http Request with XMLHttpRequest !"))},a.onreadystatechange=function(e){if(4===a.readyState)if(200===a.status)window.clearTimeout(c),n(a.response);else{var t="Errors Occured on Http Request (status : '"+e.target.statusText+"' | url : '"+e.target.responseURL+"' | response : '"+e.target.response+"')",o=e.target.status;i({message:t,status:o})}};var u=e.data&&r?e.data:null;a.send(u)}else{if(!window.XDomainRequest)throw new Error("CORS not supported");t.trace("XDomainRequest"),(a=new XDomainRequest).open(e.method,e.url),a.overrideMimeType=e.content,e.timeOut>0&&(a.timeout=e.timeout,t.trace("XHR - TimeOut actif !")),r&&a.setRequestHeader("Content-type",e.content),a.onerror=function(){i(new Error("Errors Occured on Http Request with XMLHttpRequest !"))},a.ontimeout=function(){i(new Error("TimeOut Occured on Http Request with XMLHttpRequest !"))},a.onload=function(e){if(200===a.status)n(a.responseText);else{var t="Errors Occured on Http Request (status : '"+e.target.statusText+"' | url : '"+e.target.responseURL+"')",o=e.target.status;i({message:t,status:o})}};var d=e.data&&r?e.data:null;a.send(d)}}))},__callJSON:function(e){return this.__call(e).then(JSON.parse).catch((function(t){console.log("_callJSON failed on : ",e.url,t)}))},__callXML:function(e){return this.__call(e).then((function(e){var t;"undefined"==typeof window?t=(new(0,o(36).DOMParser)).parseFromString(e,"text/xml"):window.DOMParser?t=(new window.DOMParser).parseFromString(e,"text/xml"):((t=new window.ActiveXObject("Microsoft.XMLDOM")).async=!1,t.loadXML(e));return t})).catch((function(t){console.log("__callXML failed on : ",e.url,t)}))}},E={uuid:(n=Math.floor(Date.now()),function(){return n++}),call:function(e){var t=v.getLogger("JSONP");if(t.trace("[JSONP::call ()]"),!e)throw t.error("missing parameter : options !"),new Error("missing parameter : options !");if(!e.url)throw t.error("missing parameter : options.url !"),new Error("missing parameter : options.url !");if(e.timeOut||(t.info("setting 'options.timeOut' default value"),e.timeOut=0),!e.onResponse)throw t.error("missing parameter : options.onResponse !"),new Error("missing parameter : options.onResponse !");var o="string"==typeof e.callbackSuffix?e.callbackSuffix:this.uuid(),n=!1,i=!1,r=e.url.indexOf("callback=");if(-1!==r){n=!0;var a=e.url.indexOf("&",r);-1===a&&(a=e.url.length);var s=e.url.substring(r+9,a);s&&(i=!0,e.callbackName=s,t.info("setting 'options.callbackName' value ("+e.callbackName+") from 'options.url' parameter"))}if(!n){var l=e.url.indexOf("?");-1===l?e.url=e.url+"?callback=":l===e.url.length?e.url=e.url+"callback=":e.url=e.url+"&callback=",t.info("setting callback default key in 'options.url' : "+e.url)}var c=!!e.callbackName||i;if(i||(e.callbackName||(t.info("setting 'options.callbackName' default value"),e.callbackName="callback",(o||""===o)&&(e.callbackName+=o)),e.url=e.url.replace("callback=","callback="+e.callbackName),t.info("setting callback function name in 'options.url' : "+e.url)),e.onTimeOut||(t.info("setting 'options.onTimeOut' default value"),e.onTimeOut=function(){console.log("TimeOut while invoking url : "+e.url)}),!c){var u=this,d=null;e.timeOut>0&&(d=window.setTimeout((function(){window[e.callbackName]=function(){},e.onTimeOut(),u._deleteScript(o)}),e.timeOut)),window[e.callbackName]=function(t){window.clearTimeout(d),e.onResponse(t),u._deleteScript(o)}}this._createScript(o,e.url)},_createScript:function(e,t){var o,n=document.getElementById("results"+e);(o=document.createElement("script")).setAttribute("type","text/javascript"),o.setAttribute("src",t),o.setAttribute("charset","UTF-8"),o.setAttribute("id","results"+e),o.setAttribute("async","true");var i=document.documentElement||document.getElementsByTagName("head")[0];null===n?i.appendChild(o):i.replaceChild(o,n)},_deleteScript:function(e){var t=document.getElementById("results"+e);if(t){var o=t.parentNode||document.documentElement;if(!o)return;o.removeChild(t)}}},S={send:function(e){var t=e||{method:"GET",protocol:"XHR",timeOut:0,format:null,wrap:!0,nocache:!0,output:"json",callback:null,callbackSuffix:null};if("undefined"!=typeof window||"JSONP"!==e.protocol){if("XHR"===e.protocol||"json"===e.format?t.wrap=!1:"JSONP"===e.protocol&&"xml"===e.format&&(t.wrap=!0),t.callback=null,t.output=t.wrap?"json":null,t.wrap){var o={};o.output=t.output,o.callback=t.callback,delete o.callback,t.url=I.normalyzeUrl(e.url,o)}switch(t.protocol){case"XHR":"GET"===e.method&&e.nocache&&(t.url=I.normalyzeUrl(t.url,{t:(new Date).getTime()})),_.call(t);break;case"JSONP":t.data&&(t.url=I.normalyzeUrl(t.url,t.data)),E.call(t);break;default:throw new Error("protocol not supported (XHR|JSONP) !")}}else console.log("Value (s) for parameter (s) 'protocol=JSONP (instead use XHR)' not supported to NodeJS")}};function M(e){if(!(this instanceof M))throw new TypeError("ErrorService constructor cannot be called as a function.");var t=e;"string"==typeof e||e instanceof String?(this.message=e,this.status=-1,this.type=M.TYPE_UNKERR):(this.message=t.message||"undefined!?",this.type=t.type,this.status=t.status||-1),this.name="ErrorService",this.stack=(new Error).stack}M.TYPE_SRVERR="SERVICE_ERROR",M.TYPE_USEERR="USAGE_ERROR",M.TYPE_UNKERR="UNKNOWN_ERROR",M.prototype=Object.create(Error.prototype,{constructor:{value:M,writable:!0,configurable:!0}});var P=M,x={ssl:!0,url:function(e){return(!1===x.ssl?"http://":"https://")+"wxs.ign.fr"+e},newUrl:function(e,t){return(!1===x.ssl?"http://":"https://")+t+e},Alti:{new_key:{"elevation-json":"/altimetrie/1.0/calcul/alti/rest/elevation.json","elevation-xml":"/altimetrie/1.0/calcul/alti/rest/elevation.xml","profil-json":"/altimetrie/1.0/calcul/alti/rest/elevationLine.json","profil-xml":"/altimetrie/1.0/calcul/alti/rest/elevationLine.xml"},_key:{"elevation-json":"/calcul/alti/rest/elevation.json","elevation-xml":"/calcul/alti/rest/elevation.xml","profil-json":"/calcul/alti/rest/elevationLine.json","profil-xml":"/calcul/alti/rest/elevationLine.xml",wps:"/alti/wps"},newUrl:function(){},url:function(){return{"elevation-json":x.url(this._key["elevation-json"]),"elevation-xml":x.url(this._key["elevation-xml"]),"profil-json":x.url(this._key["profil-json"]),"profil-xml":x.url(this._key["profil-xml"])}}},ProcessIsoCurve:{new_key:"/itineraire/isochrone",_key:"/calcul/geoportail/isochrone/rest/1.0.0/isochrone",newUrl:function(){},url:function(){return x.url(this._key)}},Config:{_key:"https://raw.githubusercontent.com/IGNF/geoportal-configuration/new-url/dist/",url:function(e){Array.isArray(e)||(e=e.split(","));for(var t=[],o=0;on(e,{credentials:"same-origin"}).then(e=>{if(e.ok)return e.json().then(e=>e).catch(e=>{throw new Error("Exception Json : "+e)});throw new Error("Exception HTTP : "+e.status+" (status code) !")}).catch(e=>new Promise((t,o)=>{o(e)})),a=[];for(let e=0;e{if(!e)throw new Error("results config empty !?");e.forEach(e=>{this.listConfigResults.push(e)})}).then(()=>{t.call(this,this.listConfigResults)}).catch(t=>{e.call(this,t)})},N=function(e,t){this.listConfigResults=[];for(var o=0;ot||e__IDENTIFIER__\x3c!-- __DATAINPUTS__ --\x3e__RAWDATAOUTPUT__',input:"__KEY____DATA__"}},namespaceByDefault:function(){return['xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"','xmlns="http://www.opengis.net/wps/1.0.0"','xmlns:wfs="http://www.opengis.net/wfs"','xmlns:wps="http://www.opengis.net/wps/1.0.0"','xmlns:ows="http://www.opengis.net/ows/1.1"','xmlns:gml="http://www.opengis.net/gml"','xmlns:ogc="http://www.opengis.net/ogc"','xmlns:wcs="http://www.opengis.net/wcs/1.1.1"','xmlns:xlink="http://www.w3.org/1999/xlink"'].join(" ")},schemaLocationByDefault:function(){return'xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd"'},processRequestString:function(){this.logger.trace("WPS::processRequestString ()");var e="";if("POST"===this.method)e=this.template.post.value;else{if("GET"!==this.method)return this.logger.error("No other method supported by the service !"),!1;e=this.template.get.value}return e=(e=(e=(e=(e=e.replace(/__SERVICE__/g,this.paramservice)).replace(/__VERSION__/g,this.paramversion)).replace(/__RAWDATAOUTPUT__/g,this.paramrawdataoutput)).replace(/__IDENTIFIER__/g,this.paramidentifier)).replace(/__REQUEST__/g,this.paramrequest),"POST"===this.method&&(e=(e=e.replace(/__NAMESPACE__/g,this.namespaceByDefault)).replace(/__SCHEMALOCATION__/g,this.schemaLocationByDefault)),(e=e.replace(//g,this.__addDataInputs()))?(this.requestString=e,this.logger.trace("traduction tmpl",e),!0):(this.logger.warn("traduction tmpl : empty request !?"),!1)},__addDataInputs:function(){this.logger.trace("WPS::__addDataInputs ()");for(var e,t="GET"===this.method?this.template.get.input:this.template.post.input,o="GET"===this.method?";":"",n="",i=this,r=this.DataObject.getData(),a=0;a0)for(var a=n.getElementsByTagName("parsererror"),s=0;s0){var n=function(e){if(e.attributes.length>0){for(var t={},o=e.attributes,n=0;n0?t.index=t.filters.type[0]:t.index=t.filters.type),delete t.filters.type),t.filters.bbox&&(this.logger.warn("The parameter 'filterOptions.bbox' is deprecated"),delete t.filters.bbox)),delete t.filterOptions),t.position&&(t.position.x&&(this.logger.warn("The parameter 'position.x' is deprecated"),t.position.lon||(t.position.lon=t.position.x),delete t.position.x),t.position.y&&(this.logger.warn("The parameter 'position.y' is deprecated"),t.position.lat||(t.position.lat=t.position.y),delete t.position.y)),t.returnFreeForm&&(this.logger.warn("The parameter 'returnFreeForm' is deprecated"),delete t.returnFreeForm),t.srs&&(this.logger.warn("The parameter 'srs' is deprecated"),delete t.srs),t},Ee.prototype.buildRequest=function(e,t){var o={httpMethod:this.options.httpMethod,geocodeMethod:"search",query:this.options.query,index:this.options.index,returnTrueGeometry:this.options.returnTrueGeometry,position:this.options.position,maxResp:this.options.maximumResponses,filters:this.options.filters};this.request=fe.build(o),this.request?t.call(this,this.request):e.call(this,new P(C.getMessage("SERVICE_REQUEST_BUILD")))},Ee.prototype.analyzeResponse=function(e,t){if(this.response){var o={response:this.response,rawResponse:this.options.rawResponse,onError:e,onSuccess:t,scope:this};_e.build(o)}else e.call(this,new P(C.getMessage("SERVICE_RESPONSE_EMPTY")))};var Se=Ee;function Me(e){if(!(this instanceof Me))throw new TypeError(C.getMessage("CLASS_CONSTRUCTOR","ReverseGeocode"));this.CLASSNAME="ReverseGeocode",this.logger=v.getLogger("Gp.Services.ReverseGeocode"),this.logger.trace("[Constructeur ReverseGeocode (options)]");var t=this.patchOptionConvertor(e);if(t.serverUrl||(t.serverUrl=k.ReverseGeocode.url()),T.apply(this,[t]),t.searchGeometry)this.options.searchGeometry=t.searchGeometry;else if(!t.position)throw new Error(C.getMessage("PARAM_MISSING","searchGeometry"));if(t.index||(this.options.index=t.index="StreetAddress"),t.filters)for(var o=Object.keys(t.filters),n=0;n0?t.index=t.filterOptions.type[0]:t.index=t.filterOptions.type),delete t.filterOptions.type),t.filterOptions.bbox&&(this.logger.warn("The parameter 'filterOptions.bbox' is deprecated"),t.searchGeometry||(t.searchGeometry=this.bbox2Json(t.filterOptions.bbox)),delete t.filterOptions.bbox),t.filterOptions.circle&&(this.logger.warn("The parameter 'filterOptions.circle' is deprecated"),t.searchGeometry||(t.searchGeometry=this.circle2Json(t.filterOptions.circle)),delete t.filterOptions.circle),t.filterOptions.polygon&&(this.logger.warn("The parameter 'filterOptions.polygon' is deprecated"),t.searchGeometry||(t.searchGeometry=this.polygon2Json(t.filterOptions.polygon)),delete t.filterOptions.polygon),!t.filters&&Object.keys(t.filterOptions).length>0&&(t.filters=t.filterOptions),delete t.filterOptions),t.position&&(t.position.x&&(this.logger.warn("The parameter 'position.x' is deprecated"),t.position.lon||(t.position.lon=t.position.x),delete t.position.x),t.position.y&&(this.logger.warn("The parameter 'position.y' is deprecated"),t.position.lat||(t.position.lat=t.position.y),delete t.position.y)),t.srs&&(this.logger.warn("The parameter 'srs' is deprecated"),delete t.srs),t},Me.prototype.buildRequest=function(e,t){var o={httpMethod:this.options.httpMethod,geocodeMethod:"reverse",searchGeometry:this.options.searchGeometry,index:this.options.index,position:this.options.position,returnTrueGeometry:this.options.returnTrueGeometry,maxResp:this.options.maximumResponses,filters:this.options.filters};this.request=fe.build(o),this.request?t.call(this,this.request):e.call(this,new P(C.getMessage("SERVICE_REQUEST_BUILD")))},Me.prototype.analyzeResponse=function(e,t){if(this.response){var o={response:this.response,rawResponse:this.options.rawResponse,onError:e,onSuccess:t,scope:this};_e.build(o)}else e.call(this,new P(C.getMessage("SERVICE_RESPONSE_EMPTY")))},Me.prototype.bbox2Json=function(e){return{type:"Polygon",coordinates:[[[e.left,e.top],[e.right,e.top],[e.right,e.bottom],[e.left,e.bottom],[e.left,e.top]]]}},Me.prototype.circle2Json=function(e){return{type:"Circle",radius:e.radius,coordinates:[e.x,e.y]}},Me.prototype.polygon2Json=function(e){for(var t={type:"Polygon",coordinates:[[]]},o=0;o0)for(var n in t.noProxyDomains)if(o.trace("[ProxyUtils] proxifyUrl : analyzing "+t.noProxyDomains[n]),-1!==e.indexOf(t.noProxyDomains[n]))return o.info("[ProxyUtils] proxifyUrl : "+e+" found in noProxyDomains list ("+t.noProxyDomains[n]+")."),e;return t.proxyUrl+encodeURIComponent(e)}};function ut(e){return(ut="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)}var dt=lt.getLogger("GfiUtils"),pt={getLayerFormat:function(e){var t="function"==typeof e.getType?e.getType():null,o=e.getSource();if(t){if("VECTOR"===t||"VECTOR_TILE"===t)return"vector";if("TILE"===t)return o.tileGrid?"wmts":"wms";if("IMAGE"===t)return"wms"}else{if(o instanceof p.a||o instanceof f.a)return"wms";if(o instanceof g.a)return"wmts";if(o instanceof u.a||o instanceof l.a)return"vector"}return"unknown"},displayInfo:function(e,t,n,i,r){if(dt.trace("[GfiUtils] : displayInfo..."),i||(i="text/html"),null!==n){var s=null,l=n;l=(l=l.replace(/\n/g,"")).replace(/(>)\s*(<)/g,"$1$2");var c="undefined"!=typeof window?window:null;if("object"===("undefined"==typeof exports?"undefined":ut(exports))&&null===window)s=(new(0,o(36).DOMParser)).parseFromString(l,i);else if(c.DOMParser)s=(new c.DOMParser).parseFromString(l,i);else{if(!c.ActiveXObject)return dt.log("Incompatible environment for DOM Parser !"),!1;(s=new c.ActiveXObject("Microsoft.XMLDOM")).async=!1,s.loadXML(l)}var u=s.getElementsByTagName("body");if(u&&1===u.length&&!u[0].hasChildNodes())return!1;var d=document.createElement("div");d.className="gp-feature-info-div";var p=document.createElement("input");p.type="button",p.className="gp-styling-button closer",p.onclick=function(){return e.featuresOverlay&&(e.removeOverlay(e.featuresOverlay),e.featuresOverlay=null),!1};var h=document.createElement("div");return h.className="gp-features-content-div",h.innerHTML=n,d.appendChild(h),d.appendChild(p),e.featuresOverlay&&(e.removeOverlay(e.featuresOverlay),e.featuresOverlay=null),e.featuresOverlay=new a.a({element:d,autoPan:r.autoPan,autoPanAnimation:r.autoPanAnimation,autoPanMargin:r.autoPanMargin,positioning:"bottom-center",insertFirst:!1,stopEvent:!0}),e.addOverlay(e.featuresOverlay),e.featuresOverlay.setPosition(t),e.featuresOverlay.render(),!0}},features2html:function(e,t){var o=document.createElement("div");return t.forEach((function(e){var t=e.getProperties();if(t.hasOwnProperty("render"))o.insertAdjacentHTML("beforeend",t.render);else{if(t.hasOwnProperty("name")){var n=document.createElement("div");n.className="gp-att-name-div",n.insertAdjacentHTML("afterbegin",t.name),o.appendChild(n)}if(t.hasOwnProperty("description")){var i=document.createElement("div");i.className="gp-att-description-div",i.insertAdjacentHTML("afterbegin",t.description),o.appendChild(i)}var r=null,a=!1,s=null,l=null,c=null,u=["fill","fill-opacity","stroke","stroke-opacity","stroke-width","marker-symbol","marker-color","marker-size","geometry","value","name","description","styleUrl","extensionsNode_","icon"];for(r in t)if(void 0!==t[r]&&-1===u.indexOf(r)){a||((s=document.createElement("div")).className="gp-att-others-div",l=document.createElement("ul"),a=!0),c=document.createElement("li");var d=document.createElement("span");d.className="gp-attname-others-span",d.appendChild(document.createTextNode(r+" : ")),c.appendChild(d),c.appendChild(document.createTextNode(t[r])),l.appendChild(c)}l&&(s.appendChild(l),o.appendChild(s))}}),e),o.hasChildNodes()||(o=null),o},layerGetFeatureAtCoordinates:function(e,t,o){var n=e.getPixelFromCoordinate(o);return e.hasFeatureAtPixel(n,(function(e){return e===t}))},displayVectorFeatureInfo:function(e,t,o,n){var i=e.getPixelFromCoordinate(t),r=[];if(e.forEachFeatureAtPixel(i,(function(e,t){(!o||o.indexOf(t)>-1)&&r.push(e)})),0===r.length)return!1;var a=this.features2html(e,r);return null!==a&&(this.displayInfo(e,t,a.innerHTML,"text/html",n),!0)},displayFeatureInfo:function(e,t,o,n,i){for(var r={},a=0;ae.getResolution()&&(f=!1),f&&g.maxResolution&&g.maxResolution255)throw new Error("'"+e+"'' is greater than 255(0xff);");return("0"+Number(e).toString(16)).slice(-2)},num:function(e){return parseInt(e,16)},arrayToRgba:function(e){if(!Array.isArray(e))throw new Error("Not an array !");var t=e[0],o=e[1],n=e[2],i=e[3]||1;return"rgba("+t+", "+o+", "+n+", "+parseFloat(i)+")"},arrayToHex:function(e){if(!Array.isArray(e))throw new Error("Not an array !");var t=e[0],o=e[1],n=e[2],i=e[3],r=[this.hex(t),this.hex(o),this.hex(n)],a={};return a.hex="#"+r.join(""),i&&(a.opacity=parseFloat(i)),a},rgbaToHex:function(e){var t=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(0?.?\d+)\s*)?\)/.exec(e);if(!t)throw new Error("Invalid format: "+e);var o=t[1],n=t[2],i=t[3],r=t[4],a=[this.hex(o),this.hex(n),this.hex(i)],s={};return s.hex="#"+a.join(""),r&&(s.opacity=parseFloat(r)),s},hexToRgba:function(e,t){if(!e)throw new Error("Invalid format");e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,o,n){return t+t+o+o+n+n}));var o=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return(o=o?{r:parseInt(o[1],16),g:parseInt(o[2],16),b:parseInt(o[3],16)}:null)?"rgba("+o.r+", "+o.g+", "+o.b+", "+t+")":null},isHex:function(e){if(!e)return!1;if("#"!==e.charAt(0))return!1;return!!/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e)},isRGB:function(e){if(!e)return!1;return!!/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(0?.?\d+)\s*)?\)/.exec(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KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAg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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/PuhCAHgAAAAGYktHRAD/A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MDIzLTA1LTI0VDE3OjIwOjQwKzAyOjAwIi8+CiAgICA8L3JkZjpTZXE+CiAgIDwveG1wTU06SGlzdG9yeT4KICA8L3JkZjpEZXNjcmlwdGlvbj4KIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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mlpZDo1NGFiYzNkYS1lZWJiLTRlZjctYjdjNS04ZDRjODY5OGVjODMiCiAgICAgIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkdpbXAgMi4xMCAoTGludXgpIgogICAgICBzdEV2dDp3aGVuPSIyMDIzLTA1LTI0VDE3OjI0OjI2KzAyOjAwIi8+CiAgICA8L3JkZjpTZXE+CiAgIDwveG1wTU06SGlzdG9yeT4KICA8L3JkZjpEZXNjcmlwdGlvbj4KIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/Pj0tlUwAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfnBRgPGBru/VeEAAAABmJLR0QA/wD/AP+gvaeTAAAFO0lEQVRYw9WYe2xTVRzHTx97dYS5B1UHa+/tY12dDoOKWyIGlfgHkCkSNTHGwHxA3NiAP/A5x4CMKEzdYL29YyAyBxKQZbI+NvYIaowaH9Ogi2GRbGjcFrbBNrq2a2/9nq5LCFnbbfSOeZJPTs/t6Tm/7/39zu+cU0IiXc7WSImNX0BsZiVYAhigmah5tHklsZrjSYtJSuZtaeSiiJU3gHUwfC9oARfBIHBP1DzaPH1eRuzmp0E6aTgSNX9EWMwSvOkMGPgG+CpguG8a0H7nA78zkMYqye0V0lYXDSHrYUw7cE5TxM04/b+38+vJ+RPRt0eIjVeAAhhyCQizFDKJEBjndaCY49Di4+CRlzFxfwSE3Ciol9i4DSBujoRUy7HIszFxdwSF3CioBy8qm1g5ufhirHwyJqwHrrDGWTlg8hFL1URN2+EF0XFPkyYuSWwhUVgnT2CygXBG3dFcM7bz1/au1u7OK9/93eWidUlHe1dCc810EsUAsXOPQZCI3rGZ6Wb4EXAEM0SCUFnZduz6T/09l4bHXYOCz+f0+XxeWg+7XYM/4vnKtlqHJHSIOrAHlYMFYmawRNCKycaDGZLVfMRdf/nPDpfXM+abotDnpy93dtzXfNgdZg+im2uimJ6h66UTeIMZsrat1jvkdPRRb/imLt4hl6N3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k6T1lczCXUVK7aPZinS9XrTw+Q+Tql7SUmvGuQAAAABJRU5ErkJggg==",defaultOffset:[-25.5,-32]},vt=o(12),Ct=o.n(vt),It=o(13),bt=o.n(It),wt=o(32),_t=o.n(wt),Et=o(33),St=o.n(Et),Mt=o(15),Pt=o.n(Mt),xt=o(16),kt=o.n(xt),Gt=o(34),Rt=o.n(Gt),Tt=o(64),Ot=o.n(Tt),Lt=o(65),Dt=o.n(Lt),jt=lt.getLogger("styling");Ct.a.prototype.setPropertyFill=function(){var e=this.getStyle();if(e&&(!Array.isArray(e)||0!==e.length)){var t=e.getFill();if(t){var o=t.getColor();if(Array.isArray(o)){var n="rgba(";n+=o[0]+",",n+=o[1]+",",n+=o[2]+",",o=n+=o[3]+")"}if(yt.isRGB(o)){var i=yt.rgbaToHex(o);this.set("fill",i.hex),this.set("fill-opacity",i.opacity)}else this.set("fill",o),this.set("fill-opacity",1)}}},Ct.a.prototype.setPropertyStroke=function(){var e=this.getStyle();if(e&&(!Array.isArray(e)||0!==e.length)){var t=e.getStroke();if(t){var o=t.getColor();if(Array.isArray(o)){var n="rgba(";n+=o[0]+",",n+=o[1]+",",n+=o[2]+",",o=n+=o[3]+")"}if(yt.isRGB(o)){var i=yt.rgbaToHex(o);this.set("stroke",i.hex),this.set("stroke-opacity",i.opacity)}else this.set("stroke",o),this.set("stroke-opacity",1);this.set("stroke-width",t.getWidth())}}},Ct.a.prototype.setPropertyLabel=function(){var e=this.getStyle();if(e&&(!Array.isArray(e)||0!==e.length)){var t=void 0!==this.get("name");if(e.getText()&&t){var o=e.getText().getFill();if(o){var n=o.getColor();if(Array.isArray(n)){var i="rgba(";i+=n[0]+",",i+=n[1]+",",i+=n[2]+",",n=i+=n[3]+")"}if(yt.isRGB(n)){var r=yt.rgbaToHex(n);this.set("label-fill",r.hex),this.set("label-fill-opacity",r.opacity)}else this.set("label-fill",n),this.set("label-fill-opacity",1)}var a=e.getText().getStroke();if(a){var s=a.getColor();if(Array.isArray(s)){var l="rgba(";l+=s[0]+",",l+=s[1]+",",l+=s[2]+",",s=l+=s[3]+")"}if(yt.isRGB(s)){var c=yt.rgbaToHex(s);this.set("label-stroke",c.hex),this.set("label-stroke-opacity",c.opacity)}else this.set("label-stroke",s),this.set("label-stroke-opacity",1);this.set("label-stroke-width",a.getWidth())}this.set("label-font",e.getText().getFont()||Nt.DEFAULT_TEXT.font),this.set("label-textAlign",e.getText().getTextAlign()||Nt.DEFAULT_TEXT.textAlign)}}},Ct.a.prototype.setPropertyMarker=function(){var e=this.getStyle();if(e&&(!Array.isArray(e)||0!==e.length)){var t=e.getImage();if(t)if(t instanceof St.a){var o=t.getColor();if(Array.isArray(o)){var n="rgba(";n+=o[0]+",",n+=o[1]+",",n+=o[2]+",",o=n+=o[3]+")"}if(o){var i=yt.rgbaToHex(o);this.set("marker-color",i.hex)}var r=t.getScale();switch(Math.round(2*r)/2){case 0:case.5:this.set("marker-size","small");break;case 1:this.set("marker-size","medium");break;case 1.5:case 2:this.set("marker-size","large")}var a=t.getSrc();a&&this.set("marker-symbol",a),this.unset("circle-fill"),this.unset("circle-fill-opacity"),this.unset("circle-stroke"),this.unset("circle-stroke-width"),this.unset("circle-stroke-opacity"),this.unset("circle-radius")}else{var s=t.getFill();if(s){var l=s.getColor();if(Array.isArray(l)){var c="rgba(";c+=l[0]+",",c+=l[1]+",",c+=l[2]+",",l=c+=l[3]+")"}if(yt.isRGB(l)){var u=yt.rgbaToHex(l);this.set("circle-fill",u.hex),this.set("circle-fill-opacity",u.opacity)}else this.set("circle-fill",l),this.set("circle-fill-opacity",1)}var d=t.getStroke();if(d){var p=d.getColor();if(Array.isArray(p)){var h="rgba(";h+=p[0]+",",h+=p[1]+",",h+=p[2]+",",p=h+=p[3]+")"}if(yt.isRGB(p)){var g=yt.rgbaToHex(p);this.set("circle-stroke",g.hex),this.set("circle-stroke-opacity",g.opacity)}else this.set("circle-stroke",p),this.set("circle-stroke-opacity",1);this.set("circle-stroke-width",d.getWidth())}var m=t.getRadius();this.set("circle-radius",m)}}};var Nt={APPLY_CONVERT_GEOM_GPX:!0,DEFAULT_ICON:{src:At.lightOrange,anchor:[.5,1],scale:1},DEFAULT_CIRCLE:{radius:10,fill:{opacity:1,color:[0,0,0,1]},stroke:{width:1,opacity:1,color:[0,0,0,1]}},DEFAULT_STROKE:{width:5,opacity:1,color:[250,250,250,1]},DEFAULT_FILL:{opacity:1,color:[0,0,0,1]},DEFAULT_TEXT:{font:"16px sans",textAlign:"left",stroke:{color:[250,250,250,1],width:5,opactity:1},fill:{opacity:1,color:[0,0,0,1]}},getListTags:function(){return["type","fill","fill-opacity","stroke","stroke-opacity","stroke-width","circle-fill","circle-fill-opacity","circle-stroke","circle-stroke-opacity","circle-stroke-width","circle-radius","marker-symbol","marker-color","marker-size","label-fill","label-fill-opacity","label-stroke","label-stroke-width","label-stroke-opacity","label-font","label-textAlign"]},defineStyleFromProperties:function(e){var t=null,o={},n=null;if(e.get("marker-color")||e.get("marker-size")||e.get("marker-symbol")){(n={}).src=this.DEFAULT_ICON.src,n.anchor=this.DEFAULT_ICON.anchor;var i=e.get("marker-symbol");i&&-1!==i.search("data:image/png;base64")&&(n.src=i);var r=e.get("marker-color");yt.isHex(r)&&(n.color=yt.hexToRgba(r,1));var a=e.get("marker-size");if(a)switch(a){case"small":n.scale=.5;break;case"medium":n.scale=1;break;case"large":n.scale=1.5;break;default:n.scale=this.DEFAULT_ICON.scale}}var s=null;(e.get("stroke")||e.get("stroke-opacity")||e.get("stroke-width"))&&((s={}).color=yt.hexToRgba(e.get("stroke"),+e.get("stroke-opacity")||this.DEFAULT_STROKE.opacity),s.width=+e.get("stroke-width")||this.DEFAULT_STROKE.width);var l=null;(e.get("fill")||e.get("fill-opacity"))&&((l={}).color=yt.hexToRgba(e.get("fill"),+e.get("fill-opacity")||this.DEFAULT_FILL.opacity));var c=null,u=null,d=""!==e.get("name");d&&((e.get("label-fill")||e.get("label-fill-opacity"))&&((u={}).color=yt.hexToRgba(e.get("label-fill"),+e.get("label-fill-opacity")||this.DEFAULT_TEXT.fill.opacity)),(e.get("label-stroke")||e.get("label-stroke-opacity")||e.get("label-stroke-width"))&&((c={}).color=yt.hexToRgba(e.get("label-stroke"),+e.get("label-stroke-opacity")||this.DEFAULT_TEXT.stroke.opacity),c.width=+e.get("label-stroke-width")||this.DEFAULT_TEXT.stroke.width));var p=e.get("circle-radius")||this.DEFAULT_CIRCLE.radius,h=null;(e.get("circle-stroke")||e.get("circle-stroke-opacity")||e.get("circle-stroke-width"))&&((h={}).color=yt.hexToRgba(e.get("circle-stroke"),+e.get("circle-stroke-opacity")||this.DEFAULT_CIRCLE.stroke.opacity),h.width=+e.get("circle-stroke-width")||this.DEFAULT_CIRCLE.stroke.width);var g=null;(e.get("circle-fill")||e.get("circle-fill-opacity"))&&((g={}).color=yt.hexToRgba(e.get("circle-fill"),+e.get("circle-fill-opacity")||this.DEFAULT_CIRCLE.fill.opacity));var m=e.getGeometry().getType();switch(m){case"Circle":case"Point":case"MultiPoint":var f=!1,y={};if(h&&(y.stroke=new kt.a(h)),g&&(y.fill=new Pt.a(g)),0!==Object.keys(y).length&&(f=!0,y.radius=+p,o.image=new _t.a(y)),n&&(o.image=new St.a(n)),d){var A={};if(c&&(A.stroke=new kt.a(c)),u&&(A.fill=new Pt.a(u)),0!==Object.keys(A).length)A.text=e.get("name"),A.textAlign=e.get("label-textAlign")||this.DEFAULT_TEXT.textAlign,A.font=e.get("label-font")||this.DEFAULT_TEXT.font,o.text=new Rt.a(Object.assign({},this.DEFAULT_TEXT,A));else if(n||f){var v=new Rt.a(Object.assign({},this.DEFAULT_TEXT,{fill:new Pt.a(this.DEFAULT_TEXT.fill),stroke:new kt.a(this.DEFAULT_TEXT.stroke)}));if(v){var C=v.clone();C.setText(e.get("name")),o.text=C}}}break;case"Polygon":case"MultiPolygon":s&&(o.stroke=new kt.a(s)),l&&(o.fill=new Pt.a(l));break;case"LineString":case"MultiLineString":if(s&&(o.stroke=new kt.a(s)),this.APPLY_CONVERT_GEOM_GPX&&l){var I=e.get("type");if(I&&("Polygon"===I||"MultiPolygon"===I)){o.fill=new Pt.a(l);var b=e.clone(),w="LineString"===m?Ot.a:Dt.a;e.setGeometry(new w([b.getGeometry().getCoordinates()]))}}}return 0!==Object.keys(o).length&&(t=new bt.a(o)),t},defineStyleFunctionByDefault:function(e){if(!e)return[];if(0===Object.keys(e).length)return[];return function(t,o){var n=null;switch(t.getGeometry().getType()){case"Point":case"MultiPoint":var i={};if(e.getImage()&&(i.image=e.getImage()),e.getText()&&t.get("name")){var r=e.getText().clone();r.setText(t.get("name")),i.text=r}n=new bt.a(i);break;case"Circle":var a={},s={};if(e.getFill()&&(s.fill=e.getFill()),e.getStroke()&&(s.stroke=e.getStroke()),e.getText()&&t.get("name")){var l=e.getText().clone();l.setText(t.get("name")),a.text=l}0!==Object.keys(s).length&&(s.radius=3,a.image=new _t.a(s)),n=new bt.a(a);break;case"Polygon":case"MultiPolygon":var c={};e.getFill()&&(c.fill=e.getFill()),e.getStroke()&&(c.stroke=e.getStroke()),n=new bt.a(c);break;case"LineString":case"LinearRing":case"MultiLineString":var u={};e.getStroke()&&(u.stroke=e.getStroke()),n=new bt.a(u)}return[n]}},definePropertiesFromStyleByType:function(e){switch(e.getGeometry().getType()){case"Point":case"MultiPoint":e.setPropertyMarker(),e.setPropertyLabel();break;case"LineString":case"MultiLineString":e.setPropertyStroke();break;case"Polygon":case"MultiPolygon":e.setPropertyStroke(),e.setPropertyFill()}},definePropertiesFromStyle:function(e){var t=e.getStyle()||e.getStyleFunction();if(t){if("function"==typeof t){var o=t.call(this,e,0);if(!o||0===o.length)return;t=Array.isArray(o)?o[0]:o,e.setStyle(t)}this.definePropertiesFromStyleByType(e)}},defineTagFromStyle:function(e,t){return jt.trace("todo..."),null}},Ut=Nt;function Bt(e){return(Bt="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)}var Ft=lt.getLogger("parser"),zt={parse:function(e){var t=null,n="undefined"!=typeof window?window:null;"object"===("undefined"==typeof exports?"undefined":Bt(exports))&&null===window?t=(new(0,o(36).DOMParser)).parseFromString(e,"text/xml"):n.DOMParser?t=(new n.DOMParser).parseFromString(e,"text/xml"):n.ActiveXObject?((t=new n.ActiveXObject("Microsoft.XMLDOM")).async=!1,t.loadXML(e)):Ft.log("Incompatible environment for DOM Parser !");var i=t.querySelector("parsererror");return i?(console.error(i),null):(Ft.trace(t),t)},toString:function(e){var t=(new XMLSerializer).serializeToString(e);return Ft.trace(t),t},format:function(e){for(var t="",o=(e=e.replace(/(>)\s*(<)(\/*)/g,"$1\n$2$3").replace(/ *(.*) +\n/g,"$1\n").replace(/(<.+>)(.+\n)/g,"$1\n$2")).split("\n"),n=0,i="other",r={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0},a=0;a/)),c=Boolean(s.match(/<\/.+>/)),u=Boolean(s.match(/<[^!].*>/)),d=l?"single":c?"closing":u?"opening":"other",p=i+"->"+d;i=d;var h="";n+=r[p];for(var g=0;gclosing"===p?t=t.substr(0,t.length-1)+s+"\n":t+=h+s+"\n"}return Ft.trace(t),t}};function Vt(e){return(Vt="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)}var Wt={detectSupport:function(){var e=!0,t=window.navigator.userAgent.toLowerCase();return-1===t.indexOf("iphone")&&-1===t.indexOf("ipod")&&-1===t.indexOf("ipad")&&-1===t.indexOf("android")&&-1===t.indexOf("mobile")&&-1===t.indexOf("blackberry")&&-1===t.indexOf("tablet")&&-1===t.indexOf("phone")&&-1===t.indexOf("touch")||(e=!1),-1===t.indexOf("msie")&&-1===t.indexOf("trident")||(e=!0),e},assign:function(e,t){for(var o in e=e||{},t)t.hasOwnProperty(o)&&(e[o]=t[o]);return e},mergeParams:function(e,t,o){if(e&&t)for(var n in void 0===o&&(o=!0),t)t.hasOwnProperty(n)&&("object"===Vt(t[n])?e.hasOwnProperty(n)?this.mergeParams(e[n],t[n],o):e[n]=t[n]:e.hasOwnProperty(n)?o&&(e[n]=t[n]):e[n]=t[n])}},qt=lt.getLogger("extended KML format"),Ht=function(e){function t(o){if(!(this instanceof t))throw new TypeError("ERROR CLASS_CONSTRUCTOR");o=o||{},this.source=null,this.extensions=o.extensions||null,o.defaultStyle&&!Array.isArray(o.defaultStyle)&&(o.defaultStyle=[o.defaultStyle]),null!==o.defaultStyle&&void 0!==o.defaultStyle||(o.defaultStyle=[]),e.call(this,o)}function o(e,t,o){for(var n="#document"===e.nodeName?e.childNodes[0].childNodes:e.childNodes,i=n,r=0;r)\s*(<)/g,"$1$2"),null===(i=zt.parse(a)))return r;function s(e){var t="";t+=e.substr(6,2),t+=e.substr(4,2),t+=e.substr(2,2);for(var o=parseInt(t,16).toString(16),n="",i=o.length||0,r=0;r<6-i;r++)n+="0";return o="#"+n+o}var l=function(e,t){if(qt.trace("label with style :",t),e){for(var o=e.getProperties().name,n=s("ff000000"),i="#FFFFFF",r=0,a="Sans",l="16px",c=null,u=5,d="#000000",p="#ffffff",h=1,g=!1,m=!1,f=t.childNodes,y=0;yt&&(n=!1),n&&p&&pt?1:er&&(c-s)*(r-l)-(i-s)*(u-l)>0&&a++:u<=r&&(c-s)*(r-l)-(i-s)*(u-l)<0&&a--,s=c,l=u}return 0!==a}function Xo(e,t,o,n,i,r){if(0===o.length)return!1;if(!Ko(e,t,o[0],n,i,r))return!1;for(var a=1,s=o.length;aC&&Xo(e,t,o,n,c=(u+d)/2,g)&&(v=c,C=I),u=d}return isNaN(v)&&(v=i[r]),a?(a.push(v,g,C),a):[v,g,C]}var $o={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"};var en={};en[$o.RADIANS]=6370997/(2*Math.PI),en[$o.DEGREES]=2*Math.PI*6370997/360,en[$o.FEET]=.3048,en[$o.METERS]=1,en[$o.USFEET]=1200/3937;var tn=$o,on=function(){function e(e){this.code_=e.code,this.units_=e.units,this.extent_=void 0!==e.extent?e.extent:null,this.worldExtent_=void 0!==e.worldExtent?e.worldExtent:null,this.axisOrientation_=void 0!==e.axisOrientation?e.axisOrientation:"enu",this.global_=void 0!==e.global&&e.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=e.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=e.metersPerUnit}return e.prototype.canWrapX=function(){return this.canWrapX_},e.prototype.getCode=function(){return this.code_},e.prototype.getExtent=function(){return this.extent_},e.prototype.getUnits=function(){return this.units_},e.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||en[this.units_]},e.prototype.getWorldExtent=function(){return this.worldExtent_},e.prototype.getAxisOrientation=function(){return this.axisOrientation_},e.prototype.isGlobal=function(){return this.global_},e.prototype.setGlobal=function(e){this.global_=e,this.canWrapX_=!(!e||!this.extent_)},e.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},e.prototype.setDefaultTileGrid=function(e){this.defaultTileGrid_=e},e.prototype.setExtent=function(e){this.extent_=e,this.canWrapX_=!(!this.global_||!e)},e.prototype.setWorldExtent=function(e){this.worldExtent_=e},e.prototype.setGetPointResolution=function(e){this.getPointResolutionFunc_=e},e.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},e}();var nn="cosh"in Math?Math.cosh:function(e){var t=Math.exp(e);return(t+1/t)/2};"log2"in Math&&Math.log2;function rn(e,t,o){return e+o*(t-e)}var an=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),sn=6378137*Math.PI,ln=[-sn,-sn,sn,sn],cn=[-180,-85,180,85],un=6378137*Math.log(Math.tan(Math.PI/2)),dn=function(e){function t(t){return e.call(this,{code:t,units:tn.METERS,extent:ln,global:!0,worldExtent:cn,getPointResolution:function(e,t){return e/nn(t[1]/6378137)}})||this}return an(t,e),t}(on),pn=[new dn("EPSG:3857"),new dn("EPSG:102100"),new dn("EPSG:102113"),new dn("EPSG:900913"),new dn("http://www.opengis.net/def/crs/EPSG/0/3857"),new dn("http://www.opengis.net/gml/srs/epsg.xml#3857")];function hn(e,t,o){var n=e.length,i=o>1?o:2,r=t;void 0===r&&(r=i>2?e.slice():new Array(n));for(var a=0;aun?s=un:s<-un&&(s=-un),r[a+1]=s}return r}function gn(e,t,o){var n=e.length,i=o>1?o:2,r=t;void 0===r&&(r=i>2?e.slice():new Array(n));for(var a=0;a>1)],t))<0?a=n+1:(s=n,l=!i);return l?a:~a}(h,y);A<0?(l=(y-h[-A-2])/(h[-A-1]-h[-A-2]),s=t+(-A-2)*n):s=t+A*n}var v=a>1?a:2,C=r||new Array(v);for(g=0;g=.05){for(var o="",n=e.split("\n"),i=Vn.slice(0,Math.round(t/.1)),r=0,a=n.length;r0&&(o+="\n"),o+=n[r].split("").join(i);return o}return e}function qn(){return zn||(zn=Fn(1,1).getContext("2d")),zn}function Hn(e,t){return qn().measureText(e).width+(e.length-1)*t}var Yn={};jn.labelCache&&Nn(jn.labelCache,"clear",(function(){Yn={}}));var Jn,Zn,Kn=Dn.e.isFunction,Xn=Dn.e.convertFunction,Qn=Dn.c.isExpression,$n=Dn.c.createPropertyExpression,ei={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},ti={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]},oi={},ni={zoom:0};function ii(e,t,o,n,i,r){var a=e.id;r||(r={},console.warn("No functionCache provided to getValue()")),r[a]||(r[a]={});var s=r[a];if(!s[o]){var l=(e[t]||oi)[o],c=Dn.f["".concat(t,"_").concat(e.type)][o];void 0===l&&(l=c.default);var u=Qn(l);if(!u&&Kn(l)&&(l=Xn(l,c),u=!0),u){var d=function(e,t){var o=$n(e,t);if("error"===o.result)throw new Error(o.value.map((function(e){return"".concat(e.key,": ").concat(e.message)})).join(", "));return o.value}(l,c);s[o]=d.evaluate.bind(d)}else"color"==c.type&&(l=Dn.a.parse(l)),s[o]=function(){return l}}return ni.zoom=n,s[o](ni,i)}function ri(e,t){if(e){if(0===e.a||0===t)return;var o=e.a;return t=void 0===t?1:t,"rgba("+Math.round(255*e.r/o)+","+Math.round(255*e.g/o)+","+Math.round(255*e.b/o)+","+o*t+")"}return e}var ai=/^([^]*)\{(.*)\}([^]*)$/;function si(e,t){var o;do{if(o=e.match(ai)){var n=t[o[2]]||"";e=o[1]+n+o[3]}}while(o);return e}var li=!1;var ci=function(e,t,o,n,i,r,a){if(void 0===n&&(n=Bn),"string"==typeof t&&(t=JSON.parse(t)),8!=t.version)throw new Error("glStyle version 8 required.");var s,l;if(r)if("undefined"!=typeof Image){var c=new Image;c.crossOrigin="anonymous",c.onload=function(){s=c,l=[c.width,c.height],e.changed(),c.onload=null},c.src=r}else if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope){var u=self;u.postMessage({action:"loadImage",src:r}),u.addEventListener("message",(function(e){"imageLoaded"===e.data.action&&e.data.src===r&&(s=e.data.image,l=[s.width,s.height])}))}for(var d,p=Object(Dn.b)(t.layers),h={},g=[],m={},f={},y={},A={},v=0,C=p.length;v=C.maxzoom)return"continue";var _=C.filter;if(!_||function(e,t,o,n,i){return i||console.warn("No filterCache provided to evaluateFilter()"),e in i||(i[e]=Object(Dn.d)(t).filter),ni.zoom=n,i[e](ni,o)}(I,_,p,c,A)){u=C;var E=void 0,S=void 0,k=void 0,G=void 0,R=void 0,T=void 0,O=v.index;if(3==d&&("fill"==C.type||"fill-extrusion"==C.type))if(S=ii(C,"paint",C.type+"-opacity",c,p,y),C.type+"-pattern"in w){var L=ii(C,"paint",C.type+"-pattern",c,p,y);if(L){var D="string"==typeof L?si(L,o):L.toString();if(s&&i&&i[D]){++g,(T=x[g])&&T.getFill()&&!T.getStroke()&&!T.getText()||(T=new bt.a({fill:new Pt.a}),x[g]=T),k=T.getFill(),T.setZIndex(O);var j=f[he=D+"."+S];if(!j){var N=Fn((ge=i[D]).width,ge.height),U=N.getContext("2d");U.globalAlpha=S,U.drawImage(s,ge.x,ge.y,ge.width,ge.height,0,0,ge.width,ge.height),j=U.createPattern(N,"repeat"),f[he]=j}k.setColor(j)}}}else(E=ri(ii(C,"paint",C.type+"-color",c,p,y),S))&&(C.type+"-outline-color"in w&&(R=ri(ii(C,"paint",C.type+"-outline-color",c,p,y),S)),R||(R=E),++g,(T=x[g])&&T.getFill()&&T.getStroke()&&!T.getText()||(T=new bt.a({fill:new Pt.a,stroke:new kt.a}),x[g]=T),(k=T.getFill()).setColor(E),(G=T.getStroke()).setColor(R),G.setWidth(1),T.setZIndex(O));if(1!=d&&"line"==C.type){E=!("line-pattern"in w)&&"line-color"in w?ri(ii(C,"paint","line-color",c,p,y),ii(C,"paint","line-opacity",c,p,y)):void 0;var B=ii(C,"paint","line-width",c,p,y);E&&B>0&&(++g,(T=x[g])&&T.getStroke()&&!T.getFill()&&!T.getText()||(T=new bt.a({stroke:new kt.a}),x[g]=T),(G=T.getStroke()).setLineCap(ii(C,"layout","line-cap",c,p,y)),G.setLineJoin(ii(C,"layout","line-join",c,p,y)),G.setMiterLimit(ii(C,"layout","line-miter-limit",c,p,y)),G.setColor(E),G.setWidth(B),G.setLineDash(w["line-dasharray"]?ii(C,"paint","line-dasharray",c,p,y).map((function(e){return e*B})):null),T.setZIndex(O))}var F=!1,z=null,V=0,W=void 0,q=void 0,H=void 0;if((1==d||2==d)&&"icon-image"in b){var Y=ii(C,"layout","icon-image",c,p,y);if(Y){W="string"==typeof Y?si(Y,o):Y.toString();var J=void 0;if(s&&i&&i[W]){var Z=ii(C,"layout","icon-rotation-alignment",c,p,y);if(2==d){var K=e.getGeometry();if(K.getFlatMidpoint||K.getFlatMidpoints){var X=K.getExtent();if(Math.sqrt(Math.max(Math.pow((X[2]-X[0])/t,2),Math.pow((X[3]-X[1])/t,2)))>150){var Q="MultiLineString"===K.getType()?K.getFlatMidpoints():K.getFlatMidpoint();if(Zn||(Zn=new Tn("Point",Jn=[NaN,NaN],[],{},null)),J=Zn,Jn[0]=Q[0],Jn[1]=Q[1],"line"===(ke=ii(C,"layout","symbol-placement",c,p,y))&&"map"===Z)for(var $=K.getStride(),ee=K.getFlatCoordinates(),te=0,oe=ee.length-$;te=se&&Q[0]<=ce&&Q[1]>=le&&Q[1]<=ue){V=Math.atan2(ie-ae,re-ne);break}}}}}if(2!==d||J){var de=ii(C,"layout","icon-size",c,p,y),pe=void 0!==w["icon-color"]?ii(C,"paint","icon-color",c,p,y):null;if(!pe||0!==pe.a){var he=W+"."+de;if(null!==pe&&(he+="."+pe),!(q=m[he])){var ge=i[W];q=new St.a({color:pe?[255*pe.r,255*pe.g,255*pe.b,pe.a]:void 0,img:s,imgSize:l,size:[ge.width,ge.height],offset:[ge.x,ge.y],rotateWithView:"map"===Z,scale:de/ge.pixelRatio}),m[he]=q}}q&&(++g,(T=x[g])&&T.getImage()&&!T.getFill()&&!T.getStroke()||(T=new bt.a,x[g]=T),T.setGeometry(J),q.setRotation(V+Un(ii(C,"layout","icon-rotate",c,p,y))),q.setOpacity(ii(C,"paint","icon-opacity",c,p,y)),q.setAnchor(ti[ii(C,"layout","icon-anchor",c,p,y)]),T.setImage(q),z=T.getText(),T.setText(void 0),T.setZIndex(O),F=!0,H=!1)}else H=!0}}}if(1==d&&"circle-radius"in w){++g,(T=x[g])&&T.getImage()&&!T.getFill()&&!T.getStroke()||(T=new bt.a,x[g]=T);var me=ii(C,"paint","circle-radius",c,p,y),fe=ri(ii(C,"paint","circle-stroke-color",c,p,y),ii(C,"paint","circle-stroke-opacity",c,p,y)),ye=ri(ii(C,"paint","circle-color",c,p,y),ii(C,"paint","circle-opacity",c,p,y)),Ae=ii(C,"paint","circle-stroke-width",c,p,y),ve=me+"."+fe+"."+ye+"."+Ae;(q=m[ve])||(q=new _t.a({radius:me,stroke:fe&&Ae>0?new kt.a({width:Ae,color:fe}):void 0,fill:ye?new Pt.a({color:ye}):void 0}),m[ve]=q),T.setImage(q),z=T.getText(),T.setText(void 0),T.setGeometry(void 0),T.setZIndex(O),F=!0}var Ce=void 0;if("text-field"in b)Ce=si(ii(C,"layout","text-field",c,p,y).toString(),o).trim(),S=ii(C,"paint","text-opacity",c,p,y);if(Ce&&S&&!H){F||(++g,(T=x[g])&&T.getText()&&!T.getFill()&&!T.getStroke()||(T=new bt.a,x[g]=T),T.setImage(void 0),T.setGeometry(void 0)),T.getText()||T.setText(z||new Rt.a({padding:[2,2,2,2]})),z=T.getText();var Ie=Math.round(ii(C,"layout","text-size",c,p,y)),be=ii(C,"layout","text-font",c,p,y),we=ii(C,"layout","text-line-height",c,p,y),_e=Ln()(a?a(be):be,Ie,we),Ee=b["text-transform"];"uppercase"==Ee?Ce=Ce.toUpperCase():"lowercase"==Ee&&(Ce=Ce.toLowerCase());var Se=ii(C,"layout","text-max-width",c,p,y),Me=ii(C,"layout","text-letter-spacing",c,p,y),Pe=2==d?Wn(Ce,Me):function e(t,o,n,i){if(-1!==t.indexOf("\n")){for(var r=t.split("\n"),a=[],s=0,l=r.length;s1){var p=qn();p.font=o;var h=p.measureText("M").width*n,g="";for(a=[],s=0,l=d.length;s1;++s){var y=a[s];if(Hn(y,i)<.35*h){var A=s>0?Hn(a[s-1],i):1/0,v=s.7*h&&Hn(I,i)<.6*h){var b=C.split(" "),w=b.pop();Hn(w,i)<.2*h&&(a[s]=b.join(" "),a[s+1]=w+" "+I),l-=1}}u=a.join("\n")}else u=t;u=Wn(u,i),Yn[c]=u}return u}(Ce,_e,Se,Me);z.setText(Pe),z.setFont(_e),z.setRotation(Un(ii(C,"layout","text-rotate",c,p,y)));var xe=ii(C,"layout","text-anchor",c,p,y),ke=F||1==d?"point":ii(C,"layout","symbol-placement",c,p,y);z.setPlacement(ke);var Ge=ii(C,"paint","text-halo-width",c,p,y),Re=ii(C,"layout","text-offset",c,p,y),Te=ii(C,"paint","text-translate",c,p,y),Oe=0,Le=0;if("point"==ke){var De="center";-1!==xe.indexOf("left")?(De="left",Le=Ge):-1!==xe.indexOf("right")&&(De="right",Le=-Ge),z.setTextAlign(De);var je=ii(C,"layout","text-rotation-alignment",c,p,y);z.setRotateWithView("map"==je)}else z.setMaxAngle(Un(ii(C,"layout","text-max-angle",c,p,y))*Ce.length/Pe.length),z.setTextAlign(),z.setRotateWithView(!1);var Ne="middle";0==xe.indexOf("bottom")?(Ne="bottom",Oe=-Ge-.5*(we-1)*Ie):0==xe.indexOf("top")&&(Ne="top",Oe=Ge+.5*(we-1)*Ie),z.setTextBaseline(Ne),z.setOffsetX(Re[0]*Ie+Le+Te[0]),z.setOffsetY(Re[1]*Ie+Oe+Te[1]),P.setColor(ri(ii(C,"paint","text-color",c,p,y),S)),z.setFill(P);var Ue=ri(ii(C,"paint","text-halo-color",c,p,y),S);if(Ue){M.setColor(Ue),Ge*=2;var Be=.5*Ie;M.setWidth(Ge<=Be?Ge:Be),z.setStroke(M)}else z.setStroke(void 0);var Fe=ii(C,"layout","text-padding",c,p,y),ze=z.getPadding();Fe!==ze[0]&&(ze[0]=Fe,ze[1]=Fe,ze[2]=Fe,ze[3]=Fe),T.setZIndex(O)}}},C=0,I=r.length;C-1?(x.length=g+1,li&&("function"==typeof e.set?e.set("mapbox-layer",u):e.getProperties()["mapbox-layer"]=u),x):void 0}};return e.setStyle(k),e.set("mapbox-source",d),e.set("mapbox-layers",g),k},ui=o(70),di=o.n(ui),pi=o(35);function hi(e){return(hi="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)}var gi,mi=/font-family: ?([^;]*);/,fi=/("|')/g;function yi(e){if(!gi){gi={};for(var t=document.styleSheets,o=0,n=t.length;o2?n[2]:""):e+o}function _i(e,t,o,n,i){return new Promise((function(r,a){if("object"!=hi(t)&&(t=JSON.parse(t)),8!=t.version)return a(new Error("glStyle version 8 required."));if(!(e instanceof Do.a||e instanceof xo.a))return a(new Error("Can only apply to VectorLayer or VectorTileLayer"));var s,l,c;function u(){c||t.sprite&&!s?c?(e.setStyle(c),r()):a(new Error("Something went wrong trying to apply style.")):(c=ci(e,t,o,i,s,l,Ci),e.getStyle()?r():a(new Error("Nothing to show for source [".concat(o,"]"))))}if(t.sprite){var d=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"",p=wi(t.sprite,n,d+".json");fetch(p,{credentials:"same-origin"}).then((function(e){return e.ok||""===d?e:(p=wi(t.sprite,n,".json"),fetch(p,{credentials:"same-origin"}))})).then((function(e){if(e.ok)return e.json();a(new Error("Problem fetching sprite from ".concat(p,": ").concat(e.statusText)))})).then((function(e){if(void 0===e)return a(new Error("No sprites found."));s=e,l=wi(t.sprite,n,d+".png"),u()})).catch((function(e){a(new Error("Sprites cannot be loaded: ".concat(p,": ").concat(e.message)))}))}else u()}))}new no.a;var Ei=function(e){function t(o,n){if(!(this instanceof t))throw new TypeError("ERROR CLASS_CONSTRUCTOR");if(!o.layer)throw new Error("ERROR PARAM_MISSING : layer");if("string"!=typeof o.layer)throw new Error("ERROR WRONG TYPE : layer");if(this.layerName=o.layer,this.styleName=o.style,this.sourceId=o.source,void 0===o.ssl&&(o.ssl=!0),this.protocol=!1===o.ssl?"http://":"https://",!ho.a.isConfigLoaded())throw new Error("ERROR : contract key configuration has to be loaded to load Geoportal layers.");var i=this.layerName+"$GEOPORTAIL:GPP:TMS",r=ho.a.configuration.getLayerConf(i);if(!r)throw new Error("ERROR : Layer ID not found into the catalogue !?");this.styleUrl=null,this.styleTitle="";for(var a=0;a * @author owenm * @license MIT */ -function xi(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function ki(e){for(var t=1;t=0||(i[o]=e[o]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(i[o]=e[o])}return i}function Li(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var Di=Li(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),ji=Li(/Edge/i),Ui=Li(/firefox/i),Ni=Li(/safari/i)&&!Li(/chrome/i)&&!Li(/android/i),Bi=Li(/iP(ad|od|hone)/i),Fi=Li(/chrome/i)&&Li(/android/i),zi={capture:!1,passive:!1};function Vi(e,t,o){e.addEventListener(t,o,!Di&&zi)}function Wi(e,t,o){e.removeEventListener(t,o,!Di&&zi)}function qi(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function Hi(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Yi(e,t,o,n){if(e){o=o||document;do{if(null!=t&&(">"===t[0]?e.parentNode===o&&qi(e,t):qi(e,t))||n&&e===o)return e;if(e===o)break}while(e=Hi(e))}return null}var Ji,Zi=/\s+/g;function Ki(e,t,o){if(e&&t)if(e.classList)e.classList[o?"add":"remove"](t);else{var n=(" "+e.className+" ").replace(Zi," ").replace(" "+t+" "," ");e.className=(n+(o?" "+t:"")).replace(Zi," ")}}function Xi(e,t,o){var n=e&&e.style;if(n){if(void 0===o)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(o=e.currentStyle),void 0===t?o:o[t];t in n||-1!==t.indexOf("webkit")||(t="-webkit-"+t),n[t]=o+("string"==typeof o?"":"px")}}function Qi(e,t){var o="";if("string"==typeof e)o=e;else do{var n=Xi(e,"transform");n&&"none"!==n&&(o=n+" "+o)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(o)}function $i(e,t,o){if(e){var n=e.getElementsByTagName(t),i=0,r=n.length;if(o)for(;i=r:i<=r))return n;if(n===er())break;n=sr(n,!1)}return!1}function nr(e,t,o,n){for(var i=0,r=0,a=e.children;r2&&void 0!==arguments[2]?arguments[2]:{},n=o.evt,i=Oi(o,Ar);fr.pluginEvent.bind(da)(e,t,ki({dragEl:Ir,parentEl:br,ghostEl:wr,rootEl:_r,nextEl:Er,lastDownEl:Sr,cloneEl:Mr,cloneHidden:Pr,dragStarted:Fr,putSortable:Or,activeSortable:da.active,originalEvent:n,oldIndex:xr,oldDraggableIndex:Gr,newIndex:kr,newDraggableIndex:Rr,hideGhostForTarget:sa,unhideGhostForTarget:la,cloneNowHidden:function(){Pr=!0},cloneNowShown:function(){Pr=!1},dispatchSortableEvent:function(e){Cr({sortable:t,name:e,originalEvent:n})}},i))};function Cr(e){yr(ki({putSortable:Or,cloneEl:Mr,targetEl:Ir,rootEl:_r,oldIndex:xr,oldDraggableIndex:Gr,newIndex:kr,newDraggableIndex:Rr},e))}var Ir,br,wr,_r,Er,Sr,Mr,Pr,xr,kr,Gr,Rr,Tr,Or,Lr,Dr,jr,Ur,Nr,Br,Fr,zr,Vr,Wr,qr,Hr=!1,Yr=!1,Jr=[],Zr=!1,Kr=!1,Xr=[],Qr=!1,$r=[],ea="undefined"!=typeof document,ta=Bi,oa=ji||Di?"cssFloat":"float",na=ea&&!Fi&&!Bi&&"draggable"in document.createElement("div"),ia=function(){if(ea){if(Di)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),ra=function(e,t){var o=Xi(e),n=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),i=nr(e,0,t),r=nr(e,1,t),a=i&&Xi(i),s=r&&Xi(r),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+tr(i).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+tr(r).width;if("flex"===o.display)return"column"===o.flexDirection||"column-reverse"===o.flexDirection?"vertical":"horizontal";if("grid"===o.display)return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!r||"both"!==s.clear&&s.clear!==u?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=n&&"none"===o[oa]||r&&"none"===o[oa]&&l+c>n)?"vertical":"horizontal"},aa=function(e){function t(e,o){return function(n,i,r,a){var s=n.options.group.name&&i.options.group.name&&n.options.group.name===i.options.group.name;if(null==e&&(o||s))return!0;if(null==e||!1===e)return!1;if(o&&"clone"===e)return e;if("function"==typeof e)return t(e(n,i,r,a),o)(n,i,r,a);var l=(o?n:i).options.group.name;return!0===e||"string"==typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var o={},n=e.group;n&&"object"==Gi(n)||(n={name:n}),o.name=n.name,o.checkPull=t(n.pull,!0),o.checkPut=t(n.put),o.revertClone=n.revertClone,e.group=o},sa=function(){!ia&&wr&&Xi(wr,"display","none")},la=function(){!ia&&wr&&Xi(wr,"display","")};ea&&document.addEventListener("click",(function(e){if(Yr)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Yr=!1,!1}),!0);var ca=function(e){if(Ir){e=e.touches?e.touches[0]:e;var t=(i=e.clientX,r=e.clientY,Jr.some((function(e){var t=e[pr].options.emptyInsertThreshold;if(t&&!ir(e)){var o=tr(e),n=i>=o.left-t&&i<=o.right+t,s=r>=o.top-t&&r<=o.bottom+t;return n&&s?a=e:void 0}})),a);if(t){var o={};for(var n in e)e.hasOwnProperty(n)&&(o[n]=e[n]);o.target=o.rootEl=t,o.preventDefault=void 0,o.stopPropagation=void 0,t[pr]._onDragOver(o)}}var i,r,a},ua=function(e){Ir&&Ir.parentNode[pr]._isOutsideThisEl(e.target)};function da(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=Ti({},t),e[pr]=this;var o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return ra(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==da.supportPointer&&"PointerEvent"in window&&!Ni,emptyInsertThreshold:5};for(var n in fr.initializePlugins(this,e,o),o)!(n in t)&&(t[n]=o[n]);for(var i in aa(t),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!t.forceFallback&&na,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?Vi(e,"pointerdown",this._onTapStart):(Vi(e,"mousedown",this._onTapStart),Vi(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Vi(e,"dragover",this),Vi(e,"dragenter",this)),Jr.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Ti(this,hr())}function pa(e,t,o,n,i,r,a,s){var l,c,u=e[pr],d=u.options.onMove;return!window.CustomEvent||Di||ji?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=t,l.from=e,l.dragged=o,l.draggedRect=n,l.related=i||t,l.relatedRect=r||tr(t),l.willInsertAfter=s,l.originalEvent=a,e.dispatchEvent(l),d&&(c=d.call(u,l,a)),c}function ha(e){e.draggable=!1}function ga(){Qr=!1}function ma(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,o=t.length,n=0;o--;)n+=t.charCodeAt(o);return n.toString(36)}function fa(e){return setTimeout(e,0)}function ya(e){return clearTimeout(e)}da.prototype={constructor:da,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(zr=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,Ir):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,o=this.el,n=this.options,i=n.preventOnFilter,r=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,s=(a||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,c=n.filter;if(function(e){$r.length=0;var t=e.getElementsByTagName("input"),o=t.length;for(;o--;){var n=t[o];n.checked&&$r.push(n)}}(o),!Ir&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||n.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!Ni||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=Yi(s,n.draggable,o,!1))&&s.animated||Sr===s)){if(xr=rr(s),Gr=rr(s,n.draggable),"function"==typeof c){if(c.call(this,e,s,this))return Cr({sortable:t,rootEl:l,name:"filter",targetEl:s,toEl:o,fromEl:o}),vr("filter",t,{evt:e}),void(i&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(n){if(n=Yi(l,n.trim(),o,!1))return Cr({sortable:t,rootEl:n,name:"filter",targetEl:s,fromEl:o,toEl:o}),vr("filter",t,{evt:e}),!0}))))return void(i&&e.cancelable&&e.preventDefault());n.handle&&!Yi(l,n.handle,o,!1)||this._prepareDragStart(e,a,s)}}},_prepareDragStart:function(e,t,o){var n,i=this,r=i.el,a=i.options,s=r.ownerDocument;if(o&&!Ir&&o.parentNode===r){var l=tr(o);if(_r=r,br=(Ir=o).parentNode,Er=Ir.nextSibling,Sr=o,Tr=a.group,da.dragged=Ir,Lr={target:Ir,clientX:(t||e).clientX,clientY:(t||e).clientY},Nr=Lr.clientX-l.left,Br=Lr.clientY-l.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Ir.style["will-change"]="all",n=function(){vr("delayEnded",i,{evt:e}),da.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!Ui&&i.nativeDraggable&&(Ir.draggable=!0),i._triggerDragStart(e,t),Cr({sortable:i,name:"choose",originalEvent:e}),Ki(Ir,a.chosenClass,!0))},a.ignore.split(",").forEach((function(e){$i(Ir,e.trim(),ha)})),Vi(s,"dragover",ca),Vi(s,"mousemove",ca),Vi(s,"touchmove",ca),Vi(s,"mouseup",i._onDrop),Vi(s,"touchend",i._onDrop),Vi(s,"touchcancel",i._onDrop),Ui&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Ir.draggable=!0),vr("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(ji||Di))n();else{if(da.eventCanceled)return void this._onDrop();Vi(s,"mouseup",i._disableDelayedDrag),Vi(s,"touchend",i._disableDelayedDrag),Vi(s,"touchcancel",i._disableDelayedDrag),Vi(s,"mousemove",i._delayedDragTouchMoveHandler),Vi(s,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&Vi(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(n,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Ir&&ha(Ir),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Wi(e,"mouseup",this._disableDelayedDrag),Wi(e,"touchend",this._disableDelayedDrag),Wi(e,"touchcancel",this._disableDelayedDrag),Wi(e,"mousemove",this._delayedDragTouchMoveHandler),Wi(e,"touchmove",this._delayedDragTouchMoveHandler),Wi(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?Vi(document,"pointermove",this._onTouchMove):Vi(document,t?"touchmove":"mousemove",this._onTouchMove):(Vi(Ir,"dragend",this),Vi(_r,"dragstart",this._onDragStart));try{document.selection?fa((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(Hr=!1,_r&&Ir){vr("dragStarted",this,{evt:t}),this.nativeDraggable&&Vi(document,"dragover",ua);var o=this.options;!e&&Ki(Ir,o.dragClass,!1),Ki(Ir,o.ghostClass,!0),da.active=this,e&&this._appendGhost(),Cr({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Dr){this._lastX=Dr.clientX,this._lastY=Dr.clientY,sa();for(var e=document.elementFromPoint(Dr.clientX,Dr.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Dr.clientX,Dr.clientY))!==t;)t=e;if(Ir.parentNode[pr]._isOutsideThisEl(e),t)do{if(t[pr]){if(t[pr]._onDragOver({clientX:Dr.clientX,clientY:Dr.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);la()}},_onTouchMove:function(e){if(Lr){var t=this.options,o=t.fallbackTolerance,n=t.fallbackOffset,i=e.touches?e.touches[0]:e,r=wr&&Qi(wr,!0),a=wr&&r&&r.a,s=wr&&r&&r.d,l=ta&&qr&&ar(qr),c=(i.clientX-Lr.clientX+n.x)/(a||1)+(l?l[0]-Xr[0]:0)/(a||1),u=(i.clientY-Lr.clientY+n.y)/(s||1)+(l?l[1]-Xr[1]:0)/(s||1);if(!da.active&&!Hr){if(o&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))n.right+10||e.clientX<=n.right&&e.clientY>n.bottom&&e.clientX>=n.left:e.clientX>n.right&&e.clientY>n.top||e.clientX<=n.right&&e.clientY>n.bottom+10}(e,i,this)&&!m.animated){if(m===Ir)return G(!1);if(m&&r===e.target&&(a=m),a&&(o=tr(a)),!1!==pa(_r,r,Ir,t,a,o,e,!!a))return k(),r.appendChild(Ir),br=r,R(),G(!0)}else if(m&&function(e,t,o){var n=tr(nr(o.el,0,o.options,!0));return t?e.clientXu+c*r/2:ld-Wr)return-Vr}else if(l>u+c*(1-i)/2&&ld-c*r/2))return l>u+c/2?1:-1;return 0}(e,a,o,i,I?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Kr,zr===a))){var E=rr(Ir);do{E-=y,v=br.children[E]}while(v&&("none"===Xi(v,"display")||v===wr))}if(0===y||v===a)return G(!1);zr=a,Vr=y;var S=a.nextElementSibling,M=!1,P=pa(_r,r,Ir,t,a,o,e,M=1===y);if(!1!==P)return 1!==P&&-1!==P||(M=1===P),Qr=!0,setTimeout(ga,30),k(),M&&!S?r.appendChild(Ir):a.parentNode.insertBefore(Ir,M?S:a),w&&ur(w,0,_-w.scrollTop),br=Ir.parentNode,void 0===A||Kr||(Wr=Math.abs(A-tr(a)[b])),R(),G(!0)}if(r.contains(Ir))return G(!1)}return!1}function x(s,l){vr(s,h,ki({evt:e,isOwner:u,axis:i?"vertical":"horizontal",revert:n,dragRect:t,targetRect:o,canSort:d,fromSortable:p,target:a,completed:G,onMove:function(o,n){return pa(_r,r,Ir,t,o,tr(o),e,n)},changed:R},l))}function k(){x("dragOverAnimationCapture"),h.captureAnimationState(),h!==p&&p.captureAnimationState()}function G(t){return x("dragOverCompleted",{insertion:t}),t&&(u?c._hideClone():c._showClone(h),h!==p&&(Ki(Ir,Or?Or.options.ghostClass:c.options.ghostClass,!1),Ki(Ir,s.ghostClass,!0)),Or!==h&&h!==da.active?Or=h:h===da.active&&Or&&(Or=null),p===h&&(h._ignoreWhileAnimating=a),h.animateAll((function(){x("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(a===Ir&&!Ir.animated||a===r&&!a.animated)&&(zr=null),s.dragoverBubble||e.rootEl||a===document||(Ir.parentNode[pr]._isOutsideThisEl(e.target),!t&&ca(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),g=!0}function R(){kr=rr(Ir),Rr=rr(Ir,s.draggable),Cr({sortable:h,name:"change",toEl:r,newIndex:kr,newDraggableIndex:Rr,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){Wi(document,"mousemove",this._onTouchMove),Wi(document,"touchmove",this._onTouchMove),Wi(document,"pointermove",this._onTouchMove),Wi(document,"dragover",ca),Wi(document,"mousemove",ca),Wi(document,"touchmove",ca)},_offUpEvents:function(){var e=this.el.ownerDocument;Wi(e,"mouseup",this._onDrop),Wi(e,"touchend",this._onDrop),Wi(e,"pointerup",this._onDrop),Wi(e,"touchcancel",this._onDrop),Wi(document,"selectstart",this)},_onDrop:function(e){var t=this.el,o=this.options;kr=rr(Ir),Rr=rr(Ir,o.draggable),vr("drop",this,{evt:e}),br=Ir&&Ir.parentNode,kr=rr(Ir),Rr=rr(Ir,o.draggable),da.eventCanceled||(Hr=!1,Kr=!1,Zr=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),ya(this.cloneId),ya(this._dragStartId),this.nativeDraggable&&(Wi(document,"drop",this),Wi(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ni&&Xi(document.body,"user-select",""),Xi(Ir,"transform",""),e&&(Fr&&(e.cancelable&&e.preventDefault(),!o.dropBubble&&e.stopPropagation()),wr&&wr.parentNode&&wr.parentNode.removeChild(wr),(_r===br||Or&&"clone"!==Or.lastPutMode)&&Mr&&Mr.parentNode&&Mr.parentNode.removeChild(Mr),Ir&&(this.nativeDraggable&&Wi(Ir,"dragend",this),ha(Ir),Ir.style["will-change"]="",Fr&&!Hr&&Ki(Ir,Or?Or.options.ghostClass:this.options.ghostClass,!1),Ki(Ir,this.options.chosenClass,!1),Cr({sortable:this,name:"unchoose",toEl:br,newIndex:null,newDraggableIndex:null,originalEvent:e}),_r!==br?(kr>=0&&(Cr({rootEl:br,name:"add",toEl:br,fromEl:_r,originalEvent:e}),Cr({sortable:this,name:"remove",toEl:br,originalEvent:e}),Cr({rootEl:br,name:"sort",toEl:br,fromEl:_r,originalEvent:e}),Cr({sortable:this,name:"sort",toEl:br,originalEvent:e})),Or&&Or.save()):kr!==xr&&kr>=0&&(Cr({sortable:this,name:"update",toEl:br,originalEvent:e}),Cr({sortable:this,name:"sort",toEl:br,originalEvent:e})),da.active&&(null!=kr&&-1!==kr||(kr=xr,Rr=Gr),Cr({sortable:this,name:"end",toEl:br,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){vr("nulling",this),_r=Ir=br=wr=Er=Mr=Sr=Pr=Lr=Dr=Fr=kr=Rr=xr=Gr=zr=Vr=Or=Tr=da.dragged=da.ghost=da.clone=da.active=null,$r.forEach((function(e){e.checked=!0})),$r.length=jr=Ur=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Ir&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move");e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],o=this.el.children,n=0,i=o.length,r=this.options;n=0;n--)this._layersOrder[n].layer.setZIndex(0)}e.prototype.setMap.call(this,t)},t.prototype.addLayer=function(e,t){var o=this,n=this.getMap();if(t=t||{},e){var i=e.gpLayerId;if(void 0!==i){var r=!1;if(n.getLayers().forEach((function(e){e.gpLayerId===i&&(r=!0)})),r)if(this._layers[i]){for(var a in t)t.hasOwnProperty(a)&&(this._layers[i][a]=t[a]);if(t.title){var s=document.getElementById(this._addUID("GPname_ID_"+i));s&&(s.innerHTML=t.title,s.title=t.description||t.title)}var l=document.getElementById(this._addUID("GPinfo_ID_"+i));if(!document.getElementById(this._addUID("GPinfo_ID_"+i))&&t.description){var c=document.getElementById(this._addUID("GPadvancedTools_ID_"+i));c&&c.appendChild(this._createAdvancedToolInformationElement({id:i}))}l&&"GPlayerInfoOpened"===l.className&&(document.getElementById(this._addUID("GPlayerInfoPanel")).className="GPlayerInfoPanelClosed",l.className="GPlayerInfo")}else{var u=this.getLayerInfo(e)||{},d=e.getOpacity(),p=e.getVisible(),h=this.isInRange(e,n),g={layer:e,id:i,opacity:null!=d?d:1,visibility:null==p||p,inRange:null==h||h,title:null!=t.title?t.title:u._title||i,description:t.description||u._description||null,legends:t.legends||u._legends||[],metadata:t.metadata||u._metadata||[],quicklookUrl:t.quicklookUrl||u._quicklookUrl||null};this._layers[i]=g;var m=this._createLayerDiv(g);this._layers[i].div=m,e.getZIndex&&0!==e.getZIndex()&&void 0!==e.getZIndex()||e._forceNullzIndex?this._updateLayersOrder():(this._layersOrder.unshift(g),this._lastZIndex++,e.setZIndex(this._lastZIndex),this._layerListContainer.insertBefore(m,this._layerListContainer.firstChild)),this._listeners.updateLayerOpacity=e.on("change:opacity",(function(e){return o._updateLayerOpacity(e)})),this._listeners.updateLayerVisibility=e.on("change:visible",(function(e){return o._updateLayerVisibility(e)})),null==this._layers[i].onZIndexChangeEvent&&(this._layers[i].onZIndexChangeEvent=e.on("change:zIndex",(function(){return o._updateLayersOrder()})))}else La.log("[ERROR] LayerSwitcher:addLayer - configuration cannot be set for ",e," layer (layer is not in map.getLayers() )")}else La.trace("[WARN] LayerSwitcher:addLayer - configuration cannot be set for this layer (layer id not found)",e)}else La.log("[ERROR] LayerSwitcher:addLayer - missing layer parameter")},t.prototype.removeLayer=function(e){if(e){Object(Ro.unByKey)(this._listeners.updateLayerOpacity),Object(Ro.unByKey)(this._listeners.updateLayerVisibility),La.trace(e);var t=e.gpLayerId,o=document.getElementById(this._addUID("GPlayersList")),n=document.getElementById(this._addUID("GPinfo_ID_"+t));n&&"GPlayerInfoOpened"===n.className&&(document.getElementById(this._addUID("GPlayerInfoPanel")).className="GPlayerInfoPanelClosed",n.className="GPlayerInfo");var i=document.getElementById(this._addUID("GPlayerSwitcher_ID_"+t));i&&o.removeChild(i);var r=Math.abs(e.getZIndex()-this._lastZIndex);this._layersOrder.splice(r,1),this._lastZIndex--;for(var a=this._layersOrder,s=0;s1&&(t=1),t<0&&(t=0);var o=e.target.gpLayerId,n=document.getElementById(this._addUID("GPopacityValueDiv_ID_"+o));n&&(n.value=Math.round(100*t));var i=document.getElementById(this._addUID("GPopacityValue_ID_"+o));i&&(i.innerHTML=Math.round(100*t)+"%")},t.prototype._onVisibilityLayerClick=function(e){var t=e.target.id,o=Pi.index(t);this._layers[o].layer.setVisible(e.target.checked)},t.prototype._updateLayerVisibility=function(e){var t=e.target.getVisible(),o=e.target.gpLayerId,n=document.getElementById(this._addUID("GPvisibility_ID_"+o));n&&(n.checked=t)},t.prototype._updateLayersOrder=function(){var e=this,t=this.getMap();if(t){var o,n;for(var i in this._layersIndex={},t.getLayers().forEach((function(t){n=t.gpLayerId,Object(Ro.unByKey)(e._layers[n].onZIndexChangeEvent),e._layers[n].onZIndexChangeEvent=null,o=null,void 0!==t.getZIndex&&(o=t.getZIndex(),e._layersIndex[o]&&Array.isArray(e._layersIndex[o])||(e._layersIndex[o]=[]),e._layersIndex[o].push(e._layers[n]))})),this._lastZIndex=0,this._layersOrder=[],this._layersIndex)if(this._layersIndex.hasOwnProperty(i))for(var r=this._layersIndex[i],a=0;ae.getMaxResolution()||o-1},t.prototype._activateEvent=function(e,t){var o=this,n=function(e){dt.onDisplayFeatureInfo(e,o)};"contextmenu"===e?t.getViewport().addEventListener(e,n):t.on(e,n),this._eventsHandler[e]=n,this._events[e]=!0},t.prototype._deactivateEvent=function(e,t){"contextmenu"===e?t.getViewport().removeEventListener(e,this._eventsHandler[e]):t.un(e,this._eventsHandler[e]),delete this._eventsHandler[e],this._events[e]=!1},t.prototype._updateEvents=function(e){e||(e=this.getMap());for(var t=[],o=0;o=0?this._activateEvent(i,e):this._events[i]&&t.indexOf(i)<0&&this._deactivateEvent(i,e)},t.prototype._clearEvents=function(){var e=this.getMap();for(var t in this._events)this._events[t]&&this._deactivateEvent(t,e)},t.prototype._hasLayer=function(e){for(var t=0;t