diff --git a/README.md b/README.md index 2f9d08fc5..b08392bbc 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ *Cool extensions for [OpenLayers](https://github.com/openlayers/openlayers) (ol)*. [![](https://img.shields.io/npm/v/ol-ext.svg)](https://www.npmjs.com/package/ol-ext) +![](https://img.shields.io/github/stars/viglino/ol-ext.svg) ![](https://img.shields.io/npm/dt/ol-ext.svg) ![](https://img.shields.io/npm/dw/ol-ext) ![](https://img.shields.io/npm/l/ol-ext.svg) diff --git a/dist/ol-ext.css b/dist/ol-ext.css index 29d954f05..6ccd09be9 100644 --- a/dist/ol-ext.css +++ b/dist/ol-ext.css @@ -4603,12 +4603,14 @@ ul.ol-legend li div { } .ol-ext-dialog.ol-wmscapabilities form { - max-height: calc(85% - 1em); width: 600px; min-height: 15em; top: 15%; - -webkit-transform: translate(-50%, 0); - transform: translate(-50%, 0); + -webkit-transform: translate(-50%, -15%); + transform: translate(-50%, -15%); +} +.ol-ext-dialog.ol-wmscapabilities .ol-content { + max-height: calc(100vh - 6em); } .ol-ext-dialog.ol-wmtscapabilities [data-param="map"] { diff --git a/dist/ol-ext.js b/dist/ol-ext.js index c32ce9452..790336f30 100644 --- a/dist/ol-ext.js +++ b/dist/ol-ext.js @@ -1,7 +1,7 @@ /** * ol-ext - A set of cool extensions for OpenLayers (ol) in node modules structure * @description ol3,openlayers,popup,menu,symbol,renderer,filter,canvas,interaction,split,statistic,charts,pie,LayerSwitcher,toolbar,animation - * @version v3.2.23 + * @version v3.2.24 * @author Jean-Marc Viglino * @see https://github.com/Viglino/ol-ext#, * @license BSD-3-Clause @@ -1753,6 +1753,59 @@ ol.ext.SVGFilter.Laplacian = function(options) { }; ol.ext.inherits(ol.ext.SVGFilter.Laplacian, ol.ext.SVGFilter); +/* Copyright (c) 2016 Jean-Marc VIGLINO, + released under the CeCILL-B license (French BSD license) + (http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt). +*/ +/** Apply a sobel filter on an image + * @constructor + * @requires ol.filter + * @extends {ol.ext.SVGFilter} + * @param {object} options + * @param {string} [options.id] + * @param {number} [options.scale=1] + * @param {number} [options.ligth=50] light option. 0: darker, 100: lighter + */ +ol.ext.SVGFilter.Paper = function(options) { + options = options || {}; + ol.ext.SVGFilter.call(this, { + id: options.id + }); + this.addOperation({ + feoperation: 'feTurbulence', + numOctaves: 4, + seed: 0, + type: 'fractalNoise', + baseFrequency: 0.2 / (options.scale || 1) + }); + this.addOperation({ + feoperation: 'feDiffuseLighting', + 'lighting-color': 'rgb(255,255,255)', + surfaceScale: 1.5, + kernelUnitLength: 0.01, + diffuseConstant: 1.1000000000000001, + result: 'paper', + operations: [{ + feoperation: 'feDistantLight', + elevation: options.light || 50, + azimuth: 75 + }] + }); + this.addOperation({ + feoperation: 'feBlend', + in: 'SourceGraphic', + in2: 'paper', + mode: 'multiply' + }) +}; +ol.ext.inherits(ol.ext.SVGFilter.Paper, ol.ext.SVGFilter); +/** Set filter light + * @param {number} light light option. 0: darker, 100: lighter + */ +ol.ext.SVGFilter.Paper.prototype.setLight = function(light) { + this.element.querySelector('feDistantLight').setAttribute('elevation', light); +} + /* Copyright (c) 2016 Jean-Marc VIGLINO, released under the CeCILL-B license (French BSD license) (http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt). @@ -11657,6 +11710,7 @@ ol.control.PrintDialog.prototype.paperSize = { 'A2': [420,594], 'A3': [297,420], 'A4': [210,297], + 'US Letter': [215.9,279.4], 'A5': [148,210], 'B4': [257,364], 'B5': [182,257] @@ -11745,7 +11799,13 @@ ol.control.PrintDialog.prototype.setSize = function (size) { else size = this._size; if (!size) return; if (typeof(size) === 'string') { - size = size.toLocaleUpperCase(); + // Test uppercase + for (var k in this.paperSize) { + if (k && new RegExp(k, 'i').test(size)) { + size = k; + } + } + // Default if (!this.paperSize[size]) size = this._size = 'A4'; this._input.size.value = size; size = [ @@ -14896,8 +14956,7 @@ ol.control.SelectPopup.prototype.setValues = function(options) { } }; -/** A control with scroll-driven navigation to create narrative maps - * +/** A control to display status information on top of the map * @constructor * @extends {ol.control.Control} * @param {Object=} options Control options. @@ -18493,7 +18552,7 @@ ol.filter = {}; * * @constructor * @extends {ol.Object} - * @param {Object} options Extend {@link _ol_control_Control_} options. + * @param {Object} options * @param {boolean} [options.active] */ ol.filter.Base = function(options) { @@ -18562,6 +18621,12 @@ function addFilter_(filter) { function removeFilter_(filter) { var i if (!this.filters_) this.filters_ = []; + if (!filter) { + this.filters_.forEach(function(f) { + this.removeFilter(f) + }.bind(this)) + return; + } for (i=this.filters_.length-1; i>=0; i--) { if (this.filters_[i]===filter) this.filters_.splice(i,1); } @@ -19260,12 +19325,13 @@ ol.filter.Crop.prototype.postcompose = function(e) { * @requires ol.filter * @extends {ol.filter.Base} * @param {Object} [options] - * @param {Array} [options.fold] number of fold (horizontal and vertical) - * @param {number} [options.margin] margin in px, default 8 - * @param {number} [options.padding] padding in px, default 8 - * @param {number|number[]} [options.fsize] fold size in px, default 8,10 - * @param {boolean} [options.fill] true to fill the background, default false - * @param {boolean} [options.shadow] true to display shadow, default true + * @param {Array} [options.fold[8,4]] number of fold (horizontal and vertical) + * @param {number} [options.margin=8] margin in px, default 8 + * @param {number} [options.padding=8] padding in px, default 8 + * @param {number|number[]} [options.fsize=[8,10]] fold size in px, default 8,10 + * @param {boolean} [options.fill=false] true to fill the background, default false + * @param {boolean} [options.shadow=true] true to display shadow + * @param {boolean} [options.opacity=.2] effect opacity */ ol.filter.Fold = function(options) { options = options || {}; @@ -19277,6 +19343,7 @@ ol.filter.Fold = function(options) { this.set('fsize', options.fsize || [8,10]); this.set('fill', options.fill); this.set('shadow', options.shadow!==false); + this.set('opacity', (options.hasOwnProperty('opacity') ? options.opacity : .2)); }; ol.ext.inherits(ol.filter.Fold, ol.filter.Base); ol.filter.Fold.prototype.drawLine_ = function(ctx, d, m) { @@ -19339,7 +19406,7 @@ ol.filter.Fold.prototype.postcompose = function(e) { var h = canvas.height/fold[1]; var grd = ctx.createRadialGradient(5*w/8,5*w/8,w/4,w/2,w/2,w); grd.addColorStop(0,"transparent"); - grd.addColorStop(1,"rgba(0,0,0,0.2)"); + grd.addColorStop(1,"rgba(0,0,0," + this.get('opacity') + ")"); ctx.fillStyle = grd; ctx.scale (1,h/w); for (var i=0; i { var selectClusterFeatures = deselectedFeature.get('selectcluserfeatures'); - selectClusterFeatures.forEach(selectClusterFeature => { - this.overlayLayer_.getSource().removeFeature(selectClusterFeature); - }); + if (selectClusterFeatures) { + selectClusterFeatures.forEach(selectClusterFeature => { + this.overlayLayer_.getSource().removeFeature(selectClusterFeature); + }); + } }); } return; @@ -26691,9 +26804,11 @@ ol.interaction.Transform.prototype.setDefaultStyle = function(options) { fill: fill, stroke: stroke, radius: this.isTouch ? 12 : 6, + displacement: this.isTouch ? [24, -24] : [12, -12], points: 15 }); - circle.getAnchor()[0] = this.isTouch ? -10 : -5; + // Old version with no displacement + if (!circle.setDisplacement) circle.getAnchor()[0] = this.isTouch ? -10 : -5; var bigpt = new ol.style.RegularShape({ fill: fill, stroke: stroke, @@ -26741,7 +26856,9 @@ ol.interaction.Transform.prototype.setStyle = function(style, olstyle) { for (var i=0; i} pt points to split the line -* @param {Number} tol distance tolerance for 2 points to be equal -*/ + * @param {ol.Coordinate | Array} pt points to split the line + * @param {Number} tol distance tolerance for 2 points to be equal + */ ol.geom.LineString.prototype.splitAt = function(pt, tol) { var i; if (!pt) return [this]; diff --git a/dist/ol-ext.min.css b/dist/ol-ext.min.css index ab610f7d6..574461f30 100644 --- a/dist/ol-ext.min.css +++ b/dist/ol-ext.min.css @@ -1 +1 @@ -.ol-control i{cursor:default}.ol-control.ol-bar{left:50%;min-height:1em;min-width:1em;position:absolute;top:.5em;transform:translate(-50%,0);-webkit-transform:translate(-50%,0);white-space:nowrap}.ol-control.ol-toggle .ol-option-bar{display:none}.ol-control.ol-bar .ol-control{position:relative;top:auto;left:auto;right:auto;bottom:auto;display:inline-block;vertical-align:middle;background-color:transparent;padding:0;margin:0;transform:none;-webkit-transform:none}.ol-control.ol-bar .ol-rotate button,.ol-control.ol-bar.ol-left .ol-control,.ol-control.ol-bar.ol-right .ol-control{display:block}.ol-control.ol-bar .ol-bar{position:static}.ol-control.ol-bar .ol-control button{margin:2px 1px;outline:0}.ol-control.ol-bar.ol-left{left:.5em;top:50%;-webkit-transform:translate(0,-50%);transform:translate(0,-50%)}.ol-control.ol-bar.ol-right{left:auto;right:.5em;top:50%;-webkit-transform:translate(0,-50%);transform:translate(0,-50%)}.ol-control.ol-bar.ol-bottom{top:auto;bottom:.5em}.ol-control.ol-bar.ol-top.ol-left,.ol-control.ol-bar.ol-top.ol-right{top:4.5em;-webkit-transform:none;transform:none}.ol-touch .ol-control.ol-bar.ol-top.ol-left,.ol-touch .ol-control.ol-bar.ol-top.ol-right{top:5.5em}.ol-control.ol-bar.ol-bottom.ol-left,.ol-control.ol-bar.ol-bottom.ol-right{top:auto;bottom:.5em;-webkit-transform:none;transform:none}.ol-control.ol-bar.ol-group{margin:1px 1px 1px 0}.ol-control.ol-bar.ol-left .ol-group,.ol-control.ol-bar.ol-right .ol-group{margin:1px 1px 0}.ol-control.ol-bar.ol-group button{border-radius:0;margin:0 0 0 1px}.ol-control.ol-bar.ol-left .ol-group button,.ol-control.ol-bar.ol-left.ol-group button,.ol-control.ol-bar.ol-right .ol-group button,.ol-control.ol-bar.ol-right.ol-group button{margin:0 0 1px}.ol-control.ol-bar.ol-group .ol-control:first-child>button{border-radius:5px 0 0 5px}.ol-control.ol-bar.ol-group .ol-control:last-child>button{border-radius:0 5px 5px 0}.ol-control.ol-bar.ol-left .ol-group .ol-control:first-child>button,.ol-control.ol-bar.ol-left.ol-group .ol-control:first-child>button,.ol-control.ol-bar.ol-right .ol-group .ol-control:first-child>button,.ol-control.ol-bar.ol-right.ol-group .ol-control:first-child>button{border-radius:5px 5px 0 0}.ol-control.ol-bar.ol-left .ol-group .ol-control:last-child>button,.ol-control.ol-bar.ol-left.ol-group .ol-control:last-child>button,.ol-control.ol-bar.ol-right .ol-group .ol-control:last-child>button,.ol-control.ol-bar.ol-right.ol-group .ol-control:last-child>button{border-radius:0 0 5px 5px}.ol-control.ol-bar .ol-rotate{opacity:1;visibility:visible}.ol-control.ol-bar .ol-toggle.ol-active button:hover,.ol-control.ol-bar .ol-toggle.ol-active>button{background-color:rgba(60,136,0,.7)}.ol-control.ol-toggle button:disabled{background-color:rgba(0,60,136,.3)}.ol-control.ol-bar .ol-control.ol-option-bar{display:none;position:absolute;top:100%;left:0;margin:5px 0;border-radius:0;background-color:rgba(255,255,255,.8);-webkit-box-shadow:0 0 0 1px rgba(0,60,136,.5),1px 1px 2px rgba(0,0,0,.5);box-shadow:0 0 0 1px rgba(0,60,136,.5),1px 1px 2px rgba(0,0,0,.5)}.ol-control.ol-bar .ol-option-bar:before{content:"";border:.5em solid transparent;border-color:transparent transparent rgba(0,60,136,.5);position:absolute;bottom:100%;left:.3em}.ol-control.ol-bar .ol-option-bar .ol-control{display:table-cell}.ol-control.ol-bar .ol-control .ol-bar{display:none}.ol-control.ol-bar .ol-control.ol-active>.ol-option-bar{display:block}.ol-control.ol-bar .ol-control.ol-collapsed ul{display:none}.ol-control.ol-bar .ol-control.ol-text-button>div,.ol-control.ol-bar .ol-control.ol-text-button>div:hover{background-color:transparent;color:rgba(0,60,136,.5);width:auto;min-width:1.375em;margin:0}.ol-control.ol-bar .ol-control.ol-text-button{font-size:.9em;border-left:1px solid rgba(0,60,136,.8);border-radius:0}.ol-control.ol-bar .ol-control.ol-text-button:first-child{border-left:0}.ol-control.ol-bar .ol-control.ol-text-button>div{padding:.11em .3em;font-weight:400;font-size:1.14em;font-family:Arial,Helvetica,sans-serif}.ol-control.ol-bar .ol-control.ol-text-button div:hover{color:rgba(0,60,136,1)}.ol-control.ol-bar.ol-bottom .ol-option-bar{top:auto;bottom:100%}.ol-control.ol-bar.ol-bottom .ol-option-bar:before{border-color:rgba(0,60,136,.5) transparent transparent;bottom:auto;top:100%}.ol-control.ol-bar.ol-left .ol-option-bar{left:100%;top:0;bottom:auto;margin:0 5px}.ol-control.ol-bar.ol-left .ol-option-bar:before{border-color:transparent rgba(0,60,136,.5) transparent transparent;bottom:auto;right:100%;left:auto;top:.3em}.ol-control.ol-bar.ol-right .ol-option-bar{right:100%;left:auto;top:0;bottom:auto;margin:0 5px}.ol-control.ol-bar.ol-right .ol-option-bar:before{border-color:transparent transparent transparent rgba(0,60,136,.5);bottom:auto;left:100%;top:.3em}.ol-control.ol-bar.ol-left .ol-option-bar .ol-option-bar,.ol-control.ol-bar.ol-right .ol-option-bar .ol-option-bar{top:100%;bottom:auto;left:.3em;right:auto;margin:5px 0}.ol-control.ol-bar.ol-right .ol-option-bar .ol-option-bar{right:.3em;left:auto}.ol-control.ol-bar.ol-left .ol-option-bar .ol-option-bar:before,.ol-control.ol-bar.ol-right .ol-option-bar .ol-option-bar:before{border-color:transparent transparent rgba(0,60,136,.5);bottom:100%;top:auto;left:.3em;right:auto}.ol-control.ol-bar.ol-right .ol-option-bar .ol-option-bar:before{right:.3em;left:auto}.ol-control-title{position:absolute;top:0;left:0;right:0}.ol-center-position{position:absolute;bottom:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);background-color:rgba(255,255,255,.8);padding:.1em 1em}.ol-compassctrl{display:none;top:1em;left:auto;right:1em}.ol-compassctrl.ol-visible{display:block!important}.ol-ext-dialog{position:fixed;top:-100%;left:0;width:150%;height:100%;opacity:0;background-color:rgba(0,0,0,.5);z-index:1000;pointer-events:none!important;-webkit-transition:opacity .2s,top 0s .2s;transition:opacity .2s,top 0s .2s}.ol-ext-dialog.ol-visible{opacity:1;top:0;pointer-events:all!important;-webkit-transition:opacity .2s,top 0s;transition:opacity .2s,top 0s}.ol-viewport .ol-ext-dialog{position:absolute}.ol-ext-dialog>form>h2{margin:0 .5em .5em 0;display:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ol-ext-dialog>form,.ol-ext-dialog>form .ol-content{overflow-y:auto;overflow-x:hidden}.ol-ext-dialog>form.ol-title>h2{display:block}.ol-ext-dialog>form{position:absolute;top:0;left:33.33%;min-width:5em;max-width:60%;min-height:3em;max-height:100%;background-color:#fff;border:1px solid #333;-webkit-box-shadow:3px 3px 4px rgba(0,0,0,.5);box-shadow:3px 3px 4px rgba(0,0,0,.5);-webkit-transform:translate(-50%,-30%);transform:translate(-50%,-30%);-webkit-transition:top .2s,-webkit-transform .2s;transition:top .2s,-webkit-transform .2s;transition:top .2s,transform .2s;transition:top .2s,transform .2s,-webkit-transform .2s;padding:1em;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-ext-dialog>form.ol-closebox{padding-top:1.5em}.ol-ext-dialog>form.ol-title{padding-top:1em}.ol-ext-dialog>form.ol-button{padding-bottom:.5em}.ol-ext-dialog.ol-zoom>form{top:30%;-webkit-transform:translate(-50%,-30%) scale(0);transform:translate(-50%,-30%) scale(0)}.ol-ext-dialog.ol-visible>form{top:30%}.ol-ext-dialog.ol-zoom.ol-visible>form{-webkit-transform:translate(-50%,-30%) scale(1);transform:translate(-50%,-30%) scale(1)}.ol-ext-dialog>form .ol-closebox{position:absolute;top:.5em;right:.5em;width:1em;height:1em;cursor:pointer;display:none}.ol-ext-dialog>form.ol-closebox .ol-closebox{display:block}.ol-ext-dialog>form .ol-closebox:after,.ol-ext-dialog>form .ol-closebox:before{content:"";position:absolute;background-color:currentColor;top:50%;left:50%;width:1em;height:.1em;border-radius:.1em;-webkit-transform:translate(-50%,-50%) rotate(45deg);transform:translate(-50%,-50%) rotate(45deg)}.ol-ext-dialog>form .ol-closebox:before{-webkit-transform:translate(-50%,-50%) rotate(-45deg);transform:translate(-50%,-50%) rotate(-45deg)}.ol-ext-dialog>form .ol-buttons{text-align:right;overflow-x:hidden}.ol-ext-dialog>form .ol-buttons input{margin-top:.5em;padding:.5em;background:0 0;border:0;font-size:1em;color:rgba(0,60,136,1);cursor:pointer;border-radius:.25em;outline-width:0}.ol-ext-dialog>form .ol-buttons input:hover{background-color:rgba(0,60,136,.1)}.ol-ext-dialog>form .ol-buttons input[type=submit]{font-weight:700}.ol-ext-dialog .ol-progress-message{font-size:.9em;text-align:center;padding-bottom:.5em}.ol-ext-dialog .ol-progress-bar{border:1px solid #369;width:20em;height:1em;max-width:100%;padding:2px;margin:.5em auto 0;overflow:hidden}.ol-ext-dialog .ol-progress-bar>div{background:#369;height:100%;width:50%;-webkit-transition:width .3s;transition:width .3s}.ol-ext-dialog .ol-progress-bar>div.notransition{-webkit-transition:unset;transition:unset}.ol-ext-dialog.ol-fullscreen-dialog form{top:1em;-webkit-transform:none;transform:none;left:1em;bottom:1em;right:1em;max-width:calc(66.6% - 2em);text-align:center;background:0 0;-webkit-box-shadow:none;box-shadow:none;border:none;color:#fff}.ol-ext-dialog.ol-fullscreen-dialog form .ol-closebox{top:0;right:0;font-size:2em}.ol-ext-dialog.ol-fullscreen-dialog .ol-closebox:after,.ol-ext-dialog.ol-fullscreen-dialog .ol-closebox:before{border:.1em solid currentColor}.ol-ext-dialog.ol-fullscreen-dialog img,.ol-ext-dialog.ol-fullscreen-dialog video{max-width:100%}body>.ol-ext-dialog .ol-content{max-height:calc(100vh - 10em)}body>.ol-ext-dialog>form{overflow:visible}.ol-editbar .ol-button button{position:relative;display:inline-block;font-style:normal;-webkit-box-sizing:border-box;box-sizing:border-box;vertical-align:middle}.ol-editbar .ol-button button:after,.ol-editbar .ol-button button:before{content:"";border-width:0;position:absolute;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:currentColor}.ol-editbar .ol-button button:focus{outline:0}.ol-editbar .ol-selection>button:before{width:.6em;height:1em;background-color:transparent;border:.5em solid currentColor;border-width:0 .25em .65em;border-color:currentColor transparent;-webkit-box-shadow:0 .6em 0 -.23em;box-shadow:0 .6em 0 -.23em;top:.35em;left:.5em;-webkit-transform:translate(-50%,-50%) rotate(-30deg);transform:translate(-50%,-50%) rotate(-30deg)}.ol-editbar .ol-selection0>button:after{width:.28em;height:.6em;background-color:transparent;border:.5em solid currentColor;border-width:0 .05em .7em;border-color:currentColor transparent;top:.5em;left:.7em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.ol-editbar .ol-delete button:after,.ol-editbar .ol-delete button:before{width:1em;height:.2em;top:50%;left:50%;-webkit-transform:translate(-50%,-50%) rotate(45deg);transform:translate(-50%,-50%) rotate(45deg)}.ol-editbar .ol-delete button:after{-webkit-transform:translate(-50%,-50%) rotate(-45deg);transform:translate(-50%,-50%) rotate(-45deg)}.ol-editbar .ol-info button:before{width:.25em;height:.6em;border-radius:.03em;top:.47em;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ol-editbar .ol-info button:after{width:.25em;height:.2em;border-radius:.03em;-webkit-box-shadow:-.1em .35em,-.1em .82em,.1em .82em;box-shadow:-.1em .35em,-.1em .82em,.1em .82em;top:.12em;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ol-editbar .ol-drawpoint button:before{width:.7em;height:.7em;border-radius:50%;border:.15em solid currentColor;background-color:transparent;top:.2em;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ol-editbar .ol-drawpoint button:after{width:.4em;height:.4em;border:.15em solid currentColor;border-color:currentColor transparent;border-width:.4em .2em 0;background-color:transparent;top:.8em;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ol-editbar .ol-drawhole>button:before,.ol-editbar .ol-drawline>button:before,.ol-editbar .ol-drawpolygon>button:before{width:.8em;height:.8em;border:.13em solid currentColor;background-color:transparent;border-width:.2em .13em .09em;top:.2em;left:.25em;-webkit-transform:rotate(10deg) perspective(1em) rotateX(40deg);transform:rotate(10deg) perspective(1em) rotateX(40deg)}.ol-editbar .ol-drawline>button:before{border-bottom:0}.ol-editbar .ol-drawhole>button:after,.ol-editbar .ol-drawline>button:after,.ol-editbar .ol-drawpolygon>button:after{width:.3em;height:.3em;top:.2em;left:.25em;-webkit-box-shadow:-.2em .55em,.6em .1em,.65em .7em;box-shadow:-.2em .55em,.6em .1em,.65em .7em}.ol-editbar .ol-drawhole>button:after{-webkit-box-shadow:-.2em .55em,.6em .1em,.65em .7em,.25em .35em;box-shadow:-.2em .55em,.6em .1em,.65em .7em,.25em .35em}.ol-editbar .ol-offset>button i,.ol-editbar .ol-transform>button i{position:absolute;width:.9em;height:.9em;overflow:hidden;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ol-editbar .ol-offset>button i{width:.8em;height:.8em}.ol-editbar .ol-offset>button i:before,.ol-editbar .ol-transform>button i:after,.ol-editbar .ol-transform>button i:before{content:"";height:1em;top:50%;left:50%;-webkit-transform:translate(-50%,-50%) rotate(45deg);transform:translate(-50%,-50%) rotate(45deg);-webkit-box-shadow:.5em 0 0 .1em,-.5em 0 0 .1em;box-shadow:.5em 0 0 .1em,-.5em 0 0 .1em;width:.1em;position:absolute;background-color:currentColor}.ol-editbar .ol-offset>button i:before{-webkit-box-shadow:.45em 0 0 .1em,-.45em 0 0 .1em;box-shadow:.45em 0 0 .1em,-.45em 0 0 .1em}.ol-editbar .ol-transform>button i:after{-webkit-transform:translate(-50%,-50%) rotate(-45deg);transform:translate(-50%,-50%) rotate(-45deg)}.ol-editbar .ol-split>button:before{width:.3em;height:.3em;top:.81em;left:.75em;border-radius:50%;-webkit-box-shadow:.1em -.4em,-.15em -.25em;box-shadow:.1em -.4em,-.15em -.25em}.ol-editbar .ol-split>button:after{width:.8em;height:.8em;top:.15em;left:-.1em;border:.1em solid currentColor;border-width:0 .2em .2em 0;background-color:transparent;border-radius:.1em;-webkit-transform:rotate(20deg) scaleY(.6) rotate(-45deg);transform:rotate(20deg) scaleY(.6) rotate(-45deg)}.ol-editbar .ol-drawregular>button:before{width:.9em;height:.9em;top:50%;left:50%;border:.1em solid currentColor;background-color:transparent;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ol-editbar .ol-drawregular .ol-bar .ol-text-button>div>div>div{border:.5em solid currentColor;border-color:transparent currentColor;display:inline-block;cursor:pointer;vertical-align:text-bottom}.ol-control.ol-bar.ol-editbar .ol-drawregular .ol-bar,.ol-editbar .ol-drawregular .ol-bar:before{left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ol-editbar .ol-drawregular .ol-bar .ol-text-button{min-width:6em;text-align:center}.ol-editbar .ol-drawregular .ol-bar .ol-text-button>div>div>div:first-child{border-width:.5em .5em .5em 0;margin:0 .5em 0 0}.ol-editbar .ol-drawregular .ol-bar .ol-text-button>div>div>div:last-child{border-width:.5em 0 .5em .5em;margin:0 0 0 .5em}.ol-gauge{top:.5em;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ol-gauge>*{display:inline-block;vertical-align:middle}.ol-gauge>span{margin:0 .5em}.ol-gauge>div{display:inline-block;width:200px;border:1px solid rgba(0,60,136,.5);border-radius:3px;padding:1px}.ol-gauge button{height:.8em;margin:0;max-width:100%}.ol-control.ol-bookmark{top:.5em;left:3em}.ol-control.ol-bookmark button{position:relative}.ol-control.ol-bookmark>button::before,.ol-control.ol-bookmark>div button:before,.ol-control.ol-geobt button:before{position:absolute;-webkit-transform:translate(-50%,-50%);top:50%}.ol-control.ol-bookmark>button::before{content:"";border-width:10px 5px 4px;border-style:solid;border-color:#fff #fff transparent;left:50%;transform:translate(-50%,-50%);height:0}.ol-control.ol-bookmark>div{display:none;min-width:5em}.ol-control.ol-bookmark input{font-size:.9em;margin:.1em 0;padding:0 .5em}.ol-control.ol-bookmark ul,.ol-gridreference ul{margin:0;padding:0;list-style:none}.ol-control.ol-bookmark ul{min-width:10em}.ol-control.ol-bookmark li{color:rgba(0,60,136,.8);font-size:.9em;padding:0 .2em 0 .5em;cursor:default;clear:both}.ol-control.ol-bookmark li:hover{background-color:rgba(0,60,136,.5);color:#fff}.ol-control.ol-bookmark>div button{width:1em;height:.8em;float:right;background-color:transparent;cursor:pointer;border-radius:0}.ol-control.ol-bookmark>div button:before{content:"\2A2F";color:#936;font-size:1.2em;line-height:1em;border-radius:0;left:50%;transform:translate(-50%,-50%)}.ol-bookmark input,.ol-bookmark ul li button{display:none}.ol-bookmark.ol-editable input,.ol-bookmark.ol-editable ul li button{display:block}.ol-control.ol-geobt{top:auto;left:auto;right:.5em;bottom:3em}.ol-touch .ol-control.ol-geobt{bottom:3.5em}.ol-control.ol-geobt button:before{content:"";background:0 0;left:50%;transform:translate(-50%,-50%);border:.16em solid currentColor;width:.4em;height:.4em;border-radius:50%}.ol-bar.ol-geobar .startBt button:before,.ol-control.ol-geobt button:after{-webkit-transform:translate(-50%,-50%);content:"";position:absolute}.ol-control.ol-geobt button:after{width:.2em;height:.2em;background:0 0;top:50%;left:50%;transform:translate(-50%,-50%);-webkit-box-shadow:.42em 0,-.42em 0,0 .42em,0 -.42em;box-shadow:.42em 0,-.42em 0,0 .42em,0 -.42em}.ol-control.ol-bar.ol-geobar .ol-control{display:inline-block;vertical-align:middle}.ol-control.ol-bar.ol-geobar .ol-bar{display:none}.ol-bar.ol-geobar.ol-active .ol-bar{display:inline-block}.ol-bar.ol-geobar .geolocBt button:after,.ol-bar.ol-geobar .geolocBt button:before{content:"";display:block;position:absolute;border:1px solid transparent;border-width:.3em .8em 0 .2em;border-color:#fff transparent transparent;-webkit-transform:rotate(-30deg);transform:rotate(-30deg);top:.45em;left:.15em;font-size:1.2em}.ol-bar.ol-geobar .geolocBt button:after{border-width:0 .8em .3em .2em;border-color:transparent transparent #fff;-webkit-transform:rotate(-61deg);transform:rotate(-61deg)}.ol-bar.ol-geobar .startBt button:before{display:block;width:1em;height:1em;background-color:#800;border-radius:50%;top:50%;left:50%;transform:translate(-50%,-50%)}.ol-bar.ol-geobar .pauseBt button:after,.ol-bar.ol-geobar .pauseBt button:before{content:"";display:block;position:absolute;width:.25em;height:1em;background-color:#fff;top:50%;left:35%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ol-bar.ol-geobar .pauseBt button:after{left:65%}.ol-bar.ol-geobar.centerTrack .pauseBt,.ol-bar.ol-geobar.centerTrack .startBt,.ol-bar.ol-geobar.centerTrack.pauseTrack .pauseBt,.ol-bar.ol-geobar.pauseTrack .startBt,.ol-control.ol-bar.ol-geobar .centerBt,.ol-control.ol-bar.ol-geobar .pauseBt{display:none}.ol-bar.ol-geobar.centerTrack .centerBt,.ol-bar.ol-geobar.pauseTrack .pauseBt{display:inline-block}.ol-control.ol-globe{position:absolute;left:.5em;bottom:.5em;border-radius:50%;opacity:.7;transform:scale(.5);transform-origin:0 100%;-webkit-transform:scale(.5);-webkit-transform-origin:0 100%}.ol-control.ol-globe:hover{opacity:.9}.ol-control.ol-globe .panel{display:block;width:170px;height:170px;background-color:#fff;cursor:pointer;border-radius:50%;overflow:hidden;-webkit-box-shadow:0 0 10px 5px rgba(255,255,255,.5);box-shadow:0 0 10px 5px rgba(255,255,255,.5)}.ol-control.ol-globe .panel .ol-viewport{border-radius:50%}.ol-control.ol-globe .ol-pointer{display:block;background-color:#fff;width:10px;height:10px;border:10px solid red;position:absolute;top:50%;left:50%;transform:translate(-15px,-40px);-webkit-transform:translate(-15px,-40px);border-radius:50%;z-index:1;transition:opacity .15s,top 0s,left 0s;-webkit-transition:opacity .15s,top 0s,left 0s}.ol-control.ol-globe .ol-pointer::before,.ol-control.ol-globe .panel::after,.ol-control.ol-globe .panel::before{border-radius:50%;content:"";position:absolute}.ol-control.ol-globe .ol-pointer.hidden{opacity:0;transition:opacity .15s,top 3s,left 5s;-webkit-transition:opacity .15s,top 3s,left 5s}.ol-control.ol-globe .ol-pointer::before{-webkit-box-shadow:6px 6px 10px 5px #000;box-shadow:6px 6px 10px 5px #000;display:block;height:0;left:0;top:23px;width:0}.ol-control.ol-globe .ol-pointer::after{content:"";width:0;height:0;display:block;position:absolute;border-width:20px 10px 0;border-color:red transparent;border-style:solid;left:-50%;top:100%}.ol-control.ol-globe .panel::before{-webkit-box-shadow:-20px -20px 80px 2px rgba(0,0,0,.7) inset;box-shadow:-20px -20px 80px 2px rgba(0,0,0,.7) inset;display:block;height:100%;left:0;top:0;width:100%;z-index:1}.ol-control.ol-globe .panel::after{-webkit-box-shadow:0 0 20px 7px rgba(255,255,255,1);box-shadow:0 0 20px 7px rgba(255,255,255,1);display:block;height:0;left:23%;top:20%;-webkit-transform:rotate(-40deg);transform:rotate(-40deg);width:20%;z-index:1}.ol-control.ol-globe.ol-collapsed .panel,.ol-imageline.ol-scroll0.ol-arrow:before,.ol-imageline.ol-scroll1.ol-arrow:after{display:none}.ol-control-top.ol-globe{bottom:auto;top:5em;transform-origin:0 0;-webkit-transform-origin:0 0}.ol-control-right.ol-globe{left:auto;right:.5em;transform-origin:100% 100%;-webkit-transform-origin:100% 100%}.ol-control-right.ol-control-top.ol-globe{left:auto;right:.5em;transform-origin:100% 0;-webkit-transform-origin:100% 0}.ol-gridreference{background:#fff;border:1px solid #000;overflow:auto;max-height:100%;top:0;right:0}.ol-gridreference input{width:100%}.ol-gridreference li{padding:0 .5em;cursor:pointer}.ol-gridreference ul li:hover{background-color:#ccc}.ol-gridreference li.ol-title,.ol-gridreference li.ol-title:hover{background:rgba(0,60,136,.5);color:#fff;cursor:default}.ol-gridreference ul li .ol-ref{margin-left:.5em}.ol-gridreference ul li .ol-ref:before{content:"("}.ol-gridreference ul li .ol-ref:after{content:")"}.ol-control.ol-imageline{bottom:0;left:0;right:0;padding:0;overflow:visible;-webkit-transition:.3s;transition:.3s;border-radius:0}.ol-control.ol-imageline.ol-collapsed{-webkit-transform:translateY(100%);transform:translateY(100%)}.ol-imageline>div{height:4em;position:relative;white-space:nowrap;scroll-behavior:smooth;overflow:hidden;width:100%}.ol-imageline>div.ol-move{scroll-behavior:unset}.ol-control.ol-imageline button{position:absolute;top:-1em;-webkit-transform:translateY(-100%);transform:translateY(-100%);margin:.65em;-webkit-box-shadow:0 0 0 .15em rgba(255,255,255,.4);box-shadow:0 0 0 .15em rgba(255,255,255,.4)}.ol-control.ol-imageline button:before{content:'';position:absolute;-webkit-transform:translate(-50%,-50%) rotate(135deg);transform:translate(-50%,-50%) rotate(135deg);top:40%;left:50%;width:.4em;height:.4em;border:.1em solid currentColor;border-width:.15em .15em 0 0}.ol-control.ol-imageline.ol-collapsed button:before{top:60%;-webkit-transform:translate(-50%,-50%) rotate(-45deg);transform:translate(-50%,-50%) rotate(-45deg)}.ol-imageline,.ol-imageline:hover{background-color:rgba(0,0,0,.75)}.ol-imageline.ol-arrow:after,.ol-imageline.ol-arrow:before{content:"";position:absolute;top:50%;left:.2em;border-color:#fff #000;border-width:1em .6em 1em 0;border-style:solid;-webkit-transform:translateY(-50%);transform:translateY(-50%);z-index:1;opacity:.8;pointer-events:none;-webkit-box-shadow:-.6em 0 0 1em #fff;box-shadow:-.6em 0 0 1em #fff}.ol-imageline.ol-arrow:after{border-width:1em 0 1em .6em;left:auto;right:.2em;-webkit-box-shadow:.6em 0 0 1em #fff;box-shadow:.6em 0 0 1em #fff}.ol-imageline .ol-image{position:relative;height:100%;display:inline-block;cursor:pointer}.ol-imageline img{max-height:100%;border:.25em solid transparent;-webkit-box-sizing:border-box;box-sizing:border-box;opacity:0;-webkit-transition:1s;transition:1s}.ol-imageline img.ol-loaded{opacity:1}.ol-imageline .ol-image.select{background-color:#fff}.ol-imageline .ol-image span{position:absolute;width:125%;max-height:2.4em;left:50%;bottom:0;display:none;color:#fff;background-color:rgba(0,0,0,.5);font-size:.8em;overflow:hidden;white-space:normal;text-align:center;line-height:1.2em;-webkit-transform:translateX(-50%) scaleX(.8);transform:translateX(-50%) scaleX(.8)}.ol-imageline .ol-image:hover span{display:block}.ol-control.ol-routing.ol-isochrone .ol-method-distance,.ol-control.ol-routing.ol-isochrone .ol-method-time,.ol-control.ol-routing.ol-isochrone>button{position:relative}.ol-control.ol-routing.ol-isochrone .ol-method-time:before,.ol-control.ol-routing.ol-isochrone>button:before{content:'';position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);border:.1em solid currentColor;width:.8em;height:.8em;border-radius:50%;-webkit-box-shadow:0 -.5em 0 -.35em,.4em -.35em 0 -.35em;box-shadow:0 -.5em 0 -.35em,.4em -.35em 0 -.35em;clip:unset}.ol-control.ol-routing.ol-isochrone .ol-method-time:after,.ol-control.ol-routing.ol-isochrone>button:after{content:'';position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%) rotate(-60deg);transform:translate(-50%,-50%) rotate(-60deg);border-radius:50%;border:.3em solid transparent;border-right-color:currentColor;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;clip:unset}.ol-control.ol-routing.ol-isochrone .ol-method-distance:before{content:'';position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%) rotate(-30deg);transform:translate(-50%,-50%) rotate(-30deg);width:1em;height:.5em;border:.1em solid currentColor;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-control.ol-routing.ol-isochrone .ol-method-distance:after{content:'';position:absolute;width:.1em;height:.15em;top:50%;left:50%;-webkit-transform:translate(-50%,-50%) rotate(-30deg);transform:translate(-50%,-50%) rotate(-30deg);-webkit-box-shadow:inset 0 -.15em,0 .1em,.25em .1em,-.25em .1em;box-shadow:inset 0 -.15em,0 .1em,.25em .1em,-.25em .1em}.ol-control.ol-routing.ol-isochrone .ol-direction-direct:before,.ol-control.ol-routing.ol-isochrone .ol-direction-reverse:before{content:'';position:absolute;top:50%;left:30%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:.3em;height:.3em;border-radius:50%;border:.1em solid currentColor;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:.25em 0 0 -.05em;box-shadow:.25em 0 0 -.05em}.ol-control.ol-routing.ol-isochrone .ol-direction-direct:after,.ol-control.ol-routing.ol-isochrone .ol-direction-reverse:after{content:'';position:absolute;top:50%;left:70%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);border:.4em solid transparent;border-width:.4em 0 .4em .4em;border-color:transparent currentColor}.ol-control.ol-routing.ol-isochrone .ol-direction-reverse:after{border-width:.4em .4em .4em 0}.ol-control.ol-isochrone.ol-collapsed .content{display:none}.ol-control.ol-isochrone input[type=number]{width:3em;text-align:right;margin:0 .1em}.ol-control.ol-isochrone .ol-distance input[type=number]{width:5em}.ol-isochrone .ol-distance,.ol-isochrone .ol-time{display:none}.ol-isochrone .ol-distance.selected,.ol-isochrone .ol-time.selected{display:block}.ol-control.ol-layerswitcher-popup{position:absolute;right:.5em;text-align:left;top:3em}.ol-control.ol-layerswitcher-popup .panel{clear:both;background:#fff}.ol-layerswitcher-popup .panel{list-style:none;padding:.25em;margin:0;overflow:hidden}.ol-layerswitcher-popup .panel ul{list-style:none;padding:0 0 0 20px;overflow:hidden}.ol-layerswitcher-popup.ol-collapsed .panel{display:none}.ol-layerswitcher-popup.ol-forceopen .panel{display:block}.ol-layerswitcher-popup button{background-color:#fff;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAACE1BMVEX///8A//8AgICA//8AVVVAQID///8rVVVJtttgv98nTmJ2xNgkW1ttyNsmWWZmzNZYxM4gWGgeU2JmzNNr0N1Rwc0eU2VXxdEhV2JqytQeVmMhVmNoydUfVGUgVGQfVGQfVmVqy9hqy9dWw9AfVWRpydVry9YhVmMgVGNUw9BrytchVWRexdGw294gVWQgVmUhVWPd4N6HoaZsy9cfVmQgVGRrytZsy9cgVWQgVWMgVWRsy9YfVWNsy9YgVWVty9YgVWVry9UgVWRsy9Zsy9UfVWRsy9YgVWVty9YgVWRty9Vsy9aM09sgVWRTws/AzM0gVWRtzNYgVWRuy9Zsy9cgVWRGcHxty9bb5ORbxdEgVWRty9bn6OZTws9mydRfxtLX3Nva5eRix9NFcXxOd4JPeINQeIMiVmVUws9Vws9Vw9BXw9BYxNBaxNBbxNBcxdJexdElWWgmWmhjyNRlx9IqXGtoipNpytVqytVryNNrytZsjZUuX210k5t1y9R2zNR3y9V4lp57zth9zdaAnKOGoaeK0NiNpquV09mesrag1tuitbmj1tuj19uktrqr2d2svcCu2d2xwMO63N+7x8nA3uDC3uDFz9DK4eHL4eLN4eIyYnDX5OM5Z3Tb397e4uDf4uHf5uXi5ePi5+Xj5+Xk5+Xm5+Xm6OY6aHXQ19fT4+NfhI1Ww89gx9Nhx9Nsy9ZWw9Dpj2abAAAAWnRSTlMAAQICAwQEBgcIDQ0ODhQZGiAiIyYpKywvNTs+QklPUlNUWWJjaGt0dnd+hIWFh4mNjZCSm6CpsbW2t7nDzNDT1dje5efr7PHy9PT29/j4+Pn5+vr8/f39/f6DPtKwAAABTklEQVR4Xr3QVWPbMBSAUTVFZmZmhhSXMjNvkhwqMzMzMzPDeD+xASvObKePPa+ffHVl8PlsnE0+qPpBuQjVJjno6pZpSKXYl7/bZyFaQxhf98hHDKEppwdWIW1frFnrxSOWHFfWesSEWC6R/P4zOFrix3TzDFLlXRTR8c0fEEJ1/itpo7SVO9Jdr1DVxZ0USyjZsEY5vZfiiAC0UoTGOrm9PZLuRl8X+Dq1HQtoFbJZbv61i+Poblh/97TC7n0neCcK0ETNUrz1/xPHf+DNAW9Ac6t8O8WH3Vp98f5lCaYKAOFZMLyHL4Y0fe319idMNgMMp+zWVSybUed/+/h7I4wRAG1W6XDy4XmjR9HnzvDRZXUAYDFOhC1S/Hh+fIXxen+eO+AKqbs+wAo30zDTDvDxKoJN88sjUzDFAvBzEUGFsnADoIvAJzoh2BZ8sner+Ke/vwECuQAAAABJRU5ErkJggg==);background-position:center;background-repeat:no-repeat;float:right;height:38px;width:38px}.ol-layerswitcher-popup li{color:#369;padding:.25em 1em;font-family:"Trebuchet MS",Helvetica,sans-serif;cursor:pointer}.ol-layerswitcher-popup li.ol-header{display:none}.ol-layerswitcher-popup li.ol-visible,.ol-layerswitcher-popup li.select{background:rgba(0,60,136,.7);color:#fff}.ol-layerswitcher-popup li:hover{background:rgba(0,60,136,.9);color:#fff}.ol-control.ol-layerswitcher.ol-layer-shop{height:calc(100% - 4em);max-height:unset;max-width:16em;background-color:transparent;pointer-events:none!important;overflow:visible}.ol-control.ol-layerswitcher>*{pointer-events:auto}.ol-control.ol-layer-shop .panel-container,.ol-control.ol-layer-shop>button{-webkit-box-shadow:0 0 0 3px rgba(255,255,255,.5);box-shadow:0 0 0 3px rgba(255,255,255,.5)}.ol-control.ol-layerswitcher.ol-layer-shop .panel-container{overflow-y:scroll;max-height:calc(100% - 6.5em);border:2px solid #369;border-width:2px 0;padding:0}.ol-control.ol-layer-shop .panel{padding:0;-webkit-box-sizing:border-box;box-sizing:border-box;margin:.25em .5em}.ol-control.ol-layerswitcher.ol-layer-shop .panel-container.ol-scrolldiv{overflow:hidden}.ol-control.ol-layer-shop .ol-scroll{background-color:rgba(0,0,0,.3);opacity:.5}.ol-layerswitcher.ol-layer-shop ul.panel li.ol-header{display:none}.ol-layerswitcher.ol-layer-shop ul.panel li{margin-right:0;padding-right:0}.ol-layerswitcher.ol-layer-shop .layerup{height:1.5em;width:1.4em;margin:0;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:3px;background-color:transparent;color:rgba(0,60,136,1)}.ol-layerswitcher.ol-layer-shop .layerup:hover{background-color:rgba(0,60,136,.3)}.ol-layerswitcher.ol-layer-shop .layerup:before{top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);border:0;background-color:currentColor;width:1em;height:2px;-webkit-box-shadow:0 -4px,0 4px;box-shadow:0 -4px,0 4px}.ol-layerswitcher.ol-layer-shop .layerup:after{content:unset}.ol-control.ol-layer-shop .ol-title-bar{background-color:rgba(255,255,255,.5);font-size:.9em;height:calc(2.8em - 4px);max-width:14.6em;padding:.7em .5em;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right;-webkit-transform:scaleY(1.1);transform:scaleY(1.1);-webkit-transition:width 0s,-webkit-transform .1s;transition:width 0s,-webkit-transform .1s;transition:transform .1s,width 0s;transition:transform .1s,width 0s,-webkit-transform .1s;-webkit-transform-origin:100% 0;transform-origin:100% 0}.ol-control.ol-layer-shop:hover .ol-title-bar{background-color:rgba(255,255,255,.7)}.ol-control.ol-layer-shop.ol-collapsed .ol-title-bar{max-width:10em;-webkit-transform:scale(.9,1.1);transform:scale(.9,1.1)}.ol-control.ol-layer-shop.ol-forceopen .ol-title-bar{max-width:14.6em;-webkit-transform:scaleY(1.1);transform:scaleY(1.1)}.ol-control.ol-layer-shop .ol-bar{position:relative;height:1.75em;clear:both;-webkit-box-shadow:0 0 0 3px rgba(255,255,255,.5);box-shadow:0 0 0 3px rgba(255,255,255,.5);background-color:#fff;text-align:right;z-index:10}.ol-control.ol-layer-shop.ol-collapsed .ol-bar,.ol-control.ol-layer-shop.ol-collapsed .ol-scroll{border-width:2px 0 0;display:none}.ol-control.ol-layer-shop.ol-forceopen .ol-bar,.ol-control.ol-layer-shop.ol-forceopen .ol-scroll{display:block}.ol-control.ol-layer-shop .ol-bar>*{font-size:.9em;display:inline-block;vertical-align:middle;margin-top:.25em;background-color:transparent}.ol-layer-shop .ol-bar .ol-button,.ol-touch .ol-layer-shop .ol-bar .ol-button{position:relative;top:unset;left:unset;bottom:unset;right:unset;margin:0}.ol-layer-shop .ol-bar button{background-color:#fff;color:rgba(0,60,136,1)}.ol-layer-shop .ol-bar button:hover{background-color:rgba(0,60,136,.2)}.ol-touch .ol-layerswitcher.ol-layer-shop>button{font-size:1.7em}.ol-touch .ol-layer-shop .ol-bar{height:2em}.ol-touch .ol-layer-shop .ol-control button{font-size:1.4em}.ol-touch .ol-control.ol-layer-shop .panel{max-height:calc(100% - 7em)}.ol-touch .ol-control.ol-layer-shop .panel label{height:1.8em}.ol-touch .ol-control.ol-layer-shop .panel label span{margin-left:.5em;padding-top:.25em}.ol-touch .ol-control.ol-layer-shop .panel label:after,.ol-touch .ol-control.ol-layer-shop .panel label:before{font-size:1.3em;z-index:1}.ol-control.ol-layerswitcher{position:absolute;right:.5em;text-align:left;top:3em;max-height:calc(100% - 6em);-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.ol-control.ol-layerswitcher .ol-switcherbottomdiv,.ol-control.ol-layerswitcher .ol-switchertopdiv{display:block;position:absolute;top:0;left:0;right:0;height:45px;background:#fff;z-index:2;opacity:1;cursor:pointer;border-top:2px solid transparent;border-bottom:2px solid #369;margin:0 2px;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-control.ol-layerswitcher.ol-collapsed .ol-switcherbottomdiv,.ol-control.ol-layerswitcher.ol-collapsed .ol-switchertopdiv{display:none}.ol-layerswitcher.ol-forceopen.ol-collapsed .ol-switcherbottomdiv,.ol-layerswitcher.ol-forceopen.ol-collapsed .ol-switchertopdiv{display:block}.ol-control.ol-layerswitcher .ol-switcherbottomdiv{top:auto;bottom:0;height:2em;border-top:2px solid #369;border-bottom:2px solid transparent}.ol-control.ol-layerswitcher .ol-switcherbottomdiv:before,.ol-control.ol-layerswitcher .ol-switchertopdiv:before{content:"";position:absolute;left:50%;top:50%;border:10px solid transparent;width:0;height:0;transform:translate(-50%,-50%);-webkit-transform:translate(-50%,-50%);opacity:.8}.ol-control.ol-layerswitcher .ol-switcherbottomdiv:hover:before,.ol-control.ol-layerswitcher .ol-switchertopdiv:hover:before{opacity:1}.ol-control.ol-layerswitcher .ol-switchertopdiv:before{border-bottom-color:#369;border-top:0}.ol-control.ol-layerswitcher .ol-switcherbottomdiv:before{border-top-color:#369;border-bottom:0}.ol-control.ol-layerswitcher .panel-container{background-color:#fff;border-radius:0 0 2px 2px;clear:both;display:block;padding:.5em .5em 0}.ol-layerswitcher .panel{list-style:none;padding:0;margin:0;overflow:hidden;font-family:Tahoma,Geneva,sans-serif;font-size:.9em;-webkit-transition:top .3s;transition:top .3s;position:relative;top:0}.ol-layerswitcher .panel ul{list-style:none;padding:0 0 0 20px;overflow:hidden;clear:both}.ol-layerswitcher input[type=radio],.ol-layerswitcher input[type=checkbox]{display:none}.ol-layerswitcher .panel li{-weblit-transition:-webkit-transform .2s linear;-webkit-transition:-webkit-transform .2s linear;transition:-webkit-transform .2s linear;transition:transform .2s linear;transition:transform .2s linear,-webkit-transform .2s linear;clear:both;display:block;border:1px solid transparent;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-layerswitcher .panel li.ol-layer-select{background-color:rgba(0,60,136,.2);margin:0 -.5em;padding:0 .5em}.ol-layerswitcher .panel li.drag{opacity:.5;transform:scale(.8);-webkit-transform:scale(.8)}.ol-dragover{background:rgba(51,102,153,.5);opacity:.8}.forbidden .layerswitcher-opacity div,.forbidden .ol-layerswitcher-buttons div,.ol-layerswitcher .panel li.forbidden{background:rgba(255,0,0,.5);color:red!important}.ol-layerswitcher.drag,.ol-layerswitcher.drag *{cursor:not-allowed!important;cursor:no-drop!important}.ol-layerswitcher.drag .panel li.dropover,.ol-layerswitcher.drag .panel li.dropover *{cursor:pointer!important;cursor:n-resize!important;cursor:ns-resize!important;cursor:-webkit-grab!important;cursor:grab!important;cursor:-webkit-grabbing!important;cursor:grabbing!important}.ol-layerswitcher .panel li.dropover{background:rgba(51,102,153,.5)}.ol-layerswitcher .panel li label{display:inline-block;height:1.4em;max-width:12em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:0 0 0 1.7em;position:relative}.ol-layerswitcher .panel li label span{display:inline-block;width:100%;height:100%;overflow:hidden;text-overflow:ellipsis;padding-right:.2em}.ol-layerswitcher [type=radio]+label:before,.ol-layerswitcher [type=radio]:checked+label:after,.ol-layerswitcher [type=checkbox]+label:before,.ol-layerswitcher [type=checkbox]:checked+label:after{content:'';position:absolute;left:.1em;top:.1em;width:1.2em;height:1.2em;border:2px solid #369;background:#fff;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-layerswitcher [type=radio]+label:after,.ol-layerswitcher [type=radio]+label:before{border-radius:50%}.ol-layerswitcher [type=radio]:checked+label:after{background:#369;margin:.3em;width:.6em;height:.6em}.ol-layerswitcher [type=checkbox]:checked+label:after{background:0 0;border-width:0 3px 3px 0;border-style:solid;border-color:#369;width:.7em;height:1em;-webkit-transform:rotate(45deg);transform:rotate(45deg);left:.55em;top:-.05em;-webkit-box-shadow:1px 0 1px 1px #fff;box-shadow:1px 0 1px 1px #fff}.ol-layerswitcher .panel li.ol-layer-hidden{opacity:.6}.ol-layerswitcher.ol-collapsed .panel-container{display:none}.ol-layerswitcher.ol-forceopen .panel-container{display:block}.ol-layerswitcher>button{background-color:#fff;float:right;z-index:10;position:relative;font-size:1.7em}.ol-touch .ol-layerswitcher>button{font-size:2.5em}.ol-layerswitcher>button:after,.ol-layerswitcher>button:before{content:"";position:absolute;width:.75em;height:.75em;border-radius:.15em;-webkit-transform:scaleY(.8) rotate(45deg);transform:scaleY(.8) rotate(45deg)}.ol-layerswitcher>button:before{background:#e2e4e1;top:.32em;left:.34em;-webkit-box-shadow:.1em .1em #325158;box-shadow:.1em .1em #325158}.ol-layerswitcher>button:after{top:.22em;left:.34em;background:#83bcc5;background-image:radial-gradient(circle at .85em .6em,#70b3be 0,#70b3be .65em,#83bcc5 .65em)}.ol-layerswitcher-buttons{display:block;float:right;text-align:right}.ol-layerswitcher .panel li>div,.ol-layerswitcher-buttons>div{display:inline-block;position:relative}.ol-layerswitcher-buttons>div{cursor:pointer;height:1em;width:1em;margin:2px;line-height:1em;text-align:center;background:#369;vertical-align:middle;color:#fff}.ol-layerswitcher .ol-separator{display:block;width:0;height:0;padding:0;margin:0}.ol-layerswitcher .layerup{float:right;height:2.5em;background-color:#369;opacity:.5;cursor:move;cursor:ns-resize}.ol-layerswitcher .layerup:after,.ol-layerswitcher .layerup:before{border-color:#fff transparent;border-style:solid;border-width:.4em .4em 0;content:"";height:0;position:absolute;bottom:3px;left:.1em;width:0}.ol-layerswitcher .layerup:after{border-width:0 .4em .4em;top:3px;bottom:auto}.ol-layerswitcher .layerInfo{background:#369;border-radius:100%}.ol-layerswitcher .layerInfo:before{color:#fff;content:"i";display:block;font-size:.8em;font-weight:700;text-align:center;width:1.25em;position:absolute;left:0;top:0}.ol-layerswitcher .layerTrash{background:#369}.ol-layerswitcher .layerTrash:before{color:#fff;content:"\00d7";font-size:1em;top:50%;left:0;right:0;text-align:center;line-height:1em;margin:-.5em 0;position:absolute}.ol-layerswitcher .layerExtent{background:#369}.ol-layerswitcher .layerExtent:before{border-right:1px solid #fff;border-bottom:1px solid #fff;content:"";display:block;position:absolute;left:6px;right:2px;top:6px;bottom:3px}.ol-layerswitcher .layerExtent:after{border-left:1px solid #fff;border-top:1px solid #fff;content:"";display:block;position:absolute;bottom:6px;left:2px;right:6px;top:3px}.ol-layerswitcher .collapse-layers,.ol-layerswitcher .expend-layers{margin:0 2px;background-color:transparent}.ol-layerswitcher .collapse-layers:before,.ol-layerswitcher .expend-layers:before{content:"";position:absolute;top:50%;left:0;margin-top:-2px;height:4px;width:100%;background:#369}.ol-layerswitcher .expend-layers:after{content:"";position:absolute;left:50%;top:0;margin-left:-2px;width:4px;height:100%;background:#369}.ol-layerswitcher .layerswitcher-opacity{position:relative;border:1px solid #369;height:3px;width:120px;margin:5px 1em 10px 7px;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:3px;background:#69c;background:-webkit-gradient(linear,left top,right top,from(rgba(0,60,136,0)),to(rgba(0,60,136,.6)));background:linear-gradient(to right,rgba(0,60,136,0),rgba(0,60,136,.6));cursor:pointer;-webkit-box-shadow:1px 1px 1px rgba(0,0,0,.5);box-shadow:1px 1px 1px rgba(0,0,0,.5)}.ol-layerswitcher .layerswitcher-opacity .layerswitcher-opacity-cursor,.ol-layerswitcher .layerswitcher-opacity .layerswitcher-opacity-cursor:before{position:absolute;width:20px;height:20px;top:50%;left:50%;background:rgba(0,60,136,.5);border-radius:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);z-index:1}.ol-layerswitcher-image button,.ol-permalink button{background-position:center;background-repeat:no-repeat}.ol-layerswitcher .layerswitcher-opacity .layerswitcher-opacity-cursor:before{content:"";position:absolute;width:50%;height:50%}.ol-touch .ol-layerswitcher .layerswitcher-opacity .layerswitcher-opacity-cursor{width:26px;height:26px}.ol-layerswitcher .layerswitcher-opacity-label{display:none;position:absolute;right:-2.5em;bottom:5px;font-size:.8em}.ol-layerswitcher .layerswitcher-opacity-label::after{content:"%"}.ol-layerswitcher .layerswitcher-progress{display:block;margin:-4px 1em 2px 7px;width:120px}.ol-layerswitcher .layerswitcher-progress div{background-color:#369;height:2px;display:block;width:0}.ol-control.ol-layerswitcher-image{position:absolute;right:.5em;text-align:left;top:1em;transition:all .2s ease 0s;-webkit-transition:all .2s ease 0s}.ol-control.ol-layerswitcher-image.ol-collapsed{top:3em;-webkit-transition:none;transition:none}.ol-layerswitcher-image .panel{list-style:none;padding:.25em;margin:0;overflow:hidden}.ol-layerswitcher-image .panel ul{list-style:none;padding:0 0 0 20px;overflow:hidden}.ol-layerswitcher-image.ol-collapsed .panel{display:none}.ol-layerswitcher-image.ol-forceopen .panel{display:block;clear:both}.ol-layerswitcher-image button{background-color:#fff;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAACE1BMVEX///8A//8AgICA//8AVVVAQID///8rVVVJtttgv98nTmJ2xNgkW1ttyNsmWWZmzNZYxM4gWGgeU2JmzNNr0N1Rwc0eU2VXxdEhV2JqytQeVmMhVmNoydUfVGUgVGQfVGQfVmVqy9hqy9dWw9AfVWRpydVry9YhVmMgVGNUw9BrytchVWRexdGw294gVWQgVmUhVWPd4N6HoaZsy9cfVmQgVGRrytZsy9cgVWQgVWMgVWRsy9YfVWNsy9YgVWVty9YgVWVry9UgVWRsy9Zsy9UfVWRsy9YgVWVty9YgVWRty9Vsy9aM09sgVWRTws/AzM0gVWRtzNYgVWRuy9Zsy9cgVWRGcHxty9bb5ORbxdEgVWRty9bn6OZTws9mydRfxtLX3Nva5eRix9NFcXxOd4JPeINQeIMiVmVUws9Vws9Vw9BXw9BYxNBaxNBbxNBcxdJexdElWWgmWmhjyNRlx9IqXGtoipNpytVqytVryNNrytZsjZUuX210k5t1y9R2zNR3y9V4lp57zth9zdaAnKOGoaeK0NiNpquV09mesrag1tuitbmj1tuj19uktrqr2d2svcCu2d2xwMO63N+7x8nA3uDC3uDFz9DK4eHL4eLN4eIyYnDX5OM5Z3Tb397e4uDf4uHf5uXi5ePi5+Xj5+Xk5+Xm5+Xm6OY6aHXQ19fT4+NfhI1Ww89gx9Nhx9Nsy9ZWw9Dpj2abAAAAWnRSTlMAAQICAwQEBgcIDQ0ODhQZGiAiIyYpKywvNTs+QklPUlNUWWJjaGt0dnd+hIWFh4mNjZCSm6CpsbW2t7nDzNDT1dje5efr7PHy9PT29/j4+Pn5+vr8/f39/f6DPtKwAAABTklEQVR4Xr3QVWPbMBSAUTVFZmZmhhSXMjNvkhwqMzMzMzPDeD+xASvObKePPa+ffHVl8PlsnE0+qPpBuQjVJjno6pZpSKXYl7/bZyFaQxhf98hHDKEppwdWIW1frFnrxSOWHFfWesSEWC6R/P4zOFrix3TzDFLlXRTR8c0fEEJ1/itpo7SVO9Jdr1DVxZ0USyjZsEY5vZfiiAC0UoTGOrm9PZLuRl8X+Dq1HQtoFbJZbv61i+Poblh/97TC7n0neCcK0ETNUrz1/xPHf+DNAW9Ac6t8O8WH3Vp98f5lCaYKAOFZMLyHL4Y0fe319idMNgMMp+zWVSybUed/+/h7I4wRAG1W6XDy4XmjR9HnzvDRZXUAYDFOhC1S/Hh+fIXxen+eO+AKqbs+wAo30zDTDvDxKoJN88sjUzDFAvBzEUGFsnADoIvAJzoh2BZ8sner+Ke/vwECuQAAAABJRU5ErkJggg==);float:right;height:38px;width:38px;display:none}.ol-layerswitcher-image.ol-collapsed button{display:block;position:relative}.ol-layerswitcher-image li{border-radius:4px;border:3px solid transparent;-webkit-box-shadow:1px 1px 4px rgba(0,0,0,.5);box-shadow:1px 1px 4px rgba(0,0,0,.5);display:inline-block;width:64px;height:64px;margin:2px;position:relative;background-color:#fff;overflow:hidden;vertical-align:middle;cursor:pointer}.ol-layerswitcher-image li p,.ol-layerswitcher-image li.ol-header{display:none}.ol-layerswitcher-image li.ol-layer-hidden{opacity:.5;border-color:#555}.ol-layerswitcher-image li img{position:absolute;max-width:100%}.ol-layerswitcher-image li.ol-visible,.ol-layerswitcher-image li.select{border:3px solid red}.ol-layerswitcher-image li:hover p{background-color:rgba(0,0,0,.5);color:#fff;bottom:0;display:block;left:0;margin:0;overflow:hidden;position:absolute;right:0;text-align:center;height:1.2em;font-family:Verdana,Geneva,sans-serif;font-size:.8em}.ol-control.ol-legend{bottom:.5em;left:.5em;z-index:1;max-height:90%;max-width:90%;overflow-x:hidden;overflow-y:auto}.ol-control.ol-legend.ol-collapsed{overflow:hidden}.ol-control.ol-legend button{position:relative;display:none}.ol-control.ol-legend.ol-collapsed button{display:block}.ol-control.ol-legend.ol-uncollapsible button{display:none}.ol-control.ol-legend button.ol-closebox{display:block;position:absolute;top:0;right:0;background:0 0;cursor:pointer;z-index:1}.ol-control.ol-legend.ol-collapsed button.ol-closebox,.ol-control.ol-legend.ol-uncollapsible button.ol-closebox{display:none}.ol-control.ol-legend button.ol-closebox:before{content:"\D7";background:0 0;color:rgba(0,60,136,.5);font-size:1.3em}.ol-control.ol-legend button.ol-closebox:hover:before{color:rgba(0,60,136,1)}.ol-control.ol-legend .ol-legendImg{display:block}.ol-control.ol-legend.ol-collapsed .ol-legendImg{display:none}.ol-control.ol-legend.ol-uncollapsible .ol-legendImg{display:block}.ol-control.ol-legend>button:first-child:after,.ol-control.ol-legend>button:first-child:before{content:"";position:absolute;top:.25em;left:.2em;width:.2em;height:.2em;background-color:currentColor;-webkit-box-shadow:0 .35em,0 .7em;box-shadow:0 .35em,0 .7em}.ol-control.ol-legend button:first-child:after{top:.27em;left:.55em;height:.15em;width:.6em}ul.ol-legend{position:absolute;top:0;left:0;width:100%;margin:0;padding:0;list-style:none}.ol-control.ol-legend.ol-collapsed ul{display:none}.ol-control.ol-legend.ol-uncollapsible ul{display:block}.ol-control.ol-legend .ol-legend,ul.ol-legend li div{display:inline-block}ul.ol-legend li.ol-title{text-align:center;font-weight:700}ul.ol-legend li.ol-title>div:first-child{width:0!important}ul.ol-legend li{overflow:hidden;padding:0;white-space:nowrap}ul.ol-legend li div{vertical-align:middle}.ol-control.ol-legend.ol-collapsed .ol-legend{display:none}.ol-control.ol-mapzone{position:absolute;right:.5em;text-align:left;top:.5em;max-height:calc(100% - 6em);-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.ol-control.ol-mapzone.ol-collapsed{top:3em}.ol-control.ol-mapzone button{position:relative;float:right;margin-top:2.2em}.ol-touch .ol-control.ol-mapzone button{margin-top:1.67em}.ol-control.ol-mapzone.ol-collapsed button{margin-top:0}.ol-control.ol-mapzone button i{border:.1em solid currentColor;border-radius:50%;width:.9em;height:.9em;overflow:hidden;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ol-control.ol-mapzone button i:before{content:"";background-color:currentColor;width:.4em;height:.4em;position:absolute;left:.5em;top:.3em;border-radius:50%;-webkit-box-shadow:.05em .3em 0 -.051em currentColor,-.05em -.35em 0 -.1em currentColor,-.5em -.35em 0 0 currentColor,-.65em .1em 0 -.03em currentColor,-.65em -.05em 0 -.05em currentColor;box-shadow:.05em .3em 0 -.051em currentColor,-.05em -.35em 0 -.1em currentColor,-.5em -.35em 0 0 currentColor,-.65em .1em 0 -.03em currentColor,-.65em -.05em 0 -.05em currentColor}.ol-mapzone>div{position:relative;display:inline-block;width:5em;height:5em;margin:0 .2em 0 0}.ol-control.ol-mapzone.ol-collapsed>div,.ol-overlay{display:none}.ol-mapzone>div p{margin:0;position:absolute;bottom:0;color:#fff;font-weight:700;text-align:center;width:160%;overflow:hidden;font-family:'Lucida Grande',Verdana,Geneva,Lucida,Arial,Helvetica,sans-serif;-webkit-transform:scaleX(.625);transform:scaleX(.625);-webkit-transform-origin:0 0;transform-origin:0 0;cursor:default}.ol-notification{width:150%;bottom:0;border:0;background:0 0;margin:0;padding:0}.ol-notification>div,.ol-notification>div:hover{position:absolute;background-color:rgba(0,0,0,.8);color:#fff;bottom:0;left:33.33%;max-width:calc(66% - 4em);min-width:5em;max-height:5em;min-height:1em;border-radius:4px 4px 0 0;padding:.2em .5em;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transform:translateX(-50%);transform:translateX(-50%);-webkit-transition:.3s;transition:.3s;opacity:1}.ol-notification.ol-collapsed>div{bottom:-5em;opacity:0}.ol-notification a{color:#9cf;cursor:pointer}.ol-notification .ol-close,.ol-notification .ol-close:hover{padding-right:1.5em}.ol-notification .closeBox{position:absolute;top:0;right:.3em}.ol-notification .closeBox:before{content:'\00d7'}.ol-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.4);padding:1em;color:#fff;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:1;opacity:0;cursor:default;overflow:hidden;-webkit-transition:all .5s;transition:all .5s;pointer-events:none}.ol-overlay.stretch,.ol-overlay.stretchy,.ol-overlay.zoom,.ol-overlay.zoomrotate{top:50%;left:50%;opacity:.5}.ol-overlay.slide-up{transform:translateY(100%);-webkit-transform:translateY(100%)}.ol-overlay.slide-down{-webkit-transform:translateY(-100%);transform:translateY(-100%)}.ol-overlay.slide-left{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.ol-overlay.slide-right{-webkit-transform:translateX(100%);transform:translateX(100%)}.ol-overlay.zoom{-webkit-transform:translate(-50%,-50%) scale(0);transform:translate(-50%,-50%) scale(0)}.ol-overlay.zoomout{-webkit-transform:scale(3);transform:scale(3)}.ol-overlay.zoomrotate{-webkit-transform:translate(-50%,-50%) scale(0) rotate(360deg);transform:translate(-50%,-50%) scale(0) rotate(360deg)}.ol-overlay.stretch{-webkit-transform:translate(-50%,-50%) scaleX(0);transform:translate(-50%,-50%) scaleX(0)}.ol-overlay.stretchy{-webkit-transform:translate(-50%,-50%) scaleY(0);transform:translate(-50%,-50%) scaleY(0)}.ol-overlay.wipe{opacity:1}.ol-overlay.flip{-webkit-transform:perspective(600px) rotateY(180deg);transform:perspective(600px) rotateY(180deg)}.ol-overlay.card{opacity:.5;-webkit-transform:translate(-80%,100%) rotate(-.5turn);transform:translate(-80%,100%) rotate(-.5turn)}.ol-overlay.book{-webkit-transform:perspective(600px) rotateY(-180deg) scaleX(.6);transform:perspective(600px) rotateY(-180deg) scaleX(.6);-webkit-transform-origin:10% 50%;transform-origin:10% 50%}.ol-overlay.book.visible{-webkit-transform-origin:10% 50%;transform-origin:10% 50%}.ol-overlay.ol-visible{opacity:1;top:0;left:0;right:0;bottom:0;-webkit-transform:none;transform:none;pointer-events:all}.ol-overlay .ol-closebox{position:absolute;top:1em;right:1em;width:1em;height:1em;cursor:pointer;z-index:1}.ol-overlay .ol-closebox:before{content:"\274c";display:block;text-align:center;vertical-align:middle}.ol-overlay .ol-fullscreen-image{position:absolute;top:0;left:0;bottom:0;right:0}.ol-overlay .ol-fullscreen-image img{position:absolute;max-width:100%;max-height:100%;-webkit-box-sizing:border-box;box-sizing:border-box;padding:1em;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ol-overlay .ol-fullscreen-image.ol-has-title img{padding-bottom:3em}.ol-overlay .ol-fullscreen-image p{background-color:rgba(0,0,0,.5);padding:.5em;position:absolute;left:0;right:0;bottom:0;margin:0;text-align:center}.ol-control.ol-overview{position:absolute;left:.5em;text-align:left;bottom:.5em}.ol-control.ol-overview .panel{display:block;width:150px;height:150px;margin:2px;background-color:#fff;border:1px solid #369;cursor:pointer}.ol-overview:not(.ol-collapsed) button{position:absolute;bottom:2px;left:2px;z-index:2}.ol-control.ol-overview.ol-collapsed .panel{display:none}.ol-overview.ol-collapsed button:before{content:'\00bb'}.ol-control-right.ol-overview.ol-collapsed button:before,.ol-overview button:before{content:'\00ab'}.ol-control-right.ol-overview{left:auto;right:.5em}.ol-control-right.ol-overview:not(.ol-collapsed) button{left:auto;right:2px}.ol-control-right.ol-overview button:before{content:'\00bb'}.ol-control-top.ol-overview{bottom:auto;top:5em}.ol-control-top.ol-overview:not(.ol-collapsed) button{bottom:auto;top:2px}.ol-permalink{position:absolute;top:.5em;right:2.5em}.ol-touch .ol-permalink{right:3em}.ol-permalink button{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AcFBjYE1ZK03gAAAUlJREFUOMuVk71KA1EQhc/NaiP+gCRpFHwGBSFlCrFVfAsbwSJCBMv06QIGJOBziI3EYAgkjU8gIloIAasIn4WzMqx34zrN7J6de+6ZmbNSgQDSfADcATPgHbgCyvonSYv8KEzWdofegH3gwmG9Ikq67sAESFzNueHThTyiEIKAmr2OJCUhhO30Aou+5aUQU2Ik65K2JC1KegohPGfUBkmvksqShnntHEcGOs60NXHfjmKz6czZTsNqbhzW+muwY2ATWAWawCOwBgxcTfvnvCPxKx4Cy5bPgBWgauRpdL2ImNlGhp3MabETm8mh94nDk4yCNE5/KTGg7xxbyhYAG0AN2AEqURIDZ0a0Fxn+LXAPXDpzRqMk6cOedz1ubdYl1b6NHgZRJe72nuu/CdSBl+yKi/zZlTnbaeXOJIesClwDU+ATeEhtX5TkCwAWUyAsHH1QAAAAAElFTkSuQmCC)}.ol-control.ol-print{top:.5em;left:3em}.ol-control.ol-print button:after,.ol-control.ol-print button:before{left:50%;position:absolute;content:"";-webkit-transform:translateX(-50%)}.ol-control.ol-print button:before{width:.9em;height:.35em;top:50%;transform:translateX(-50%);-webkit-box-shadow:inset 0 0 0 .1em,inset .55em 0,0 .2em 0 -.1em;box-shadow:inset 0 0 0 .1em,inset .55em 0,0 .2em 0 -.1em}.ol-control.ol-print button:after{width:.7em;height:.6em;top:25%;transform:translateX(-50%);-webkit-box-shadow:inset 0 0 0 .15em;box-shadow:inset 0 0 0 .15em}.ol-ext-print-dialog{width:100%;height:100%}.ol-ext-print-dialog>form .ol-closebox{right:auto;left:16.5em;z-index:1;color:#999}.ol-ext-print-dialog .ol-content[data-status=printing]{opacity:.5}.ol-ext-print-dialog .ol-content .ol-error{display:none;background:#b00;color:#ff0;text-align:center;padding:1em .5em;font-weight:700;margin:0 -1em}.ol-ext-print-dialog .ol-content[data-status=error] .ol-error{display:block}.ol-ext-print-dialog.ol-visible>form,.ol-ext-print-dialog>form{-webkit-transition:none;transition:none;top:1em;left:1em;bottom:1em;right:1em;-webkit-transform:none;transform:none;max-width:100%;max-height:100%;background-color:#eee;padding:0}.ol-ext-print-dialog .ol-print-map{position:absolute;top:0;bottom:0;right:0;width:calc(100% - 18em);overflow:hidden}.ol-ext-print-dialog .ol-print-map .ol-page{position:absolute;left:50%;top:50%;background:#fff;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-ext-print-dialog .ol-print-map .ol-page.margin{-webkit-box-sizing:content-box;box-sizing:content-box}.ol-ext-print-dialog .ol-map{width:100%;height:100%}.ol-ext-print-dialog .ol-print-map .ol-control{display:none!important}.ol-ext-print-dialog .ol-print-param{position:absolute;overflow-x:hidden;top:0;bottom:0;left:0;width:18em;background-color:#fff;padding:1em;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-ext-print-dialog .ol-print-param h2{display:block;color:rgba(0,60,136,.7);font-size:1.1em}.ol-ext-print-dialog .ol-print-param ul{padding:0;list-style:none}.ol-ext-print-dialog .ol-print-param li{position:relative;margin:.5em 0;font-size:.9em}.ol-ext-print-dialog .ol-print-param li.hidden{display:none}.ol-ext-print-dialog .ol-print-param label{width:8em;display:inline-block;vertical-align:middle}.ol-ext-print-dialog select{outline:0;vertical-align:middle}.ol-ext-print-dialog .ol-orientation{text-align:center}.ol-ext-print-dialog .ol-orientation label{position:relative;width:7em;cursor:pointer}.ol-ext-print-dialog .ol-orientation input{position:absolute;opacity:0;width:0;height:0}.ol-ext-print-dialog .ol-orientation span{position:relative;width:80%;display:block;padding:3.5em 0 .2em}.ol-ext-print-dialog .ol-orientation span:before{content:"";position:absolute;width:2em;height:2.6em;bottom:1.5em;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);color:#333;background-color:currentColor;border:1px solid currentColor;border-radius:0 1em 0 0;opacity:.5;overflow:hidden;-webkit-box-shadow:inset 1.3em -1.91em #ddd;box-shadow:inset 1.3em -1.91em #ddd}.ol-ext-print-dialog .ol-orientation .landscape span:before{width:2.6em;height:2em;margin:.2em 0;-webkit-box-shadow:inset 1.91em -1.3em #ddd;box-shadow:inset 1.91em -1.3em #ddd}.ol-ext-print-dialog .ol-orientation input:checked+span{opacity:1;-webkit-box-shadow:0 0 .2em rgba(0,0,0,.5);box-shadow:0 0 .2em rgba(0,0,0,.5)}.ol-ext-print-dialog .ol-ext-toggle-switch span{position:absolute;right:-2em;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.ol-print-title input[type=text]{margin-top:.5em;width:calc(100% - 6em);margin-left:6em}.ol-ext-print-dialog .ol-size option:first-child{font-style:italic}.ol-ext-print-dialog .ol-saveas,.ol-ext-print-dialog .ol-savelegend{text-align:center}.ol-ext-print-dialog .ol-saveas select,.ol-ext-print-dialog .ol-savelegend select{background-color:rgba(0,60,136,.7);color:#fff;padding:.5em;margin:1em 0 0;font-size:1em;border:0;font-weight:700;max-width:12em}.ol-ext-print-dialog .ol-saveas select option,.ol-ext-print-dialog .ol-savelegend select option{background-color:#fff;color:#666}.ol-ext-print-dialog .ol-savelegend select{margin-top:0}.ol-ext-print-dialog .ol-ext-buttons{text-align:right;border-top:1px solid #ccc;padding:.8em .5em;margin:0 -1em}.ol-ext-print-dialog button{font-size:1em;margin:0 .2em;border:1px solid #999;background:0 0;padding:.3em 1em;color:#333}.ol-ext-print-dialog button[type=submit]{background-color:rgba(0,60,136,.7);color:#fff;font-weight:700}.ol-ext-print-dialog .ol-clipboard-copy{position:absolute;pointer-events:none;top:0;background-color:rgba(0,0,0,.5);color:#fff;padding:.5em 1em;border-radius:1em;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;-webkit-transition:0s;transition:0s;opacity:0}.ol-ext-print-dialog .ol-clipboard-copy.visible{-webkit-animation:1s ol-clipboard-copy;animation:1s ol-clipboard-copy}.ol-ext-print-dialog .ol-print-map .ol-control.ol-canvas-control,.ol-ext-print-dialog .ol-print-map .ol-control.ol-print-compass{display:block!important}.ol-ext-print-dialog .ol-print-map .ol-control.olext-print-compass{top:0;right:0;width:60px;height:60px;margin:20px}@-webkit-keyframes ol-clipboard-copy{0%{opacity:0;top:0}80%{opacity:1;top:-3em}100%{opacity:0;top:-3em}}@keyframes ol-clipboard-copy{0%{opacity:0;top:0}80%{opacity:1;top:-3em}100%{opacity:0;top:-3em}}@media print{body.ol-print-document{margin:0!important;padding:0!important}body.ol-print-document>*{display:none!important}body.ol-print-document>.ol-ext-print-dialog{display:block!important}.ol-ext-print-dialog,.ol-ext-print-dialog>form{position:unset;-webkit-box-shadow:none;box-shadow:none;background:0 0!important;border:0}.ol-ext-print-dialog .ol-print-param,.ol-ext-print-dialog>form>*{display:none!important;background:0 0}.ol-ext-print-dialog .ol-content{display:block!important;border:0;background:0 0}.ol-ext-print-dialog .ol-print-map{position:unset;background:0 0;width:auto;overflow:visible}.ol-ext-print-dialog .ol-print-map .ol-page{-webkit-transform:none!important;transform:none!important;-webkit-box-shadow:none!important;box-shadow:none!important;position:unset}}@media (max-width:25em){.ol-ext-print-dialog .ol-print-param{width:13em}.ol-ext-print-dialog .ol-print-map{width:calc(100% - 13em)}.ol-ext-print-dialog .ol-print-param .ol-print-title input[type=text]{width:100%;margin:0}}.ol-profil{position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ol-control.ol-profil{position:absolute;top:.5em;right:3em;text-align:right;overflow:hidden}.ol-profil .ol-zoom-out{position:absolute;top:10px;right:10px;width:1em;height:1em;padding:0;border:1px solid #000;border-radius:2px;cursor:pointer}.ol-profil .ol-zoom-out:before{content:'';height:2px;width:60%;background:currentColor;position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ol-profil .ol-inner{position:relative;padding:.5em;font-size:.8em}.ol-control.ol-profil .ol-inner{display:block;background-color:rgba(255,255,255,.7);margin:2.3em 2px 2px}.ol-control.ol-profil.ol-collapsed .ol-inner{display:none}.ol-profil canvas{display:block}.ol-profil button{display:block;position:absolute;right:2px;background-position:center;background-repeat:no-repeat;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAPCAYAAAALWoRrAAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AgXCR4dn7j9TAAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAz0lEQVQ4y7WTMU4CURRFz0xIpLUBEhdAY2tJYW1jaWlsXYVxDWyBhWCFCYugYgnDFPMOhTMJGf3AwHiqn/uTk5v/3gfAH6b0RH7sMiIe1Ts162z+q2lVVbd1XqijLuJk0zzP1/VxCGyApLgsy+HJphGx8DeFOm6L1bn6eVQaEW+m2amTRqx+1fkqKY2Ie0+zUx/U7WGYfNMsy57PmMMN8A1MWsWeUoPyivV8PWtPOzL7D+lYHfUtBXgHGLTCJfBxodD6k9Dsm8BLE17LobQ39nJC61aLVoVsAAAAAElFTkSuQmCC)}.ol-profil.ol-collapsed button{position:static}.ol-profil .ol-profilbar,.ol-profil .ol-profilcursor{position:absolute;pointer-events:none;width:1px;display:none}.ol-profil .ol-profilcursor{width:0;height:0}.ol-profil .ol-profilcursor:before{content:"";pointer-events:none;display:block;margin:-2px;width:5px;height:5px}.ol-profil .ol-profilbar,.ol-profil .ol-profilcursor:before{background:red}.ol-profil table{text-align:center;width:100%}.ol-profil table span{display:block}.ol-profilpopup{background-color:rgba(255,255,255,.5);margin:.5em;padding:0 .5em;position:absolute;top:-1em;white-space:nowrap}.ol-profilpopup.ol-left{right:0}.ol-profil table td{padding:0 2px}.ol-profil table .track-info{display:table-row}.ol-profil .over table .track-info,.ol-profil table .point-info{display:none}.ol-profil .over table .point-info{display:table-row}.ol-profil p{text-align:center;margin:0}.ol-control.ol-progress-bar{position:absolute;top:0;bottom:0;left:0;right:0;padding:0;pointer-events:none!important;background-color:transparent}.ol-control.ol-progress-bar>.ol-bar{position:absolute;background-color:rgba(0,60,136,.5);left:0;bottom:0;height:.5em;width:0;-webkit-transition:width .2s;transition:width .2s;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-progress-bar>.ol-waiting{display:none}.ol-viewport .ol-control.ol-progress-bar>.ol-waiting{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);color:#fff;font-size:2em;display:block;-webkit-animation:1s linear infinite ol-progress-bar-blink;animation:1s linear infinite ol-progress-bar-blink}@-webkit-keyframes ol-progress-bar-blink{0%,30%{visibility:hidden}100%{visibility:visible}}@keyframes ol-progress-bar-blink{0%,30%{visibility:hidden}100%{visibility:visible}}.ol-control.ol-routing{top:.5em;left:3em;max-height:90%;overflow-y:auto}.ol-touch .ol-control.ol-routing{left:3.5em}.ol-control.ol-routing.ol-searching{opacity:.5}.ol-control.ol-routing .ol-car,.ol-control.ol-routing>button{position:relative}.ol-control.ol-routing .ol-car:after,.ol-control.ol-routing>button:after{content:"";position:absolute;width:.78em;height:.6em;border-radius:40% 50% 0 0/50% 70% 0 0;-webkit-box-shadow:inset 0 0 0 .065em,-.35em .14em 0 -.09em,inset 0 -.37em,inset -.14em .005em;box-shadow:inset 0 0 0 .065em,-.35em .14em 0 -.09em,inset 0 -.37em,inset -.14em .005em;clip:rect(0 1em .5em -1em);top:.35em;left:.4em}.ol-control.ol-routing .ol-car:before,.ol-control.ol-routing>button:before{content:"";position:absolute;width:.28em;height:.28em;border-radius:50%;-webkit-box-shadow:inset 0 0 0 1em,.65em 0;box-shadow:inset 0 0 0 1em,.65em 0;top:.73em;left:.2em}.ol-control.ol-routing .ol-pedestrian:after{content:"";position:absolute;width:.3em;height:.4em;top:.25em;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);-webkit-box-shadow:inset .3em 0,.1em .5em 0 -.1em,-.1em .5em 0 -.1em,.25em .1em 0 -.1em,-.25em .1em 0 -.1em;box-shadow:inset .3em 0,.1em .5em 0 -.1em,-.1em .5em 0 -.1em,.25em .1em 0 -.1em,-.25em .1em 0 -.1em;border-top:.2em solid transparent}.ol-control.ol-routing .ol-pedestrian:before{content:"";position:absolute;width:.3em;height:.3em;top:.1em;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);border-radius:50%;background-color:currentColor}.ol-control.ol-routing.ol-collapsed .content,.ol-routing .ol-search ul .copy,.ol-routing .ol-search.ol-collapsed ul{display:none}.ol-routing .content .search-input>div>*{display:inline-block;vertical-align:top}.ol-routing .ol-result ul{list-style:none;display:block}.ol-routing .ol-result li{position:relative;min-height:1.65em}.ol-control.ol-search>button:after,.ol-control.ol-search>button:before,.ol-routing .ol-result li:after,.ol-routing .ol-result li:before{content:"";position:absolute}.ol-routing .ol-result li i{display:block;font-size:.8em;font-weight:700}.ol-routing .ol-result li:before{border:5px solid transparent;left:-1.75em;border-bottom-color:#369;border-width:.6em .4em;-webkit-transform-origin:50% 125%;transform-origin:50% 125%;-webkit-box-shadow:0 .65em 0 -.25em #369;box-shadow:0 .65em 0 -.25em #369;top:-.8em}.ol-routing .ol-result li:after{width:.3em;height:.6em;left:-1.5em;background:#369;top:.6em}.ol-routing .ol-result li.R:before{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.ol-routing .ol-result li.FR:before{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ol-routing .ol-result li.L:before{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.ol-routing .ol-result li.FL:before{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.ol-routing .content>i{vertical-align:middle;margin:0 .3em 0 .1em;font-style:normal}.ol-routing .ol-button,.ol-routing .ol-button:focus,.ol-routing .ol-car,.ol-routing .ol-pedestrian{font-size:1.1em;position:relative;display:inline-block;width:1.4em;height:1.4em;color:rgba(0,60,136,1);background-color:transparent;margin:0 .1em;opacity:.5;vertical-align:middle;outline:0;cursor:pointer}.ol-routing .ol-button.selected,.ol-routing .ol-button:hover,.ol-routing i.selected{opacity:1;background:0 0}.ol-control.ol-routing:hover{background-color:rgba(255,255,255,.85)}.search-input>div>button:before{content:'\00b1'}.ol-viewport .ol-scale{left:.5em;bottom:2.5em;text-align:center;-webkit-transform:scaleX(.8);-webkit-transform-origin:0 0;transform:scaleX(.8);transform-origin:0 0}.ol-viewport .ol-scale input{background:0 0;border:0;width:8em;text-align:center}.ol-search{top:.5em;left:3em}.ol-touch .ol-search{left:3.5em}.ol-search button{top:2px;left:2px;float:left}.ol-control.ol-search>button:before{-webkit-box-sizing:border-box;box-sizing:border-box;width:.7em;height:.7em;background-color:transparent;border:.12em solid currentColor;border-radius:100%;top:.35em;left:.35em}.ol-control.ol-search>button:after{top:1.1em;left:.95em;width:.45em;height:.15em;background-color:currentColor;border-radius:.05em;-webkit-transform:rotate(45deg);transform:rotate(45deg);-webkit-box-shadow:-.18em 0 0 -.03em;box-shadow:-.18em 0 0 -.03em}.ol-search button.ol-revers{float:none;background-image:none;display:inline-block;vertical-align:bottom;position:relative;top:0;left:0}.ol-input-popup.ol-fixed.ol-left .ol-popup,.ol-input-slider.ol-fixed.ol-left .ol-popup,.ol-search ul li img{float:left}.ol-search button.ol-revers:after,.ol-search button.ol-revers:before{content:"";left:50%;top:50%;position:absolute}.ol-search.ol-revers button.ol-revers{background-color:rgba(0,136,60,.5)}.ol-control.ol-search.ol-collapsed button.ol-revers{display:none}.ol-search button.ol-revers:before{border:.1em solid currentColor;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);border-radius:50%;width:.55em;height:.55em;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-search button.ol-revers:after{-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:.2em;height:.2em;background-color:transparent;-webkit-box-shadow:.35em 0 currentColor,0 .35em currentColor,-.35em 0 currentColor,0 -.35em currentColor;box-shadow:.35em 0 currentColor,0 .35em currentColor,-.35em 0 currentColor,0 -.35em currentColor}.ol-search input{display:inline-block;border:0;margin:1px 1px 1px 2px;font-size:1.14em;padding-left:.3em;height:1.375em;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all .1s;transition:all .1s}.ol-touch .ol-search input,.ol-touch .ol-search ul{font-size:1.5em}.ol-control.ol-search.ol-collapsed>*,.ol-search.ol-revers>ul{display:none}.ol-control.ol-search.ol-collapsed>button,.ol-search ul{display:block}.ol-search ul{list-style:none;padding:0;margin:0;clear:both;cursor:pointer;max-width:17em;overflow-x:hidden;z-index:1;background:#fff}.ol-search ul li{padding:.1em .5em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ol-search ul li.select,.ol-search ul li:hover{background-color:rgba(0,60,136,.5);color:#fff}.ol-search ul li img{max-height:2em}.ol-search li.copy{background:rgba(0,0,0,.5);color:#fff}.ol-search li.copy a{color:#fff;text-decoration:none}.ol-search.searching:before{content:'';position:absolute;height:3px;left:0;top:1.6em;-webkit-animation:pulse .5s infinite alternate linear;animation:pulse .5s infinite alternate linear;background:red;z-index:2}@-webkit-keyframes pulse{0%{left:0;right:95%}50%{left:30%;right:30%}100%{left:95%;right:0}}@keyframes pulse{0%{left:0;right:95%}50%{left:30%;right:30%}100%{left:95%;right:0}}.ol-search.IGNF-parcelle input{width:13.5em}.ol-search.IGNF-parcelle input:-moz-read-only{background:#ccc;opacity:.8}.ol-search.IGNF-parcelle input:read-only{background:#ccc;opacity:.8}.ol-search.IGNF-parcelle.ol-collapsed-list>ul.autocomplete{display:none}.ol-search.IGNF-parcelle label{display:block;clear:both}.ol-search.IGNF-parcelle>div input,.ol-search.IGNF-parcelle>div label{width:5em;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;margin:.1em;font-size:1em}.ol-search.IGNF-parcelle ul.autocomplete-page{margin-top:.5em;width:100%;text-align:center;display:none}.ol-search.IGNF-parcelle.ol-collapsed-list ul.autocomplete-page,.ol-search.IGNF-parcelle.ol-collapsed-list ul.autocomplete-parcelle{display:block}.ol-search.IGNF-parcelle ul.autocomplete-parcelle,.ol-search.IGNF-parcelle.ol-collapsed ul.autocomplete-page,.ol-search.IGNF-parcelle.ol-collapsed ul.autocomplete-parcelle{display:none}.ol-search.IGNF-parcelle ul.autocomplete-page li{display:inline-block;color:#fff;background:rgba(0,60,136,.5);border-radius:50%;width:1.3em;height:1.3em;padding:.1em;margin:0 .1em}.ol-search.IGNF-parcelle ul.autocomplete-page li.selected{background:rgba(0,60,136,1)}.ol-searchgps input.search{display:none}.ol-control.ol-searchgps>button:first-child{background-image:none}.ol-control.ol-searchgps>button:first-child:before{content:"x/y";position:unset;display:block;-webkit-transform:scaleX(.8);transform:scaleX(.8);border:unset;border-radius:0;width:auto;height:auto}.ol-control.ol-searchgps>button:first-child:after{content:unset}.ol-control.ol-select>button:after,.ol-searchgps button.ol-geoloc:after,.ol-searchgps button.ol-geoloc:before{content:"";position:absolute}.ol-control.ol-searchgps .ol-latitude,.ol-control.ol-searchgps .ol-longitude{clear:both}.ol-control.ol-searchgps .ol-latitude label,.ol-control.ol-searchgps .ol-longitude label{width:5.5em;display:inline-block;text-align:right;-webkit-transform:scaleX(.8);transform:scaleX(.8);margin:0 -.8em 0 0;-webkit-transform-origin:0 0;transform-origin:0 0}.ol-control.ol-searchgps .ol-latitude input,.ol-control.ol-searchgps .ol-longitude input{max-width:10em}.ol-control.ol-searchgps .ol-ext-toggle-switch{cursor:pointer;float:right;margin:.5em;font-size:.9em}.ol-searchgps .ol-decimal{display:inline-block;margin-right:.7em}.ol-searchgps .ol-dms,.ol-searchgps.ol-dms .ol-decimal{display:none;width:3em;text-align:right}.ol-searchgps.ol-dms .ol-dms{display:inline-block}.ol-searchgps span.ol-dms{width:.5em;text-align:left}.ol-searchgps.ol-control.ol-collapsed button.ol-geoloc{display:none}.ol-searchgps button.ol-geoloc{top:0;float:right;margin-right:3px;background-image:none;position:relative}.ol-searchgps button.ol-geoloc:before{left:50%;top:50%;width:.6em;height:.6em;border:.1em solid currentColor;border-radius:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ol-searchgps button.ol-geoloc:after{left:50%;top:50%;width:.2em;height:.2em;background-color:transparent;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-box-shadow:.45em 0 currentColor,-.45em 0 currentColor,0 -.45em currentColor,0 .45em currentColor,.25em 0 currentColor,-.25em 0 currentColor,0 -.25em currentColor,0 .25em currentColor;box-shadow:.45em 0 currentColor,-.45em 0 currentColor,0 -.45em currentColor,0 .45em currentColor,.25em 0 currentColor,-.25em 0 currentColor,0 -.25em currentColor,0 .25em currentColor}.ol-control.ol-select{top:.5em;left:3em}.ol-touch .ol-control.ol-select{left:3.5em}.ol-control.ol-select>button:before{content:"A";font-size:.6em;font-weight:400;position:absolute;-webkit-box-sizing:content-box;box-sizing:content-box;width:1em;height:1em;background-color:transparent;border:.2em solid currentColor;border-radius:100%;top:.5em;left:.5em;line-height:1em;text-align:center}.ol-control.ol-select>button:after{top:1.15em;left:1em;width:.45em;height:.15em;background-color:currentColor;border-radius:.05em;-webkit-transform:rotate(45deg);transform:rotate(45deg);-webkit-box-shadow:-.18em 0 0 -.03em;box-shadow:-.18em 0 0 -.03em}.ol-select>div button{width:auto;padding:0 .5em;float:right;font-weight:400}.ol-select .ol-delete{width:1.5em;height:1em;vertical-align:middle;display:inline-block;position:relative;cursor:pointer}.ol-select .ol-delete:before{content:'\00d7';position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:100%;text-align:center;font-weight:700}.ol-control.ol-select input{font-size:1em}.ol-control.ol-select select{font-size:1em;max-width:10em}.ol-control.ol-select select option.ol-default{color:#999;font-style:italic}.ol-control.ol-select>div{display:block}.ol-control.ol-select.ol-collapsed>div{display:none}.ol-control.ol-select.ol-select-check{max-width:20em}.ol-control.ol-select label.ol-ext-check{margin-right:1em}.ol-control.ol-select label.ol-ext-toggle-switch span{font-size:1.1em}.ol-select ul{list-style:none;margin:0;padding:0}.ol-control.ol-select input[type=text],.ol-control.ol-select input[type=search]{width:8em}.ol-select .ol-autocomplete{display:inline}.ol-select .ol-autocomplete ul{position:absolute;display:block;background:#fff;border:1px solid #999;min-width:10em;font-size:.85em}.ol-select ul.ol-hidden,.ol-select-multi li>div .ol-ok,.ol-select-multi li>div>button{display:none}.ol-select .ol-autocomplete ul li{padding:0 .5em}.ol-select .ol-autocomplete ul li:hover{color:#fff;background:rgba(0,60,136,.5)}.ol-select-multi li>div.ol-control.ol-select,.ol-select-multi li>div:hover{position:relative;top:unset;left:unset;background:0 0}.ol-select-multi li .ol-control.ol-select.ol-collapsed>div,.ol-select-multi li>div>div{display:block}.ol-control.ol-status{top:0;left:0;background:rgba(0,0,0,.2);color:#fff;font-size:.9em;padding:.3em 3em;border-radius:0;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;pointer-events:none!important;display:none}.ol-control.ol-status.ol-visible{display:initial}.ol-control.ol-status.ol-bottom{top:auto;bottom:0}.ol-control.ol-status.ol-left{top:0;bottom:0;padding:.3em .5em .3em 3em;width:auto}.ol-control.ol-status.ol-right{top:0;bottom:0;left:auto;right:0;padding:.3em 3em .3em .5em;width:auto}.ol-control.ol-status.ol-center{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.ol-control.ol-storymap{top:.5em;left:.5em;bottom:.5em;max-width:35%;border-radius:.5em;position:absolute;height:auto}.ol-storymap,.ol-storymap>div{padding:0;height:100%;position:relative;overflow:hidden}.ol-storymap>div{scroll-behavior:smooth;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ol-storymap>div.ol-move{scroll-behavior:unset}.ol-control.ol-storymap .chapter{padding:.5em}.ol-storymap .chapter{cursor:pointer;opacity:.4}.ol-storymap .chapter.ol-select{cursor:default;opacity:1}.ol-storymap .ol-scroll-next,.ol-storymap .ol-scroll-top{position:relative;min-height:1.7em;color:rgba(0,60,136,.5);text-align:center;cursor:pointer}.ol-storymap .ol-scroll-next span{padding-bottom:1.4em;display:block}.ol-storymap .ol-scroll-top span{padding-top:1.4em;display:block}.ol-storymap .ol-scroll-next:before,.ol-storymap .ol-scroll-top:before{content:"";border:.3em solid currentColor;border-radius:.3em;border-color:transparent currentColor currentColor transparent;width:.8em;height:.8em;display:block;position:absolute;left:50%;-webkit-transform:translateX(-50%) rotate(45deg);transform:translateX(-50%) rotate(45deg);-webkit-animation:ol-bounce-bottom .35s linear infinite alternate;animation:ol-bounce-bottom .35s linear infinite alternate;pointer-events:none}.ol-storymap .ol-scroll-top:before{border-color:currentColor transparent transparent currentColor;-webkit-animation:ol-bounce-top .35s linear infinite alternate;animation:ol-bounce-top .35s linear infinite alternate}@-webkit-keyframes ol-bounce-top{from{top:-.2em}to{top:.5em}}@keyframes ol-bounce-top{from{top:-.2em}to{top:.5em}}@-webkit-keyframes ol-bounce-bottom{from{bottom:-.2em}to{bottom:.5em}}@keyframes ol-bounce-bottom{from{bottom:-.2em}to{bottom:.5em}}.ol-storymap img[data-title]{cursor:pointer}.ol-swipe{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-ms-touch-action:none;touch-action:none}.ol-swipe:before{content:"";position:absolute;top:-5000px;bottom:-5000px;left:50%;width:4px;background:#fff;z-index:-1;-webkit-transform:translate(-2px,0);transform:translate(-2px,0)}.ol-swipe.horizontal:before{left:-5000px;right:-5000px;top:50%;bottom:auto;width:auto;height:4px}.ol-swipe,.ol-swipe button{cursor:ew-resize}.ol-swipe.horizontal,.ol-swipe.horizontal button{cursor:ns-resize}.ol-swipe button:after,.ol-swipe button:before,.ol-swipe:after{content:"";position:absolute;top:25%;bottom:25%;left:50%;width:2px;background:rgba(255,255,255,.8);transform:translate(-1px,0);-webkit-transform:translate(-1px,0)}.ol-swipe button:after{transform:translateX(5px);-webkit-transform:translateX(5px)}.ol-swipe button:before{transform:translateX(-7px);-webkit-transform:translateX(-7px)}.ol-control.ol-timeline{bottom:0;left:0;right:0;-webkit-transition:.3s;transition:.3s}.ol-control.ol-timeline.ol-collapsed{-webkit-transform:translateY(100%);transform:translateY(100%)}.ol-timeline{overflow:hidden;padding:2px 0 0}.ol-timeline .ol-scroll{overflow:hidden;scroll-behavior:smooth;line-height:1em;height:6em;padding:0 50%}.ol-timeline .ol-scroll.ol-move{scroll-behavior:unset}.ol-timeline.ol-hasbutton .ol-scroll{margin-left:1.5em;padding:0 calc(50% - .75em)}.ol-timeline .ol-buttons{display:none;position:absolute;top:0;background:rgba(255,255,255,.5);width:1.5em;bottom:0;left:0;z-index:10}.ol-timeline.ol-hasbutton .ol-buttons{display:block}.ol-timeline .ol-buttons button{font-size:1em;margin:1px;position:relative}.ol-timeline .ol-buttons .ol-zoom-in:before,.ol-timeline .ol-buttons .ol-zoom-out:before{content:"+";position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ol-timeline .ol-buttons .ol-zoom-out:before{content:'−'}.ol-timeline .ol-scroll>div{height:100%;position:relative}.ol-timeline .ol-scroll .ol-times{background:rgba(255,255,255,.5);height:1em;bottom:0;position:absolute;left:-1000px;right:-1000px}.ol-timeline .ol-scroll .ol-time{position:absolute;font-size:.7em;color:#999;bottom:0;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ol-timeline .ol-scroll .ol-time.ol-year{color:#666;z-index:1}.ol-timeline .ol-scroll .ol-time:before{content:"";position:absolute;bottom:1.2em;left:50%;height:500px;border-left:1px solid currentColor}.ol-timeline .ol-scroll .ol-features{position:absolute;top:0;bottom:1em;left:-200px;right:-1000px;margin:0 0 0 200px;overflow:hidden}.ol-timeline .ol-scroll .ol-feature{position:absolute;font-size:.7em;color:#999;top:0;background:#fff;max-width:3em;max-height:2.4em;min-height:1em;line-height:1.2em;border:1px solid #ccc;overflow:hidden;padding:0 .5em 0 0;-webkit-transition:all .3s;transition:all .3s;cursor:pointer;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-timeline.ol-zoomhover .ol-scroll .ol-feature.ol-select,.ol-timeline.ol-zoomhover .ol-scroll .ol-feature:hover{z-index:1;-webkit-transform:scale(1.2);transform:scale(1.2);background:#eee}.ol-timeline .ol-center-date{display:none;position:absolute;left:50%;height:100%;width:2px;bottom:0;z-index:2;pointer-events:none;-webkit-transform:translateX(-50%);transform:translateX(-50%);background-color:red;opacity:.4}.ol-timeline.ol-hasbutton .ol-center-date{left:calc(50% + .75em)}.ol-timeline.ol-pointer .ol-center-date{display:block}.ol-timeline.ol-pointer .ol-center-date:after,.ol-timeline.ol-pointer .ol-center-date:before{content:'';border:.3em solid transparent;border-width:.3em .25em;position:absolute;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ol-timeline.ol-pointer .ol-center-date:before{border-top-color:red;top:0}.ol-timeline.ol-pointer .ol-center-date:after{border-bottom-color:red;bottom:0}.ol-timeline.ol-interval .ol-center-date{display:block;background-color:transparent;border:0 solid #000;border-width:0 10000px;-webkit-box-sizing:content-box;box-sizing:content-box;opacity:.2}.ol-control.ol-videorec{top:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);white-space:nowrap}.ol-control.ol-videorec button{position:relative;display:inline-block;vertical-align:middle}.ol-control.ol-videorec button:before{content:"";position:absolute;top:50%;left:50%;width:.8em;height:.8em;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);background-color:currentColor}.ol-control.ol-videorec button.ol-start:before{width:.9em;height:.9em;border-radius:50%;background-color:#c00}.ol-control.ol-videorec button.ol-pause:before{width:.2em;background-color:transparent;-webkit-box-shadow:-.2em 0,.2em 0;box-shadow:-.2em 0,.2em 0}.ol-control.ol-videorec button.ol-resume:before{border-style:solid;background:0 0;width:auto;border-width:.4em 0 .4em .6em;border-color:transparent transparent transparent currentColor;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-control.ol-videorec button.ol-pause,.ol-control.ol-videorec button.ol-resume,.ol-control.ol-videorec button.ol-stop,.ol-control.ol-videorec[data-state=rec] .ol-start,.ol-control.ol-videorec[data-state=pause] .ol-start{display:none}.ol-control.ol-videorec[data-state=rec] .ol-pause,.ol-control.ol-videorec[data-state=rec] .ol-stop,.ol-control.ol-videorec[data-state=pause] .ol-resume,.ol-control.ol-videorec[data-state=pause] .ol-stop{display:inline-block}.ol-control.ol-wmscapabilities{top:.5em;right:2.5em}.ol-touch .ol-control.ol-wmscapabilities{right:3em}.ol-control.ol-wmscapabilities.ol-hidden{display:none}.ol-control.ol-wmscapabilities button:before{content:"+";position:absolute;top:calc(50% - .35em);left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ol-control.ol-wmscapabilities button:after{content:"";width:.75em;height:.75em;position:absolute;background:0 0;top:calc(50% - .05em);left:50%;-webkit-transform:scaleY(.6) translate(-50%,-50%) rotate(45deg);transform:scaleY(.6) translate(-50%,-50%) rotate(45deg);-webkit-box-shadow:inset -.18em -.18em currentColor,-.4em .1em 0 -.25em currentColor,.1em -.35em 0 -.25em currentColor,.15em .15em currentColor;box-shadow:inset -.18em -.18em currentColor,-.4em .1em 0 -.25em currentColor,.1em -.35em 0 -.25em currentColor,.15em .15em currentColor;border-radius:.1em 0;border:.15em solid transparent;border-width:0 .15em .15em 0}.ol-wmscapabilities .ol-searching{opacity:.5}.ol-wmscapabilities .ol-searching .ol-url:after{content:"";width:.7em;height:.7em;background-color:currentColor;position:absolute;top:6em;border-radius:50%;display:block;left:calc(50% - .35em);-webkit-box-shadow:0 1em currentColor,0 -1em currentColor,1em 0 currentColor,-1em 0 currentColor;box-shadow:0 1em currentColor,0 -1em currentColor,1em 0 currentColor,-1em 0 currentColor;-webkit-animation:ol-wmscapabilities-rotate 2s linear infinite;animation:ol-wmscapabilities-rotate 2s linear infinite}@-webkit-keyframes ol-wmscapabilities-rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes ol-wmscapabilities-rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.ol-wmscapabilities .ol-url input{width:calc(100% - 10em);-webkit-box-sizing:border-box;box-sizing:border-box;min-width:Min(100%,20em)}.ol-wmscapabilities .ol-url select{width:2em;height:100%;padding:1px}.ol-wmscapabilities .ol-url button{width:7.5em;margin-left:.5em}.ol-wmscapabilities .ol-result{display:none;margin-top:.5em}.ol-wmscapabilities .ol-result.ol-visible{display:block}.ol-wmscapabilities .ol-select-list{position:relative;border:1px solid #369;overflow-x:hidden;width:calc(100% - 120px);-webkit-box-sizing:border-box;box-sizing:border-box;max-height:14.5em}.ol-wmscapabilities .ol-select-list div{padding:0 .5em;cursor:pointer;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden}.ol-wmscapabilities .ol-select-list .level-1{padding-left:1em}.ol-wmscapabilities .ol-select-list .level-2{padding-left:1.5em}.ol-wmscapabilities .ol-select-list .level-3{padding-left:2em}.ol-wmscapabilities .ol-select-list .level-4{padding-left:2.5em}.ol-wmscapabilities .ol-select-list .level-5{padding-left:3em}.ol-wmscapabilities .ol-select-list .ol-info{font-style:italic}.ol-wmscapabilities .ol-select-list .ol-title{background-color:rgba(0,60,136,.1)}.ol-wmscapabilities .ol-select-list div:hover{background-color:rgba(0,60,136,.5);color:#fff}.ol-wmscapabilities .ol-select-list div.selected{background-color:rgba(0,60,136,.7);color:#fff}.ol-wmscapabilities .ol-preview,.ol-wmscapabilities .ol-preview.tainted{width:100px;color:#666;padding:0 5px 5px;text-align:center;float:right;margin-left:10px}.ol-wmscapabilities .ol-preview{background:rgba(0,60,136,.1)}.ol-wmscapabilities .ol-preview.tainted{background:rgba(136,0,60,.1)}.ol-wmscapabilities .ol-preview img{width:100%;display:block;background:#fff}.ol-wmscapabilities .ol-legend{max-width:100%;display:none}.ol-wmscapabilities .ol-legend.visible{display:block}.ol-wmscapabilities .ol-buttons{clear:both;text-align:right}.ol-wmscapabilities .ol-data p{margin:0}.ol-wmscapabilities .ol-data p.ol-title{font-weight:700;margin:1em 0 .5em}.ol-wmscapabilities .ol-error{color:#800}.ol-wmscapabilities ul.ol-wmsform{display:none;list-style:none;padding:0}.ol-wmscapabilities ul.ol-wmsform.visible{display:block}.ol-wmscapabilities .ol-wmsform label{display:inline-block;text-align:right;width:calc(40% - .5em);margin-right:.5em}.ol-wmscapabilities .ol-wmsform input{display:inline-block;width:60%;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-wmscapabilities .ol-wmsform input[type=checkbox]{width:auto}.ol-wmscapabilities .ol-wmsform button{float:right;margin:1em 0}.ol-wmscapabilities ul.ol-wmsform li[data-param=extent] input{width:calc(60% - 2em)}.ol-wmscapabilities ul.ol-wmsform li[data-param=extent] button{position:relative;width:2em;height:1.6em;margin:0;vertical-align:middle;color:#444}.ol-wmscapabilities ul.ol-wmsform li[data-param=extent] button:after,.ol-wmscapabilities ul.ol-wmsform li[data-param=extent] button:before{content:"";position:absolute;width:.25em;height:.9em;border:.1em solid currentColor;top:50%;left:50%;-webkit-transform:translate(-50%,-50%) skewY(-15deg);transform:translate(-50%,-50%) skewY(-15deg)}.ol-wmscapabilities ul.ol-wmsform li[data-param=extent] button:after{-webkit-transform:translateX(.4em) translate(-50%,-50%) skewY(15deg);transform:translateX(.4em) translate(-50%,-50%) skewY(15deg);-webkit-box-shadow:-.8em .25em;box-shadow:-.8em .25em}.ol-ext-dialog.ol-wmscapabilities form{max-height:calc(85% - 1em);width:600px;min-height:15em;top:15%;-webkit-transform:translate(-50%,0);transform:translate(-50%,0)}.ol-ext-dialog [data-param=style],.ol-ext-dialog.ol-wmtscapabilities [data-param=map]{display:none}.ol-ext-dialog.ol-wmtscapabilities [data-param=style]{display:list-item}.ol-ext-dialog.ol-wmtscapabilities [data-param=proj],.ol-ext-dialog.ol-wmtscapabilities [data-param=version]{opacity:.6;pointer-events:none}.ol-ext-dialog.ol-wmscapabilities button.ol-wmsform{width:1.8em;text-align:center}.ol-ext-dialog.ol-wmscapabilities button.ol-wmsform:before{content:"+"}.ol-ext-dialog.ol-wmscapabilities .ol-form button.ol-wmsform:before{content:"-"}.ol-ext-dialog.ol-wmscapabilities .ol-form .ol-legend,.ol-ext-dialog.ol-wmscapabilities .ol-form button.ol-load{display:none}.ol-ext-dialog.ol-wmscapabilities .ol-form ul.ol-wmsform{display:block;clear:both}.ol-target-overlay .ol-target{border:1px solid transparent;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff;display:block;height:20px;width:0}.ol-target-overlay .ol-target:after,.ol-target-overlay .ol-target:before{content:"";border:1px solid #369;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff;display:block;width:20px;height:0;position:absolute;top:10px;left:-10px}.ol-target-overlay .ol-target:after{-webkit-box-shadow:none;box-shadow:none;height:20px;width:0;top:0;left:0}.ol-overlaycontainer .ol-touch-cursor{width:56px;height:56px;margin:6px;border-radius:50%;cursor:pointer;background:rgba(255,255,255,.4);-webkit-box-shadow:inset 0 0 0 5px #369;box-shadow:inset 0 0 0 5px #369}.ol-overlaycontainer .ol-touch-cursor:after{content:"";position:absolute;top:0;left:0;width:50%;height:50%;background:radial-gradient(circle at 100% 100%,transparent,transparent 70%,#369 70%,#369)}.ol-overlaycontainer .ol-touch-cursor .ol-button{position:absolute;color:#369;height:55%;width:55%;border-radius:50%;cursor:pointer;background:rgba(255,255,255,.4);-webkit-box-shadow:inset 0 0 0 3px currentColor;box-shadow:inset 0 0 0 3px currentColor;top:50%;left:50%;-webkit-transform:translate(-50%,-50%) scale(0);transform:translate(-50%,-50%) scale(0);-webkit-transition:all .5s,opacity 0s,background 0s;transition:all .5s,opacity 0s,background 0s;overflow:hidden}.ol-overlaycontainer .ol-touch-cursor.active.disable .ol-button,.ol-overlaycontainer .ol-touch-cursor.nodrawing .ol-button.ol-button-check,.ol-overlaycontainer .ol-touch-cursor.nodrawing .ol-button.ol-button-remove,.ol-overlaycontainer .ol-touch-cursor.nodrawing .ol-button.ol-button-x{opacity:.8;background:rgba(51,102,153,.2)}.ol-overlaycontainer .ol-touch-cursor.active .ol-button{-webkit-transform:translate(-50%,-50%) scale(1);transform:translate(-50%,-50%) scale(1)}.ol-overlaycontainer .ol-touch-cursor.active .ol-button-0{top:-18%;left:118%}.ol-overlaycontainer .ol-touch-cursor.active .ol-button-1{top:50%;left:140%}.ol-overlaycontainer .ol-touch-cursor.active .ol-button-2{top:120%;left:120%}.ol-overlaycontainer .ol-touch-cursor.active .ol-button-3{top:140%;left:50%}.ol-overlaycontainer .ol-touch-cursor.active .ol-button-4{top:118%;left:-18%}.ol-overlaycontainer .ol-touch-cursor.active .ol-button-5{top:50%;left:-40%}.ol-overlaycontainer .ol-touch-cursor.active .ol-button-6{top:-18%;left:-18%}.ol-overlaycontainer .ol-touch-cursor.active .ol-button-7{top:-40%;left:50%}.ol-overlaycontainer .ol-touch-cursor .ol-button:before{content:"";width:1.5em;height:1em;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);line-height:1em;text-align:center}.ol-overlaycontainer .ol-touch-cursor .ol-button>div,.ol-perspective-map{-webkit-transform:translate(-50%,-50%);top:50%;left:50%;position:absolute}.ol-overlaycontainer .ol-touch-cursor .ol-button.ol-button-add:before,.ol-overlaycontainer .ol-touch-cursor .ol-button.ol-button-remove:before{content:"−";line-height:.95em;font-size:1.375em;font-weight:700}.ol-overlaycontainer .ol-touch-cursor .ol-button.ol-button-add:before{content:"+"}.ol-overlaycontainer .ol-touch-cursor .ol-button.ol-button-x:before{content:"\00D7";font-size:1.2em;font-weight:700}.ol-overlaycontainer .ol-touch-cursor .ol-button.ol-button-move:before{content:"\2725";font-size:1.2em}.ol-overlaycontainer .ol-touch-cursor .ol-button.ol-button-check:before{content:"\2713";font-weight:700}.ol-overlaycontainer .ol-touch-cursor .ol-button>div{transform:translate(-50%,-50%)}.ol-overlaycontainer .ol-touch-cursor .ol-button-type:before{content:"\21CE";font-weight:700}.mapboxgl-canvas:focus{outline:0}.ol-perspective-map{width:200%;height:200%;transform:translate(-50%,-50%)}.ol-perspective-map .ol-layer{z-index:-1!important}.ol-perspective-map .ol-layers{-webkit-transform:translateY(0) perspective(200px) rotateX(0) scaleY(1);transform:translateY(0) perspective(200px) rotateX(0) scaleY(1)}.ol-perspective-map .ol-overlaycontainer,.ol-perspective-map .ol-overlaycontainer-stopevent{width:50%!important;height:50%!important;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ol-overlay-container .ol-magnify{background:rgba(0,0,0,.5);border:3px solid #369;border-radius:50%;height:150px;width:150px;overflow:hidden;-webkit-box-shadow:5px 5px 5px rgba(0,0,0,.5);box-shadow:5px 5px 5px rgba(0,0,0,.5);position:relative;z-index:0}.ol-overlay-container .ol-magnify:before{border-radius:50%;-webkit-box-shadow:0 0 40px 2px rgba(0,0,0,.25) inset;box-shadow:0 0 40px 2px rgba(0,0,0,.25) inset;content:"";display:block;height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}.ol-overlay-container .ol-magnify:after{border-radius:50%;-webkit-box-shadow:0 0 20px 7px rgba(255,255,255,1);box-shadow:0 0 20px 7px rgba(255,255,255,1);content:"";display:block;height:0;left:23%;position:absolute;top:20%;width:20%;z-index:1;transform:rotate(-40deg);-webkit-transform:rotate(-40deg)}.ol-popup.anim{visibility:hidden}.ol-popup.anim.visible{visibility:visible}.ol-popup.anim.visible>div{visibility:visible;-webkit-transform:none;transform:none;-webkit-animation:ol-popup_bounce .4s ease 1;animation:ol-popup_bounce .4s ease 1}@-webkit-keyframes ol-popup_bounce{from{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.1);transform:scale(1.1)}80%{-webkit-transform:scale(.95);transform:scale(.95)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes ol-popup_bounce{from{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.1);transform:scale(1.1)}80%{-webkit-transform:scale(.95);transform:scale(.95)}to{-webkit-transform:scale(1);transform:scale(1)}}.ol-popup.anim.ol-popup-bottom.ol-popup-left>div{-webkit-transform-origin:0 100%;transform-origin:0 100%}.ol-popup.anim.ol-popup-bottom.ol-popup-right>div{-webkit-transform-origin:100% 100%;transform-origin:100% 100%}.ol-popup.anim.ol-popup-bottom.ol-popup-center>div{-webkit-transform-origin:50% 100%;transform-origin:50% 100%}.ol-popup.anim.ol-popup-top.ol-popup-left>div{-webkit-transform-origin:0 0;transform-origin:0 0}.ol-popup.anim.ol-popup-top.ol-popup-right>div{-webkit-transform-origin:100% 0;transform-origin:100% 0}.ol-popup.anim.ol-popup-top.ol-popup-center>div{-webkit-transform-origin:50% 0;transform-origin:50% 0}.ol-popup.anim.ol-popup-middle.ol-popup-left>div{-webkit-transform-origin:0 50%;transform-origin:0 50%}.ol-popup.anim.ol-popup-middle.ol-popup-right>div{-webkit-transform-origin:100% 50%;transform-origin:100% 50%}.ol-popup{font-size:.9em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ol-popup .ol-popup-content{overflow:hidden;cursor:default;padding:.25em .5em}.ol-popup.hasclosebox .ol-popup-content{margin-right:1.7em}.ol-popup .ol-popup-content:after{clear:both;content:"";display:block;font-size:0;height:0}.ol-popup .anchor{display:block;width:0;height:0;background:red;position:absolute;margin:-11px 22px;pointer-events:none}.ol-popup-center.ol-popup-middle .anchor,.ol-popup.ol-fixed .anchor{display:none}.ol-popup .anchor:after,.ol-popup .anchor:before{position:absolute}.ol-popup-right .anchor:after,.ol-popup-right .anchor:before{right:0}.ol-popup-top .anchor{top:0}.ol-popup-bottom .anchor{bottom:0}.ol-popup-right .anchor{right:0}.ol-popup-left .anchor{left:0}.ol-popup-center .anchor{left:50%;margin-left:0!important}.ol-popup-middle .anchor{top:50%;margin-top:0!important}.ol-popup.ol-fixed{margin:0!important;top:.5em!important;right:.5em!important;left:auto!important;bottom:auto!important;-webkit-transform:none!important;transform:none!important}.ol-popup.ol-fixed.anim>div{-webkit-animation:none;animation:none}.ol-popup .ol-fix{width:1em;height:.9em;background:#fff;position:relative;float:right;margin:.2em;cursor:pointer}.ol-popup .ol-fix:before{content:"";width:.8em;height:.7em;display:block;border:.1em solid #666;border-right-width:.3em;-webkit-box-sizing:border-box;box-sizing:border-box;margin:.1em}.ol-popup.shadow{-webkit-box-shadow:2px 2px 2px 2px rgba(0,0,0,.5);box-shadow:2px 2px 2px 2px rgba(0,0,0,.5)}.ol-popup .closeBox{background-color:rgba(0,60,136,.5);color:#fff;border:0;border-radius:2px;cursor:pointer;float:right;font-size:.9em;font-weight:700;width:1.4em;height:1.4em;margin:5px 5px 0 0;padding:0;position:relative;display:none}.ol-popup.hasclosebox .closeBox{display:block}.ol-popup .closeBox:hover{background-color:rgba(0,60,136,.7)}.ol-popup .closeBox:after{content:"\00d7";font-size:1.5em;top:50%;left:0;right:0;width:100%;text-align:center;line-height:1em;margin:-.5em 0;position:absolute}.ol-popup.modifytouch .ol-popup-content,.ol-popup.tooltips .ol-popup-content{padding:0 .25em;font-size:.85em;white-space:nowrap}.ol-popup.modifytouch{background-color:#eee}.ol-popup.modifytouch .ol-popup-content a{text-decoration:none}.ol-popup.tooltips{background-color:#ffa}.ol-popup.default>div{background-color:#fff;border:1px solid #69f;border-radius:5px}.ol-popup.default .anchor:after,.ol-popup.default .anchor:before,.ol-popup.placemark .anchor:after,.ol-popup.placemark.pushpin>div:before{border-color:currentColor transparent;content:""}.ol-popup.default{margin:-11px 0;-webkit-transform:translate(0,-22px);transform:translate(0,-22px)}.ol-popup-top.ol-popup.default{margin:11px 0;-webkit-transform:none;transform:none}.ol-popup-left.default{margin:-11px -22px;-webkit-transform:translate(0,-22px);transform:translate(0,-22px)}.ol-popup-top.ol-popup-left.default{margin:11px -22px;-webkit-transform:none;transform:none}.ol-popup-right.default{margin:-11px 22px;-webkit-transform:translate(44px,-22px);transform:translate(44px,-22px)}.ol-popup-top.ol-popup-right.default{margin:11px 22px;-webkit-transform:translate(44px,0);transform:translate(44px,0)}.ol-popup-middle.default{margin:0 10px;-webkit-transform:none;transform:none}.ol-popup-middle.ol-popup-right.default{margin:0 -10px;-webkit-transform:translate(-20px,0);transform:translate(-20px,0)}.ol-popup.default .anchor{color:#69f}.ol-popup.default .anchor:after,.ol-popup.default .anchor:before{border-style:solid;border-width:11px;margin:0 -11px}.ol-popup.default .anchor:after{border-color:#fff transparent;border-width:11px;margin:2px -11px}.ol-popup-top.default .anchor:after,.ol-popup-top.default .anchor:before{border-top:0;top:0}.ol-popup-bottom.default .anchor:after,.ol-popup-bottom.default .anchor:before{border-bottom:0;bottom:0}.ol-popup-middle.default .anchor:before{margin:-11px -33px;border-color:transparent currentColor}.ol-popup-middle.default .anchor:after{margin:-11px -31px;border-color:transparent #fff}.ol-popup-middle.ol-popup-left.default .anchor:after,.ol-popup-middle.ol-popup-left.default .anchor:before{border-left:0}.ol-popup-middle.ol-popup-right.default .anchor:after,.ol-popup-middle.ol-popup-right.default .anchor:before{border-right:0}.ol-popup.placemark{color:#c00;margin:-.65em 0;-webkit-transform:translate(0,-1.3em);transform:translate(0,-1.3em)}.ol-popup.placemark>div{position:relative;font-size:15px;background-color:#fff;border:0;-webkit-box-shadow:inset 0 0 0 .45em;box-shadow:inset 0 0 0 .45em;width:2em;height:2em;border-radius:50%;min-width:unset;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-popup.placemark .ol-popup-content{overflow:hidden;cursor:default;text-align:center;padding:.25em 0;width:1em;height:1em;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);line-height:1em}.ol-popup.placemark .anchor{margin:0}.ol-popup.placemark .anchor:before{content:"";margin:-.5em;background:0 0;width:1em;height:.5em;border-radius:50%;-webkit-box-shadow:0 1em .5em rgba(0,0,0,.5);box-shadow:0 1em .5em rgba(0,0,0,.5)}.ol-popup.placemark.blazon>div,.ol-popup.placemark.shield>div{border-radius:.2em}.ol-popup.placemark .anchor:after{border-style:solid;border-width:1em .7em 0;margin:-.75em -.7em;bottom:0}.ol-popup.placemark.shield .anchor:after{border-width:.8em 1em 0;margin:-.7em -1em}.ol-popup.placemark.pushpin{margin:-2.2em 0;-webkit-transform:translate(0,-4em);transform:translate(0,-4em)}.ol-popup.placemark.pushpin>div{border-radius:0;background:0 0!important;-webkit-box-shadow:inset 2em 0 currentColor;box-shadow:inset 2em 0 currentColor;width:1.1em}.ol-popup.placemark.pushpin>div:before{width:1.3em;height:1.5em;border-style:solid;position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);border-width:.3em .5em .5em;pointer-events:none}.ol-popup.placemark.needle{margin:-2em 0;-webkit-transform:translate(0,-4em);transform:translate(0,-4em)}.ol-popup.placemark.needle .anchor,.ol-popup.placemark.pushpin .anchor{margin:-1.2em}.ol-popup.placemark.needle .anchor:after,.ol-popup.placemark.pushpin .anchor:after{border-style:solid;border-width:2em .15em 0;margin:-.55em -.2em;width:.1em}.ol-popup.placemark.needle .anchor:before,.ol-popup.placemark.pushpin .anchor:before{margin:-.75em -.5em}.ol-popup.placemark.flagv{margin:-2em 1em;-webkit-transform:translate(0,-4em);transform:translate(0,-4em)}.ol-popup.placemark.flagv>div{border-radius:0;-webkit-box-shadow:none;box-shadow:none;background-color:transparent}.ol-popup.placemark.flagv>div:before{content:"";border:1em solid transparent;position:absolute;border-left:2em solid currentColor;pointer-events:none}.ol-popup.placemark.flagv .anchor{margin:-1.4em}.ol-popup.placemark.flag{margin:-2em 1em;-webkit-transform:translate(0,-4em);transform:translate(0,-4em)}.ol-popup.placemark.flag>div{border-radius:0;-webkit-transform-origin:0 150%!important;transform-origin:0 150%!important}.ol-popup.placemark.flag .anchor{margin:-1.4em}.ol-popup.placemark.flag .anchor:after,.ol-popup.placemark.flagv .anchor:after{border-style:solid;border-width:2em .15em 0;margin:-.55em -1em;width:.1em}.ol-popup.placemark.flag .anchor:before,.ol-popup.placemark.flagv .anchor:before{margin:-.75em -1.25em}.ol-popup.placemark.flag.finish{margin:-2em 1em}.ol-popup.placemark.flag.finish>div{background-image:linear-gradient(45deg,currentColor 25%,transparent 25%,transparent 75%,currentColor 75%,currentColor),linear-gradient(45deg,currentColor 25%,transparent 25%,transparent 75%,currentColor 75%,currentColor);background-size:1em 1em;background-position:.5em 0,0 .5em;-webkit-box-shadow:inset 0 0 0 .25em;box-shadow:inset 0 0 0 .25em}.ol-popup.black .closeBox{background-color:rgba(0,0,0,.5);border-radius:5px;color:#f80}.ol-popup.black .closeBox:hover{background-color:rgba(0,0,0,.7);color:#da2}.ol-popup.black{margin:-20px 0;-webkit-transform:translate(0,-40px);transform:translate(0,-40px)}.ol-popup.black>div{background-color:rgba(0,0,0,.6);border-radius:5px;color:#fff}.ol-popup-top.ol-popup.black{margin:20px 0;-webkit-transform:none;transform:none}.ol-popup-left.black{margin:-20px -22px;-webkit-transform:translate(0,-40px);transform:translate(0,-40px)}.ol-popup-top.ol-popup-left.black{margin:20px -22px;-webkit-transform:none;transform:none}.ol-popup-right.black{margin:-20px 22px;-webkit-transform:translate(44px,-40px);transform:translate(44px,-40px)}.ol-popup-top.ol-popup-right.black{margin:20px 22px;-webkit-transform:translate(44px,0);transform:translate(44px,0)}.ol-popup-middle.black{margin:0 11px;-webkit-transform:none;transform:none}.ol-popup-left.ol-popup-middle.black{-webkit-transform:none;transform:none}.ol-popup-right.ol-popup-middle.black{margin:0 -11px;-webkit-transform:translate(-22px,0);transform:translate(-22px,0)}.ol-popup.black .anchor{margin:-20px 11px;color:rgba(0,0,0,.6)}.ol-popup.black .anchor:before{content:"";border-color:currentColor transparent;border-style:solid;border-width:20px 11px}.ol-popup-top.black .anchor:before{border-top:0;top:0}.ol-popup-bottom.black .anchor:before{border-bottom:0;bottom:0}.ol-popup-middle.black .anchor:before{margin:-20px -22px;border-color:transparent currentColor}.ol-popup-middle.ol-popup-left.black .anchor:before{border-left:0}.ol-popup-middle.ol-popup-right.black .anchor:before{border-right:0}.ol-popup-center.black .anchor:before{margin:0 -10px}.ol-popup.tips .closeBox{background-color:red;border-radius:50%;color:#fff;width:1.2em;height:1.2em}.ol-popup.tips .closeBox:hover{background-color:#f40}.ol-popup.tips{margin:-20px 0;-webkit-transform:translate(0,-40px);transform:translate(0,-40px)}.ol-popup.tips>div{background-color:#cea;border:5px solid #ad7;border-radius:5px;color:#333}.ol-popup-top.ol-popup.tips{margin:20px 0;-webkit-transform:none;transform:none}.ol-popup-left.tips{margin:-20px -22px;-webkit-transform:translate(0,-40px);transform:translate(0,-40px)}.ol-popup-top.ol-popup-left.tips{margin:20px -22px;-webkit-transform:none;transform:none}.ol-popup-right.tips{margin:-20px 22px;-webkit-transform:translate(44px,-40px);transform:translate(44px,-40px)}.ol-popup-top.ol-popup-right.tips{margin:20px 22px;-webkit-transform:translate(44px,0);transform:translate(44px,0)}.ol-popup-middle.tips{margin:0;-webkit-transform:none;transform:none}.ol-popup-left.ol-popup-middle.tips{margin:0 22px;-webkit-transform:none;transform:none}.ol-popup-right.ol-popup-middle.tips{margin:0 -22px;-webkit-transform:translate(-44px,0);transform:translate(-44px,0)}.ol-popup.tips .anchor{margin:-18px 22px;color:#ad7}.ol-popup.tips .anchor:before{content:"";border-color:currentColor transparent;border-style:solid;border-width:20px 11px}.ol-popup-top.tips .anchor:before{border-top:0;top:0}.ol-popup-bottom.tips .anchor:before{border-bottom:0;bottom:0}.ol-popup-center.tips .anchor:before{border-width:20px 6px;margin:0 -6px}.ol-popup-left.tips .anchor:before{border-left:0;margin-left:0}.ol-popup-right.tips .anchor:before{border-right:0;margin-right:0}.ol-popup-middle.tips .anchor:before{margin:-6px -41px;border-color:transparent currentColor;border-width:6px 20px}.ol-popup-middle.ol-popup-left.tips .anchor:before{border-left:0}.ol-popup-middle.ol-popup-right.tips .anchor:before{border-right:0}.ol-popup.warning .closeBox{background-color:red;border-radius:50%;color:#fff;font-size:.83em}.ol-popup.warning .closeBox:hover{background-color:#f40}.ol-popup.warning{background-color:#fd0;border-radius:3px;border:4px dashed red;color:#900;margin:-28px 10px;-webkit-transform:translate(0,-56px);transform:translate(0,-56px)}.ol-popup-top.ol-popup.warning{margin:28px 10px;-webkit-transform:none;transform:none}.ol-popup-left.warning{margin:-28px -22px;-webkit-transform:translate(0,-56px);transform:translate(0,-56px)}.ol-popup-top.ol-popup-left.warning{margin:28px -22px;-webkit-transform:none;transform:none}.ol-popup-right.warning{margin:-28px 22px;-webkit-transform:translate(44px,-56px);transform:translate(44px,-56px)}.ol-popup-top.ol-popup-right.warning{margin:28px 22px;-webkit-transform:translate(44px,0);transform:translate(44px,0)}.ol-popup-middle.warning{margin:0;-webkit-transform:none;transform:none}.ol-popup-left.ol-popup-middle.warning{margin:0 22px;-webkit-transform:none;transform:none}.ol-popup-right.ol-popup-middle.warning{margin:0 -22px;-webkit-transform:translate(-44px,0);transform:translate(-44px,0)}.ol-popup.warning .anchor{margin:-33px 7px}.ol-popup.warning .anchor:before{content:"";border-color:red transparent;border-style:solid;border-width:30px 11px}.ol-popup-top.warning .anchor:before{border-top:0;top:0}.ol-popup-bottom.warning .anchor:before{border-bottom:0;bottom:0}.ol-popup-center.warning .anchor:before{margin:0 -21px}.ol-popup-middle.warning .anchor:before{margin:-10px -33px;border-color:transparent red;border-width:10px 22px}.ol-popup-middle.ol-popup-left.warning .anchor:before{border-left:0}.ol-popup-middle.ol-popup-right.warning .anchor:before{border-right:0}.ol-popup .ol-popupfeature table{width:100%}.ol-popup .ol-popupfeature table td{max-width:25em;overflow:hidden;text-overflow:ellipsis}.ol-popup .ol-popupfeature table td img{max-width:100px;max-height:100px}.ol-popup .ol-popupfeature tr:nth-child(2n+1){background-color:#eee}.ol-popup .ol-popupfeature .ol-zoombt{border:0;width:2em;height:2em;display:inline-block;color:rgba(0,60,136,.5);position:relative;background:0 0;outline:0}.ol-popup .ol-popupfeature .ol-zoombt:before{content:"";position:absolute;-webkit-box-sizing:border-box;box-sizing:border-box;width:1em;height:1em;background-color:transparent;border:.17em solid currentColor;border-radius:100%;top:.3em;left:.3em}.ol-popup .ol-popupfeature .ol-zoombt:after{content:"";position:absolute;-webkit-box-sizing:border-box;box-sizing:border-box;top:1.35em;left:1.15em;border-width:.1em .3em;border-style:solid;border-radius:.03em;-webkit-transform:rotate(45deg);transform:rotate(45deg);-webkit-box-shadow:-.2em 0 0 -.04em;box-shadow:-.2em 0 0 -.04em}.ol-popup .ol-popupfeature .ol-count{float:right;margin:.25em 0}.ol-popup .ol-popupfeature .ol-next,.ol-popup .ol-popupfeature .ol-prev{border-style:solid;border-color:transparent rgba(0,60,136,.5);border-width:.5em 0 .5em .5em;display:inline-block;vertical-align:bottom;margin:0 .5em;cursor:pointer}.ol-popup .ol-popupfeature .ol-prev{border-width:.5em .5em .5em 0}.ol-popup.tooltips.black{background-color:transparent}.ol-popup.tooltips.black>div{-webkit-transform:scaleY(1.3);transform:scaleY(1.3);padding:.2em .5em;background-color:rgba(0,0,0,.5)}.ol-popup-middle.tooltips.black .anchor:before{border-width:5px 10px;margin:-5px -21px}.ol-popup-center.ol-popup-middle,.ol-popup-top.ol-popup-left.ol-fixPopup,.ol-popup-top.ol-popup-right.ol-fixPopup,.ol-popup.ol-fixPopup{margin:0}.ol-miniscroll{position:relative}.ol-miniscroll:hover .ol-scroll{opacity:.5;-webkit-transition:opacity 1s;transition:opacity 1s}.ol-miniscroll .ol-scroll{-ms-touch-action:none;touch-action:none;position:absolute;right:0;width:9px;height:auto;max-height:100%;opacity:0;border-radius:9px;-webkit-transition:opacity 1s .5s;transition:opacity 1s .5s;overflow:hidden;z-index:1}.ol-miniscroll .ol-scroll>div{-ms-touch-action:none;touch-action:none;position:absolute;top:0;right:0;width:9px;height:9px;-webkit-box-shadow:inset 10px 0 currentColor;box-shadow:inset 10px 0 currentColor;border-radius:9px/12px;border:2px solid transparent;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer}.ol-miniscroll .ol-scroll.ol-100pc{opacity:0}.ol-viewport canvas.ol-fixedoverlay{position:absolute;top:0;left:0;width:100%;height:100%}.ol-ext-toggle-switch,.ol-ext-toggle-switch span{position:relative;cursor:pointer}.ol-ext-toggle-switch input[type=radio],.ol-ext-toggle-switch input[type=checkbox]{display:none}.ol-ext-toggle-switch span{color:rgba(0,60,136,.5);background-color:#ccc;-webkit-transition:.4s,background-color 0s,border-color 0s;transition:.4s,background-color 0s,border-color 0s;width:1.6em;height:1em;display:inline-block;border-radius:1em;font-size:1.3em;vertical-align:middle;margin:-.15em .2em .15em}.ol-ext-toggle-switch span:before{position:absolute;content:"";height:1em;width:1em;left:0;top:50%;background-color:#fff;-webkit-transition:.4s;transition:.4s;border-radius:1em;display:block;-webkit-transform:translateY(-50%);transform:translateY(-50%);border:2px solid #ccc;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-ext-toggle-switch:hover span{background-color:#999}.ol-ext-toggle-switch:hover span:before{border-color:#999}.ol-ext-toggle-switch input:checked+span{background-color:currentColor}.ol-ext-check span,.ol-ext-radio:hover input:checked~span{background-color:#ccc}.ol-ext-toggle-switch input:checked+span:before{-webkit-transform:translate(.6em,-50%);transform:translate(.6em,-50%);border-color:currentColor}.ol-ext-check{position:relative;display:inline-block}.ol-ext-check input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.ol-ext-check span{color:rgba(0,60,136,.5);position:relative;display:inline-block;width:1em;height:1em;margin:-.1em .5em .1em;vertical-align:middle}.ol-ext-check:hover span{background-color:#999}.ol-ext-checkbox input:checked~span{background-color:currentColor}.ol-ext-checkbox input:checked~span:before{content:"";position:absolute;width:.5em;height:.8em;top:50%;left:50%;-webkit-transform:translateY(-.1em) translate(-50%,-50%) rotate(45deg);transform:translateY(-.1em) translate(-50%,-50%) rotate(45deg);-webkit-box-shadow:inset -.2em -.2em #fff;box-shadow:inset -.2em -.2em #fff}.ol-ext-radio span{width:1.1em;height:1.1em;border-radius:50%}.ol-ext-radio input:checked~span:before{content:"";position:absolute;width:50%;height:50%;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);border-radius:50%;background-color:currentColor}.ol-collection-list{margin:0;padding:0;list-style:none}.ol-collection-list li{position:relative;padding:0 2em 0 1em}.ol-collection-list li:hover{background-color:rgba(0,60,136,.2)}.ol-collection-list li.ol-select{background-color:rgba(0,60,136,.5);color:#fff}.ol-collection-list li .ol-order{position:absolute;-ms-touch-action:none;touch-action:none;right:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:2em;height:100%;cursor:n-resize}.ol-collection-list li .ol-order:before{content:'';position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:18px;height:2px;background-color:currentColor;-webkit-box-shadow:0 5px,0 -5px;box-shadow:0 5px,0 -5px;border-radius:2px}.ol-ext-colorpicker.ol-popup{width:2em;height:1.5em;background-color:transparent;background-image:linear-gradient(45deg,#aaa 25%,transparent 25%,transparent 75%,#aaa 75%),linear-gradient(45deg,#aaa 25%,transparent 25%,transparent 75%,#aaa 75%);background-size:10px 10px;background-position:0 -1px,5px 4px}.ol-ext-colorpicker .ol-tabbar{background-color:#eee;border-bottom:1px solid #999;display:none}.ol-ext-colorpicker.ol-tab .ol-tabbar{display:block}.ol-ext-colorpicker .ol-tabbar>div{display:inline-block;background-color:#fff;padding:0 .5em;border:1px solid #999;border-radius:2px 2px 0 0;position:relative;top:1px;cursor:pointer}.ol-ext-colorpicker .ol-tabbar>div:nth-child(1){border-bottom-color:#fff}.ol-ext-colorpicker.ol-picker-tab .ol-tabbar>div:nth-child(1){border-bottom-color:#999}.ol-ext-colorpicker.ol-picker-tab .ol-tabbar>div:nth-child(2){border-bottom-color:#fff}.ol-ext-colorpicker.ol-popup.ol-tab .ol-popup{width:180px}.ol-ext-colorpicker.ol-tab .ol-palette{margin:0 10px}.ol-ext-colorpicker.ol-tab .ol-container{display:none}.ol-ext-colorpicker.ol-tab.ol-picker-tab .ol-container{display:block}.ol-ext-colorpicker.ol-tab.ol-picker-tab .ol-palette{display:none}.ol-ext-colorpicker.ol-popup .ol-popup{width:340px}.ol-ext-colorpicker.ol-popup .ol-vignet{content:"";position:absolute;width:100%;height:100%;top:0;left:0;border:0;background-color:currentColor;pointer-events:none}.ol-ext-colorpicker .ol-container{position:relative;display:inline-block;vertical-align:top}.ol-ext-colorpicker .ol-cursor{pointer-events:none}.ol-ext-colorpicker .ol-picker{position:relative;cursor:crosshair;width:150px;height:150px;border:5px solid #fff;background-color:currentColor;background-image:-webkit-gradient(linear,left top,left bottom,from(0),color-stop(#000),to(transparent)),-webkit-gradient(linear,left top,right top,from(#fff),to(transparent));background-image:linear-gradient(0,#000,transparent),linear-gradient(90deg,#fff,transparent)}.ol-ext-colorpicker .ol-palette>div,.ol-ext-colorpicker .ol-slider{background-image:linear-gradient(45deg,#aaa 25%,transparent 25%,transparent 75%,#aaa 75%),linear-gradient(45deg,#aaa 25%,transparent 25%,transparent 75%,#aaa 75%);background-size:10px 10px}.ol-ext-colorpicker .ol-picker .ol-cursor{position:absolute;left:50%;top:50%;border:1px solid rgba(0,0,0,.7);-webkit-box-shadow:0 0 0 1px rgba(255,255,255,.7);box-shadow:0 0 0 1px rgba(255,255,255,.7);-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:10px;height:10px;border-radius:50%}.ol-ext-colorpicker .ol-slider{position:relative;cursor:crosshair;background-color:#fff;height:10px;width:150px;margin:5px 0 10px;border:5px solid #fff;border-width:0 5px;background-position:0 -1px,5px 4px}.ol-ext-colorpicker .ol-slider>div{width:100%;height:100%;background-image:linear-gradient(45deg,transparent,#fff);pointer-events:none}.ol-ext-colorpicker .ol-slider .ol-cursor{position:absolute;width:4px;height:12px;border:1px solid #000;top:50%;left:0;background:0 0;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ol-ext-colorpicker .ol-tint{position:absolute;cursor:crosshair;width:10px;height:150px;border:5px solid #fff;border-width:5px 0;-webkit-box-sizing:border;box-sizing:border;top:0;right:5px;background-image:-webkit-gradient(linear,left top,left bottom,from(0),color-stop(red),color-stop(#f0f),color-stop(#00f),color-stop(#0ff),color-stop(#0f0),color-stop(#ff0),to(red));background-image:linear-gradient(0,red,#f0f,#00f,#0ff,#0f0,#ff0,red)}.ol-ext-colorpicker .ol-tint .ol-cursor{position:absolute;top:0;left:50%;border:1px solid #000;height:4px;width:12px;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ol-ext-colorpicker .ol-clear{position:absolute;border:2px solid #999;right:4px;top:163px;width:10px;height:10px}.ol-ext-colorpicker .ol-clear:after,.ol-ext-colorpicker .ol-clear:before{content:"";position:absolute;width:15px;height:2px;background-color:#999;top:50%;left:50%;-webkit-transform:translate(-50%,-50%) rotate(45deg);transform:translate(-50%,-50%) rotate(45deg)}.ol-ext-colorpicker .ol-clear:after{-webkit-transform:translate(-50%,-50%) rotate(-45deg);transform:translate(-50%,-50%) rotate(-45deg)}.ol-ext-colorpicker.ol-nopacity .ol-alpha,.ol-ext-colorpicker.ol-nopacity .ol-clear,.ol-ext-colorpicker.ol-nopacity .ol-slider{display:none}.ol-ext-colorpicker .ol-rgb{position:relative;padding:5px;width:170px;display:none}.ol-ext-colorpicker .ol-rgb input{width:25%;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 0 0 2px;border:1px solid #999;border-radius:2px;font-size:13px}.ol-ext-colorpicker .ol-rgb input:nth-child(1){background-color:rgba(255,0,0,.1)}.ol-ext-colorpicker .ol-rgb input:nth-child(2){background-color:rgba(0,255,0,.1)}.ol-ext-colorpicker .ol-rgb input:nth-child(3){background-color:rgba(0,0,255,.12)}.ol-ext-colorpicker .ol-txt-color,.ol-ext-colorpicker button{font-size:13px;margin:0 5px 5px;text-align:center;width:170px;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0;border:1px solid #999;border-radius:2px;display:block}.ol-ext-colorpicker button{background-color:#eee}.ol-ext-colorpicker button:hover{background-color:#e9e9e9}.ol-ext-colorpicker .ol-txt-color.ol-error{background-color:rgba(255,0,0,.2)}.ol-ext-colorpicker .ol-palette{padding:2px;display:inline-block;width:152px}.ol-ext-colorpicker .ol-palette>div{width:15px;height:15px;display:inline-block;background-position:0 0,5px 5px;margin:2px;-webkit-box-shadow:0 0 2px 0 #666;box-shadow:0 0 2px 0 #666;border-radius:1px;cursor:pointer;position:relative}.ol-ext-colorpicker .ol-palette>div:before{content:"";position:absolute;background-color:currentColor;width:100%;height:100%}.ol-ext-colorpicker .ol-palette>div.ol-select:after{content:"";position:absolute;width:6px;height:12px;-webkit-box-shadow:1px 1px #fff,2px 2px #000;box-shadow:1px 1px #fff,2px 2px #000;top:30%;left:50%;-webkit-transform:translate(-50%,-50%) rotate(45deg);transform:translate(-50%,-50%) rotate(45deg)}.ol-ext-colorpicker .ol-palette>div:hover{-webkit-box-shadow:0 0 2px 1px #d90;box-shadow:0 0 2px 1px #d90}.ol-ext-colorpicker .ol-palette hr{margin:0}.ol-input-popup{display:inline-block;position:relative}.ol-input-popup .ol-popup{position:absolute;-webkit-box-shadow:1px 1px 3px 1px #999;box-shadow:1px 1px 3px 1px #999;background-color:#fff;z-index:1;display:none;left:-5px;padding:0;margin:0;list-style:none;white-space:nowrap}.ol-input-popup.ol-focus .ol-popup,.ol-input-popup.ol-hover:hover .ol-popup{display:block}.ol-input-popup.ol-right .ol-popup{left:auto;right:-5px}.ol-input-popup.ol-middle .ol-popup{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.ol-input-popup .ol-popup li{position:relative;padding:10px 5px}.ol-input-popup li.ol-selected,.ol-input-popup li:hover{background-color:#ccc}.ol-input-popup.ol-fixed .ol-popup,.ol-input-popup.ol-fixed:hover .ol-popup{position:relative;left:0;-webkit-box-shadow:unset;box-shadow:unset;background-color:transparent;display:inline-block;vertical-align:middle}.ol-input-popup>div{position:relative;display:inline-block;vertical-align:middle;border-radius:2px;border:1px solid #999;padding:3px 20px 3px 10px}.ol-input-popup>div:before{position:absolute;content:"";right:5px;top:50%;border:5px solid transparent;border-top:5px solid #999}.ol-ext-popup-input{display:inline-block;vertical-align:top}.ol-ext-popup-input.ol-popup{position:relative;width:2em;height:1.5em;display:inline-block;border:3px solid #fff;border-right-width:1em;-webkit-box-shadow:0 0 2px 1px #666;box-shadow:0 0 2px 1px #666;border-radius:2px;-webkit-box-sizing:content-box;box-sizing:content-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle}.ol-ext-popup-input.ol-popup:after{content:"";position:absolute;border:.5em solid #aaa;border-width:.5em .3em 0;border-color:#999 transparent;right:-.8em;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}.ol-ext-popup-input *{-webkit-box-sizing:content-box;box-sizing:content-box}.ol-ext-popup-input.ol-popup .ol-popup{position:absolute;top:100%;min-width:3em;min-height:3em;left:0;-webkit-box-shadow:1px 1px 3px 1px #999;box-shadow:1px 1px 3px 1px #999;background-color:#fff;display:none;z-index:1}.ol-ext-popup-input.ol-popup .ol-popup.ol-visible{display:block}.ol-ext-popup-input.ol-popup-fixed .ol-popup{position:fixed;top:auto;left:auto}.ol-input-popup.ol-size li{display:table-cell;height:100%;padding:5px;vertical-align:middle}.ol-input-popup.ol-size li>*{background-color:#369;border-radius:50%;vertical-align:middle;width:1em;height:1em}.ol-input-popup.ol-size li>.ol-option-0{position:relative;width:1em;height:1em;border:2px solid currentColor;color:#aaa;background-color:transparent;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-input-popup.ol-size li>:before{position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ol-input-popup.ol-size li>.ol-option-0:before{content:"";width:1em;height:2px;background-color:#aaa;-webkit-transform:translate(-50%,-50%) rotate(-45deg);transform:translate(-50%,-50%) rotate(-45deg)}.ol-input-slider{display:inline-block;position:relative}.ol-input-slider .ol-popup{position:absolute;-webkit-box-shadow:1px 1px 3px 1px #999;box-shadow:1px 1px 3px 1px #999;background-color:#fff;z-index:1;display:none;left:-5px}.ol-input-slider.ol-right .ol-popup{left:auto;right:-5px}.ol-input-slider.ol-focus .ol-popup,.ol-input-slider.ol-hover:hover .ol-popup{display:block;white-space:nowrap}.ol-input-slider.ol-focus .ol-popup>*,.ol-input-slider.ol-hover:hover .ol-popup>*{display:inline-block;vertical-align:middle}.ol-input-slider.ol-focus .ol-popup>.ol-before,.ol-input-slider.ol-hover:hover .ol-popup>.ol-before{margin-left:10px}.ol-input-slider.ol-focus .ol-popup>.ol-after,.ol-input-slider.ol-hover:hover .ol-popup>.ol-after{margin-right:10px}.ol-input-slider .ol-slider{position:relative;width:100px;height:3px;border:0 solid transparent;border-width:10px 15px;-webkit-box-shadow:inset 0 0 0 1px #999;box-shadow:inset 0 0 0 1px #999;-webkit-box-sizing:content-box;box-sizing:content-box;cursor:pointer}.ol-input-slider .ol-slider>.ol-cursor{position:absolute;width:5px;height:10px;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);background-color:#999;pointer-events:none}.ol-input-slider.ol-fixed .ol-popup,.ol-input-slider.ol-fixed:hover .ol-popup{position:relative;left:0;-webkit-box-shadow:unset;box-shadow:unset;background-color:transparent;display:inline-block;vertical-align:middle}.ol-input-slider.ol-size .ol-slider{height:auto;-webkit-box-shadow:none;box-shadow:none}.ol-input-slider.ol-size .ol-slider .ol-back{width:0;color:#aaa;border:0 solid transparent;border-width:0 0 20px 100px;border-color:currentColor transparent;pointer-events:none}.ol-input-slider.ol-size .ol-slider>.ol-cursor{width:2px;height:calc(100% + 4px);border-width:5px 3px;border-style:solid;border-color:red transparent;-o-border-image:initial;border-image:initial;background-color:transparent;-webkit-box-shadow:inset 3px 0 red;box-shadow:inset 3px 0 red}.ol-input-popup.ol-width li{padding:5px}.ol-input-popup.ol-width li>*{background-color:#369;width:100px;height:1em}.ol-input-popup.ol-width li>.ol-option-0{position:relative;height:1px;background-image:linear-gradient(90deg,#aaa 2px,transparent 2px);background-color:transparent;background-size:4px} \ No newline at end of file +.ol-control i{cursor:default}.ol-control.ol-bar{left:50%;min-height:1em;min-width:1em;position:absolute;top:.5em;transform:translate(-50%,0);-webkit-transform:translate(-50%,0);white-space:nowrap}.ol-control.ol-toggle .ol-option-bar{display:none}.ol-control.ol-bar .ol-control{position:relative;top:auto;left:auto;right:auto;bottom:auto;display:inline-block;vertical-align:middle;background-color:transparent;padding:0;margin:0;transform:none;-webkit-transform:none}.ol-control.ol-bar .ol-rotate button,.ol-control.ol-bar.ol-left .ol-control,.ol-control.ol-bar.ol-right .ol-control{display:block}.ol-control.ol-bar .ol-bar{position:static}.ol-control.ol-bar .ol-control button{margin:2px 1px;outline:0}.ol-control.ol-bar.ol-left{left:.5em;top:50%;-webkit-transform:translate(0,-50%);transform:translate(0,-50%)}.ol-control.ol-bar.ol-right{left:auto;right:.5em;top:50%;-webkit-transform:translate(0,-50%);transform:translate(0,-50%)}.ol-control.ol-bar.ol-bottom{top:auto;bottom:.5em}.ol-control.ol-bar.ol-top.ol-left,.ol-control.ol-bar.ol-top.ol-right{top:4.5em;-webkit-transform:none;transform:none}.ol-touch .ol-control.ol-bar.ol-top.ol-left,.ol-touch .ol-control.ol-bar.ol-top.ol-right{top:5.5em}.ol-control.ol-bar.ol-bottom.ol-left,.ol-control.ol-bar.ol-bottom.ol-right{top:auto;bottom:.5em;-webkit-transform:none;transform:none}.ol-control.ol-bar.ol-group{margin:1px 1px 1px 0}.ol-control.ol-bar.ol-left .ol-group,.ol-control.ol-bar.ol-right .ol-group{margin:1px 1px 0}.ol-control.ol-bar.ol-group button{border-radius:0;margin:0 0 0 1px}.ol-control.ol-bar.ol-left .ol-group button,.ol-control.ol-bar.ol-left.ol-group button,.ol-control.ol-bar.ol-right .ol-group button,.ol-control.ol-bar.ol-right.ol-group button{margin:0 0 1px}.ol-control.ol-bar.ol-group .ol-control:first-child>button{border-radius:5px 0 0 5px}.ol-control.ol-bar.ol-group .ol-control:last-child>button{border-radius:0 5px 5px 0}.ol-control.ol-bar.ol-left .ol-group .ol-control:first-child>button,.ol-control.ol-bar.ol-left.ol-group .ol-control:first-child>button,.ol-control.ol-bar.ol-right .ol-group .ol-control:first-child>button,.ol-control.ol-bar.ol-right.ol-group .ol-control:first-child>button{border-radius:5px 5px 0 0}.ol-control.ol-bar.ol-left .ol-group .ol-control:last-child>button,.ol-control.ol-bar.ol-left.ol-group .ol-control:last-child>button,.ol-control.ol-bar.ol-right .ol-group .ol-control:last-child>button,.ol-control.ol-bar.ol-right.ol-group .ol-control:last-child>button{border-radius:0 0 5px 5px}.ol-control.ol-bar .ol-rotate{opacity:1;visibility:visible}.ol-control.ol-bar .ol-toggle.ol-active button:hover,.ol-control.ol-bar .ol-toggle.ol-active>button{background-color:rgba(60,136,0,.7)}.ol-control.ol-toggle button:disabled{background-color:rgba(0,60,136,.3)}.ol-control.ol-bar .ol-control.ol-option-bar{display:none;position:absolute;top:100%;left:0;margin:5px 0;border-radius:0;background-color:rgba(255,255,255,.8);-webkit-box-shadow:0 0 0 1px rgba(0,60,136,.5),1px 1px 2px rgba(0,0,0,.5);box-shadow:0 0 0 1px rgba(0,60,136,.5),1px 1px 2px rgba(0,0,0,.5)}.ol-control.ol-bar .ol-option-bar:before{content:"";border:.5em solid transparent;border-color:transparent transparent rgba(0,60,136,.5);position:absolute;bottom:100%;left:.3em}.ol-control.ol-bar .ol-option-bar .ol-control{display:table-cell}.ol-control.ol-bar .ol-control .ol-bar{display:none}.ol-control.ol-bar .ol-control.ol-active>.ol-option-bar{display:block}.ol-control.ol-bar .ol-control.ol-collapsed ul{display:none}.ol-control.ol-bar .ol-control.ol-text-button>div,.ol-control.ol-bar .ol-control.ol-text-button>div:hover{background-color:transparent;color:rgba(0,60,136,.5);width:auto;min-width:1.375em;margin:0}.ol-control.ol-bar .ol-control.ol-text-button{font-size:.9em;border-left:1px solid rgba(0,60,136,.8);border-radius:0}.ol-control.ol-bar .ol-control.ol-text-button:first-child{border-left:0}.ol-control.ol-bar .ol-control.ol-text-button>div{padding:.11em .3em;font-weight:400;font-size:1.14em;font-family:Arial,Helvetica,sans-serif}.ol-control.ol-bar .ol-control.ol-text-button div:hover{color:rgba(0,60,136,1)}.ol-control.ol-bar.ol-bottom .ol-option-bar{top:auto;bottom:100%}.ol-control.ol-bar.ol-bottom .ol-option-bar:before{border-color:rgba(0,60,136,.5) transparent transparent;bottom:auto;top:100%}.ol-control.ol-bar.ol-left .ol-option-bar{left:100%;top:0;bottom:auto;margin:0 5px}.ol-control.ol-bar.ol-left .ol-option-bar:before{border-color:transparent rgba(0,60,136,.5) transparent transparent;bottom:auto;right:100%;left:auto;top:.3em}.ol-control.ol-bar.ol-right .ol-option-bar{right:100%;left:auto;top:0;bottom:auto;margin:0 5px}.ol-control.ol-bar.ol-right .ol-option-bar:before{border-color:transparent transparent transparent rgba(0,60,136,.5);bottom:auto;left:100%;top:.3em}.ol-control.ol-bar.ol-left .ol-option-bar .ol-option-bar,.ol-control.ol-bar.ol-right .ol-option-bar .ol-option-bar{top:100%;bottom:auto;left:.3em;right:auto;margin:5px 0}.ol-control.ol-bar.ol-right .ol-option-bar .ol-option-bar{right:.3em;left:auto}.ol-control.ol-bar.ol-left .ol-option-bar .ol-option-bar:before,.ol-control.ol-bar.ol-right .ol-option-bar .ol-option-bar:before{border-color:transparent transparent rgba(0,60,136,.5);bottom:100%;top:auto;left:.3em;right:auto}.ol-control.ol-bar.ol-right .ol-option-bar .ol-option-bar:before{right:.3em;left:auto}.ol-control-title{position:absolute;top:0;left:0;right:0}.ol-center-position{position:absolute;bottom:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);background-color:rgba(255,255,255,.8);padding:.1em 1em}.ol-compassctrl{display:none;top:1em;left:auto;right:1em}.ol-compassctrl.ol-visible{display:block!important}.ol-ext-dialog{position:fixed;top:-100%;left:0;width:150%;height:100%;opacity:0;background-color:rgba(0,0,0,.5);z-index:1000;pointer-events:none!important;-webkit-transition:opacity .2s,top 0s .2s;transition:opacity .2s,top 0s .2s}.ol-ext-dialog.ol-visible{opacity:1;top:0;pointer-events:all!important;-webkit-transition:opacity .2s,top 0s;transition:opacity .2s,top 0s}.ol-viewport .ol-ext-dialog{position:absolute}.ol-ext-dialog>form>h2{margin:0 .5em .5em 0;display:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ol-ext-dialog>form,.ol-ext-dialog>form .ol-content{overflow-y:auto;overflow-x:hidden}.ol-ext-dialog>form.ol-title>h2{display:block}.ol-ext-dialog>form{position:absolute;top:0;left:33.33%;min-width:5em;max-width:60%;min-height:3em;max-height:100%;background-color:#fff;border:1px solid #333;-webkit-box-shadow:3px 3px 4px rgba(0,0,0,.5);box-shadow:3px 3px 4px rgba(0,0,0,.5);-webkit-transform:translate(-50%,-30%);transform:translate(-50%,-30%);-webkit-transition:top .2s,-webkit-transform .2s;transition:top .2s,-webkit-transform .2s;transition:top .2s,transform .2s;transition:top .2s,transform .2s,-webkit-transform .2s;padding:1em;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-ext-dialog>form.ol-closebox{padding-top:1.5em}.ol-ext-dialog>form.ol-title{padding-top:1em}.ol-ext-dialog>form.ol-button{padding-bottom:.5em}.ol-ext-dialog.ol-zoom>form{top:30%;-webkit-transform:translate(-50%,-30%) scale(0);transform:translate(-50%,-30%) scale(0)}.ol-ext-dialog.ol-visible>form{top:30%}.ol-ext-dialog.ol-zoom.ol-visible>form{-webkit-transform:translate(-50%,-30%) scale(1);transform:translate(-50%,-30%) scale(1)}.ol-ext-dialog>form .ol-closebox{position:absolute;top:.5em;right:.5em;width:1em;height:1em;cursor:pointer;display:none}.ol-ext-dialog>form.ol-closebox .ol-closebox{display:block}.ol-ext-dialog>form .ol-closebox:after,.ol-ext-dialog>form .ol-closebox:before{content:"";position:absolute;background-color:currentColor;top:50%;left:50%;width:1em;height:.1em;border-radius:.1em;-webkit-transform:translate(-50%,-50%) rotate(45deg);transform:translate(-50%,-50%) rotate(45deg)}.ol-ext-dialog>form .ol-closebox:before{-webkit-transform:translate(-50%,-50%) rotate(-45deg);transform:translate(-50%,-50%) rotate(-45deg)}.ol-ext-dialog>form .ol-buttons{text-align:right;overflow-x:hidden}.ol-ext-dialog>form .ol-buttons input{margin-top:.5em;padding:.5em;background:0 0;border:0;font-size:1em;color:rgba(0,60,136,1);cursor:pointer;border-radius:.25em;outline-width:0}.ol-ext-dialog>form .ol-buttons input:hover{background-color:rgba(0,60,136,.1)}.ol-ext-dialog>form .ol-buttons input[type=submit]{font-weight:700}.ol-ext-dialog .ol-progress-message{font-size:.9em;text-align:center;padding-bottom:.5em}.ol-ext-dialog .ol-progress-bar{border:1px solid #369;width:20em;height:1em;max-width:100%;padding:2px;margin:.5em auto 0;overflow:hidden}.ol-ext-dialog .ol-progress-bar>div{background:#369;height:100%;width:50%;-webkit-transition:width .3s;transition:width .3s}.ol-ext-dialog .ol-progress-bar>div.notransition{-webkit-transition:unset;transition:unset}.ol-ext-dialog.ol-fullscreen-dialog form{top:1em;-webkit-transform:none;transform:none;left:1em;bottom:1em;right:1em;max-width:calc(66.6% - 2em);text-align:center;background:0 0;-webkit-box-shadow:none;box-shadow:none;border:none;color:#fff}.ol-ext-dialog.ol-fullscreen-dialog form .ol-closebox{top:0;right:0;font-size:2em}.ol-ext-dialog.ol-fullscreen-dialog .ol-closebox:after,.ol-ext-dialog.ol-fullscreen-dialog .ol-closebox:before{border:.1em solid currentColor}.ol-ext-dialog.ol-fullscreen-dialog img,.ol-ext-dialog.ol-fullscreen-dialog video{max-width:100%}body>.ol-ext-dialog .ol-content{max-height:calc(100vh - 10em)}body>.ol-ext-dialog>form{overflow:visible}.ol-editbar .ol-button button{position:relative;display:inline-block;font-style:normal;-webkit-box-sizing:border-box;box-sizing:border-box;vertical-align:middle}.ol-editbar .ol-button button:after,.ol-editbar .ol-button button:before{content:"";border-width:0;position:absolute;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:currentColor}.ol-editbar .ol-button button:focus{outline:0}.ol-editbar .ol-selection>button:before{width:.6em;height:1em;background-color:transparent;border:.5em solid currentColor;border-width:0 .25em .65em;border-color:currentColor transparent;-webkit-box-shadow:0 .6em 0 -.23em;box-shadow:0 .6em 0 -.23em;top:.35em;left:.5em;-webkit-transform:translate(-50%,-50%) rotate(-30deg);transform:translate(-50%,-50%) rotate(-30deg)}.ol-editbar .ol-selection0>button:after{width:.28em;height:.6em;background-color:transparent;border:.5em solid currentColor;border-width:0 .05em .7em;border-color:currentColor transparent;top:.5em;left:.7em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.ol-editbar .ol-delete button:after,.ol-editbar .ol-delete button:before{width:1em;height:.2em;top:50%;left:50%;-webkit-transform:translate(-50%,-50%) rotate(45deg);transform:translate(-50%,-50%) rotate(45deg)}.ol-editbar .ol-delete button:after{-webkit-transform:translate(-50%,-50%) rotate(-45deg);transform:translate(-50%,-50%) rotate(-45deg)}.ol-editbar .ol-info button:before{width:.25em;height:.6em;border-radius:.03em;top:.47em;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ol-editbar .ol-info button:after{width:.25em;height:.2em;border-radius:.03em;-webkit-box-shadow:-.1em .35em,-.1em .82em,.1em .82em;box-shadow:-.1em .35em,-.1em .82em,.1em .82em;top:.12em;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ol-editbar .ol-drawpoint button:before{width:.7em;height:.7em;border-radius:50%;border:.15em solid currentColor;background-color:transparent;top:.2em;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ol-editbar .ol-drawpoint button:after{width:.4em;height:.4em;border:.15em solid currentColor;border-color:currentColor transparent;border-width:.4em .2em 0;background-color:transparent;top:.8em;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ol-editbar .ol-drawhole>button:before,.ol-editbar .ol-drawline>button:before,.ol-editbar .ol-drawpolygon>button:before{width:.8em;height:.8em;border:.13em solid currentColor;background-color:transparent;border-width:.2em .13em .09em;top:.2em;left:.25em;-webkit-transform:rotate(10deg) perspective(1em) rotateX(40deg);transform:rotate(10deg) perspective(1em) rotateX(40deg)}.ol-editbar .ol-drawline>button:before{border-bottom:0}.ol-editbar .ol-drawhole>button:after,.ol-editbar .ol-drawline>button:after,.ol-editbar .ol-drawpolygon>button:after{width:.3em;height:.3em;top:.2em;left:.25em;-webkit-box-shadow:-.2em .55em,.6em .1em,.65em .7em;box-shadow:-.2em .55em,.6em .1em,.65em .7em}.ol-editbar .ol-drawhole>button:after{-webkit-box-shadow:-.2em .55em,.6em .1em,.65em .7em,.25em .35em;box-shadow:-.2em .55em,.6em .1em,.65em .7em,.25em .35em}.ol-editbar .ol-offset>button i,.ol-editbar .ol-transform>button i{position:absolute;width:.9em;height:.9em;overflow:hidden;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ol-editbar .ol-offset>button i{width:.8em;height:.8em}.ol-editbar .ol-offset>button i:before,.ol-editbar .ol-transform>button i:after,.ol-editbar .ol-transform>button i:before{content:"";height:1em;top:50%;left:50%;-webkit-transform:translate(-50%,-50%) rotate(45deg);transform:translate(-50%,-50%) rotate(45deg);-webkit-box-shadow:.5em 0 0 .1em,-.5em 0 0 .1em;box-shadow:.5em 0 0 .1em,-.5em 0 0 .1em;width:.1em;position:absolute;background-color:currentColor}.ol-editbar .ol-offset>button i:before{-webkit-box-shadow:.45em 0 0 .1em,-.45em 0 0 .1em;box-shadow:.45em 0 0 .1em,-.45em 0 0 .1em}.ol-editbar .ol-transform>button i:after{-webkit-transform:translate(-50%,-50%) rotate(-45deg);transform:translate(-50%,-50%) rotate(-45deg)}.ol-editbar .ol-split>button:before{width:.3em;height:.3em;top:.81em;left:.75em;border-radius:50%;-webkit-box-shadow:.1em -.4em,-.15em -.25em;box-shadow:.1em -.4em,-.15em -.25em}.ol-editbar .ol-split>button:after{width:.8em;height:.8em;top:.15em;left:-.1em;border:.1em solid currentColor;border-width:0 .2em .2em 0;background-color:transparent;border-radius:.1em;-webkit-transform:rotate(20deg) scaleY(.6) rotate(-45deg);transform:rotate(20deg) scaleY(.6) rotate(-45deg)}.ol-editbar .ol-drawregular>button:before{width:.9em;height:.9em;top:50%;left:50%;border:.1em solid currentColor;background-color:transparent;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ol-editbar .ol-drawregular .ol-bar .ol-text-button>div>div>div{border:.5em solid currentColor;border-color:transparent currentColor;display:inline-block;cursor:pointer;vertical-align:text-bottom}.ol-control.ol-bar.ol-editbar .ol-drawregular .ol-bar,.ol-editbar .ol-drawregular .ol-bar:before{left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ol-editbar .ol-drawregular .ol-bar .ol-text-button{min-width:6em;text-align:center}.ol-editbar .ol-drawregular .ol-bar .ol-text-button>div>div>div:first-child{border-width:.5em .5em .5em 0;margin:0 .5em 0 0}.ol-editbar .ol-drawregular .ol-bar .ol-text-button>div>div>div:last-child{border-width:.5em 0 .5em .5em;margin:0 0 0 .5em}.ol-gauge{top:.5em;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ol-gauge>*{display:inline-block;vertical-align:middle}.ol-gauge>span{margin:0 .5em}.ol-gauge>div{display:inline-block;width:200px;border:1px solid rgba(0,60,136,.5);border-radius:3px;padding:1px}.ol-gauge button{height:.8em;margin:0;max-width:100%}.ol-control.ol-bookmark{top:.5em;left:3em}.ol-control.ol-bookmark button{position:relative}.ol-control.ol-bookmark>button::before,.ol-control.ol-bookmark>div button:before,.ol-control.ol-geobt button:before{position:absolute;-webkit-transform:translate(-50%,-50%);top:50%}.ol-control.ol-bookmark>button::before{content:"";border-width:10px 5px 4px;border-style:solid;border-color:#fff #fff transparent;left:50%;transform:translate(-50%,-50%);height:0}.ol-control.ol-bookmark>div{display:none;min-width:5em}.ol-control.ol-bookmark input{font-size:.9em;margin:.1em 0;padding:0 .5em}.ol-control.ol-bookmark ul,.ol-gridreference ul{margin:0;padding:0;list-style:none}.ol-control.ol-bookmark ul{min-width:10em}.ol-control.ol-bookmark li{color:rgba(0,60,136,.8);font-size:.9em;padding:0 .2em 0 .5em;cursor:default;clear:both}.ol-control.ol-bookmark li:hover{background-color:rgba(0,60,136,.5);color:#fff}.ol-control.ol-bookmark>div button{width:1em;height:.8em;float:right;background-color:transparent;cursor:pointer;border-radius:0}.ol-control.ol-bookmark>div button:before{content:"\2A2F";color:#936;font-size:1.2em;line-height:1em;border-radius:0;left:50%;transform:translate(-50%,-50%)}.ol-bookmark input,.ol-bookmark ul li button{display:none}.ol-bookmark.ol-editable input,.ol-bookmark.ol-editable ul li button{display:block}.ol-control.ol-geobt{top:auto;left:auto;right:.5em;bottom:3em}.ol-touch .ol-control.ol-geobt{bottom:3.5em}.ol-control.ol-geobt button:before{content:"";background:0 0;left:50%;transform:translate(-50%,-50%);border:.16em solid currentColor;width:.4em;height:.4em;border-radius:50%}.ol-bar.ol-geobar .startBt button:before,.ol-control.ol-geobt button:after{-webkit-transform:translate(-50%,-50%);content:"";position:absolute}.ol-control.ol-geobt button:after{width:.2em;height:.2em;background:0 0;top:50%;left:50%;transform:translate(-50%,-50%);-webkit-box-shadow:.42em 0,-.42em 0,0 .42em,0 -.42em;box-shadow:.42em 0,-.42em 0,0 .42em,0 -.42em}.ol-control.ol-bar.ol-geobar .ol-control{display:inline-block;vertical-align:middle}.ol-control.ol-bar.ol-geobar .ol-bar{display:none}.ol-bar.ol-geobar.ol-active .ol-bar{display:inline-block}.ol-bar.ol-geobar .geolocBt button:after,.ol-bar.ol-geobar .geolocBt button:before{content:"";display:block;position:absolute;border:1px solid transparent;border-width:.3em .8em 0 .2em;border-color:#fff transparent transparent;-webkit-transform:rotate(-30deg);transform:rotate(-30deg);top:.45em;left:.15em;font-size:1.2em}.ol-bar.ol-geobar .geolocBt button:after{border-width:0 .8em .3em .2em;border-color:transparent transparent #fff;-webkit-transform:rotate(-61deg);transform:rotate(-61deg)}.ol-bar.ol-geobar .startBt button:before{display:block;width:1em;height:1em;background-color:#800;border-radius:50%;top:50%;left:50%;transform:translate(-50%,-50%)}.ol-bar.ol-geobar .pauseBt button:after,.ol-bar.ol-geobar .pauseBt button:before{content:"";display:block;position:absolute;width:.25em;height:1em;background-color:#fff;top:50%;left:35%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ol-bar.ol-geobar .pauseBt button:after{left:65%}.ol-bar.ol-geobar.centerTrack .pauseBt,.ol-bar.ol-geobar.centerTrack .startBt,.ol-bar.ol-geobar.centerTrack.pauseTrack .pauseBt,.ol-bar.ol-geobar.pauseTrack .startBt,.ol-control.ol-bar.ol-geobar .centerBt,.ol-control.ol-bar.ol-geobar .pauseBt{display:none}.ol-bar.ol-geobar.centerTrack .centerBt,.ol-bar.ol-geobar.pauseTrack .pauseBt{display:inline-block}.ol-control.ol-globe{position:absolute;left:.5em;bottom:.5em;border-radius:50%;opacity:.7;transform:scale(.5);transform-origin:0 100%;-webkit-transform:scale(.5);-webkit-transform-origin:0 100%}.ol-control.ol-globe:hover{opacity:.9}.ol-control.ol-globe .panel{display:block;width:170px;height:170px;background-color:#fff;cursor:pointer;border-radius:50%;overflow:hidden;-webkit-box-shadow:0 0 10px 5px rgba(255,255,255,.5);box-shadow:0 0 10px 5px rgba(255,255,255,.5)}.ol-control.ol-globe .panel .ol-viewport{border-radius:50%}.ol-control.ol-globe .ol-pointer{display:block;background-color:#fff;width:10px;height:10px;border:10px solid red;position:absolute;top:50%;left:50%;transform:translate(-15px,-40px);-webkit-transform:translate(-15px,-40px);border-radius:50%;z-index:1;transition:opacity .15s,top 0s,left 0s;-webkit-transition:opacity .15s,top 0s,left 0s}.ol-control.ol-globe .ol-pointer::after,.ol-control.ol-globe .ol-pointer::before{width:0;height:0;content:"";display:block;position:absolute}.ol-control.ol-globe .ol-pointer.hidden{opacity:0;transition:opacity .15s,top 3s,left 5s;-webkit-transition:opacity .15s,top 3s,left 5s}.ol-control.ol-globe .ol-pointer::before{border-radius:50%;-webkit-box-shadow:6px 6px 10px 5px #000;box-shadow:6px 6px 10px 5px #000;left:0;top:23px}.ol-control.ol-globe .ol-pointer::after{border-width:20px 10px 0;border-color:red transparent;border-style:solid;left:-50%;top:100%}.ol-control.ol-globe .panel::before{border-radius:50%;-webkit-box-shadow:-20px -20px 80px 2px rgba(0,0,0,.7) inset;box-shadow:-20px -20px 80px 2px rgba(0,0,0,.7) inset;content:"";display:block;height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}.ol-control.ol-globe .panel::after{border-radius:50%;-webkit-box-shadow:0 0 20px 7px rgba(255,255,255,1);box-shadow:0 0 20px 7px rgba(255,255,255,1);content:"";display:block;height:0;left:23%;position:absolute;top:20%;-webkit-transform:rotate(-40deg);transform:rotate(-40deg);width:20%;z-index:1}.ol-control.ol-globe.ol-collapsed .panel,.ol-control.ol-isochrone.ol-collapsed .content,.ol-imageline .ol-image span,.ol-imageline.ol-scroll0.ol-arrow:before,.ol-imageline.ol-scroll1.ol-arrow:after,.ol-isochrone .ol-distance,.ol-isochrone .ol-time{display:none}.ol-control-top.ol-globe{bottom:auto;top:5em;transform-origin:0 0;-webkit-transform-origin:0 0}.ol-control-right.ol-globe{left:auto;right:.5em;transform-origin:100% 100%;-webkit-transform-origin:100% 100%}.ol-control-right.ol-control-top.ol-globe{left:auto;right:.5em;transform-origin:100% 0;-webkit-transform-origin:100% 0}.ol-gridreference{background:#fff;border:1px solid #000;overflow:auto;max-height:100%;top:0;right:0}.ol-gridreference input{width:100%}.ol-gridreference li{padding:0 .5em;cursor:pointer}.ol-gridreference ul li:hover{background-color:#ccc}.ol-gridreference li.ol-title,.ol-gridreference li.ol-title:hover{background:rgba(0,60,136,.5);color:#fff;cursor:default}.ol-gridreference ul li .ol-ref{margin-left:.5em}.ol-gridreference ul li .ol-ref:before{content:"("}.ol-gridreference ul li .ol-ref:after{content:")"}.ol-control.ol-imageline{bottom:0;left:0;right:0;padding:0;overflow:visible;-webkit-transition:.3s;transition:.3s;border-radius:0}.ol-control.ol-imageline.ol-collapsed{-webkit-transform:translateY(100%);transform:translateY(100%)}.ol-imageline>div{height:4em;position:relative;white-space:nowrap;scroll-behavior:smooth;overflow:hidden;width:100%}.ol-imageline>div.ol-move{scroll-behavior:unset}.ol-control.ol-imageline button{position:absolute;top:-1em;-webkit-transform:translateY(-100%);transform:translateY(-100%);margin:.65em;-webkit-box-shadow:0 0 0 .15em rgba(255,255,255,.4);box-shadow:0 0 0 .15em rgba(255,255,255,.4)}.ol-control.ol-imageline button:before{content:'';position:absolute;-webkit-transform:translate(-50%,-50%) rotate(135deg);transform:translate(-50%,-50%) rotate(135deg);top:40%;left:50%;width:.4em;height:.4em;border:.1em solid currentColor;border-width:.15em .15em 0 0}.ol-control.ol-imageline.ol-collapsed button:before{top:60%;-webkit-transform:translate(-50%,-50%) rotate(-45deg);transform:translate(-50%,-50%) rotate(-45deg)}.ol-imageline,.ol-imageline:hover{background-color:rgba(0,0,0,.75)}.ol-imageline.ol-arrow:after,.ol-imageline.ol-arrow:before{content:"";position:absolute;top:50%;left:.2em;border-color:#fff #000;border-width:1em .6em 1em 0;border-style:solid;-webkit-transform:translateY(-50%);transform:translateY(-50%);z-index:1;opacity:.8;pointer-events:none;-webkit-box-shadow:-.6em 0 0 1em #fff;box-shadow:-.6em 0 0 1em #fff}.ol-imageline.ol-arrow:after{border-width:1em 0 1em .6em;left:auto;right:.2em;-webkit-box-shadow:.6em 0 0 1em #fff;box-shadow:.6em 0 0 1em #fff}.ol-imageline .ol-image{position:relative;height:100%;display:inline-block;cursor:pointer}.ol-imageline img{max-height:100%;border:.25em solid transparent;-webkit-box-sizing:border-box;box-sizing:border-box;opacity:0;-webkit-transition:1s;transition:1s}.ol-imageline img.ol-loaded{opacity:1}.ol-imageline .ol-image.select{background-color:#fff}.ol-imageline .ol-image span{position:absolute;width:125%;max-height:2.4em;left:50%;bottom:0;color:#fff;background-color:rgba(0,0,0,.5);font-size:.8em;overflow:hidden;white-space:normal;text-align:center;line-height:1.2em;-webkit-transform:translateX(-50%) scaleX(.8);transform:translateX(-50%) scaleX(.8)}.ol-imageline .ol-image:hover span{display:block}.ol-control.ol-routing.ol-isochrone .ol-method-distance,.ol-control.ol-routing.ol-isochrone .ol-method-time,.ol-control.ol-routing.ol-isochrone>button{position:relative}.ol-control.ol-routing.ol-isochrone .ol-method-time:before,.ol-control.ol-routing.ol-isochrone>button:before{content:'';position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);border:.1em solid currentColor;width:.8em;height:.8em;border-radius:50%;-webkit-box-shadow:0 -.5em 0 -.35em,.4em -.35em 0 -.35em;box-shadow:0 -.5em 0 -.35em,.4em -.35em 0 -.35em;clip:unset}.ol-control.ol-routing.ol-isochrone .ol-method-time:after,.ol-control.ol-routing.ol-isochrone>button:after{content:'';position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%) rotate(-60deg);transform:translate(-50%,-50%) rotate(-60deg);border-radius:50%;border:.3em solid transparent;border-right-color:currentColor;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;clip:unset}.ol-control.ol-routing.ol-isochrone .ol-method-distance:before{content:'';position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%) rotate(-30deg);transform:translate(-50%,-50%) rotate(-30deg);width:1em;height:.5em;border:.1em solid currentColor;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-control.ol-routing.ol-isochrone .ol-method-distance:after{content:'';position:absolute;width:.1em;height:.15em;top:50%;left:50%;-webkit-transform:translate(-50%,-50%) rotate(-30deg);transform:translate(-50%,-50%) rotate(-30deg);-webkit-box-shadow:inset 0 -.15em,0 .1em,.25em .1em,-.25em .1em;box-shadow:inset 0 -.15em,0 .1em,.25em .1em,-.25em .1em}.ol-control.ol-routing.ol-isochrone .ol-direction-direct:before,.ol-control.ol-routing.ol-isochrone .ol-direction-reverse:before{content:'';position:absolute;top:50%;left:30%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:.3em;height:.3em;border-radius:50%;border:.1em solid currentColor;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:.25em 0 0 -.05em;box-shadow:.25em 0 0 -.05em}.ol-control.ol-routing.ol-isochrone .ol-direction-direct:after,.ol-control.ol-routing.ol-isochrone .ol-direction-reverse:after{content:'';position:absolute;top:50%;left:70%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);border:.4em solid transparent;border-width:.4em 0 .4em .4em;border-color:transparent currentColor}.ol-control.ol-routing.ol-isochrone .ol-direction-reverse:after{border-width:.4em .4em .4em 0}.ol-control.ol-isochrone input[type=number]{width:3em;text-align:right;margin:0 .1em}.ol-control.ol-isochrone .ol-distance input[type=number]{width:5em}.ol-isochrone .ol-distance.selected,.ol-isochrone .ol-time.selected{display:block}.ol-control.ol-layerswitcher-popup{position:absolute;right:.5em;text-align:left;top:3em}.ol-control.ol-layerswitcher-popup .panel{clear:both;background:#fff}.ol-layerswitcher-popup .panel{list-style:none;padding:.25em;margin:0;overflow:hidden}.ol-layerswitcher-popup .panel ul{list-style:none;padding:0 0 0 20px;overflow:hidden}.ol-layerswitcher-popup.ol-collapsed .panel{display:none}.ol-layerswitcher-popup.ol-forceopen .panel{display:block}.ol-layerswitcher-popup button{background-color:#fff;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAACE1BMVEX///8A//8AgICA//8AVVVAQID///8rVVVJtttgv98nTmJ2xNgkW1ttyNsmWWZmzNZYxM4gWGgeU2JmzNNr0N1Rwc0eU2VXxdEhV2JqytQeVmMhVmNoydUfVGUgVGQfVGQfVmVqy9hqy9dWw9AfVWRpydVry9YhVmMgVGNUw9BrytchVWRexdGw294gVWQgVmUhVWPd4N6HoaZsy9cfVmQgVGRrytZsy9cgVWQgVWMgVWRsy9YfVWNsy9YgVWVty9YgVWVry9UgVWRsy9Zsy9UfVWRsy9YgVWVty9YgVWRty9Vsy9aM09sgVWRTws/AzM0gVWRtzNYgVWRuy9Zsy9cgVWRGcHxty9bb5ORbxdEgVWRty9bn6OZTws9mydRfxtLX3Nva5eRix9NFcXxOd4JPeINQeIMiVmVUws9Vws9Vw9BXw9BYxNBaxNBbxNBcxdJexdElWWgmWmhjyNRlx9IqXGtoipNpytVqytVryNNrytZsjZUuX210k5t1y9R2zNR3y9V4lp57zth9zdaAnKOGoaeK0NiNpquV09mesrag1tuitbmj1tuj19uktrqr2d2svcCu2d2xwMO63N+7x8nA3uDC3uDFz9DK4eHL4eLN4eIyYnDX5OM5Z3Tb397e4uDf4uHf5uXi5ePi5+Xj5+Xk5+Xm5+Xm6OY6aHXQ19fT4+NfhI1Ww89gx9Nhx9Nsy9ZWw9Dpj2abAAAAWnRSTlMAAQICAwQEBgcIDQ0ODhQZGiAiIyYpKywvNTs+QklPUlNUWWJjaGt0dnd+hIWFh4mNjZCSm6CpsbW2t7nDzNDT1dje5efr7PHy9PT29/j4+Pn5+vr8/f39/f6DPtKwAAABTklEQVR4Xr3QVWPbMBSAUTVFZmZmhhSXMjNvkhwqMzMzMzPDeD+xASvObKePPa+ffHVl8PlsnE0+qPpBuQjVJjno6pZpSKXYl7/bZyFaQxhf98hHDKEppwdWIW1frFnrxSOWHFfWesSEWC6R/P4zOFrix3TzDFLlXRTR8c0fEEJ1/itpo7SVO9Jdr1DVxZ0USyjZsEY5vZfiiAC0UoTGOrm9PZLuRl8X+Dq1HQtoFbJZbv61i+Poblh/97TC7n0neCcK0ETNUrz1/xPHf+DNAW9Ac6t8O8WH3Vp98f5lCaYKAOFZMLyHL4Y0fe319idMNgMMp+zWVSybUed/+/h7I4wRAG1W6XDy4XmjR9HnzvDRZXUAYDFOhC1S/Hh+fIXxen+eO+AKqbs+wAo30zDTDvDxKoJN88sjUzDFAvBzEUGFsnADoIvAJzoh2BZ8sner+Ke/vwECuQAAAABJRU5ErkJggg==);background-position:center;background-repeat:no-repeat;float:right;height:38px;width:38px}.ol-layerswitcher-popup li{color:#369;padding:.25em 1em;font-family:"Trebuchet MS",Helvetica,sans-serif;cursor:pointer}.ol-layerswitcher-popup li.ol-header{display:none}.ol-layerswitcher-popup li.ol-visible,.ol-layerswitcher-popup li.select{background:rgba(0,60,136,.7);color:#fff}.ol-layerswitcher-popup li:hover{background:rgba(0,60,136,.9);color:#fff}.ol-control.ol-layerswitcher.ol-layer-shop{height:calc(100% - 4em);max-height:unset;max-width:16em;background-color:transparent;pointer-events:none!important;overflow:visible}.ol-control.ol-layerswitcher>*{pointer-events:auto}.ol-control.ol-layer-shop .panel-container,.ol-control.ol-layer-shop>button{-webkit-box-shadow:0 0 0 3px rgba(255,255,255,.5);box-shadow:0 0 0 3px rgba(255,255,255,.5)}.ol-control.ol-layerswitcher.ol-layer-shop .panel-container{overflow-y:scroll;max-height:calc(100% - 6.5em);border:2px solid #369;border-width:2px 0;padding:0}.ol-control.ol-layer-shop .panel{padding:0;-webkit-box-sizing:border-box;box-sizing:border-box;margin:.25em .5em}.ol-control.ol-layerswitcher.ol-layer-shop .panel-container.ol-scrolldiv{overflow:hidden}.ol-control.ol-layer-shop .ol-scroll{background-color:rgba(0,0,0,.3);opacity:.5}.ol-layerswitcher.ol-layer-shop ul.panel li.ol-header{display:none}.ol-layerswitcher.ol-layer-shop ul.panel li{margin-right:0;padding-right:0}.ol-layerswitcher.ol-layer-shop .layerup{height:1.5em;width:1.4em;margin:0;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:3px;background-color:transparent;color:rgba(0,60,136,1)}.ol-layerswitcher.ol-layer-shop .layerup:hover{background-color:rgba(0,60,136,.3)}.ol-layerswitcher.ol-layer-shop .layerup:before{top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);border:0;background-color:currentColor;width:1em;height:2px;-webkit-box-shadow:0 -4px,0 4px;box-shadow:0 -4px,0 4px}.ol-layerswitcher.ol-layer-shop .layerup:after{content:unset}.ol-control.ol-layer-shop .ol-title-bar{background-color:rgba(255,255,255,.5);font-size:.9em;height:calc(2.8em - 4px);max-width:14.6em;padding:.7em .5em;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right;-webkit-transform:scaleY(1.1);transform:scaleY(1.1);-webkit-transition:width 0s,-webkit-transform .1s;transition:width 0s,-webkit-transform .1s;transition:transform .1s,width 0s;transition:transform .1s,width 0s,-webkit-transform .1s;-webkit-transform-origin:100% 0;transform-origin:100% 0}.ol-control.ol-layer-shop:hover .ol-title-bar{background-color:rgba(255,255,255,.7)}.ol-control.ol-layer-shop.ol-collapsed .ol-title-bar{max-width:10em;-webkit-transform:scale(.9,1.1);transform:scale(.9,1.1)}.ol-control.ol-layer-shop.ol-forceopen .ol-title-bar{max-width:14.6em;-webkit-transform:scaleY(1.1);transform:scaleY(1.1)}.ol-control.ol-layer-shop .ol-bar{position:relative;height:1.75em;clear:both;-webkit-box-shadow:0 0 0 3px rgba(255,255,255,.5);box-shadow:0 0 0 3px rgba(255,255,255,.5);background-color:#fff;text-align:right;z-index:10}.ol-control.ol-layer-shop.ol-collapsed .ol-bar,.ol-control.ol-layer-shop.ol-collapsed .ol-scroll{border-width:2px 0 0;display:none}.ol-control.ol-layer-shop.ol-forceopen .ol-bar,.ol-control.ol-layer-shop.ol-forceopen .ol-scroll{display:block}.ol-control.ol-layer-shop .ol-bar>*{font-size:.9em;display:inline-block;vertical-align:middle;margin-top:.25em;background-color:transparent}.ol-layer-shop .ol-bar .ol-button,.ol-touch .ol-layer-shop .ol-bar .ol-button{position:relative;top:unset;left:unset;bottom:unset;right:unset;margin:0}.ol-layer-shop .ol-bar button{background-color:#fff;color:rgba(0,60,136,1)}.ol-layer-shop .ol-bar button:hover{background-color:rgba(0,60,136,.2)}.ol-touch .ol-layerswitcher.ol-layer-shop>button{font-size:1.7em}.ol-touch .ol-layer-shop .ol-bar{height:2em}.ol-touch .ol-layer-shop .ol-control button{font-size:1.4em}.ol-touch .ol-control.ol-layer-shop .panel{max-height:calc(100% - 7em)}.ol-touch .ol-control.ol-layer-shop .panel label{height:1.8em}.ol-touch .ol-control.ol-layer-shop .panel label span{margin-left:.5em;padding-top:.25em}.ol-touch .ol-control.ol-layer-shop .panel label:after,.ol-touch .ol-control.ol-layer-shop .panel label:before{font-size:1.3em;z-index:1}.ol-control.ol-layerswitcher{position:absolute;right:.5em;text-align:left;top:3em;max-height:calc(100% - 6em);-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.ol-control.ol-layerswitcher .ol-switcherbottomdiv,.ol-control.ol-layerswitcher .ol-switchertopdiv{display:block;position:absolute;top:0;left:0;right:0;height:45px;background:#fff;z-index:2;opacity:1;cursor:pointer;border-top:2px solid transparent;border-bottom:2px solid #369;margin:0 2px;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-control.ol-layerswitcher.ol-collapsed .ol-switcherbottomdiv,.ol-control.ol-layerswitcher.ol-collapsed .ol-switchertopdiv{display:none}.ol-layerswitcher.ol-forceopen.ol-collapsed .ol-switcherbottomdiv,.ol-layerswitcher.ol-forceopen.ol-collapsed .ol-switchertopdiv{display:block}.ol-control.ol-layerswitcher .ol-switcherbottomdiv{top:auto;bottom:0;height:2em;border-top:2px solid #369;border-bottom:2px solid transparent}.ol-control.ol-layerswitcher .ol-switcherbottomdiv:before,.ol-control.ol-layerswitcher .ol-switchertopdiv:before{content:"";position:absolute;left:50%;top:50%;border:10px solid transparent;width:0;height:0;transform:translate(-50%,-50%);-webkit-transform:translate(-50%,-50%);opacity:.8}.ol-control.ol-layerswitcher .ol-switcherbottomdiv:hover:before,.ol-control.ol-layerswitcher .ol-switchertopdiv:hover:before{opacity:1}.ol-control.ol-layerswitcher .ol-switchertopdiv:before{border-bottom-color:#369;border-top:0}.ol-control.ol-layerswitcher .ol-switcherbottomdiv:before{border-top-color:#369;border-bottom:0}.ol-control.ol-layerswitcher .panel-container{background-color:#fff;border-radius:0 0 2px 2px;clear:both;display:block;padding:.5em .5em 0}.ol-layerswitcher .panel{list-style:none;padding:0;margin:0;overflow:hidden;font-family:Tahoma,Geneva,sans-serif;font-size:.9em;-webkit-transition:top .3s;transition:top .3s;position:relative;top:0}.ol-layerswitcher .panel ul{list-style:none;padding:0 0 0 20px;overflow:hidden;clear:both}.ol-layerswitcher input[type=radio],.ol-layerswitcher input[type=checkbox]{display:none}.ol-layerswitcher .panel li{-weblit-transition:-webkit-transform .2s linear;-webkit-transition:-webkit-transform .2s linear;transition:-webkit-transform .2s linear;transition:transform .2s linear;transition:transform .2s linear,-webkit-transform .2s linear;clear:both;display:block;border:1px solid transparent;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-layerswitcher .panel li.ol-layer-select{background-color:rgba(0,60,136,.2);margin:0 -.5em;padding:0 .5em}.ol-layerswitcher .panel li.drag{opacity:.5;transform:scale(.8);-webkit-transform:scale(.8)}.ol-dragover{background:rgba(51,102,153,.5);opacity:.8}.forbidden .layerswitcher-opacity div,.forbidden .ol-layerswitcher-buttons div,.ol-layerswitcher .panel li.forbidden{background:rgba(255,0,0,.5);color:red!important}.ol-layerswitcher.drag,.ol-layerswitcher.drag *{cursor:not-allowed!important;cursor:no-drop!important}.ol-layerswitcher.drag .panel li.dropover,.ol-layerswitcher.drag .panel li.dropover *{cursor:pointer!important;cursor:n-resize!important;cursor:ns-resize!important;cursor:-webkit-grab!important;cursor:grab!important;cursor:-webkit-grabbing!important;cursor:grabbing!important}.ol-layerswitcher .panel li.dropover{background:rgba(51,102,153,.5)}.ol-layerswitcher .panel li label{display:inline-block;height:1.4em;max-width:12em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:0 0 0 1.7em;position:relative}.ol-layerswitcher .panel li label span{display:inline-block;width:100%;height:100%;overflow:hidden;text-overflow:ellipsis;padding-right:.2em}.ol-layerswitcher [type=radio]+label:before,.ol-layerswitcher [type=radio]:checked+label:after,.ol-layerswitcher [type=checkbox]+label:before,.ol-layerswitcher [type=checkbox]:checked+label:after{content:'';position:absolute;left:.1em;top:.1em;width:1.2em;height:1.2em;border:2px solid #369;background:#fff;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-layerswitcher [type=radio]+label:after,.ol-layerswitcher [type=radio]+label:before{border-radius:50%}.ol-layerswitcher [type=radio]:checked+label:after{background:#369;margin:.3em;width:.6em;height:.6em}.ol-layerswitcher [type=checkbox]:checked+label:after{background:0 0;border-width:0 3px 3px 0;border-style:solid;border-color:#369;width:.7em;height:1em;-webkit-transform:rotate(45deg);transform:rotate(45deg);left:.55em;top:-.05em;-webkit-box-shadow:1px 0 1px 1px #fff;box-shadow:1px 0 1px 1px #fff}.ol-layerswitcher .panel li.ol-layer-hidden{opacity:.6}.ol-layerswitcher.ol-collapsed .panel-container{display:none}.ol-layerswitcher.ol-forceopen .panel-container{display:block}.ol-layerswitcher>button{background-color:#fff;float:right;z-index:10;position:relative;font-size:1.7em}.ol-touch .ol-layerswitcher>button{font-size:2.5em}.ol-layerswitcher>button:after,.ol-layerswitcher>button:before{content:"";position:absolute;width:.75em;height:.75em;border-radius:.15em;-webkit-transform:scaleY(.8) rotate(45deg);transform:scaleY(.8) rotate(45deg)}.ol-layerswitcher>button:before{background:#e2e4e1;top:.32em;left:.34em;-webkit-box-shadow:.1em .1em #325158;box-shadow:.1em .1em #325158}.ol-layerswitcher>button:after{top:.22em;left:.34em;background:#83bcc5;background-image:radial-gradient(circle at .85em .6em,#70b3be 0,#70b3be .65em,#83bcc5 .65em)}.ol-layerswitcher-buttons{display:block;float:right;text-align:right}.ol-layerswitcher .panel li>div,.ol-layerswitcher-buttons>div{display:inline-block;position:relative}.ol-layerswitcher-buttons>div{cursor:pointer;height:1em;width:1em;margin:2px;line-height:1em;text-align:center;background:#369;vertical-align:middle;color:#fff}.ol-layerswitcher .ol-separator{display:block;width:0;height:0;padding:0;margin:0}.ol-layerswitcher .layerup{float:right;height:2.5em;background-color:#369;opacity:.5;cursor:move;cursor:ns-resize}.ol-layerswitcher .layerup:after,.ol-layerswitcher .layerup:before{border-color:#fff transparent;border-style:solid;border-width:.4em .4em 0;content:"";height:0;position:absolute;bottom:3px;left:.1em;width:0}.ol-layerswitcher .layerup:after{border-width:0 .4em .4em;top:3px;bottom:auto}.ol-layerswitcher .layerInfo{background:#369;border-radius:100%}.ol-layerswitcher .layerInfo:before{color:#fff;content:"i";display:block;font-size:.8em;font-weight:700;text-align:center;width:1.25em;position:absolute;left:0;top:0}.ol-layerswitcher .layerTrash{background:#369}.ol-layerswitcher .layerTrash:before{color:#fff;content:"\00d7";font-size:1em;top:50%;left:0;right:0;text-align:center;line-height:1em;margin:-.5em 0;position:absolute}.ol-layerswitcher .layerExtent{background:#369}.ol-layerswitcher .layerExtent:before{border-right:1px solid #fff;border-bottom:1px solid #fff;content:"";display:block;position:absolute;left:6px;right:2px;top:6px;bottom:3px}.ol-layerswitcher .layerExtent:after{border-left:1px solid #fff;border-top:1px solid #fff;content:"";display:block;position:absolute;bottom:6px;left:2px;right:6px;top:3px}.ol-layerswitcher .collapse-layers,.ol-layerswitcher .expend-layers{margin:0 2px;background-color:transparent}.ol-layerswitcher .collapse-layers:before,.ol-layerswitcher .expend-layers:before{content:"";position:absolute;top:50%;left:0;margin-top:-2px;height:4px;width:100%;background:#369}.ol-layerswitcher .expend-layers:after{content:"";position:absolute;left:50%;top:0;margin-left:-2px;width:4px;height:100%;background:#369}.ol-layerswitcher .layerswitcher-opacity{position:relative;border:1px solid #369;height:3px;width:120px;margin:5px 1em 10px 7px;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:3px;background:#69c;background:-webkit-gradient(linear,left top,right top,from(rgba(0,60,136,0)),to(rgba(0,60,136,.6)));background:linear-gradient(to right,rgba(0,60,136,0),rgba(0,60,136,.6));cursor:pointer;-webkit-box-shadow:1px 1px 1px rgba(0,0,0,.5);box-shadow:1px 1px 1px rgba(0,0,0,.5)}.ol-layerswitcher .layerswitcher-opacity .layerswitcher-opacity-cursor,.ol-layerswitcher .layerswitcher-opacity .layerswitcher-opacity-cursor:before{position:absolute;width:20px;height:20px;top:50%;left:50%;background:rgba(0,60,136,.5);border-radius:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);z-index:1}.ol-layerswitcher-image button,.ol-permalink button{background-position:center;background-repeat:no-repeat}.ol-layerswitcher .layerswitcher-opacity .layerswitcher-opacity-cursor:before{content:"";position:absolute;width:50%;height:50%}.ol-touch .ol-layerswitcher .layerswitcher-opacity .layerswitcher-opacity-cursor{width:26px;height:26px}.ol-layerswitcher .layerswitcher-opacity-label{display:none;position:absolute;right:-2.5em;bottom:5px;font-size:.8em}.ol-layerswitcher .layerswitcher-opacity-label::after{content:"%"}.ol-layerswitcher .layerswitcher-progress{display:block;margin:-4px 1em 2px 7px;width:120px}.ol-layerswitcher .layerswitcher-progress div{background-color:#369;height:2px;display:block;width:0}.ol-control.ol-layerswitcher-image{position:absolute;right:.5em;text-align:left;top:1em;transition:all .2s ease 0s;-webkit-transition:all .2s ease 0s}.ol-control.ol-layerswitcher-image.ol-collapsed{top:3em;-webkit-transition:none;transition:none}.ol-layerswitcher-image .panel{list-style:none;padding:.25em;margin:0;overflow:hidden}.ol-layerswitcher-image .panel ul{list-style:none;padding:0 0 0 20px;overflow:hidden}.ol-layerswitcher-image.ol-collapsed .panel{display:none}.ol-layerswitcher-image.ol-forceopen .panel{display:block;clear:both}.ol-layerswitcher-image button{background-color:#fff;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAACE1BMVEX///8A//8AgICA//8AVVVAQID///8rVVVJtttgv98nTmJ2xNgkW1ttyNsmWWZmzNZYxM4gWGgeU2JmzNNr0N1Rwc0eU2VXxdEhV2JqytQeVmMhVmNoydUfVGUgVGQfVGQfVmVqy9hqy9dWw9AfVWRpydVry9YhVmMgVGNUw9BrytchVWRexdGw294gVWQgVmUhVWPd4N6HoaZsy9cfVmQgVGRrytZsy9cgVWQgVWMgVWRsy9YfVWNsy9YgVWVty9YgVWVry9UgVWRsy9Zsy9UfVWRsy9YgVWVty9YgVWRty9Vsy9aM09sgVWRTws/AzM0gVWRtzNYgVWRuy9Zsy9cgVWRGcHxty9bb5ORbxdEgVWRty9bn6OZTws9mydRfxtLX3Nva5eRix9NFcXxOd4JPeINQeIMiVmVUws9Vws9Vw9BXw9BYxNBaxNBbxNBcxdJexdElWWgmWmhjyNRlx9IqXGtoipNpytVqytVryNNrytZsjZUuX210k5t1y9R2zNR3y9V4lp57zth9zdaAnKOGoaeK0NiNpquV09mesrag1tuitbmj1tuj19uktrqr2d2svcCu2d2xwMO63N+7x8nA3uDC3uDFz9DK4eHL4eLN4eIyYnDX5OM5Z3Tb397e4uDf4uHf5uXi5ePi5+Xj5+Xk5+Xm5+Xm6OY6aHXQ19fT4+NfhI1Ww89gx9Nhx9Nsy9ZWw9Dpj2abAAAAWnRSTlMAAQICAwQEBgcIDQ0ODhQZGiAiIyYpKywvNTs+QklPUlNUWWJjaGt0dnd+hIWFh4mNjZCSm6CpsbW2t7nDzNDT1dje5efr7PHy9PT29/j4+Pn5+vr8/f39/f6DPtKwAAABTklEQVR4Xr3QVWPbMBSAUTVFZmZmhhSXMjNvkhwqMzMzMzPDeD+xASvObKePPa+ffHVl8PlsnE0+qPpBuQjVJjno6pZpSKXYl7/bZyFaQxhf98hHDKEppwdWIW1frFnrxSOWHFfWesSEWC6R/P4zOFrix3TzDFLlXRTR8c0fEEJ1/itpo7SVO9Jdr1DVxZ0USyjZsEY5vZfiiAC0UoTGOrm9PZLuRl8X+Dq1HQtoFbJZbv61i+Poblh/97TC7n0neCcK0ETNUrz1/xPHf+DNAW9Ac6t8O8WH3Vp98f5lCaYKAOFZMLyHL4Y0fe319idMNgMMp+zWVSybUed/+/h7I4wRAG1W6XDy4XmjR9HnzvDRZXUAYDFOhC1S/Hh+fIXxen+eO+AKqbs+wAo30zDTDvDxKoJN88sjUzDFAvBzEUGFsnADoIvAJzoh2BZ8sner+Ke/vwECuQAAAABJRU5ErkJggg==);float:right;height:38px;width:38px;display:none}.ol-layerswitcher-image.ol-collapsed button{display:block;position:relative}.ol-layerswitcher-image li{border-radius:4px;border:3px solid transparent;-webkit-box-shadow:1px 1px 4px rgba(0,0,0,.5);box-shadow:1px 1px 4px rgba(0,0,0,.5);display:inline-block;width:64px;height:64px;margin:2px;position:relative;background-color:#fff;overflow:hidden;vertical-align:middle;cursor:pointer}.ol-layerswitcher-image li p,.ol-layerswitcher-image li.ol-header{display:none}.ol-layerswitcher-image li.ol-layer-hidden{opacity:.5;border-color:#555}.ol-layerswitcher-image li img{position:absolute;max-width:100%}.ol-layerswitcher-image li.ol-visible,.ol-layerswitcher-image li.select{border:3px solid red}.ol-layerswitcher-image li:hover p{background-color:rgba(0,0,0,.5);color:#fff;bottom:0;display:block;left:0;margin:0;overflow:hidden;position:absolute;right:0;text-align:center;height:1.2em;font-family:Verdana,Geneva,sans-serif;font-size:.8em}.ol-control.ol-legend{bottom:.5em;left:.5em;z-index:1;max-height:90%;max-width:90%;overflow-x:hidden;overflow-y:auto}.ol-control.ol-legend.ol-collapsed{overflow:hidden}.ol-control.ol-legend button{position:relative;display:none}.ol-control.ol-legend.ol-collapsed button{display:block}.ol-control.ol-legend.ol-uncollapsible button{display:none}.ol-control.ol-legend button.ol-closebox{display:block;position:absolute;top:0;right:0;background:0 0;cursor:pointer;z-index:1}.ol-control.ol-legend.ol-collapsed button.ol-closebox,.ol-control.ol-legend.ol-uncollapsible button.ol-closebox{display:none}.ol-control.ol-legend button.ol-closebox:before{content:"\D7";background:0 0;color:rgba(0,60,136,.5);font-size:1.3em}.ol-control.ol-legend button.ol-closebox:hover:before{color:rgba(0,60,136,1)}.ol-control.ol-legend .ol-legendImg{display:block}.ol-control.ol-legend.ol-collapsed .ol-legendImg{display:none}.ol-control.ol-legend.ol-uncollapsible .ol-legendImg{display:block}.ol-control.ol-legend>button:first-child:after,.ol-control.ol-legend>button:first-child:before{content:"";position:absolute;top:.25em;left:.2em;width:.2em;height:.2em;background-color:currentColor;-webkit-box-shadow:0 .35em,0 .7em;box-shadow:0 .35em,0 .7em}.ol-control.ol-legend button:first-child:after{top:.27em;left:.55em;height:.15em;width:.6em}ul.ol-legend{position:absolute;top:0;left:0;width:100%;margin:0;padding:0;list-style:none}.ol-control.ol-legend.ol-collapsed ul{display:none}.ol-control.ol-legend.ol-uncollapsible ul{display:block}.ol-control.ol-legend .ol-legend,ul.ol-legend li div{display:inline-block}ul.ol-legend li.ol-title{text-align:center;font-weight:700}ul.ol-legend li.ol-title>div:first-child{width:0!important}ul.ol-legend li{overflow:hidden;padding:0;white-space:nowrap}ul.ol-legend li div{vertical-align:middle}.ol-control.ol-legend.ol-collapsed .ol-legend{display:none}.ol-control.ol-mapzone{position:absolute;right:.5em;text-align:left;top:.5em;max-height:calc(100% - 6em);-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.ol-control.ol-mapzone.ol-collapsed{top:3em}.ol-control.ol-mapzone button{position:relative;float:right;margin-top:2.2em}.ol-touch .ol-control.ol-mapzone button{margin-top:1.67em}.ol-control.ol-mapzone.ol-collapsed button{margin-top:0}.ol-control.ol-mapzone button i{border:.1em solid currentColor;border-radius:50%;width:.9em;height:.9em;overflow:hidden;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ol-control.ol-mapzone button i:before{content:"";background-color:currentColor;width:.4em;height:.4em;position:absolute;left:.5em;top:.3em;border-radius:50%;-webkit-box-shadow:.05em .3em 0 -.051em currentColor,-.05em -.35em 0 -.1em currentColor,-.5em -.35em 0 0 currentColor,-.65em .1em 0 -.03em currentColor,-.65em -.05em 0 -.05em currentColor;box-shadow:.05em .3em 0 -.051em currentColor,-.05em -.35em 0 -.1em currentColor,-.5em -.35em 0 0 currentColor,-.65em .1em 0 -.03em currentColor,-.65em -.05em 0 -.05em currentColor}.ol-mapzone>div{position:relative;display:inline-block;width:5em;height:5em;margin:0 .2em 0 0}.ol-control.ol-mapzone.ol-collapsed>div,.ol-overlay{display:none}.ol-mapzone>div p{margin:0;position:absolute;bottom:0;color:#fff;font-weight:700;text-align:center;width:160%;overflow:hidden;font-family:'Lucida Grande',Verdana,Geneva,Lucida,Arial,Helvetica,sans-serif;-webkit-transform:scaleX(.625);transform:scaleX(.625);-webkit-transform-origin:0 0;transform-origin:0 0;cursor:default}.ol-notification{width:150%;bottom:0;border:0;background:0 0;margin:0;padding:0}.ol-notification>div,.ol-notification>div:hover{position:absolute;background-color:rgba(0,0,0,.8);color:#fff;bottom:0;left:33.33%;max-width:calc(66% - 4em);min-width:5em;max-height:5em;min-height:1em;border-radius:4px 4px 0 0;padding:.2em .5em;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transform:translateX(-50%);transform:translateX(-50%);-webkit-transition:.3s;transition:.3s;opacity:1}.ol-ext-print-dialog .ol-print-map .ol-page,.ol-overlay,.ol-overlay .ol-fullscreen-image img{-webkit-box-sizing:border-box;position:absolute}.ol-notification.ol-collapsed>div{bottom:-5em;opacity:0}.ol-notification a{color:#9cf;cursor:pointer}.ol-notification .ol-close,.ol-notification .ol-close:hover{padding-right:1.5em}.ol-notification .closeBox{position:absolute;top:0;right:.3em}.ol-notification .closeBox:before{content:'\00d7'}.ol-overlay{top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.4);padding:1em;color:#fff;box-sizing:border-box;z-index:1;opacity:0;cursor:default;overflow:hidden;-webkit-transition:all .5s;transition:all .5s;pointer-events:none}.ol-overlay.stretch,.ol-overlay.stretchy,.ol-overlay.zoom,.ol-overlay.zoomrotate{top:50%;left:50%;opacity:.5}.ol-overlay.slide-up{transform:translateY(100%);-webkit-transform:translateY(100%)}.ol-overlay.slide-down{-webkit-transform:translateY(-100%);transform:translateY(-100%)}.ol-overlay.slide-left{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.ol-overlay.slide-right{-webkit-transform:translateX(100%);transform:translateX(100%)}.ol-overlay.zoom{-webkit-transform:translate(-50%,-50%) scale(0);transform:translate(-50%,-50%) scale(0)}.ol-overlay.zoomout{-webkit-transform:scale(3);transform:scale(3)}.ol-overlay.zoomrotate{-webkit-transform:translate(-50%,-50%) scale(0) rotate(360deg);transform:translate(-50%,-50%) scale(0) rotate(360deg)}.ol-overlay.stretch{-webkit-transform:translate(-50%,-50%) scaleX(0);transform:translate(-50%,-50%) scaleX(0)}.ol-overlay.stretchy{-webkit-transform:translate(-50%,-50%) scaleY(0);transform:translate(-50%,-50%) scaleY(0)}.ol-overlay.wipe{opacity:1}.ol-overlay.flip{-webkit-transform:perspective(600px) rotateY(180deg);transform:perspective(600px) rotateY(180deg)}.ol-overlay.card{opacity:.5;-webkit-transform:translate(-80%,100%) rotate(-.5turn);transform:translate(-80%,100%) rotate(-.5turn)}.ol-overlay.book{-webkit-transform:perspective(600px) rotateY(-180deg) scaleX(.6);transform:perspective(600px) rotateY(-180deg) scaleX(.6);-webkit-transform-origin:10% 50%;transform-origin:10% 50%}.ol-overlay.book.visible{-webkit-transform-origin:10% 50%;transform-origin:10% 50%}.ol-overlay.ol-visible{opacity:1;top:0;left:0;right:0;bottom:0;-webkit-transform:none;transform:none;pointer-events:all}.ol-overlay .ol-closebox{position:absolute;top:1em;right:1em;width:1em;height:1em;cursor:pointer;z-index:1}.ol-overlay .ol-closebox:before{content:"\274c";display:block;text-align:center;vertical-align:middle}.ol-overlay .ol-fullscreen-image{position:absolute;top:0;left:0;bottom:0;right:0}.ol-overlay .ol-fullscreen-image img{max-width:100%;max-height:100%;box-sizing:border-box;padding:1em;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ol-overlay .ol-fullscreen-image.ol-has-title img{padding-bottom:3em}.ol-overlay .ol-fullscreen-image p{background-color:rgba(0,0,0,.5);padding:.5em;position:absolute;left:0;right:0;bottom:0;margin:0;text-align:center}.ol-control.ol-overview{position:absolute;left:.5em;text-align:left;bottom:.5em}.ol-control.ol-overview .panel{display:block;width:150px;height:150px;margin:2px;background-color:#fff;border:1px solid #369;cursor:pointer}.ol-overview:not(.ol-collapsed) button{position:absolute;bottom:2px;left:2px;z-index:2}.ol-control.ol-overview.ol-collapsed .panel{display:none}.ol-overview.ol-collapsed button:before{content:'\00bb'}.ol-control-right.ol-overview.ol-collapsed button:before,.ol-overview button:before{content:'\00ab'}.ol-control-right.ol-overview{left:auto;right:.5em}.ol-control-right.ol-overview:not(.ol-collapsed) button{left:auto;right:2px}.ol-control-right.ol-overview button:before{content:'\00bb'}.ol-control-top.ol-overview{bottom:auto;top:5em}.ol-control-top.ol-overview:not(.ol-collapsed) button{bottom:auto;top:2px}.ol-permalink{position:absolute;top:.5em;right:2.5em}.ol-touch .ol-permalink{right:3em}.ol-permalink button{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AcFBjYE1ZK03gAAAUlJREFUOMuVk71KA1EQhc/NaiP+gCRpFHwGBSFlCrFVfAsbwSJCBMv06QIGJOBziI3EYAgkjU8gIloIAasIn4WzMqx34zrN7J6de+6ZmbNSgQDSfADcATPgHbgCyvonSYv8KEzWdofegH3gwmG9Ikq67sAESFzNueHThTyiEIKAmr2OJCUhhO30Aou+5aUQU2Ik65K2JC1KegohPGfUBkmvksqShnntHEcGOs60NXHfjmKz6czZTsNqbhzW+muwY2ATWAWawCOwBgxcTfvnvCPxKx4Cy5bPgBWgauRpdL2ImNlGhp3MabETm8mh94nDk4yCNE5/KTGg7xxbyhYAG0AN2AEqURIDZ0a0Fxn+LXAPXDpzRqMk6cOedz1ubdYl1b6NHgZRJe72nuu/CdSBl+yKi/zZlTnbaeXOJIesClwDU+ATeEhtX5TkCwAWUyAsHH1QAAAAAElFTkSuQmCC)}.ol-control.ol-print{top:.5em;left:3em}.ol-control.ol-print button:before{content:"";width:.9em;height:.35em;position:absolute;left:50%;top:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);-webkit-box-shadow:inset 0 0 0 .1em,inset .55em 0,0 .2em 0 -.1em;box-shadow:inset 0 0 0 .1em,inset .55em 0,0 .2em 0 -.1em}.ol-control.ol-print button:after{content:"";width:.7em;height:.6em;position:absolute;left:50%;top:25%;-webkit-transform:translateX(-50%);transform:translateX(-50%);-webkit-box-shadow:inset 0 0 0 .15em;box-shadow:inset 0 0 0 .15em}.ol-ext-print-dialog{width:100%;height:100%}.ol-ext-print-dialog>form .ol-closebox{right:auto;left:16.5em;z-index:1;color:#999}.ol-ext-print-dialog .ol-content[data-status=printing]{opacity:.5}.ol-ext-print-dialog .ol-content .ol-error{display:none;background:#b00;color:#ff0;text-align:center;padding:1em .5em;font-weight:700;margin:0 -1em}.ol-ext-print-dialog .ol-content[data-status=error] .ol-error{display:block}.ol-ext-print-dialog.ol-visible>form,.ol-ext-print-dialog>form{-webkit-transition:none;transition:none;top:1em;left:1em;bottom:1em;right:1em;-webkit-transform:none;transform:none;max-width:100%;max-height:100%;background-color:#eee;padding:0}.ol-ext-print-dialog .ol-print-map{position:absolute;top:0;bottom:0;right:0;width:calc(100% - 18em);overflow:hidden}.ol-ext-print-dialog .ol-print-map .ol-page{left:50%;top:50%;background:#fff;box-sizing:border-box}.ol-ext-print-dialog .ol-print-map .ol-page.margin{-webkit-box-sizing:content-box;box-sizing:content-box}.ol-ext-print-dialog .ol-map{width:100%;height:100%}.ol-ext-print-dialog .ol-print-map .ol-control{display:none!important}.ol-ext-print-dialog .ol-print-param{position:absolute;overflow-x:hidden;top:0;bottom:0;left:0;width:18em;background-color:#fff;padding:1em;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-ext-print-dialog .ol-print-param h2{display:block;color:rgba(0,60,136,.7);font-size:1.1em}.ol-ext-print-dialog .ol-print-param ul{padding:0;list-style:none}.ol-ext-print-dialog .ol-print-param li{position:relative;margin:.5em 0;font-size:.9em}.ol-ext-print-dialog .ol-print-param li.hidden{display:none}.ol-ext-print-dialog .ol-print-param label{width:8em;display:inline-block;vertical-align:middle}.ol-ext-print-dialog select{outline:0;vertical-align:middle}.ol-ext-print-dialog .ol-orientation{text-align:center}.ol-ext-print-dialog .ol-orientation label{position:relative;width:7em;cursor:pointer}.ol-ext-print-dialog .ol-orientation input{position:absolute;opacity:0;width:0;height:0}.ol-ext-print-dialog .ol-orientation span{position:relative;width:80%;display:block;padding:3.5em 0 .2em}.ol-ext-print-dialog .ol-orientation span:before{content:"";position:absolute;width:2em;height:2.6em;bottom:1.5em;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);color:#333;background-color:currentColor;border:1px solid currentColor;border-radius:0 1em 0 0;opacity:.5;overflow:hidden;-webkit-box-shadow:inset 1.3em -1.91em #ddd;box-shadow:inset 1.3em -1.91em #ddd}.ol-ext-print-dialog .ol-orientation .landscape span:before{width:2.6em;height:2em;margin:.2em 0;-webkit-box-shadow:inset 1.91em -1.3em #ddd;box-shadow:inset 1.91em -1.3em #ddd}.ol-ext-print-dialog .ol-orientation input:checked+span{opacity:1;-webkit-box-shadow:0 0 .2em rgba(0,0,0,.5);box-shadow:0 0 .2em rgba(0,0,0,.5)}.ol-ext-print-dialog .ol-ext-toggle-switch span{position:absolute;right:-2em;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.ol-print-title input[type=text]{margin-top:.5em;width:calc(100% - 6em);margin-left:6em}.ol-ext-print-dialog .ol-size option:first-child{font-style:italic}.ol-ext-print-dialog .ol-saveas,.ol-ext-print-dialog .ol-savelegend{text-align:center}.ol-ext-print-dialog .ol-saveas select,.ol-ext-print-dialog .ol-savelegend select{background-color:rgba(0,60,136,.7);color:#fff;padding:.5em;margin:1em 0 0;font-size:1em;border:0;font-weight:700;max-width:12em}.ol-ext-print-dialog .ol-saveas select option,.ol-ext-print-dialog .ol-savelegend select option{background-color:#fff;color:#666}.ol-ext-print-dialog .ol-savelegend select{margin-top:0}.ol-ext-print-dialog .ol-ext-buttons{text-align:right;border-top:1px solid #ccc;padding:.8em .5em;margin:0 -1em}.ol-ext-print-dialog button{font-size:1em;margin:0 .2em;border:1px solid #999;background:0 0;padding:.3em 1em;color:#333}.ol-ext-print-dialog button[type=submit]{background-color:rgba(0,60,136,.7);color:#fff;font-weight:700}.ol-ext-print-dialog .ol-clipboard-copy{position:absolute;pointer-events:none;top:0;background-color:rgba(0,0,0,.5);color:#fff;padding:.5em 1em;border-radius:1em;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;-webkit-transition:0s;transition:0s;opacity:0}.ol-ext-print-dialog .ol-clipboard-copy.visible{-webkit-animation:1s ol-clipboard-copy;animation:1s ol-clipboard-copy}.ol-ext-print-dialog .ol-print-map .ol-control.ol-canvas-control,.ol-ext-print-dialog .ol-print-map .ol-control.ol-print-compass{display:block!important}.ol-ext-print-dialog .ol-print-map .ol-control.olext-print-compass{top:0;right:0;width:60px;height:60px;margin:20px}@-webkit-keyframes ol-clipboard-copy{0%{opacity:0;top:0}80%{opacity:1;top:-3em}100%{opacity:0;top:-3em}}@keyframes ol-clipboard-copy{0%{opacity:0;top:0}80%{opacity:1;top:-3em}100%{opacity:0;top:-3em}}@media print{body.ol-print-document{margin:0!important;padding:0!important}body.ol-print-document>*{display:none!important}body.ol-print-document>.ol-ext-print-dialog{display:block!important}.ol-ext-print-dialog,.ol-ext-print-dialog>form{position:unset;-webkit-box-shadow:none;box-shadow:none;background:0 0!important;border:0}.ol-ext-print-dialog .ol-print-param,.ol-ext-print-dialog>form>*{display:none!important;background:0 0}.ol-ext-print-dialog .ol-content{display:block!important;border:0;background:0 0}.ol-ext-print-dialog .ol-print-map{position:unset;background:0 0;width:auto;overflow:visible}.ol-ext-print-dialog .ol-print-map .ol-page{-webkit-transform:none!important;transform:none!important;-webkit-box-shadow:none!important;box-shadow:none!important;position:unset}}@media (max-width:25em){.ol-ext-print-dialog .ol-print-param{width:13em}.ol-ext-print-dialog .ol-print-map{width:calc(100% - 13em)}.ol-ext-print-dialog .ol-print-param .ol-print-title input[type=text]{width:100%;margin:0}}.ol-profil{position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ol-control.ol-profil{position:absolute;top:.5em;right:3em;text-align:right;overflow:hidden}.ol-profil .ol-zoom-out{position:absolute;top:10px;right:10px;width:1em;height:1em;padding:0;border:1px solid #000;border-radius:2px;cursor:pointer}.ol-profil .ol-zoom-out:before{content:'';height:2px;width:60%;background:currentColor;position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ol-profil .ol-inner{position:relative;padding:.5em;font-size:.8em}.ol-control.ol-profil .ol-inner{display:block;background-color:rgba(255,255,255,.7);margin:2.3em 2px 2px}.ol-control.ol-profil.ol-collapsed .ol-inner{display:none}.ol-profil canvas{display:block}.ol-profil button{display:block;position:absolute;right:2px;background-position:center;background-repeat:no-repeat;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAPCAYAAAALWoRrAAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AgXCR4dn7j9TAAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAAz0lEQVQ4y7WTMU4CURRFz0xIpLUBEhdAY2tJYW1jaWlsXYVxDWyBhWCFCYugYgnDFPMOhTMJGf3AwHiqn/uTk5v/3gfAH6b0RH7sMiIe1Ts162z+q2lVVbd1XqijLuJk0zzP1/VxCGyApLgsy+HJphGx8DeFOm6L1bn6eVQaEW+m2amTRqx+1fkqKY2Ie0+zUx/U7WGYfNMsy57PmMMN8A1MWsWeUoPyivV8PWtPOzL7D+lYHfUtBXgHGLTCJfBxodD6k9Dsm8BLE17LobQ39nJC61aLVoVsAAAAAElFTkSuQmCC)}.ol-profil.ol-collapsed button{position:static}.ol-profil .ol-profilbar,.ol-profil .ol-profilcursor{position:absolute;pointer-events:none;width:1px;display:none}.ol-profil .ol-profilcursor{width:0;height:0}.ol-profil .ol-profilcursor:before{content:"";pointer-events:none;display:block;margin:-2px;width:5px;height:5px}.ol-profil .ol-profilbar,.ol-profil .ol-profilcursor:before{background:red}.ol-profil table{text-align:center;width:100%}.ol-profil table span{display:block}.ol-profilpopup{background-color:rgba(255,255,255,.5);margin:.5em;padding:0 .5em;position:absolute;top:-1em;white-space:nowrap}.ol-profilpopup.ol-left{right:0}.ol-profil table td{padding:0 2px}.ol-profil table .track-info{display:table-row}.ol-profil .over table .track-info,.ol-profil table .point-info{display:none}.ol-profil .over table .point-info{display:table-row}.ol-profil p{text-align:center;margin:0}.ol-control.ol-progress-bar{position:absolute;top:0;bottom:0;left:0;right:0;padding:0;pointer-events:none!important;background-color:transparent}.ol-control.ol-progress-bar>.ol-bar{position:absolute;background-color:rgba(0,60,136,.5);left:0;bottom:0;height:.5em;width:0;-webkit-transition:width .2s;transition:width .2s;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-control.ol-search>button:before,.ol-search button.ol-revers:before{-webkit-box-sizing:border-box;content:""}.ol-progress-bar>.ol-waiting{display:none}.ol-viewport .ol-control.ol-progress-bar>.ol-waiting{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);color:#fff;font-size:2em;display:block;-webkit-animation:1s linear infinite ol-progress-bar-blink;animation:1s linear infinite ol-progress-bar-blink}@-webkit-keyframes ol-progress-bar-blink{0%,30%{visibility:hidden}100%{visibility:visible}}@keyframes ol-progress-bar-blink{0%,30%{visibility:hidden}100%{visibility:visible}}.ol-control.ol-routing{top:.5em;left:3em;max-height:90%;overflow-y:auto}.ol-touch .ol-control.ol-routing{left:3.5em}.ol-control.ol-routing.ol-searching{opacity:.5}.ol-control.ol-routing .ol-car,.ol-control.ol-routing>button{position:relative}.ol-control.ol-routing .ol-car:after,.ol-control.ol-routing>button:after{content:"";position:absolute;width:.78em;height:.6em;border-radius:40% 50% 0 0/50% 70% 0 0;-webkit-box-shadow:inset 0 0 0 .065em,-.35em .14em 0 -.09em,inset 0 -.37em,inset -.14em .005em;box-shadow:inset 0 0 0 .065em,-.35em .14em 0 -.09em,inset 0 -.37em,inset -.14em .005em;clip:rect(0 1em .5em -1em);top:.35em;left:.4em}.ol-control.ol-routing .ol-car:before,.ol-control.ol-routing>button:before{content:"";position:absolute;width:.28em;height:.28em;border-radius:50%;-webkit-box-shadow:inset 0 0 0 1em,.65em 0;box-shadow:inset 0 0 0 1em,.65em 0;top:.73em;left:.2em}.ol-control.ol-routing .ol-pedestrian:after{content:"";position:absolute;width:.3em;height:.4em;top:.25em;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);-webkit-box-shadow:inset .3em 0,.1em .5em 0 -.1em,-.1em .5em 0 -.1em,.25em .1em 0 -.1em,-.25em .1em 0 -.1em;box-shadow:inset .3em 0,.1em .5em 0 -.1em,-.1em .5em 0 -.1em,.25em .1em 0 -.1em,-.25em .1em 0 -.1em;border-top:.2em solid transparent}.ol-control.ol-routing .ol-pedestrian:before{content:"";position:absolute;width:.3em;height:.3em;top:.1em;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);border-radius:50%;background-color:currentColor}.ol-control.ol-routing.ol-collapsed .content,.ol-routing .ol-search ul .copy,.ol-routing .ol-search.ol-collapsed ul{display:none}.ol-routing .content .search-input>div>*{display:inline-block;vertical-align:top}.ol-routing .ol-result ul{list-style:none;display:block}.ol-routing .ol-result li{position:relative;min-height:1.65em}.ol-routing .ol-result li i{display:block;font-size:.8em;font-weight:700}.ol-routing .ol-result li:before{content:"";border:5px solid transparent;position:absolute;left:-1.75em;border-bottom-color:#369;border-width:.6em .4em;-webkit-transform-origin:50% 125%;transform-origin:50% 125%;-webkit-box-shadow:0 .65em 0 -.25em #369;box-shadow:0 .65em 0 -.25em #369;top:-.8em}.ol-routing .ol-result li:after{content:"";position:absolute;width:.3em;height:.6em;left:-1.5em;background:#369;top:.6em}.ol-routing .ol-result li.R:before{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.ol-routing .ol-result li.FR:before{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ol-routing .ol-result li.L:before{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.ol-routing .ol-result li.FL:before{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.ol-routing .content>i{vertical-align:middle;margin:0 .3em 0 .1em;font-style:normal}.ol-routing .ol-button,.ol-routing .ol-button:focus,.ol-routing .ol-car,.ol-routing .ol-pedestrian{font-size:1.1em;position:relative;display:inline-block;width:1.4em;height:1.4em;color:rgba(0,60,136,1);background-color:transparent;margin:0 .1em;opacity:.5;vertical-align:middle;outline:0;cursor:pointer}.ol-routing .ol-button.selected,.ol-routing .ol-button:hover,.ol-routing i.selected{opacity:1;background:0 0}.ol-control.ol-routing:hover{background-color:rgba(255,255,255,.85)}.search-input>div>button:before{content:'\00b1'}.ol-viewport .ol-scale{left:.5em;bottom:2.5em;text-align:center;-webkit-transform:scaleX(.8);-webkit-transform-origin:0 0;transform:scaleX(.8);transform-origin:0 0}.ol-viewport .ol-scale input{background:0 0;border:0;width:8em;text-align:center}.ol-search{top:.5em;left:3em}.ol-touch .ol-search{left:3.5em}.ol-search button{top:2px;left:2px;float:left}.ol-control.ol-search>button:before{position:absolute;box-sizing:border-box;width:.7em;height:.7em;background-color:transparent;border:.12em solid currentColor;border-radius:100%;top:.35em;left:.35em}.ol-control.ol-search>button:after{content:"";position:absolute;top:1.1em;left:.95em;width:.45em;height:.15em;background-color:currentColor;border-radius:.05em;-webkit-transform:rotate(45deg);transform:rotate(45deg);-webkit-box-shadow:-.18em 0 0 -.03em;box-shadow:-.18em 0 0 -.03em}.ol-search button.ol-revers{float:none;background-image:none;display:inline-block;vertical-align:bottom;position:relative;top:0;left:0}.ol-input-popup.ol-fixed.ol-left .ol-popup,.ol-input-slider.ol-fixed.ol-left .ol-popup,.ol-search ul li img{float:left}.ol-search.ol-revers button.ol-revers{background-color:rgba(0,136,60,.5)}.ol-control.ol-search.ol-collapsed button.ol-revers{display:none}.ol-search button.ol-revers:before{border:.1em solid currentColor;position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);border-radius:50%;width:.55em;height:.55em;box-sizing:border-box}.ol-search button.ol-revers:after{content:"";position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:.2em;height:.2em;background-color:transparent;-webkit-box-shadow:.35em 0 currentColor,0 .35em currentColor,-.35em 0 currentColor,0 -.35em currentColor;box-shadow:.35em 0 currentColor,0 .35em currentColor,-.35em 0 currentColor,0 -.35em currentColor}.ol-search input{display:inline-block;border:0;margin:1px 1px 1px 2px;font-size:1.14em;padding-left:.3em;height:1.375em;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all .1s;transition:all .1s}.ol-touch .ol-search input,.ol-touch .ol-search ul{font-size:1.5em}.ol-control.ol-search.ol-collapsed>*,.ol-search.ol-revers>ul{display:none}.ol-control.ol-search.ol-collapsed>button,.ol-search ul{display:block}.ol-search ul{list-style:none;padding:0;margin:0;clear:both;cursor:pointer;max-width:17em;overflow-x:hidden;z-index:1;background:#fff}.ol-search ul li{padding:.1em .5em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ol-search ul li.select,.ol-search ul li:hover{background-color:rgba(0,60,136,.5);color:#fff}.ol-search ul li img{max-height:2em}.ol-search li.copy{background:rgba(0,0,0,.5);color:#fff}.ol-search li.copy a{color:#fff;text-decoration:none}.ol-search.searching:before{content:'';position:absolute;height:3px;left:0;top:1.6em;-webkit-animation:pulse .5s infinite alternate linear;animation:pulse .5s infinite alternate linear;background:red;z-index:2}@-webkit-keyframes pulse{0%{left:0;right:95%}50%{left:30%;right:30%}100%{left:95%;right:0}}@keyframes pulse{0%{left:0;right:95%}50%{left:30%;right:30%}100%{left:95%;right:0}}.ol-search.IGNF-parcelle input{width:13.5em}.ol-search.IGNF-parcelle input:-moz-read-only{background:#ccc;opacity:.8}.ol-search.IGNF-parcelle input:read-only{background:#ccc;opacity:.8}.ol-search.IGNF-parcelle.ol-collapsed-list>ul.autocomplete{display:none}.ol-search.IGNF-parcelle label{display:block;clear:both}.ol-search.IGNF-parcelle>div input,.ol-search.IGNF-parcelle>div label{width:5em;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;margin:.1em;font-size:1em}.ol-search.IGNF-parcelle ul.autocomplete-page{margin-top:.5em;width:100%;text-align:center;display:none}.ol-search.IGNF-parcelle.ol-collapsed-list ul.autocomplete-page,.ol-search.IGNF-parcelle.ol-collapsed-list ul.autocomplete-parcelle{display:block}.ol-search.IGNF-parcelle ul.autocomplete-parcelle,.ol-search.IGNF-parcelle.ol-collapsed ul.autocomplete-page,.ol-search.IGNF-parcelle.ol-collapsed ul.autocomplete-parcelle{display:none}.ol-search.IGNF-parcelle ul.autocomplete-page li{display:inline-block;color:#fff;background:rgba(0,60,136,.5);border-radius:50%;width:1.3em;height:1.3em;padding:.1em;margin:0 .1em}.ol-search.IGNF-parcelle ul.autocomplete-page li.selected{background:rgba(0,60,136,1)}.ol-searchgps input.search{display:none}.ol-control.ol-searchgps>button:first-child{background-image:none}.ol-control.ol-searchgps>button:first-child:before{content:"x/y";position:unset;display:block;-webkit-transform:scaleX(.8);transform:scaleX(.8);border:unset;border-radius:0;width:auto;height:auto}.ol-control.ol-searchgps>button:first-child:after{content:unset}.ol-control.ol-searchgps .ol-latitude,.ol-control.ol-searchgps .ol-longitude{clear:both}.ol-control.ol-searchgps .ol-latitude label,.ol-control.ol-searchgps .ol-longitude label{width:5.5em;display:inline-block;text-align:right;-webkit-transform:scaleX(.8);transform:scaleX(.8);margin:0 -.8em 0 0;-webkit-transform-origin:0 0;transform-origin:0 0}.ol-control.ol-searchgps .ol-latitude input,.ol-control.ol-searchgps .ol-longitude input{max-width:10em}.ol-control.ol-searchgps .ol-ext-toggle-switch{cursor:pointer;float:right;margin:.5em;font-size:.9em}.ol-searchgps .ol-decimal{display:inline-block;margin-right:.7em}.ol-searchgps .ol-dms,.ol-searchgps.ol-dms .ol-decimal{display:none;width:3em;text-align:right}.ol-searchgps.ol-dms .ol-dms{display:inline-block}.ol-searchgps span.ol-dms{width:.5em;text-align:left}.ol-searchgps.ol-control.ol-collapsed button.ol-geoloc{display:none}.ol-searchgps button.ol-geoloc{top:0;float:right;margin-right:3px;background-image:none;position:relative}.ol-searchgps button.ol-geoloc:before{content:"";position:absolute;left:50%;top:50%;width:.6em;height:.6em;border:.1em solid currentColor;border-radius:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ol-searchgps button.ol-geoloc:after{content:"";position:absolute;left:50%;top:50%;width:.2em;height:.2em;background-color:transparent;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-box-shadow:.45em 0 currentColor,-.45em 0 currentColor,0 -.45em currentColor,0 .45em currentColor,.25em 0 currentColor,-.25em 0 currentColor,0 -.25em currentColor,0 .25em currentColor;box-shadow:.45em 0 currentColor,-.45em 0 currentColor,0 -.45em currentColor,0 .45em currentColor,.25em 0 currentColor,-.25em 0 currentColor,0 -.25em currentColor,0 .25em currentColor}.ol-control.ol-select{top:.5em;left:3em}.ol-touch .ol-control.ol-select{left:3.5em}.ol-control.ol-select>button:before{content:"A";font-size:.6em;font-weight:400;position:absolute;-webkit-box-sizing:content-box;box-sizing:content-box;width:1em;height:1em;background-color:transparent;border:.2em solid currentColor;border-radius:100%;top:.5em;left:.5em;line-height:1em;text-align:center}.ol-control.ol-select>button:after{content:"";position:absolute;top:1.15em;left:1em;width:.45em;height:.15em;background-color:currentColor;border-radius:.05em;-webkit-transform:rotate(45deg);transform:rotate(45deg);-webkit-box-shadow:-.18em 0 0 -.03em;box-shadow:-.18em 0 0 -.03em}.ol-select>div button{width:auto;padding:0 .5em;float:right;font-weight:400}.ol-select .ol-delete{width:1.5em;height:1em;vertical-align:middle;display:inline-block;position:relative;cursor:pointer}.ol-select .ol-delete:before{content:'\00d7';position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:100%;text-align:center;font-weight:700}.ol-control.ol-select input{font-size:1em}.ol-control.ol-select select{font-size:1em;max-width:10em}.ol-control.ol-select select option.ol-default{color:#999;font-style:italic}.ol-control.ol-select>div{display:block}.ol-control.ol-select.ol-collapsed>div{display:none}.ol-control.ol-select.ol-select-check{max-width:20em}.ol-control.ol-select label.ol-ext-check{margin-right:1em}.ol-control.ol-select label.ol-ext-toggle-switch span{font-size:1.1em}.ol-select ul{list-style:none;margin:0;padding:0}.ol-control.ol-select input[type=text],.ol-control.ol-select input[type=search]{width:8em}.ol-select .ol-autocomplete{display:inline}.ol-select .ol-autocomplete ul{position:absolute;display:block;background:#fff;border:1px solid #999;min-width:10em;font-size:.85em}.ol-select ul.ol-hidden,.ol-select-multi li>div .ol-ok,.ol-select-multi li>div>button{display:none}.ol-select .ol-autocomplete ul li{padding:0 .5em}.ol-select .ol-autocomplete ul li:hover{color:#fff;background:rgba(0,60,136,.5)}.ol-select-multi li>div.ol-control.ol-select,.ol-select-multi li>div:hover{position:relative;top:unset;left:unset;background:0 0}.ol-select-multi li .ol-control.ol-select.ol-collapsed>div,.ol-select-multi li>div>div{display:block}.ol-control.ol-status{top:0;left:0;background:rgba(0,0,0,.2);color:#fff;font-size:.9em;padding:.3em 3em;border-radius:0;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;pointer-events:none!important;display:none}.ol-control.ol-status.ol-visible{display:initial}.ol-control.ol-status.ol-bottom{top:auto;bottom:0}.ol-control.ol-status.ol-left{top:0;bottom:0;padding:.3em .5em .3em 3em;width:auto}.ol-control.ol-status.ol-right{top:0;bottom:0;left:auto;right:0;padding:.3em 3em .3em .5em;width:auto}.ol-control.ol-status.ol-center{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.ol-control.ol-storymap{top:.5em;left:.5em;bottom:.5em;max-width:35%;border-radius:.5em;position:absolute;height:auto}.ol-storymap,.ol-storymap>div{padding:0;height:100%;position:relative;overflow:hidden}.ol-storymap>div{scroll-behavior:smooth;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ol-storymap>div.ol-move{scroll-behavior:unset}.ol-control.ol-storymap .chapter{padding:.5em}.ol-storymap .chapter{cursor:pointer;opacity:.4}.ol-storymap .chapter.ol-select{cursor:default;opacity:1}.ol-storymap .ol-scroll-next,.ol-storymap .ol-scroll-top{position:relative;min-height:1.7em;color:rgba(0,60,136,.5);text-align:center;cursor:pointer}.ol-storymap .ol-scroll-next span{padding-bottom:1.4em;display:block}.ol-storymap .ol-scroll-top span{padding-top:1.4em;display:block}.ol-storymap .ol-scroll-next:before,.ol-storymap .ol-scroll-top:before{content:"";border:.3em solid currentColor;border-radius:.3em;border-color:transparent currentColor currentColor transparent;width:.8em;height:.8em;display:block;position:absolute;left:50%;-webkit-transform:translateX(-50%) rotate(45deg);transform:translateX(-50%) rotate(45deg);-webkit-animation:ol-bounce-bottom .35s linear infinite alternate;animation:ol-bounce-bottom .35s linear infinite alternate;pointer-events:none}.ol-storymap .ol-scroll-top:before{border-color:currentColor transparent transparent currentColor;-webkit-animation:ol-bounce-top .35s linear infinite alternate;animation:ol-bounce-top .35s linear infinite alternate}@-webkit-keyframes ol-bounce-top{from{top:-.2em}to{top:.5em}}@keyframes ol-bounce-top{from{top:-.2em}to{top:.5em}}@-webkit-keyframes ol-bounce-bottom{from{bottom:-.2em}to{bottom:.5em}}@keyframes ol-bounce-bottom{from{bottom:-.2em}to{bottom:.5em}}.ol-storymap img[data-title]{cursor:pointer}.ol-swipe{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-ms-touch-action:none;touch-action:none}.ol-swipe:before{content:"";position:absolute;top:-5000px;bottom:-5000px;left:50%;width:4px;background:#fff;z-index:-1;-webkit-transform:translate(-2px,0);transform:translate(-2px,0)}.ol-swipe.horizontal:before{left:-5000px;right:-5000px;top:50%;bottom:auto;width:auto;height:4px}.ol-swipe,.ol-swipe button{cursor:ew-resize}.ol-swipe.horizontal,.ol-swipe.horizontal button{cursor:ns-resize}.ol-swipe button:after,.ol-swipe button:before,.ol-swipe:after{content:"";position:absolute;top:25%;bottom:25%;left:50%;width:2px;background:rgba(255,255,255,.8);transform:translate(-1px,0);-webkit-transform:translate(-1px,0)}.ol-swipe button:after{transform:translateX(5px);-webkit-transform:translateX(5px)}.ol-swipe button:before{transform:translateX(-7px);-webkit-transform:translateX(-7px)}.ol-control.ol-timeline{bottom:0;left:0;right:0;-webkit-transition:.3s;transition:.3s}.ol-control.ol-timeline.ol-collapsed{-webkit-transform:translateY(100%);transform:translateY(100%)}.ol-timeline{overflow:hidden;padding:2px 0 0}.ol-timeline .ol-scroll{overflow:hidden;scroll-behavior:smooth;line-height:1em;height:6em;padding:0 50%}.ol-timeline .ol-scroll.ol-move{scroll-behavior:unset}.ol-timeline.ol-hasbutton .ol-scroll{margin-left:1.5em;padding:0 calc(50% - .75em)}.ol-timeline .ol-buttons{display:none;position:absolute;top:0;background:rgba(255,255,255,.5);width:1.5em;bottom:0;left:0;z-index:10}.ol-timeline.ol-hasbutton .ol-buttons{display:block}.ol-timeline .ol-buttons button{font-size:1em;margin:1px;position:relative}.ol-timeline .ol-buttons .ol-zoom-in:before,.ol-timeline .ol-buttons .ol-zoom-out:before{content:"+";position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ol-timeline .ol-buttons .ol-zoom-out:before{content:'−'}.ol-timeline .ol-scroll>div{height:100%;position:relative}.ol-timeline .ol-scroll .ol-times{background:rgba(255,255,255,.5);height:1em;bottom:0;position:absolute;left:-1000px;right:-1000px}.ol-timeline .ol-scroll .ol-time{position:absolute;font-size:.7em;color:#999;bottom:0;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ol-timeline .ol-scroll .ol-time.ol-year{color:#666;z-index:1}.ol-timeline .ol-scroll .ol-time:before{content:"";position:absolute;bottom:1.2em;left:50%;height:500px;border-left:1px solid currentColor}.ol-timeline .ol-scroll .ol-features{position:absolute;top:0;bottom:1em;left:-200px;right:-1000px;margin:0 0 0 200px;overflow:hidden}.ol-timeline .ol-scroll .ol-feature{position:absolute;font-size:.7em;color:#999;top:0;background:#fff;max-width:3em;max-height:2.4em;min-height:1em;line-height:1.2em;border:1px solid #ccc;overflow:hidden;padding:0 .5em 0 0;-webkit-transition:all .3s;transition:all .3s;cursor:pointer;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-timeline.ol-zoomhover .ol-scroll .ol-feature.ol-select,.ol-timeline.ol-zoomhover .ol-scroll .ol-feature:hover{z-index:1;-webkit-transform:scale(1.2);transform:scale(1.2);background:#eee}.ol-timeline .ol-center-date{display:none;position:absolute;left:50%;height:100%;width:2px;bottom:0;z-index:2;pointer-events:none;-webkit-transform:translateX(-50%);transform:translateX(-50%);background-color:red;opacity:.4}.ol-timeline.ol-hasbutton .ol-center-date{left:calc(50% + .75em)}.ol-timeline.ol-pointer .ol-center-date{display:block}.ol-timeline.ol-pointer .ol-center-date:after,.ol-timeline.ol-pointer .ol-center-date:before{content:'';border:.3em solid transparent;border-width:.3em .25em;position:absolute;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ol-timeline.ol-pointer .ol-center-date:before{border-top-color:red;top:0}.ol-timeline.ol-pointer .ol-center-date:after{border-bottom-color:red;bottom:0}.ol-timeline.ol-interval .ol-center-date{display:block;background-color:transparent;border:0 solid #000;border-width:0 10000px;-webkit-box-sizing:content-box;box-sizing:content-box;opacity:.2}.ol-control.ol-videorec{top:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);white-space:nowrap}.ol-control.ol-videorec button{position:relative;display:inline-block;vertical-align:middle}.ol-control.ol-videorec button:before{content:"";position:absolute;top:50%;left:50%;width:.8em;height:.8em;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);background-color:currentColor}.ol-control.ol-videorec button.ol-start:before{width:.9em;height:.9em;border-radius:50%;background-color:#c00}.ol-control.ol-videorec button.ol-pause:before{width:.2em;background-color:transparent;-webkit-box-shadow:-.2em 0,.2em 0;box-shadow:-.2em 0,.2em 0}.ol-control.ol-videorec button.ol-resume:before{border-style:solid;background:0 0;width:auto;border-width:.4em 0 .4em .6em;border-color:transparent transparent transparent currentColor;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-control.ol-videorec button.ol-pause,.ol-control.ol-videorec button.ol-resume,.ol-control.ol-videorec button.ol-stop,.ol-control.ol-videorec[data-state=rec] .ol-start,.ol-control.ol-videorec[data-state=pause] .ol-start{display:none}.ol-control.ol-videorec[data-state=rec] .ol-pause,.ol-control.ol-videorec[data-state=rec] .ol-stop,.ol-control.ol-videorec[data-state=pause] .ol-resume,.ol-control.ol-videorec[data-state=pause] .ol-stop{display:inline-block}.ol-control.ol-wmscapabilities{top:.5em;right:2.5em}.ol-touch .ol-control.ol-wmscapabilities{right:3em}.ol-control.ol-wmscapabilities.ol-hidden{display:none}.ol-control.ol-wmscapabilities button:before{content:"+";position:absolute;top:calc(50% - .35em);left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ol-control.ol-wmscapabilities button:after{content:"";width:.75em;height:.75em;position:absolute;background:0 0;top:calc(50% - .05em);left:50%;-webkit-transform:scaleY(.6) translate(-50%,-50%) rotate(45deg);transform:scaleY(.6) translate(-50%,-50%) rotate(45deg);-webkit-box-shadow:inset -.18em -.18em currentColor,-.4em .1em 0 -.25em currentColor,.1em -.35em 0 -.25em currentColor,.15em .15em currentColor;box-shadow:inset -.18em -.18em currentColor,-.4em .1em 0 -.25em currentColor,.1em -.35em 0 -.25em currentColor,.15em .15em currentColor;border-radius:.1em 0;border:.15em solid transparent;border-width:0 .15em .15em 0}.ol-wmscapabilities .ol-searching{opacity:.5}.ol-wmscapabilities .ol-searching .ol-url:after{content:"";width:.7em;height:.7em;background-color:currentColor;position:absolute;top:6em;border-radius:50%;display:block;left:calc(50% - .35em);-webkit-box-shadow:0 1em currentColor,0 -1em currentColor,1em 0 currentColor,-1em 0 currentColor;box-shadow:0 1em currentColor,0 -1em currentColor,1em 0 currentColor,-1em 0 currentColor;-webkit-animation:ol-wmscapabilities-rotate 2s linear infinite;animation:ol-wmscapabilities-rotate 2s linear infinite}@-webkit-keyframes ol-wmscapabilities-rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes ol-wmscapabilities-rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.ol-wmscapabilities .ol-url input{width:calc(100% - 10em);-webkit-box-sizing:border-box;box-sizing:border-box;min-width:Min(100%,20em)}.ol-wmscapabilities .ol-url select{width:2em;height:100%;padding:1px}.ol-wmscapabilities .ol-url button{width:7.5em;margin-left:.5em}.ol-wmscapabilities .ol-result{display:none;margin-top:.5em}.ol-wmscapabilities .ol-result.ol-visible{display:block}.ol-wmscapabilities .ol-select-list{position:relative;border:1px solid #369;overflow-x:hidden;width:calc(100% - 120px);-webkit-box-sizing:border-box;box-sizing:border-box;max-height:14.5em}.ol-wmscapabilities .ol-select-list div{padding:0 .5em;cursor:pointer;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden}.ol-wmscapabilities .ol-select-list .level-1{padding-left:1em}.ol-wmscapabilities .ol-select-list .level-2{padding-left:1.5em}.ol-wmscapabilities .ol-select-list .level-3{padding-left:2em}.ol-wmscapabilities .ol-select-list .level-4{padding-left:2.5em}.ol-wmscapabilities .ol-select-list .level-5{padding-left:3em}.ol-wmscapabilities .ol-select-list .ol-info{font-style:italic}.ol-wmscapabilities .ol-select-list .ol-title{background-color:rgba(0,60,136,.1)}.ol-wmscapabilities .ol-select-list div:hover{background-color:rgba(0,60,136,.5);color:#fff}.ol-wmscapabilities .ol-select-list div.selected{background-color:rgba(0,60,136,.7);color:#fff}.ol-wmscapabilities .ol-preview,.ol-wmscapabilities .ol-preview.tainted{width:100px;color:#666;padding:0 5px 5px;text-align:center;float:right;margin-left:10px}.ol-wmscapabilities .ol-preview{background:rgba(0,60,136,.1)}.ol-wmscapabilities .ol-preview.tainted{background:rgba(136,0,60,.1)}.ol-wmscapabilities .ol-preview img{width:100%;display:block;background:#fff}.ol-wmscapabilities .ol-legend{max-width:100%;display:none}.ol-wmscapabilities .ol-legend.visible{display:block}.ol-wmscapabilities .ol-buttons{clear:both;text-align:right}.ol-wmscapabilities .ol-data p{margin:0}.ol-wmscapabilities .ol-data p.ol-title{font-weight:700;margin:1em 0 .5em}.ol-wmscapabilities .ol-error{color:#800}.ol-wmscapabilities ul.ol-wmsform{display:none;list-style:none;padding:0}.ol-wmscapabilities ul.ol-wmsform.visible{display:block}.ol-wmscapabilities .ol-wmsform label{display:inline-block;text-align:right;width:calc(40% - .5em);margin-right:.5em}.ol-wmscapabilities .ol-wmsform input{display:inline-block;width:60%;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-wmscapabilities .ol-wmsform input[type=checkbox]{width:auto}.ol-wmscapabilities .ol-wmsform button{float:right;margin:1em 0}.ol-wmscapabilities ul.ol-wmsform li[data-param=extent] input{width:calc(60% - 2em)}.ol-wmscapabilities ul.ol-wmsform li[data-param=extent] button{position:relative;width:2em;height:1.6em;margin:0;vertical-align:middle;color:#444}.ol-wmscapabilities ul.ol-wmsform li[data-param=extent] button:after,.ol-wmscapabilities ul.ol-wmsform li[data-param=extent] button:before{content:"";position:absolute;width:.25em;height:.9em;border:.1em solid currentColor;top:50%;left:50%;-webkit-transform:translate(-50%,-50%) skewY(-15deg);transform:translate(-50%,-50%) skewY(-15deg)}.ol-wmscapabilities ul.ol-wmsform li[data-param=extent] button:after{-webkit-transform:translateX(.4em) translate(-50%,-50%) skewY(15deg);transform:translateX(.4em) translate(-50%,-50%) skewY(15deg);-webkit-box-shadow:-.8em .25em;box-shadow:-.8em .25em}.ol-ext-dialog.ol-wmscapabilities form{width:600px;min-height:15em;top:15%;-webkit-transform:translate(-50%,-15%);transform:translate(-50%,-15%)}.ol-ext-dialog.ol-wmscapabilities .ol-content{max-height:calc(100vh - 6em)}.ol-ext-dialog [data-param=style],.ol-ext-dialog.ol-wmtscapabilities [data-param=map]{display:none}.ol-ext-dialog.ol-wmtscapabilities [data-param=style]{display:list-item}.ol-ext-dialog.ol-wmtscapabilities [data-param=proj],.ol-ext-dialog.ol-wmtscapabilities [data-param=version]{opacity:.6;pointer-events:none}.ol-ext-dialog.ol-wmscapabilities button.ol-wmsform{width:1.8em;text-align:center}.ol-ext-dialog.ol-wmscapabilities button.ol-wmsform:before{content:"+"}.ol-ext-dialog.ol-wmscapabilities .ol-form button.ol-wmsform:before{content:"-"}.ol-ext-dialog.ol-wmscapabilities .ol-form .ol-legend,.ol-ext-dialog.ol-wmscapabilities .ol-form button.ol-load{display:none}.ol-ext-dialog.ol-wmscapabilities .ol-form ul.ol-wmsform{display:block;clear:both}.ol-target-overlay .ol-target{border:1px solid transparent;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff;display:block;height:20px;width:0}.ol-target-overlay .ol-target:after,.ol-target-overlay .ol-target:before{content:"";border:1px solid #369;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff;display:block;width:20px;height:0;position:absolute;top:10px;left:-10px}.ol-target-overlay .ol-target:after{-webkit-box-shadow:none;box-shadow:none;height:20px;width:0;top:0;left:0}.ol-overlaycontainer .ol-touch-cursor{width:56px;height:56px;margin:6px;border-radius:50%;cursor:pointer;background:rgba(255,255,255,.4);-webkit-box-shadow:inset 0 0 0 5px #369;box-shadow:inset 0 0 0 5px #369}.ol-overlaycontainer .ol-touch-cursor:after{content:"";position:absolute;top:0;left:0;width:50%;height:50%;background:radial-gradient(circle at 100% 100%,transparent,transparent 70%,#369 70%,#369)}.ol-overlaycontainer .ol-touch-cursor .ol-button{position:absolute;color:#369;height:55%;width:55%;border-radius:50%;cursor:pointer;background:rgba(255,255,255,.4);-webkit-box-shadow:inset 0 0 0 3px currentColor;box-shadow:inset 0 0 0 3px currentColor;top:50%;left:50%;-webkit-transform:translate(-50%,-50%) scale(0);transform:translate(-50%,-50%) scale(0);-webkit-transition:all .5s,opacity 0s,background 0s;transition:all .5s,opacity 0s,background 0s;overflow:hidden}.ol-overlaycontainer .ol-touch-cursor.active.disable .ol-button,.ol-overlaycontainer .ol-touch-cursor.nodrawing .ol-button.ol-button-check,.ol-overlaycontainer .ol-touch-cursor.nodrawing .ol-button.ol-button-remove,.ol-overlaycontainer .ol-touch-cursor.nodrawing .ol-button.ol-button-x{opacity:.8;background:rgba(51,102,153,.2)}.ol-overlaycontainer .ol-touch-cursor.active .ol-button{-webkit-transform:translate(-50%,-50%) scale(1);transform:translate(-50%,-50%) scale(1)}.ol-overlaycontainer .ol-touch-cursor.active .ol-button-0{top:-18%;left:118%}.ol-overlaycontainer .ol-touch-cursor.active .ol-button-1{top:50%;left:140%}.ol-overlaycontainer .ol-touch-cursor.active .ol-button-2{top:120%;left:120%}.ol-overlaycontainer .ol-touch-cursor.active .ol-button-3{top:140%;left:50%}.ol-overlaycontainer .ol-touch-cursor.active .ol-button-4{top:118%;left:-18%}.ol-overlaycontainer .ol-touch-cursor.active .ol-button-5{top:50%;left:-40%}.ol-overlaycontainer .ol-touch-cursor.active .ol-button-6{top:-18%;left:-18%}.ol-overlaycontainer .ol-touch-cursor.active .ol-button-7{top:-40%;left:50%}.ol-overlaycontainer .ol-touch-cursor .ol-button:before{content:"";width:1.5em;height:1em;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);line-height:1em;text-align:center}.ol-overlaycontainer .ol-touch-cursor .ol-button>div,.ol-perspective-map{-webkit-transform:translate(-50%,-50%);top:50%;left:50%;position:absolute}.ol-overlaycontainer .ol-touch-cursor .ol-button.ol-button-add:before,.ol-overlaycontainer .ol-touch-cursor .ol-button.ol-button-remove:before{content:"−";line-height:.95em;font-size:1.375em;font-weight:700}.ol-overlaycontainer .ol-touch-cursor .ol-button.ol-button-add:before{content:"+"}.ol-overlaycontainer .ol-touch-cursor .ol-button.ol-button-x:before{content:"\00D7";font-size:1.2em;font-weight:700}.ol-overlaycontainer .ol-touch-cursor .ol-button.ol-button-move:before{content:"\2725";font-size:1.2em}.ol-overlaycontainer .ol-touch-cursor .ol-button.ol-button-check:before{content:"\2713";font-weight:700}.ol-overlaycontainer .ol-touch-cursor .ol-button>div{transform:translate(-50%,-50%)}.ol-overlaycontainer .ol-touch-cursor .ol-button-type:before{content:"\21CE";font-weight:700}.mapboxgl-canvas:focus{outline:0}.ol-perspective-map{width:200%;height:200%;transform:translate(-50%,-50%)}.ol-perspective-map .ol-layer{z-index:-1!important}.ol-perspective-map .ol-layers{-webkit-transform:translateY(0) perspective(200px) rotateX(0) scaleY(1);transform:translateY(0) perspective(200px) rotateX(0) scaleY(1)}.ol-perspective-map .ol-overlaycontainer,.ol-perspective-map .ol-overlaycontainer-stopevent{width:50%!important;height:50%!important;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ol-overlay-container .ol-magnify{background:rgba(0,0,0,.5);border:3px solid #369;border-radius:50%;height:150px;width:150px;overflow:hidden;-webkit-box-shadow:5px 5px 5px rgba(0,0,0,.5);box-shadow:5px 5px 5px rgba(0,0,0,.5);position:relative;z-index:0}.ol-overlay-container .ol-magnify:before{border-radius:50%;-webkit-box-shadow:0 0 40px 2px rgba(0,0,0,.25) inset;box-shadow:0 0 40px 2px rgba(0,0,0,.25) inset;content:"";display:block;height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}.ol-overlay-container .ol-magnify:after{border-radius:50%;-webkit-box-shadow:0 0 20px 7px rgba(255,255,255,1);box-shadow:0 0 20px 7px rgba(255,255,255,1);content:"";display:block;height:0;left:23%;position:absolute;top:20%;width:20%;z-index:1;transform:rotate(-40deg);-webkit-transform:rotate(-40deg)}.ol-popup.anim{visibility:hidden}.ol-popup.anim.visible{visibility:visible}.ol-popup.anim.visible>div{visibility:visible;-webkit-transform:none;transform:none;-webkit-animation:ol-popup_bounce .4s ease 1;animation:ol-popup_bounce .4s ease 1}@-webkit-keyframes ol-popup_bounce{from{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.1);transform:scale(1.1)}80%{-webkit-transform:scale(.95);transform:scale(.95)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes ol-popup_bounce{from{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.1);transform:scale(1.1)}80%{-webkit-transform:scale(.95);transform:scale(.95)}to{-webkit-transform:scale(1);transform:scale(1)}}.ol-popup.anim.ol-popup-bottom.ol-popup-left>div{-webkit-transform-origin:0 100%;transform-origin:0 100%}.ol-popup.anim.ol-popup-bottom.ol-popup-right>div{-webkit-transform-origin:100% 100%;transform-origin:100% 100%}.ol-popup.anim.ol-popup-bottom.ol-popup-center>div{-webkit-transform-origin:50% 100%;transform-origin:50% 100%}.ol-popup.anim.ol-popup-top.ol-popup-left>div{-webkit-transform-origin:0 0;transform-origin:0 0}.ol-popup.anim.ol-popup-top.ol-popup-right>div{-webkit-transform-origin:100% 0;transform-origin:100% 0}.ol-popup.anim.ol-popup-top.ol-popup-center>div{-webkit-transform-origin:50% 0;transform-origin:50% 0}.ol-popup.anim.ol-popup-middle.ol-popup-left>div{-webkit-transform-origin:0 50%;transform-origin:0 50%}.ol-popup.anim.ol-popup-middle.ol-popup-right>div{-webkit-transform-origin:100% 50%;transform-origin:100% 50%}.ol-popup{font-size:.9em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ol-popup .ol-popup-content{overflow:hidden;cursor:default;padding:.25em .5em}.ol-popup.hasclosebox .ol-popup-content{margin-right:1.7em}.ol-popup .ol-popup-content:after{clear:both;content:"";display:block;font-size:0;height:0}.ol-popup .anchor{display:block;width:0;height:0;background:red;position:absolute;margin:-11px 22px;pointer-events:none}.ol-popup-center.ol-popup-middle .anchor,.ol-popup.ol-fixed .anchor{display:none}.ol-popup .anchor:after,.ol-popup .anchor:before{position:absolute}.ol-popup-right .anchor:after,.ol-popup-right .anchor:before{right:0}.ol-popup-top .anchor{top:0}.ol-popup-bottom .anchor{bottom:0}.ol-popup-right .anchor{right:0}.ol-popup-left .anchor{left:0}.ol-popup-center .anchor{left:50%;margin-left:0!important}.ol-popup-middle .anchor{top:50%;margin-top:0!important}.ol-popup.ol-fixed{margin:0!important;top:.5em!important;right:.5em!important;left:auto!important;bottom:auto!important;-webkit-transform:none!important;transform:none!important}.ol-popup.ol-fixed.anim>div{-webkit-animation:none;animation:none}.ol-popup .ol-fix{width:1em;height:.9em;background:#fff;position:relative;float:right;margin:.2em;cursor:pointer}.ol-popup .ol-fix:before{content:"";width:.8em;height:.7em;display:block;border:.1em solid #666;border-right-width:.3em;-webkit-box-sizing:border-box;box-sizing:border-box;margin:.1em}.ol-popup.shadow{-webkit-box-shadow:2px 2px 2px 2px rgba(0,0,0,.5);box-shadow:2px 2px 2px 2px rgba(0,0,0,.5)}.ol-popup .closeBox{background-color:rgba(0,60,136,.5);color:#fff;border:0;border-radius:2px;cursor:pointer;float:right;font-size:.9em;font-weight:700;width:1.4em;height:1.4em;margin:5px 5px 0 0;padding:0;position:relative;display:none}.ol-popup.hasclosebox .closeBox{display:block}.ol-popup .closeBox:hover{background-color:rgba(0,60,136,.7)}.ol-popup .closeBox:after{content:"\00d7";font-size:1.5em;top:50%;left:0;right:0;width:100%;text-align:center;line-height:1em;margin:-.5em 0;position:absolute}.ol-popup.modifytouch .ol-popup-content,.ol-popup.tooltips .ol-popup-content{padding:0 .25em;font-size:.85em;white-space:nowrap}.ol-popup.modifytouch{background-color:#eee}.ol-popup.modifytouch .ol-popup-content a{text-decoration:none}.ol-popup.tooltips{background-color:#ffa}.ol-popup.default>div{background-color:#fff;border:1px solid #69f;border-radius:5px}.ol-popup.default .anchor:after,.ol-popup.default .anchor:before,.ol-popup.placemark .anchor:after,.ol-popup.placemark.pushpin>div:before{border-color:currentColor transparent;content:""}.ol-popup.default{margin:-11px 0;-webkit-transform:translate(0,-22px);transform:translate(0,-22px)}.ol-popup-top.ol-popup.default{margin:11px 0;-webkit-transform:none;transform:none}.ol-popup-left.default{margin:-11px -22px;-webkit-transform:translate(0,-22px);transform:translate(0,-22px)}.ol-popup-top.ol-popup-left.default{margin:11px -22px;-webkit-transform:none;transform:none}.ol-popup-right.default{margin:-11px 22px;-webkit-transform:translate(44px,-22px);transform:translate(44px,-22px)}.ol-popup-top.ol-popup-right.default{margin:11px 22px;-webkit-transform:translate(44px,0);transform:translate(44px,0)}.ol-popup-middle.default{margin:0 10px;-webkit-transform:none;transform:none}.ol-popup-middle.ol-popup-right.default{margin:0 -10px;-webkit-transform:translate(-20px,0);transform:translate(-20px,0)}.ol-popup.default .anchor{color:#69f}.ol-popup.default .anchor:after,.ol-popup.default .anchor:before{border-style:solid;border-width:11px;margin:0 -11px}.ol-popup.default .anchor:after{border-color:#fff transparent;border-width:11px;margin:2px -11px}.ol-popup-top.default .anchor:after,.ol-popup-top.default .anchor:before{border-top:0;top:0}.ol-popup-bottom.default .anchor:after,.ol-popup-bottom.default .anchor:before{border-bottom:0;bottom:0}.ol-popup-middle.default .anchor:before{margin:-11px -33px;border-color:transparent currentColor}.ol-popup-middle.default .anchor:after{margin:-11px -31px;border-color:transparent #fff}.ol-popup-middle.ol-popup-left.default .anchor:after,.ol-popup-middle.ol-popup-left.default .anchor:before{border-left:0}.ol-popup-middle.ol-popup-right.default .anchor:after,.ol-popup-middle.ol-popup-right.default .anchor:before{border-right:0}.ol-popup.placemark{color:#c00;margin:-.65em 0;-webkit-transform:translate(0,-1.3em);transform:translate(0,-1.3em)}.ol-popup.placemark>div{position:relative;font-size:15px;background-color:#fff;border:0;-webkit-box-shadow:inset 0 0 0 .45em;box-shadow:inset 0 0 0 .45em;width:2em;height:2em;border-radius:50%;min-width:unset;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-popup.placemark .ol-popup-content{overflow:hidden;cursor:default;text-align:center;padding:.25em 0;width:1em;height:1em;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);line-height:1em}.ol-popup.placemark .anchor{margin:0}.ol-popup.placemark .anchor:before{content:"";margin:-.5em;background:0 0;width:1em;height:.5em;border-radius:50%;-webkit-box-shadow:0 1em .5em rgba(0,0,0,.5);box-shadow:0 1em .5em rgba(0,0,0,.5)}.ol-popup.placemark.blazon>div,.ol-popup.placemark.shield>div{border-radius:.2em}.ol-popup.placemark .anchor:after{border-style:solid;border-width:1em .7em 0;margin:-.75em -.7em;bottom:0}.ol-popup.placemark.shield .anchor:after{border-width:.8em 1em 0;margin:-.7em -1em}.ol-popup.placemark.pushpin{margin:-2.2em 0;-webkit-transform:translate(0,-4em);transform:translate(0,-4em)}.ol-popup.placemark.pushpin>div{border-radius:0;background:0 0!important;-webkit-box-shadow:inset 2em 0 currentColor;box-shadow:inset 2em 0 currentColor;width:1.1em}.ol-popup.placemark.pushpin>div:before{width:1.3em;height:1.5em;border-style:solid;position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);border-width:.3em .5em .5em;pointer-events:none}.ol-popup.placemark.needle{margin:-2em 0;-webkit-transform:translate(0,-4em);transform:translate(0,-4em)}.ol-popup.placemark.needle .anchor,.ol-popup.placemark.pushpin .anchor{margin:-1.2em}.ol-popup.placemark.needle .anchor:after,.ol-popup.placemark.pushpin .anchor:after{border-style:solid;border-width:2em .15em 0;margin:-.55em -.2em;width:.1em}.ol-popup.placemark.needle .anchor:before,.ol-popup.placemark.pushpin .anchor:before{margin:-.75em -.5em}.ol-popup.placemark.flagv{margin:-2em 1em;-webkit-transform:translate(0,-4em);transform:translate(0,-4em)}.ol-popup.placemark.flagv>div{border-radius:0;-webkit-box-shadow:none;box-shadow:none;background-color:transparent}.ol-popup.placemark.flagv>div:before{content:"";border:1em solid transparent;position:absolute;border-left:2em solid currentColor;pointer-events:none}.ol-popup.placemark.flagv .anchor{margin:-1.4em}.ol-popup.placemark.flag{margin:-2em 1em;-webkit-transform:translate(0,-4em);transform:translate(0,-4em)}.ol-popup.placemark.flag>div{border-radius:0;-webkit-transform-origin:0 150%!important;transform-origin:0 150%!important}.ol-popup.placemark.flag .anchor{margin:-1.4em}.ol-popup.placemark.flag .anchor:after,.ol-popup.placemark.flagv .anchor:after{border-style:solid;border-width:2em .15em 0;margin:-.55em -1em;width:.1em}.ol-popup.placemark.flag .anchor:before,.ol-popup.placemark.flagv .anchor:before{margin:-.75em -1.25em}.ol-popup.placemark.flag.finish{margin:-2em 1em}.ol-popup.placemark.flag.finish>div{background-image:linear-gradient(45deg,currentColor 25%,transparent 25%,transparent 75%,currentColor 75%,currentColor),linear-gradient(45deg,currentColor 25%,transparent 25%,transparent 75%,currentColor 75%,currentColor);background-size:1em 1em;background-position:.5em 0,0 .5em;-webkit-box-shadow:inset 0 0 0 .25em;box-shadow:inset 0 0 0 .25em}.ol-popup.black .closeBox{background-color:rgba(0,0,0,.5);border-radius:5px;color:#f80}.ol-popup.black .closeBox:hover{background-color:rgba(0,0,0,.7);color:#da2}.ol-popup.black{margin:-20px 0;-webkit-transform:translate(0,-40px);transform:translate(0,-40px)}.ol-popup.black>div{background-color:rgba(0,0,0,.6);border-radius:5px;color:#fff}.ol-popup-top.ol-popup.black{margin:20px 0;-webkit-transform:none;transform:none}.ol-popup-left.black{margin:-20px -22px;-webkit-transform:translate(0,-40px);transform:translate(0,-40px)}.ol-popup-top.ol-popup-left.black{margin:20px -22px;-webkit-transform:none;transform:none}.ol-popup-right.black{margin:-20px 22px;-webkit-transform:translate(44px,-40px);transform:translate(44px,-40px)}.ol-popup-top.ol-popup-right.black{margin:20px 22px;-webkit-transform:translate(44px,0);transform:translate(44px,0)}.ol-popup-middle.black{margin:0 11px;-webkit-transform:none;transform:none}.ol-popup-left.ol-popup-middle.black{-webkit-transform:none;transform:none}.ol-popup-right.ol-popup-middle.black{margin:0 -11px;-webkit-transform:translate(-22px,0);transform:translate(-22px,0)}.ol-popup.black .anchor{margin:-20px 11px;color:rgba(0,0,0,.6)}.ol-popup.black .anchor:before{content:"";border-color:currentColor transparent;border-style:solid;border-width:20px 11px}.ol-popup-top.black .anchor:before{border-top:0;top:0}.ol-popup-bottom.black .anchor:before{border-bottom:0;bottom:0}.ol-popup-middle.black .anchor:before{margin:-20px -22px;border-color:transparent currentColor}.ol-popup-middle.ol-popup-left.black .anchor:before{border-left:0}.ol-popup-middle.ol-popup-right.black .anchor:before{border-right:0}.ol-popup-center.black .anchor:before{margin:0 -10px}.ol-popup.tips .closeBox{background-color:red;border-radius:50%;color:#fff;width:1.2em;height:1.2em}.ol-popup.tips .closeBox:hover{background-color:#f40}.ol-popup.tips{margin:-20px 0;-webkit-transform:translate(0,-40px);transform:translate(0,-40px)}.ol-popup.tips>div{background-color:#cea;border:5px solid #ad7;border-radius:5px;color:#333}.ol-popup-top.ol-popup.tips{margin:20px 0;-webkit-transform:none;transform:none}.ol-popup-left.tips{margin:-20px -22px;-webkit-transform:translate(0,-40px);transform:translate(0,-40px)}.ol-popup-top.ol-popup-left.tips{margin:20px -22px;-webkit-transform:none;transform:none}.ol-popup-right.tips{margin:-20px 22px;-webkit-transform:translate(44px,-40px);transform:translate(44px,-40px)}.ol-popup-top.ol-popup-right.tips{margin:20px 22px;-webkit-transform:translate(44px,0);transform:translate(44px,0)}.ol-popup-middle.tips{margin:0;-webkit-transform:none;transform:none}.ol-popup-left.ol-popup-middle.tips{margin:0 22px;-webkit-transform:none;transform:none}.ol-popup-right.ol-popup-middle.tips{margin:0 -22px;-webkit-transform:translate(-44px,0);transform:translate(-44px,0)}.ol-popup.tips .anchor{margin:-18px 22px;color:#ad7}.ol-popup.tips .anchor:before{content:"";border-color:currentColor transparent;border-style:solid;border-width:20px 11px}.ol-popup-top.tips .anchor:before{border-top:0;top:0}.ol-popup-bottom.tips .anchor:before{border-bottom:0;bottom:0}.ol-popup-center.tips .anchor:before{border-width:20px 6px;margin:0 -6px}.ol-popup-left.tips .anchor:before{border-left:0;margin-left:0}.ol-popup-right.tips .anchor:before{border-right:0;margin-right:0}.ol-popup-middle.tips .anchor:before{margin:-6px -41px;border-color:transparent currentColor;border-width:6px 20px}.ol-popup-middle.ol-popup-left.tips .anchor:before{border-left:0}.ol-popup-middle.ol-popup-right.tips .anchor:before{border-right:0}.ol-popup.warning .closeBox{background-color:red;border-radius:50%;color:#fff;font-size:.83em}.ol-popup.warning .closeBox:hover{background-color:#f40}.ol-popup.warning{background-color:#fd0;border-radius:3px;border:4px dashed red;color:#900;margin:-28px 10px;-webkit-transform:translate(0,-56px);transform:translate(0,-56px)}.ol-popup-top.ol-popup.warning{margin:28px 10px;-webkit-transform:none;transform:none}.ol-popup-left.warning{margin:-28px -22px;-webkit-transform:translate(0,-56px);transform:translate(0,-56px)}.ol-popup-top.ol-popup-left.warning{margin:28px -22px;-webkit-transform:none;transform:none}.ol-popup-right.warning{margin:-28px 22px;-webkit-transform:translate(44px,-56px);transform:translate(44px,-56px)}.ol-popup-top.ol-popup-right.warning{margin:28px 22px;-webkit-transform:translate(44px,0);transform:translate(44px,0)}.ol-popup-middle.warning{margin:0;-webkit-transform:none;transform:none}.ol-popup-left.ol-popup-middle.warning{margin:0 22px;-webkit-transform:none;transform:none}.ol-popup-right.ol-popup-middle.warning{margin:0 -22px;-webkit-transform:translate(-44px,0);transform:translate(-44px,0)}.ol-popup.warning .anchor{margin:-33px 7px}.ol-popup.warning .anchor:before{content:"";border-color:red transparent;border-style:solid;border-width:30px 11px}.ol-popup-top.warning .anchor:before{border-top:0;top:0}.ol-popup-bottom.warning .anchor:before{border-bottom:0;bottom:0}.ol-popup-center.warning .anchor:before{margin:0 -21px}.ol-popup-middle.warning .anchor:before{margin:-10px -33px;border-color:transparent red;border-width:10px 22px}.ol-popup-middle.ol-popup-left.warning .anchor:before{border-left:0}.ol-popup-middle.ol-popup-right.warning .anchor:before{border-right:0}.ol-popup .ol-popupfeature table{width:100%}.ol-popup .ol-popupfeature table td{max-width:25em;overflow:hidden;text-overflow:ellipsis}.ol-popup .ol-popupfeature table td img{max-width:100px;max-height:100px}.ol-popup .ol-popupfeature tr:nth-child(2n+1){background-color:#eee}.ol-popup .ol-popupfeature .ol-zoombt{border:0;width:2em;height:2em;display:inline-block;color:rgba(0,60,136,.5);position:relative;background:0 0;outline:0}.ol-popup .ol-popupfeature .ol-zoombt:before{content:"";position:absolute;-webkit-box-sizing:border-box;box-sizing:border-box;width:1em;height:1em;background-color:transparent;border:.17em solid currentColor;border-radius:100%;top:.3em;left:.3em}.ol-popup .ol-popupfeature .ol-zoombt:after{content:"";position:absolute;-webkit-box-sizing:border-box;box-sizing:border-box;top:1.35em;left:1.15em;border-width:.1em .3em;border-style:solid;border-radius:.03em;-webkit-transform:rotate(45deg);transform:rotate(45deg);-webkit-box-shadow:-.2em 0 0 -.04em;box-shadow:-.2em 0 0 -.04em}.ol-popup .ol-popupfeature .ol-count{float:right;margin:.25em 0}.ol-popup .ol-popupfeature .ol-next,.ol-popup .ol-popupfeature .ol-prev{border-style:solid;border-color:transparent rgba(0,60,136,.5);border-width:.5em 0 .5em .5em;display:inline-block;vertical-align:bottom;margin:0 .5em;cursor:pointer}.ol-popup .ol-popupfeature .ol-prev{border-width:.5em .5em .5em 0}.ol-popup.tooltips.black{background-color:transparent}.ol-popup.tooltips.black>div{-webkit-transform:scaleY(1.3);transform:scaleY(1.3);padding:.2em .5em;background-color:rgba(0,0,0,.5)}.ol-popup-middle.tooltips.black .anchor:before{border-width:5px 10px;margin:-5px -21px}.ol-popup-center.ol-popup-middle,.ol-popup-top.ol-popup-left.ol-fixPopup,.ol-popup-top.ol-popup-right.ol-fixPopup,.ol-popup.ol-fixPopup{margin:0}.ol-miniscroll{position:relative}.ol-miniscroll:hover .ol-scroll{opacity:.5;-webkit-transition:opacity 1s;transition:opacity 1s}.ol-miniscroll .ol-scroll{-ms-touch-action:none;touch-action:none;position:absolute;right:0;width:9px;height:auto;max-height:100%;opacity:0;border-radius:9px;-webkit-transition:opacity 1s .5s;transition:opacity 1s .5s;overflow:hidden;z-index:1}.ol-miniscroll .ol-scroll>div{-ms-touch-action:none;touch-action:none;position:absolute;top:0;right:0;width:9px;height:9px;-webkit-box-shadow:inset 10px 0 currentColor;box-shadow:inset 10px 0 currentColor;border-radius:9px/12px;border:2px solid transparent;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer}.ol-miniscroll .ol-scroll.ol-100pc{opacity:0}.ol-viewport canvas.ol-fixedoverlay{position:absolute;top:0;left:0;width:100%;height:100%}.ol-ext-toggle-switch,.ol-ext-toggle-switch span{position:relative;cursor:pointer}.ol-ext-toggle-switch input[type=radio],.ol-ext-toggle-switch input[type=checkbox]{display:none}.ol-ext-toggle-switch span{color:rgba(0,60,136,.5);background-color:#ccc;-webkit-transition:.4s,background-color 0s,border-color 0s;transition:.4s,background-color 0s,border-color 0s;width:1.6em;height:1em;display:inline-block;border-radius:1em;font-size:1.3em;vertical-align:middle;margin:-.15em .2em .15em}.ol-ext-toggle-switch span:before{position:absolute;content:"";height:1em;width:1em;left:0;top:50%;background-color:#fff;-webkit-transition:.4s;transition:.4s;border-radius:1em;display:block;-webkit-transform:translateY(-50%);transform:translateY(-50%);border:2px solid #ccc;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-ext-toggle-switch:hover span{background-color:#999}.ol-ext-toggle-switch:hover span:before{border-color:#999}.ol-ext-toggle-switch input:checked+span{background-color:currentColor}.ol-ext-check span,.ol-ext-radio:hover input:checked~span{background-color:#ccc}.ol-ext-toggle-switch input:checked+span:before{-webkit-transform:translate(.6em,-50%);transform:translate(.6em,-50%);border-color:currentColor}.ol-ext-check{position:relative;display:inline-block}.ol-ext-check input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.ol-ext-check span{color:rgba(0,60,136,.5);position:relative;display:inline-block;width:1em;height:1em;margin:-.1em .5em .1em;vertical-align:middle}.ol-ext-check:hover span{background-color:#999}.ol-ext-checkbox input:checked~span{background-color:currentColor}.ol-ext-checkbox input:checked~span:before{content:"";position:absolute;width:.5em;height:.8em;top:50%;left:50%;-webkit-transform:translateY(-.1em) translate(-50%,-50%) rotate(45deg);transform:translateY(-.1em) translate(-50%,-50%) rotate(45deg);-webkit-box-shadow:inset -.2em -.2em #fff;box-shadow:inset -.2em -.2em #fff}.ol-ext-radio span{width:1.1em;height:1.1em;border-radius:50%}.ol-ext-radio input:checked~span:before{content:"";position:absolute;width:50%;height:50%;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);border-radius:50%;background-color:currentColor}.ol-collection-list{margin:0;padding:0;list-style:none}.ol-collection-list li{position:relative;padding:0 2em 0 1em}.ol-collection-list li:hover{background-color:rgba(0,60,136,.2)}.ol-collection-list li.ol-select{background-color:rgba(0,60,136,.5);color:#fff}.ol-collection-list li .ol-order{position:absolute;-ms-touch-action:none;touch-action:none;right:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:2em;height:100%;cursor:n-resize}.ol-collection-list li .ol-order:before{content:'';position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:18px;height:2px;background-color:currentColor;-webkit-box-shadow:0 5px,0 -5px;box-shadow:0 5px,0 -5px;border-radius:2px}.ol-ext-colorpicker.ol-popup{width:2em;height:1.5em;background-color:transparent;background-image:linear-gradient(45deg,#aaa 25%,transparent 25%,transparent 75%,#aaa 75%),linear-gradient(45deg,#aaa 25%,transparent 25%,transparent 75%,#aaa 75%);background-size:10px 10px;background-position:0 -1px,5px 4px}.ol-ext-colorpicker .ol-tabbar{background-color:#eee;border-bottom:1px solid #999;display:none}.ol-ext-colorpicker.ol-tab .ol-tabbar{display:block}.ol-ext-colorpicker .ol-tabbar>div{display:inline-block;background-color:#fff;padding:0 .5em;border:1px solid #999;border-radius:2px 2px 0 0;position:relative;top:1px;cursor:pointer}.ol-ext-colorpicker .ol-tabbar>div:nth-child(1){border-bottom-color:#fff}.ol-ext-colorpicker.ol-picker-tab .ol-tabbar>div:nth-child(1){border-bottom-color:#999}.ol-ext-colorpicker.ol-picker-tab .ol-tabbar>div:nth-child(2){border-bottom-color:#fff}.ol-ext-colorpicker.ol-popup.ol-tab .ol-popup{width:180px}.ol-ext-colorpicker.ol-tab .ol-palette{margin:0 10px}.ol-ext-colorpicker.ol-tab .ol-container{display:none}.ol-ext-colorpicker.ol-tab.ol-picker-tab .ol-container{display:block}.ol-ext-colorpicker.ol-tab.ol-picker-tab .ol-palette{display:none}.ol-ext-colorpicker.ol-popup .ol-popup{width:340px}.ol-ext-colorpicker.ol-popup .ol-vignet{content:"";position:absolute;width:100%;height:100%;top:0;left:0;border:0;background-color:currentColor;pointer-events:none}.ol-ext-colorpicker .ol-container{position:relative;display:inline-block;vertical-align:top}.ol-ext-colorpicker .ol-cursor{pointer-events:none}.ol-ext-colorpicker .ol-picker{position:relative;cursor:crosshair;width:150px;height:150px;border:5px solid #fff;background-color:currentColor;background-image:-webkit-gradient(linear,left top,left bottom,from(0),color-stop(#000),to(transparent)),-webkit-gradient(linear,left top,right top,from(#fff),to(transparent));background-image:linear-gradient(0,#000,transparent),linear-gradient(90deg,#fff,transparent)}.ol-ext-colorpicker .ol-palette>div,.ol-ext-colorpicker .ol-slider{background-image:linear-gradient(45deg,#aaa 25%,transparent 25%,transparent 75%,#aaa 75%),linear-gradient(45deg,#aaa 25%,transparent 25%,transparent 75%,#aaa 75%);background-size:10px 10px}.ol-ext-colorpicker .ol-picker .ol-cursor{position:absolute;left:50%;top:50%;border:1px solid rgba(0,0,0,.7);-webkit-box-shadow:0 0 0 1px rgba(255,255,255,.7);box-shadow:0 0 0 1px rgba(255,255,255,.7);-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:10px;height:10px;border-radius:50%}.ol-ext-colorpicker .ol-slider{position:relative;cursor:crosshair;background-color:#fff;height:10px;width:150px;margin:5px 0 10px;border:5px solid #fff;border-width:0 5px;background-position:0 -1px,5px 4px}.ol-ext-colorpicker .ol-slider>div{width:100%;height:100%;background-image:linear-gradient(45deg,transparent,#fff);pointer-events:none}.ol-ext-colorpicker .ol-slider .ol-cursor{position:absolute;width:4px;height:12px;border:1px solid #000;top:50%;left:0;background:0 0;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ol-ext-colorpicker .ol-tint{position:absolute;cursor:crosshair;width:10px;height:150px;border:5px solid #fff;border-width:5px 0;-webkit-box-sizing:border;box-sizing:border;top:0;right:5px;background-image:-webkit-gradient(linear,left top,left bottom,from(0),color-stop(red),color-stop(#f0f),color-stop(#00f),color-stop(#0ff),color-stop(#0f0),color-stop(#ff0),to(red));background-image:linear-gradient(0,red,#f0f,#00f,#0ff,#0f0,#ff0,red)}.ol-ext-colorpicker .ol-tint .ol-cursor{position:absolute;top:0;left:50%;border:1px solid #000;height:4px;width:12px;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ol-ext-colorpicker .ol-clear{position:absolute;border:2px solid #999;right:4px;top:163px;width:10px;height:10px}.ol-ext-colorpicker .ol-clear:after,.ol-ext-colorpicker .ol-clear:before{content:"";position:absolute;width:15px;height:2px;background-color:#999;top:50%;left:50%;-webkit-transform:translate(-50%,-50%) rotate(45deg);transform:translate(-50%,-50%) rotate(45deg)}.ol-ext-colorpicker .ol-clear:after{-webkit-transform:translate(-50%,-50%) rotate(-45deg);transform:translate(-50%,-50%) rotate(-45deg)}.ol-ext-colorpicker.ol-nopacity .ol-alpha,.ol-ext-colorpicker.ol-nopacity .ol-clear,.ol-ext-colorpicker.ol-nopacity .ol-slider{display:none}.ol-ext-colorpicker .ol-rgb{position:relative;padding:5px;width:170px;display:none}.ol-ext-colorpicker .ol-rgb input{width:25%;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 0 0 2px;border:1px solid #999;border-radius:2px;font-size:13px}.ol-ext-colorpicker .ol-rgb input:nth-child(1){background-color:rgba(255,0,0,.1)}.ol-ext-colorpicker .ol-rgb input:nth-child(2){background-color:rgba(0,255,0,.1)}.ol-ext-colorpicker .ol-rgb input:nth-child(3){background-color:rgba(0,0,255,.12)}.ol-ext-colorpicker .ol-txt-color,.ol-ext-colorpicker button{font-size:13px;margin:0 5px 5px;text-align:center;width:170px;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0;border:1px solid #999;border-radius:2px;display:block}.ol-ext-colorpicker button{background-color:#eee}.ol-ext-colorpicker button:hover{background-color:#e9e9e9}.ol-ext-colorpicker .ol-txt-color.ol-error{background-color:rgba(255,0,0,.2)}.ol-ext-colorpicker .ol-palette{padding:2px;display:inline-block;width:152px}.ol-ext-colorpicker .ol-palette>div{width:15px;height:15px;display:inline-block;background-position:0 0,5px 5px;margin:2px;-webkit-box-shadow:0 0 2px 0 #666;box-shadow:0 0 2px 0 #666;border-radius:1px;cursor:pointer;position:relative}.ol-ext-colorpicker .ol-palette>div:before{content:"";position:absolute;background-color:currentColor;width:100%;height:100%}.ol-ext-colorpicker .ol-palette>div.ol-select:after{content:"";position:absolute;width:6px;height:12px;-webkit-box-shadow:1px 1px #fff,2px 2px #000;box-shadow:1px 1px #fff,2px 2px #000;top:30%;left:50%;-webkit-transform:translate(-50%,-50%) rotate(45deg);transform:translate(-50%,-50%) rotate(45deg)}.ol-ext-colorpicker .ol-palette>div:hover{-webkit-box-shadow:0 0 2px 1px #d90;box-shadow:0 0 2px 1px #d90}.ol-ext-colorpicker .ol-palette hr{margin:0}.ol-input-popup{display:inline-block;position:relative}.ol-input-popup .ol-popup{position:absolute;-webkit-box-shadow:1px 1px 3px 1px #999;box-shadow:1px 1px 3px 1px #999;background-color:#fff;z-index:1;display:none;left:-5px;padding:0;margin:0;list-style:none;white-space:nowrap}.ol-input-popup.ol-focus .ol-popup,.ol-input-popup.ol-hover:hover .ol-popup{display:block}.ol-input-popup.ol-right .ol-popup{left:auto;right:-5px}.ol-input-popup.ol-middle .ol-popup{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.ol-input-popup .ol-popup li{position:relative;padding:10px 5px}.ol-input-popup li.ol-selected,.ol-input-popup li:hover{background-color:#ccc}.ol-input-popup.ol-fixed .ol-popup,.ol-input-popup.ol-fixed:hover .ol-popup{position:relative;left:0;-webkit-box-shadow:unset;box-shadow:unset;background-color:transparent;display:inline-block;vertical-align:middle}.ol-input-popup>div{position:relative;display:inline-block;vertical-align:middle;border-radius:2px;border:1px solid #999;padding:3px 20px 3px 10px}.ol-input-popup>div:before{position:absolute;content:"";right:5px;top:50%;border:5px solid transparent;border-top:5px solid #999}.ol-ext-popup-input{display:inline-block;vertical-align:top}.ol-ext-popup-input.ol-popup{position:relative;width:2em;height:1.5em;display:inline-block;border:3px solid #fff;border-right-width:1em;-webkit-box-shadow:0 0 2px 1px #666;box-shadow:0 0 2px 1px #666;border-radius:2px;-webkit-box-sizing:content-box;box-sizing:content-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle}.ol-ext-popup-input.ol-popup:after{content:"";position:absolute;border:.5em solid #aaa;border-width:.5em .3em 0;border-color:#999 transparent;right:-.8em;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}.ol-ext-popup-input *{-webkit-box-sizing:content-box;box-sizing:content-box}.ol-ext-popup-input.ol-popup .ol-popup{position:absolute;top:100%;min-width:3em;min-height:3em;left:0;-webkit-box-shadow:1px 1px 3px 1px #999;box-shadow:1px 1px 3px 1px #999;background-color:#fff;display:none;z-index:1}.ol-ext-popup-input.ol-popup .ol-popup.ol-visible{display:block}.ol-ext-popup-input.ol-popup-fixed .ol-popup{position:fixed;top:auto;left:auto}.ol-input-popup.ol-size li{display:table-cell;height:100%;padding:5px;vertical-align:middle}.ol-input-popup.ol-size li>*{background-color:#369;border-radius:50%;vertical-align:middle;width:1em;height:1em}.ol-input-popup.ol-size li>.ol-option-0{position:relative;width:1em;height:1em;border:2px solid currentColor;color:#aaa;background-color:transparent;-webkit-box-sizing:border-box;box-sizing:border-box}.ol-input-popup.ol-size li>:before{position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ol-input-popup.ol-size li>.ol-option-0:before{content:"";width:1em;height:2px;background-color:#aaa;-webkit-transform:translate(-50%,-50%) rotate(-45deg);transform:translate(-50%,-50%) rotate(-45deg)}.ol-input-slider{display:inline-block;position:relative}.ol-input-slider .ol-popup{position:absolute;-webkit-box-shadow:1px 1px 3px 1px #999;box-shadow:1px 1px 3px 1px #999;background-color:#fff;z-index:1;display:none;left:-5px}.ol-input-slider.ol-right .ol-popup{left:auto;right:-5px}.ol-input-slider.ol-focus .ol-popup,.ol-input-slider.ol-hover:hover .ol-popup{display:block;white-space:nowrap}.ol-input-slider.ol-focus .ol-popup>*,.ol-input-slider.ol-hover:hover .ol-popup>*{display:inline-block;vertical-align:middle}.ol-input-slider.ol-focus .ol-popup>.ol-before,.ol-input-slider.ol-hover:hover .ol-popup>.ol-before{margin-left:10px}.ol-input-slider.ol-focus .ol-popup>.ol-after,.ol-input-slider.ol-hover:hover .ol-popup>.ol-after{margin-right:10px}.ol-input-slider .ol-slider{position:relative;width:100px;height:3px;border:0 solid transparent;border-width:10px 15px;-webkit-box-shadow:inset 0 0 0 1px #999;box-shadow:inset 0 0 0 1px #999;-webkit-box-sizing:content-box;box-sizing:content-box;cursor:pointer}.ol-input-slider .ol-slider>.ol-cursor{position:absolute;width:5px;height:10px;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);background-color:#999;pointer-events:none}.ol-input-slider.ol-fixed .ol-popup,.ol-input-slider.ol-fixed:hover .ol-popup{position:relative;left:0;-webkit-box-shadow:unset;box-shadow:unset;background-color:transparent;display:inline-block;vertical-align:middle}.ol-input-slider.ol-size .ol-slider{height:auto;-webkit-box-shadow:none;box-shadow:none}.ol-input-slider.ol-size .ol-slider .ol-back{width:0;color:#aaa;border:0 solid transparent;border-width:0 0 20px 100px;border-color:currentColor transparent;pointer-events:none}.ol-input-slider.ol-size .ol-slider>.ol-cursor{width:2px;height:calc(100% + 4px);border-width:5px 3px;border-style:solid;border-color:red transparent;-o-border-image:initial;border-image:initial;background-color:transparent;-webkit-box-shadow:inset 3px 0 red;box-shadow:inset 3px 0 red}.ol-input-popup.ol-width li{padding:5px}.ol-input-popup.ol-width li>*{background-color:#369;width:100px;height:1em}.ol-input-popup.ol-width li>.ol-option-0{position:relative;height:1px;background-image:linear-gradient(90deg,#aaa 2px,transparent 2px);background-color:transparent;background-size:4px} \ No newline at end of file diff --git a/dist/ol-ext.min.js b/dist/ol-ext.min.js index 668086f74..643abc424 100644 --- a/dist/ol-ext.min.js +++ b/dist/ol-ext.min.js @@ -1,9 +1,9 @@ /** * ol-ext - A set of cool extensions for OpenLayers (ol) in node modules structure * @description ol3,openlayers,popup,menu,symbol,renderer,filter,canvas,interaction,split,statistic,charts,pie,LayerSwitcher,toolbar,animation - * @version v3.2.23 + * @version v3.2.24 * @author Jean-Marc Viglino * @see https://github.com/Viglino/ol-ext#, * @license BSD-3-Clause */ -function projectVectorOnVector(t,e){var o=(t[0]*e[0]+t[1]*e[1])/(e[0]*e[0]+e[1]*e[1]);return[e[0]*o,e[1]*o]}function countVector(t,e){return[e[0]-t[0],e[1]-t[1]]}function movePoint(t,e){return[t[0]+e[0],t[1]+e[1]]}window.ol&&!ol.ext&&(ol.ext={}),ol.ext.inherits=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t},window.ol&&(ol.inherits||(ol.inherits=ol.ext.inherits)),window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),window.Element&&!Element.prototype.remove&&(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),ol.ext.Ajax=function(t){t=t||{},ol.Object.call(this),this._auth=t.auth,this.set("dataType",t.dataType||"JSON")},ol.ext.inherits(ol.ext.Ajax,ol.Object),ol.ext.Ajax.get=function(t){var e=new ol.ext.Ajax(t);t.success&&e.on("success",function(e){t.success(e.response,e)}),t.error&&e.on("error",function(e){t.error(e)}),e.send(t.url,t.data,t.options)},ol.ext.Ajax.getCORS=function(t,e){var o=new XMLHttpRequest;o.open("GET",t,!0),o.send(),o.onreadystatechange=function(){this.readyState==this.HEADERS_RECEIVED&&e(o.getResponseHeader("Access-Control-Allow-Origin"))}},ol.ext.Ajax.prototype.send=function(t,e,o){var i=this,n=!1!==(o=o||{}).encode;n&&(t=encodeURI(t));var r="";for(var s in e)e.hasOwnProperty(s)&&void 0!==e[s]&&(r+=(r?"&":"?")+s+"="+(n?encodeURIComponent(e[s]):e[s]));this._request&&!1!==o.abort&&this._request.abort();var a=this._request=new XMLHttpRequest;a.open("GET",t+r,!0),o.timeout&&(a.timeout=o.timeout),this._auth&&a.setRequestHeader("Authorization","Basic "+this._auth),this.dispatchEvent({type:"loadstart"}),a.onload=function(){if(i._request=null,i.dispatchEvent({type:"loadend"}),this.status>=200&&this.status<400){var t;try{switch(i.get("dataType")){case"JSON":t=JSON.parse(this.response);break;default:t=this.response}}catch(t){return void i.dispatchEvent({type:"error",status:0,statusText:"parsererror",error:t,options:o,jqXHR:this})}i.dispatchEvent({type:"success",response:t,status:this.status,statusText:this.statusText,options:o,jqXHR:this})}else i.dispatchEvent({type:"error",status:this.status,statusText:this.statusText,options:o,jqXHR:this})},a.ontimeout=function(){i._request=null,i.dispatchEvent({type:"loadend"}),i.dispatchEvent({type:"error",status:this.status,statusText:"Timeout",options:o,jqXHR:this})},a.onerror=function(){i._request=null,i.dispatchEvent({type:"loadend"}),i.dispatchEvent({type:"error",status:this.status,statusText:this.statusText,options:o,jqXHR:this})},a.send()},ol.ext.SVGFilter=function(t){t=t||{},ol.Object.call(this),ol.ext.SVGFilter.prototype.svg||(ol.ext.SVGFilter.prototype.svg=document.createElementNS(this.NS,"svg"),ol.ext.SVGFilter.prototype.svg.setAttribute("version","1.1"),ol.ext.SVGFilter.prototype.svg.setAttribute("width",0),ol.ext.SVGFilter.prototype.svg.setAttribute("height",0),ol.ext.SVGFilter.prototype.svg.style.position="absolute",document.body.appendChild(ol.ext.SVGFilter.prototype.svg)),this.element=document.createElementNS(this.NS,"filter"),this._id=t.id||"_ol_SVGFilter_"+ol.ext.SVGFilter.prototype._id++,this.element.setAttribute("id",this._id),t.color&&this.element.setAttribute("color-interpolation-filters",t.color),t.operation&&this.addOperation(t.operation),ol.ext.SVGFilter.prototype.svg.appendChild(this.element)},ol.ext.inherits(ol.ext.SVGFilter,ol.Object),ol.ext.SVGFilter.prototype.NS="http://www.w3.org/2000/svg",ol.ext.SVGFilter.prototype.svg=null,ol.ext.SVGFilter.prototype._id=0,ol.ext.SVGFilter.prototype.getId=function(){return this._id},ol.ext.SVGFilter.prototype.remove=function(){this.element.remove()},ol.ext.SVGFilter.prototype.addOperation=function(t){t instanceof Array?t.forEach(function(t){this.addOperation(t)}.bind(this)):(t instanceof ol.ext.SVGOperation||(t=new ol.ext.SVGOperation(t)),this.element.appendChild(t.geElement()))},ol.ext.SVGFilter.prototype.grayscale=function(t){this.addOperation({feoperation:"feColorMatrix",type:"saturate",values:t||0})},ol.ext.SVGFilter.prototype.luminanceToAlpha=function(t){t=t||{},this.addOperation({feoperation:"feColorMatrix",type:"luminanceToAlpha"}),t.gamma&&this.addOperation({feoperation:"feComponentTransfer",operations:[{feoperation:"feFuncA",type:"gamma",amplitude:t.gamma,exponent:1,offset:0}]})},ol.ext.SVGFilter.prototype.applyTo=function(t){var e=document.createElement("CANVAS");return e.width=t.naturalWidth||t.width,e.height=t.naturalHeight||t.height,e.getContext("2d").filter="url(#"+this.getId()+")",e.getContext("2d").drawImage(t,0,0),e},ol.ext.SVGOperation=function(t){"string"==typeof t&&(t={feoperation:t}),t&&t.feoperation?(ol.Object.call(this),this._name=t.feoperation,this.element=document.createElementNS(this.NS,this._name),this.setProperties(t),t.operations instanceof Array&&this.appendChild(t.operations)):console.error("[SVGOperation]: no operation defined.")},ol.ext.inherits(ol.ext.SVGOperation,ol.Object),ol.ext.SVGOperation.prototype.NS="http://www.w3.org/2000/svg",ol.ext.SVGOperation.prototype.getName=function(){return this._name},ol.ext.SVGOperation.prototype.set=function(t,e){/^feoperation$|^operations$/.test(t)||(ol.Object.prototype.set.call(this,t,e),this.element.setAttribute(t,e))},ol.ext.SVGOperation.prototype.setProperties=function(t){for(var e in t=t||{})this.set(e,t[e])},ol.ext.SVGOperation.prototype.geElement=function(){return this.element},ol.ext.SVGOperation.prototype.appendChild=function(t){t instanceof Array?t.forEach(function(t){this.appendChild(t)}.bind(this)):(t instanceof ol.ext.SVGOperation||(t=new ol.ext.SVGOperation(t)),this.element.appendChild(t.geElement()))},ol.View.prototype.flyTo&&console.warn("[OL-EXT] ol/View~View.flyTo redefinition"),ol.View.prototype.flyTo=function(t,e){t=t||{},this.cancelAnimations();var o="function"==typeof e?e:function(){},i=t.duration||2e3,n=t.zoomAt||Math.min(t.zoom||100,this.getZoom())-2,r=t.zoom||this.getZoom(),s=t.center||this.getCenter();this.animate({center:s,duration:i,easing:t.easing,anchor:t.anchor,rotation:t.rotation}),this.animate({zoom:n,duration:i/2,easing:t.easing,anchor:t.anchor},{zoom:r,duration:i/2,easing:t.easing,anchor:t.anchor},o)},ol.View.prototype.takeTour=function(t,e){e=e||{};var o=-1,i=function(n){if(n){var r=t[++o];if("function"==typeof e.step&&e.step(o,t),r){r instanceof Array&&(r={center:[r[0],r[1]],zoom:r[2],type:r[3]});var s=0===o?0:e.delay||750;r.easing||(r.easing=e.easing),r.type||(r.type=e.type),setTimeout(function(){switch(r.type){case"moveTo":this.animate(r,i);break;case"flightTo":default:this.flyTo(r,i)}}.bind(this),s)}else"function"==typeof e.done&&e.done(!0)}else"function"==typeof e.done&&e.done(!1)}.bind(this);i(!0)},ol.color.toHSL=function(t,e){void 0===e&&(e=100),Array.isArray(t)||(t=ol.color.asArray(t));var o,i,n=t[0]/255,r=t[1]/255,s=t[2]/255,a=Math.max(n,r,s),l=Math.min(n,r,s),c=(a+l)/2;if(a===l)o=i=0;else{var h=a-l;switch(i=c>.5?h/(2-a-l):h/(a+l),a){case n:o=(r-s)/h+(r3&&(p[3]=t[3]),p},ol.color.fromHSL=function(t,e){void 0===e&&(e=1e3);var o,i,n,r=t[0]/360,s=t[1]/100,a=t[2]/100;if(0==s)o=i=n=a;else{var l=function(t,e,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?t+6*(e-t)*o:o<.5?e:o<2/3?t+(e-t)*(2/3-o)*6:t},c=a<.5?a*(1+s):a+s-a*s,h=2*a-c;o=l(h,c,r+1/3),i=l(h,c,r),n=l(h,c,r-1/3)}var p=[Math.round(255*o*e)/e,Math.round(255*i*e)/e,Math.round(255*n*e)/e];return t.length>3&&(p[3]=t[3]),p},ol.color.toHSV=function(t,e){void 0===e&&(e=100),Array.isArray(t)||(t=ol.color.asArray(t));var o,i,n=t[0]/255,r=t[1]/255,s=t[2]/255,a=Math.max(n,r,s),l=Math.min(n,r,s),c=a,h=a-l;if(i=0==a?0:h/a,a==l)o=0;else switch(a){case n:o=(r-s)/h+(r3&&(p[3]=t[3]),p},ol.color.fromHSV=function(t,e){void 0===e&&(e=1e3);var o,i,n,r=t[0]/360,s=t[1]/100,a=t[2]/100,l=Math.floor(6*r),c=6*r-l,h=a*(1-s),p=a*(1-c*s),u=a*(1-(1-c)*s);switch(l%6){case 0:o=a,i=u,n=h;break;case 1:o=p,i=a,n=h;break;case 2:o=h,i=a,n=u;break;case 3:o=h,i=p,n=a;break;case 4:o=u,i=h,n=a;break;case 5:o=a,i=h,n=p}var d=[Math.round(255*o*e)/e,Math.round(255*i*e)/e,Math.round(255*n*e)/e];return t.length>3&&(d[3]=t[3]),d},ol.color.toHexa=function(t){return"#"+((1<<24)+(t[0]<<16)+(t[1]<<8)+t[2]).toString(16).slice(1)},ol.ext.element={},ol.ext.element.create=function(t,e){var o;if(e=e||{},"TEXT"===t)o=document.createTextNode(e.html||""),e.parent&&e.parent.appendChild(o);else for(var i in o=document.createElement(t),/button/i.test(t)&&o.setAttribute("type","button"),e)switch(i){case"className":e.className&&e.className.trim&&o.setAttribute("class",e.className.trim());break;case"text":o.innerText=e.text;break;case"html":e.html instanceof Element?o.appendChild(e.html):void 0!==e.html&&(o.innerHTML=e.html);break;case"parent":e.parent&&e.parent.appendChild(o);break;case"options":if(/select/i.test(t))for(var n in e.options)ol.ext.element.create("OPTION",{html:n,value:e.options[n],parent:o});break;case"style":this.setStyle(o,e.style);break;case"change":case"click":ol.ext.element.addListener(o,i,e[i]);break;case"on":for(var r in e.on)ol.ext.element.addListener(o,r,e.on[r]);break;case"checked":o.checked=!!e.checked;break;default:o.setAttribute(i,e[i])}return o},ol.ext.element.createSwitch=function(t){var e=ol.ext.element.create("INPUT",{type:"checkbox",on:t.on,click:t.click,change:t.change,parent:t.parent}),o=Object.assign({input:e},t||{});return new ol.ext.input.Switch(o),e},ol.ext.element.createCheck=function(t){var e=ol.ext.element.create("INPUT",{name:t.name,type:"radio"===t.type?"radio":"checkbox",on:t.on,parent:t.parent});console.log(e);var o=Object.assign({input:e},t||{});return"radio"===t.type?new ol.ext.input.Radio(o):new ol.ext.input.Checkbox(o),e},ol.ext.element.setHTML=function(t,e){e instanceof Element?t.appendChild(e):void 0!==e&&(t.innerHTML=e)},ol.ext.element.appendText=function(t,e){t.appendChild(document.createTextNode(e||""))},ol.ext.element.addListener=function(t,e,o,i){"string"==typeof e&&(e=e.split(" ")),e.forEach(function(e){t.addEventListener(e,o,i)})},ol.ext.element.removeListener=function(t,e,o){"string"==typeof e&&(e=e.split(" ")),e.forEach(function(e){t.removeEventListener(e,o)})},ol.ext.element.show=function(t){t.style.display=""},ol.ext.element.hide=function(t){t.style.display="none"},ol.ext.element.hidden=function(t){return"none"===ol.ext.element.getStyle(t,"display")},ol.ext.element.toggle=function(t){t.style.display="none"===t.style.display?"":"none"},ol.ext.element.setStyle=function(t,e){for(var o in e)switch(o){case"top":case"left":case"bottom":case"right":case"minWidth":case"maxWidth":case"width":case"height":"number"==typeof e[o]?t.style[o]=e[o]+"px":t.style[o]=e[o];break;default:t.style[o]=e[o]}},ol.ext.element.getStyle=function(t,e){var o,i=(t.ownerDocument||document).defaultView;if(i&&i.getComputedStyle)e=e.replace(/([A-Z])/g,"-$1").toLowerCase(),o=i.getComputedStyle(t,null).getPropertyValue(e);else if(t.currentStyle&&(e=e.replace(/-(\w)/g,function(t,e){return e.toUpperCase()}),o=t.currentStyle[e],/^\d+(em|pt|%|ex)?$/i.test(o)))return function(e){var o=t.style.left,i=t.runtimeStyle.left;return t.runtimeStyle.left=t.currentStyle.left,t.style.left=e||0,e=t.style.pixelLeft+"px",t.style.left=o,t.runtimeStyle.left=i,e}(o);return/px$/.test(o)?parseInt(o):o},ol.ext.element.outerHeight=function(t){return t.offsetHeight+ol.ext.element.getStyle(t,"marginBottom")},ol.ext.element.outerWidth=function(t){return t.offsetWidth+ol.ext.element.getStyle(t,"marginLeft")},ol.ext.element.offsetRect=function(t){var e=t.getBoundingClientRect();return{top:e.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:e.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0),height:e.height||e.bottom-e.top,width:e.width||e.right-e.left}},ol.ext.element.getFixedOffset=function(t){var e={left:0,top:0},o=function(t){if(!t)return e;if("absolute"===ol.ext.element.getStyle(t,"position")&&"none"!==ol.ext.element.getStyle(t,"transform")){var i=t.getBoundingClientRect();return e.left+=i.left,e.top+=i.top,e}return o(t.offsetParent)};return o(t.offsetParent)},ol.ext.element.positionRect=function(t,e){var o=0,i=0,n=function(r){if(r)return o+=r.offsetLeft,i+=r.offsetTop,n(r.offsetParent);var s={top:t.offsetTop+i,left:t.offsetLeft+o};return e&&(s.top-=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,s.left-=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0),s.bottom=s.top+t.offsetHeight,s.right=s.top+t.offsetWidth,s};return n(t.offsetParent)},ol.ext.element.scrollDiv=function(t,e){var o,i,n,r,s,a=!1,l=0,c=0,h="function"==typeof(e=e||{}).onmove?e.onmove:function(){},p=e.vertical?"screenY":"screenX",u=e.vertical?"scrollTop":"scrollLeft",d=!1,g=0,m=function(){s&&(g++,setTimeout(f))},f=function(){if(s){if(--g)return;var e=t.clientHeight,o=t.scrollHeight;i=e/o,s.style.height=100*i+"%",s.style.top=t.scrollTop/o*100+"%",r.style.height=e+"px",e>o-.5?r.classList.add("ol-100pc"):r.classList.remove("ol-100pc")}},y=function(e){e.target.classList.contains("ol-noscroll")||(d=!1,a=e[p],c=new Date,t.classList.add("ol-move"),e.preventDefault(),window.addEventListener("pointermove",v),ol.ext.element.addListener(window,["pointerup","pointercancel"],b))},v=function(e){if(d=!0,!1!==a){var r=(n?-1/i:1)*(a-e[p]);t[u]+=r,(o=new Date)-c&&(l=(l+r/(o-c))/2),a=e[p],c=o,r&&h(!0)}},_=function(e){var o=e>0?Math.min(100,e/2):Math.max(-100,e/2);e-=o,t[u]+=o,-1100||n?l=0:c>0&&(l=((l||0)+(a-o[p])/c)/2),_(!1===e.animate?0:200*l),a=!1,l=0,c=0,t.classList.contains("ol-move")?t.classList.remove("ol-hasClick"):(t.classList.add("ol-hasClick"),setTimeout(function(){t.classList.remove("ol-hasClick")},500)),n=!1,window.removeEventListener("pointermove",v),ol.ext.element.removeListener(window,["pointerup","pointercancel"],b)},w=function(e){var o=Math.max(-1,Math.min(1,e.wheelDelta||-e.detail));return t.classList.add("ol-move"),t[u]-=30*o,t.classList.remove("ol-move"),!1};return e.mousewheel&&ol.ext.element.addListener(t,["mousewheel","DOMMouseScroll","onmousewheel"],w),{refresh:m}},ol.ext.element.dispatchEvent=function(t,e){var o;try{o=new CustomEvent(t)}catch(e){(o=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,{})}e.dispatchEvent(o)},ol.ext.getMapCanvas=function(t){if(!t)return null;var e=t.getViewport().getElementsByClassName("ol-fixedoverlay")[0];return e||(t.getViewport().querySelector(".ol-layers")?((e=document.createElement("canvas")).className="ol-fixedoverlay",t.getViewport().querySelector(".ol-layers").after(e),t.on("precompose",function(o){e.width=t.getSize()[0]*o.frameState.pixelRatio,e.height=t.getSize()[1]*o.frameState.pixelRatio})):e=t.getViewport().querySelector("canvas")),e},window.ol&&(ol.util?ol.util.VERSION||(ol.util.VERSION=ol.VERSION||"6.1.0"):ol.util={VERSION:ol.VERSION||"5.3.0"}),ol.ext.olVersion=ol.util.VERSION.split("."),ol.ext.olVersion=100*parseInt(ol.ext.olVersion[0])+parseInt(ol.ext.olVersion[1]),ol.ext.getVectorContextStyle=function(t,e){var o=t.frameState.pixelRatio;if(ol.ext.olVersion>605&&1!==o&&e.getImage()instanceof ol.style.Icon){var i=(e=e.clone()).getImage();i.setScale(i.getScale()*o);var n=i.getAnchor();if(i.setDisplacement){var r=i.getDisplacement();r&&(r[0]-=n[0]/o,r[1]+=n[1]/o,i.setAnchor([0,0]))}else n&&(n[0]/=o,n[1]/=o)}return e},window.ol&&(window.ol.ext.imageLoader={}),ol.ext.imageLoader.loadBILImage=function(t,e,o){var i=[parseInt(t.replace(/.*WIDTH=(\d*).*/i,"$1")),parseInt(t.replace(/.*HEIGHT=(\d*).*/i,"$1"))],n=new XMLHttpRequest;n.responseType="blob",n.addEventListener("loadend",function(){var t=this.response;if(void 0!==t){var n=new FileReader;n.addEventListener("loadend",t=>{var o=new Float32Array(t.target.result);e(o,i)}),n.readAsArrayBuffer(t)}else o()}),n.addEventListener("error",function(){o()}),n.open("GET",t),n.send()},ol.ext.imageLoader.loadImage=function(t,e,o){var i=new XMLHttpRequest;i.responseType="blob",i.addEventListener("loadend",function(){var t=this.response;if(void 0!==t){var i=new Image;i.onload=function(){e(i,[i.naturalWidth,i.naturalHeight])},i.src=URL.createObjectURL(t)}else o()}),i.addEventListener("error",function(){o()}),i.open("GET",t),i.send()},ol.ext.imageLoader.pixelTransform=function(t){return function(e,o){ol.ext.imageLoader.loadImage(o,function(o,i){var n=document.createElement("canvas");n.width=i[0],n.height=i[1];var r=n.getContext("2d");r.drawImage(o,0,0);for(var s=r.getImageData(0,0,i[0],i[1]),a=s.data,l=0;l>>3)})},ol.ext.imageLoader.transparent=function(t){var e,o;t instanceof Array&&(e=t[0],o=t[1]);var i=e=ol.color.asArray(e);return o?(o=ol.color.asArray(o),i=[Math.min(e[0],o[0]),Math.min(e[1],o[1]),Math.min(e[2],o[2])],o=[Math.max(e[0],o[0]),Math.max(e[1],o[1]),Math.max(e[2],o[2])],ol.ext.imageLoader.pixelTransform(function(t,n){t[n]>=e[0]&&t[n]<=o[0]&&t[n+1]>=i[1]&&t[n+1]<=o[1]&&t[n+2]>=i[2]&&t[n+2]<=o[2]&&(t[n+3]=0)})):ol.ext.imageLoader.pixelTransform(function(t,e){t[e]===i[0]&&t[e+1]===i[1]&&t[e+2]===i[2]&&(t[e+3]=0)})},ol.ext.imageLoader.seaLevelMap=function(t,e){e=e||{};var o=Math.max(t+.01,.01),i=e.color?ol.color.asArray(e.color):[135,203,249],n="number"==typeof e.minValue?e.minValue:-1/0,r=!1!==e.opacity;return ol.ext.imageLoader.elevationMap(function(t){return tn?[i[0],i[1],i[2],r?255*(o-t)/o:255]:[0,0,0,0]})},ol.ext.imageLoader.shadedRelief=function(){var t=Math.PI/4,e=2*Math.PI-Math.PI/4;return function(o,i){ol.ext.imageLoader.loadBILImage(i,function(i,n){var r=document.createElement("canvas"),s=r.getContext("2d"),a=r.width=n[0],l=r.height=n[1],c=s.getImageData(0,0,a,l),h=c.data;function p(t,e){return t+e*a}for(var u=0;u0?b>0?C=S+1.5*Math.PI:b<0?C=1.5*Math.PI-S:S=1.5*Math.PI:x<0?C=b<0?S+.5*Math.PI:b>0?.5*Math.PI-S:.5*Math.PI:b<0?C=Math.PI:b>0&&(C=0);var M=Math.cos(C-e)*Math.cos(.5*Math.PI-Math.atan(w))*Math.cos(t)+Math.sin(.5*Math.PI-Math.atan(w))*Math.sin(t);M<0&&(M=0),M=Math.sqrt(.8*M+.5);var E=4*p(u,d);h[E]=h[E+1]=h[E+2]=0,h[E+3]=255-255*M}s.putImageData(c,0,0),o.setImage(r)},function(){o.setState(3)})}},ol.ext.imageLoader.elevationMap=function(t){return"function"!=typeof t&&(t=ol.ext.getPixelFromElevation),function(e,o){ol.ext.imageLoader.loadBILImage(o,function(o,i){var n=document.createElement("canvas"),r=n.getContext("2d");n.width=i[0],n.height=i[1];for(var s=r.getImageData(0,0,i[0],i[1]),a=s.data,l=0;l>16,e%65536>>8,e%256,255]},ol.ext.getElevationFromPixel=function(t){return.01*((t[0]<<16)+(t[1]<<8)+t[2])-12e3},ol.matrix3D={},ol.matrix3D.getTransform=function(t){var e,o,i=window.getComputedStyle(t,null),n=(i.getPropertyValue("-webkit-transform")||i.getPropertyValue("-moz-transform")||i.getPropertyValue("-ms-transform")||i.getPropertyValue("-o-transform")||i.getPropertyValue("transform")).split("(")[1].split(")")[0].split(","),r=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];if(16===n.length)for(e=0;e<4;++e)for(o=0;o<4;++o)r[o][e]=+n[4*e+o];else for(e=0;e<3;++e)for(o=0;o<2;++o)r[o][e]=+n[2*e+o];return r},ol.matrix3D.getTransformOrigin=function(t){for(var e=window.getComputedStyle(t,null),o=(e.getPropertyValue("-webkit-transform-origin")||e.getPropertyValue("-moz-transform-origin")||e.getPropertyValue("-ms-transform-origin")||e.getPropertyValue("-o-transform-origin")||e.getPropertyValue("transform-origin")).split(" "),i=[0,0,0,1],n=0;ndocument.documentElement.clientHeight?this._elt.popup.style.top=Math.max(document.documentElement.clientHeight-this._elt.popup.offsetHeight-o.top,0)+"px":this._elt.popup.style.top=e.bottom+"px",e.left+this._elt.popup.offsetWidth+o.left>document.documentElement.clientWidth?this._elt.popup.style.left=Math.max(document.documentElement.clientWidth-this._elt.popup.offsetWidth-o.left,0)+"px":this._elt.popup.style.left=e.left+"px"}},ol.ext.input.PopupBase.prototype.isCollapsed=function(){return!this._elt.popup.classList.contains("ol-visible")},ol.ext.input.PopupBase.prototype.toggle=function(){this.collapse(!this.isCollapsed())},ol.ext.input.Checkbox=function(t){t=t||{},ol.ext.input.Base.call(this,t);var e=this.element=document.createElement("LABEL");t.html instanceof Element?e.appendChild(t.html):void 0!==t.html&&(e.innerHTML=t.html),e.className=("ol-ext-check ol-ext-checkbox "+(t.className||"")).trim(),this.input.parentNode&&this.input.parentNode.insertBefore(e,this.input),e.appendChild(this.input),e.appendChild(document.createElement("SPAN")),t.after&&e.appendChild(document.createTextNode(t.after)),this.input.addEventListener("change",function(){this.dispatchEvent({type:"check",checked:this.input.checked,value:this.input.value})}.bind(this))},ol.ext.inherits(ol.ext.input.Checkbox,ol.ext.input.Base),ol.ext.input.Checkbox.prototype.isChecked=function(){return this.input.checked},ol.ext.input.Collection=function(t){ol.Object.call(this),this.element=ol.ext.element.create("UL",{className:("ol-collection-list "+(t.className||"")).trim(),parent:t.target}),this.collection=t.collection,this._title="function"==typeof t.getTitle?t.getTitle:function(t){return t.title},this.refresh(),this.collection.on("change:length",function(){if(!this._reorder){this.refresh();var t=this.getSelectPosition();t<0?this.dispatchEvent({type:"item:select",position:-1,item:null}):this.dispatchEvent({type:"item:order",position:t,item:this._currentItem})}}.bind(this))},ol.ext.inherits(ol.ext.input.Collection,ol.Object),ol.ext.input.Collection.prototype.select=function(t){if(t!==this._currentItem){var e=-1;this._listElt.forEach(function(o,i){o.item!==t?o.li.classList.remove("ol-select"):(o.li.classList.add("ol-select"),e=i)}),this._currentItem=e>=0?t:null,this.dispatchEvent({type:"item:select",position:e,item:this._currentItem})}},ol.ext.input.Collection.prototype.selectAt=function(t){this.select(this.collection.item(t))},ol.ext.input.Collection.prototype.getSelect=function(){return this._currentItem},ol.ext.input.Collection.prototype.getSelectPosition=function(){return this.collection.getArray().indexOf(this._currentItem)},ol.ext.input.Collection.prototype.refresh=function(){this.element.innerHTML="",this._listElt=[],this.collection.forEach((t,e)=>{var o=ol.ext.element.create("LI",{html:this._title(t),className:this._currentItem===t?"ol-select":"","data-position":e,on:{click:function(){this.select(t)}.bind(this),dblclick:function(){this.dispatchEvent({type:"item:dblclick",position:e,item:t})}.bind(this)},parent:this.element});this._listElt.push({li:o,item:t});var i=ol.ext.element.create("DIV",{className:"ol-noscroll ol-order",parent:o}),n=e,r=function(t){for(var e="touch"===t.pointerType?document.elementFromPoint(t.clientX,t.clientY):t.target;e&&e.parentNode!==this.element;)e=e.parentNode;if(e&&e!==o){var i=parseInt(e.getAttribute("data-position"));e.getAttribute("data-position")e?n-1:n,t),this._reorder=!1,this.dispatchEvent({type:"item:order",position:n>e?n-1:n,oldPosition:e,item:t}),this.refresh())}.bind(this);i.addEventListener("pointerdown",function(){this.select(t),document.addEventListener("pointermove",r),document.addEventListener("pointerup",s),document.addEventListener("pointercancel",s)}.bind(this))})},ol.ext.input.Color=function(t){(t=t||{}).hidden=!1!==t.hidden,t.className=("ol-ext-colorpicker "+(t.hastab?"ol-tab ":"")+(t.className||"")).trim(),ol.ext.input.PopupBase.call(this,t),!1===t.opacity&&this.element.classList.add("ol-nopacity"),this._cursor={};var e=this._hsv={};this._elt.vignet=ol.ext.element.create("DIV",{className:"ol-vignet",parent:this.element});var o=ol.ext.element.create("DIV",{className:"ol-tabbar",parent:this._elt.popup});ol.ext.element.create("DIV",{className:"ol-tab",html:t.paletteLabel||"palette",click:function(){this.element.classList.remove("ol-picker-tab")}.bind(this),parent:o}),ol.ext.element.create("DIV",{className:"ol-tab",html:t.pickerLabel||"picker",click:function(){this.element.classList.add("ol-picker-tab")}.bind(this),parent:o});var i=ol.ext.element.create("DIV",{className:"ol-container",parent:this._elt.popup}),n=this._elt.picker=ol.ext.element.create("DIV",{className:"ol-picker",parent:i}),r=this._cursor.picker=ol.ext.element.create("DIV",{className:"ol-cursor",parent:n});this._listenDrag(n,function(t){var o=Math.max(0,Math.min(t.offsetX/n.clientWidth,1)),i=Math.max(0,Math.min(t.offsetY/n.clientHeight,1));r.style.left=Math.round(100*o)+"%",r.style.top=Math.round(100*i)+"%",e.s=100*o,e.v=100-100*i,this.setColor()}.bind(this));var s=ol.ext.element.create("DIV",{className:"ol-slider",parent:i});this._elt.slider=ol.ext.element.create("DIV",{parent:s});var a=this._cursor.slide=ol.ext.element.create("DIV",{className:"ol-cursor",parent:s});this._listenDrag(s,function(t){var o=Math.max(0,Math.min(t.offsetX/s.clientWidth,1));e.a=100*o,a.style.left=Math.round(100*o)+"%",this.setColor()}.bind(this));var l=ol.ext.element.create("DIV",{className:"ol-tint",parent:i}),c=this._cursor.tint=ol.ext.element.create("DIV",{className:"ol-cursor",parent:l});this._listenDrag(l,function(t){var o=Math.max(0,Math.min(t.offsetY/l.clientHeight,1));e.h=360*o,c.style.top=Math.round(100*o)+"%",this.setColor()}.bind(this)),ol.ext.element.create("DIV",{className:"ol-clear",click:function(){this.setColor([0,0,0,0])}.bind(this),parent:i});var h,p=ol.ext.element.create("DIV",{className:"ol-rgb",parent:i}),u=function(){var t=Math.max(0,Math.min(255,parseInt(this._elt.r.value))),e=Math.max(0,Math.min(255,parseInt(this._elt.g.value))),o=Math.max(0,Math.min(255,parseInt(this._elt.b.value))),i=Math.max(0,Math.min(1,parseFloat(this._elt.a.value)));this.setColor([t,e,o,i])}.bind(this);for(this._elt.r=ol.ext.element.create("INPUT",{type:"number",lang:"en-GB",change:u,min:0,max:255,parent:p}),this._elt.g=ol.ext.element.create("INPUT",{type:"number",lang:"en-GB",change:u,min:0,max:255,parent:p}),this._elt.b=ol.ext.element.create("INPUT",{type:"number",lang:"en-GB",change:u,min:0,max:255,parent:p}),this._elt.a=ol.ext.element.create("INPUT",{type:"number",lang:"en-GB",change:u,min:0,max:1,step:.1,parent:p}),this._elt.txtColor=ol.ext.element.create("INPUT",{type:"text",className:"ol-txt-color",change:function(){var t;this._elt.txtColor.classList.remove("ol-error");try{t=ol.color.asArray(this._elt.txtColor.value)}catch(t){this._elt.txtColor.classList.add("ol-error")}t&&this.setColor(t)}.bind(this),parent:i}),ol.ext.element.create("BUTTON",{html:"OK",click:function(){this._addCustomColor(this.getColor()),this.collapse(!0)}.bind(this),parent:i}),this._paletteColor={},this._elt.palette=ol.ext.element.create("DIV",{className:"ol-palette",parent:this._elt.popup}),h=0;h<8;h++){var d=Math.round(255-255*h/7);this.addPaletteColor([d,d,d],d)}var g=["#f00","#f90","#ff0","#0f0","#0ff","#48e","#00f","#f0f"];for(g.forEach(function(t){this.addPaletteColor(t,ol.color.toHexa(ol.color.asArray(t)))}.bind(this)),h=0;h<5;h++)g.forEach(function(t){t=[(t=ol.color.toHSV(ol.color.asArray(t)))[0],h/4*80+20,100-h/4*60],t=ol.color.fromHSV(t,1),this.addPaletteColor(t,ol.color.toHexa(t))}.bind(this));(ol.ext.element.create("HR",{parent:this._elt.palette}),ol.ext.input.Color.customColorList)||(ol.ext.input.Color.customColorList=new ol.Collection,JSON.parse(localStorage.getItem("ol-ext@colorpicker")||"[]").forEach(function(t){ol.ext.input.Color.customColorList.push(t)}),ol.ext.input.Color.customColorList.on(["add","remove"],function(){localStorage.setItem("ol-ext@colorpicker",JSON.stringify(ol.ext.input.Color.customColorList.getArray()))}));ol.ext.input.Color.customColorList.on("add",function(t){this.addPaletteColor(this.getColorFromID(t.element))}.bind(this)),ol.ext.input.Color.customColorList.on("remove",function(t){this._paletteColor[t.element]&&this._paletteColor[t.element].element.remove(),delete this._paletteColor[t.element]}.bind(this)),ol.ext.input.Color.customColorList.forEach(function(t){this._addCustomColor(this.getColorFromID(t))}.bind(this)),this.setColor(t.color||[0,0,0,0]),this._currentColor=this.getColorID(this.getColor()),this.on("color",function(){this._addCustomColor(this.getColor()),this._currentColor=this.getColorID(this.getColor()),this.setColor()}.bind(this)),this.on("collapse",function(t){if(t.visible)this._currentColor=this.getColorID(this.getColor());else{var e=this.getColor();this._currentColor!==this.getColorID(e)&&this.dispatchEvent({type:"color",color:e})}}.bind(this))},ol.ext.inherits(ol.ext.input.Color,ol.ext.input.PopupBase),ol.ext.input.Color.customColorList=null,ol.ext.input.Color.prototype.addPaletteColor=function(t,e,o){try{t=ol.color.asArray(t)}catch(t){return}var i=this.getColorID(t);!this._paletteColor[i]&&t[3]&&(this._paletteColor[i]={color:t,element:ol.ext.element.create("DIV",{title:e||"",className:t[3]<1?"ol-alpha":"",style:{color:"rgb("+t.join(",")+")"},click:function(){this.setColor(t),this.get("autoClose")&&this.collapse(!0)}.bind(this),parent:this._elt.palette})}),o&&this._selectPalette(t)},ol.ext.input.Color.prototype.showTab=function(t){"palette"===t?this.element.classList.remove("ol-picker-tab"):this.element.classList.add("ol-picker-tab")},ol.ext.input.Color.prototype.getTab=function(){return this.element.classList.contains("ol-picker-tab")?"picker":"palette"},ol.ext.input.Color.prototype._selectPalette=function(t){var e=this.getColorID(t);Object.keys(this._paletteColor).forEach(function(t){this._paletteColor[t].element.classList.remove("ol-select")}.bind(this)),this._paletteColor[e]&&this._paletteColor[e].element.classList.add("ol-select")},ol.ext.input.Color.prototype.setColor=function(t){var e=this._hsv;if(t){t=ol.color.asArray(t);var o=ol.color.toHSV(t);e.h=o[0],e.s=o[1],e.v=o[2],o.length>3?e.a=100*o[3]:e.a=100,this._cursor.picker.style.left=e.s+"%",this._cursor.picker.style.top=100-e.v+"%",this._cursor.tint.style.top=e.h/360*100+"%",this._cursor.slide.style.left=e.a+"%",this.isCollapsed()&&this.dispatchEvent({type:"color",color:t})}else e.a=Math.round(e.a),t=this.getColor();var i="rgba("+t.join(", ")+")";this._elt.picker.style.color="hsl("+e.h+", 100%, 50%)",this._elt.slider.style.backgroundImage="linear-gradient(45deg, transparent, rgba("+this.getColor(!1).join(",")+"))",this._elt.vignet.style.color=i,this._elt.r.value=t[0],this._elt.g.value=t[1],this._elt.b.value=t[2],this._elt.a.value=t[3],this._elt.txtColor.classList.remove("ol-error"),1===t[3]?this._elt.txtColor.value=ol.color.toHexa(t):this._elt.txtColor.value=i,this._selectPalette(t),this.input.value!==i&&(this.input.value=i,this.input.dispatchEvent(new Event("change")))},ol.ext.input.Color.prototype.getColor=function(t){return ol.color.fromHSV([this._hsv.h,this._hsv.s,this._hsv.v,!1!==t?this._hsv.a/100:1],1)},ol.ext.input.Color.prototype._addCustomColor=function(t){var e=this.getColorID(t);this._paletteColor[e]||t[3]&&(ol.ext.input.Color.customColorList.getArray().indexOf(e)<0&&(ol.ext.input.Color.customColorList.push(e),ol.ext.input.Color.customColorList.getLength()>24&&ol.ext.input.Color.customColorList.removeAt(0)),this.addPaletteColor(t))},ol.ext.input.Color.prototype.clearCustomColor=function(){ol.ext.input.Color.customColorList.clear()},ol.ext.input.Color.prototype.getColorID=function(t){return void 0===(t=ol.color.asArray(t))[3]&&(t[3]=1),t.join("-")},ol.ext.input.Color.prototype.getColorFromID=function(t){var e=t.split("-");return[parseFloat(e[0]),parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3])]},ol.ext.input.List=function(t){switch(t=t||{},ol.ext.input.Base.call(this,t),this._content=ol.ext.element.create("DIV"),(t.hidden||t.disabled)&&(t.hover=!0),this.element=ol.ext.element.create("DIV",{html:this._content,className:"ol-input-popup"+(t.hover?" ol-hover":"")}),this.set("hideOnClick",!1!==t.hideOnClick),t.className&&this.element.classList.add(t.className),t.fixed&&(this.element.classList.add("ol-fixed"),this.set("hideOnClick",!1)),t.align){case"middle":this.set("hideOnClick",!1);case"rigth":this.element.classList.add("ol-"+t.align)}var e=this.input;e.parentNode&&e.parentNode.insertBefore(this.element,e),this.element.appendChild(e);var o=this.popup=ol.ext.element.create("UL",{className:"ol-popup",parent:this.element}),i=[];t.options.forEach(t=>{i.push({value:t.value,element:ol.ext.element.create("LI",{html:t.html,title:t.title||t.value,className:"ol-option",on:{pointerdown:function(){this.setValue(t.value),this.get("hideOnClick")&&(o.style.display="none",setTimeout(function(){o.style.display=""},200))}.bind(this)},parent:this.popup})})}),this.input.addEventListener("change",function(){var t,e=this.input.value;i.forEach(function(o){o.value==e?(o.element.classList.add("ol-selected"),t=o.element):o.element.classList.remove("ol-selected")}),this.dispatchEvent({type:"change:value",value:this.getValue()}),this._content.innerHTML=t?t.innerHTML:""}.bind(this));var n=new Event("change");setTimeout(function(){this.input.dispatchEvent(n)}.bind(this))},ol.ext.inherits(ol.ext.input.List,ol.ext.input.Base),ol.ext.input.Radio=function(t){t=t||{},ol.ext.input.Checkbox.call(this,t),this.element.className=("ol-ext-check ol-ext-radio "+(t.className||"")).trim()},ol.ext.inherits(ol.ext.input.Radio,ol.ext.input.Checkbox),ol.ext.input.Size=function(t){(t=t||{}).options=[],(t.size||[0,2,3,5,8,13,21,34,55]).forEach(function(e){t.options.push({value:e,html:ol.ext.element.create("DIV",{className:"ol-option-"+e,style:{fontSize:e?e+"px":void 0}})})}),ol.ext.input.List.call(this,t),this._content.remove(),this.element.classList.add("ol-size")},ol.ext.inherits(ol.ext.input.Size,ol.ext.input.List),ol.ext.input.Size.prototype.getValue=function(){return parseFloat(ol.ext.input.List.prototype.getValue.call(this))},ol.ext.input.Switch=function(t){t=t||{},ol.ext.input.Checkbox.call(this,t),this.element.className=("ol-ext-toggle-switch "+(t.className||"")).trim()},ol.ext.inherits(ol.ext.input.Switch,ol.ext.input.Checkbox),ol.ext.input.Width=function(t){(t=t||{}).options=[],(t.size||[0,1,2,3,5,10,15,20]).forEach(function(e){t.options.push({value:e,html:ol.ext.element.create("DIV",{className:"ol-option-"+e,style:{height:e||void 0}})})}),ol.ext.input.List.call(this,t),this._content.remove(),this.element.classList.add("ol-width")},ol.ext.inherits(ol.ext.input.Width,ol.ext.input.List),ol.ext.input.Width.prototype.getValue=function(){return parseFloat(ol.ext.input.List.prototype.getValue.call(this))},window.ol&&!ol.legend&&(ol.legend={}),ol.legend.Legend=function(t){t=t||{},ol.Object.call(this),this._items=new ol.Collection;var e,o=[];this._items.on("add",function(t){o.push({item:t.element,on:t.element.on("change",function(){this.refresh()}.bind(this))}),e&&(clearTimeout(e),e=null),e=setTimeout(function(){this.refresh()}.bind(this),0)}.bind(this)),this._items.on("remove",function(t){for(var i=0;i=":"≥",">":">",contain:"⊂","!contain":"⊄",regexp:"≃","!regexp":"≄"},ol.control.SelectBase.prototype._escape=function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},ol.control.SelectBase.prototype._checkCondition=function(t,e,o){if(!e.attr)return!0;var i=t.get(e.attr),n=Number(i)==i&&Number(e.val)==e.val;switch(n&&(i=Number(i)),e.op){case"=":return n?i==e.val:new RegExp("^"+this._escape(e.val)+"$",o?"":"i").test(i);case"!=":return n?i!=e.val:!new RegExp("^"+this._escape(e.val)+"$",o?"":"i").test(i);case"<":return i":return i>e.val;case">=":return i>=e.val;case"contain":return new RegExp(this._escape(e.val),o?"":"i").test(i);case"!contain":return!new RegExp(this._escape(e.val),o?"":"i").test(i);case"regexp":return new RegExp(e.val,o?"":"i").test(i);case"!regexp":return!new RegExp(e.val,o?"":"i").test(i);default:return!1}},ol.control.SelectBase.prototype._selectFeatures=function(t,e,o,i,n){var r;o=o||[];for(var s=e.length-1;r=e[s];s--){for(var a,l=i,c=0;a=o[c];c++)a.attr&&(l=i?l&&this._checkCondition(r,a,n):l||this._checkCondition(r,a,n));l?t.push(r):this._features&&this._features.removeAt(s)}return t},ol.control.SelectBase.prototype.getSources=function(){if(this.get("source"))return this.get("source");var t=[];return this.getMap()&&function e(o){o.forEach(function(o){o.getLayers?e(o.getLayers()):o.getSource&&o.getSource()instanceof ol.source.Vector&&t.push(o.getSource())})}(this.getMap().getLayers()),t},ol.control.SelectBase.prototype.doSelect=function(t){var e=[];if((t=t||{}).features)this._selectFeatures(e,t.features,t.conditions,t.matchAll,t.useCase);else if(this._features)this._selectFeatures(e,this._features.getArray(),t.conditions,t.matchAll,t.useCase);else{(t.sources||this.getSources()).forEach(function(o){this._selectFeatures(e,o.getFeatures(),t.conditions,t.matchAll,t.useCase)}.bind(this))}return this.dispatchEvent({type:"select",features:e}),e},ol.control.Button=function(t){t=t||{};var e=document.createElement("div");e.className=(t.className||"")+" ol-button ol-unselectable ol-control";var o=this,i=this.button_=document.createElement(/ol-text-button/.test(t.className)?"div":"button");i.type="button",t.title&&(i.title=t.title),t.name&&(i.name=t.name),t.html instanceof Element?i.appendChild(t.html):i.innerHTML=t.html||"";i.addEventListener("click",function(e){e&&e.preventDefault&&(e.preventDefault(),e.stopPropagation()),t.handleClick&&t.handleClick.call(o,e)}),e.appendChild(i),!t.title&&i.firstElementChild&&(i.title=i.firstElementChild.title),ol.control.Control.call(this,{element:e,target:t.target}),t.title&&this.set("title",t.title),t.title&&this.set("title",t.title),t.name&&this.set("name",t.name)},ol.ext.inherits(ol.control.Button,ol.control.Control),ol.control.Button.prototype.setVisible=function(t){t?ol.ext.element.show(this.element):ol.ext.element.hide(this.element)},ol.control.Button.prototype.setTitle=function(t){this.button_.setAttribute("title",t)},ol.control.Button.prototype.setHtml=function(t){ol.ext.element.setHTML(this.button_,t)},ol.control.Button.prototype.getButtonElement=function(){return this.button_},ol.control.Toggle=function(t){t=t||{};var e=this;this.interaction_=t.interaction,this.interaction_&&(this.interaction_.setActive(t.active),this.interaction_.on("change:active",function(){e.setActive(e.interaction_.getActive())})),t.toggleFn&&(t.onToggle=t.toggleFn),t.handleClick=function(){e.toggle(),t.onToggle&&t.onToggle.call(e,e.getActive())},t.className=(t.className||"")+" ol-toggle",ol.control.Button.call(this,t),this.set("title",t.title),this.set("autoActivate",t.autoActivate),t.bar&&this.setSubBar(t.bar),this.setActive(t.active),this.setDisable(t.disable)},ol.ext.inherits(ol.control.Toggle,ol.control.Button),ol.control.Toggle.prototype.setMap=function(t){!t&&this.getMap()&&(this.interaction_&&this.getMap().removeInteraction(this.interaction_),this.subbar_&&this.getMap().removeControl(this.subbar_)),ol.control.Button.prototype.setMap.call(this,t),t&&(this.interaction_&&t.addInteraction(this.interaction_),this.subbar_&&t.addControl(this.subbar_))},ol.control.Toggle.prototype.getSubBar=function(){return this.subbar_},ol.control.Toggle.prototype.setSubBar=function(t){var e=this.getMap();e&&this.subbar_&&e.removeControl(this.subbar_),this.subbar_=t,t&&(this.subbar_.setTarget(this.element),this.subbar_.element.classList.add("ol-option-bar"),e&&e.addControl(this.subbar_))},ol.control.Toggle.prototype.getDisable=function(){var t=this.element.querySelector("button");return t&&t.disabled},ol.control.Toggle.prototype.setDisable=function(t){this.getDisable()!=t&&(this.element.querySelector("button").disabled=t,t&&this.getActive()&&this.setActive(!1),this.dispatchEvent({type:"change:disable",key:"disable",oldValue:!t,disable:t}))},ol.control.Toggle.prototype.getActive=function(){return this.element.classList.contains("ol-active")},ol.control.Toggle.prototype.toggle=function(){this.getActive()?this.setActive(!1):this.setActive(!0)},ol.control.Toggle.prototype.setActive=function(t){this.interaction_&&this.interaction_.setActive(t),this.subbar_&&this.subbar_.setActive(t),this.getActive()!==t&&(t?this.element.classList.add("ol-active"):this.element.classList.remove("ol-active"),this.dispatchEvent({type:"change:active",key:"active",oldValue:!t,active:t}))},ol.control.Toggle.prototype.setInteraction=function(t){this.interaction_=t},ol.control.Toggle.prototype.getInteraction=function(){return this.interaction_},ol.control.Search=function(t){var e=this;t||(t={}),null==t.typing&&(t.typing=300),this._classname=t.className||"search";var o=(t.className||"")+" ol-search"+(t.target?"":" ol-unselectable ol-control"),i=ol.ext.element.create("DIV",{className:o});if(!1!==t.collapsed&&i.classList.add("ol-collapsed"),t.target||(this.button=document.createElement("BUTTON"),this.button.setAttribute("type","button"),this.button.setAttribute("title",t.title||t.label||"Search"),this.button.addEventListener("click",function(){if(i.classList.toggle("ol-collapsed"),!i.classList.contains("ol-collapsed")){i.querySelector("input.search").focus();for(var t=i.querySelectorAll("li"),o=0;o=0)if(s=l){r&&clearTimeout(r);var c=e.get("minLength");r=setTimeout(function(){if(s.length>=c){var t=e.autocomplete(s,function(t){e.drawList_(t)});t&&e.drawList_(t)}else e.drawList_()},t.typing)}else e.drawList_();else(n=i.querySelector("ul.autocomplete li"))&&n.classList.remove("select");else i.classList.contains("ol-control")&&a.blur(),n.classList.remove("select"),s=l,e._handleSelect(e._list[n.getAttribute("data-search")]);else setTimeout(function(){e.drawList_()},200)};if(a.addEventListener("keyup",l),a.addEventListener("search",l),a.addEventListener("cut",l),a.addEventListener("paste",l),a.addEventListener("input",l),t.noCollapse||(a.addEventListener("blur",function(){setTimeout(function(){a!==document.activeElement&&(i.classList.add("ol-collapsed"),this.set("reverse",!1),i.classList.remove("ol-revers"))}.bind(this),200)}.bind(this)),a.addEventListener("focus",function(){this.get("reverse")||(i.classList.remove("ol-collapsed"),i.classList.remove("ol-revers"))}.bind(this))),i.appendChild(a),t.reverse){var c=ol.ext.element.create("BUTTON",{type:"button",class:"ol-revers",title:t.reverseTitle||"click on the map",click:function(){this.get("reverse")?this.set("reverse",!1):(this.set("reverse",!this.get("reverse")),a.focus(),i.classList.add("ol-revers"))}.bind(this)});i.appendChild(c)}var h=document.createElement("UL");h.classList.add("autocomplete"),i.appendChild(h),ol.control.Control.call(this,{element:i,target:t.target}),"function"==typeof t.getTitle&&(this.getTitle=t.getTitle),"function"==typeof t.autocomplete&&(this.autocomplete=t.autocomplete),this.set("copy",t.copy),this.set("minLength",t.minLength||1),this.set("maxItems",t.maxItems||10),this.set("maxHistory",t.maxHistory||t.maxItems||10),t.onselect&&this.on("select",t.onselect),t.centerOnSelect&&this.on("select",function(t){var e=this.getMap();e&&e.getView().setCenter(t.coordinate)}.bind(this)),t.zoomOnSelect&&this.on("select",function(e){var o=this.getMap();o&&(o.getView().setCenter(e.coordinate),o.getView().getZoom()=0;i--)n[i]&&JSON.stringify(n[i])!==r||n.splice(i,1)}catch(e){for(i=n.length-1;i>=0;i--)n[i]===t&&n.splice(i,1)}n.unshift(t);for(var s=Math.max(0,this.get("maxHistory")||10)||0;n.length>s;)n.pop();this.saveHistory(),this.select(t,e,null,o),e&&(this.setInput(this._getTitleTxt(t)),this.drawList_(),setTimeout(function(){this.collapse(!1)}.bind(this),300))}},ol.control.Search.prototype._history={},ol.control.Search.prototype.saveHistory=function(){try{this.get("maxHistory")>=0?localStorage["ol@search-"+this._classname]=JSON.stringify(this.get("history")):localStorage.removeItem("ol@search-"+this._classname)}catch(t){console.warn("Failed to access localStorage...")}},ol.control.Search.prototype.restoreHistory=function(){if(this._history[this._classname])this.set("history",this._history[this._classname]);else try{this._history[this._classname]=JSON.parse(localStorage["ol@search-"+this._classname]),this.set("history",this._history[this._classname])}catch(t){this.set("history",[])}},ol.control.Search.prototype.clearHistory=function(){this.set("history",[]),this.saveHistory(),this.drawList_()},ol.control.Search.prototype.getHistory=function(){return this.get("history")},ol.control.Search.prototype.autocomplete=function(t,e){return e([]),!1},ol.control.Search.prototype.drawList_=function(t){var e=this,o=this.element.querySelector("ul.autocomplete");if(o.innerHTML="",this._list=[],t)o.setAttribute("class","autocomplete");else{if(this.element.querySelector("input.search").value)return;t=this.get("history"),o.setAttribute("class","autocomplete history")}for(var i,n=Math.min(e.get("maxItems"),t.length),r=0;r=200&&t.status<400?"function"==typeof this._callback&&this._callback(t.response):("function"==typeof this._callback&&this._callback(!1,"error"),console.log("AJAX ERROR",arguments))}.bind(this)),this._ajax.on("error",function(){"function"==typeof this._callback&&this._callback(!1,"error"),console.log("AJAX ERROR",arguments)}.bind(this)),this._ajax.on("loadstart",function(){this.element.classList.add("searching")}.bind(this)),this._ajax.on("loadend",function(){this.element.classList.remove("searching")}.bind(this)),"function"==typeof t.handleResponse&&(this.handleResponse=t.handleResponse)},ol.ext.inherits(ol.control.SearchJSON,ol.control.Search),ol.control.SearchJSON.prototype.ajax=function(t,e,o,i){i=i||{},this._callback=o,this._ajax.set("dataType",i.dataType||"JSON"),this._ajax.send(t,e,i)},ol.control.SearchJSON.prototype.autocomplete=function(t,e){var o=this.requestData(t),i=encodeURI(this.get("url"));this.ajax(i,o,function(t){"function"==typeof e&&e(this.handleResponse(t))})},ol.control.SearchJSON.prototype.requestData=function(t){return{q:t}},ol.control.SearchJSON.prototype.handleResponse=function(t){return t},ol.control.SearchPhoton=function(t){(t=t||{}).className=t.className||"photon",t.url=t.url||"https://photon.komoot.io/api/",t.copy=t.copy||'© OpenStreetMap contributors',ol.control.SearchJSON.call(this,t),this.set("lang",t.lang),this.set("position",t.position)},ol.ext.inherits(ol.control.SearchPhoton,ol.control.SearchJSON),ol.control.SearchPhoton.prototype.getTitle=function(t){var e=t.properties;return(e.housenumber||"")+" "+(e.street||e.name||"")+" "+(e.postcode||"")+" "+(e.city||"")+" ("+e.country+")"},ol.control.SearchPhoton.prototype.requestData=function(t){var e={q:t,lang:this.get("lang"),limit:this.get("maxItems")};if(this.get("position")){var o=this.getMap().getView(),i=new ol.geom.Point(o.getCenter());i=i.transform(o.getProjection(),"EPSG:4326").getCoordinates(),e.lon=i[0],e.lat=i[1]}return e},ol.control.SearchPhoton.prototype.handleResponse=function(t){return t.features},ol.control.SearchPhoton.prototype.equalFeatures=function(t,e){return this.getTitle(t)===this.getTitle(e)&&t.geometry.coordinates[0]===e.geometry.coordinates[0]&&t.geometry.coordinates[1]===e.geometry.coordinates[1]},ol.control.SearchPhoton.prototype.select=function(t){var e=t.geometry.coordinates;try{e=ol.proj.transform(t.geometry.coordinates,"EPSG:4326",this.getMap().getView().getProjection())}catch(t){}this.dispatchEvent({type:"select",search:t,coordinate:e})},ol.control.SearchPhoton.prototype.reverseData=function(t){var e=ol.proj.transform(t,this.getMap().getView().getProjection(),"EPSG:4326");return{lon:e[0],lat:e[1]}},ol.control.SearchPhoton.prototype.reverseGeocode=function(t,e){this.ajax(this.get("url").replace("/api/","/reverse/").replace("/search/","/reverse/"),this.reverseData(t),function(t){t.features&&(t=t.features),t instanceof Array||(t=[t]),e?e.call(this,t):this._handleSelect(t[0],!0)}.bind(this))},ol.control.SearchGeoportail=function(t){(t=t||{}).className=t.className||"IGNF",t.typing=t.typing||500,t.url="https://wxs.ign.fr/"+(t.apiKey||"essentiels")+"/ols/apis/completion",t.copy='© IGN-Géoportail',ol.control.SearchJSON.call(this,t),this.set("type",t.type||"StreetAddress,PositionOfInterest"),this.set("timeout",t.timeout||2e3)},ol.ext.inherits(ol.control.SearchGeoportail,ol.control.SearchJSON),ol.control.SearchGeoportail.prototype.reverseGeocode=function(t,e){var o=ol.proj.transform(t,this.getMap().getView().getProjection(),"EPSG:4326");this._handleSelect({x:o[0],y:o[1],fulltext:o[0].toFixed(6)+","+o[1].toFixed(6)},!0,e);var i="Commune"===this.get("type")?"PositionOfInterest":this.get("type")||"StreetAddress";/,/.test(i)&&(i="StreetAddress");var n=' '+i+" "+o[1]+" "+o[0]+" ";this.ajax(this.get("url").replace("ols/apis/completion","geoportail/ols"),{xls:n},function(t){var i={};if(t){var n=(t=t.replace(/\n|\r/g,"")).replace(/.*(.*)<\/gml:pos>.*/,"$1").split(" ");if(Number(n[1])||Number(n[0]))if(i.x=o[0],i.y=o[1],i.city=t.replace(/.*([^<]*)<\/Place>.*/,"$1"),i.insee=t.replace(/.*([^<]*)<\/Place>.*/,"$1"),i.zipcode=t.replace(/.*([^<]*)<\/PostalCode>.*/,"$1"),//.test(t)){i.kind="",i.country="StreetAddress",i.street=t.replace(/.*([^<]*)<\/Street>.*/,"$1");var r=t.replace(/.*([^<]*)<\/Place>.*/,"$1"),i.country="PositionOfInterest",i.street="",i.fulltext=i.zipcode+" "+i.city;else i={x:o[0],y:o[1],fulltext:o[0].toFixed(6)+","+o[1].toFixed(6)}}else i={x:o[0],y:o[1],fulltext:o[0].toFixed(6)+","+o[1].toFixed(6)};"function"==typeof e?e.call(this,[i]):(this.getHistory().shift(),this._handleSelect(i,!0,e))}.bind(this),{timeout:this.get("timeout"),dataType:"XML"})},ol.control.SearchGeoportail.prototype.getTitle=function(t){return t.fulltext},ol.control.SearchGeoportail.prototype.requestData=function(t){return{text:t,type:"Commune"===this.get("type")?"PositionOfInterest":this.get("type")||"StreetAddress,PositionOfInterest",maximumResponses:this.get("maxItems")}},ol.control.SearchGeoportail.prototype.handleResponse=function(t){var e=t.results;if("Commune"===this.get("type"))for(var o=e.length-1;o>=0;o--)e[o].kind&&(e[o].classification>5||"Département"==e[o].kind)&&e.splice(o,1);return e},ol.control.SearchGeoportail.prototype.select=function(t,e,o,i){if(t.x||t.y){var n=[Number(t.x),Number(t.y)];try{n=ol.proj.transform(n,"EPSG:4326",this.getMap().getView().getProjection())}catch(t){}"Commune"===this.get("type")?this.searchCommune(t,function(){ol.control.Search.prototype.select.call(this,t,e,n,i)}):ol.control.Search.prototype.select.call(this,t,e,n,i)}else this.searchCommune(t)},ol.control.SearchGeoportail.prototype.searchCommune=function(t,e){var o='
'+t.zipcode+" "+t.city+"+
";this.ajax(this.get("url").replace("ols/apis/completion","geoportail/ols"),{xls:o},function(o){if(o){var i=(new DOMParser).parseFromString(o,"text/xml").getElementsByTagName("GeocodedAddress")[0],n=i.getElementsByTagName("gml:Point")[0].textContent.trim().split(" ");t.x=Number(n[1]),t.y=Number(n[0]);for(var r=i.getElementsByTagName("Place"),s=0;se-i){ol.ext.element.setStyle(this.element,{height:"100%"});var r=this.panel_.querySelectorAll("li.visible .li-content")[0],s=r?2*ol.ext.element.getStyle(r,"height"):0;switch(t){case 1:n+=s;break;case-1:n-=s;break;case"+50%":n+=Math.round(e/2);break;case"-50%":n-=Math.round(e/2)}return n+o<=e-3*i/2?(n=e-3*i/2-o,ol.ext.element.hide(this.botv)):ol.ext.element.show(this.botv),n>=0?(n=0,ol.ext.element.hide(this.topv)):ol.ext.element.show(this.topv),ol.ext.element.setStyle(this.panel_,{top:n+"px"}),!0}return ol.ext.element.setStyle(this.element,{height:"auto"}),ol.ext.element.setStyle(this.panel_,{top:0}),ol.ext.element.hide(this.botv),ol.ext.element.hide(this.topv),!1}return!1},ol.control.LayerSwitcher.prototype._setLayerForLI=function(t,e){var o=[];e.getLayers&&o.push(e.getLayers().on("change:length",this.drawPanel.bind(this))),t&&(o.push(e.on("change:opacity",function(){this.setLayerOpacity(e,t)}.bind(this))),o.push(e.on("change:visible",function(){this.setLayerVisibility(e,t)}.bind(this)))),o.push(e.on("propertychange",function(t){"displayInLayerSwitcher"!==t.key&&"openInLayerSwitcher"!==t.key||this.drawPanel(t)}.bind(this))),this._layers.push({li:t,layer:e,listeners:o})},ol.control.LayerSwitcher.prototype.setLayerOpacity=function(t,e){var o=e.querySelector(".layerswitcher-opacity-cursor");o&&(o.style.left=100*t.getOpacity()+"%"),this.dispatchEvent({type:"layer:opacity",layer:t})},ol.control.LayerSwitcher.prototype.setLayerVisibility=function(t,e){var o=e.querySelector(".ol-visibility");o&&(o.checked=t.getVisible()),t.getVisible()?e.classList.add("ol-visible"):e.classList.remove("ol-visible"),this.dispatchEvent({type:"layer:visible",layer:t})},ol.control.LayerSwitcher.prototype._clearLayerForLI=function(){this._layers.forEach(function(t){t.listeners.forEach(function(t){ol.Observable.unByKey(t)})}),this._layers=[]},ol.control.LayerSwitcher.prototype._getLayerForLI=function(t){for(var e,o=0;e=this._layers[o];o++)if(e.li===t)return e.layer;return null},ol.control.LayerSwitcher.prototype.viewChange=function(){this.panel_.querySelectorAll("li").forEach(function(t){var e=this._getLayerForLI(t);e&&(this.testLayerVisibility(e)?t.classList.remove("ol-layer-hidden"):t.classList.add("ol-layer-hidden"))}.bind(this))},ol.control.LayerSwitcher.prototype.getPanel=function(){return this.panelContainer_},ol.control.LayerSwitcher.prototype.drawPanel=function(){if(this.getMap()){var t=this;this.dcount++,setTimeout(function(){t.drawPanel_()},this.get("drawDelay")||0)}},ol.control.LayerSwitcher.prototype.drawPanel_=function(){if(!--this.dcount&&!this.dragging_){var t=this.panelContainer_.scrollTop;this._clearLayerForLI(),this.panel_.querySelectorAll("li").forEach(function(t){t.classList.contains("ol-header")||t.remove()}.bind(this)),this._layerGroup?this.drawList(this.panel_,this._layerGroup.getLayers()):this.getMap()&&this.drawList(this.panel_,this.getMap().getLayers()),this.panelContainer_.scrollTop=t}},ol.control.LayerSwitcher.prototype.switchLayerVisibility=function(t,e){t.get("baseLayer")?(t.getVisible()||t.setVisible(!0),e.forEach(function(e){t!==e&&e.get("baseLayer")&&e.getVisible()&&e.setVisible(!1)})):t.setVisible(!t.getVisible())},ol.control.LayerSwitcher.prototype.testLayerVisibility=function(t){if(!this.getMap())return!0;var e=this.getMap().getView().getResolution(),o=this.getMap().getView().getZoom();if(t.getMaxResolution()<=e||t.getMinResolution()>=e)return!1;if(t.getMinZoom&&(t.getMinZoom()>=o||t.getMaxZoom()2&&(l=!1,a.classList.add("drag"),n=s._getLayerForLI(a),o=!1,r=s._getLayerForLI(a.parentNode.parentNode),i=ol.ext.element.create("LI",{className:"ol-dragover",html:a.innerHTML,style:{position:"absolute","z-index":1e4,left:a.offsetLeft,opacity:.5,width:ol.ext.element.outerWidth(a),height:ol.ext.element.getStyle(a,"height")},parent:c}),s.element.classList.add("drag"),s.dispatchEvent({type:"reorder-start",layer:n,group:r})),!l){var p;for(t.preventDefault(),t.stopPropagation(),ol.ext.element.setStyle(i,{top:e-ol.ext.element.offsetRect(c).top+c.scrollTop+5}),(p=t.touches?document.elementFromPoint(t.touches[0].clientX,t.touches[0].clientY):t.target).classList.contains("ol-switcherbottomdiv")?s.overflow(-1):p.classList.contains("ol-switchertopdiv")&&s.overflow(1);p&&"LI"!==p.tagName;)p=p.parentNode;p&&p.classList.contains("dropover")||a.parentNode.querySelectorAll("li").forEach(function(t){t.classList.remove("dropover"),t.classList.remove("dropover-after"),t.classList.remove("dropover-before")}),p&&p.parentNode.classList.contains("drag")&&p!==a?((o=s._getLayerForLI(p))&&!o.get("allwaysOnTop")==!n.get("allwaysOnTop")?(p.classList.add("dropover"),p.classList.add(a.offsetTopd?c.insertAt(d,e):c.insertAt(d+1,e);break}}l&&s.selectLayer(e),s.dispatchEvent({type:"reorder-end",layer:e,group:r})}a.parentNode.querySelectorAll("li").forEach(function(t){t.classList.remove("dropover"),t.classList.remove("dropover-after"),t.classList.remove("dropover-before")}),a.classList.remove("drag"),a.parentNode.classList.remove("drag"),s.element.classList.remove("drag"),i&&i.remove(),ol.ext.element.removeListener(document,"mousemove touchmove",p),ol.ext.element.removeListener(document,"mouseup touchend touchcancel",t)})},ol.control.LayerSwitcher.prototype.dragOpacity_=function(t){t.stopPropagation(),t.preventDefault();var e=this,o=t.target,i=this._getLayerForLI(o.parentNode.parentNode.parentNode);if(i){var n=t.pageX||t.touches&&t.touches.length&&t.touches[0].pageX||t.changedTouches&&t.changedTouches.length&&t.changedTouches[0].pageX,r=ol.ext.element.getStyle(o,"left")-n;e.dragging_=!0,ol.ext.element.addListener(document,"mouseup touchend touchcancel",function t(){ol.ext.element.removeListener(document,"mouseup touchend touchcancel",t),ol.ext.element.removeListener(document,"mousemove touchmove",s),e.dragging_=!1}),ol.ext.element.addListener(document,"mousemove touchmove",s)}function s(t){var e=t.pageX||t.touches&&t.touches.length&&t.touches[0].pageX||t.changedTouches&&t.changedTouches.length&&t.changedTouches[0].pageX,n=(r+e)/ol.ext.element.getStyle(o.parentNode,"width"),s=Math.max(0,Math.min(1,n));ol.ext.element.setStyle(o,{left:100*s+"%"}),o.parentNode.nextElementSibling.innerHTML=Math.round(100*s),i.setOpacity(s)}},ol.control.LayerSwitcher.prototype.drawList=function(t,e){var o=this,i=e.getArray(),n=function(t){t.stopPropagation(),t.preventDefault();var i=o._getLayerForLI(this.parentNode.parentNode);o.switchLayerVisibility(i,e),o.get("selection")&&i.getVisible()&&o.selectLayer(i),o.onchangeCheck&&o.onchangeCheck(i)};function r(t){t.stopPropagation(),t.preventDefault();var e=o._getLayerForLI(this.parentNode.parentNode);o.oninfo(e),o.dispatchEvent({type:"info",layer:e})}function s(t){t.stopPropagation(),t.preventDefault();var e=o._getLayerForLI(this.parentNode.parentNode);o.onextent?o.onextent(e):o.getMap().getView().fit(e.getExtent(),o.getMap().getSize()),o.dispatchEvent({type:"extent",layer:e})}function a(t){t.stopPropagation(),t.preventDefault();var e,i=this.parentNode.parentNode.parentNode.parentNode,n=o._getLayerForLI(i);n?(e=o._getLayerForLI(this.parentNode.parentNode),n.getLayers().remove(e),0!=n.getLayers().getLength()||n.get("noSwitcherDelete")||a.call(i.querySelectorAll(".layerTrash")[0],t)):(i=this.parentNode.parentNode,o.getMap().removeLayer(o._getLayerForLI(i)))}function l(e){if(this.displayInLayerSwitcher(e)){var l=ol.ext.element.create("LI",{className:(e.getVisible()?"visible ":" ")+(e.get("baseLayer")?"baselayer":""),parent:t});this._setLayerForLI(l,e),this._selectedLayer===e&&l.classList.add("ol-layer-select");var h=ol.ext.element.create("DIV",{className:"ol-layerswitcher-buttons",parent:l}),p=ol.ext.element.create("DIV",{className:"li-content",parent:l});ol.ext.element.create("INPUT",{type:e.get("baseLayer")?"radio":"checkbox",className:"ol-visibility",checked:e.getVisible(),click:n,parent:p});var u=ol.ext.element.create("LABEL",{title:e.get("title")||e.get("name"),click:n,unselectable:"on",style:{userSelect:"none"},parent:p});if(u.addEventListener("selectstart",function(){return!1}),ol.ext.element.create("SPAN",{html:e.get("title")||e.get("name"),click:function(t){this.get("selection")&&(t.stopPropagation(),this.selectLayer(e))}.bind(this),parent:u}),this.reordering&&(c0&&(!e.get("allwaysOnTop")||i[c-1].get("allwaysOnTop")))&&ol.ext.element.create("DIV",{className:"layerup ol-noscroll",title:this.tip.up,on:{"mousedown touchstart":function(t){o.dragOrdering_(t)}},parent:h}),e.getLayers){var d=0;e.getLayers().forEach(function(t){o.displayInLayerSwitcher(t)&&d++}),d&&ol.ext.element.create("DIV",{className:e.get("openInLayerSwitcher")?"collapse-layers":"expend-layers",title:this.tip.plus,click:function(){var t=o._getLayerForLI(this.parentNode.parentNode);t.set("openInLayerSwitcher",!t.get("openInLayerSwitcher"))},parent:h})}if(this.oninfo&&ol.ext.element.create("DIV",{className:"layerInfo",title:this.tip.info,click:r,parent:h}),this.hastrash&&!e.get("noSwitcherDelete")&&ol.ext.element.create("DIV",{className:"layerTrash",title:this.tip.trash,click:a,parent:h}),this.hasextent&&i[c].getExtent()){var g=i[c].getExtent();4==g.length&&g[0]=0;c--)l.call(this,i[c]);this.viewChange(),t===this.panel_&&this.overflow()},ol.control.LayerSwitcher.prototype.getLayerClass=function(t){return t?t.getLayers?"ol-layer-group":t instanceof ol.layer.Vector?"ol-layer-vector":t instanceof ol.layer.VectorTile?"ol-layer-vectortile":t instanceof ol.layer.Tile?"ol-layer-tile":t instanceof ol.layer.Image?"ol-layer-image":t instanceof ol.layer.Heatmap?"ol-layer-heatmap":t.getFeatures?"ol-layer-vectorimage":"unknown":"none"},ol.control.LayerSwitcher.prototype.selectLayer=function(t,e){if(!t){if(!this.getMap())return;t=this.getMap().getLayers().item(this.getMap().getLayers().getLength()-1)}this._selectedLayer=t,this.drawPanel(),e||this.dispatchEvent({type:"select",layer:t})},ol.control.LayerSwitcher.prototype.getSelection=function(){return this._selectedLayer},ol.control.LayerSwitcher.prototype.setprogress_=function(t){if(!t.layerswitcher_progress){var e=0,o=0,i=function(){o===e?(o=e=0,ol.ext.element.setStyle(t.layerswitcher_progress,{width:0})):ol.ext.element.setStyle(t.layerswitcher_progress,{width:(e/o*100).toFixed(1)+"%"})};t.getSource().on("tileloadstart",function(){o++,i()}),t.getSource().on("tileloadend",function(){e++,i()}),t.getSource().on("tileloaderror",function(){e++,i()})}},ol.control.Bar=function(t){t||(t={});var e=document.createElement("div");if(e.classList.add("ol-unselectable","ol-control","ol-bar"),t.className){var o=t.className.split(" ").filter(function(t){return t.length>0});e.classList.add.apply(e.classList,o)}if(t.group&&e.classList.add("ol-group"),ol.control.Control.call(this,{element:e,target:t.target}),this.set("toggleOne",t.toggleOne),this.set("autoDeactivate",t.autoDeactivate),this.controls_=[],t.controls instanceof Array)for(var i=0;i0?this.set("max",Number(e)):e=this.get("max"),e){var i=Math.round(t/e*100);ol.ext.element.setStyle(this._progress,{display:""}),this._progressbar.className=i?"":"notransition",ol.ext.element.setStyle(this._progressbar,{width:i+"%"})}else ol.ext.element.setStyle(this._progress,{display:"none"});this._progressMessage.innerHTML="",ol.ext.element.setHTML(this._progressMessage,o||"")}else ol.ext.element.setStyle(this._progress,{display:"none"})},ol.control.Dialog.prototype._onButton=function(t,e){return function(o){o.preventDefault(),"submit"===t&&!1===this.get("closeOnSubmit")||this.hide();var i=this.getInputs();this.dispatchEvent({type:"button",button:t,inputs:i}),"function"==typeof e&&e(t,i)}.bind(this)},ol.control.Dialog.prototype.getInputs=function(){var t={};return["input","textarea","select"].forEach(function(e){this.element.querySelectorAll("form "+e).forEach(function(e){e.className&&e.className.split(" ").forEach(function(o){t[o]=e})})}.bind(this)),t},ol.control.Dialog.prototype.hide=function(){this.element.classList.remove("ol-visible"),this.dispatchEvent({type:"hide"})},ol.control.Dialog.prototype.close=ol.control.Dialog.prototype.hide,ol.control.Dialog.prototype.isOpen=function(){return this.element.classList.contains("ol-visible")},ol.control.Disable=function(t){t=t||{};var e=document.createElement("div");e.className=(t.className||" ol-disable ol-unselectable ol-control").trim();var o={top:"0px",left:"0px",right:"0px",bottom:"0px",zIndex:1e4,background:"none",display:"none"};Object.keys(o).forEach(function(t){e.style[t]=o[t]}),ol.control.Control.call(this,{element:e})},ol.ext.inherits(ol.control.Disable,ol.control.Control),ol.control.Disable.prototype.isOn=function(){return this.element.classList.contains("ol-disable")},ol.control.Disable.prototype.disableMap=function(t){t?this.element.classList.add("ol-enable").show():this.element.classList.remove("ol-enable").hide()},ol.control.EditBar=function(t){(t=t||{}).interactions=t.interactions||{},ol.control.Bar.call(this,{className:(t.className?t.className+" ":"")+"ol-editbar",toggleOne:!0,target:t.target}),this._source=t.source,this._interactions={},this._setSelectInteraction(t),!1!==t.edition&&this._setEditInteraction(t),this._setModifyInteraction(t)},ol.ext.inherits(ol.control.EditBar,ol.control.Bar),ol.control.EditBar.prototype.setMap=function(t){this.getMap()&&(this._interactions.Delete&&this.getMap().removeInteraction(this._interactions.Delete),this._interactions.ModifySelect&&this.getMap().removeInteraction(this._interactions.ModifySelect)),ol.control.Bar.prototype.setMap.call(this,t),this.getMap()&&(this._interactions.Delete&&this.getMap().addInteraction(this._interactions.Delete),this._interactions.ModifySelect&&this.getMap().addInteraction(this._interactions.ModifySelect))},ol.control.EditBar.prototype.getInteraction=function(t){return this._interactions[t]},ol.control.EditBar.prototype._getTitle=function(t){if(t)return t.get?t.get("title"):"string"==typeof t?t:t.title},ol.control.EditBar.prototype._setSelectInteraction=function(t){var e,o=this,i=new ol.control.Bar;if(!1!==t.interactions.Delete){t.interactions.Delete instanceof ol.interaction.Delete?this._interactions.Delete=t.interactions.Delete:this._interactions.Delete=new ol.interaction.Delete;var n=this._interactions.Delete;n.setActive(!1),this.getMap()&&this.getMap().addInteraction(n),i.addControl(new ol.control.Button({className:"ol-delete",title:this._getTitle(t.interactions.Delete)||"Delete",name:"Delete",handleClick:function(t){n.delete(e.getInteraction().getFeatures());var o={type:"select",selected:[],deselected:e.getInteraction().getFeatures().getArray().slice(),mapBrowserEvent:t.mapBrowserEvent};e.getInteraction().getFeatures().clear(),e.getInteraction().dispatchEvent(o)}}))}if(!1!==t.interactions.Info&&i.addControl(new ol.control.Button({className:"ol-info",name:"Info",title:this._getTitle(t.interactions.Info)||"Show informations",handleClick:function(){o.dispatchEvent({type:"info",features:e.getInteraction().getFeatures()})}})),!1!==t.interactions.Select){t.interactions.Select instanceof ol.interaction.Select?this._interactions.Select=t.interactions.Select:this._interactions.Select=new ol.interaction.Select({condition:ol.events.condition.click});var r=this._interactions.Select;e=new ol.control.Toggle({className:"ol-selection",name:"Select",title:this._getTitle(t.interactions.Select)||"Select",interaction:r,bar:i.getControls().length?i:void 0,autoActivate:!0,active:!0}),this.addControl(e),r.on("change:active",function(){r.getFeatures().clear()})}},ol.control.EditBar.prototype._setEditInteraction=function(t){if(!1!==t.interactions.DrawPoint){t.interactions.DrawPoint instanceof ol.interaction.Draw?this._interactions.DrawPoint=t.interactions.DrawPoint:this._interactions.DrawPoint=new ol.interaction.Draw({type:"Point",source:this._source});var e=new ol.control.Toggle({className:"ol-drawpoint",name:"DrawPoint",title:this._getTitle(t.interactions.DrawPoint)||"Point",interaction:this._interactions.DrawPoint});this.addControl(e)}if(!1!==t.interactions.DrawLine){t.interactions.DrawLine instanceof ol.interaction.Draw?this._interactions.DrawLine=t.interactions.DrawLine:this._interactions.DrawLine=new ol.interaction.Draw({type:"LineString",source:this._source,geometryFunction:function(t,e){return e?e.setCoordinates(t):e=new ol.geom.LineString(t),this.nbpts=e.getCoordinates().length,e}});var o=new ol.control.Toggle({className:"ol-drawline",title:this._getTitle(t.interactions.DrawLine)||"LineString",name:"DrawLine",interaction:this._interactions.DrawLine,bar:new ol.control.Bar({controls:[new ol.control.TextButton({html:this._getTitle(t.interactions.UndoDraw)||"undo",title:this._getTitle(t.interactions.UndoDraw)||"delete last point",handleClick:function(){o.getInteraction().nbpts>1&&o.getInteraction().removeLastPoint()}}),new ol.control.TextButton({html:this._getTitle(t.interactions.FinishDraw)||"finish",title:this._getTitle(t.interactions.FinishDraw)||"finish",handleClick:function(){o.getInteraction().nbpts>2&&o.getInteraction().finishDrawing()}})]})});this.addControl(o)}if(!1!==t.interactions.DrawPolygon&&(t.interactions.DrawPolygon instanceof ol.interaction.Draw?this._interactions.DrawPolygon=t.interactions.DrawPolygon:this._interactions.DrawPolygon=new ol.interaction.Draw({type:"Polygon",source:this._source,geometryFunction:function(t,e){return this.nbpts=t[0].length,e?e.setCoordinates([t[0].concat([t[0][0]])]):e=new ol.geom.Polygon(t),e}}),this._setDrawPolygon("ol-drawpolygon",this._interactions.DrawPolygon,this._getTitle(t.interactions.DrawPolygon)||"Polygon","DrawPolygon",t)),!1!==t.interactions.DrawHole&&(t.interactions.DrawHole instanceof ol.interaction.DrawHole?this._interactions.DrawHole=t.interactions.DrawHole:this._interactions.DrawHole=new ol.interaction.DrawHole,this._setDrawPolygon("ol-drawhole",this._interactions.DrawHole,this._getTitle(t.interactions.DrawHole)||"Hole","DrawHole",t)),!1!==t.interactions.DrawRegular){var i={pts:"pts",circle:"circle"};t.interactions.DrawRegular instanceof ol.interaction.DrawRegular?(this._interactions.DrawRegular=t.interactions.DrawRegular,i.pts=this._interactions.DrawRegular.get("ptsLabel")||i.pts,i.circle=this._interactions.DrawRegular.get("circleLabel")||i.circle):(this._interactions.DrawRegular=new ol.interaction.DrawRegular({source:this._source,sides:4}),t.interactions.DrawRegular&&(i.pts=t.interactions.DrawRegular.ptsLabel||i.pts,i.circle=t.interactions.DrawRegular.circleLabel||i.circle));var n=this._interactions.DrawRegular,r=document.createElement("DIV"),s=ol.ext.element.create("DIV",{parent:r});ol.ext.element.addListener(s,["click","touchstart"],function(){var t=n.getSides()-1;t<2&&(t=2),n.setSides(t),a.textContent=t>2?t+" "+i.pts:i.circle}.bind(this));var a=ol.ext.element.create("TEXT",{html:"4 "+i.pts,parent:r}),l=ol.ext.element.create("DIV",{parent:r});ol.ext.element.addListener(l,["click","touchstart"],function(){var t=n.getSides()+1;t<3&&(t=3),n.setSides(t),a.textContent=t+" "+i.pts}.bind(this));var c=new ol.control.Toggle({className:"ol-drawregular",title:this._getTitle(t.interactions.DrawRegular)||"Regular",name:"DrawRegular",interaction:this._interactions.DrawRegular,bar:new ol.control.Bar({controls:[new ol.control.TextButton({html:r})]})});this.addControl(c)}},ol.control.EditBar.prototype._setDrawPolygon=function(t,e,o,i,n){var r=new ol.control.Toggle({className:t,name:i,title:o,interaction:e,bar:new ol.control.Bar({controls:[new ol.control.TextButton({html:this._getTitle(n.interactions.UndoDraw)||"undo",title:this._getTitle(n.interactions.UndoDraw)||"undo last point",handleClick:function(){r.getInteraction().nbpts>1&&r.getInteraction().removeLastPoint()}}),new ol.control.TextButton({html:this._getTitle(n.interactions.FinishDraw)||"finish",title:this._getTitle(n.interactions.FinishDraw)||"finish",handleClick:function(){r.getInteraction().nbpts>3&&r.getInteraction().finishDrawing()}})]})});return this.addControl(r),r},ol.control.EditBar.prototype._setModifyInteraction=function(t){if(!1!==t.interactions.ModifySelect&&!1!==t.interactions.Select&&(t.interactions.ModifySelect instanceof ol.interaction.ModifyFeature?this._interactions.ModifySelect=t.interactions.ModifySelect:this._interactions.ModifySelect=new ol.interaction.ModifyFeature({features:this.getInteraction("Select").getFeatures()}),this.getMap()&&this.getMap().addInteraction(this._interactions.ModifySelect),this._interactions.ModifySelect.setActive(this._interactions.Select.getActive()),this._interactions.Select.on("change:active",function(){this._interactions.ModifySelect.setActive(this._interactions.Select.getActive())}.bind(this))),!1!==t.interactions.Transform){t.interactions.Transform instanceof ol.interaction.Transform?this._interactions.Transform=t.interactions.Transform:this._interactions.Transform=new ol.interaction.Transform({addCondition:ol.events.condition.shiftKeyOnly});var e=new ol.control.Toggle({html:"",className:"ol-transform",title:this._getTitle(t.interactions.Transform)||"Transform",name:"Transform",interaction:this._interactions.Transform});this.addControl(e)}if(!1!==t.interactions.Split){t.interactions.Split instanceof ol.interaction.Split?this._interactions.Split=t.interactions.Split:this._interactions.Split=new ol.interaction.Split({sources:this._source});var o=new ol.control.Toggle({className:"ol-split",title:this._getTitle(t.interactions.Split)||"Split",name:"Split",interaction:this._interactions.Split});this.addControl(o)}if(!1!==t.interactions.Offset){t.interactions.Offset instanceof ol.interaction.Offset?this._interactions.Offset=t.interactions.Offset:this._interactions.Offset=new ol.interaction.Offset({source:this._source});var i=new ol.control.Toggle({html:"",className:"ol-offset",title:this._getTitle(t.interactions.Offset)||"Offset",name:"Offset",interaction:this._interactions.Offset});this.addControl(i)}},ol.control.Gauge=function(t){t=t||{};var e=ol.ext.element.create("DIV",{className:((t.className||"")+" ol-gauge ol-unselectable ol-control").trim()});this.title_=ol.ext.element.create("SPAN",{parent:e});var o=ol.ext.element.create("DIV",{parent:e});this.gauge_=ol.ext.element.create("BUTTON",{type:"button",style:{width:"0px"},parent:o}),ol.control.Control.call(this,{element:e,target:t.target}),this.setTitle(t.title),this.set("max",t.max||100),this.val(t.val)},ol.ext.inherits(ol.control.Gauge,ol.control.Control),ol.control.Gauge.prototype.setTitle=function(t){this.title_.innerHTML=t||"",this.title_.display=t?"":"none"},ol.control.Gauge.prototype.val=function(t){return void 0!==t&&(this.val_=t,this.gauge_.style.width=t/this.get("max")*100+"%"),this.val_},ol.control.GeoBookmark=function(t){t=t||{};var e=this,o=document.createElement("div");t.target?o.className=t.className||"ol-bookmark":(o.className=(t.className||"ol-bookmark")+" ol-unselectable ol-control ol-collapsed",o.addEventListener("mouseleave",function(){r!==document.activeElement&&(i.style.display="none")}),this.button=ol.ext.element.create("BUTTON",{type:"button",title:t.title||"Geobookmarks",click:function(){var t=""===i.style.display||"none"===i.style.display;i.style.display=t?"block":"none",t&&this.setBookmarks()}.bind(this)}),o.appendChild(this.button));var i=document.createElement("div");o.appendChild(i);var n=document.createElement("ul");i.appendChild(n);var r=document.createElement("input");r.setAttribute("placeholder",t.placeholder||"Add a new geomark..."),r.addEventListener("keydown",function(t){if(t.stopPropagation(),13===t.keyCode){t.preventDefault();var o=this.value;o&&(e.addBookmark(o),this.value="",e.dispatchEvent({type:"add",name:o})),i.style.display="none"}}),r.addEventListener("blur",function(){i.style.display="none"}),i.appendChild(r),ol.control.Control.call(this,{element:o,target:t.target}),this.on("propertychange",function(t){"editable"===t.key&&(o.className=o.className.replace(" ol-editable",""),this.get("editable")&&(o.className+=" ol-editable"))}.bind(this)),this.set("namespace",t.namespace||"ol"),this.set("editable",!1!==t.editable),this.set("deleteTitle",t.deleteTitle||"Suppr.");var s={};try{localStorage[this.get("namespace")+"@bookmark"]&&(s=JSON.parse(localStorage[this.get("namespace")+"@bookmark"]))}catch(t){console.warn("Failed to access localStorage...")}if(t.marks)for(var a in t.marks)s[a]=t.marks[a];this.setBookmarks(s)},ol.ext.inherits(ol.control.GeoBookmark,ol.control.Control),ol.control.GeoBookmark.prototype.setBookmarks=function(t){if(!t){t={};try{t=JSON.parse(localStorage[this.get("namespace")+"@bookmark"]||"{}")}catch(t){console.warn("Failed to access localStorage...")}}var e=this.get("editable"),o=this.element.querySelector("ul"),i=this.element.querySelector("div"),n=this;for(var r in o.innerHTML="",t){var s=document.createElement("li");if(s.textContent=r,s.setAttribute("data-bookmark",JSON.stringify(t[r])),s.setAttribute("data-name",r),s.addEventListener("click",function(){var t=JSON.parse(this.getAttribute("data-bookmark"));n.getMap().getView().setCenter(t.pos),n.getMap().getView().setZoom(t.zoom),n.getMap().getView().setRotation(t.rot||0),i.style.display="none",n.dispatchEvent({type:"select",name:this.getAttribute("data-name"),bookmark:t})}),o.appendChild(s),e&&!t[r].permanent){var a=document.createElement("button");a.setAttribute("data-name",r),a.setAttribute("type","button"),a.setAttribute("title",this.get("deleteTitle")||"Suppr."),a.addEventListener("click",function(t){n.removeBookmark(this.getAttribute("data-name")),n.dispatchEvent({type:"remove",name:this.getAttribute("data-name")}),t.stopPropagation()}),s.appendChild(a)}}try{localStorage[this.get("namespace")+"@bookmark"]=JSON.stringify(t)}catch(t){console.warn("Failed to access localStorage...")}},ol.control.GeoBookmark.prototype.getBookmarks=function(){var t={};try{t=JSON.parse(localStorage[this.get("namespace")+"@bookmark"]||"{}")}catch(t){console.warn("Failed to access localStorage...")}return t},ol.control.GeoBookmark.prototype.removeBookmark=function(t){if(t){var e=this.getBookmarks();delete e[t],this.setBookmarks(e)}},ol.control.GeoBookmark.prototype.addBookmark=function(t,e,o,i){if(t){var n,r=e;r&&r.position?(o=r.zoom,i=r.permanent,n=r.rotation,e=r.position):n=this.getMap().getView().getRotation();var s=this.getBookmarks();s[t]&&s[t].permanent||(s[t]={pos:e||this.getMap().getView().getCenter(),zoom:o||this.getMap().getView().getZoom(),permanent:!!i},n&&(s[t].rot=n),this.setBookmarks(s))}},ol.control.GeolocationBar=function(t){t||(t={}),t.className=t.className||"ol-geobar",ol.control.Bar.call(this,t),this.setPosition(t.position||"bottom-right");var e=this.element,o=new ol.interaction.GeolocationDraw({source:t.source,zoom:t.zoom,minZoom:t.minZoom,tolerance:t.tolerance,followTrack:t.followTrack,minAccuracy:t.minAccuracy||1e4});this._geolocBt=new ol.control.Toggle({className:"geolocBt",interaction:o,onToggle:function(){o.pause(!0),o.setFollowTrack(t.followTrack),e.classList.remove("pauseTrack")}}),this.addControl(this._geolocBt),this._geolocBt.setActive(!1);var i=new ol.control.Bar;this.addControl(i);var n=new ol.control.TextButton({className:"centerBt",html:t.centerLabel||"center",handleClick:function(){o.setFollowTrack("auto")}});i.addControl(n);var r=new ol.control.Button({className:"startBt",handleClick:function(){o.pause(!1),o.setFollowTrack("auto"),e.classList.add("pauseTrack")}});i.addControl(r);var s=new ol.control.Button({className:"pauseBt",handleClick:function(){o.pause(!0),o.setFollowTrack("auto"),e.classList.remove("pauseTrack")}});i.addControl(s),o.on("follow",function(t){t.following?e.classList.remove("centerTrack"):e.classList.add("centerTrack")}),this._geolocBt.on("change:active",function(t){t.active?e.classList.add("ol-active"):e.classList.remove("ol-active")})},ol.ext.inherits(ol.control.GeolocationBar,ol.control.Bar),ol.control.GeolocationBar.prototype.setMap=function(t){this._listener&&ol.Observable.unByKey(this._listener),this._listener=null,ol.control.Bar.prototype.setMap.call(this,t),t&&(this._listener=t.on("moveend",function(){var e=this.getInteraction();e.getActive()&&"auto"===e.get("followTrack")&&e.path_.length&&e.path_[e.path_.length-1][0]!==t.getView().getCenter()[0]&&this.element.classList.add("centerTrack")}.bind(this)))},ol.control.GeolocationBar.prototype.getInteraction=function(){return this._geolocBt.getInteraction()},ol.control.GeolocationButton=function(t){t||(t={}),t.followTrack=t.followTrack||"auto",t.zoom=t.zoom||16;var e,o=new ol.interaction.GeolocationDraw(t);ol.control.Toggle.call(this,{className:t.className=((t.className||"")+" ol-geobt").trim(),interaction:o,title:t.title||"Geolocation",onToggle:function(){o.pause(!0),o.setFollowTrack(t.followTrack||"auto")}}),this.setActive(!1),o.on("tracking",function(t){this.dispatchEvent({type:"position",coordinate:t.geolocation.getPosition()})}.bind(this)),o.on("change:active",function(){this.dispatchEvent({type:"position"}),e&&(clearTimeout(e),e=null),o.getActive()&&(e=setTimeout(function(){o.setActive(!1),e=null}.bind(this),t.delay||3e3))}.bind(this))},ol.ext.inherits(ol.control.GeolocationButton,ol.control.Toggle),ol.control.Globe=function(t){var e,o=t||{},i=this;o.target?(e=document.createElement("div"),this.panel_=o.target):((e=document.createElement("div")).classList.add("ol-globe","ol-unselectable","ol-control"),/top/.test(o.align)&&e.classList.add("ol-control-top"),/right/.test(o.align)&&e.classList.add("ol-control-right"),this.panel_=document.createElement("div"),this.panel_.classList.add("panel"),e.appendChild(this.panel_),this.pointer_=document.createElement("div"),this.pointer_.classList.add("ol-pointer"),e.appendChild(this.pointer_)),ol.control.Control.call(this,{element:e,target:o.target}),this.ovmap_=new ol.Map({controls:new ol.Collection,interactions:new ol.Collection,target:this.panel_,view:new ol.View({zoom:0,center:[0,0]}),layers:o.layers}),setTimeout(function(){i.ovmap_.updateSize()},0),this.set("follow",o.follow||!1),this.extentLayer=new ol.layer.Vector({name:"Cache extent",source:new ol.source.Vector,style:o.style||[new ol.style.Style({image:new ol.style.Circle({fill:new ol.style.Fill({color:"rgba(255,0,0, 1)"}),stroke:new ol.style.Stroke({width:7,color:"rgba(255,0,0, 0.8)"}),radius:5})})]}),this.ovmap_.addLayer(this.extentLayer)},ol.ext.inherits(ol.control.Globe,ol.control.Control),ol.control.Globe.prototype.setMap=function(t){this._listener&&ol.Observable.unByKey(this._listener),this._listener=null,ol.control.Control.prototype.setMap.call(this,t),t&&(this._listener=t.getView().on("propertychange",this.setView.bind(this)),this.setView())},ol.control.Globe.prototype.setView=function(){this.getMap()&&this.get("follow")&&this.setCenter(this.getMap().getView().getCenter())},ol.control.Globe.prototype.getGlobe=function(){return this.ovmap_},ol.control.Globe.prototype.show=function(t){!1!==t?this.element.classList.remove("ol-collapsed"):this.element.classList.add("ol-collapsed"),this.ovmap_.updateSize()},ol.control.Globe.prototype.setPosition=function(t){/top/.test(t)?this.element.classList.add("ol-control-top"):this.element.classList.remove("ol-control-top"),/right/.test(t)?this.element.classList.add("ol-control-right"):this.element.classList.remove("ol-control-right")},ol.control.Globe.prototype.setCenter=function(t,e){var o=this;if(this.pointer_.classList.add("hidden"),t){var i=this.ovmap_,n=i.getPixelFromCoordinate(t);if(n){if(!1!==e){var r=this.element.clientHeight;setTimeout(function(){o.pointer_.style.top=String(Math.min(Math.max(n[1],0),r))+"px",o.pointer_.style.left="50%",o.pointer_.classList.remove("hidden")},800)}i.getView().animate({center:[t[0],0]})}}},ol.control.Graticule=function(t){t||(t={});var e=document.createElement("div");e.className="ol-graticule ol-unselectable ol-hidden",ol.control.CanvasBase.call(this,{element:e}),this.set("projection",t.projection||"EPSG:4326");var o=new ol.proj.Projection({code:this.get("projection")}).getMetersPerUnit();for(this.fac=1;o/this.fac>10;)this.fac*=10;this.fac=1e4/this.fac,this.set("maxResolution",t.maxResolution||1/0),this.set("step",t.step||.1),this.set("stepCoord",t.stepCoord||1),this.set("spacing",t.spacing||40),this.set("margin",t.margin||0),this.set("borderWidth",t.borderWidth||5),this.set("stroke",!1!==t.stroke),this.formatCoord=t.formatCoord||function(t){return t},t.style instanceof ol.style.Style?this.setStyle(t.style):this.setStyle(new ol.style.Style({stroke:new ol.style.Stroke({color:"#000",width:1}),fill:new ol.style.Fill({color:"#fff"}),text:new ol.style.Text({stroke:new ol.style.Stroke({color:"#fff",width:2}),fill:new ol.style.Fill({color:"#000"})})}))},ol.ext.inherits(ol.control.Graticule,ol.control.CanvasBase),ol.control.Graticule.prototype.setStyle=function(t){this._style=t},ol.control.Graticule.prototype._draw=function(t){if(!(this.get("maxResolution")r)(f*=Math.round((h-p)/r*m/f))>this.fac&&(f=Math.round(f/this.fac)*this.fac);p=Math.floor(p/f)*f-f,d=Math.floor(d/f)*f-f,h=Math.floor(h/f)*f+2*f,u=Math.floor(u/f)*f+2*f;var x=ol.proj.get(a).getExtent();x&&(px[2]&&(h=x[2]+f),u>x[3]&&(u=x[3]+f));var b=this.getStyle().getStroke()&&this.get("stroke"),w=this.getStyle().getText(),S=this.getStyle().getFill();o.save(),o.scale(n,n),o.beginPath(),o.rect(_,_,r-2*_,s-2*_),o.clip(),o.beginPath();var C,M,E,T,L,P={top:[],left:[],bottom:[],right:[]};for(C=p;C0&&L[1]<0&&P.top.push([C,E]),E[1]>s&&L[1]0&&P.left.push([M,E]),E[0]r&&P.right.push([M,E]),E=L;if(b&&(o.strokeStyle=this.getStyle().getStroke().getColor(),o.lineWidth=this.getStyle().getStroke().getWidth(),o.stroke()),w){var k,A;o.fillStyle=this.getStyle().getText().getFill().getColor(),o.strokeStyle=this.getStyle().getText().getStroke().getColor(),o.lineWidth=this.getStyle().getText().getStroke().getWidth(),o.font=this.getStyle().getText().getFont(),o.textAlign="center",o.textBaseline="hanging";var I=(S?v:0)+_+2;for(g=0;k=P.top[g];g++)Math.round(k[0]/this.get("step"))%y||(A=this.formatCoord(k[0],"top"),o.strokeText(A,k[1][0],I),o.fillText(A,k[1][0],I));for(o.textBaseline="alphabetic",g=0;k=P.bottom[g];g++)Math.round(k[0]/this.get("step"))%y||(A=this.formatCoord(k[0],"bottom"),o.strokeText(A,k[1][0],s-I),o.fillText(A,k[1][0],s-I));for(o.textBaseline="middle",o.textAlign="left",g=0;k=P.left[g];g++)Math.round(k[0]/this.get("step"))%y||(A=this.formatCoord(k[0],"left"),o.strokeText(A,I,k[1][1]),o.fillText(A,I,k[1][1]));for(o.textAlign="right",g=0;k=P.right[g];g++)Math.round(k[0]/this.get("step"))%y||(A=this.formatCoord(k[0],"right"),o.strokeText(A,r-I,k[1][1]),o.fillText(A,r-I,k[1][1]))}if(S){var F,N,D=this.getStyle().getFill().getColor();for((N=this.getStyle().getStroke())?F=this.getStyle().getStroke().getColor():(F=D,D="#fff"),o.strokeStyle=F,o.lineWidth=N?N.getWidth():1,g=1;g=o[0])return"";var n=Math.floor((e[3]-t[1])/(e[3]-e[1])*o[1]);return n<0||n>=o[1]?"":this.getHIndex(i)+this.getVIndex(n)}},ol.control.GridReference.prototype.getVIndex=function(t){return t},ol.control.GridReference.prototype.getHIndex=function(t){return String.fromCharCode(65+t)},ol.control.GridReference.prototype._draw=function(t){if(!(this.get("maxResolution")r?(v=r-_,e.textBaseline="alphabetic"):e.textBaseline="hanging",e.strokeText(f,y,v),e.fillText(f,y,v);for(e.textBaseline="middle",g=0;gn?(y=n-_,e.textAlign="right"):e.textAlign="left",e.strokeText(f,y,v),e.fillText(f,y,v);e.restore()}},ol.control.Imageline=function(t){var e=ol.ext.element.create("DIV",{className:(t.className||"")+" ol-imageline"+(t.target?"":" ol-unselectable ol-control")+(t.collapsed&&t.collapsible?"ol-collapsed":"")});!t.target&&t.collapsible&&ol.ext.element.create("BUTTON",{type:"button",click:function(){this.toggle()}.bind(this),parent:e}),t.source&&(this._sources=t.source.forEach?t.source:[t.source]),t.layers&&this.setLayers(t.layers),ol.control.Control.call(this,{element:e,target:t.target}),this._setScrolling(),this._scrolldiv.addEventListener("scroll",function(){this.getMap()&&this.getMap().render()}.bind(this)),"function"==typeof t.getImage&&(this._getImage=t.getImage),"function"==typeof t.getTitle&&(this._getTitle=t.getTitle),this.set("maxFeatures",t.maxFeatures||100),this.set("linkColor",t.linkColor||!1),this.set("hover",t.hover||!1),this.set("useExtent",t.useExtent||!1),this.refresh()},ol.ext.inherits(ol.control.Imageline,ol.control.Control),ol.control.Imageline.prototype.setMap=function(t){this._listener&&this._listener.forEach(function(t){ol.Observable.unByKey(t)}.bind(this)),this._listener=null,ol.control.Control.prototype.setMap.call(this,t),t&&(this._listener=[t.on("postcompose",this._drawLink.bind(this)),t.on("moveend",function(){this.get("useExtent")&&this.refresh()}.bind(this))],this.refresh())},ol.control.Imageline.prototype.setLayers=function(t){this._sources=this._getSources(t)},ol.control.Imageline.prototype._getSources=function(t){var e=[];return t.forEach(function(t){t.getVisible()&&(t.getSource()&&t.getSource().getFeatures?e.push(t.getSource()):t.getLayers&&this._getSources(t.getLayers()))}.bind(this)),e},ol.control.Imageline.prototype.useExtent=function(t){this.set("useExtent",t),this.refresh()},ol.control.Imageline.prototype.isCollapsed=function(){return this.element.classList.contains("ol-collapsed")},ol.control.Imageline.prototype.collapse=function(t){t?this.element.classList.add("ol-collapsed"):this.element.classList.remove("ol-collapsed"),this.getMap()&&setTimeout(function(){this.getMap().render()}.bind(this),this.isCollapsed()?0:250),this.dispatchEvent({type:"collapse",collapsed:this.isCollapsed()})},ol.control.Imageline.prototype.toggle=function(){this.element.classList.toggle("ol-collapsed"),this.getMap()&&setTimeout(function(){this.getMap().render()}.bind(this),this.isCollapsed()?0:250),this.dispatchEvent({type:"collapse",collapsed:this.isCollapsed()})},ol.control.Imageline.prototype._getImage=function(t){return t.get("img")},ol.control.Imageline.prototype._getTitle=function(){return""},ol.control.Imageline.prototype.getFeatures=function(){var t=this.getMap();if(!t)return[];var e=[];return(this._sources||this._getSources(t.getLayers())).forEach(function(o){if(e.lengthi[0]?(e.moveTo((i[0]-5)*o,i[1]*o),e.lineTo((i[0]+5)*o,(i[1]+5)*o)):(e.moveTo((i[0]-5)*o,(i[1]+5)*o),e.lineTo((i[0]+5)*o,i[1]*o)),e.lineTo(n[0]*o,n[1]*o),e.fill(),e.restore()}},ol.control.IsochroneGeoportail=function(t){var e=this;t||(t={}),null==t.typing&&(t.typing=300);var o=(t.className?t.className:"")+" ol-isochrone ol-routing";t.target||(o+=" ol-unselectable ol-control");var i=ol.ext.element.create("DIV",{className:o});t.target||ol.ext.element.create("BUTTON",{parent:i}).addEventListener("click",function(){i.classList.toggle("ol-collapsed")});ol.control.Control.call(this,{element:i,target:t.target}),this.set("iter",1);var n=ol.ext.element.create("DIV",{className:"content",parent:i});this._addSearchCtrl(n,t),ol.ext.element.create("BUTTON",{className:"ol-button ol-method-time selected",title:"isochrone",parent:n}).addEventListener("click",function(){this.setMethod("time")}.bind(this)),ol.ext.element.create("I",{className:"ol-button ol-method-distance",title:"isodistance",parent:n}).addEventListener("click",function(){this.setMethod("distance")}.bind(this)),ol.ext.element.create("I",{className:"ol-button ol-car selected",title:"by car",parent:n}).addEventListener("click",function(){this.setMode("car")}.bind(this)),ol.ext.element.create("I",{className:"ol-button ol-pedestrian",title:"by foot",parent:n}).addEventListener("click",function(){this.setMode("pedestrian")}.bind(this)),ol.ext.element.create("I",{className:"ol-button ol-direction-direct selected",title:"direct",parent:n}).addEventListener("click",function(){this.setDirection("direct")}.bind(this)),ol.ext.element.create("I",{className:"ol-button ol-direction-reverse",title:"reverse",parent:n}).addEventListener("click",function(){this.setDirection("reverse")}.bind(this));var r=ol.ext.element.create("DIV",{className:"ol-time",parent:n});ol.ext.element.create("DIV",{html:"isochrone:",parent:r}),ol.ext.element.create("INPUT",{type:"number",parent:r,min:0}).addEventListener("change",function(){e.set("hour",Number(this.value))}),ol.ext.element.create("TEXT",{parent:r,html:"h"}),ol.ext.element.create("INPUT",{type:"number",parent:r,min:0}).addEventListener("change",function(){e.set("minute",Number(this.value))}),ol.ext.element.create("TEXT",{parent:r,html:"mn"}),r=ol.ext.element.create("DIV",{className:"ol-distance",parent:n}),ol.ext.element.create("DIV",{html:"isodistance:",parent:r}),ol.ext.element.create("INPUT",{type:"number",step:"any",parent:r,min:0}).addEventListener("change",function(){e.set("distance",Number(this.value))}),ol.ext.element.create("TEXT",{parent:r,html:"km"}),r=ol.ext.element.create("DIV",{className:"ol-iter",parent:n}),ol.ext.element.create("DIV",{html:"Iteration:",parent:r}),ol.ext.element.create("INPUT",{type:"number",parent:r,value:1,min:1}).addEventListener("change",function(){e.set("iter",Number(this.value))}),ol.ext.element.create("I",{className:"ol-ok",html:"ok",parent:n}).addEventListener("click",function(){var t=0;switch(this.get("method")){case"distance":t=1e3*this.get("distance");break;default:t=3600*(this.get("hour")||0)+60*(this.get("minute")||0)}t&&this.get("coordinate")&&this.search(this.get("coordinate"),t)}.bind(this)),this.set("url","https://wxs.ign.fr/"+(t.apiKey||"essentiels")+"/isochrone/isochrone.json"),this._ajax=new ol.ext.Ajax({dataType:"JSON",auth:t.auth}),this._ajax.on("success",this._success.bind(this)),this._ajax.on("error",this._error.bind(this)),this._ajax.on("loadstart",function(){this.element.classList.add("ol-searching")}.bind(this)),this._ajax.on("loadend",function(){this.element.classList.remove("ol-searching")}.bind(this)),this.setMethod(t.method)},ol.ext.inherits(ol.control.IsochroneGeoportail,ol.control.Control),ol.control.IsochroneGeoportail.prototype.setMap=function(t){ol.control.Control.prototype.setMap.call(this,t),this._search.setMap(t)},ol.control.IsochroneGeoportail.prototype._addSearchCtrl=function(t,e){var o=ol.ext.element.create("DIV",{parent:t}),i=this._search=new ol.control.SearchGeoportail({className:"IGNF ol-collapsed",apiKey:e.apiKey,target:o});i.on("select",function(t){i.setInput(t.search.fulltext),this.set("coordinate",t.coordinate)}.bind(this)),i.on("change:input",function(){this.set("coordinate",!1)}.bind(this))},ol.control.IsochroneGeoportail.prototype.setMethod=function(t){t=/distance/.test(t)?"distance":"time",this.element.querySelector(".ol-method-time").classList.remove("selected"),this.element.querySelector(".ol-method-distance").classList.remove("selected"),this.element.querySelector(".ol-method-"+t).classList.add("selected"),this.element.querySelector("div.ol-time").classList.remove("selected"),this.element.querySelector("div.ol-distance").classList.remove("selected"),this.element.querySelector("div.ol-"+t).classList.add("selected"),this.set("method",t)},ol.control.IsochroneGeoportail.prototype.setMode=function(t){this.set("mode",t),this.element.querySelector(".ol-car").classList.remove("selected"),this.element.querySelector(".ol-pedestrian").classList.remove("selected"),this.element.querySelector(".ol-"+t).classList.add("selected")},ol.control.IsochroneGeoportail.prototype.setDirection=function(t){this.set("direction",t),this.element.querySelector(".ol-direction-direct").classList.remove("selected"),this.element.querySelector(".ol-direction-reverse").classList.remove("selected"),this.element.querySelector(".ol-direction-"+t).classList.add("selected")},ol.control.IsochroneGeoportail.prototype.search=function(t,e,o){var i=this.getMap()?this.getMap().getView().getProjection():"EPSG:3857",n=/distance/.test(this.get("method"))?"distance":"time";if("string"==typeof e){var r=e.replace(/([0-9|.]*)([a-z]*)$/,"$2");switch(n="time",e=parseFloat(e),r){case"mn":e*=60;break;case"h":e*=3600;break;case"m":n="distance";break;case"km":n="distance",e*=1e3}}var s=Math.round(e*(this.get("iter")-(o||0))/this.get("iter"));if("number"==typeof e){var a={"gp-access-lib":"2.1.0",location:ol.proj.toLonLat(t,i),graphName:"pedestrian"===this.get("mode")?"Pieton":"Voiture",exclusions:this.get("exclusions")||void 0,method:n,time:"time"===n?s:void 0,distance:"distance"===n?s:void 0,reverse:"reverse"===this.get("direction"),smoothing:this.get("smoothing")||!0,holes:this.get("holes")||!1};this._ajax.send(this.get("url"),a,{coord:t,option:e,data:a,iteration:(o||0)+1})}},ol.control.IsochroneGeoportail.prototype._success=function(t){var e=this.getMap()?this.getMap().getView().getProjection():"EPSG:3857",o=new ol.format.WKT,i=t.response;i.feature=o.readFeature(i.wktGeometry,{dataProjection:"EPSG:4326",featureProjection:e}),i.feature.set("iteration",t.options.iteration),i.feature.set("method",t.options.data.method),i.feature.set(t.options.data.method,t.options.data[t.options.data.method]),delete i.wktGeometry,i.type="isochrone",i.iteration=t.options.iteration-1,this.dispatchEvent(i),t.options.iteration=0?setTimeout(function(){i.classList.add("ol-collapsed"),o._listener=null},e||3e3):null},100)},ol.control.Notification.prototype.hide=function(){this._listener&&(clearTimeout(this._listener),this._listener=null),this.element.classList.add("ol-collapsed")},ol.control.Notification.prototype.toggle=function(t){this.element.classList.contains("ol-collapsed")?this.show(null,t):this.hide()},ol.control.Overlay=function(t){t||(t={});var e=ol.ext.element.create("DIV",{className:"ol-unselectable ol-overlay "+(t.className||""),html:t.content});ol.control.Control.call(this,{element:e,target:t.target});var o=this;t.hideOnClick&&e.addEventListener("click",function(){o.hide()}),this.set("closeBox",t.closeBox),this._timeout=!1,this.setContent(t.content)},ol.ext.inherits(ol.control.Overlay,ol.control.Control),ol.control.Overlay.prototype.setContent=function(t){var e=this;if(t){var o=this.element;if(t instanceof Element?(o.innerHTML="",o.appendChild(t)):void 0!==t&&(o.innerHTML=t),this.get("closeBox")){var i=document.createElement("div");i.classList.add("ol-closebox"),i.addEventListener("click",function(){e.hide()}),o.insertBefore(i,o.firstChild)}}},ol.control.Overlay.prototype.show=function(t,e){var o=this,i=this.element;i.style.display="block",e?(this.center_=this.getMap().getPixelFromCoordinate(e),i.style.top=this.center_[1]+"px",i.style.left=this.center_[0]+"px"):(this.center_=!1,i.style.top="",i.style.left=""),t&&this.setContent(t),this._timeout&&clearTimeout(this._timeout),this._timeout=setTimeout(function(){i.classList.add("ol-visible"),i.style.top="",i.style.left="",o.dispatchEvent({type:"change:visible",visible:!0,element:o.element})},10)},ol.control.Overlay.prototype.showImage=function(t,e){e=e||{};var o=ol.ext.element.create("DIV",{className:"ol-fullscreen-image"});ol.ext.element.create("IMG",{src:t,parent:o}),e.title&&(o.classList.add("ol-has-title"),ol.ext.element.create("P",{html:e.title,parent:o})),this.show(o,e.coordinate)},ol.control.Overlay.prototype.hide=function(){var t=this.element;this.element.classList.remove("ol-visible"),this.center_&&(t.style.top=this.center_[1]+"px",t.style.left=this.center_[0]+"px",this.center_=!1),this._timeout&&clearTimeout(this._timeout),this._timeout=setTimeout(function(){t.style.display="none"},500),this.dispatchEvent({type:"change:visible",visible:!1,element:this.element})},ol.control.Overlay.prototype.toggle=function(){this.getVisible()?this.hide():this.show()},ol.control.Overlay.prototype.getVisible=function(){return"none"!==ol.ext.element.getStyle(this.element,"display")},ol.control.Overlay.prototype.setClass=function(t){var e=this.element.classList.contains("ol-visible");this.element.className=("ol-unselectable ol-overlay "+(e?"ol-visible ":"")+t).trim()},ol.control.Overview=function(t){t=t||{};var e,o=this;if(this.minZoom=t.minZoom||0,this.maxZoom=t.maxZoom||18,this.rotation=t.rotation,t.target)e=document.createElement("div"),this.panel_=t.target;else{(e=document.createElement("div")).classList.add("ol-overview","ol-unselectable","ol-control","ol-collapsed"),/top/.test(t.align)&&e.classList.add("ol-control-top"),/right/.test(t.align)&&e.classList.add("ol-control-right");var i=document.createElement("button");i.setAttribute("type","button"),i.addEventListener("touchstart",function(t){o.toggleMap(),t.preventDefault()}),i.addEventListener("click",function(){o.toggleMap()}),e.appendChild(i),this.panel_=document.createElement("div"),this.panel_.classList.add("panel"),e.appendChild(this.panel_)}ol.control.Control.call(this,{element:e,target:t.target}),this.ovmap_=new ol.Map({controls:new ol.Collection,interactions:new ol.Collection,target:this.panel_,view:new ol.View({zoom:2,center:[0,0],projection:t.projection}),layers:t.layers}),this.oview_=this.ovmap_.getView(),this.extentLayer=new ol.layer.Vector({name:"Cache extent",source:new ol.source.Vector,style:t.style||[new ol.style.Style({image:new ol.style.Circle({fill:new ol.style.Fill({color:"rgba(255,0,0, 1)"}),stroke:new ol.style.Stroke({width:7,color:"rgba(255,0,0, 0.8)"}),radius:5}),stroke:new ol.style.Stroke({width:5,color:"rgba(255,0,0,0.8)"})})]}),this.ovmap_.addLayer(this.extentLayer);this.ovmap_.addInteraction(new ol.interaction.Pointer({handleDownEvent:function(e){var i,n,r,s,a;return!1!==t.panAnimation?"elastic"==t.panAnimation||t.elasticPan?o.getMap().getView().animate({center:e.coordinate,easing:(i=2,n=.3,r=3*i*Math.PI/2,s=n>0?-1/n:-100,a=Math.cos(r)*Math.pow(2,s),function(t){return t=1-Math.cos(t*Math.PI/2),1-Math.cos(r*t)*Math.pow(2,s*t)+a*t}),duration:1e3}):o.getMap().getView().animate({center:e.coordinate,duration:300}):o.getMap().getView().setCenter(e.coordinate),!1}}))},ol.ext.inherits(ol.control.Overview,ol.control.Control),ol.control.Overview.prototype.getOverviewMap=function(){return this.ovmap_},ol.control.Overview.prototype.toggleMap=function(){this.element.classList.toggle("ol-collapsed"),this.ovmap_.updateSize(),this.setView()},ol.control.Overview.prototype.setPosition=function(t){/top/.test(t)?this.element.classList.add("ol-control-top"):this.element.classList.remove("ol-control-top"),/right/.test(t)?this.element.classList.add("ol-control-right"):this.element.classList.remove("ol-control-right")},ol.control.Overview.prototype.setMap=function(t){if(this._listener)for(var e in this._listener)ol.Observable.unByKey(this._listener[e]);this._listener={},ol.control.Control.prototype.setMap.call(this,t),t&&(this._listener.map=t.on("change:view",function(){this._listener.view&&ol.Observable.unByKey(this._listener.view),t.getView()&&(this._listener.view=t.getView().on("propertychange",this.setView.bind(this)),this.setView())}.bind(this)),this._listener.view=t.getView().on("propertychange",this.setView.bind(this)),this.setView())},ol.control.Overview.prototype.calcExtent_=function(t){var e=this.getMap();if(e){var o=this.extentLayer.getSource();o.clear();var i=new ol.Feature,n=e.getSize(),r=e.getView().getResolution(),s=e.getView().getRotation(),a=e.getView().getCenter();if(r){var l=r*n[0]/2,c=r*n[1]/2,h=this.oview_.getResolution();if(l/h>5||c/h>5){var p,u,d,g=Math.cos(s),m=Math.sin(s);for(t=[[-l,-c],[-l,c],[l,c],[l,-c]],p=0;p<4;++p)u=t[p][0],d=t[p][1],t[p][0]=a[0]+u*g-d*m,t[p][1]=a[1]+u*m+d*g;i.setGeometry(new ol.geom.Polygon([t]))}else i.setGeometry(new ol.geom.Point(a));o.addFeature(i)}}},ol.control.Overview.prototype.setView=function(t){if(!t)return this.setView({key:"rotation"}),this.setView({key:"resolution"}),void this.setView({key:"center"});switch(t.key){case"rotation":this.rotation?this.oview_.setRotation(this.getMap().getView().getRotation()):this.oview_.getRotation()&&this.oview_.setRotation(0);break;case"center":var e=this.getMap().getView().calculateExtent(this.getMap().getSize()),o=this.oview_.calculateExtent(this.ovmap_.getSize());(e[0]o[2]||e[3]>o[3])&&this.oview_.setCenter(this.getMap().getView().getCenter());break;case"resolution":var i=2*Math.round(this.oview_.getZoomForResolution(this.getMap().getView().getResolution())/2)-4;i=Math.min(this.maxZoom,Math.max(this.minZoom,i)),this.oview_.setZoom(i)}this.calcExtent_()},ol.control.Permalink=function(t){var e=t||{},o=this,i=document.createElement("button");if(this.replaceState_=!1!==e.urlReplace,this.fixed_=e.fixed||6,this.hash_=e.anchor?"#":"?",this._localStorage=e.localStorage,!this._localStorage)try{localStorage.removeItem("ol@permalink")}catch(t){console.warn("Failed to access localStorage...")}function n(){"function"==typeof e.onclick?e.onclick(o.getLink()):o.setUrlReplace(!o.replaceState_)}i.addEventListener("click",n,!1),i.addEventListener("touchstart",n,!1);var r=document.createElement("div");r.className=(e.className||"ol-permalink")+" ol-unselectable ol-control",r.appendChild(i),(e.hidden||!1===e.visible)&&ol.ext.element.hide(r),ol.control.Control.call(this,{element:r,target:e.target}),this.set("geohash",e.geohash),this.set("initial",!1),this.on("change",this.viewChange_.bind(this)),this.search_={};var s={},a=document.location.hash||document.location.search||"";if(this.replaceState_&&!a&&this._localStorage)try{a=localStorage["ol@permalink"]}catch(t){console.warn("Failed to access localStorage...")}if(a){a=a.replace(/(^#|^\?)/,"").split("&");for(var l=0;ll.height?"landscape":"portrait"),"landscape"===p&&(c=[c[1],c[0]]);var d=Math.min((c[0]-2*u)/l.width,(c[1]-2*u)/l.height);n=d*l.width,r=d*l.height,s=[(c[0]-n)/2,(c[1]-r)/2]}try{a=l?l.toDataURL(e,o):null}catch(g){return void this.dispatchEvent({type:"error",canvas:l})}var g=Object.assign({type:"print",print:{format:h,orientation:p,unit:"mm",size:c,position:s,imageWidth:n,imageHeight:r},image:a,imageType:e,quality:o,canvas:l},t);this.dispatchEvent(g)}.bind(this)),this.getMap().render()}},ol.control.PrintDialog=function(t){t||(t={}),this._lang=t.lang||"en";var e=ol.ext.element.create("DIV",{className:(t.className||"ol-print")+" ol-unselectable ol-control"});ol.ext.element.create("BUTTON",{type:"button",title:t.title||"Print",click:function(){this.print()}.bind(this),parent:e}),ol.control.Control.call(this,{element:e}),t.openWindow&&this.on("print",function(t){t.canvas&&window.open().document.write('')}),t.target=ol.ext.element.create("DIV");var o=this._printCtrl=new ol.control.Print(t);o.on(["print","error","printing"],function(t){n.setAttribute("data-status",t.type),t.clipboard||this.dispatchEvent(t)}.bind(this)),this._compass=new ol.control.Compass({src:t.northImage||"compact",visible:!1,className:"olext-print-compass",style:new ol.style.Stroke({color:"#333",width:0})});var i=this._printDialog=new ol.control.Dialog({target:document.body,closeBox:!0,className:"ol-ext-print-dialog"}),n=i.getContentElement();this._input={};var r=ol.ext.element.create("DIV",{className:"ol-print-param",parent:n});this._pages=[ol.ext.element.create("DIV",{className:"ol-page"})];var s=ol.ext.element.create("DIV",{className:"ol-map",parent:this._pages[0]});ol.ext.element.create("DIV",{html:this._pages[0],className:"ol-print-map",parent:n}),ol.ext.element.create("H2",{html:this.i18n("title"),parent:r});var a=ol.ext.element.create("UL",{parent:r}),l=ol.ext.element.create("LI",{className:"ol-orientation",parent:a});this._input.orientation={list:l};var c,h=ol.ext.element.create("LABEL",{className:"portrait",parent:l});this._input.orientation.portrait=ol.ext.element.create("INPUT",{type:"radio",name:"ol-print-orientation",value:"portrait",checked:!0,on:{change:function(t){this.setOrientation(t.target.value)}.bind(this)},parent:h}),ol.ext.element.create("SPAN",{html:this.i18n("portrait"),parent:h}),h=ol.ext.element.create("LABEL",{className:"landscape",parent:l}),this._input.orientation.landscape=ol.ext.element.create("INPUT",{type:"radio",name:"ol-print-orientation",value:"landscape",on:{change:function(t){this.setOrientation(t.target.value)}.bind(this)},parent:h}),ol.ext.element.create("SPAN",{html:this.i18n("landscape"),parent:h}),l=ol.ext.element.create("LI",{html:ol.ext.element.create("LABEL",{html:this.i18n("size")}),className:"ol-size",parent:a});var p=this._input.size=ol.ext.element.create("SELECT",{on:{change:function(){this.setSize(p.value||C)}.bind(this)},parent:l});for(c in this.paperSize)ol.ext.element.create("OPTION",{html:c+(this.paperSize[c]?" - "+this.paperSize[c][0]+"x"+this.paperSize[c][1]+" mm":this.i18n("custom")),value:c,parent:p});l=ol.ext.element.create("LI",{html:ol.ext.element.create("LABEL",{html:this.i18n("margin")}),className:"ol-margin",parent:a});var u=this._input.margin=ol.ext.element.create("SELECT",{on:{change:function(){this.setMargin(u.value)}.bind(this)},parent:l});for(c in this.marginSize)ol.ext.element.create("OPTION",{html:this.i18n(c)+" - "+this.marginSize[c]+" mm",value:this.marginSize[c],parent:u});l=ol.ext.element.create("LI",{html:ol.ext.element.create("LABEL",{html:this.i18n("scale")}),className:"ol-scale",parent:a});var d=this._input.scale=ol.ext.element.create("SELECT",{on:{change:function(){this.setScale(parseInt(d.value))}.bind(this)},parent:l});Object.keys(this.scales).forEach(function(t){ol.ext.element.create("OPTION",{html:this.scales[t],value:t,parent:d})}.bind(this)),l=ol.ext.element.create("LI",{className:"ol-legend",parent:a});var g=ol.ext.element.createSwitch({html:this.i18n("legend"),checked:!1,on:{change:function(){T.legend.control.setCanvas(g.checked)}.bind(this)},parent:l});l=ol.ext.element.create("LI",{className:"ol-print-north",parent:a});var m=this._input.north=ol.ext.element.createSwitch({html:this.i18n("north"),checked:"checked",on:{change:function(){m.checked?this._compass.element.classList.add("ol-print-compass"):this._compass.element.classList.remove("ol-print-compass"),this.getMap().render()}.bind(this)},parent:l});l=ol.ext.element.create("LI",{className:"ol-print-title",parent:a});var f=ol.ext.element.createSwitch({html:this.i18n("mapTitle"),checked:!1,on:{change:function(t){T.title.control.setVisible(t.target.checked)}.bind(this)},parent:l}),y=ol.ext.element.create("INPUT",{type:"text",placeholder:this.i18n("mapTitle"),on:{keydown:function(t){13===t.keyCode&&t.preventDefault()},keyup:function(){T.title.control.setTitle(y.value)},change:function(){T.title.control.setTitle(y.value)}.bind(this)},parent:l}),v=ol.ext.element.create("DIV",{className:"ol-user-param",parent:r});l=ol.ext.element.create("LI",{className:"ol-saveas",parent:a});var _=ol.ext.element.create("DIV",{html:this.i18n("copied"),className:"ol-clipboard-copy",parent:l}),x=ol.ext.element.create("SELECT",{on:{change:function(){if(this.formats[x.value].clipboard)o.copyMap(this.formats[x.value],function(t){t&&(_.classList.add("visible"),setTimeout(function(){_.classList.remove("visible")},1e3))});else{var t="string"==typeof this.getSize()?this.getSize():null,e=Object.assign({format:t,size:t?this.paperSize[t]:null,orient:this.getOrientation(),margin:this.getMargin()},this.formats[x.value]);o.print(e)}x.value=""}.bind(this)},parent:l});ol.ext.element.create("OPTION",{html:this.i18n("saveas"),style:{display:"none"},value:"",parent:x}),this.formats.forEach(function(e,o){if(e.pdf){if(!1===t.pdf)return}else if(e.clipboard){if(!1===t.copy)return}else if(!1===t.save)return;ol.ext.element.create("OPTION",{html:this.i18n(e.title),value:o,parent:x})}.bind(this)),l=ol.ext.element.create("LI",{className:"ol-savelegend",parent:a});var b=ol.ext.element.create("DIV",{html:this.i18n("copied"),className:"ol-clipboard-copy",parent:l}),w=ol.ext.element.create("SELECT",{on:{change:function(){var t=T.legend.control.getLegend().getCanvas(),e=document.createElement("CANVAS");e.width=t.width,e.height=t.height;var o,i=e.getContext("2d");if(i.fillStyle="#fff",i.fillRect(0,0,e.width,e.height),i.drawImage(t,0,0),this.formats[w.value].clipboard)e.toBlob(function(t){try{navigator.clipboard.write([new window.ClipboardItem(Object.defineProperty({},t.type,{value:t,enumerable:!0}))]),b.classList.add("visible"),setTimeout(function(){b.classList.remove("visible")},1e3)}catch(t){}},"image/png");else try{o=e.toDataURL(this.formats[w.value].imageType,this.formats[w.value].quality);var n="string"==typeof this.getSize()?this.getSize():"A4",r=e.width/96*25.4,s=e.height/96*25.4,a=this.paperSize[n];"landscape"===this.getOrientation()&&(a=[a[1],a[0]]);var l=[(a[0]-r)/2,(a[1]-s)/2];this.dispatchEvent({type:"print",print:{legend:!0,format:n,orientation:this.getOrientation(),unit:"mm",size:this.paperSize[n],position:l,imageWidth:r,imageHeight:s},image:o,imageType:this.formats[w.value].imageType,pdf:this.formats[w.value].pdf,quality:this.formats[w.value].quality,canvas:e})}catch(t){}w.value=""}.bind(this)},parent:l});ol.ext.element.create("OPTION",{html:this.i18n("saveLegend"),style:{display:"none"},value:"",parent:w}),this.formats.forEach(function(t,e){ol.ext.element.create("OPTION",{html:this.i18n(t.title),value:e,parent:w})}.bind(this));var S,C,M,E=ol.ext.element.create("DIV",{className:"ol-ext-buttons",parent:r});ol.ext.element.create("BUTTON",{html:this.i18n("printBt"),type:"submit",click:function(t){t.preventDefault(),window.print()},parent:E}),ol.ext.element.create("BUTTON",{html:this.i18n("cancel"),type:"button",click:function(){i.hide()},parent:E}),ol.ext.element.create("DIV",{html:this.i18n("errorMsg"),className:"ol-error",parent:r});var T={};i.on("show",function(){this.dispatchEvent({type:"show",userElement:v,dialog:this._printDialog,page:this.getPage()});var t=this.getMap();t&&(document.body.classList.add("ol-print-document"),S=t.getTargetElement(),C=t.getSize(),"string"==typeof this.getSize()?this.setSize(this.getSize()):this.setSize(C),t.setTarget(s),M&&ol.Observable.unByKey(M),M=t.on("moveend",function(){this.setScale(ol.sphere.getMapScale(t))}.bind(this)),this.setScale(ol.sphere.getMapScale(t)),T={},this.getMap().getControls().forEach(function(t){t instanceof ol.control.Legend&&(T.legend={control:t}),t instanceof ol.control.CanvasTitle&&(T.title={control:t}),t instanceof ol.control.Compass&&(T.compass?t.element.classList.remove("ol-print-compass"):(this._input.north.checked?t.element.classList.add("ol-print-compass"):t.element.classList.remove("ol-print-compass"),this._compass=t,T.compass={control:t}))}.bind(this)),T.title?(f.checked=T.title.isVisible=T.title.control.getVisible(),y.value=T.title.control.getTitle(),f.parentNode.parentNode.classList.remove("hidden")):f.parentNode.parentNode.classList.add("hidden"),T.legend?(T.legend.ison=T.legend.control.onCanvas(),T.legend.collapsed=T.legend.control.isCollapsed(),T.legend.control.collapse(!1),w.parentNode.classList.remove("hidden"),g.parentNode.parentNode.classList.remove("hidden"),g.checked=!T.legend.collapsed,T.legend.control.setCanvas(!T.legend.collapsed)):(w.parentNode.classList.add("hidden"),g.parentNode.parentNode.classList.add("hidden")))}.bind(this)),i.on("hide",function(){document.body.classList.remove("ol-print-document"),S&&(this.getMap().setTarget(S),S=null,M&&ol.Observable.unByKey(M),T.title&&T.title.control.setVisible(T.title.isVisible),T.legend&&(T.legend.control.setCanvas(T.legend.ison),T.legend.control.collapse(T.legend.collapsed)),this.dispatchEvent({type:"hide"}))}.bind(this)),window.addEventListener("resize",function(){this.setSize()}.bind(this)),t.saveAs&&this.on("print",function(e){e.pdf||e.canvas.toBlob(function(o){var i=(e.print.legend?"legend.":"map.")+e.imageType.replace("image/","");t.saveAs(o,i)},e.imageType,e.quality)}),t.jsPDF&&this.on("print",function(e){if(e.pdf){var o=new t.jsPDF({orientation:e.print.orientation,unit:e.print.unit,format:e.print.size});o.addImage(e.image,"JPEG",e.print.position[0],e.print.position[0],e.print.imageWidth,e.print.imageHeight),o.save(e.print.legend?"legend.pdf":"map.pdf")}})},ol.ext.inherits(ol.control.PrintDialog,ol.control.Control),ol.control.PrintDialog.prototype.isOpen=function(){return this._printDialog.isOpen()},ol.control.PrintDialog.addLang=function(t,e){ol.control.PrintDialog.prototype._labels[t]=e},ol.control.PrintDialog.prototype.i18n=function(t){var e=this._labels.en[t]||"bad param";return this._labels[this._lang]&&this._labels[this._lang][t]&&(e=this._labels[this._lang][t]),e},ol.control.PrintDialog.prototype._labels={en:{title:"Print",orientation:"Orientation",portrait:"Portrait",landscape:"Landscape",size:"Page size",custom:"screen size",margin:"Margin",scale:"Scale",legend:"Legend",north:"North arrow",mapTitle:"Map title",saveas:"Save as...",saveLegend:"Save legend...",copied:"✔ Copied to clipboard",errorMsg:"Can't save map canvas...",printBt:"Print...",clipboardFormat:"copy to clipboard...",jpegFormat:"save as jpeg",pngFormat:"save as png",pdfFormat:"save as pdf",none:"none",small:"small",large:"large",cancel:"cancel"},fr:{title:"Imprimer",orientation:"Orientation",portrait:"Portrait",landscape:"Paysage",size:"Taille du papier",custom:"taille écran",margin:"Marges",scale:"Echelle",legend:"Légende",north:"Flèche du nord",mapTitle:"Titre de la carte",saveas:"Enregistrer sous...",saveLegend:"Enregistrer la légende...",copied:"✔ Carte copiée",errorMsg:"Impossible d'enregistrer la carte",printBt:"Imprimer",clipboardFormat:"copier dans le presse-papier...",jpegFormat:"enregistrer un jpeg",pngFormat:"enregistrer un png",pdfFormat:"enregistrer un pdf",none:"aucune",small:"petites",large:"larges",cancel:"annuler"},de:{title:"Drucken",orientation:"Ausrichtung",portrait:"Hochformat",landscape:"Querformat",size:"Papierformat",custom:"Bildschirmgröße",margin:"Rand",scale:"Maßstab",legend:"Legende",north:"Nordpfeil",mapTitle:"Kartentitel",saveas:"Speichern als...",saveLegend:"Legende speichern...",copied:"✔ In die Zwischenablage kopiert",errorMsg:"Kann Karte nicht speichern...",printBt:"Drucken...",clipboardFormat:"in die Zwischenablage kopieren...",jpegFormat:"speichern als jpeg",pngFormat:"speichern als png",pdfFormat:"speichern als pdf",none:"kein",small:"klein",large:"groß",cancel:"abbrechen"},zh:{title:"打印",orientation:"方向",portrait:"纵向",landscape:"横向",size:"页面大小",custom:"屏幕大小",margin:"外边距",scale:"尺度",legend:"图例",north:"指北针",mapTitle:"地图名字",saveas:"保存为...",saveLegend:"保存图例为...",copied:"✔ 已复制到剪贴板",errorMsg:"无法保存地图...",printBt:"打印...",cancel:"取消"}},ol.control.PrintDialog.prototype.paperSize={"":null,A0:[841,1189],A1:[594,841],A2:[420,594],A3:[297,420],A4:[210,297],A5:[148,210],B4:[257,364],B5:[182,257]},ol.control.PrintDialog.prototype.marginSize={none:0,small:5,large:10},ol.control.PrintDialog.prototype.formats=[{title:"clipboardFormat",imageType:"image/png",clipboard:!0},{title:"jpegFormat",imageType:"image/jpeg",quality:.8},{title:"pngFormat",imageType:"image/png",quality:.8},{title:"pdfFormat",imageType:"image/jpeg",pdf:!0}],ol.control.PrintDialog.prototype.scales={" 5000":"1/5.000"," 10000":"1/10.000"," 25000":"1/25.000"," 50000":"1/50.000"," 100000":"1/100.000"," 250000":"1/250.000"," 1000000":"1/1.000.000"},ol.control.PrintDialog.prototype.getOrientation=function(){return this._orientation||"portrait"},ol.control.PrintDialog.prototype.setOrientation=function(t){this._orientation="landscape"===t?"landscape":"portrait",this._input.orientation[this._orientation].checked=!0,this.setSize()},ol.control.PrintDialog.prototype.getMargin=function(){return this._margin||0},ol.control.PrintDialog.prototype.setMargin=function(t){this._margin=t,this._input.margin.value=t,this.setSize()},ol.control.PrintDialog.prototype.getSize=function(){return this._size},ol.control.PrintDialog.prototype.setSize=function(t){if(this._printDialog.getContentElement().setAttribute("data-status",""),t?this._size=t:t=this._size,t){"string"==typeof t?(t=t.toLocaleUpperCase(),this.paperSize[t]||(t=this._size="A4"),this._input.size.value=t,t=[Math.trunc(96*this.paperSize[t][0]/25.4),Math.trunc(96*this.paperSize[t][1]/25.4)],"landscape"===this.getOrientation()&&(t=[t[1],t[0]]),this.getPage().classList.remove("margin")):(this._input.size.value="",this.getPage().classList.add("margin"));var e=this.getPage(),o=e.parentNode.getBoundingClientRect(),i=(o.width-40)/t[0],n=(o.height-40)/t[1],r=Math.min(i,n,1);e.style.width=t[0]+"px",e.style.height=t[1]+"px",e.style["-webkit-transform"]=e.style.transform="translate(-50%,-50%) scale("+r+")";var s=Math.round(5/r);e.style["-webkit-box-shadow"]=e.style["box-shadow"]=s+"px "+s+"px "+s+"px rgba(0,0,0,.6)",e.style.padding=96*this.getMargin()/25.4+"px",this.getMap()&&this.getMap().updateSize(),this.dispatchEvent({type:"dialog:refresh"})}},ol.control.PrintDialog.prototype.getContentElement=function(){return this._printDialog.getContentElement()},ol.control.PrintDialog.prototype.getUserElement=function(){return this._printDialog.getContentElement().querySelector(".ol-user-param")},ol.control.PrintDialog.prototype.getPage=function(){return this._pages[0]},ol.control.PrintDialog.prototype.setMap=function(t){this.getMap()&&(this.getMap().removeControl(this._compass),this.getMap().removeControl(this._printCtrl),this.getMap().removeControl(this._printDialog)),ol.control.Control.prototype.setMap.call(this,t),this.getMap()&&(this.getMap().addControl(this._compass),this.getMap().addControl(this._printCtrl),this.getMap().addControl(this._printDialog))},ol.control.PrintDialog.prototype.setScale=function(t){ol.sphere.setMapScale(this.getMap(),t),this._input.scale.value=" "+100*Math.round(t/100)},ol.control.PrintDialog.prototype.getScale=function(){return ol.sphere.getMapScale(this.getMap())},ol.control.PrintDialog.prototype.print=function(t){(t=t||{}).size&&this.setSize(t.size),t.scale&&this.setScale(t.scale),t.orientation&&this.setOrientation(t.orientation),t.margin&&this.setMargin(t.margin),this._printDialog.show()},ol.control.PrintDialog.prototype.getrintControl=function(){return this._printCtrl},ol.control.Profil=function(t){t=t||{},this.info=t.info||ol.control.Profil.prototype.info;var e,o=this;if(t.target)(e=document.createElement("div")).classList.add(t.className||"ol-profil");else{(e=document.createElement("div")).className=((t.className||"ol-profil")+" ol-unselectable ol-control ol-collapsed").trim(),this.button=document.createElement("button"),this.button.title=t.title||"Profile",this.button.setAttribute("type","button");var i=function(t){o.toggle(),t.preventDefault()};this.button.addEventListener("click",i),this.button.addEventListener("touchstart",i),e.appendChild(this.button)}t.style instanceof ol.style.Style?this._style=t.style:this._style=new ol.style.Style({text:new ol.style.Text,stroke:new ol.style.Stroke({width:1.5,color:"#369"})}),this._style.getText()||this._style.setText(new ol.style.Text),t.selectStyle instanceof ol.style.Style?this._selectStyle=t.selectStyle:this._selectStyle=new ol.style.Style({fill:new ol.style.Fill({color:"#369"})});var n=document.createElement("div");n.classList.add("ol-inner"),e.appendChild(n);var r=document.createElement("div");r.style.position="relative",n.appendChild(r);var s=this.ratio=2;this.canvas_=document.createElement("canvas"),this.canvas_.width=(t.width||300)*s,this.canvas_.height=(t.height||150)*s;var a={msTransform:"scale(0.5,0.5)",msTransformOrigin:"0 0",webkitTransform:"scale(0.5,0.5)",webkitTransformOrigin:"0 0",mozTransform:"scale(0.5,0.5)",mozTransformOrigin:"0 0",transform:"scale(0.5,0.5)",transformOrigin:"0 0"};Object.keys(a).forEach(function(t){t in o.canvas_.style&&(o.canvas_.style[t]=a[t])});var l=document.createElement("div");r.appendChild(l),l.style.width=this.canvas_.width/s+"px",l.style.height=this.canvas_.height/s+"px",l.appendChild(this.canvas_),l.addEventListener("pointerdown",this.onMove.bind(this)),document.addEventListener("pointerup",this.onMove.bind(this)),l.addEventListener("mousemove",this.onMove.bind(this)),l.addEventListener("touchmove",this.onMove.bind(this)),ol.control.Control.call(this,{element:e,target:t.target}),this.set("selectable",t.selectable),this.margin_={top:10*s,left:45*s,bottom:30*s,right:10*s},this.info.ytitle||(this.margin_.left-=20*s),this.info.xtitle||(this.margin_.bottom-=20*s),this.bar_=document.createElement("div"),this.bar_.classList.add("ol-profilbar"),this.bar_.style.top=this.margin_.top/s+"px",this.bar_.style.height=(this.canvas_.height-this.margin_.top-this.margin_.bottom)/s+"px",r.appendChild(this.bar_),this.cursor_=document.createElement("div"),this.cursor_.classList.add("ol-profilcursor"),r.appendChild(this.cursor_),this.popup_=document.createElement("div"),this.popup_.classList.add("ol-profilpopup"),this.cursor_.appendChild(this.popup_);var c=document.createElement("table");c.cellPadding="0",c.cellSpacing="0",c.style.clientWidth=this.canvas_.width/s+"px",r.appendChild(c);var h=document.createElement("tr");h.classList.add("track-info"),c.appendChild(h);var p=document.createElement("td");p.innerHTML=(this.info.zmin||"Zmin")+': ',h.appendChild(p);var u=document.createElement("td");u.innerHTML=(this.info.zmax||"Zmax")+': ',h.appendChild(u);var d=document.createElement("td");d.innerHTML=(this.info.distance||"Distance")+': ',h.appendChild(d);var g=document.createElement("td");g.innerHTML=(this.info.time||"Time")+': ',h.appendChild(g);var m=document.createElement("tr");m.classList.add("point-info"),c.appendChild(m);var f=document.createElement("td");f.innerHTML=(this.info.altitude||"Altitude")+': ',m.appendChild(f);var y=document.createElement("td");y.innerHTML=(this.info.distance||"Distance")+': ',m.appendChild(y);var v,_,x=document.createElement("td");(x.innerHTML=(this.info.time||"Time")+': ',m.appendChild(x),this.tab_=[],t.feature&&this.setGeometry(t.feature),t.zoomable)&&(this.set("selectable",!0),this.on("change:geometry",function(){_=null}),this.on("dragstart",function(t){v=t.index}),this.on("dragend",function(t){if(Math.abs(v-t.index)>10){if(!_)var o=ol.ext.element.create("BUTTON",{parent:e,className:"ol-zoom-out",click:function(t){t.stopPropagation(),t.preventDefault(),_&&(this.dispatchEvent({type:"zoom"}),this.setGeometry(_,this._geometry[1])),e.removeChild(o)}.bind(this)});var i=_||this._geometry[0],n=new ol.geom.LineString(this.getSelection(v,t.index));this.setGeometry(n,this._geometry[1]),_=i,this.dispatchEvent({type:"zoom",geometry:n,start:v,end:t.index})}}.bind(this)))},ol.ext.inherits(ol.control.Profil,ol.control.Control),ol.control.Profil.prototype.info={zmin:"Zmin",zmax:"Zmax",ytitle:"Altitude (m)",xtitle:"Distance (km)",time:"Time",altitude:"Altitude",distance:"Distance",altitudeUnits:"m",distanceUnitsM:"m",distanceUnitsKM:"km"},ol.control.Profil.prototype.popup=function(t){this.popup_.innerHTML=t},ol.control.Profil.prototype._drawAt=function(t,e){t?(this.cursor_.style.left=e+"px",this.cursor_.style.top=(this.canvas_.height-this.margin_.bottom+t[1]*this.scale_[1]+this.dy_)/this.ratio+"px",this.cursor_.style.display="block",this.bar_.parentElement.classList.add("over"),this.bar_.style.left=e+"px",this.bar_.style.display="block",this.element.querySelector(".point-info .z").textContent=t[1]+this.info.altitudeUnits,this.element.querySelector(".point-info .dist").textContent=(t[0]/1e3).toFixed(1)+this.info.distanceUnitsKM,this.element.querySelector(".point-info .time").textContent=t[2],e>this.canvas_.width/this.ratio/2?this.popup_.classList.add("ol-left"):this.popup_.classList.remove("ol-left")):(this.cursor_.style.display="none",this.bar_.style.display="none",this.cursor_.style.display="none",this.bar_.parentElement.classList.remove("over"))},ol.control.Profil.prototype.showAt=function(t){var e,o,i,n=1/0;if(void 0===t)this.bar_.parentElement.classList.contains("over")&&this._drawAt();else if(t.length)for(e=1;o=this.tab_[e];e++){var r=ol.coordinate.dist2d(o[3],t);r=t));e++);if(i){var s=(i[0]*this.scale_[0]+this.margin_.left)/this.ratio;return this._drawAt(i,s),i[3]}return null},ol.control.Profil.prototype.showAtTime=function(t,e){var o,i,n;if(t instanceof Date?t=t.getTime()/1e3:e&&(t+=this.tab_[0][3][3]),void 0===t)this.bar_.parentElement.classList.contains("over")&&this._drawAt();else for(o=0;(i=this.tab_[o])&&(n=i,!(i[3][3]>=t));o++);if(n){var r=(n[0]*this.scale_[0]+this.margin_.left)/this.ratio;return this._drawAt(n,r),n[3]}return null},ol.control.Profil.prototype.pointAtTime=function(t){var e,o;for(e=1;o=this.tab_[e];e++){var i=o[3][3];if(i>=t){var n=this.tab_[e-1][3];return(n[3]+i)/2this.margin_.left/l-20&&s<(this.canvas_.width-this.margin_.right)/l+8&&a>this.margin_.top/l&&a<(this.canvas_.height-this.margin_.bottom)/l){var c,h,p=(s*l-this.margin_.left)/this.scale_[0],u=this.tab_[0];for(c=1;h=this.tab_[c];c++)if(h[0]>=p){p<(h[0]+u[0])/2&&(c=0,h=u);break}switch(h||(h=this.tab_[this.tab_.length-1]),s=Math.max(this.margin_.left/l,Math.min(s,(this.canvas_.width-this.margin_.right)/l)),this._drawAt(h,s),this.dispatchEvent({type:"over",click:"click"===t.type,index:c,coord:h[3],time:h[2],distance:h[0]}),t.type){case"pointerdown":this._dragging={event:{type:"dragstart",index:c,coord:h[3],time:h[2],distance:h[0]},pageX:n,pageY:r};break;case"pointerup":this._dragging&&this._dragging.pageX?Math.abs(this._dragging.pageX-n)<3&&Math.abs(this._dragging.pageY-r)<3&&(this.dispatchEvent({type:"click",index:c,coord:h[3],time:h[2],distance:h[0]}),this.refresh()):this.dispatchEvent({type:"dragend",index:c,coord:h[3],time:h[2],distance:h[0]}),this._dragging=!1;break;default:if(this._dragging)if(this._dragging.pageX)(Math.abs(this._dragging.pageX-n)>3||Math.abs(this._dragging.pageY-r)>3)&&(this._dragging.pageX=this._dragging.pageY=!1,this.dispatchEvent(this._dragging.event));else{this.dispatchEvent({type:"dragging",index:c,coord:h[3],time:h[2],distance:h[0]});var d=Math.min(this._dragging.event.index,c),g=Math.max(this._dragging.event.index,c);this.refresh(),this.get("selectable")&&this._drawGraph(this.tab_.slice(d,g),this._selectStyle)}}}else this.bar_.parentElement.classList.contains("over")&&(this._drawAt(),this.dispatchEvent({type:"out"})),"pointerup"===t.type&&this._dragging&&(this.dispatchEvent({type:"dragcancel"}),this._dragging=!1)}},ol.control.Profil.prototype.show=function(){this.element.classList.remove("ol-collapsed"),this.dispatchEvent({type:"show",show:!0})},ol.control.Profil.prototype.hide=function(){this.element.classList.add("ol-collapsed"),this.dispatchEvent({type:"show",show:!1})},ol.control.Profil.prototype.toggle=function(){this.element.classList.toggle("ol-collapsed");var t=this.element.classList.contains("ol-collapsed");this.dispatchEvent({type:"show",show:!t})},ol.control.Profil.prototype.isShown=function(){return!this.element.classList.contains("ol-collapsed")},ol.control.Profil.prototype.getSelection=function(t,e){for(var o=[],i=Math.max(Math.min(t,e),0),n=Math.min(Math.max(t,e),this.tab_.length-1),r=i;r<=n;r++)o.push(this.tab_[r][3]);return o},ol.control.Profil.prototype._drawGraph=function(t,e){if(t.length){var o,i,n=this.canvas_.getContext("2d"),r=this.scale_[0],s=this.scale_[1],a=this.dy_,l=this.ratio;for(n.beginPath(),o=0;i=t[o];o++)0==o?n.moveTo(i[0]*r,i[1]*s+a):n.lineTo(i[0]*r,i[1]*s+a);e.getStroke()&&(n.strokeStyle=e.getStroke().getColor()||"#000",n.lineWidth=e.getStroke().getWidth()*l,n.setLineDash([]),n.stroke()),e.getFill()&&(n.fillStyle=e.getFill().getColor()||"#000",n.Style=e.getFill().getColor()||"#000",n.lineTo(t[t.length-1][0]*r,0),n.lineTo(t[0][0]*r,0),n.fill())}},ol.control.Profil.prototype.setGeometry=function(t,e){if(e||(e={}),t instanceof ol.Feature&&(t=t.getGeometry()),this._geometry=[t,e],/Z/.test(t.getLayout())){/M/.test(t.getLayout())?this.element.querySelector(".time").parentElement.style.display="block":this.element.querySelector(".time").parentElement.style.display="none";var o=t.getCoordinates();switch(t.getType()){case"LineString":break;case"MultiLineString":o=o[0];break;default:return}var i,n,r,s,a,l,c,h=e.projection||this.getMap().getView().getProjection(),p=1/0,u=-1/0,d=this.tab_=[];for(i=0;n=o[i];i++)(s=n[2])u&&(u=s),0==i?r=0:r+=(l=o[i-1],c=n,ol.sphere.getDistance(ol.proj.transform(l,h,"EPSG:4326"),ol.proj.transform(c,h,"EPSG:4326"))),a=g(o[0][3],n[3]),d.push([r,s,a,n]);this._z=[p,u],this.set("graduation",e.graduation||100),this.set("zmin",e.zmin),this.set("zmax",e.zmax),this.set("amplitude",e.amplitude),this.set("unit",e.unit),this.set("zunit",e.zunit),this.set("zDigits",e.zDigits),this.set("zMaxChars",e.zMaxChars),this.dispatchEvent({type:"change:geometry",geometry:t}),this.refresh()}function g(t,e){if(!t||!e)return"-";var o=(e-t)/60,i=Math.trunc(o/60),n=Math.trunc(o-60*i);return i+"h"+(n<10?"0":"")+n+"mn"}},ol.control.Profil.prototype.refresh=function(){var t=this.canvas_,e=t.getContext("2d"),o=t.width,i=t.height;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,o,i);var n,r=this._z[0],s=this._z[1],a=this.tab_,l=a[a.length-1][0],c=a[a.length-1][2];if(l){e.setTransform(1,0,0,1,this.margin_.left,i-this.margin_.bottom);var h=this.ratio;o-=this.margin_.right+this.margin_.left,i-=this.margin_.top+this.margin_.bottom,e.strokeStyle=this._style.getText().getFill().getColor()||"#000",e.lineWidth=.5*h,e.beginPath(),e.moveTo(0,0),e.lineTo(0,-i),e.moveTo(0,0),e.lineTo(o,0),e.stroke(),this.element.querySelector(".track-info .zmin").textContent=r.toFixed(2)+this.info.altitudeUnits,this.element.querySelector(".track-info .zmax").textContent=s.toFixed(2)+this.info.altitudeUnits,this.element.querySelector(".track-info .dist").textContent=l>1e3?(l/1e3).toFixed(1)+this.info.distanceUnitsKM:l.toFixed(1)+this.info.distanceUnitsM,this.element.querySelector(".track-info .time").textContent=c;for(var p=this.get("graduation");;){if(!(i/(((s=Math.ceil(s/p)*p)-(r=Math.floor(r/p)*p))/p)<15*h))break;p*=2}"number"==typeof this.get("zmin")&&r>this.get("zmin")&&(r=this.get("zmin")),"number"==typeof this.get("zmax")&&s1e3?(C=100*Math.round(l/1e3))>1e3&&(C=1e3*Math.ceil(C/1e3)):(M="m",C=l>100?10*Math.round(l/100):l>10?Math.round(l/10):l>1?Math.round(l)/10:l),n=0;n<=l;n+=C){var E="m"==M?n:n/1e3;e.fillText(Math.round(10*E)/10,n*d,4*h),e.moveTo(n*d,2*h),e.lineTo(n*d,0)}e.font=12*h+"px arial",e.fillText(this.info.xtitle.replace("(km)","("+M+")"),o/2,18*h),e.save(),e.rotate(-Math.PI/2),e.fillText(this.info.ytitle,i/2,-this.margin_.left),e.restore(),e.stroke()}else console.error("[ol/control/Profil] no data...",a)},ol.control.Profil.prototype.getImage=function(t,e){return"canvas"===t?this.canvas_:this.canvas_.toDataURL(t,e)},ol.control.ProgressBar=function(t){t=t||{};var e=ol.ext.element.create("DIV",{className:((t.className||"")+" ol-progress-bar ol-unselectable ol-control").trim()});this._waiting=ol.ext.element.create("DIV",{html:t.label||"",className:"ol-waiting",parent:e}),this._bar=ol.ext.element.create("DIV",{className:"ol-bar",parent:e}),ol.control.Control.call(this,{element:e,target:t.target}),this._layerlistener=[],this.setLayers(t.layers)},ol.ext.inherits(ol.control.ProgressBar,ol.control.Control),ol.control.ProgressBar.prototype.setPercent=function(t){this._bar.style.width=100*(Number(t)||0)+"%",void 0===t?ol.ext.element.hide(this.element):ol.ext.element.show(this.element)},ol.control.ProgressBar.prototype.setLabel=function(t){this._waiting.innerHTML=t},ol.control.ProgressBar.prototype.setLayers=function(t){this._layerlistener.forEach(function(t){ol.Observable.unByKey(t)}),this._layerlistener=[],this.setPercent();var e,o=0,i=0;(t instanceof ol.layer.Layer&&(t=[t]),t&&t.forEach)&&t.forEach(function(t){t instanceof ol.layer.Layer&&(this._layerlistener.push(t.getSource().on("tileloadstart",function(){o++,this.setPercent(i/o),clearTimeout(e)}.bind(this))),this._layerlistener.push(t.getSource().on(["tileloadend","tileloaderror"],function(){++i===o?(o=i=0,this.setPercent(1),e=setTimeout(this.setPercent.bind(this),300)):this.setPercent(i/o)}.bind(this))))}.bind(this))},ol.control.RoutingGeoportail=function(t){var e=this;t||(t={}),null==t.typing&&(t.typing=300),t.apiKey=t.apiKey||"itineraire",t.search||(t.search={}),t.search.apiKey=t.search.apiKey||"essentiels",this._classname=t.className||"search",this._source=new ol.source.Vector,this._auth=t.authentication;var o=document.createElement("DIV"),i=(t.className||"")+" ol-routing";(t.target||(i+=" ol-unselectable ol-control"),o.setAttribute("class",i),t.target)||ol.ext.element.create("BUTTON",{parent:o}).addEventListener("click",function(){o.classList.toggle("ol-collapsed")});ol.control.Control.call(this,{element:o,target:t.target}),this.set("url","https://wxs.ign.fr/calcul/geoportail/"+t.apiKey+"/rest/1.0.0/route");var n=ol.ext.element.create("DIV",{className:"content",parent:o}),r=ol.ext.element.create("DIV",{className:"search-input",parent:n});this._search=[],this.addSearch(r,t),this.addSearch(r,t),ol.ext.element.create("I",{className:"ol-car",title:t.carlabel||"by car",parent:n}).addEventListener("click",function(){e.setMode("car")}),ol.ext.element.create("I",{className:"ol-pedestrian",title:t.pedlabel||"pedestrian",parent:n}).addEventListener("click",function(){e.setMode("pedestrian")}),ol.ext.element.create("I",{className:"ol-ok",title:t.runlabel||"search",html:"OK",parent:n}).addEventListener("click",function(){e.calculate()}),ol.ext.element.create("I",{className:"ol-cancel",html:"cancel",parent:n}).addEventListener("click",function(){this.resultElement.innerHTML=""}.bind(this)),this.resultElement=document.createElement("DIV"),this.resultElement.setAttribute("class","ol-result"),o.appendChild(this.resultElement),this.setMode(t.mode||"car"),this.set("timeout",t.timeout||2e4)},ol.ext.inherits(ol.control.RoutingGeoportail,ol.control.Control),ol.control.RoutingGeoportail.prototype.setMode=function(t,e){this.set("mode",t),this.element.querySelector(".ol-car").classList.remove("selected"),this.element.querySelector(".ol-pedestrian").classList.remove("selected"),this.element.querySelector(".ol-"+t).classList.add("selected"),e||this.calculate()},ol.control.RoutingGeoportail.prototype.setMethod=function(t,e){this.set("method",t),e||this.calculate()},ol.control.RoutingGeoportail.prototype.addButton=function(t,e,o){var i=document.createElement("I");return i.setAttribute("class",t),i.setAttribute("type","button"),i.setAttribute("title",e),i.innerHTML=o||"",this.element.appendChild(i),i},ol.control.RoutingGeoportail.prototype.getSource=function(){return this._source},ol.control.RoutingGeoportail.prototype._resetArray=function(t){this._search=[];var e=t.parentNode.querySelectorAll(".search-input > div");e.forEach(function(t){t.olsearch&&(t.olsearch.get("feature")&&(t.olsearch.get("feature").set("step",this._search.length),0===this._search.length?t.olsearch.get("feature").set("pos","start"):this._search.length===e.length-1?t.olsearch.get("feature").set("pos","end"):t.olsearch.get("feature").set("pos","")),this._search.push(t.olsearch))}.bind(this))},ol.control.RoutingGeoportail.prototype.removeSearch=function(t,e,o){t.removeChild(o),o.olsearch.get("feature")&&this._source.removeFeature(o.olsearch.get("feature")),this.getMap()&&this.getMap().removeControl(o.olsearch),this._resetArray(t)},ol.control.RoutingGeoportail.prototype.addSearch=function(t,e,o){var i=this,n=ol.ext.element.create("DIV");o?t.insertBefore(n,o.nextSibling):t.appendChild(n),ol.ext.element.create("BUTTON",{title:e.startlabel||"add/remove",parent:n}).addEventListener("click",function(o){o.ctrlKey?this._search.length>2&&this.removeSearch(t,e,n):o.shiftKey&&this.addSearch(t,e,n)}.bind(this));var r=n.olsearch=new ol.control.SearchGeoportail({className:"IGNF ol-collapsed",apiKey:e.search.apiKey,authentication:e.search.authentication,target:n,reverse:!0});r._changeCounter=0,this._resetArray(t),r.on("select",function(t){r.setInput(t.search.fulltext);var e=r.get("feature");e?(r.checkgeom=!1,t.silent||e.getGeometry().setCoordinates(t.coordinate),r.checkgeom=!0):(e=new ol.Feature(new ol.geom.Point(t.coordinate)),r.set("feature",e),this._source.addFeature(e),r.checkgeom=!0,e.getGeometry().on("change",function(){r.checkgeom&&this.onGeometryChange(r,e)}.bind(this))),e.set("name",r.getTitle(t.search)),e.set("step",this._search.indexOf(r)),0===e.get("step")?e.set("pos","start"):e.get("step")===this._search.length-1&&e.set("pos","end"),r.set("selection",t.search)}.bind(this)),r.element.querySelector("input").addEventListener("change",function(){r.set("selection",null),i.resultElement.innerHTML=""}),this.getMap()&&this.getMap().addControl(r)},ol.control.RoutingGeoportail.prototype.onGeometryChange=function(t,e,o){var i=ol.proj.transform(e.getGeometry().getCoordinates(),this.getMap().getView().getProjection(),"EPSG:4326");if(t._handleSelect({x:i[0],y:i[1],fulltext:i[0].toFixed(6)+","+i[1].toFixed(6)},!0,{silent:!0}),o){if(t._changeCounter--,!t._changeCounter)return void t.reverseGeocode(e.getGeometry().getCoordinates(),{silent:!0})}else t._changeCounter++,setTimeout(function(){this.onGeometryChange(t,e,!0)}.bind(this),1e3)},ol.control.RoutingGeoportail.prototype.setMap=function(t){ol.control.Control.prototype.setMap.call(this,t);for(var e=0;e"+r+(e?" - "+e:"")+"",on:{pointerenter:function(){this.dispatchEvent({type:"step:hover",hover:!1,index:o,feature:t})}.bind(this),pointerleave:function(){this.dispatchEvent({type:"step:hover",hover:!1,index:o,feature:t})}.bind(this)},click:function(){this.dispatchEvent({type:"step:select",index:o,feature:t})}.bind(this),parent:i})}.bind(this))},ol.control.RoutingGeoportail.prototype.handleResponse=function(t,e,o){if("ERROR"!==t.status){for(var i,n,r,s={type:"routing",features:[]},a=0,l=0,c=new ol.format.GeoJSON,h=0;r=t.portions[h];h++)for(var p,u=0;p=r.steps[u];u++){p.type="Feature",p.properties=p.attributes.name||p.attributes,p.properties.distance=p.distance,p.properties.duration=Math.round(60*p.duration),p.instruction&&(p.properties.instruction_type=p.instruction.type,p.properties.instruction_modifier=p.instruction.modifier),a+=p.distance,l+=p.duration,p.properties.distanceT=Math.round(100*a)/100,p.properties.durationT=Math.round(60*l),p.properties.name=p.properties.cpx_toponyme_route_nommee||p.properties.cpx_toponyme||p.properties.cpx_numero||p.properties.nom_1_droite||p.properties.nom_1_gauche||"";var d=p.geometry.coordinates[p.geometry.coordinates.length-1];n&&!ol.coordinate.equal(d,p.geometry.coordinates[p.geometry.coordinates.length-1])&&p.geometry.coordinates.unshift(n),n=p.geometry.coordinates[p.geometry.coordinates.length-1],i=c.readFeature(p,{featureProjection:this.getMap().getView().getProjection()}),s.features.push(i)}s.distance=parseFloat(t.distance),s.duration=parseFloat(t.duration)/60;var g=c.readGeometry(t.geometry,{featureProjection:this.getMap().getView().getProjection()});return s.feature=new ol.Feature({geometry:g,start:this._search[0].getTitle(e),end:this._search[0].getTitle(o),distance:s.distance,duration:s.duration}),this.dispatchEvent(s),this.path=s,s}this.dispatchEvent({type:"errror",status:"200",statusText:t.message})},ol.control.RoutingGeoportail.prototype.abort=function(){this._request&&(this._request.abort(),this._request=null,this.dispatchEvent({type:"abort"}))},ol.control.RoutingGeoportail.prototype.calculate=function(t){if(this.resultElement.innerHTML="",t){var e=[];t.forEach(function(t){e.push({x:t[0],y:t[1]})}),t=e}else{t=[];for(var o=0;o=200&&t.status<400?c.listRouting(c.handleResponse(JSON.parse(t.response),i,n)):this.dispatchEvent({type:"error",status:t.status,statusText:t.statusText})}.bind(this),function(t){this.dispatchEvent({type:"error",status:t.status,statusText:t.statusText})}.bind(this)),!0},ol.control.RoutingGeoportail.prototype.ajax=function(t,e,o){var i=this;this._request&&this._request.abort();var n=this._request=new XMLHttpRequest;n.open("GET",t,!0),n.timeout=this.get("timeout")||2e4,this._auth&&n.setRequestHeader("Authorization","Basic "+this._auth),this.element.classList.add("ol-searching"),n.onload=function(){i._request=null,i.element.classList.remove("ol-searching"),e.call(i,this)},n.ontimeout=function(){i._request=null,i.element.classList.remove("ol-searching"),o&&o.call(i,this)},n.onerror=function(){i._request=null,i.element.classList.remove("ol-searching"),o&&o.call(i,this)},n.send()},ol.control.Scale=function(t){t||(t={}),null==t.typing&&(t.typing=300);var e=document.createElement("DIV"),o=(t.className||"")+" ol-scale";t.target||(o+=" ol-unselectable ol-control"),this._input=document.createElement("INPUT"),this._input.value="-",e.setAttribute("class",o),!1===t.editable&&(this._input.readOnly=!0),e.appendChild(this._input),ol.control.Control.call(this,{element:e,target:t.target}),this._input.addEventListener("change",this.setScale.bind(this)),this.set("ppi",t.ppi||96)},ol.ext.inherits(ol.control.Scale,ol.control.Control),ol.control.Scale.prototype.setMap=function(t){this._listener&&ol.Observable.unByKey(this._listener),this._listener=null,ol.control.Control.prototype.setMap.call(this,t),t&&(this._listener=t.on("moveend",this.getScale.bind(this)))},ol.control.Scale.prototype.getScale=function(){var t=this.getMap();if(t){var e=ol.sphere.getMapScale(t,this.get("ppi"));return this._input.value=this.formatScale(e),e}},ol.control.Scale.prototype.formatScale=function(t){return"1 / "+(t=t>100?100*Math.round(t/100):Math.round(t)).toLocaleString()},ol.control.Scale.prototype.setScale=function(t){var e=this.getMap();e&&t&&(t.target&&(t=t.target.value),ol.sphere.setMapScale(e,t,this.get("ppi"))),this.getScale()},ol.control.SearchBAN=function(t){(t=t||{}).typing=t.typing||500,t.url=t.url||"https://api-adresse.data.gouv.fr/search/",t.className=t.className||"BAN",t.copy='© BAN-data.gouv.fr',ol.control.SearchPhoton.call(this,t),this.set("postcode",t.postcode),this.set("citycode",t.citycode),this.set("type",t.type)},ol.ext.inherits(ol.control.SearchBAN,ol.control.SearchPhoton),ol.control.SearchBAN.prototype.getTitle=function(t){return t.properties.label},ol.control.SearchBAN.prototype.select=function(t){var e=t.geometry.coordinates;try{e=ol.proj.transform(t.geometry.coordinates,"EPSG:4326",this.getMap().getView().getProjection())}catch(t){}this.dispatchEvent({type:"select",search:t,coordinate:e})},ol.control.SearchBAN.prototype.requestData=function(t){var e=ol.control.SearchPhoton.prototype.requestData.call(this,t);return e.postcode=this.get("postcode"),e.citycode=this.get("citycode"),e.type=this.get("type"),e},ol.control.SearchDFCI=function(t){t||(t={}),t.className=t.className||"dfci",t.placeholder=t.placeholder||"Code DFCI",ol.control.Search.call(this,t)},ol.ext.inherits(ol.control.SearchDFCI,ol.control.Search),ol.control.SearchDFCI.prototype.autocomplete=function(t){if((t=(t=t.toUpperCase()).replace(/[^0-9,^A-H,^K-N]/g,"")).length<2)return this.setInput(t),[];var e,o=this.getMap().getView().getProjection(),i=[],n=ol.coordinate.fromDFCI(t,o),r=Math.floor(t.length/2)-1,s=ol.coordinate.toDFCI(n,r,o);if(s=s.replace(/[^0-9,^A-H,^K-N]/g,""),!/NaN/.test(s)&&s){if(console.log("ok",s),this.setInput(s+t.substring(s.length,t.length)),i.push({coordinate:ol.coordinate.fromDFCI(s,o),name:s}),5===t.length)for(n=ol.coordinate.fromDFCI(t+0,o),s=ol.coordinate.toDFCI(n,r+1,o).substring(0,5),e=0;e<10;e++)i.push({coordinate:ol.coordinate.fromDFCI(s+e,o),name:s+e});if(2===r)for(e=0;e<6;e++)i.push({coordinate:ol.coordinate.fromDFCI(s+"."+e,o),name:s+"."+e})}return i},ol.control.SearchFeature=function(t){t||(t={}),t.className=t.className||"feature",ol.control.Search.call(this,t),"function"==typeof t.getSearchString&&(this.getSearchString=t.getSearchString),this.set("property",t.property||"name"),this.source_=t.source},ol.ext.inherits(ol.control.SearchFeature,ol.control.Search),ol.control.SearchFeature.prototype.restoreHistory=function(){this.set("history",[])},ol.control.SearchFeature.prototype.saveHistory=function(){try{localStorage.removeItem("ol@search-"+this._classname)}catch(t){console.warn("Failed to access localStorage...")}},ol.control.SearchFeature.prototype.getTitle=function(t){return t.get(this.get("property")||"name")},ol.control.SearchFeature.prototype.getSearchString=function(t){return this.getTitle(t)},ol.control.SearchFeature.prototype.getSource=function(){return this.source_},ol.control.SearchFeature.prototype.setSource=function(t){this.source_=t},ol.control.SearchFeature.prototype.autocomplete=function(t){var e=[];if(this.source_){t=t.replace(/^\*/,"");for(var o,i=new RegExp(t,"i"),n=this.source_.getFeatures(),r=this.get("maxItems"),s=0;o=n[s];s++){var a=this.getSearchString(o);if(void 0!==a&&i.test(a)&&(e.push(o),--r<=0))break}}return e},ol.control.SearchGPS=function(t){t||(t={}),t.className=(t.className||"")+" ol-searchgps",t.placeholder=t.placeholder||"lon,lat",ol.control.Search.call(this,t),this.geolocation=new ol.Geolocation({projection:"EPSG:4326",trackingOptions:{maximumAge:1e4,enableHighAccuracy:!0,timeout:6e5}}),ol.ext.element.create("BUTTON",{className:"ol-geoloc",title:"Locate with GPS",parent:this.element,click:function(){this.geolocation.setTracking(!0)}.bind(this)}),ol.ext.element.createSwitch({html:"decimal",after:"DMS",change:function(t){t.target.checked?this.element.classList.add("ol-dms"):this.element.classList.remove("ol-dms")}.bind(this),parent:this.element}),this._createForm();var e=this.element.querySelector("ul.autocomplete");this.element.appendChild(e)},ol.ext.inherits(ol.control.SearchGPS,ol.control.Search),ol.control.SearchGPS.prototype._createForm=function(){var t=function(t){if(t.target.classList.contains("ol-dms")&&(i.value=(n.value<0?-1:1)*Number(n.value)+Number(r.value)/60+Number(s.value)/3600,i.value=(n.value<0?-1:1)*Math.round(1e7*i.value)/1e7,a.value=(l.value<0?-1:1)*Number(l.value)+Number(c.value)/60+Number(h.value)/3600,a.value=(l.value<0?-1:1)*Math.round(1e7*a.value)/1e7),i.value||a.value?this._input.value=i.value+","+a.value:this._input.value="",!t.target.classList.contains("ol-dms")){var e=ol.coordinate.toStringHDMS([Number(i.value),Number(a.value)]),o=e.replace(/(N|S|E|W)/g,"").split("″");o[1]=o[1].trim().split(" "),n.value=(/W/.test(e)?-1:1)*parseInt(o[1][0]),r.value=parseInt(o[1][1]),s.value=parseInt(o[1][2]),o[0]=o[0].trim().split(" "),l.value=(/W/.test(e)?-1:1)*parseInt(o[0][0]),c.value=parseInt(o[0][1]),h.value=parseInt(o[0][2])}this.search()}.bind(this);function e(e,i){var n=ol.ext.element.create("INPUT",{className:e,type:"number",step:"any",lang:"en",parent:o,on:{"change keyup":t}});return i&&ol.ext.element.create("SPAN",{className:"ol-dms",html:i,parent:o}),n}var o=ol.ext.element.create("DIV",{className:"ol-longitude",parent:this.element});ol.ext.element.create("LABEL",{html:"Longitude",parent:o});var i=e("ol-decimal"),n=e("ol-dms","°"),r=e("ol-dms","'"),s=e("ol-dms",'"');o=ol.ext.element.create("DIV",{className:"ol-latitude",parent:this.element}),ol.ext.element.create("LABEL",{html:"Latitude",parent:o});var a=e("ol-decimal"),l=e("ol-dms","°"),c=e("ol-dms","'"),h=e("ol-dms",'"');this.button&&this.button.addEventListener("click",function(){i.focus()}),this.on("select",function(t){i.value=t.search.gps[0],a.value=t.search.gps[1]}.bind(this)),this.geolocation.on("change",function(){this.geolocation.setTracking(!1);var t=this.geolocation.getPosition();i.value=t[0],a.value=t[1],this._triggerCustomEvent("keyup",i)}.bind(this))},ol.control.SearchGPS.prototype.autocomplete=function(t){var e=[],o=t.split(",");o[0]=Number(o[0]),o[1]=Number(o[1]),(t=ol.coordinate.toStringHDMS(o))&&(t=t.replace(/(°|′|″) /g,"$1"));var i=ol.proj.transform([o[0],o[1]],"EPSG:4326",this.getMap().getView().getProjection());return e.push({gps:o,coordinate:i,name:t}),e},ol.control.SearchGeoportailParcelle=function(t){var e=this;t.type="Commune",t.className=(t.className?t.className:"")+" IGNF-parcelle ol-collapsed-list ol-collapsed-num",t.inputLabel="Commune",t.noCollapse=!0,t.placeholder=t.placeholder||"Choisissez une commune...",ol.control.SearchGeoportail.call(this,t),this.set("copy",null);var o=this.element,i=document.createElement("DIV");o.appendChild(i);var n,r=document.createElement("LABEL");r.innerText="Préfixe",i.appendChild(r),(r=document.createElement("LABEL")).innerText="Section",i.appendChild(r),(r=document.createElement("LABEL")).innerText="Numéro",i.appendChild(r),i.appendChild(document.createElement("BR")),this._inputParcelle={prefix:document.createElement("INPUT"),section:document.createElement("INPUT"),numero:document.createElement("INPUT")},this._inputParcelle.prefix.setAttribute("maxlength",3),this._inputParcelle.section.setAttribute("maxlength",2),this._inputParcelle.numero.setAttribute("maxlength",4);var s=function(){n&&clearTimeout(n),n=setTimeout(function(){e.autocompleteParcelle()},t.typing||0)};for(var a in this._inputParcelle)i.appendChild(this._inputParcelle[a]),this._inputParcelle[a].addEventListener("keyup",s),this._inputParcelle[a].addEventListener("blur",function(){n=setTimeout(function(){o.classList.add("ol-collapsed-num")},200)}),this._inputParcelle[a].addEventListener("focus",function(){clearTimeout(n),o.classList.remove("ol-collapsed-num")});this.activateParcelle(!1);var l=document.createElement("DIV");l.className="autocomplete-parcelle",o.appendChild(l);var c=document.createElement("UL");c.classList.add("autocomplete-parcelle"),l.appendChild(c),(c=document.createElement("UL")).classList.add("autocomplete-page"),l.appendChild(c),this._input.addEventListener("blur",function(){setTimeout(function(){o.classList.add("ol-collapsed-list")},200)}),this._input.addEventListener("focus",function(){o.classList.remove("ol-collapsed-list"),e._listParcelle([]),e._commune&&(e._commune=null,e._input.value="",e.drawList_()),e.activateParcelle(!1)}),this.on("select",this.selectCommune.bind(this)),this.set("pageSize",t.pageSize||5)},ol.ext.inherits(ol.control.SearchGeoportailParcelle,ol.control.SearchGeoportail),ol.control.SearchGeoportailParcelle.prototype.selectCommune=function(t){this._commune=t.search.insee,this._input.value=t.search.insee+" - "+t.search.fulltext,this.activateParcelle(!0),this._inputParcelle.numero.focus(),this.autocompleteParcelle()},ol.control.SearchGeoportailParcelle.prototype.setParcelle=function(t,e){this._inputParcelle.prefix.value=(t.Commune||"")+(t.CommuneAbsorbee||""),this._inputParcelle.section.value=t.Section||"",this._inputParcelle.numero.value=t.Numero||"",e&&this._triggerCustomEvent("keyup",this._inputParcelle.prefix)},ol.control.SearchGeoportailParcelle.prototype.activateParcelle=function(t){for(var e in this._inputParcelle)this._inputParcelle[e].readOnly=!t;t?this._inputParcelle.section.parentElement.classList.add("ol-active"):this._inputParcelle.section.parentElement.classList.remove("ol-active")},ol.control.SearchGeoportailParcelle.prototype.autocompleteParcelle=function(){function t(t,e,o){if(!t)return t;for(o=o||"0";t.length";this.ajax(this.get("url").replace("ols/apis/completion","geoportail/ols"),{xls:o},function(t){for(var o,i=(new DOMParser).parseFromString(t,"text/xml").getElementsByTagName("GeocodedAddress"),n=[],r=0;o=i[r];r++){for(var s,a=(o.getElementsByTagName("gml:pos")[0]||o.getElementsByTagName("pos")[0]).childNodes[0].nodeValue.split(" "),l=o.getElementsByTagName("Place"),c={lon:Number(a[1]),lat:Number(a[0])},h=0;s=l[h];h++)c[s.attributes.type.value]=s.childNodes[0].nodeValue;n.push(c)}e(n)},{dataType:"XML"})},ol.control.SearchGeoportailParcelle.prototype._listParcelle=function(t){var e=this,o=this.element.querySelector("ul.autocomplete-parcelle");o.innerHTML="";var i=this.element.querySelector("ul.autocomplete-page");function n(t){var e,n=o.children,r="ol-list-"+t;for(e=0;e1?"":"none"}i.innerHTML="",this._listParc=[],t.sort(function(t,e){var o=t.INSEE+t.CommuneAbsorbee+t.Section+t.Numero,i=e.INSEE+e.CommuneAbsorbee+e.Section+e.Numero;return o===i?0:o0&&l.classList.add("ol-list-"+Math.floor(a/s)),this._listParc.push(r),l.addEventListener("click",function(t){e._handleParcelle(e._listParc[t.currentTarget.getAttribute("data-search")])}),l.innerHTML=r.INSEE+r.CommuneAbsorbee+r.Section+r.Numero,o.appendChild(l),s>0&&!(a%s)&&((l=document.createElement("LI")).innerText=Math.floor(a/s),l.addEventListener("click",function(t){n(t.currentTarget.innerText)}),i.appendChild(l))}s>0&&n(0)},ol.control.SearchGeoportailParcelle.prototype._handleParcelle=function(t){this.dispatchEvent({type:"parcelle",search:t,coordinate:ol.proj.fromLonLat([t.lon,t.lat],this.getMap().getView().getProjection())})},ol.control.SearchNominatim=function(t){(t=t||{}).className=t.className||"nominatim",t.typing=t.typing||500,t.url=t.url||"https://nominatim.openstreetmap.org/search",t.copy='© OpenStreetMap contributors',ol.control.SearchJSON.call(this,t),this.set("polygon",t.polygon),this.set("viewbox",t.viewbox),this.set("bounded",t.bounded)},ol.ext.inherits(ol.control.SearchNominatim,ol.control.SearchJSON),ol.control.SearchNominatim.prototype.getTitle=function(t){var e=[];t.class&&e.push(t.class),t.type&&e.push(t.type);var o=t.display_name+(e.length?""+e.join(" - ")+"":"");return t.icon&&(o=""+o),o},ol.control.SearchNominatim.prototype.requestData=function(t){var e={format:"json",addressdetails:1,q:t,polygon_geojson:this.get("polygon")?1:0,bounded:this.get("bounded")?1:0,limit:this.get("maxItems")};return this.get("viewbox")&&(e.viewbox=this.get("viewbox")),e},ol.control.SearchNominatim.prototype.select=function(t){var e=[Number(t.lon),Number(t.lat)];try{e=ol.proj.transform(e,"EPSG:4326",this.getMap().getView().getProjection())}catch(t){}this.dispatchEvent({type:"select",search:t,coordinate:e})},ol.control.SearchJSON.prototype.handleResponse=function(t){return t.results||t},ol.control.SearchNominatim.prototype.reverseGeocode=function(t,e){var o=ol.proj.transform(t,this.getMap().getView().getProjection(),"EPSG:4326");this.ajax(this.get("url").replace("search","reverse"),{lon:o[0],lat:o[1],format:"json"},function(t){e?e.call(this,[t]):t&&!t.error&&this._handleSelect(t,!0)}.bind(this))},ol.control.SearchWikipedia=function(t){(t=t||{}).lang=t.lang||"en",t.className=t.className||"ol-search-wikipedia",t.url="https://"+t.lang+".wikipedia.org/w/api.php",t.placeholder=t.placeholder||"search string, File:filename",t.copy='Wikipedia® - CC-By-SA',ol.control.SearchJSON.call(this,t),this.set("lang",t.lang)},ol.ext.inherits(ol.control.SearchWikipedia,ol.control.SearchJSON),ol.control.SearchWikipedia.prototype.getTitle=function(t){return ol.ext.element.create("DIV",{html:t.title,title:t.desc})},ol.control.SearchWikipedia.prototype.setLang=function(t){this.set("lang",t),this.set("url","https://"+t+".wikipedia.org/w/api.php")},ol.control.SearchWikipedia.prototype.requestData=function(t){return{action:"opensearch",search:t,lang:this.get("lang"),format:"json",origin:"*",limit:this.get("maxItems")}},ol.control.SearchWikipedia.prototype.handleResponse=function(t){for(var e=[],o=0;o100));l++);var c=new RegExp(t,"i");for(var h in i)if("geometry"!==h&&c.test(h)){var p=document.createElement("li");p.textContent=h,p.addEventListener("click",function(){e.previousElementSibling.value=this.textContent;var t=document.createEvent("HTMLEvents");t.initEvent("change",!0,!1),e.previousElementSibling.dispatchEvent(t),e.classList.add("ol-hidden")}),e.appendChild(p)}},ol.control.Select.prototype._getLiCondition=function(t){var e=this,o=document.createElement("li"),i=document.createElement("div");i.classList.add("ol-autocomplete"),i.addEventListener("mouseleave",function(){this.querySelector("ul").classList.add("ol-hidden")}),o.appendChild(i);var n=document.createElement("input");n.classList.add("ol-attr"),n.setAttribute("type","search"),n.setAttribute("placeholder",this.get("attrPlaceHolder")),n.addEventListener("keyup",function(){e._autocomplete(this.value,this.nextElementSibling)}),n.addEventListener("focusout",function(){setTimeout(function(){i.querySelector("ul").classList.add("ol-hidden")},300)}),n.addEventListener("click",function(){setTimeout(function(){e._autocomplete(this.value,this.nextElementSibling),this.nextElementSibling.classList.remove("ol-hidden")}.bind(this))}),n.addEventListener("change",function(){e._conditions[t].attr=this.value}),n.value=e._conditions[t].attr,i.appendChild(n);var r=document.createElement("ul");r.classList.add("ol-hidden"),i.appendChild(r);var s=document.createElement("select");for(var a in o.appendChild(s),this.operationsList){var l=document.createElement("option");l.value=a,l.textContent=this.operationsList[a],s.appendChild(l)}s.value=e._conditions[t].op,s.addEventListener("change",function(){e._conditions[t].op=this.value});var c=document.createElement("input");if(c.setAttribute("type","text"),c.setAttribute("placeholder",this.get("valuePlaceHolder")),c.addEventListener("change",function(){e._conditions[t].val=this.value}),c.value=e._conditions[t].val,o.appendChild(c),this._conditions.length>1){var h=document.createElement("div");h.classList.add("ol-delete"),h.addEventListener("click",function(){e.removeCondition(t)}),o.appendChild(h)}return o},ol.control.Select.prototype.removeCondition=function(t){this._conditions.splice(t,1),this._drawlist()},ol.control.Select.prototype.doSelect=function(t){return(t=t||{}).useCase=t.useCase||this._useCase.checked,t.matchAll=t.matchAll||this._all.checked,t.conditions=t.conditions||this._conditions,ol.control.SelectBase.prototype.doSelect.call(this,t)},ol.control.SelectCheck=function(t){t||(t={});var e=t.content=ol.ext.element.create("DIV");t.label&&ol.ext.element.create("LABEL",{html:t.label,parent:e}),this._input=ol.ext.element.create("DIV",{parent:e}),t.className=t.className||"ol-select-check",ol.control.SelectBase.call(this,t),this.set("property",t.property||"name"),this.set("max",t.max||1e4),this.set("defaultLabel",t.defaultLabel),this.set("type",t.type),this._selectAll=t.selectAll,this._onchoice=t.onchoice,t.values?this.setValues({values:t.values,sort:!0}):this.setValues()},ol.ext.inherits(ol.control.SelectCheck,ol.control.SelectBase),ol.control.SelectCheck.prototype.setMap=function(t){ol.control.SelectBase.prototype.setMap.call(this,t),this.setValues()},ol.control.SelectCheck.prototype.doSelect=function(t){console.log("select"),t=t||{};var e=[];return this._checks.forEach(function(t){t.checked&&t.value&&e.push({attr:this.get("property"),op:"=",val:t.value})}.bind(this)),e.length?ol.control.SelectBase.prototype.doSelect.call(this,{features:t.features,conditions:e}):ol.control.SelectBase.prototype.doSelect.call(this,{features:t.features,matchAll:this._selectAll})},ol.control.SelectCheck.prototype.setValues=function(t){var e,o;if((t=t||{}).values)t.values instanceof Array?(o={},t.values.forEach(function(t){o[t]=t})):o=t.values;else{o={};var i=this.get("property");this.getSources().forEach(function(t){for(var e=t.getFeatures(),n=Math.min(e.length,this.get("max")),r=0;r "+t[o]+"
";ol.ext.element.setHTML(this.element,e)}else ol.ext.element.hide(this.element)},ol.control.Status.prototype.setPosition=function(t){this.element.classList.remove("ol-left"),this.element.classList.remove("ol-right"),this.element.classList.remove("ol-bottom"),this.element.classList.remove("ol-center"),/^left$|^right$|^bottom$|^center$/.test(t)&&this.element.classList.add("ol-"+t)},ol.control.Status.prototype.show=function(t){!1===t?ol.ext.element.hide(this.element):ol.ext.element.show(this.element)},ol.control.Status.prototype.hide=function(){ol.ext.element.hide(this.element)},ol.control.Status.prototype.toggle=function(){ol.ext.element.toggle(this.element)},ol.control.Status.prototype.isShown=function(){return"none"===this.element.style.display},ol.control.Storymap=function(t){t.target&&(t.html?t.html instanceof Element&&(t.html=t.html.innerHTML):t.html=t.target.innerHTML,t.target.innerHTML="");var e=ol.ext.element.create("DIV",{className:(t.className||"")+" ol-storymap"+(t.target?"":" ol-unselectable ol-control")});this.content=ol.ext.element.create("DIV",{parent:e}),ol.control.Control.call(this,{element:e,target:t.target}),ol.ext.element.scrollDiv(this.content,{vertical:!0,mousewheel:!0,minibar:t.minibar}),this.setStory(t.html)},ol.ext.inherits(ol.control.Storymap,ol.control.Control),ol.control.Storymap.prototype.setChapter=function(t){for(var e,o=this.content.querySelectorAll(".chapter"),i=0;e=o[i];i++)e.getAttribute("name")===t&&(this.content.scrollTop=e.offsetTop-30)},ol.control.Storymap.prototype.setStory=function(t){t instanceof Element?(this.content.innerHTML="",this.content.appendChild(t)):this.content.innerHTML=t,this.content.querySelectorAll(".chapter").forEach(function(t){t.addEventListener("click",function(e){t.classList.contains("ol-select")?"IMG"===e.target.tagName&&e.target.dataset.title&&this.dispatchEvent({coordinate:this.getMap()?this.getMap().getCoordinateFromPixel([e.layerX,e.layerY]):null,type:"clickimage",img:e.target,title:e.target.dataset.title,element:t,name:t.getAttribute("name"),originalEvent:e}):(this.content.scrollTop=t.offsetTop-30,e.preventDefault())}.bind(this))}.bind(this));var e=this.content.querySelectorAll(".ol-scroll-next");e.forEach(function(t){t.addEventListener("click",function(e){if(t.parentElement.classList.contains("ol-select")){for(var o,i=this.content.querySelectorAll(".chapter"),n=t.offsetTop,r=0;o=i[r];r++)if(o.offsetTop>n){n=o.offsetTop;break}this.content.scrollTop=n-30,e.stopPropagation(),e.preventDefault()}}.bind(this))}.bind(this)),(e=this.content.querySelectorAll(".ol-scroll-top")).forEach(function(t){t.addEventListener("click",function(t){this.content.scrollTop=0,t.stopPropagation(),t.preventDefault()}.bind(this))}.bind(this));var o=function(t){var e=[parseFloat(t.getAttribute("data-lon")),parseFloat(t.getAttribute("data-lat"))],o=ol.proj.fromLonLat(e,this.getMap().getView().getProjection()),i=parseFloat(t.getAttribute("data-zoom"));return{type:"scrollto",element:t,name:t.getAttribute("name"),coordinate:o,lon:e,zoom:i}}.bind(this),i=this.content.querySelectorAll(".chapter")[0];setTimeout(function(){i.classList.add("ol-select"),this.dispatchEvent(o(i))}.bind(this)),this.content.addEventListener("scroll",function(){var t,e=this.content.querySelectorAll(".chapter"),n=ol.ext.element.getStyle(this.content,"height");if(this.content.scrollTop)for(var r,s=0;r=e[s];s++){if(r.offsetTop-this.content.scrollTop>n/3)break;t=r}else t=e[0];if(t&&t!==i){i&&i.classList.remove("ol-select"),(i=t).classList.add("ol-select");var a=o(i),l=this.getMap().getView();switch(l.cancelAnimations(),i.getAttribute("data-animation")){case"flyto":l.flyTo({center:a.coordinate,zoomAt:Math.min(l.getZoom(),a.zoom)-1,zoom:a.zoom})}this.dispatchEvent(a)}}.bind(this))},ol.control.Swipe=function(t){t=t||{};var e=document.createElement("button"),o=document.createElement("div");o.className=(t.className||"ol-swipe")+" ol-unselectable ol-control",o.appendChild(e),o.addEventListener("mousedown",this.move.bind(this)),o.addEventListener("touchstart",this.move.bind(this)),ol.control.Control.call(this,{element:o}),this.precomposeRight_=this.precomposeRight.bind(this),this.precomposeLeft_=this.precomposeLeft.bind(this),this.postcompose_=this.postcompose.bind(this),this.layers=[],t.layers&&this.addLayer(t.layers,!1),t.rightLayers&&this.addLayer(t.rightLayers,!0),this.on("propertychange",function(t){if(this.getMap())try{this.getMap().renderSync()}catch(t){}"horizontal"===this.get("orientation")?(this.element.style.top=100*this.get("position")+"%",this.element.style.left=""):("vertical"!==this.get("orientation")&&this.set("orientation","vertical"),this.element.style.left=100*this.get("position")+"%",this.element.style.top=""),"orientation"===t.key&&(this.element.classList.remove("horizontal","vertical"),this.element.classList.add(this.get("orientation"))),this.isMoving||this.layers.forEach(function(t){t.layer.getImageRatio&&t.layer.changed()})}.bind(this)),this.set("position",t.position||.5),this.set("orientation",t.orientation||"vertical")},ol.ext.inherits(ol.control.Swipe,ol.control.Control),ol.control.Swipe.prototype.setMap=function(t){var e,o;if(this.getMap()){for(e=0;e=0&&this.getMap()&&(this.layers[o].right?t[e].un(["precompose","prerender"],this.precomposeRight_):t[e].un(["precompose","prerender"],this.precomposeLeft_),t[e].un(["postcompose","postrender"],this.postcompose_),this.layers.splice(o,1))}if(this.getMap())try{this.getMap().renderSync()}catch(t){}},ol.control.Swipe.prototype.getRectangle=function(){var t;return"vertical"===this.get("orientation")?[0,0,(t=this.getMap().getSize())[0]*this.get("position"),t[1]]:[0,0,(t=this.getMap().getSize())[0],t[1]*this.get("position")]},ol.control.Swipe.prototype.move=function(t){var e,o=this;switch(this._movefn||(this._movefn=this.move.bind(this)),t.type){case"touchcancel":case"touchend":case"mouseup":o.isMoving=!1,["mouseup","mousemove","touchend","touchcancel","touchmove"].forEach(function(t){document.removeEventListener(t,o._movefn)}),this.layers.forEach(function(t){t.layer.getImageRatio&&t.layer.changed()});break;case"mousedown":case"touchstart":o.isMoving=!0,["mouseup","mousemove","touchend","touchcancel","touchmove"].forEach(function(t){document.addEventListener(t,o._movefn)});case"mousemove":case"touchmove":if(o.isMoving)if("vertical"===o.get("orientation")){var i=t.pageX||t.touches&&t.touches.length&&t.touches[0].pageX||t.changedTouches&&t.changedTouches.length&&t.changedTouches[0].pageX;if(!i)break;i-=o.getMap().getTargetElement().getBoundingClientRect().left+window.pageXOffset-document.documentElement.clientLeft;var n=(e=o.getMap().getSize()[0])-Math.min(Math.max(0,e-i),e);e=n/e,o.set("position",e),o.dispatchEvent({type:"moving",size:[n,o.getMap().getSize()[1]],position:[e,0]})}else{var r=t.pageY||t.touches&&t.touches.length&&t.touches[0].pageY||t.changedTouches&&t.changedTouches.length&&t.changedTouches[0].pageY;if(!r)break;r-=o.getMap().getTargetElement().getBoundingClientRect().top+window.pageYOffset-document.documentElement.clientTop;var s=(e=o.getMap().getSize()[1])-Math.min(Math.max(0,e-r),e);e=s/e,o.set("position",e),o.dispatchEvent({type:"moving",size:[o.getMap().getSize()[0],s],position:[0,e]})}}},ol.control.Swipe.prototype._transformPt=function(t,e){var o=t.inversePixelTransform,i=e[0],n=e[1];return e[0]=o[0]*i+o[2]*n+o[4],e[1]=o[1]*i+o[3]*n+o[5],e},ol.control.Swipe.prototype._drawRect=function(t,e){var o=t.inversePixelTransform;if(o){var i=[[e[0][0],e[0][1]],[e[0][0],e[1][1]],[e[1][0],e[1][1]],[e[1][0],e[0][1]],[e[0][0],e[0][1]]];if(t.context.save(),t.target.getImageRatio){var n=-Math.atan2(t.frameState.pixelToCoordinateTransform[1],t.frameState.pixelToCoordinateTransform[0]);t.context.translate(t.frameState.size[0]/2,t.frameState.size[1]/2),t.context.rotate(n),t.context.translate(-t.frameState.size[0]/2,-t.frameState.size[1]/2)}i.forEach(function(e,i){e=[e[0]*o[0]-e[1]*o[1]+o[4],-e[0]*o[2]+e[1]*o[3]+o[5]],i?t.context.lineTo(e[0],e[1]):t.context.moveTo(e[0],e[1])}),t.context.restore()}else{var r=t.frameState.pixelRatio;t.context.rect(e[0][0]*r,e[0][1]*r,e[1][0]*r,e[1][1]*r)}},ol.control.Swipe.prototype.precomposeLeft=function(t){var e=t.context;if(e instanceof WebGLRenderingContext){if("prerender"===t.type){e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.enable(e.SCISSOR_TEST);var o=this.getMap().getSize(),i=this._transformPt(t,[0,o[1]]),n=this._transformPt(t,[o[0],0]),r=n[0]-i[0],s=n[1]-i[1];"vertical"===this.get("orientation")?r=Math.round(r*this.get("position")):(s=Math.round(s*this.get("position")),i[1]+=o[1]-s),e.scissor(i[0],i[1],r,s)}}else{var a=t.frameState.size;e.save(),e.beginPath();var l=[[0,0],[a[0],a[1]]];"vertical"===this.get("orientation")?l[1]=[.5*a[0]+this.getMap().getSize()[0]*(this.get("position")-.5),a[1]]:l[1]=[a[0],.5*a[1]+this.getMap().getSize()[1]*(this.get("position")-.5)],this._drawRect(t,l),e.clip()}},ol.control.Swipe.prototype.precomposeRight=function(t){var e=t.context;if(e instanceof WebGLRenderingContext){if("prerender"===t.type){e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.enable(e.SCISSOR_TEST);var o=this.getMap().getSize(),i=this._transformPt(t,[0,o[1]]),n=this._transformPt(t,[o[0],0]),r=n[0]-i[0],s=n[1]-i[1];"vertical"===this.get("orientation")?(r=Math.round(r*(1-this.get("position"))),i[0]+=o[0]-r):s=Math.round(s*(1-this.get("position"))),e.scissor(i[0],i[1],r,s)}}else{var a=t.frameState.size;e.save(),e.beginPath();var l=[[0,0],[a[0],a[1]]];"vertical"===this.get("orientation")?l[0]=[.5*a[0]+this.getMap().getSize()[0]*(this.get("position")-.5),0]:l[0]=[0,.5*a[1]+this.getMap().getSize()[1]*(this.get("position")-.5)],this._drawRect(t,l),e.clip()}},ol.control.Swipe.prototype.postcompose=function(t){if(t.context instanceof WebGLRenderingContext){if("postrender"===t.type){var e=t.context;e.disable(e.SCISSOR_TEST)}}else t.target.getClassName&&"ol-layer"!==t.target.getClassName()&&t.target.get("declutter")?setTimeout(function(){t.context.restore()},0):t.context.restore()},ol.control.SwipeMap=function(t){t=t||{};var e=document.createElement("button"),o=document.createElement("div");o.className=(t.className||"ol-swipe")+" ol-unselectable ol-control",o.appendChild(e),o.addEventListener("mousedown",this.move.bind(this)),o.addEventListener("touchstart",this.move.bind(this)),ol.control.Control.call(this,{element:o}),this.on("propertychange",function(t){"horizontal"===this.get("orientation")?(this.element.style.top=100*this.get("position")+"%",this.element.style.left=""):("vertical"!==this.get("orientation")&&this.set("orientation","vertical"),this.element.style.left=100*this.get("position")+"%",this.element.style.top=""),"orientation"===t.key&&(this.element.classList.remove("horizontal","vertical"),this.element.classList.add(this.get("orientation"))),this._clip()}.bind(this)),this.on("change:active",this._clip.bind(this)),this.set("position",t.position||.5),this.set("orientation",t.orientation||"vertical"),this.set("right",t.right)},ol.ext.inherits(ol.control.SwipeMap,ol.control.Control),ol.control.SwipeMap.prototype.setMap=function(t){this.getMap()&&(this._listener&&ol.Observable.unByKey(this._listener),this.getMap().getViewport().querySelector(".ol-layers").style.clip="");ol.control.Control.prototype.setMap.call(this,t),t&&(this._listener=t.on("change:size",this._clip.bind(this)))},ol.control.SwipeMap.prototype._clip=function(){if(this.getMap()){var t=this.getMap().getViewport().querySelector(".ol-layers"),e=this.getRectangle();t.style.clip="rect("+e[1]+"px,"+e[2]+"px,"+e[3]+"px,"+e[0]+"px)"}},ol.control.SwipeMap.prototype.getRectangle=function(){var t=this.getMap().getSize();return"vertical"===this.get("orientation")?this.get("right")?[t[0]*this.get("position"),0,t[0],t[1]]:[0,0,t[0]*this.get("position"),t[1]]:this.get("right")?[0,t[1]*this.get("position"),t[0],t[1]]:[0,0,t[0],t[1]*this.get("position")]},ol.control.SwipeMap.prototype.move=function(t){var e,o=this;switch(this._movefn||(this._movefn=this.move.bind(this)),t.type){case"touchcancel":case"touchend":case"mouseup":o.isMoving=!1,["mouseup","mousemove","touchend","touchcancel","touchmove"].forEach(function(t){document.removeEventListener(t,o._movefn)});break;case"mousedown":case"touchstart":o.isMoving=!0,["mouseup","mousemove","touchend","touchcancel","touchmove"].forEach(function(t){document.addEventListener(t,o._movefn)});case"mousemove":case"touchmove":if(o.isMoving)if("vertical"===o.get("orientation")){var i=t.pageX||t.touches&&t.touches.length&&t.touches[0].pageX||t.changedTouches&&t.changedTouches.length&&t.changedTouches[0].pageX;if(!i)break;i-=o.getMap().getTargetElement().getBoundingClientRect().left+window.pageXOffset-document.documentElement.clientLeft;var n=(e=o.getMap().getSize()[0])-Math.min(Math.max(0,e-i),e);e=n/e,o.set("position",e),o.dispatchEvent({type:"moving",size:[n,o.getMap().getSize()[1]],position:[e,0]})}else{var r=t.pageY||t.touches&&t.touches.length&&t.touches[0].pageY||t.changedTouches&&t.changedTouches.length&&t.changedTouches[0].pageY;if(!r)break;r-=o.getMap().getTargetElement().getBoundingClientRect().top+window.pageYOffset-document.documentElement.clientTop;var s=(e=o.getMap().getSize()[1])-Math.min(Math.max(0,e-r),e);e=s/e,o.set("position",e),o.dispatchEvent({type:"moving",size:[o.getMap().getSize()[0],s],position:[0,e]})}}},ol.control.Target=function(t){t=t||{},this.style=t.style||[new ol.style.Style({image:new ol.style.RegularShape({points:4,radius:11,radius1:0,radius2:0,snapToPixel:!0,stroke:new ol.style.Stroke({color:"#fff",width:3})})}),new ol.style.Style({image:new ol.style.RegularShape({points:4,radius:11,radius1:0,radius2:0,snapToPixel:!0,stroke:new ol.style.Stroke({color:"#000",width:1})})})],this.style instanceof Array||(this.style=[this.style]),this.composite=t.composite||"";var e=document.createElement("div");e.className="ol-target ol-unselectable ol-control",ol.control.CanvasBase.call(this,{element:e,target:t.target}),this.setVisible(!1!==t.visible)},ol.ext.inherits(ol.control.Target,ol.control.CanvasBase),ol.control.Target.prototype.setVisible=function(t){if(this.set("visible",t),this.getMap())try{this.getMap().renderSync()}catch(t){}},ol.control.Target.prototype.getVisible=function(){return this.get("visible")},ol.control.Target.prototype._draw=function(t){var e=this.getContext(t);if(e&&this.getMap()&&this.getVisible()){var o=t.frameState.pixelRatio;e.save(),e.scale(o,o);var i=e.canvas.width/(2*o),n=e.canvas.height/(2*o),r=new ol.geom.Point(this.getMap().getCoordinateFromPixel([i,n]));this.composite&&(e.globalCompositeOperation=this.composite);for(var s=0;s=1?t++:t=Math.min(1,t+.1),t=Math.round(100*t)/100,this.refresh(t)}.bind(this)}),this.addButton({className:"ol-zoom-out",handleClick:function(){var t=this.get("zoom");t>1?t--:t-=.1,t=Math.round(100*t)/100,this.refresh(t)}.bind(this)})),this._intervalDiv=ol.ext.element.create("DIV",{className:"ol-center-date",parent:this.element}),this.element.addEventListener("mouseover",function(){this._select&&this._select.elt.classList.remove("ol-select")}.bind(this));var o=null;this._scrollDiv.addEventListener("scroll",function(){this._setScrollLeft(),o&&(clearTimeout(o),o=null),o=setTimeout(function(){this.dispatchEvent({type:"scroll",date:this.getDate(),dateStart:this.getDate("start"),dateEnd:this.getDate("end")})}.bind(this),t.scrollTimeout||15)}.bind(this)),ol.ext.element.scrollDiv(this._scrollDiv,{onmove:function(t){this._moving=t}.bind(this)}),this._tline=[],this._scrollLeft=0,this.set("maxWidth",t.maxWidth||2e3),this.set("minDate",t.minDate||1/0),this.set("maxDate",t.maxDate||-1/0),this.set("graduation",t.graduation),this.set("minZoom",t.minZoom||.2),this.set("maxZoom",t.maxZoom||4),this.setInterval(t.interval),t.getHTML&&(this._getHTML=t.getHTML),t.getFeatureDate&&(this._getFeatureDate=t.getFeatureDate),t.endFeatureDate&&(this._endFeatureDate=t.endFeatureDate),this.setFeatures(t.features||t.source,t.zoom)},ol.ext.inherits(ol.control.Timeline,ol.control.Control),ol.control.Timeline.prototype.setMap=function(t){ol.control.Control.prototype.setMap.call(this,t),this.refresh(this.get("zoom")||1,!0)},ol.control.Timeline.prototype.addButton=function(t){this.element.classList.add("ol-hasbutton"),ol.ext.element.create("BUTTON",{className:t.className||void 0,title:t.title,html:t.html,click:t.handleClick,parent:this._buttons})},ol.control.Timeline.prototype.setInterval=function(t){"string"==typeof t&&(t=/s$/.test(t)?1e3*parseFloat(t):/mn$/.test(t)?1e3*parseFloat(t)*60:/h$/.test(t)?1e3*parseFloat(t)*3600:/d$/.test(t)?1e3*parseFloat(t)*3600*24:/y$/.test(t)?1e3*parseFloat(t)*3600*24*365:0),this.set("interval",t||0),t?this.element.classList.add("ol-interval"):this.element.classList.remove("ol-interval"),this.refresh(this.get("zoom"))},ol.control.Timeline.prototype._getHTML=function(t){return t.get("name")||""},ol.control.Timeline.prototype._getFeatureDate=function(t){return t&&t.get?t.get("date"):null},ol.control.Timeline.prototype._endFeatureDate=function(){},ol.control.Timeline.prototype.isCollapsed=function(){return this.element.classList.contains("ol-collapsed")},ol.control.Timeline.prototype.collapse=function(t){t?this.element.classList.add("ol-collapsed"):this.element.classList.remove("ol-collapsed"),this.dispatchEvent({type:"collapse",collapsed:this.isCollapsed()})},ol.control.Timeline.prototype.toggle=function(){this.element.classList.toggle("ol-collapsed"),this.dispatchEvent({type:"collapse",collapsed:this.isCollapsed()})},ol.control.Timeline.prototype.setFeatures=function(t,e){this._features=this._source=null,t instanceof ol.source.Vector?this._source=t:t instanceof Array?this._features=t:this._features=[],this.refresh(e)},ol.control.Timeline.prototype.getFeatures=function(){return this._features||this._source.getFeatures()},ol.control.Timeline.prototype.refresh=function(t,e){if(this.getMap()){t||(t=this.get("zoom")),t=Math.min(this.get("maxZoom"),Math.max(this.get("minZoom"),t||1)),this.set("zoom",t),this._scrollDiv.innerHTML="";var o,i,n=this.getFeatures(),r=this._tline=[];n.forEach(function(t){(o=this._getFeatureDate(t))&&(o instanceof Date||(o=new Date(o)),this._endFeatureDate&&((i=this._endFeatureDate(t))instanceof Date||(i=new Date(i))),isNaN(o)||r.push({date:o,end:isNaN(i)?null:i,feature:t}))}.bind(this)),r.sort(function(t,e){return t.dateh?h/c:1)*t;c=(l-(a=this._minDate=this._minDate-10/p))*p,ol.ext.element.setStyle(s,{width:c,maxWidth:"unset"}),this._drawTime(s,a,l,p),this.get("interval")?ol.ext.element.setStyle(this._intervalDiv,{width:this.get("interval")*p}):ol.ext.element.setStyle(this._intervalDiv,{width:""});var u=[],d=ol.ext.element.getStyle(this._scrollDiv,"lineHeight"),g=ol.ext.element.create("DIV",{className:"ol-features",parent:s});r.forEach(function(t){for(var e=t.date,o=t.elt=ol.ext.element.create("DIV",{className:"ol-feature",style:{left:Math.round((e-a)*p)},html:this._getHTML(t.feature),parent:g}),i=o.querySelectorAll("img"),n=0;ns);r++);u[r]=l+ol.ext.element.getStyle(o,"width"),ol.ext.element.setStyle(o,{top:r*d})}.bind(this)),this._nbline=u.length,e&&this.setDate(this._minDate,{anim:!1,position:"start"}),this.dispatchEvent({type:"scroll",date:this.getDate(),dateStart:this.getDate("start"),dateEnd:this.getDate("end")})}},ol.control.Timeline.prototype._getOffsetFromDate=function(t){return(t-this._minDate)*this._scale},ol.control.Timeline.prototype._getDateFromOffset=function(t){return t/this._scale+this._minDate},ol.control.Timeline.prototype._setScrollLeft=function(t){this._scrollLeft=t,void 0!==t&&(this._scrollDiv.scrollLeft=t)},ol.control.Timeline.prototype._getScrollLeft=function(){return void 0===this._scrollLeft?this._scrollDiv.scrollLeft:this._scrollLeft},ol.control.Timeline.prototype._drawTime=function(t,e,o,i){var n,r,s,a,l=ol.ext.element.create("DIV",{className:"ol-times",parent:t}),c=ol.ext.element.getStyle(l,"left"),h=ol.ext.element.getStyle(l,"height"),p=new Date(this._minDate).getFullYear();r=(new Date(0).setFullYear(String(p))-new Date(0).setFullYear(String(p-1)))*i;for(var u=Math.round(2*h/r)+1;!((n=new Date(0).setFullYear(p))>this._maxDate);)ol.ext.element.create("DIV",{className:"ol-time ol-year",style:{left:this._getOffsetFromDate(n)-c},html:p,parent:l}),p+=u;if(/day|month/.test(this.get("graduation"))&&(r=(new Date(0,0,1).setFullYear(String(p))-new Date(0,0,1).setFullYear(String(p-1)))*i,(a=Math.max(1,Math.round(12/Math.round(r/h/2))))<12))for(p=new Date(this._minDate).getFullYear(),s=a+1;(n=new Date(0,0,1)).setFullYear(p),n.setMonth(s-1),!(n>this._maxDate);)ol.ext.element.create("DIV",{className:"ol-time ol-month",style:{left:this._getOffsetFromDate(n)-c},html:n.toLocaleDateString(void 0,{month:"short"}),parent:l}),(s+=a)>12&&(p++,s=a+1);if("day"===this.get("graduation")){r=(new Date(0,1,1)-new Date(0,0,1))*i;var d=Math.max(1,Math.round(31/Math.round(r/h/2)));if(d<31){p=new Date(this._minDate).getFullYear(),s=0;for(var g=d;;)if((n=new Date(0,0,1)).setFullYear(p),n.setMonth(s),n.setDate(g),isNaN(n))++s>12&&(s=1,p++),g=d;else{if(n>this._maxDate)break;if(g>1){var m=this._getOffsetFromDate(n);this._getOffsetFromDate(new Date(p,s+1,1))-m>h&&ol.ext.element.create("DIV",{className:"ol-time ol-day",style:{left:m-c},html:g,parent:l})}p=n.getFullYear(),s=n.getMonth(),(g=n.getDate()+d)>new Date(p,s+1,0).getDate()&&(s++,g=d)}}}},ol.control.Timeline.prototype.setDate=function(t,e){var o;if(e=e||{},t instanceof Date?o=t:(this.getFeatures().indexOf(t)>=0&&(o=this._getFeatureDate(t)),!o||o instanceof Date||(o=new Date(o)),o&&!isNaN(o)||(o=new Date(String(t)))),!isNaN(o)){!1===e.anim&&this._scrollDiv.classList.add("ol-move");var i=this._getOffsetFromDate(o);if("start"===e.position?i+=ol.ext.element.outerWidth(this._scrollDiv)/2-ol.ext.element.getStyle(this._scrollDiv,"marginLeft")/2:"end"===e.position&&(i-=ol.ext.element.outerWidth(this._scrollDiv)/2-ol.ext.element.getStyle(this._scrollDiv,"marginLeft")/2),this._setScrollLeft(i),!1===e.anim&&this._scrollDiv.classList.remove("ol-move"),t)for(var n,r=0;n=this._tline[r];r++)n.feature===t?(n.elt.classList.add("ol-select"),this._select=n):n.elt.classList.remove("ol-select")}},ol.control.Timeline.prototype.roundDate=function(t,e){switch(e){case"mn":return new Date(this._roundTo(t,6e4));case"hour":return new Date(this._roundTo(t,36e5));case"day":return new Date(this._roundTo(t,864e5));case"month":return(t=new Date(this._roundTo(t,864e5))).getDate()>15&&(t=new Date(t.setMonth(t.getMonth()+1))),t=t.setDate(1),new Date(t);default:return new Date(t)}},ol.control.Timeline.prototype.getDate=function(t,e){var o;switch(e||(e=t),t){case"start":o=this.get("interval")?-ol.ext.element.getStyle(this._intervalDiv,"width")/2+ol.ext.element.getStyle(this._scrollDiv,"marginLeft")/2:-ol.ext.element.outerWidth(this._scrollDiv)/2+ol.ext.element.getStyle(this._scrollDiv,"marginLeft")/2;break;case"end":o=this.get("interval")?ol.ext.element.getStyle(this._intervalDiv,"width")/2-ol.ext.element.getStyle(this._scrollDiv,"marginLeft")/2:ol.ext.element.outerWidth(this._scrollDiv)/2-ol.ext.element.getStyle(this._scrollDiv,"marginLeft")/2;break;default:o=0}var i=this._getDateFromOffset(this._getScrollLeft()+o);return i=this.roundDate(i,e),new Date(i)},ol.control.Timeline.prototype._roundTo=function(t,e){return Math.round(t/e)*e},ol.control.Timeline.prototype.getStartDate=function(){return new Date(this.get("minDate"))},ol.control.Timeline.prototype.getEndDate=function(){return new Date(this.get("maxDate"))},ol.control.VideoRecorder=function(t){t||(t={});var e=ol.ext.element.create("DIV",{className:(t.className||"ol-videorec")+" ol-unselectable ol-control"});ol.ext.element.create("BUTTON",{type:"button",className:"ol-start",title:"start",click:function(){this.start()}.bind(this),parent:e}),ol.ext.element.create("BUTTON",{type:"button",className:"ol-stop",title:"stop",click:function(){this.stop()}.bind(this),parent:e}),ol.ext.element.create("BUTTON",{type:"button",className:"ol-pause",title:"pause",click:function(){this.pause()}.bind(this),parent:e}),ol.ext.element.create("BUTTON",{type:"button",className:"ol-resume",title:"resume",click:function(){this.resume()}.bind(this),parent:e}),ol.control.Control.call(this,{element:e,target:t.target}),this.set("framerate",30),this.set("videoBitsPerSecond",5e6),"DIALOG"===t.videoTarget?(this._dialog=new ol.control.Dialog({className:"ol-fullscreen-dialog",target:document.body,closeBox:!0}),this._videoTarget=this._dialog.getContentElement()):this._videoTarget=t.videoTarget,this._printCtrl=new ol.control.Print({target:ol.ext.element.create("DIV")})},ol.ext.inherits(ol.control.VideoRecorder,ol.control.Control),ol.control.VideoRecorder.prototype.setMap=function(t){this.getMap()&&(this.getMap().removeControl(this._printCtrl),this._dialog&&this.getMap().removeControl(this._dialog)),ol.control.Control.prototype.setMap.call(this,t),this.getMap()&&(this.getMap().addControl(this._printCtrl),this._dialog&&this.getMap().addControl(this._dialog))},ol.control.VideoRecorder.prototype.start=function(){var t=this._printCtrl,e=!1;function o(i){e||t.fastPrint({canvas:i},o)}t.fastPrint({},function(t){var i;try{i=t.captureStream(this.get("framerate")||30)}catch(t){return void this.dispatchEvent({type:"error",error:t})}this._mediaRecorder=new MediaRecorder(i,{videoBitsPerSecond:this.get("videoBitsPerSecond")||5e6});var n=[];this._mediaRecorder.ondataavailable=function(t){n.push(t.data)},this._mediaRecorder.onstop=function(){e=!0;var t,o=new Blob(n,{type:"video/mp4"});(n=[],this._videoTarget instanceof Element)?("VIDEO"===this._videoTarget.tagName?t=this._videoTarget:(t=this._videoTarget.querySelector("video"))||(t=ol.ext.element.create("VIDEO",{controls:"",parent:this._videoTarget})),this._dialog&&this._dialog.show(),t.src=URL.createObjectURL(o),this.dispatchEvent({type:"stop",videoURL:t.src})):this.dispatchEvent({type:"stop",videoURL:URL.createObjectURL(o)})}.bind(this),this._mediaRecorder.onpause=function(){e=!0,this.dispatchEvent({type:"pause"})}.bind(this),this._mediaRecorder.onresume=function(){e=!1,o(t),this.dispatchEvent({type:"resume"})}.bind(this),this._mediaRecorder.onerror=function(t){this.dispatchEvent({type:"error",error:t})}.bind(this),e=!1,o(t),this._mediaRecorder.start(),this.dispatchEvent({type:"start",canvas:t}),this.element.setAttribute("data-state","rec")}.bind(this))},ol.control.VideoRecorder.prototype.stop=function(){this._mediaRecorder&&(this._mediaRecorder.stop(),this._mediaRecorder=null,this.element.setAttribute("data-state","inactive"))},ol.control.VideoRecorder.prototype.pause=function(){this._mediaRecorder&&(this._mediaRecorder.pause(),this.element.setAttribute("data-state","pause"))},ol.control.VideoRecorder.prototype.resume=function(){this._mediaRecorder&&(this._mediaRecorder.resume(),this.element.setAttribute("data-state","rec"))},ol.control.WMSCapabilities=function(t){t=t||{};var e=Object.assign({},t||{});this._proxy=t.proxy,e.target===document.body&&delete e.target,e.target?(e.className=((e.className||"")+" ol-wmscapabilities ol-hidden").trim(),delete e.target):(e.className=((e.className||"")+" ol-wmscapabilities").trim(),e.handleClick=function(){this.showDialog()}.bind(this)),ol.control.Button.call(this,e),this.set("srs",t.srs||[]),this.set("cors",t.cors),this.set("trace",t.trace),this.set("title",t.title),this.set("loadLabel",t.loadLabel),this.set("optional",t.optional),this.createDialog(t),this._elements.formVersion.value="1.0.0";var o=this._getParser();this._ajax=new ol.ext.Ajax({dataType:"text",auth:t.authentication}),this._ajax.on("success",function(t){var e;try{e=o.read(t.response)}catch(t){this.showError({type:"load",error:t})}e&&(e.Capability.Layer.Layer?this.showCapabilities(e):this.showError({type:"noLayer"})),this.dispatchEvent({type:"capabilities",capabilities:e}),"function"==typeof t.options.callback&&t.options.callback(e)}.bind(this)),this._ajax.on("error",function(t){this.showError({type:"load",error:t}),this.dispatchEvent({type:"capabilities"}),t.options.callback}.bind(this)),this._ajax.on("loadstart",function(){this._elements.element.classList.add("ol-searching")}.bind(this)),this._ajax.on("loadend",function(){this._elements.element.classList.remove("ol-searching")}.bind(this)),t.onselect&&this.on("load",function(e){t.onselect(e.layer,e.options)})},ol.ext.inherits(ol.control.WMSCapabilities,ol.control.Button),ol.control.WMSCapabilities.prototype._getParser=function(){return new ol.format.WMSCapabilities},ol.control.WMSCapabilities.prototype.error={load:"Can't retrieve service capabilities, try to add it manually...",badUrl:"The input value is not a valid url...",TileMatrix:"No TileMatrixSet supported...",noLayer:"No layer available for this service...",srs:"The service projection looks different from that of your map, it may not display correctly..."},ol.control.WMSCapabilities.prototype.labels={formTitle:"Title:",formLayer:"Layers:",formMap:"Map:",formStyle:"Style:",formFormat:"Format:",formMinZoom:"Min zoom level:",formMaxZoom:"Max zoom level:",formExtent:"Extent:",mapExtent:"use map extent...",formProjection:"Projection:",formCrossOrigin:"CrossOrigin:",formVersion:"Version:",formAttribution:"Attribution:"},ol.control.WMSCapabilities.prototype.createDialog=function(t){var e=t.target;e&&e!==document.body||(this._dialog=new ol.control.Dialog({className:"ol-wmscapabilities",closeBox:!0,closeOnSubmit:!1,target:t.target}),this._dialog.on("button",function(t){"submit"===t.button&&this.getCapabilities(t.inputs.url.value)}.bind(this)),e=null);var o=ol.ext.element.create("DIV",{className:("ol-wmscapabilities "+(t.className||"")).trim(),parent:e});this._elements={element:e||o};var i=ol.ext.element.create("DIV",{className:"ol-url",parent:o}),n=this._elements.input=ol.ext.element.create("INPUT",{className:"url",type:"text",tabIndex:1,placeholder:t.placeholder||"service url...",autocorrect:"off",autocapitalize:"off",parent:i});if(n.addEventListener("keyup",function(e){13===e.keyCode&&this.getCapabilities(n.value,t)}.bind(this)),t.services){var r=ol.ext.element.create("SELECT",{className:"url",on:{change:function(e){var o=e.target.options[e.target.selectedIndex].value;this.getCapabilities(o,t),e.target.selectedIndex=0}.bind(this)},parent:i});for(var s in ol.ext.element.create("OPTION",{html:" ",parent:r}),t.services)ol.ext.element.create("OPTION",{html:s,value:t.services[s],parent:r})}ol.ext.element.create("BUTTON",{click:function(){this.getCapabilities(n.value,t)}.bind(this),html:t.searchLabel||"search",parent:i}),this._elements.error=ol.ext.element.create("DIV",{className:"ol-error",parent:i});var a=this._elements.result=ol.ext.element.create("DIV",{className:"ol-result",parent:o}),l=ol.ext.element.create("DIV",{className:"ol-preview",html:t.previewLabel||"preview",parent:a});this._elements.preview=ol.ext.element.create("IMG",{parent:l}),this._img=new Image,this._img.crossOrigin="Anonymous",this._img.addEventListener("error",function(){l.className="ol-preview tainted",this._elements.formCrossOrigin.checked=!1}.bind(this)),this._img.addEventListener("load",function(){l.className="ol-preview ok",this._elements.formCrossOrigin.checked=!0}.bind(this)),this._elements.select=ol.ext.element.create("DIV",{className:"ol-select-list",tabIndex:2,parent:a}),this._elements.data=ol.ext.element.create("DIV",{className:"ol-data",parent:a}),this._elements.buttons=ol.ext.element.create("DIV",{className:"ol-buttons",parent:a}),this._elements.legend=ol.ext.element.create("IMG",{className:"ol-legend",parent:a});var c=this._elements.form=ol.ext.element.create("UL",{className:"ol-wmsform",parent:o}),h=function(t,e,o){var i=ol.ext.element.create("LI",{parent:c});if(ol.ext.element.create("LABEL",{html:this.labels[t],parent:i}),"boolean"==typeof e)this._elements[t]=ol.ext.element.create("INPUT",{type:"checkbox",checked:e,parent:i});else if(e instanceof Array){var n=this._elements[t]=ol.ext.element.create("SELECT",{parent:i});e.forEach(function(t){ol.ext.element.create("OPTION",{html:t,value:t,parent:n})}.bind(this))}else this._elements[t]=ol.ext.element.create("INPUT",{value:void 0===e?"":e,placeholder:o||"",type:typeof e,parent:i});return i}.bind(this);h("formTitle"),h("formLayer","","layer1,layer2,...");var p=h("formMap");p.setAttribute("data-param","map"),(p=h("formStyle")).setAttribute("data-param","style"),h("formFormat",["image/png","image/jpeg"]),h("formMinZoom",0),h("formMaxZoom",20),(p=h("formExtent","","xmin,ymin,xmax,ymax")).setAttribute("data-param","extent");var u=p.querySelector("input");return ol.ext.element.create("BUTTON",{title:this.labels.mapExtent,click:function(){u.value=this.getMap().getView().calculateExtent(this.getMap().getSize()).join(",")}.bind(this),parent:p}),(p=h("formProjection","")).setAttribute("data-param","proj"),h("formCrossOrigin",!1),(p=h("formVersion","1.3.0")).setAttribute("data-param","version"),h("formAttribution",""),ol.ext.element.create("BUTTON",{html:this.get("loadLabel")||"Load",click:function(){var t=this._getFormOptions(),e=this.getLayerFromOptions(t);this.dispatchEvent({type:"load",layer:e,options:t}),this._dialog.hide()}.bind(this),parent:c}),o},ol.control.WMSCapabilities.prototype.getLayerFromOptions=function(t){t.layer.source=new ol.source.TileWMS(t.source);var e=new ol.layer.Tile(t.layer);return delete t.layer.source,e},ol.control.WMSCapabilities.prototype.setMap=function(t){ol.control.Button.prototype.setMap.call(this,t),this._dialog&&this._dialog.setMap(t)},ol.control.WMSCapabilities.prototype.getDialog=function(){return this._dialog},ol.control.WMSCapabilities.prototype.showDialog=function(t,e){this.showError(),this._elements.formProjection.value||(this._elements.formProjection.value=this.getMap().getView().getProjection().getCode()),this._dialog&&this._dialog.show({title:void 0===this.get("title")?"WMS":this.get("title"),content:this._elements.element}),this.getCapabilities(t,e);var o=this._elements.select.querySelector(".selected");o&&(this._elements.select.scrollTop=o.offsetTop-20)},ol.control.WMSCapabilities.prototype.testUrl=function(t){return!!new RegExp("^(https?:\\/\\/)((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=\\/-]*)?(\\#[-a-z\\d_]*)?$","i").test(t)},ol.control.WMSCapabilities.prototype.getRequestParam=function(t){return{SERVICE:"WMS",REQUEST:"GetCapabilities",VERSION:t.version||"1.3.0"}},ol.control.WMSCapabilities.prototype.getCapabilities=function(t,e){if(t)if(this.testUrl(t)){e=e||{};var o=(t=t.split("?"))[1];t=t[0],this._elements.formMap.value="",this._elements.formLayer.value="",this._elements.formStyle.value="",this._elements.formTitle.value="",this._elements.formProjection.value=this.getMap().getView().getProjection().getCode(),this._elements.formFormat.selectedIndex=0;var i=e.map||"",n={};o&&(o=o.replace(/^\?/,"").split("&")).forEach(function(t){if((t=t.split("="))[1]=decodeURIComponent(t[1]||""),/^map$/i.test(t[0])&&(i=t[1],this._elements.formMap.value=i),/^layers$/i.test(t[0])&&(this._elements.formLayer.value=t[1],this._elements.formTitle.value=t[1].split(",")[0]),/^style$/i.test(t[0])&&(this._elements.formStyle.value=t[1]),/^crs$/i.test(t[0])&&(this._elements.formProjection.value=t[1]),/^format$/i.test(t[0]))for(var e,o=0;e=this._elements.formFormat.options[o];o++)if(e.value===t[1]){this._elements.formFormat.selectedIndex=o;break}this.get("optional")&&this.get("optional").split(",").forEach(function(e){e===t[0]&&(n[e]=t[1])}.bind(this))}.bind(this));var r=this.getRequestParam(e),s=[];for(var a in i&&(r.MAP=i,s.push("map="+i)),n)r[a]=n[a],s.push(a+"="+n[a]);if(this._elements.input.value=(t||"")+(s?"?"+s.join("&"):""),this.clearForm(),this._proxy){var l="";for(var c in r)l+=(l?"&":"")+c+"="+r[c];this._ajax.send(this._proxy,{url:l},{timeout:e.timeout||1e4,callback:e.onload,abort:!1})}else this._ajax.send(t,r,{timeout:e.timeout||1e4,callback:e.onload,abort:!1})}else this.showError({type:"badUrl"})},ol.control.WMSCapabilities.prototype.showError=function(t){this._elements.error.innerHTML=t?this.error[t.type]||"ERROR ("+t.type+")":"",t&&"load"===t.type?this._elements.form.classList.add("visible"):this._elements.form.classList.remove("visible")},ol.control.WMSCapabilities.prototype.clearForm=function(){this._elements.result.classList.remove("ol-visible"),this.showError(),this._elements.select.innerHTML="",this._elements.data.innerHTML="",this._elements.preview.src="",this._elements.legend.src="",this._elements.legend.classList.remove("visible")},ol.control.WMSCapabilities.prototype.showCapabilities=function(t){this._elements.result.classList.add("ol-visible");var e=[],o=function(i,n){n=n||0,i.Layer.forEach(function(r){r.Attribution||(r.Attribution=i.Attribution),r.EX_GeographicBoundingBox||(r.EX_GeographicBoundingBox=i.EX_GeographicBoundingBox);var s=ol.ext.element.create("DIV",{className:(r.Layer?"ol-title ":"")+"level-"+n,html:r.Name||r.Title,click:function(){this._elements.buttons.innerHTML="",this._elements.data.innerHTML="",this._elements.legend.src=this._elements.preview.src="",this._elements.element.classList.remove("ol-form"),this.showError();var o=this.getOptionsFromCap(r,t),i=this.getLayerFromOptions(o);if(this._currentOptions=o,e.forEach(function(t){t.classList.remove("selected")}),s.classList.add("selected"),i){ol.ext.element.create("BUTTON",{html:this.get("loadLabel")||"Load",className:"ol-load",click:function(){this.dispatchEvent({type:"load",layer:i,options:o}),this._dialog&&this._dialog.hide()}.bind(this),parent:this._elements.buttons}),ol.ext.element.create("BUTTON",{className:"ol-wmsform",click:function(){this._elements.element.classList.toggle("ol-form")}.bind(this),parent:this._elements.buttons});var n=this.getMap().getView().getResolution(),a=this.getMap().getView().getCenter();this._elements.preview.src=i.getPreview(a,n,this.getMap().getView().getProjection()),this._img.src=this._elements.preview.src,ol.ext.element.create("p",{className:"ol-title",html:o.data.title,parent:this._elements.data}),ol.ext.element.create("p",{html:o.data.abstract,parent:this._elements.data}),o.data.legend.length?(this._elements.legend.src=o.data.legend[0],this._elements.legend.classList.add("visible")):(this._elements.legend.src="",this._elements.legend.classList.remove("visible"))}}.bind(this),parent:this._elements.select});e.push(s),r.Layer&&o(r,n+1)}.bind(this))}.bind(this);this._elements.select.innerHTML="",o(t.Capability.Layer)},ol.control.WMSCapabilities.prototype.getLayerResolution=function(t,e,o){var i="min"===t?"MinScaleDenominator":"MaxScaleDenominator";if(void 0!==e[i])return e[i]/(72/2.54*100);if(!e.Layer)return"min"===t?0:156543.03392804097;o="min"===t?156543.03392804097:0;for(var n=0;n=0?l=!0:t.CRS.indexOf("EPSG:4326")>=0?(a="EPSG:4326",l=!0):this.get("srs").forEach(function(e){t.CRS.indexOf(e)>=0&&(a=e,l=!0)}):l=!1,l||(this.showError({type:"srs"}),this.get("trace")&&console.log("BAD srs: ",t.CRS));var c=t.EX_GeographicBoundingBox;c&&(c=ol.proj.transformExtent(c,"EPSG:4326",this.getMap().getView().getProjection()));var h=[];t.Attribution&&h.push('© '+t.Attribution.Title.replace(/");var p={title:t.Title,extent:c,queryable:t.queryable,abstract:t.Abstract,minResolution:this.getLayerResolution("min",t),maxResolution:this.getLayerResolution("max",t)||156543.03392804097},u={url:e.Capability.Request.GetMap.DCPType[0].HTTP.Get.OnlineResource,projection:a,attributions:h,crossOrigin:this.get("cors")?"anonymous":null,params:{LAYERS:t.Name,FORMAT:o,VERSION:e.version||"1.3.0"}},d=new ol.View({projection:this.getMap().getView().getProjection()});d.setResolution(p.minResolution);var g=Math.round(d.getZoom());d.setResolution(p.maxResolution);var m=Math.round(d.getZoom());if(this._fillForm({title:p.title,layers:u.params.LAYERS,format:u.params.FORMAT,minZoom:m,maxZoom:g,extent:c?c.join(","):"",projection:u.projection,attribution:u.attributions[0]||"",version:u.params.VERSION}),this.get("trace")){var f=JSON.stringify([u],null,"\t").replace(/\\"/g,'"');p.source="SOURCE";var y="new ol.layer.Tile ("+JSON.stringify(p,null,"\t")+")";y=y.replace(/\\"/g,'"').replace('"SOURCE"',"new ol.source.TileWMS("+f+")").replace(/\\t/g,"\t").replace(/\\n/g,"\n").replace("([\n\t","(").replace("}\n])","})"),console.log(y),delete p.source}var v=[];return t.Style&&t.Style.forEach(function(t){t.LegendURL&&v.push(t.LegendURL[0].OnlineResource)}),{layer:p,source:u,data:{title:t.Title,abstract:t.Abstract,logo:t.Attribution&&t.Attribution.LogoURL?t.Attribution.LogoURL.OnlineResource:void 0,keyword:t.KeywordList,legend:v,opaque:t.opaque,queryable:t.queryable}}},ol.control.WMSCapabilities.prototype._getFormOptions=function(){var t=parseInt(this._elements.formMinZoom.value),e=parseInt(this._elements.formMaxZoom.value),o=new ol.View({projection:this.getMap().getView().getProjection()});o.setZoom(t);var i=o.getResolution();o.setZoom(e);var n=o.getResolution(),r=[];this._elements.formExtent.value&&this._elements.formExtent.value.split(",").forEach(function(t){r.push(parseFloat(t))}),4!==r.length&&(r=void 0);var s=[];this._elements.formAttribution.value&&s.push(this._elements.formAttribution.value);var a={layer:{title:this._elements.formTitle.value,extent:r,maxResolution:i,minResolution:n},source:{url:this._elements.input.value,crossOrigin:this._elements.formCrossOrigin.checked?"anonymous":null,projection:this._elements.formProjection.value,attributions:s,params:{FORMAT:this._elements.formFormat.options[this._elements.formFormat.selectedIndex].value,LAYERS:this._elements.formLayer.value,VERSION:this._elements.formVersion.value}},data:{title:this._elements.formTitle.value}};return this._elements.formMap.value&&(a.source.params.MAP=this._elements.formMap.value),a},ol.control.WMSCapabilities.prototype._fillForm=function(t){var e,o;for(this._elements.formTitle.value=t.title,this._elements.formLayer.value=t.layers,this._elements.formStyle.value=t.style,o=0;e=this._elements.formFormat.options[o];o++)if(e.value===t.format){this._elements.formFormat.selectedIndex=o;break}this._elements.formExtent.value=t.extent||"",this._elements.formMaxZoom.value=t.maxZoom,this._elements.formMinZoom.value=t.minZoom,this._elements.formProjection.value=t.projection,this._elements.formAttribution.value=t.attribution,this._elements.formVersion.value=t.version},ol.control.WMSCapabilities.prototype.loadLayer=function(t,e,o){this.getCapabilities(t,{onload:function(t){t?t.Capability.Layer.Layer.forEach(function(i){if(i.Name===e||i.Identifier===e){var n=this.getOptionsFromCap(i,t),r=this.getLayerFromOptions(n);this.dispatchEvent({type:"load",layer:r,options:n}),"function"==typeof o&&o({layer:r,options:n})}}.bind(this)):this.dispatchEvent({type:"load",error:!0})}.bind(this)})},ol.control.WMTSCapabilities=function(t){(t=t||{}).title=t.title||"WMTS",ol.control.WMSCapabilities.call(this,t),this.getDialog().element.classList.add("ol-wmtscapabilities")},ol.ext.inherits(ol.control.WMTSCapabilities,ol.control.WMSCapabilities),ol.control.WMTSCapabilities.prototype._getParser=function(){var t=new ol.format.WMTSCapabilities;return{read:function(e){var o=t.read(e);o.Capability={Layer:o.Contents},o.Capability.Layer.Attribution={Title:o.ServiceProvider.ProviderName};var i=[];return o.Contents.Layer.forEach(function(t){t.Format&&/jpeg|png/.test(t.Format[0])&&i.push(t)}),o.Contents.Layer=i,o}.bind(this)}},ol.control.WMTSCapabilities.prototype.getRequestParam=function(t){return{SERVICE:"WMTS",REQUEST:"GetCapabilities",VERSION:t.version||"1.0.0"}},ol.control.WMTSCapabilities.prototype._getTG=function(t,e,o){for(var i=new Array,n=new Array,r=ol.extent.getWidth(ol.proj.get("EPSG:3857").getExtent())/256,s=0;s<=(o||20);s++){var a="PM"!==t?t+":"+s:s;i[s]=a,n[s]=r/Math.pow(2,s)}return{origin:[-20037508,20037508],resolutions:n,matrixIds:i,minZoom:e||0}},ol.control.WMTSCapabilities.prototype.getTileGrid=function(t,e,o){return new ol.tilegrid.WMTS(this._getTG(t,e,o))},ol.control.WMTSCapabilities.prototype.getOptionsFromCap=function(t,e){var o=t.WGS84BoundingBox;o&&(o=ol.proj.transformExtent(o,"EPSG:4326",this.getMap().getView().getProjection()));var i,n=1/0,r=-1/0;if(t.TileMatrixSetLink.forEach(function(e){"PM"!==e.TileMatrixSet&&"EPSG:3857"!==e.TileMatrixSet||(i=e,t.TileMatrixSet=e.TileMatrixSet)}),i){i.TileMatrixSetLimits.forEach(function(t){var e=t.TileMatrix.split(":").pop();n=Math.min(n,parseInt(e)),r=Math.max(r,parseInt(e))});var s=new ol.View;s.setZoom(n);var a={title:t.Title,extent:o,abstract:t.Abstract,maxResolution:s.getResolution()},l={url:e.OperationsMetadata.GetTile.DCP.HTTP.Get[0].href,layer:t.Identifier,matrixSet:t.TileMatrixSet,format:t.Format[0]||"image/jpeg",projection:"EPSG:3857",minZoom:n,maxZoom:r,style:t.Style?t.Style[0].Identifier:"normal",attributions:t.Attribution.Title,crossOrigin:this.get("cors")?"anonymous":null,wrapX:!1!==this.get("wrapX")};if(this._fillForm({title:a.title,layers:l.layer,style:l.style,format:l.format,minZoom:n,maxZoom:r,extent:o?o.join(","):"",projection:l.projection,attribution:l.attributions||"",version:"1.0.0"}),this.get("trace")){l.tileGrid="TILEGRID";var c=JSON.stringify([l],null,"\t").replace(/\\"/g,'"');c=c.replace('"TILEGRID"',"new ol.tilegrid.WMTS("+JSON.stringify(this._getTG(l.matrixSet,l.minZoom,l.maxZoom),null,"\t").replace(/\n/g,"\n\t\t")+")"),delete l.tileGrid,a.source="SOURCE";var h="new ol.layer.Tile ("+JSON.stringify(a,null,"\t")+")";h=h.replace(/\\"/g,'"').replace('"SOURCE"',"new ol.source.WMTS("+c+")").replace(/\\t/g,"\t").replace(/\\n/g,"\n").replace(/"tileGrid": {/g,'"tileGrid": new ol.tilegrid.WMTS({').replace(/},\n(\t*)"style"/g,'}),\n$1"style"').replace("([\n\t","(").replace("}\n])","})"),console.log(h),delete a.source}return{layer:a,source:l,data:{title:t.Title,abstract:t.Abstract,legend:t.Style?[t.Style[0].LegendURL[0].href]:void 0}}}this.showError({type:"TileMatrix"})},ol.control.WMTSCapabilities.prototype._getFormOptions=function(){var t=this._currentOptions||{};t.layer||(t.layer={}),t.source||(t.source={}),t.data||(t.data={});var e=parseInt(this._elements.formMinZoom.value)||0,o=parseInt(this._elements.formMaxZoom.value)||20,i=[];this._elements.formExtent.value&&this._elements.formExtent.value.split(",").forEach(function(t){i.push(parseFloat(t))}),4!==i.length&&(i=void 0);var n=[];this._elements.formAttribution.value&&n.push(this._elements.formAttribution.value);var r=new ol.View({projection:this.getMap().getView().getProjection()});return r.setZoom(e),{layer:{title:this._elements.formTitle.value,extent:i,abstract:t.layer.abstract||"",maxResolution:r.getResolution()},source:{url:this._elements.input.value,layer:this._elements.formLayer.value,matrixSet:t.source.matrixSet||"PM",format:this._elements.formFormat.options[this._elements.formFormat.selectedIndex].value,projection:"EPSG:3857",minZoom:e,maxZoom:o,style:this._elements.formStyle.value||"normal",attributions:n,crossOrigin:this._elements.formCrossOrigin.checked?"anonymous":null,wrapX:!1!==this.get("wrapX")},data:{title:this._elements.formTitle.value,abstract:t.data.abstract,legend:t.data.legend}}},ol.control.WMTSCapabilities.prototype.getLayerFromOptions=function(t){if(t){t.source.tileGrid=this.getTileGrid(t.source.matrixSet,t.source.minZoom,t.source.maxZoom),t.layer.source=new ol.source.WMTS(t.source);var e=new ol.layer.Tile(t.layer);return delete t.layer.source,delete t.source.tileGrid,e}},ol.featureAnimation=function(t){t=t||{},this.duration_="number"==typeof t.duration?t.duration>=0?t.duration:0:1e3,this.fade_="function"==typeof t.fade?t.fade:null,this.repeat_=Number(t.repeat);var e="function"==typeof t.easing?t.easing:ol.easing.linear;t.revers?this.easing_=function(t){return 1-e(t)}:this.easing_=e,this.hiddenStyle=t.hiddenStyle,ol.Object.call(this)},ol.ext.inherits(ol.featureAnimation,ol.Object),ol.featureAnimation.hiddenStyle=new ol.style.Style({image:new ol.style.Circle({}),stroke:new ol.style.Stroke({color:"transparent"})}),ol.featureAnimation.prototype.drawGeom_=function(t,e,o){this.fade_&&(t.context.globalAlpha=this.fade_(1-t.elapsed));for(var i=t.style,n=0;n=0;l--)0===e[l].duration_&&e.splice(l,1);var c=0,h=0,p=o&&this.getFilters?this.getFilters():[];function u(o){a.type=o.type;try{a.vectorContext=o.vectorContext||ol.render.getVectorContext(o)}catch(o){}if(a.frameState=o.frameState,a.inversePixelTransform=o.inversePixelTransform,a.extent||(a.extent=o.frameState.extent,a.start=o.frameState.time,a.context=o.context),a.time=o.frameState.time-a.start,a.elapsed=a.time/e[h].duration_,a.elapsed>1&&(a.elapsed=1),o.context.save(),p.forEach(function(t){t.get("active")&&t.precompose(o)}),this.getOpacity&&(o.context.globalAlpha=this.getOpacity()),e[h].animate(a)){var i={type:"animating",step:h,start:a.start,time:a.time,elapsed:a.elapsed,rotation:a.rotation||0,geom:a.geom,coordinate:a.coord,feature:t};e[h].dispatchEvent(i),n.dispatchEvent(i)}else++c0&&(this.duration_=this.dist_/this.speed_)},ol.ext.inherits(ol.featureAnimation.Path,ol.featureAnimation),ol.featureAnimation.Path.prototype.animate=function(t){if(!t.time&&!this.dist_)return!1;var e,o,i,n,r,s,a=this.dist_*this.easing_(t.elapsed),l=0;o=this.path_[0];for(var c=1;c=a){i=(a-l)/s,o=[e[0]+(o[0]-e[0])*i,e[1]+(o[1]-e[1])*i];break}l+=s}var h=t.style;if(t.rotation=Math.PI/2+Math.atan2(e[1]-o[1],e[0]-o[0]),!1!==this.rotate_){var p=[],u=this.rotate_-t.rotation+t.frameState.viewState.rotation;t.rotation=Math.PI/2+Math.atan2(e[1]-o[1],e[0]-o[0]);for(var d=0;i=t.style[d];d++)i.getImage()&&i.getImage().setRotation(u),p.push(i);t.style=p}return t.geom.setCoordinates(o),this.drawGeom_(t,t.geom),t.style=h,t.time<=this.duration_},ol.featureAnimation.Shake=function(t){t=t||{},ol.featureAnimation.call(this,t),this.amplitude_=t.amplitude||40,this.bounce_=-Math.PI*(t.bounce||6),this.horizontal_=t.horizontal},ol.ext.inherits(ol.featureAnimation.Shake,ol.featureAnimation),ol.featureAnimation.Shake.prototype.animate=function(t){var e=t.geom.clone(),o=t.geom.clone(),i=this.easing_(t.elapsed);return i=Math.sin(this.bounce_*i)*this.amplitude_*(1-i)*t.frameState.viewState.resolution,this.horizontal_?(e.translate(i,0),o.translate(i,0)):e.translate(0,i),this.drawGeom_(t,e,o),t.time<=this.duration_},ol.featureAnimation.Show=function(t){ol.featureAnimation.call(this,t)},ol.ext.inherits(ol.featureAnimation.Show,ol.featureAnimation),ol.featureAnimation.Show.prototype.animate=function(t){return this.drawGeom_(t,t.geom),t.time<=this.duration_},ol.featureAnimation.Slide=function(t){t=t||{},this.speed_=t.speed||0,ol.featureAnimation.call(this,t),this.side_=t.side||"left"},ol.ext.inherits(ol.featureAnimation.Slide,ol.featureAnimation),ol.featureAnimation.Slide.prototype.animate=function(t){t.time||("left"==this.side_?this.dx=t.extent[0]-t.bbox[2]:this.dx=t.extent[2]-t.bbox[0],this.speed_&&(this.duration_=Math.abs(this.dx)/this.speed_/t.frameState.viewState.resolution));var e=t.geom.clone();return e.translate(this.dx*(1-this.easing_(t.elapsed)),0),this.drawGeom_(t,e),t.time<=this.duration_},ol.featureAnimation.Teleport=function(t){ol.featureAnimation.call(this,t)},ol.ext.inherits(ol.featureAnimation.Teleport,ol.featureAnimation),ol.featureAnimation.Teleport.prototype.animate=function(t){var e=this.easing_(t.elapsed);if(e){t.context.save();var o=t.frameState.pixelRatio;t.context.globalAlpha=e,t.context.scale(e,1/e);var i=t.frameState.coordinateToPixelTransform,n=(1/e-1)*o*(i[0]*t.coord[0]+i[1]*t.coord[1]+i[4]),r=(e-1)*o*(i[2]*t.coord[0]+i[3]*t.coord[1]+i[5]);t.context.translate(n,r),this.drawGeom_(t,t.geom),t.context.restore()}return t.time<=this.duration_},ol.featureAnimation.Throw=function(t){t=t||{},ol.featureAnimation.call(this,t),this.speed_=t.speed||0,this.side_=t.side||"left"},ol.ext.inherits(ol.featureAnimation.Throw,ol.featureAnimation),ol.featureAnimation.Throw.prototype.animate=function(t){var e,o;!t.time&&this.speed_&&("left"==this.side_?(e=this.dx=t.extent[0]-t.bbox[2],o=this.dy=t.extent[3]-t.bbox[1]):(e=this.dx=t.extent[2]-t.bbox[0],o=this.dy=t.extent[3]-t.bbox[1]),this.duration_=Math.sqrt(e*e+o*o)/this.speed_/t.frameState.viewState.resolution);var i=t.geom.clone(),n=t.geom.clone();return i.translate(this.dx*(1-this.easing_(t.elapsed)),this.dy*Math.cos(Math.PI/2*this.easing_(t.elapsed))),n.translate(this.dx*(1-this.easing_(t.elapsed)),0),this.drawGeom_(t,i,n),t.time<=this.duration_},ol.featureAnimation.Zoom=function(t){t=t||{},ol.featureAnimation.call(this,t),this.set("zoomout",t.zoomOut)};ol.ext.inherits(ol.featureAnimation.Zoom,ol.featureAnimation),ol.featureAnimation.ZoomOut=function(t){(t=t||{}).zoomOut=!0,ol.featureAnimation.Zoom.call(this,t)},ol.ext.inherits(ol.featureAnimation.ZoomOut,ol.featureAnimation.Zoom),ol.featureAnimation.Zoom.prototype.animate=function(t){var e=this.easing_(t.elapsed);if(e){this.get("zoomout")&&(e=1/e);var o,i,n=t.style,r=[];for(o=0;o=0;o--)this.filters_[o]===e&&this.filters_.splice(o,1);for(o=e._listener.length-1;o>=0;o--)e._listener[o].target===this&&(e.removeFromLayer&&e.removeFromLayer(this),ol.Observable.unByKey(e._listener[o].listener),e._listener.splice(o,1));t.call(this)}ol.Map.prototype.addFilter=function(t){console.warn("[OL-EXT] addFilter deprecated on map."),e.call(this,t)},ol.Map.prototype.removeFilter=function(t){o.call(this,t)},ol.Map.prototype.getFilters=function(){return this.filters_||[]},ol.layer.Base.prototype.addFilter=function(t){e.call(this,t)},ol.layer.Base.prototype.removeFilter=function(t){o.call(this,t)},ol.layer.Base.prototype.getFilters=function(){return this.filters_||[]}}(),ol.filter.Mask=function(t){if(t=t||{},ol.filter.Base.call(this,t),t.feature)switch(t.feature.getGeometry().getType()){case"Polygon":case"MultiPolygon":this.feature_=t.feature}this.set("inner",t.inner),this.fillColor_=t.fill&&ol.color.asString(t.fill.getColor())||"rgba(0,0,0,0.2)"},ol.ext.inherits(ol.filter.Mask,ol.filter.Base),ol.filter.Mask.prototype.drawFeaturePath_=function(t,e){var o,i=t.context,n=i.canvas,r=t.frameState.pixelRatio;if(t.frameState.coordinateToPixelTransform){var s=t.frameState.coordinateToPixelTransform;if(t.inversePixelTransform){var a=t.inversePixelTransform;o=function(t){return[(t=[t[0]*s[0]+t[1]*s[1]+s[4],t[0]*s[2]+t[1]*s[3]+s[5]])[0]*a[0]-t[1]*a[1]+a[4],-t[0]*a[2]+t[1]*a[3]+a[5]]}}else o=function(t){return[(t[0]*s[0]+t[1]*s[1]+s[4])*r,(t[0]*s[2]+t[1]*s[3]+s[5])*r]}}else s=t.frameState.coordinateToPixelMatrix,o=function(t){return[(t[0]*s[0]+t[1]*s[1]+s[12])*r,(t[0]*s[4]+t[1]*s[5]+s[13])*r]};var l=this.feature_.getGeometry().getCoordinates();function c(t){for(var e=0;e=0&&(t.once("postrender",function(t){t.context.canvas.parentNode.style["mix-blend-mode"]="",t.context.canvas.parentNode.style.filter="",t.context.canvas.parentNode.style.display=""}.bind(this)),t.changed(),this._layers.splice(e,1))},ol.filter.CanvasFilter=function(t){ol.filter.Base.call(this,t),this._svg={}},ol.ext.inherits(ol.filter.CanvasFilter,ol.filter.Base),ol.filter.CanvasFilter.prototype.addSVGFilter=function(t){t.getId&&(t="#"+t.getId()),this._svg[t]=1,this.dispatchEvent({type:"propertychange",key:"svg",oldValue:this._svg})},ol.filter.CanvasFilter.prototype.removeSVGFilter=function(t){t.getId&&(t="#"+t.getId()),delete this._svg[t],this.dispatchEvent({type:"propertychange",key:"svg",oldValue:this._svg})},ol.filter.CanvasFilter.prototype.precompose=function(){},ol.filter.CanvasFilter.prototype.postcompose=function(t){var e=[];for(var o in void 0!==this.get("url")&&e.push("url("+this.get("url")+")"),this._svg)e.push("url("+o+")");void 0!==this.get("blur")&&e.push("blur("+this.get("blur")+"px)"),void 0!==this.get("brightness")&&e.push("brightness("+this.get("brightness")+"%)"),void 0!==this.get("contrast")&&e.push("contrast("+this.get("contrast")+"%)"),void 0!==this.get("shadow")&&e.push("drop-shadow("+this.get("shadow")[0]+"px "+this.get("shadow")[1]+"px "+(this.get("shadowBlur")||0)+"px "+this.get("shadowColor")+")"),void 0!==this.get("grayscale")&&e.push("grayscale("+this.get("grayscale")+"%)"),void 0!==this.get("hueRotate")&&e.push("hue-rotate("+this.get("hueRotate")+"deg)"),void 0!==this.get("invert")&&e.push("invert("+this.get("invert")+"%)"),void 0!==this.get("saturate")&&e.push("saturate("+this.get("saturate")+"%)"),void 0!==this.get("sepia")&&e.push("sepia("+this.get("sepia")+"%)"),(e=e.join(" "))&&(t.context.save(),t.context.filter=e,t.context.drawImage(t.context.canvas,0,0),t.context.restore())},ol.filter.Clip=function(t){if(t=t||{},ol.filter.Base.call(this,t),this.set("coords",t.coords),this.set("units",t.units),this.set("keepAspectRatio",t.keepAspectRatio),this.set("extent",t.extent||[0,0,1,1]),this.set("color",t.color),!t.extent&&"%"!=t.units&&t.coords){for(var e,o=1/0,i=1/0,n=-1/0,r=-1/0,s=0;e=t.coords[s];s++)o>e[0]&&(o=e[0]),ne[1]&&(i=e[1]),r0;r--)i=r*l/a[0]-(r==a[0]?e[0]*(a[1]%2)+o:0),n=c-e[1]*(r%2)-o,t.lineTo(i,n);for(r=a[1];r>0;r--)i=e[0]*(r%2)+o,n=r*c/a[1]-(r==a[1]?o:0),t.lineTo(i,n);t.closePath()},ol.filter.Fold.prototype.precompose=function(t){var e=t.context;e.save(),e.shadowColor="rgba(0,0,0,0.3)",e.shadowBlur=8,e.shadowOffsetX=2,e.shadowOffsetY=3,this.drawLine_(e,this.get("fsize"),this.get("margin")),e.fillStyle="#fff",this.get("fill")&&e.fill(),e.strokeStyle="rgba(0,0,0,0.1)",e.stroke(),e.restore(),e.save(),this.drawLine_(e,this.get("fsize"),this.get("margin")+this.get("padding")),e.clip()},ol.filter.Fold.prototype.postcompose=function(t){var e=t.context,o=e.canvas;if(e.restore(),e.save(),this.drawLine_(e,this.get("fsize"),this.get("margin")),e.clip(),this.get("shadow")){var i=this.get("fold"),n=o.width/i[0],r=o.height/i[1],s=e.createRadialGradient(5*n/8,5*n/8,n/4,n/2,n/2,n);s.addColorStop(0,"transparent"),s.addColorStop(1,"rgba(0,0,0,0.2)"),e.fillStyle=s,e.scale(1,r/n);for(var a=0;athis.pixels.length)for(;this.pixels.length-1}:this._whiteList=function(){return!0},"function"==typeof t.blackList?this._blackList=t.blackList:t.blackList&&t.blackList.indexOf?this._blackList=function(e){return t.blackList.indexOf(e)>-1}:this._blackList=function(){return!1},this._deleteNull=!1!==t.deleteNullProperties&&[null,void 0,""];var e=2;t.dataProjection&&"EPSG:4326"!==t.dataProjection||(e=7),isNaN(parseInt(t.decimals))||(e=parseInt(t.decimals)),this._decimals=e,this.setLayout(t.layout||"XY")},ol.ext.inherits(ol.format.GeoJSONX,ol.format.GeoJSON),ol.format.GeoJSONX.prototype._radix="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/ !#$%&'()*-.:<=>?@[]^_`{|}~",ol.format.GeoJSONX.prototype._size=ol.format.GeoJSONX.prototype._radix.length,ol.format.GeoJSONX.prototype._type={Point:0,LineString:1,Polygon:2,MultiPoint:3,MultiLineString:4,MultiPolygon:5,GeometryCollection:null},ol.format.GeoJSONX.prototype._toType=["Point","LineString","Polygon","MultiPoint","MultiLineString","MultiPolygon"],ol.format.GeoJSONX.prototype.setLayout=function(t){switch(t){case"XYZ":case"XYZM":this._layout=t;break;default:this._layout="XY"}},ol.format.GeoJSONX.prototype.getLayout=function(){return this._layout},ol.format.GeoJSONX.prototype.encodeNumber=function(t,e){!isNaN(Number(t))&&null!==t&&isFinite(t)||(t=0),e||0===e||(e=this._decimals),(t=Math.round(t*Math.pow(10,e)))<0?t=-2*t-1:t*=2;for(var o,i="",n=t;o=n%this._size,i=this._radix.charAt(o)+i,0!=(n=Math.floor(n/this._size)););return i},ol.format.GeoJSONX.prototype.decodeNumber=function(t,e){e||0===e||(e=this._decimals);var o=0;t.split("").forEach(function(t){o=o*this._size+this._radix.indexOf(t)}.bind(this));var i=Math.floor(o/2);return i!==o/2&&(i=-1-i),i/Math.pow(10,e)},ol.format.GeoJSONX.prototype.encodeCoordinates=function(t,e){var o,i,n;if("number"==typeof t[0])return i=this.encodeNumber(t[0],e)+","+this.encodeNumber(t[1],e),"Z"==this._layout[2]&&t.length>2&&(i+=","+this.encodeNumber(t[o][2],2)),"M"==this._layout[3]&&t.length>3&&(i+=","+this.encodeNumber(t[o][3],0)),i;if(t.length&&t[0]){if("number"==typeof t[0][0]){var r=[0,0,0,0],s=[],a="Z"==this._layout[2]&&t[0].length>2,l="M"==this._layout[3]&&t[0].length>3;for(o=0;o1){var n=Math.pow(10,e),r=[0,0,0,0];return t.forEach(function(o,i){t[i]=o.split(","),t[i][0]=Math.round((this.decodeNumber(t[i][0],e)+r[0])*n)/n,t[i][1]=Math.round((this.decodeNumber(t[i][1],e)+r[1])*n)/n,t[i].length>2&&(t[i][2]=Math.round((this.decodeNumber(t[i][2],2)+r[2])*n)/n),t[i].length>3&&(t[i][3]=Math.round((this.decodeNumber(t[i][3],0)+r[3])*n)/n),r=t[i]}.bind(this)),t}return t=t[0].split(","),i=[this.decodeNumber(t[0],e),this.decodeNumber(t[1],e)],t.length>2&&(i[2]=this.decodeNumber(t[2],2)),t.length>3&&(i[3]=this.decodeNumber(t[3],0)),i}if(t.length){var s=[];for(o=0;o0?1:-1)*Math.min(.015,n/7e4*t),e=0;e=0})),"function"==typeof t.features)this._features=t.features;else if(t.features){var n=t.features;this._features=function(t){return n.indexOf?!!n[n.indexOf(t)]:!!n.item(n.getArray().indexOf(t))}}else this._features=function(){return!0};this.on("drawstart",this._startDrawing.bind(this)),this.on("drawend",this._finishDrawing.bind(this))},ol.ext.inherits(ol.interaction.DrawHole,ol.interaction.Draw),ol.interaction.DrawHole.prototype.setMap=function(t){this.getMap()&&this.getMap().removeInteraction(this._select),t&&t.addInteraction(this._select),ol.interaction.Draw.prototype.setMap.call(this,t)},ol.interaction.DrawHole.prototype.setActive=function(t){this._select.getFeatures().clear(),ol.interaction.Draw.prototype.setActive.call(this,t)},ol.interaction.DrawHole.prototype.removeLastPoint=function(){this._feature&&this._feature.getGeometry().getCoordinates()[0].length>2&&ol.interaction.Draw.prototype.removeLastPoint.call(this)},ol.interaction.DrawHole.prototype.getPolygon=function(){return this._polygon},ol.interaction.DrawHole.prototype._startDrawing=function(t){var e=this.getMap();this._feature=t.feature;var o=t.feature.getGeometry().getCoordinates()[0][0];this._current=null,e.forEachFeatureAtPixel(e.getPixelFromCoordinate(o),function(t,e){if(this._features(t,e)){var i=t.getGeometry();if("Polygon"===i.getType()&&i.intersectsCoordinate(o))this._polygonIndex=!1,this._polygon=i,this._current=t;else if("MultiPolygon"===i.getType()&&i.intersectsCoordinate(o))for(var n,r=0;n=i.getPolygon(r);r++)if(n.intersectsCoordinate(o)){this._polygonIndex=r,this._polygon=n,this._current=t;break}}}.bind(this),{layerFilter:this.layers_}),this._select.getFeatures().clear(),this._current?this._select.getFeatures().push(this._current):(this.setActive(!1),this.setActive(!0))},ol.interaction.DrawHole.prototype._finishDrawing=function(t){t.hole=t.feature,t.feature=this._select.getFeatures().item(0),this.dispatchEvent({type:"modifystart",features:[this._current]});var e=t.hole.getGeometry().getCoordinates()[0];if(e.length>3)if(!1!==this._polygonIndex){for(var o,i=t.feature.getGeometry(),n=new ol.geom.MultiPolygon([]),r=0;o=i.getPolygon(r);r++)r===this._polygonIndex?(o.appendLinearRing(new ol.geom.LinearRing(e)),n.appendPolygon(o)):n.appendPolygon(o);t.feature.setGeometry(n)}else this.getPolygon().appendLinearRing(new ol.geom.LinearRing(e));this.dispatchEvent({type:"modifyend",features:[this._current]}),this._feature=null,this._select.getFeatures().clear()},ol.interaction.DrawHole.prototype._geometryFn=function(t,e){var o=t[0].pop();return this.getPolygon()&&!this.getPolygon().intersectsCoordinate(o)||(this.lastOKCoord=[o[0],o[1]]),t[0].push([this.lastOKCoord[0],this.lastOKCoord[1]]),e?e.setCoordinates([t[0].concat([t[0][0]])]):e=new ol.geom.Polygon(t),e},ol.interaction.DrawRegular=function(t){t||(t={}),this.squaredClickTolerance_=t.clickTolerance?t.clickTolerance*t.clickTolerance:36,this.maxCircleCoordinates_=t.maxCircleCoordinates||100,this.features_=t.features,this.source_=t.source,this.conditionFn_=t.condition,this.squareFn_=t.squareCondition,this.centeredFn_=t.centerCondition,this.canRotate_=!1!==t.canRotate,this.geometryName_=t.geometryName,this.setSides(t.sides);var e=ol.style.Style.defaultStyle(!0);this.sketch_=new ol.Collection,this.overlayLayer_=new ol.layer.Vector({source:new ol.source.Vector({features:this.sketch_,useSpatialIndex:!1}),name:"DrawRegular overlay",displayInLayerSwitcher:!1,style:t.style||e}),ol.interaction.Interaction.call(this,{handleEvent:this.handleEvent_})},ol.ext.inherits(ol.interaction.DrawRegular,ol.interaction.Interaction),ol.interaction.DrawRegular.prototype.setMap=function(t){this.getMap()&&this.getMap().removeLayer(this.overlayLayer_),ol.interaction.Interaction.prototype.setMap.call(this,t),this.overlayLayer_.setMap(t)},ol.interaction.DrawRegular.prototype.setActive=function(t){this.reset(),ol.interaction.Interaction.prototype.setActive.call(this,t)},ol.interaction.DrawRegular.prototype.reset=function(){this.overlayLayer_.getSource().clear(),this.started_=!1},ol.interaction.DrawRegular.prototype.setSides=function(t){t=parseInt(t),this.sides_=t>2?t:0},ol.interaction.DrawRegular.prototype.canRotate=function(t){return!0!==t&&!1!==t||(this.canRotate_=t),this.canRotate_},ol.interaction.DrawRegular.prototype.getSides=function(){return this.sides_},ol.interaction.DrawRegular.prototype.startAngle={default:Math.PI/2,3:-Math.PI/2,4:Math.PI/4},ol.interaction.DrawRegular.prototype.getGeom_=function(){if(this.overlayLayer_.getSource().clear(),!this.center_)return!1;var t;if(this.coord_){var e,o,i,n,r,s=this.center_,a=this.coord_;if(!this.sides_&&this.square_&&!this.centered_)return s=[(a[0]+s[0])/2,(a[1]+s[1])/2],e=[a[0]-s[0],a[1]-s[1]],i=Math.sqrt(e[0]*e[0]+e[1]*e[1]),n=new ol.geom.Circle(s,i,"XY"),r=this.getMap().getPixelFromCoordinate(s),o=Math.max(100,Math.abs(r[0]-this.coordPx_[0]),Math.abs(r[1]-this.coordPx_[1])),o=Math.min(this.maxCircleCoordinates_,Math.round(o/3)),ol.geom.Polygon.fromCircle(n,o,0);var l=this.canRotate_&&this.centered_&&this.square_;if(e=[a[0]-s[0],a[1]-s[1]],this.square_&&!l){var c=Math.max(Math.abs(e[0]),Math.abs(e[1]));a=[s[0]+(e[0]>0?c:-c),s[1]+(e[1]>0?c:-c)]}if((i=Math.sqrt(e[0]*e[0]+e[1]*e[1]))>0){var h;if(n=new ol.geom.Circle(s,i,"XY"),h=l?Math.atan2(e[1],e[0]):this.startAngle[this.sides_]||this.startAngle.default,this.sides_?t=ol.geom.Polygon.fromCircle(n,this.sides_,h):(r=this.getMap().getPixelFromCoordinate(this.center_),o=Math.max(100,Math.abs(r[0]-this.coordPx_[0]),Math.abs(r[1]-this.coordPx_[1])),o=Math.min(this.maxCircleCoordinates_,Math.round(o/(this.centered_?3:5))),t=ol.geom.Polygon.fromCircle(n,o,0)),l)return t;var p=t.getExtent(),u=((s=this.centered_?[2*this.center_[0]-this.coord_[0],2*this.center_[1]-this.coord_[1]]:this.center_)[0]-a[0])/(p[0]-p[2]),d=(s[1]-a[1])/(p[1]-p[3]);if(this.square_){var g=Math.min(Math.abs(u),Math.abs(d));u=Math.sign(u)*g,d=Math.sign(d)*g}var m=[s[0]-p[0]*u,s[1]-p[1]*d];return t.applyTransform(function(t,e,o){for(var i=0;i450,this._longTouch&&this.handleMoveEvent_(t)}.bind(this),500);break;case"pointerup":this.started_&&this.coord_&&(e=this.downPx_[0]-t.pixel[0])*e+(o=this.downPx_[1]-t.pixel[1])*o<=this.squaredClickTolerance_&&("pointermove"==this.lastEvent||"keydown"==this.lastEvent?this.end_(t):(e=this.upPx_[0]-t.pixel[0])*e+(o=this.upPx_[1]-t.pixel[1])*o<=this.squaredClickTolerance_?this.end_(t):(this.handleMoveEvent_(t),this.drawPoint_(t.coordinate,!0))),this.upPx_=t.pixel;break;case"pointerdrag":if(this.started_){var i=this.getMap().getPixelFromCoordinate(this.center_);(e=i[0]-t.pixel[0])*e+(o=i[1]-t.pixel[1])*o<=this.squaredClickTolerance_&&this.reset()}return!this._longTouch;case"pointermove":this.started_&&(e=this.downPx_[0]-t.pixel[0])*e+(o=this.downPx_[1]-t.pixel[1])*o>this.squaredClickTolerance_&&(this.handleMoveEvent_(t),this.lastEvent=t.type);break;default:if(this.lastEvent=t.type,this.started_&&"dblclick"===t.type)return!1}return!0},ol.interaction.DrawRegular.prototype.finishDrawing=function(){this.started_&&this.coord_&&this.end_({pixel:this.upPx_,coordinate:this.coord_})},ol.interaction.DrawRegular.prototype.handleMoveEvent_=function(t){if(this.started_){this.coord_=t.coordinate,this.coordPx_=t.pixel;var e=this.drawSketch_(t);this.dispatchEvent({type:"drawing",feature:e,pixel:t.pixel,startCoordinate:this.center_,coordinate:t.coordinate,square:this.square_,centered:this.centered_})}else this.drawPoint_(t.coordinate)},ol.interaction.DrawRegular.prototype.start_=function(t){if(this.started_)this.coord_=t.coordinate;else{this.started_=!0,this.center_=t.coordinate,this.coord_=null;var e=this.feature_=new ol.Feature({});e.setGeometryName(this.geometryName_),e.setGeometry(new ol.geom.Polygon([[t.coordinate,t.coordinate,t.coordinate]])),this.drawSketch_(t),this.dispatchEvent({type:"drawstart",feature:e,pixel:t.pixel,coordinate:t.coordinate})}},ol.interaction.DrawRegular.prototype.end_=function(t){if(this.coord_=t.coordinate,this.started_=!1,!this.coord_||this.center_[0]===this.coord_[0]&&this.center_[1]===this.coord_[1])this.dispatchEvent({type:"drawcancel",feature:null,pixel:t.pixel,coordinate:t.coordinate,square:this.square_,centered:this.centered_});else{var e=this.feature_;e.setGeometry(this.getGeom_()),this.source_?this.source_.addFeature(e):this.features_&&this.features_.push(e),this.dispatchEvent({type:"drawend",feature:e,pixel:t.pixel,coordinate:t.coordinate,square:this.square_,centered:this.centered_})}this.center_=this.coord_=null,this.drawSketch_()},ol.interaction.DrawTouch=function(t){(t=t||{}).handleEvent=function(t){if(this.get("tap"))switch(this.sketch.setPosition(this.getPosition()),t.type){case"singleclick":this.addPoint();break;case"dblclick":return this.addPoint(),this.finishDrawing(),!1}return!0},t.sketchStyle||(t.sketchStyle=ol.style.Style.defaultStyle());var e=this.sketch=new ol.layer.SketchOverlay(t);e.on(["drawstart","drawabort"],function(t){this.dispatchEvent(t)}.bind(this)),e.on(["drawend"],function(e){e.feature&&e.valid&&t.source&&t.source.addFeature(e.feature),this.dispatchEvent(e)}.bind(this)),ol.interaction.CenterTouch.call(this,t),this._source=t.source,this.set("tap",!1!==t.tap)},ol.ext.inherits(ol.interaction.DrawTouch,ol.interaction.CenterTouch),ol.interaction.DrawTouch.prototype.setMap=function(t){if(this._listener)for(var e in this._listener)ol.Observable.unByKey(e);this._listener={},ol.interaction.CenterTouch.prototype.setMap.call(this,t),this.sketch.setMap(t),t&&(this._listener.center=t.on("postcompose",function(){ol.coordinate.equal(this.getPosition(),this.sketch.getPosition()||[])||this.sketch.setPosition(this.getPosition())}.bind(this)))},ol.interaction.DrawTouch.prototype.setGeometryType=function(t){return this.sketch.setGeometryType(t)},ol.interaction.DrawTouch.prototype.getGeometryType=function(){return this.sketch.getGeometryType()},ol.interaction.DrawTouch.prototype.finishDrawing=function(){this.sketch.finishDrawing(!0)},ol.interaction.DrawTouch.prototype.addPoint=function(){this.sketch.addPoint(this.getPosition())},ol.interaction.DrawTouch.prototype.removeLastPoint=function(){this.sketch.removeLastPoint()},ol.interaction.DrawTouch.prototype.setActive=function(t){ol.interaction.CenterTouch.prototype.setActive.call(this,t),this.sketch.abortDrawing(),this.sketch.setVisible(t)},ol.interaction.DropFile=function(t){t=t||{},ol.interaction.DragAndDrop.call(this,{});var e=t.zone||document;e.addEventListener("dragenter",this.onstop),e.addEventListener("dragover",this.onstop),e.addEventListener("dragleave",this.onstop),this.formatConstructors_=t.formatConstructors||[ol.format.GPX,ol.format.GeoJSONX,ol.format.GeoJSONP,ol.format.GeoJSON,ol.format.IGC,ol.format.KML,ol.format.TopoJSON],this.projection_=t.projection,this.accept_=t.accept||["gpx","json","geojsonx","geojsonp","geojson","igc","kml","topojson"];var o=this;e.addEventListener("drop",function(t){return o.ondrop(t)})},ol.ext.inherits(ol.interaction.DropFile,ol.interaction.DragAndDrop),ol.interaction.DropFile.prototype.setMap=function(t){ol.interaction.Interaction.prototype.setMap.call(this,t)},ol.interaction.DropFile.prototype.onstop=function(t){return t.preventDefault(),t.stopPropagation(),!1},ol.interaction.DropFile.prototype.ondrop=function(t){if(t.preventDefault(),t.dataTransfer&&t.dataTransfer.files.length)for(var e,o=this,i=this.projection_||(this.getMap()?this.getMap().getView().getProjection():null),n=t.dataTransfer.files,r=/\.([0-9a-z]+)(?=[?#])|(\.)(?:[\w]+)$/,s=0;e=n[s];s++){var a=e.name.match(r)[0],l=this.accept_.indexOf(a.toLocaleLowerCase())>=0;if(o.dispatchEvent({type:"loadstart",file:e,filesize:e.size,filetype:e.type,fileextension:a,projection:i,isok:l}),this.formatConstructors_.length){var c=new FileReader,h=this.formatConstructors_,p=e;c.onload=function(t){var e,n,r=t.target.result,s=[];for(e=0,n=h.length;e0)return o.dispatchEvent({type:"addfeatures",features:s,file:p,projection:i}),void o.dispatchEvent({type:"loadend",features:s,file:p,projection:i})}catch(t){}}o.dispatchEvent({type:"loadend",file:p,result:r})},c.readAsText(e)}}return!1},ol.interaction.FillAttribute=function(t,e){if((t=t||{}).condition||(t.condition=ol.events.condition.click),ol.interaction.Select.call(this,t),this.setActive(!1!==t.active),this.set("name",t.name),this._attributes=e,this.on("select",function(t){this.getFeatures().clear(),this.fill(t.selected,this._attributes)}.bind(this)),void 0===t.cursor){var o=document.createElement("CANVAS");o.width=o.height=32;var i=o.getContext("2d");i.beginPath(),i.moveTo(9,3),i.lineTo(2,9),i.lineTo(10,17),i.lineTo(17,11),i.closePath(),i.fillStyle="#fff",i.fill(),i.stroke(),i.beginPath(),i.moveTo(6,4),i.lineTo(0,8),i.lineTo(0,13),i.lineTo(3,17),i.lineTo(3,8),i.closePath(),i.fillStyle="#000",i.fill(),i.stroke(),i.moveTo(8,8),i.lineTo(10,0),i.lineTo(11,0),i.lineTo(13,3),i.lineTo(13,7),i.stroke(),this._cursor="url("+o.toDataURL()+") 0 13, auto"}t.cursor&&(this._cursor=t.cursor)},ol.ext.inherits(ol.interaction.FillAttribute,ol.interaction.Select),ol.interaction.FillAttribute.prototype.setCursor=function(t){this._cursor=t},ol.interaction.FillAttribute.prototype.getCursor=function(){return this._cursor},ol.interaction.FillAttribute.prototype.setActive=function(t){t!==this.getActive()&&(ol.interaction.Select.prototype.setActive.call(this,t),this.getMap()&&this._cursor&&(t?(this._previousCursor=this.getMap().getTargetElement().style.cursor,this.getMap().getTargetElement().style.cursor=this._cursor):(this.getMap().getTargetElement().style.cursor=this._previousCursor,this._previousCursor=void 0)))},ol.interaction.FillAttribute.prototype.setAttributes=function(t){this._attributes=t},ol.interaction.FillAttribute.prototype.setAttribute=function(t,e){this._attributes[t]=e},ol.interaction.FillAttribute.prototype.getAttributes=function(){return this._attributes},ol.interaction.FillAttribute.prototype.getAttribute=function(t){return this._attributes[t]},ol.interaction.FillAttribute.prototype.fill=function(t,e){if(t.length&&e){for(var o,i=!1,n=0;o=t[n];n++){for(var r in e)o.get(r)!==e[r]&&(i=!0);if(i)break}i&&(this.dispatchEvent({type:"setattributestart",features:t,properties:e}),t.forEach(function(t){for(var o in e)t.set(o,e[o])}),this.dispatchEvent({type:"setattributeend",features:t,properties:e}))}},ol.interaction.Flashlight=function(t){ol.interaction.Pointer.call(this,{handleDownEvent:this.setPosition,handleMoveEvent:this.setPosition}),t=t||{},this.pos=!1,this.radius=t.radius||100,this.setColor(t)},ol.ext.inherits(ol.interaction.Flashlight,ol.interaction.Pointer),ol.interaction.Flashlight.prototype.setMap=function(t){this.getMap()&&this.getMap().render(),this._listener&&ol.Observable.unByKey(this._listener),this._listener=null,ol.interaction.Pointer.prototype.setMap.call(this,t),t&&(this._listener=t.on("postcompose",this.postcompose_.bind(this)))},ol.interaction.Flashlight.prototype.setRadius=function(t){if(this.radius=t,this.getMap())try{this.getMap().renderSync()}catch(t){}},ol.interaction.Flashlight.prototype.setColor=function(t){var e=t.fill?t.fill:[0,0,0,.8],o=ol.color.asArray(e);if(this.startColor=ol.color.asString(o),t.color?o=this.endColor=ol.color.asString(ol.color.asArray(t.color)||t.color):(o[3]=0,this.endColor=ol.color.asString(o)),o[3]=.1,this.midColor=ol.color.asString(o),this.getMap())try{this.getMap().renderSync()}catch(t){}},ol.interaction.Flashlight.prototype.setPosition=function(t){if(t.pixel?this.pos=t.pixel:this.pos=t,this.getMap())try{this.getMap().renderSync()}catch(t){}},ol.interaction.Flashlight.prototype.postcompose_=function(t){var e=ol.ext.getMapCanvas(this.getMap()).getContext("2d"),o=t.frameState.pixelRatio,i=e.canvas.width,n=e.canvas.height;if(e.save(),e.scale(o,o),this.pos){var r=Math.max(i,n),s=e.createRadialGradient(this.pos[0],this.pos[1],i*this.radius/r,this.pos[0],this.pos[1],n*this.radius/r);s.addColorStop(0,this.startColor),s.addColorStop(.8,this.midColor),s.addColorStop(1,this.endColor),e.fillStyle=s,e.fillRect(this.pos[0]-r,this.pos[1]-r,2*r,2*r)}else e.fillStyle=this.startColor,e.fillRect(0,0,i,n);e.restore()},ol.interaction.FocusMap=function(){ol.interaction.Interaction.call(this,{}),this.focusBt=ol.ext.element.create("BUTTON",{on:{focus:function(){this.dispatchEvent({type:"focus"})}.bind(this)},style:{position:"absolute",zIndex:-1,top:0,opacity:0}})},ol.ext.inherits(ol.interaction.FocusMap,ol.interaction.Interaction),ol.interaction.FocusMap.prototype.setMap=function(t){this._listener&&ol.Observable.unByKey(this._listener),this._listener=null,this.getMap()&&this.getMap().getViewport().removeChild(this.focusBt),ol.interaction.Interaction.prototype.setMap.call(this,t),this.getMap()&&(this._listener=this.getMap().on("pointerdown",function(){this.getActive()&&this.focusBt.focus()}.bind(this)),this.getMap().getViewport().appendChild(this.focusBt))},ol.interaction.GeolocationDraw=function(t){t||(t={}),this.geolocation=new ol.Geolocation({projection:"EPSG:4326",trackingOptions:{maximumAge:1e4,enableHighAccuracy:!0,timeout:6e5}}),this.geolocation.on("change",this.draw_.bind(this)),this.path_=[],this.lastPosition_=!1;var e=[255,255,255,1],o=[0,153,255,1],i=new ol.style.Circle({radius:6,fill:new ol.style.Fill({color:o}),stroke:new ol.style.Stroke({color:e,width:1.5})}),n=[new ol.style.Style({stroke:new ol.style.Stroke({color:e,width:5})}),new ol.style.Style({stroke:new ol.style.Stroke({color:o,width:3}),fill:new ol.style.Fill({color:[255,255,255,.5]})})],r=new ol.style.RegularShape({radius:10.5,points:3,rotation:0,fill:new ol.style.Fill({color:o}),stroke:new ol.style.Stroke({color:e,width:1.5})}),s=r.getImage(),a=s.getContext("2d"),l=document.createElement("canvas");l.width=l.height=s.width,l.getContext("2d").drawImage(s,0,0),a.clearRect(0,0,s.width,s.height),a.drawImage(l,0,0,s.width,s.height,3,0,s.width-6,s.height);this.locStyle={error:new ol.style.Style({fill:new ol.style.Fill({color:[255,0,0,.2]})}),warn:new ol.style.Style({fill:new ol.style.Fill({color:[255,192,0,.2]})}),ok:new ol.style.Style({fill:new ol.style.Fill({color:[0,255,0,.2]})})},this.overlayLayer_=new ol.layer.Vector({source:new ol.source.Vector,name:"GeolocationDraw overlay",style:t.style||function(t){return void 0===t.get("heading")?n[1].setImage(i):(n[1].setImage(r),r.setRotation(t.get("heading")||0)),n}}),this.sketch_=[new ol.Feature,new ol.Feature,new ol.Feature],this.overlayLayer_.getSource().addFeatures(this.sketch_),this.features_=t.features,this.source_=t.source,this.condition_=t.condition||function(t){return t.getAccuracy()e&&(r.push(o[a]),s=n)}return r[r.length-1]!==o[o.length-1]&&r.push(o[o.length-1]),t="Polygon"===this.get("type")?new ol.geom.Polygon([r],"XYZM"):new ol.geom.LineString(r,"XYZM")},ol.interaction.GeolocationDraw.prototype.setMap=function(t){this.getMap()&&this.getMap().removeLayer(this.overlayLayer_),ol.interaction.Pointer.prototype.setMap.call(this,t),this.overlayLayer_.setMap(t),t&&this.geolocation.setProjection(t.getView().getProjection())},ol.interaction.GeolocationDraw.prototype.setActive=function(t){if(t!==this.getActive()){if(ol.interaction.Interaction.prototype.setActive.call(this,t),this.overlayLayer_.setVisible(t),this.getMap()){this.geolocation.setTracking(t);try{this.getMap().renderSync()}catch(t){}}if(this.pause(!t),t)this.reset(),this.dispatchEvent({type:"drawstart",feature:this.sketch_[1]});else{var e=this.sketch_[1].clone();e.getGeometry()&&(this.features_&&this.features_.push(e),this.source_&&this.source_.addFeature(e)),this.dispatchEvent({type:"drawend",feature:e})}}},ol.interaction.GeolocationDraw.prototype.simulate=function(t,e){if(this._track&&clearTimeout(this._track.timeout),t){var o=(e=e||{}).delay||1e3;this._track={track:t,pos:0,timeout:setTimeout(function t(){if(this._track.pos>=this._track.track.length)this._track=!1;else{var i=this._track.track[this._track.pos];i[2]=i[3]||0,i[3]=(new Date).getTime(),this._track.pos++,!1!==e.repeat&&(this._track.pos=this._track.pos%this._track.track.length),this.getActive()&&this.draw_(!0,i,e.accuracy),this._track.timeout=setTimeout(t.bind(this),o)}}.bind(this),0)}}else this._track=!1},ol.interaction.GeolocationDraw.prototype.simulating=function(){return!!this._track},ol.interaction.GeolocationDraw.prototype.reset=function(){this.sketch_[1].setGeometry(),this.path_=[],this.lastPosition_=!1},ol.interaction.GeolocationDraw.prototype.start=function(){this.setActive(!0)},ol.interaction.GeolocationDraw.prototype.stop=function(){this.setActive(!1)},ol.interaction.GeolocationDraw.prototype.pause=function(t){this.pause_=!1!==t},ol.interaction.GeolocationDraw.prototype.isPaused=function(){return this.pause_},ol.interaction.GeolocationDraw.prototype.setFollowTrack=function(t){this.set("followTrack",t);var e,o=this.getMap();if(this.getActive()&&o)if("position"!==t&&(e=this.get("minZoom")?Math.max(this.get("minZoom"),o.getView().getZoom()):this.get("zoom")),!1===t||this.lastPosition_)"auto"===t&&this.lastPosition_&&o.getView().animate({center:this.lastPosition_,zoom:e});else{var i=this.path_[this.path_.length-1];i&&o.getView().animate({center:i,zoom:e})}this.lastPosition_=!1,this.dispatchEvent({type:"follow",following:!1!==t})},ol.interaction.GeolocationDraw.prototype.draw_=function(t,e,o){var i=this.getMap();if(i){var n,r,s,a,l;if(this._track){if(!0!==t)return;if(r=e,n=o||10,this.path_&&this.path_.length){var c=this.path_[this.path_.length-1];l=Math.atan2(e[0]-c[0],e[1]-c[1])}var h=new ol.geom.Circle(r,i.getView().getResolution()*n);s=ol.geom.Polygon.fromCircle(h)}else n=(a=this.geolocation).getAccuracy(),r=this.getPosition(a),s=a.getAccuracyGeometry(),l=a.getHeading();switch(this.get("followTrack")){case!0:1==this.get("followTrack")&&(this.get("minZoom")?this.get("minZoom")>i.getView().getZoom()&&i.getView().setZoom(this.get("minZoom")):i.getView().setZoom(this.get("zoom")||16),ol.extent.containsExtent(i.getView().calculateExtent(i.getSize()),s.getExtent())||i.getView().fit(s.getExtent())),i.getView().setCenter(r);break;case"position":i.getView().setCenter(r);break;case"auto":if(this.lastPosition_){var p=i.getView().getCenter();p[0]!=this.lastPosition_[0]||p[1]!=this.lastPosition_[1]?this.setFollowTrack(!1):(i.getView().setCenter(r),this.lastPosition_=r)}else i.getView().setCenter(r),this.get("minZoom")?this.get("minZoom")>i.getView().getZoom()&&i.getView().setZoom(this.get("minZoom")):this.get("zoom")&&i.getView().setZoom(this.get("zoom")),this.lastPosition_=r;break;case"visible":ol.extent.containsCoordinate(i.getView().calculateExtent(i.getSize()),r)||i.getView().setCenter(r)}var u,d=this.sketch_[0];if(d.setGeometry(s),n1?(u=new ol.geom.LineString(this.path_,"XYZM"),this.get("tolerance")&&(u=this.simplify3D(u,this.get("tolerance"))),d.setGeometry(u)):d.setGeometry();break;case"Polygon":this.path_.length>2?(u=new ol.geom.Polygon([this.path_],"XYZM"),this.get("tolerance")&&(u=this.simplify3D(u,this.get("tolerance"))),d.setGeometry(u)):d.setGeometry()}this.dispatchEvent({type:"drawing",feature:this.sketch_[1],geolocation:a})}this.sketch_[2].setGeometry(new ol.geom.Point(r)),this.sketch_[2].set("heading",l),this.dispatchEvent({type:"tracking",feature:this.sketch_[1],geolocation:a})}},ol.interaction.GeolocationDraw.prototype.getPosition=function(t){var e=t.getPosition();return e.push(Math.round(100*(t.getAltitude()||0))/100),e.push(Math.round((new Date).getTime()/1e3)),e},ol.interaction.Hover=function(t){t||(t={});var e=this,o=!1;ol.interaction.Interaction.call(this,{handleEvent:function(i){if(!e.getActive())return!0;switch(i.type){case"pointerdrag":o=!0;break;case"pointerup":o=!1;break;case"pointermove":o||e.handleMove_(i)}return!t.handleEvent||t.handleEvent(i)}}),this.setLayerFilter(t.layerFilter),t.layers&&t.layers.length&&this.setLayerFilter(function(e){return t.layers.indexOf(e)>=0}),this.setFeatureFilter(t.featureFilter),this.set("hitTolerance",t.hitTolerance),this.setCursor(t.cursor)},ol.ext.inherits(ol.interaction.Hover,ol.interaction.Interaction),ol.interaction.Hover.prototype.setMap=function(t){void 0!==this.previousCursor_&&this.getMap()&&(this.getMap().getTargetElement().style.cursor=this.previousCursor_,this.previousCursor_=void 0),ol.interaction.Interaction.prototype.setMap.call(this,t)},ol.interaction.Hover.prototype.setActive=function(t){if(ol.interaction.Interaction.prototype.setActive.call(this,t),this.cursor_&&this.getMap()&&this.getMap().getTargetElement()){var e=this.getMap().getTargetElement().style;void 0!==this.previousCursor_&&(e.cursor=this.previousCursor_,this.previousCursor_=void 0)}},ol.interaction.Hover.prototype.setCursor=function(t){!t&&void 0!==this.previousCursor_&&this.getMap()&&(this.getMap().getTargetElement().style.cursor=this.previousCursor_,this.previousCursor_=void 0),this.cursor_=t},ol.interaction.Hover.prototype.setFeatureFilter=function(t){this.featureFilter_="function"==typeof t?t:function(){return!0}},ol.interaction.Hover.prototype.setLayerFilter=function(t){this.layerFilter_="function"==typeof t?t:function(){return!0}},ol.interaction.Hover.prototype.handleMove_=function(t){var e=this.getMap();if(e){var o,i,n=this,r=e.forEachFeatureAtPixel(t.pixel,function(t,e){return n.featureFilter_.call(null,t,e)?(o=t,i=e,!0):(o=i=null,!1)},{hitTolerance:this.get("hitTolerance"),layerFilter:n.layerFilter_});if(r&&this.dispatchEvent({type:"hover",feature:o,layer:i,coordinate:t.coordinate,pixel:t.pixel,map:t.map,originalEvent:t.originalEvent,dragging:t.dragging}),this.feature_===o&&this.layer_===i||(this.feature_=o,this.layer_=i,o?this.dispatchEvent({type:"enter",feature:o,layer:i,coordinate:t.coordinate,pixel:t.pixel,map:t.map,originalEvent:t.originalEvent,dragging:t.dragging}):this.dispatchEvent({type:"leave",coordinate:t.coordinate,pixel:t.pixel,map:t.map,originalEvent:t.originalEvent,dragging:t.dragging})),this.cursor_){var s=e.getTargetElement().style;r?s.cursor!=this.cursor_&&(this.previousCursor_=s.cursor,s.cursor=this.cursor_):void 0!==this.previousCursor_&&(s.cursor=this.previousCursor_,this.previousCursor_=void 0)}}},ol.interaction.LongTouch=function(t){t||(t={}),this.delay_=t.delay||1e3;var e,o,i=t.handleLongTouchEvent||function(){},n=null,r=t.pixelTolerance||0;ol.interaction.Interaction.call(this,{handleEvent:function(t){if(this.getActive())switch(t.type){case"pointerdown":n&&clearTimeout(n),e=t.pixel,o={type:"longtouch",originalEvent:t.originalEvent,frameState:t.frameState,pixel:t.pixel,coordinate:t.coordinate,map:this.getMap()},n=setTimeout(function(){i(o),o.map.dispatchEvent(o)},this.delay_);break;case"pointerdrag":n&&(Math.abs(t.pixel[0]-e[0])>r||Math.abs(t.pixel[1]-e[1])>r)&&(clearTimeout(n),n=null);break;case"pointerup":n&&(clearTimeout(n),n=null)}else n&&(clearTimeout(n),n=null);return!0}})},ol.ext.inherits(ol.interaction.LongTouch,ol.interaction.Interaction),ol.interaction.Modify.prototype.getModifiedFeatures=function(){var t={};this.dragSegments_.forEach(function(e){var o=e[0].feature;window.ol&&window.ol.util?t[ol.util.getUid(o)]=o:t[ol.getUid(o)]=o});var e=[];for(var o in t)e.push(t[o]);return e},ol.interaction.ModifyFeature=function(t){var e,o;t||(t={}),ol.interaction.Pointer.call(this,{handleEvent:function(t){switch(t.type){case"pointerdown":return e=this.handleDownEvent(t),o=e||this._deleteCondition(t),!e;case"pointerup":return e=!1,this.handleUpEvent(t);case"pointerdrag":return!e||this.handleDragEvent(t);case"pointermove":return!!e||this.handleMoveEvent(t);case"singleclick":case"click":return!o;default:return!0}}}),this.snapDistance_=t.pixelTolerance||10,this.tolerance_=1e-10,this.cursor_=t.cursor,this.sources_=t.sources?t.sources instanceof Array?t.sources:[t.sources]:[],t.source&&this.sources_.push(t.source),t.features&&this.sources_.push(new ol.source.Vector({features:t.features})),this.filterSplit_=t.filter||function(){return!0},this._condition=t.condition||ol.events.condition.primaryAction,this._deleteCondition=t.deleteCondition||ol.events.condition.altKeyOnly,this._insertVertexCondition=t.insertVertexCondition||ol.events.condition.always;var i=function(){return[new ol.style.Style({image:new ol.style.Circle({radius:6,fill:new ol.style.Fill({color:[0,153,255,1]}),stroke:new ol.style.Stroke({color:"#FFF",width:1.25})})})]};t.style&&(i="function"==typeof t.style?t.style:function(){return t.style}),this.overlayLayer_=new ol.layer.Vector({source:new ol.source.Vector({useSpatialIndex:!1}),name:"Modify overlay",displayInLayerSwitcher:!1,style:i,wrapX:t.wrapX})},ol.ext.inherits(ol.interaction.ModifyFeature,ol.interaction.Pointer),ol.interaction.ModifyFeature.prototype.setMap=function(t){this.getMap()&&this.getMap().removeLayer(this.overlayLayer_),ol.interaction.Interaction.prototype.setMap.call(this,t),this.overlayLayer_.setMap(t)},ol.interaction.ModifyFeature.prototype.setActive=function(t){ol.interaction.Interaction.prototype.setActive.call(this,t),this.overlayLayer_&&this.overlayLayer_.getSource().clear()},ol.interaction.ModifyFeature.prototype.setFilter=function(t){"function"==typeof t?this.filterSplit_=t:void 0===t&&(this.filterSplit_=function(){return!0})},ol.interaction.ModifyFeature.prototype.getClosestFeature=function(t){for(var e,o,i=this.snapDistance_+1,n=0;nthis.snapDistance_)return this.currentFeature&&this.dispatchEvent({type:"select",selected:[],deselected:[this.currentFeature]}),this.currentFeature=null,!1;var l=this.getNearestCoord(o,e.getGeometry());if(l){l=l.coord;var c=this.getMap().getPixelFromCoordinate(l);return ol.coordinate.dist2d(t.pixel,c)2){for(o=c[1].getCoordinates(),i=2;n=c[i];i++){var h=n.getCoordinates();h.shift(),o=o.concat(h)}c=[c[0],new ol.geom.LineString(o)]}if(2===c.length){var p=c[0].getCoordinates(),u=c[1].getCoordinates(),d=p.length+u.length-1;p.pop(),u.shift(),a={geom:t,type:t.getType(),coord1:p,coord2:u,node:t.getCoordinates().length===d,closed:!1}}else if(1===c.length){n=c[0].getCoordinates();var g=ol.coordinate.equal(n[0],e),m=ol.coordinate.equal(n[n.length-1],e);g?(n.shift(),m&&n.pop(),a={geom:t,type:t.getType(),coord1:[],coord2:n,node:!0,closed:m}):m&&(n.pop(),a={geom:t,type:t.getType(),coord1:n,coord2:[],node:!0,closed:!1})}}break;case"MultiLineString":var f=t.getLineStrings();for(i=0;r=f[i];i++)if(a=this.getArcs(r,e)){a.geom=t,a.type=t.getType(),a.lstring=i;break}break;case"Polygon":var y=t.getLinearRings();for(i=0;r=y[i];i++)if(a=this.getArcs(r,e)){a.geom=t,a.type=t.getType(),a.index=i;break}break;case"MultiPolygon":var v=t.getPolygons();for(i=0;r=v[i];i++)if(a=this.getArcs(r,e)){a.geom=t,a.type=t.getType(),a.poly=i;break}break;case"GeometryCollection":for(s=t.getGeometries(),i=0;r=s[i];i++)if(a=this.getArcs(r,e)){a.geom=t,a.g=i,a.typeg=a.type,a.type=t.getType();break}break;default:console.error("ol/interaction/ModifyFeature "+t.getType()+" not supported!")}return a},ol.interaction.ModifyFeature.prototype.handleDownEvent=function(t){if(!this.getActive())return!1;var e=this.getClosestFeature(t);if(e&&(this._condition(t)||this._deleteCondition(t))){var o=[];return this.arcs=[],this.sources_.forEach(function(t){var i=ol.extent.buffer(ol.extent.boundingExtent([e.coord]),this.tolerance_);o=o.concat(o,t.getFeaturesInExtent(i))}.bind(this)),this._modifiedFeatures=[],o.forEach(function(o){var i=this.getArcs(o.getGeometry(),e.coord);i&&(this._insertVertexCondition(t)||i.node)&&(i.feature=o,this._modifiedFeatures.push(o),this.arcs.push(i))}.bind(this)),!this._modifiedFeatures.length||(this._deleteCondition(t)?!this._removePoint(e,t):(this.dispatchEvent({type:"modifystart",coordinate:e.coord,originalEvent:t.originalEvent,features:this._modifiedFeatures}),this.handleDragEvent({coordinate:e.coord,originalEvent:t.originalEvent}),!0))}return!1},ol.interaction.ModifyFeature.prototype.getModifiedFeatures=function(){return this._modifiedFeatures||[]},ol.interaction.ModifyFeature.prototype.removePoint=function(){this._removePoint({},{})},ol.interaction.ModifyFeature.prototype._getModification=function(t){var e=t.coord1.concat(t.coord2);switch(t.type){case"LineString":if(t.closed&&e.push(e[0]),e.length>1&&t.geom.getCoordinates().length!=e.length)return t.coords=e,!0;break;case"MultiLineString":if(t.closed&&e.push(e[0]),e.length>1){var o=t.geom.getCoordinates();if(o[t.lstring].length!=e.length)return o[t.lstring]=e,t.coords=o,!0}break;case"Polygon":if(t.closed&&e.push(e[0]),e.length>3&&(o=t.geom.getCoordinates())[t.index].length!=e.length)return o[t.index]=e,t.coords=o,!0;break;case"MultiPolygon":if(t.closed&&e.push(e[0]),e.length>3&&(o=t.geom.getCoordinates())[t.poly][t.index].length!=e.length)return o[t.poly][t.index]=e,t.coords=o,!0;break;case"GeometryCollection":t.type=t.typeg;var i=t.geom,n=i.getGeometries();t.geom=n[t.g];var r=this._getModification(t);return i.setGeometries(n),t.geom=i,t.type="GeometryCollection",r}return!1},ol.interaction.ModifyFeature.prototype._removePoint=function(t,e){if(!this.arcs)return!1;this.overlayLayer_.getSource().clear();var o=!1;return this.arcs.forEach(function(t){o=o||this._getModification(t)}.bind(this)),o&&(this.dispatchEvent({type:"modifystart",coordinate:t.coord,originalEvent:e.originalEvent,features:this._modifiedFeatures}),this.arcs.forEach(function(t){if("GeometryCollection"===t.geom.getType()){if(t.coords){var e=t.geom.getGeometries();e[t.g].setCoordinates(t.coords),t.geom.setGeometries(e)}}else t.coords&&t.geom.setCoordinates(t.coords)}.bind(this)),this.dispatchEvent({type:"modifyend",coordinate:t.coord,originalEvent:e.originalEvent,features:this._modifiedFeatures})),this.arcs=[],o},ol.interaction.ModifyFeature.prototype.handleUpEvent=function(t){return!!this.getActive()&&(!this.arcs||!this.arcs.length||(this.overlayLayer_.getSource().clear(),this.dispatchEvent({type:"modifyend",coordinate:t.coordinate,originalEvent:t.originalEvent,features:this._modifiedFeatures}),this.arcs=[],!0))},ol.interaction.ModifyFeature.prototype.setArcCoordinates=function(t,e){var o;switch(t.type){case"Point":t.geom.setCoordinates(e[0]);break;case"MultiPoint":(o=t.geom.getCoordinates())[t.index]=e[0],t.geom.setCoordinates(o);break;case"LineString":t.geom.setCoordinates(e);break;case"MultiLineString":(o=t.geom.getCoordinates())[t.lstring]=e,t.geom.setCoordinates(o);break;case"Polygon":(o=t.geom.getCoordinates())[t.index]=e,t.geom.setCoordinates(o);break;case"MultiPolygon":(o=t.geom.getCoordinates())[t.poly][t.index]=e,t.geom.setCoordinates(o);break;case"GeometryCollection":t.type=t.typeg;var i=t.geom,n=i.getGeometries();t.geom=n[t.g],this.setArcCoordinates(t,e),i.setGeometries(n),t.geom=i,t.type="GeometryCollection"}},ol.interaction.ModifyFeature.prototype.handleDragEvent=function(t){if(!this.getActive())return!1;if(!this.arcs)return!0;this.overlayLayer_.getSource().clear();var e=new ol.Feature(new ol.geom.Point(t.coordinate));return this.overlayLayer_.getSource().addFeature(e),!this.arcs.length||(this.arcs.forEach(function(e){var o=e.coord1.concat([t.coordinate],e.coord2);e.closed&&o.push(t.coordinate),this.setArcCoordinates(e,o)}.bind(this)),this.dispatchEvent({type:"modifying",coordinate:t.coordinate,originalEvent:t.originalEvent,features:this._modifiedFeatures}),!0)},ol.interaction.ModifyFeature.prototype.handleMoveEvent=function(t){if(!this.getActive())return!1;this.overlayLayer_.getSource().clear();var e=this.getClosestFeature(t);if(e){var o=new ol.Feature(new ol.geom.Point(e.coord));this.overlayLayer_.getSource().addFeature(o)}var i=t.map.getTargetElement();this.cursor_&&(e?i.style.cursor!=this.cursor_&&(this.previousCursor_=i.style.cursor,i.style.cursor=this.cursor_):void 0!==this.previousCursor_&&(i.style.cursor=this.previousCursor_,this.previousCursor_=void 0))},ol.interaction.ModifyFeature.prototype.getCurrentFeature=function(){return this.currentFeature},ol.interaction.ModifyTouch=function(t){var e=this;t||(t={}),this._popup=new ol.Overlay.Popup({popupClass:t.className||"modifytouch",positioning:t.positioning||"bottom-rigth",offsetBox:t.offsetBox||10}),this._source=t.source,this._features=t.features;var o=document.createElement("a");o.appendChild(document.createTextNode(t.title||"remove point")),o.onclick=function(){e.removePoint()},this.setPopupContent(o);var i=(t.pixelTolerance||0)+5;t.condition=function(t){var e,o,n=this.getMap().getFeaturesAtPixel(t.pixel,{hitTolerance:i}),r=!1;if(n){var s=this._features;if(!s){e=[t.pixel[0]-i,t.pixel[1]-i],o=[t.pixel[0]+i,t.pixel[1]+i],e=this.getMap().getCoordinateFromPixel(e),o=this.getMap().getCoordinateFromPixel(o);var a=ol.extent.boundingExtent([e,o]);s=this._source.getFeaturesInExtent(a)}s.getArray&&(s=s.getArray());for(var l,c=0;(l=n[c])&&!(s.indexOf(l)>=0);c++);if(l){e=t.pixel,o=l.getGeometry().getClosestPoint(t.coordinate),o=this.getMap().getPixelFromCoordinate(o);var h=e[0]-o[0],p=e[1]-o[1];r=Math.sqrt(h*h+p*p)1)return!1;var a=n.getGeometry().getClosestPoint(t.coordinate),l=a[0]-t.coordinate[0],c=a[1]-t.coordinate[1];return Math.sqrt(l*l+c*c)/t.frameState.viewState.resolution<5&&{feature:n,hit:a,coordinates:n.getGeometry().getCoordinates(),geom:n.getGeometry().clone(),geomType:s}}return!1},{hitTolerance:5})},ol.interaction.Offset.prototype.handleDownEvent_=function(t){return this.current_=this.getFeatureAtPixel_(t),!!this.current_&&(this.currentStyle_=this.current_.feature.getStyle(),this.source_&&(this.get("duplicate")||t.originalEvent.ctrlKey)?(this.current_.feature=this.current_.feature.clone(),this.current_.feature.setStyle(this._style(this.current_.feature)),this.source_.addFeature(this.current_.feature)):(this.current_.feature.setStyle(this._style(this.current_.feature)),this._modifystart=!0),this.dispatchEvent({type:"offsetstart",feature:this.current_.feature,offset:0}),!0)},ol.interaction.Offset.prototype.handleDragEvent_=function(t){this._modifystart&&(this.dispatchEvent({type:"modifystart",features:[this.current_.feature]}),this._modifystart=!1);var e,o,i,n,r=this.current_.geom.getClosestPoint(t.coordinate),s=ol.coordinate.dist2d(r,t.coordinate);switch(this.current_.geomType){case"Polygon":if(e=ol.coordinate.findSegment(r,this.current_.coordinates[0]).segment){o=[e[1][0]-e[0][0],e[1][1]-e[0][1]],i=[t.coordinate[0]-r[0],t.coordinate[1]-r[1]],o[0]*i[1]-o[1]*i[0]>0&&(s=-s),n=[];for(var a=0;a0&&(s=-s),n=ol.coordinate.offsetCoords(this.current_.coordinates,s),this.current_.feature.setGeometry(new ol.geom.LineString(n)))}this.dispatchEvent({type:"offsetting",feature:this.current_.feature,offset:s,segment:[r,t.coordinate],coordinate:t.coordinate})},ol.interaction.Offset.prototype.handleUpEvent_=function(t){this._modifystart||this.dispatchEvent({type:"offsetend",feature:this.current_.feature,coordinate:t.coordinate}),this.current_.feature.setStyle(this.currentStyle_),this.current_=!1},ol.interaction.Offset.prototype.handleMoveEvent_=function(t){this.getFeatureAtPixel_(t)?(!1===this.previousCursor_&&(this.previousCursor_=t.map.getTargetElement().style.cursor),t.map.getTargetElement().style.cursor="pointer"):(t.map.getTargetElement().style.cursor=this.previousCursor_,this.previousCursor_=!1)},ol.interaction.Ripple=function(t){ol.interaction.Pointer.call(this,{handleDownEvent:this.rainDrop,handleMoveEvent:this.rainDrop}),t=t||{},this.riprad=t.radius||3,this.ripplemap=[],this.last_map=[],this.rains(this.interval),t.layer.on(["postcompose","postrender"],this.postcompose_.bind(this))},ol.ext.inherits(ol.interaction.Ripple,ol.interaction.Pointer),ol.interaction.Ripple.prototype.rains=function(t){this.onrain&&clearTimeout(this.onrain);var e=this,o=("number"==typeof t?t:1e3)/2,i=3*o/2,n=Math.random;i&&function t(){e.width&&e.rainDrop([n()*e.width,n()*e.height]),e.onrain=setTimeout(t,n()*o+i)}()},ol.interaction.Ripple.prototype.rainDrop=function(t){if(this.width){var e,o;t.pixel?(e=t.pixel[0]*this.ratio,o=t.pixel[1]*this.ratio):(e=t[0]*this.ratio,o=t[1]*this.ratio),e<<=0;for(var i=(o<<=0)-this.riprad*this.ratio;i>1,this.half_height=this.height>>1,this.size=this.width*(this.height+2)*2,this.oldind=this.width,this.newind=this.width*(this.height+3);for(var l=0;l>1,i-=this.ripplemap[g],i-=i>>5,this.ripplemap[g]=i,i=1024-i,this.last_map[l]!=i&&(this.last_map[l]=i,e=((d-this.half_width)*i/1024<<0)+this.half_width,o=((u-this.half_height)*i/1024<<0)+this.half_height,e>=this.width&&(e=this.width-1),e<0&&(e=0),o>=this.height&&(o=this.height-1),o<0&&(o=0),r=4*(e+o*this.width),h[n=4*l]=p[r],h[n+1]=p[r+1],h[n+2]=p[r+2]),++l}s.putImageData(this.ripple,0,0),this.getMap().render()},ol.interaction.SelectCluster=function(t){t=t||{},this.pointRadius=t.pointRadius||12,this.circleMaxObjects=t.circleMaxObjects||10,this.maxObjects=t.maxObjects||60,this.spiral=!1!==t.spiral,this.animate=t.animate,this.animationDuration=t.animationDuration||500,this.selectCluster_=!1!==t.selectCluster,this._autoClose=!1!==t.autoClose;var e=this.overlayLayer_=new ol.layer.Vector({source:new ol.source.Vector({features:new ol.Collection,wrapX:t.wrapX,useSpatialIndex:!0}),name:"Cluster overlay",updateWhileAnimating:!0,updateWhileInteracting:!0,displayInLayerSwitcher:!1,style:t.featureStyle});if(t.layers)if("function"==typeof t.layers){var o=t.layers;t.layers=function(t){return t===e||o(t)}}else t.layers.push&&t.layers.push(this.overlayLayer_);if(t.filter){var i=t.filter;t.filter=function(t,e){return!(!e&&t.get("selectclusterlink"))&&i(t,e)}}else t.filter=function(t,e){return!(!e&&t.get("selectclusterlink"))};this.filter_=t.filter,this._autoClose||t.toggleCondition||(t.toggleCondition=ol.events.condition.singleClick),ol.interaction.Select.call(this,t),this.on("select",this.selectCluster.bind(this))},ol.ext.inherits(ol.interaction.SelectCluster,ol.interaction.Select),ol.interaction.SelectCluster.prototype.setMap=function(t){this.getMap()&&this.getMap().removeLayer(this.overlayLayer_),this._listener&&ol.Observable.unByKey(this._listener),this._listener=null,ol.interaction.Select.prototype.setMap.call(this,t),this.overlayLayer_.setMap(t),t&&t.getView()&&(this._listener=t.getView().on("change:resolution",this.clear.bind(this)))},ol.interaction.SelectCluster.prototype.clear=function(){this.getFeatures().clear(),this.overlayLayer_.getSource().clear()},ol.interaction.SelectCluster.prototype.getLayer=function(){return this.overlayLayer_},ol.interaction.SelectCluster.prototype.selectCluster=function(t){if(t instanceof ol.Feature&&(t={selected:[t]}),t.selected.length){var e=t.selected[0];if(!e.get("selectclusterfeature")){var o=this.overlayLayer_.getSource();this._autoClose&&o.clear();var i=e.get("features");if(i&&1!=i.length){this.selectCluster_||this.getFeatures().clear();var n,r,s,a,l,c,h,p=e.getGeometry().getCoordinates(),u=this.getMap().getView().getResolution(),d=[];if(!this.spiral||i.length<=this.circleMaxObjects)for(a=Math.min(i.length,this.circleMaxObjects),n=u*this.pointRadius*(.5+a/4),s=0;s{t.get("selectcluserfeatures").forEach(t=>{this.overlayLayer_.getSource().removeFeature(t)})})}},ol.interaction.SelectCluster.prototype.animateCluster_=function(t,e){if(this.listenerKey_&&ol.Observable.unByKey(this.listenerKey_),e.length){var o=this.overlayLayer_.getStyle(),i="function"==typeof o?o:o.length?function(){return o}:function(){return[o]},n=this.animationDuration||500,r=(new Date).getTime();this.listenerKey_=this.overlayLayer_.on(["postcompose","postrender"],function(o){for(var s,a=o.vectorContext||ol.render.getVectorContext(o),l=o.frameState.pixelRatio,c=this.getMap().getView().getResolution(),h=ol.easing.easeOut((o.frameState.time-r)/n),p=0;s=e[p];p++)if(s.get("features")){var u=s.getGeometry().getCoordinates();u[0]=t[0]+h*(u[0]-t[0]),u[1]=t[1]+h*(u[1]-t[1]);for(var d=new ol.geom.Point(u),g=i(s,c),m=0;m1)return ol.Observable.unByKey(this.listenerKey_),this.overlayLayer_.getSource().addFeatures(e),void this.overlayLayer_.changed();o.frameState.animate=!0}.bind(this));var s=new ol.Feature(new ol.geom.Point(this.getMap().getView().getCenter()));s.setStyle(new ol.style.Style({image:new ol.style.Circle({})})),this.overlayLayer_.getSource().addFeature(s)}},ol.interaction.SelectCluster.prototype.getClusterExtent=function(t){if(!t.get("features"))return null;var e=ol.extent.createEmpty();return t.get("features").forEach(function(t){e=ol.extent.extend(e,t.getGeometry().getExtent())}),e[0]===e[2]&&e[1]===e[3]?null:e},ol.interaction.SnapGuides=function(t){function e(t,e){var o=t[1][0]-t[0][0],i=t[1][1]-t[0][1],n=e[1][0]-e[0][0],r=e[1][1]-e[0][1],s=o*r-i*n;if(0!=s){var a=(o*t[0][1]-o*e[0][1]-i*t[0][0]+i*e[0][0])/s;return[e[0][0]+a*n,e[0][1]+a*r]}return!1}function o(t,e){var o=t[0]-e[0],i=t[1]-e[1];return Math.sqrt(o*o+i*i)}t||(t={}),this.snapDistance_=t.pixelTolerance||10,this.enableInitialGuides_=t.enableInitialGuides||!1;var i=[new ol.style.Style({stroke:new ol.style.Stroke({color:"#ffcc33",lineDash:[8,5],width:1.25})})];t.style&&(i=t.style instanceof Array?t.style:[t.style]),this.overlaySource_=new ol.source.Vector({features:new ol.Collection,useSpatialIndex:!1});var n=t.vectorClass||ol.layer.Vector;this.overlayLayer_=new n({renderMode:"image",source:this.overlaySource_,style:function(){return i},name:"Snap overlay",displayInLayerSwitcher:!1}),ol.interaction.Interaction.call(this,{handleEvent:function(t){if(this.getActive()){for(var i,n=this.overlaySource_.getFeatures(),r=null,s=null,a=t.frameState.viewState.resolution,l=0;i=n[l];l++){var c=i.getGeometry().getClosestPoint(t.coordinate);if(o(c,t.coordinate)/athis.projExtent_[2]&&(i[2]=this.projExtent_[2]),i[3]>this.projExtent_[3]&&(i[3]=this.projExtent_[3]);var r=t[0][0]-t[1][0],s=t[0][1]-t[1][1],a=1/Math.sqrt(r*r+s*s),l=function(o){for(var l,c=[],h=n*o*2,p=0;(o>0?ph)&&(l=e?[t[0][0]+s*a*p,t[0][1]-r*a*p]:[t[0][0]+r*a*p,t[0][1]+s*a*p],ol.extent.containsCoordinate(i,l));p+=n*o/100)c.push(l);return new ol.Feature(new ol.geom.LineString([c[0],c[c.length-1]]))},c=l(1),h=l(-1);return this.overlaySource_.addFeature(c),this.overlaySource_.addFeature(h),[c,h]}},ol.interaction.SnapGuides.prototype.addOrthoGuide=function(t){return this.addGuide(t,!0)},ol.interaction.SnapGuides.prototype.setDrawInteraction=function(t){var e=this,o=0,i=[];function n(t){var n=t.target.getCoordinates();switch(t.target.getType()){case"Point":return;case"Polygon":n=n[0].slice(0,-1)}var r=n.length;if(2===r&&e.enableInitialGuides_){var s=n[0][0],a=n[0][1];n=[[s,a],[s,a-1]]}if(r!=o&&(e.enableInitialGuides_?r>=2:r>2)){e.clearGuides(i);try{var l=n[r-2],c=n[r-2-1];r>2&&(l[0]!==c[0]||l[1]!==c[1])&&(i=e.addOrthoGuide([n[r-2],n[r-2-1]])),i=(i=i.concat(e.addGuide([n[0],n[1]]))).concat(e.addOrthoGuide([n[0],n[1]])),o=r}catch(t){}}}t.on("drawstart",function(t){t.feature.getGeometry().on("change",n)}),t.on(["drawend","change:active"],function(t){e.clearGuides(i),t.feature&&t.feature.getGeometry().un("change",n),o=0,i=[]})},ol.interaction.SnapGuides.prototype.setModifyInteraction=function(t){function e(t,e){return(t%e+e)%e}var o=this,i=[];function n(t){var n=t.target.vertexFeature_;if(n){var r=t.target.getModifiedFeatures()[0].getGeometry(),s=r.getCoordinates();switch(r.getType()){case"Point":return;case"Polygon":s=s[0].slice(0,-1)}var a=n.getGeometry().getCoordinates(),l=s.findIndex(function(t){return t[0]===a[0]&&t[1]===a[1]}),c=s.length;o.clearGuides(i),i=(i=(i=(i=o.addOrthoGuide([s[e(l-1,c)],s[e(l-2,c)]])).concat(o.addGuide([s[e(l-1,c)],s[e(l-2,c)]]))).concat(o.addGuide([s[e(l+1,c)],s[e(l+2,c)]]))).concat(o.addOrthoGuide([s[e(l+1,c)],s[e(l+2,c)]]))}}t.on("modifystart",function(t){setTimeout(n,0,t)}),t.on("modifyend",function(){o.clearGuides(i),i=[]})},ol.interaction.SnapLayerPixel=function(t){t=t||{},this._layer=t.layer,this._layer.on(["postcompose","postrender"],function(t){this._ctx=t.context}.bind(this));var e=t.radius||8,o=2*e;ol.interaction.Interaction.call(this,{handleEvent:function(t){if(this._layer.getVisible()&&this._layer.getOpacity()&&ol.events.condition.altKeyOnly(t)&&this.getMap()){var i,n,r,s,a=t.pixel[0]-e,l=t.pixel[1]-e,c=this._ctx.getImageData(a,l,o,o).data,h=-1,p=[];for(i=0;i10?u:0)}for(i=1;ih&&(h=d,r=i,s=n)}t.pixel=[a+r,l+s],t.coordinate=this.getMap().getCoordinateFromPixel(t.pixel)}return!0}})},ol.ext.inherits(ol.interaction.SnapLayerPixel,ol.interaction.Interaction),ol.interaction.Split=function(t){t||(t={}),ol.interaction.Interaction.call(this,{handleEvent:function(t){switch(t.type){case"singleclick":return this.handleDownEvent(t);case"pointermove":return this.handleMoveEvent(t);default:return!0}}}),this.snapDistance_=t.snapDistance||25,this.tolerance_=t.tolerance||1e-10,this.cursor_=t.cursor,this.sources_=t.sources?t.sources instanceof Array?t.sources:[t.sources]:[],t.features&&this.sources_.push(new ol.source.Vector({features:t.features})),this.filterSplit_=t.filter||function(){return!0};var e=[255,255,255,1],o=[0,153,255,1],i=new ol.style.Fill({color:"rgba(255,255,255,0.4)"}),n=new ol.style.Stroke({color:"#3399CC",width:1.25}),r=[new ol.style.Style({image:new ol.style.Circle({fill:i,stroke:n,radius:5}),fill:i,stroke:n})],s=[new ol.style.Style({stroke:new ol.style.Stroke({color:e,width:5})}),new ol.style.Style({image:new ol.style.Circle({radius:6,fill:new ol.style.Fill({color:o}),stroke:new ol.style.Stroke({color:e,width:1.5})}),stroke:new ol.style.Stroke({color:o,width:3})})];t.sketchStyle&&(r=t.sketchStyle instanceof Array?t.sketchStyle:[t.sketchStyle]),t.featureStyle&&(s=t.featureStyle instanceof Array?t.featureStyle:[t.featureStyle]),this.overlayLayer_=new ol.layer.Vector({source:new ol.source.Vector({useSpatialIndex:!1}),name:"Split overlay",displayInLayerSwitcher:!1,style:function(t){return t._sketch_?r:s}})},ol.ext.inherits(ol.interaction.Split,ol.interaction.Interaction),ol.interaction.Split.prototype.setMap=function(t){this.getMap()&&this.getMap().removeLayer(this.overlayLayer_),ol.interaction.Interaction.prototype.setMap.call(this,t),this.overlayLayer_.setMap(t)},ol.interaction.Split.prototype.getClosestFeature=function(t){var e,o,i,n,r=this.snapDistance_+1;if(this.sources_.forEach(function(s){var a=s.getClosestFeatureToCoordinate(t.coordinate);if(a&&a.getGeometry().splitAt){var l=a.getGeometry().getClosestPoint(t.coordinate),c=new ol.geom.LineString([t.coordinate,l]),h=c.getLength()/t.frameState.viewState.resolution;hthis.snapDistance_)return!1;var s=this.getNearestCoord(i,o.getGeometry().getCoordinates()),a=this.getMap().getPixelFromCoordinate(s);return ol.coordinate.dist2d(t.pixel,a)1){var n=[];for(o=0;o1)return!1;var c=((t[0][1]-e[1][1])*i-(t[0][0]-e[1][0])*r)/a;if(Math.abs(c)1)return!1;var h=t[0][0]*t[1][1]-t[0][1]*t[1][0],p=e[0][0]*e[1][1]-e[0][1]*e[1][0];return[(h*n-p*i)/a,(h*s-p*r)/a]},ol.interaction.Splitter.prototype.splitSource=function(t,e){this.getActive()&&(this.splitting||(this.source_.dispatchEvent({type:"beforesplit",feaure:t,source:this.source_}),this.dispatchEvent({type:"beforesplit",feaure:t,source:this.source_}),e?this._splitSource(t):setTimeout(function(){this._splitSource(t)}.bind(this))))},ol.interaction.Splitter.prototype._splitSource=function(t){var e,o,i;this.splitting=!0,this.added_=[],this.removed_=[];var n,r=t.getGeometry().getCoordinates(),s=[];function a(e){if(e!==t)for(var o=e.getGeometry().getCoordinates(),i=0;i1))return h=e,!0}return!1}for(e=0;e1){for(o=0;o30&&!this.isout_&&(this.lastSparkle=t.frameState.time,this.sparkles.push({p:[this.sparkle[0]+15*Math.random()-7.5,this.sparkle[1]+15*Math.random()],o:1})),e.save(),e.scale(t.frameState.pixelRatio,t.frameState.pixelRatio),e.fillStyle=this.get("color");for(var i,n=this.sparkles.length-1;i=this.sparkles[n];n--){if(i.o<.2){this.sparkles.splice(0,n+1);break}e.globalAlpha=i.o,e.beginPath(),e.arc(i.p[0],i.p[1],2.2,0,2*Math.PI,!1),e.fill(),i.o*=.98,i.p[0]+=Math.random()-.5,i.p[1]+=o*(1+Math.random())/30}e.restore(),this.sparkles.length&&this.getMap().render()},ol.interaction.TouchCompass=function(t){t=t||{};var e={handleDownEvent:function(t){var e=this.getCenter_(),o=t.pixel[0]-e[0],i=t.pixel[1]-e[1];return this.start=t,Math.sqrt(o*o+i*i)this.get("maxButtons")&&this.set("maxButtons",t.buttons.length);var o=this.overlay.element,i=t.buttons.length>4?0:1;t.buttons.forEach(function(t,e){e<5&&ol.ext.element.create("DIV",{className:((t.className||"")+" ol-button ol-button-"+(e+i)).trim(),html:ol.ext.element.create("DIV",{html:t.html}),click:t.click,on:t.on,parent:o})})}var n=!1,r=!1;this.on("dragstart",function(t){return this._pixel=this.getMap().getPixelFromCoordinate(this.overlay.getPosition()),r=t,!t.overlay}),this.on("dragend",function(t){return this._pixel=this.getMap().getPixelFromCoordinate(this.overlay.getPosition()),!t.overlay||(n?(this.dispatchEvent({type:"dragend",dragging:n,originalEvent:t.originalEvent,frameState:t.frameState,pixel:this._pixel,coordinate:this.overlay.getPosition()}),n=!1):t.originalEvent.target===this.overlay.element&&this.dispatchEvent({type:"click",dragging:n,originalEvent:t.originalEvent,frameState:t.frameState,pixel:this._pixel,coordinate:this.overlay.getPosition()}),!1)}.bind(this)),this.on("dragging",function(t){return this._pixel=this.getMap().getPixelFromCoordinate(this.overlay.getPosition()),!t.overlay||(n=!0,r&&(this.dispatchEvent({type:"dragstart",dragging:n,originalEvent:r.originalEvent,frameState:t.frameState,pixel:this._pixel,coordinate:r.coordinate}),r=!1),this.dispatchEvent({type:"dragging",dragging:n,originalEvent:t.originalEvent,frameState:t.frameState,pixel:this._pixel,coordinate:this.overlay.getPosition()}),!1)}.bind(this))},ol.ext.inherits(ol.interaction.TouchCursor,ol.interaction.DragOverlay),ol.interaction.TouchCursor.prototype.setMap=function(t){for(var e in this.getMap()&&(this.getMap().removeInteraction(this.ctouch),this.getActive()&&this.getMap().removeOverlay(this.overlay)),this._listeners)ol.Observable.unByKey(this._listeners[e]);this._listeners={},ol.interaction.DragOverlay.prototype.setMap.call(this,t),t&&(this.getActive()&&(t.addOverlay(this.overlay),setTimeout(function(){this.setPosition(this.getPosition()||t.getView().getCenter())}.bind(this))),t.addInteraction(this.ctouch),this._listeners.addInteraction=t.getInteractions().on("add",function(e){e.element.get("onTop")||(t.removeInteraction(this.ctouch),t.addInteraction(this.ctouch))}.bind(this)))},ol.interaction.TouchCursor.prototype.setActive=function(t,e){t!==this.getActive()?(this.ctouch.setActive(t),t?(this.getMap()&&this.getMap().addOverlay(this.overlay),e?this.setPosition(e):this.getMap()&&this.setPosition(this.getMap().getView().getCenter()),this._activate=setTimeout(function(){this.overlay.element.classList.add("active")}.bind(this),100)):(this.setPosition(),this.overlay.element.classList.remove("active"),this._activate&&clearTimeout(this._activate),this.getMap()&&this.getMap().removeOverlay(this.overlay)),ol.interaction.DragOverlay.prototype.setActive.call(this,t)):e?this.setPosition(e):this.getMap()&&this.setPosition(this.getMap().getView().getCenter())},ol.interaction.TouchCursor.prototype.setPosition=function(t){this.overlay.setPosition(t,!0),this.getMap()&&t&&(this._pixel=this.getMap().getPixelFromCoordinate(t))},ol.interaction.TouchCursor.prototype.offsetPosition=function(t){var e=this.overlay.getPosition();e&&this.overlay.setPosition([e[0]+t[0],e[1]+t[1]])},ol.interaction.TouchCursor.prototype.getPosition=function(){return this.overlay.getPosition()},ol.interaction.TouchCursor.prototype.getPixel=function(){if(this.getMap())return this.getMap().getPixelFromCoordinate(this.getPosition())},ol.interaction.TouchCursor.prototype.getOverlay=function(){return this.overlay},ol.interaction.TouchCursor.prototype.getOverlayElement=function(){return this.overlay.element},ol.interaction.TouchCursor.prototype.getButtonElement=function(t){return"number"==typeof t?this.getOverlayElement().getElementsByClassName("ol-button")[t]:this.getOverlayElement().getElementsByClassName(t)[0]},ol.interaction.TouchCursor.prototype.removeButton=function(t){if(void 0===t)for(var e=this.getOverlayElement().getElementsByClassName("ol-button"),o=e.length-1;o>=0;o--)this.getOverlayElement().removeChild(e[o]);else{var i=this.getButtonElement(t);i&&this.getOverlayElement().removeChild(i)}},ol.interaction.TouchCursor.prototype.addButton=function(t){var e=this.getOverlayElement().getElementsByClassName("ol-button"),o=this.get("maxButtons")||5;if(e.length>=o)console.error("[ol/interaction/TouchCursor~addButton] too many button on the cursor (max="+o+")...");else{var i=ol.ext.element.create("DIV",{className:((t.className||"")+" ol-button").trim(),html:ol.ext.element.create("DIV",{html:t.html}),click:t.click,on:t.on});t.before&&0!==e.length?this.getOverlayElement().insertBefore(i,e[0]):this.getOverlayElement().appendChild(i);for(var n=e.length>=o?0:1,r=0;r=0&&(this.ispt_&&this.get("translate")||this.get("translateFeature"))&&(e.handle="translate"),e.handle){this.mode_=e.handle,this.opt_=e.option,this.constraint_=e.constraint;var i=this.getMap().getView().getRotation();this.coordinate_=t.coordinate,this.pixel_=t.pixel,this.geoms_=[],this.rotatedGeoms_=[];for(var n,r=ol.extent.createEmpty(),s=ol.extent.createEmpty(),a=0;n=this.selection_.item(a);a++)if(this.geoms_.push(n.getGeometry().clone()),r=ol.extent.extend(r,n.getGeometry().getExtent()),this.get("enableRotatedTransform")&&0!==i){var l=this.getGeometryRotateToZero_(n,!0);this.rotatedGeoms_.push(l),s=ol.extent.extend(s,l.getExtent())}if(this.extent_=ol.geom.Polygon.fromExtent(r).getCoordinates()[0],this.get("enableRotatedTransform")&&0!==i&&(this.rotatedExtent_=ol.geom.Polygon.fromExtent(s).getCoordinates()[0]),"rotate"===this.mode_){this.center_=this.getCenter()||ol.extent.getCenter(r);var c=t.map.getTargetElement();c.style.cursor=this.Cursors.rotate0,this.previousCursor_=c.style.cursor}else this.center_=ol.extent.getCenter(r);return this.angle_=Math.atan2(this.center_[1]-t.coordinate[1],this.center_[0]-t.coordinate[0]),this.dispatchEvent({type:this.mode_+"start",feature:this.selection_.item(0),features:this.selection_,pixel:t.pixel,coordinate:t.coordinate}),!0}if(this.get("selection")){if(o){this.addFn_(t)||this.selection_.clear();var h=this.selection_.getArray().indexOf(o);h<0?this.selection_.push(o):this.selection_.removeAt(h)}else this.selection_.clear();return this.ispt_=1===this.selection_.getLength()&&"Point"==this.selection_.item(0).getGeometry().getType(),this.iscircle_=1===this.selection_.getLength()&&"Circle"==this.selection_.item(0).getGeometry().getType(),this.drawSketch_(),this.watchFeatures_(),this.dispatchEvent({type:"select",feature:o,features:this.selection_,pixel:t.pixel,coordinate:t.coordinate}),!1}}},ol.interaction.Transform.prototype.getFeatures=function(){return this.selection_},ol.interaction.Transform.prototype.getCenter=function(){return this.get("center")},ol.interaction.Transform.prototype.setCenter=function(t){return this.set("center",t)},ol.interaction.Transform.prototype.handleDragEvent_=function(t){if(this._handleEvent(t,this.features_)){var e,o,i,n,r=this.getMap().getView().getRotation(),s=[this.coordinate_[0],this.coordinate_[1]],a=[t.coordinate[0],t.coordinate[1]];switch(this.isUpdating_=!0,this.mode_){case"rotate":var l=Math.atan2(this.center_[1]-a[1],this.center_[0]-a[0]);if(!this.ispt)for(e=0;i=this.selection_.item(e);e++)(n=this.geoms_[e].clone()).rotate(l-this.angle_,this.center_),"Circle"==n.getType()&&n.setCenterAndRadius(n.getCenter(),n.getRadius()),i.setGeometry(n);this.drawSketch_(!0),this.dispatchEvent({type:"rotating",feature:this.selection_.item(0),features:this.selection_,angle:l-this.angle_,pixel:t.pixel,coordinate:t.coordinate});break;case"translate":var c=a[0]-s[0],h=a[1]-s[1];for(e=0;i=this.selection_.item(e);e++)i.getGeometry().translate(c,h);this.handles_.forEach(function(t){t.getGeometry().translate(c,h)}),this.coordinate_=t.coordinate,this.dispatchEvent({type:"translating",feature:this.selection_.item(0),features:this.selection_,delta:[c,h],pixel:t.pixel,coordinate:t.coordinate});break;case"scale":var p=this.center_;if(this.get("modifyCenter")(t)){var u=this.extent_;this.get("enableRotatedTransform")&&0!==r&&(u=this.rotatedExtent_),p=u[(Number(this.opt_)+2)%4]}var d=1==this.geoms_.length&&this._isRectangle(this.geoms_[0]),g=this.constraint_,m=this.opt_,f=this.coordinate_,y=t.coordinate;if(this.get("enableRotatedTransform")&&0!==r){var v=new ol.geom.Point(this.coordinate_);v.rotate(-1*r,p),f=v.getCoordinates();var _=new ol.geom.Point(t.coordinate);_.rotate(-1*r,p),y=_.getCoordinates()}var x=(y[0]-p[0])/(f[0]-p[0]),b=(y[1]-p[1])/(f[1]-p[1]),w=[y[0]-f[0],y[1]-f[1]];if(this.get("enableRotatedTransform")&&0!==r){var S=new ol.geom.Point(p);S.rotate(-1*r,this.getMap().getView().getCenter()),p=S.getCoordinates()}for(this.get("noFlip")&&(x<0&&(x=-x),b<0&&(b=-b)),this.constraint_?"h"==this.constraint_?x=1:b=1:this.get("keepAspectRatio")(t)&&(x=b=Math.min(x,b)),e=0;i=this.selection_.item(e);e++)(n=0!==r&&this.get("enableRotatedTransform")?this.rotatedGeoms_[e].clone():this.geoms_[e].clone()).applyTransform(function(t,e,i){if(i<2)return e;if(d){var r=[[6],[0,8],[2],[4]],s=[t[0],t[1]],a=[t[2],t[3]],l=[t[4],t[5]],c=[t[6],t[7]],h=[t[8],t[9]];if(g){var u=m%2==0?countVector(s,a):countVector(c,s),f=projectVectorOnVector(w,u),v=[...r[m],...r[m+1this.get("maxLength");)this.shift();if(this.get("maxSize"))for(;this.length()>1&&this.size()>this.get("maxSize");)this.shift()},ol.interaction.UndoRedo.prototype.getStack=function(t){return"redo"===t?this._redo:this._undo},ol.interaction.UndoRedo.prototype.push=function(t,e,o){return this._defs[t]?(this._undoStack.push({type:t,name:o,custom:!0,prop:e}),!0):(console.warn('[UndoRedoInteraction]: "'+t+'" is not defined.'),!1)},ol.interaction.UndoRedo.prototype.shift=function(){this._doShift=!0;var t=this._undoStack.removeAt(0);if(this._doShift=!1,"blockstart"===t.type)for(t=this._undoStack.item(0);this._undoStack.getLength()&&t.level>0;)this._undoStack.removeAt(0),t=this._undoStack.item(0)},ol.interaction.UndoRedo.prototype.setActive=function(t){ol.interaction.Interaction.prototype.setActive.call(this,t),this._record=t},ol.interaction.UndoRedo.prototype.setMap=function(t){this._mapListener&&this._mapListener.forEach(function(t){ol.Observable.unByKey(t)}),this._mapListener=[],ol.interaction.Interaction.prototype.setMap.call(this,t),t&&(this._mapListener.push(t.on("undoblockstart",this.blockStart.bind(this))),this._mapListener.push(t.on("undoblockend",this.blockEnd.bind(this)))),this._watchSources(),this._watchInteractions()},ol.interaction.UndoRedo.prototype._watchSources=function(){var t=this.getMap();this._sourceListener&&this._sourceListener.forEach(function(t){ol.Observable.unByKey(t)}),this._sourceListener=[];var e=this;t&&(function t(o,i){return i||(i=[]),o.forEach(function(o){o instanceof ol.layer.Vector?(!e._layers||e._layers.indexOf(o)>=0)&&i.push(o):o.getLayers&&t(o.getLayers(),i)}),i}(t.getLayers()).forEach(function(t){var e=t.getSource();this._sourceListener.push(e.on(["addfeature","removefeature"],this._onAddRemove.bind(this))),this._sourceListener.push(e.on("clearstart",function(){this.blockStart("clear")}.bind(this))),this._sourceListener.push(e.on("clearend",this.blockEnd.bind(this)))}.bind(this)),this._sourceListener.push(t.getLayers().on(["add","remove"],this._watchSources.bind(this))))},ol.interaction.UndoRedo.prototype._watchInteractions=function(){var t=this.getMap();this._interactionListener&&this._interactionListener.forEach(function(t){ol.Observable.unByKey(t)}),this._interactionListener=[],t&&(t.getInteractions().forEach(function(t){this._interactionListener.push(t.on(["setattributestart","modifystart","rotatestart","translatestart","scalestart","deletestart","deleteend","beforesplit","aftersplit"],this._onInteraction.bind(this)))}.bind(this)),this._interactionListener.push(t.getInteractions().on(["add","remove"],this._watchInteractions.bind(this))))},ol.interaction.UndoRedo.prototype._onAddRemove=function(t){this._record&&(this._redoStack.clear(),this._redo.length=0,this._undoStack.push({type:t.type,source:t.target,feature:t.feature}))},ol.interaction.UndoRedo.prototype._onInteraction=function(t){var e=this._onInteraction[t.type];e&&e.call(this,t)},ol.interaction.UndoRedo.prototype._onInteraction.setattributestart=function(t){this.blockStart(t.target.get("name")||"setattribute");var e=Object.assign({},t.properties);t.features.forEach(function(t){var o={};for(var i in e)o[i]=t.get(i);this._undoStack.push({type:"changeattribute",feature:t,newProperties:e,oldProperties:o})}.bind(this)),this.blockEnd()},ol.interaction.UndoRedo.prototype._onInteraction.rotatestart=ol.interaction.UndoRedo.prototype._onInteraction.translatestart=ol.interaction.UndoRedo.prototype._onInteraction.scalestart=ol.interaction.UndoRedo.prototype._onInteraction.modifystart=function(t){this.blockStart(t.type.replace(/start$/,"")),t.features.forEach(function(t){this._undoStack.push({type:"changegeometry",feature:t,oldGeom:t.getGeometry().clone()})}.bind(this)),this.blockEnd()},ol.interaction.UndoRedo.prototype.blockStart=function(t){this._redoStack.clear(),this._redo.length=0,this._undoStack.push({type:"blockstart",name:t}),this._level++},ol.interaction.UndoRedo.prototype._onInteraction.beforesplit=function(){var t=this._undoStack.getLength();t>2&&"blockend"===this._undoStack.item(t-1).type&&"changegeometry"===this._undoStack.item(t-2).type?this._undoStack.pop():this.blockStart("split")},ol.interaction.UndoRedo.prototype._onInteraction.deletestart=function(){this.blockStart("delete")},ol.interaction.UndoRedo.prototype.blockEnd=function(){this._undoStack.push({type:"blockend"}),this._level--},ol.interaction.UndoRedo.prototype._onInteraction.aftersplit=ol.interaction.UndoRedo.prototype._onInteraction.deleteend=ol.interaction.UndoRedo.prototype.blockEnd,ol.interaction.UndoRedo.prototype._handleDo=function(t,e){if(this.getActive()){if(this._record=!1,t.custom)this._defs[t.type]?e?this._defs[t.type].undo(t.prop):this._defs[t.type].redo(t.prop):console.warn('[UndoRedoInteraction]: "'+t.type+'" is not defined.');else switch(t.type){case"addfeature":e?t.source.removeFeature(t.feature):t.source.addFeature(t.feature);break;case"removefeature":e?t.source.addFeature(t.feature):t.source.removeFeature(t.feature);break;case"changegeometry":var o=t.feature.getGeometry();t.feature.setGeometry(t.oldGeom),t.oldGeom=o;break;case"changeattribute":var i=t.newProperties,n=t.oldProperties;for(var r in n)void 0===n?t.feature.unset(r):t.feature.set(r,n[r]);t.oldProperties=i,t.newProperties=n;break;case"blockstart":this._block+=e?-1:1;break;case"blockend":this._block+=e?1:-1;break;default:console.warn('[UndoRedoInteraction]: "'+t.type+'" is not defined.')}this._block<0&&(this._block=0),this._block&&(e?this.undo():this.redo()),this._record=!0,this.dispatchEvent({type:e?"undo":"redo",action:t})}},ol.interaction.UndoRedo.prototype.undo=function(){var t=this._undoStack.item(this._undoStack.getLength()-1);t&&(this._redoStack.push(t),this._undoStack.pop(),this._handleDo(t,!0))},ol.interaction.UndoRedo.prototype.redo=function(){var t=this._redoStack.item(this._redoStack.getLength()-1);t&&(this._undoStack.push(t),this._redoStack.pop(),this._handleDo(t,!1))},ol.interaction.UndoRedo.prototype.clear=function(){this._doClear=!0,this._undo.length=this._redo.length=0,this._undoStack.clear(),this._redoStack.clear(),this._doClear=!1,this.dispatchEvent({type:"stack:clear"})},ol.interaction.UndoRedo.prototype.hasUndo=function(){return this._undoStack.getLength()},ol.interaction.UndoRedo.prototype.hasRedo=function(){return this._redoStack.getLength()},ol.source.BinBase=function(t){t=t||{},this._bindModify=this._onModifyFeature.bind(this),this._watch=!0,ol.source.Vector.call(this,t),this._origin=t.source,this._listen=!1!==t.listenChange,this._geomFn=t.geometryFunction||ol.coordinate.getFeatureCenter||function(t){return t.getGeometry().getFirstCoordinate()},this.reset(),this._origin.on("addfeature",this._onAddFeature.bind(this)),this._origin.on("removefeature",this._onRemoveFeature.bind(this)),this._origin.on("clearstart",this._onClearFeature.bind(this)),this._origin.on("clearend",this._onClearFeature.bind(this)),"function"==typeof t.flatAttributes&&(this._flatAttributes=t.flatAttributes)},ol.ext.inherits(ol.source.BinBase,ol.source.Vector),ol.source.BinBase.prototype._onAddFeature=function(t,e,o){var i=t.feature||t.target;(e=e||this.getBinAt(this._geomFn(i),!0))&&e.get("features").push(i),this._listen&&!1!==o&&i.on("change",this._bindModify)},ol.source.BinBase.prototype._onRemoveFeature=function(t,e,o){if(this._watch){var i=t.feature||t.target;if(e=e||this.getBinAt(this._geomFn(i))){for(var n,r=e.get("features"),s=0;n=r[s];s++)if(n===i){r.splice(s,1);break}r.length||this.removeFeature(e)}this._listen&&!1!==o&&i.un("change",this._bindModify)}},ol.source.BinBase.prototype._onClearFeature=function(t){"clearstart"===t.type?(this._listen&&this._origin.getFeatures().forEach(function(t){t.un("change",this._bindModify)}.bind(this)),this.clear(),this._watch=!1):this._watch=!0},ol.source.BinBase.prototype.getBin=function(t){for(var e,o=this.getFeatures(),i=0;e=o[i];i++)for(var n,r=e.get("features"),s=0;n=r[s];s++)if(n===t)return e;return null},ol.source.BinBase.prototype.getGridGeomAt=function(t){return new ol.geom.Polygon([t])},ol.source.BinBase.prototype.getBinAt=function(t,e){var o={},i=this.getGridGeomAt(t,o);if(!i)return null;var n=i.getInteriorPoint?i.getInteriorPoint().getCoordinates():i.getInteriorPoints().getCoordinates()[0],r=this.getFeaturesAtCoordinate(n)[0];return!r&&e&&(o.geometry=i,o.features=[],o.center=n,r=new ol.Feature(o),this.addFeature(r)),r||null},ol.source.BinBase.prototype._onModifyFeature=function(t){var e=this.getBin(t.target),o=this.getBinAt(this._geomFn(t.target),"create");e!==o&&(e&&this._onRemoveFeature(t,e,!1),o&&this._onAddFeature(t,o,!1)),this.changed()},ol.source.BinBase.prototype.reset=function(){this.clear();for(var t,e=this._origin.getFeatures(),o=0;t=e[o];o++)this._onAddFeature({feature:t});this.changed()},ol.source.BinBase.prototype.getGridFeatures=function(){var t=[];return this.getFeatures().forEach(function(e){var o=new ol.Feature(e.getGeometry().clone());for(var i in e.getProperties())"features"!==i&&"geometry"!==i&&o.set(i,e.get(i));o.set("nb",e.get("features").length),this._flatAttributes(o,e.get("features")),t.push(o)}.bind(this)),t},ol.source.BinBase.prototype._flatAttributes=function(){},ol.source.BinBase.prototype.setFlatAttributesFn=function(t){"function"==typeof t&&(this._flatAttributes=t)},ol.source.BinBase.prototype.getSource=function(){return this._origin},ol.source.DBPedia=function(t){var e=t||{};e.loader=this._loaderFn,this._url=e.url||"http://fr.dbpedia.org/sparql",this._maxResolution=e.maxResolution||100,this._lang=e.lang||"fr",this._limit=e.limit||1e3,e.attributions||(e.attributions=["© DBpedia CC-by-SA"]),e.strategy||(e.strategy=ol.loadingstrategy.bbox),ol.source.Vector.call(this,e)},ol.ext.inherits(ol.source.DBPedia,ol.source.Vector),ol.source.DBPedia.prototype.readFeature=function(t,e,o){for(var i in e)"uri"===e[i].type&&(e[i].value=encodeURI(e[i].value)),t.set(i,e[i].value);return!o||o.get("subject")!=e.subject.value||(o.set("type",o.get("type")+"\n"+e.type.value),!1)},ol.source.DBPedia.prototype.querySubject=function(){return"?subject rdfs:label ?label. OPTIONAL {?subject dbpedia-owl:thumbnail ?thumbnail}.OPTIONAL {?subject dbpedia-owl:abstract ?abstract} . OPTIONAL {?subject rdf:type ?type}"},ol.source.DBPedia.prototype.queryFilter=function(){return"lang(?label) = '"+this._lang+"' && lang(?abstract) = '"+this._lang+"'"},ol.source.DBPedia.prototype._loaderFn=function(t,e,o){if(!(e>this._maxResolution)){var i=this,n=ol.proj.transformExtent(t,o,"EPSG:4326"),r="PREFIX geo: SELECT DISTINCT * WHERE { ?subject geo:lat ?lat . ?subject geo:long ?long . "+this.querySubject()+" . FILTER("+this.queryFilter()+") . FILTER(xsd:float(?lat) <= "+n[3]+" && "+n[1]+" <= xsd:float(?lat) && xsd:float(?long) <= "+n[2]+" && "+n[0]+" <= xsd:float(?long) ) . } LIMIT "+this._limit;ol.ext.Ajax.get({url:this._url,data:{query:r,format:"json"},success:function(t){var e,n,r,s=t.results.bindings,a=[],l=null;for(var c in s)e=s[c],n=[Number(s[c].long.value),Number(s[c].lat.value)],r=new ol.Feature(new ol.geom.Point(ol.proj.transform(n,"EPSG:4326",o))),i.readFeature(r,e,l)&&(a.push(r),l=r);i.addFeatures(a)}})}},ol.style.clearDBPediaStyleCache,ol.style.dbPediaStyleFunction,function(){var t={};ol.style.clearDBPediaStyleCache=function(){t={}},ol.style.dbPediaStyleFunction=function(e){var o;switch(e||(e={}),typeof e.glyph){case"function":o=e.glyph;break;case"string":o=function(){return e.glyph};break;default:o=function(t){var e=t.get("type");if(e){if(e.match("/Museum"))return"fa-camera";if(e.match("/Monument"))return"fa-building";if(e.match("/Sculpture"))return"fa-android";if(e.match("/Religious"))return"fa-institution";if(e.match("/Castle"))return"fa-key";if(e.match("Water"))return"fa-tint";if(e.match("Island"))return"fa-leaf";if(e.match("/Event"))return"fa-heart";if(e.match("/Artwork"))return"fa-asterisk";if(e.match("/Stadium"))return"fa-futbol-o";if(e.match("/Place"))return"fa-street-view"}return"fa-star"}}var i=e.radius||8,n=e.fill||new ol.style.Fill({color:"navy"}),r=e.stroke||new ol.style.Stroke({color:"#fff",width:2}),s=e.prefix?e.prefix+"_":"";return function(e){var a=o(e),l=s+a,c=t[l];return c||(t[l]=c=new ol.style.Style({image:new ol.style.FontSymbol({glyph:a,radius:i,fill:n,stroke:r})})),[c]}}}(),ol.source.DFCI=function(t){(t=t||{}).loader=this._calcGrid,t.strategy=function(t,e){return this.resolution&&this.resolution!=e&&(this.clear(),this.refresh()),[t]},this._bbox=[[0,16e5],[11e5,26e5]],ol.source.Vector.call(this,t),this.set("resolutions",t.resolutions||[1e3,100,20]),proj4.defs["EPSG:27572"]||proj4.defs("EPSG:27572","+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"),ol.proj.proj4.register(proj4)},ol.ext.inherits(ol.source.DFCI,ol.source.Vector),ol.source.DFCI.prototype._calcGrid=function(t,e,o){var i,n,r=this.get("resolutions");e>(r[0]||1e3)?this.resolution!=e&&(this._features0||(n=[this._bbox[0][0],this._bbox[0][1],this._bbox[1][0],this._bbox[1][1]],this._features0=this._getFeatures(0,n,o)),this.addFeatures(this._features0)):e>(r[1]||100)?(this.clear(),n=ol.proj.transformExtent(t,o,"EPSG:27572"),i=this._getFeatures(1,n,o),this.addFeatures(i)):e>(r[2]||0)?(this.clear(),n=ol.proj.transformExtent(t,o,"EPSG:27572"),i=this._getFeatures(2,n,o),this.addFeatures(i)):(this.clear(),n=ol.proj.transformExtent(t,o,"EPSG:27572"),i=this._getFeatures(3,n,o),this.addFeatures(i)),this.resolution=e},ol.source.DFCI.prototype._midPt=function(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]},ol.source.DFCI.prototype._trFeature=function(t,e,o,i){var n=new ol.geom.Polygon([t]),r=new ol.Feature(n.transform("EPSG:27572",i));return r.set("id",e),r.set("level",o),r},ol.source.DFCI.prototype._getFeatures=function(t,e,o){var i,n=[],r=1e5;t>0&&(r/=5),t>1&&(r/=10);for(var s=[Math.max(this._bbox[0][0],Math.floor(e[0]/r)*r),Math.max(this._bbox[0][1],Math.floor(e[1]/r)*r)],a=[Math.min(this._bbox[1][0]+99999,Math.floor(e[2]/r)*r),Math.min(this._bbox[1][1]+99999,Math.floor(e[3]/r)*r)],l=s[0];l<=a[0];l+=r)for(var c=s[1];c<=a[1];c+=r){var h,p=[[l,c],[l+r,c],[l+r,c+r],[l,c+r],[l,c]];if(t>2){var u=this._midPt(p[0],p[2]),d=[];for(i=0;i=-180;v-=d)c.push([v,y]);c.push(c[0])}if("daynight"===n){var _=[];c.forEach(function(t){_.push(t.slice())}),_[0][1]=-_[0][1],_[_.length-1][1]=-_[0][1],_[_.length-1][1]=-_[0][1],c=[c,_]}return c}}(),ol.source.Delaunay=function(t){t=t||{},this._nodes=t.source,delete t.source,ol.source.Vector.call(this,t),this.hull=[],this._nodes.on("addfeature",this._onAddNode.bind(this)),this._nodes.on("removefeature",this._onRemoveNode.bind(this)),this.set("epsilon",t.epsilon||1e-4)},ol.ext.inherits(ol.source.Delaunay,ol.source.Vector),ol.source.Delaunay.prototype.clear=function(t){ol.source.Vector.prototype.clear.call(this,t),this.getNodeSource().clear(t)},ol.source.Delaunay.prototype._addTriangle=function(t){t.push(t[0]);var e=new ol.Feature(new ol.geom.Polygon([t]));return this.addFeature(e),this.flip.push(e),e},ol.source.Delaunay.prototype.getNodes=function(){return this._nodes.getFeatures()},ol.source.Delaunay.prototype.getNodeSource=function(){return this._nodes},ol.source.Delaunay.prototype._onRemoveNode=function(t){var e=t.feature.getGeometry().getCoordinates();if(e&&!this.getNodesAt(e).length){var o,i=this.getTrianglesAt(e);this.flip=[];for(var n=[];i.length;){var r=i.pop();this.removeFeature(r),r=r.getGeometry().getCoordinates()[0];var s=[];for(o=0;o<3;o++)l=r[o],ol.coordinate.equal(l,e)||s.push(l);n.push(s)}for(s=n.pop(),o=0;;){var a=n[o];if(f(a[0],a[1],0)||f(a[1],a[0],0)||f(a[0],a[1],s.length-1)||f(a[1],a[0],s.length-1)?(n.splice(o,1),o=0):o++,!n.length)break;if(o>=n.length)throw"[DELAUNAY:removePoint] No edge found"}var l,c=ol.coordinate.equal(s[0],s[s.length-1]);for(c&&s.pop();l=this.hull[o];o++)if(ol.coordinate.equal(e,l)){this.hull.splice(o,1);break}this.hull=ol.coordinate.convexHull(this.hull.concat(s));var h,p=function(t){for(var e,o=0,i=0;i=0?1:-1},u=s.slice();for(c?h=p(s):(u.push(e),h=p(u)),o=0;o<=s.length+1&&!(s.length<3);o++){var d=[s[o%s.length],s[(o+1)%s.length],s[(o+2)%s.length]];if(p(d)===h){for(var g=!0,m=o+3;m1)this._nodes.removeFeature(i);else if(n.length<=3){if(3===n.length){var s=[];for(e=0;e<3;e++)s.push(n[e].getGeometry().getCoordinates());this._addTriangle(s),this.hull=ol.coordinate.convexHull(s)}}else{var a=this.getFeaturesAtCoordinate(r)[0];if(a){this.removeFeature(a),a.set("del",!0);var l=a.getGeometry().getCoordinates()[0];for(e=0;e<3;e++)this._addTriangle([r,l[e],l[(e+1)%3]])}else{var c=this.hull.slice();for(c.push(r),c=ol.coordinate.convexHull(c),e=0;(o=c[e])&&!ol.coordinate.equal(o,r);e++);var h=c[e=0!==e?e-1:c.length-1],p=c[(e+2)%c.length];for(e=0;(o=this.hull[e])&&!ol.coordinate.equal(o,h);e++);for(;;){if(e>1e3){console.error("[DELAUNAY:addPoint] Too many iterations");break}if(e++,o=this.hull[e%this.hull.length],this._addTriangle([r,o,h]),h=o,o[0]===p[0]&&o[1]===p[1])break}this.hull=c}this.flipTriangles()}}else this._nodes.removeFeature(i)},ol.source.Delaunay.prototype.flipTriangles=function(){for(var t,e=1e3;this.flip.length;){if(e--<0){console.error("[DELAUNAY:flipTriangles] Too many iterations");break}var o=this.flip.pop();if(!o.get("del"))for(var i=o.getGeometry().getCoordinates()[0],n=0;n<3;n++){var r=[(i[(n+1)%3][0]+i[n][0])/2,(i[(n+1)%3][1]+i[n][1])/2],s=this.getTrianglesAt(r),a=null;if(s.length>1){var l=s[0].getGeometry().getCoordinates()[0],c=s[1].getGeometry().getCoordinates()[0];for(t=0;tGéoportail © IGN-France',ol.source.Geoportail.prototype.serviceURL=function(){return this._server?this._server.replace(/^(https?:\/\/[^/]*)(.*)$/,"$1/"+this._gppKey+"$2"):(window.geoportailConfig?window.geoportailConfig.url:"https://wxs.ign.fr/")+this._gppKey+"/geoportail/wmts"},ol.source.Geoportail.prototype.getGPPKey=function(){return this._gppKey},ol.source.Geoportail.prototype.setGPPKey=function(t,e){this._gppKey=t;var o=this.serviceURL();this.setTileUrlFunction(function(){var t=ol.source.Geoportail.prototype.getTileUrlFunction().apply(this,arguments);if(t){var e=t.split("?");return o+"?"+e[1]}return t}),e&&this.setTileLoadFunction(ol.source.Geoportail.tileLoadFunctionWithAuthentication(e,this.getFormat()))},ol.source.Geoportail.prototype.getFeatureInfoUrl=function(t,e,o,i){i=i||{},o||(o=this.getProjection());var n=this.tileGrid.getTileCoordForCoordAndResolution(t,e),r=this.getTileUrlFunction()(n,1,o);if(!r)return r;var s=this.tileGrid.getResolution(n[0]),a=this.tileGrid.getTileCoordExtent(n),l=Math.floor((t[0]-a[0])/(s/1)),c=Math.floor((a[3]-t[1])/(s/1));return r.replace(/Request=GetTile/i,"Request=getFeatureInfo")+"&INFOFORMAT="+(i.INFO_FORMAT||"text/plain")+"&I="+l+"&J="+c},ol.source.Geoportail.prototype.getFeatureInfo=function(t,e,o){var i=this.getFeatureInfoUrl(t,e,null,o);ol.ext.Ajax.get({url:i,dataType:o.format||"text/plain",options:{encode:!1},success:function(t){o.callback&&o.callback(t)},error:o.error||function(){}})},ol.source.Geoportail.tileLoadFunctionWithAuthentication=function(t,e){if(t)return function(o,i){var n=new XMLHttpRequest;n.open("GET",i),n.setRequestHeader("Authorization","Basic "+t),n.responseType="arraybuffer",n.onload=function(){var t=new Uint8Array(this.response),i=new Blob([t],{type:e}),n=(window.URL||window.webkitURL).createObjectURL(i);o.getImage().src=n},n.onerror=function(){o.getImage().src=""},n.send()}},ol.source.GridBin=function(t){t=t||{},ol.source.BinBase.call(this,t),this.set("gridProjection",t.gridProjection||"EPSG:4326"),this.set("size",t.size||1)},ol.ext.inherits(ol.source.GridBin,ol.source.BinBase),ol.source.GridBin.prototype.setGridProjection=function(t){this.set("gridProjection",t),this.reset()},ol.source.GridBin.prototype.setSize=function(t){this.set("size",t),this.reset()},ol.source.GridBin.prototype.getGridGeomAt=function(t){t=ol.proj.transform(t,this.getProjection()||"EPSG:3857",this.get("gridProjection"));var e=this.get("size"),o=e*Math.floor(t[0]/e),i=e*Math.floor(t[1]/e);return new ol.geom.Polygon([[[o,i],[o+e,i],[o+e,i+e],[o,i+e],[o,i]]]).transform(this.get("gridProjection"),this.getProjection()||"EPSG:3857")},ol.source.HexBin=function(t){t=t||{},this._hexgrid=new ol.HexGrid(t),ol.source.BinBase.call(this,t)},ol.ext.inherits(ol.source.HexBin,ol.source.BinBase),ol.source.HexBin.prototype.getGridGeomAt=function(t){var e=this._hexgrid.coord2hex(t);return new ol.geom.Polygon([this._hexgrid.getHexagon(e)])},ol.source.HexBin.prototype.setSize=function(t,e){this._hexgrid.setSize(t),e||this.reset()},ol.source.HexBin.prototype.getSize=function(){return this._hexgrid.getSize()},ol.source.HexBin.prototype.setLayout=function(t,e){this._hexgrid.setLayout(t),e||this.reset()},ol.source.HexBin.prototype.getLayout=function(){return this._hexgrid.getLayout()},ol.source.HexBin.prototype.setOrigin=function(t,e){this._hexgrid.setOrigin(t),e||this.reset()},ol.source.HexBin.prototype.getOrigin=function(){return this._hexgrid.getOrigin()},ol.source.HexBin.prototype.getHexFeatures=function(){return ol.source.BinBase.prototype.getGridFeatures.call(this)},ol.source.IDW=function(t){(t=t||{}).canvasFunction=this.calculateImage,this._source=t.source,this._canvas=document.createElement("CANVAS"),this._source.on(["addfeature","removefeature","clear","removefeature"],function(){this.changed()}.bind(this)),ol.source.ImageCanvas.call(this,t),this.set("scale",t.scale||4),this._weight="function"==typeof t.weight?t.weight:function(e){return e.get(t.weight||"weight")}},ol.ext.inherits(ol.source.IDW,ol.source.ImageCanvas),ol.source.IDW.prototype.getSource=function(){return this._source},ol.source.IDW.prototype.hue2rgb=function(t){return(t=(t+6)%6)<1?Math.round(255*t):t<3?255:t<4?Math.round(255*(4-t)):0},ol.source.IDW.prototype.getColor=function(t){var e=4-.04*t;return[this.hue2rgb(e+2),this.hue2rgb(e),this.hue2rgb(e-2),255]},ol.source.IDW.prototype.setData=function(t,e,o){var i=this.getColor(t);e[o]=i[0],e[o+1]=i[1],e[o+2]=i[2],e[o+3]=i[3]},ol.source.IDW.prototype.getValue=function(t){if(!this._canvas)return null;var e=this.transform(t);return this._canvas.getContext("2d").getImageData(Math.round(e[0]),Math.round(e[1]),1,1).data},ol.source.IDW.prototype.calculateImage=function(t,e,o,i){if(!this._source)return this._canvas;var n,r,s=document.createElement("CANVAS"),a=s.width=Math.round(i[0]/(this.get("scale")*o)),l=s.height=Math.round(i[1]/(this.get("scale")*o)),c=s.getContext("2d"),h=c.getImageData(0,0,a,l),p=[],u=a/(t[2]-t[0]),d=l/(t[1]-t[3]),g=this.transform=function(e,o){return[(e[0]-t[0])*u,(e[1]-t[3])*d,o]};for(this._source.getFeatures().forEach(function(t){p.push(g(t.getGeometry().getFirstCoordinate(),this._weight(t)))}.bind(this)),r=0;rMapillary"]),e.strategy||(e.strategy=ol.loadingstrategy.bbox),ol.source.Vector.call(this,e)},ol.ext.inherits(ol.source.Mapillary,ol.source.Vector),ol.source.Mapillary.prototype.readFeature=function(){return!0},ol.source.Mapillary.prototype._loaderFn=function(t,e,o){if(!(e>this._maxResolution)){var i=ol.proj.transformExtent(t,o,"EPSG:4326"),n=Date.now()-15552e6,r="https://a.mapillary.com/v2/search/im?client_id="+this.get("clientId")+"&max_lat="+i[3]+"&max_lon="+i[2]+"&min_lat="+i[1]+"&min_lon="+i[0]+"&limit="+(this._limit-1)+"&start_time="+n;ol.ext.Ajax.get({url:r,dataType:"jsonp",success:function(t){console.log(t)}})}},ol.source.OilPainting=function(t){t.operation=this._operation,t.operationType="image",ol.source.Raster.call(this,t),this.set("radius",t.radius||4),this.set("intensity",t.intensity||25),this.on("beforeoperations",function(t){var e=Math.round((t.extent[2]-t.extent[0])/t.resolution),o=Math.round((t.extent[3]-t.extent[1])/t.resolution);t.data.image=new ImageData(e,o),t.data.radius=Number(this.get("radius"))||1,t.data.intensity=Number(this.get("intensity"))}.bind(this))},ol.ext.inherits(ol.source.OilPainting,ol.source.Raster),ol.source.OilPainting.prototype.set=function(t,e){if(e)switch(t){case"intensity":case"radius":(e=Number(e))<1&&(e=1),this.changed()}return ol.source.Raster.prototype.set.call(this,t,e)},ol.source.OilPainting.prototype._operation=function(t,e){for(var o=t[0].width,i=t[0].height,n=t[0].data,r=[],s=e.image,a=s.data,l=[],c=[],h=0;h0&&h+v0&&p+_this._maxResolution)){var i=this,n=ol.proj.transformExtent(t,o,"EPSG:4326"),r="[bbox:"+(n=n[1]+","+n[0]+","+n[3]+","+n[2])+"][out:xml][timeout:25];";for(var s in r+="(",this._types)if(this._types[s]){r+=s;for(var a,l=0;a=this._filter[l];l++)r+="["+a+"]";r+=";"}r+=");out;>;out skel qt;";var c=new XMLHttpRequest;c.open("POST",this._url,!0),c.onload=function(){for(var t,e=(new ol.format.OSMXML).readFeatures(this.responseText,{featureProjection:o}),n=[],r=0;t=e[r];r++)i.hasFeature(t)||n.push(t);i.addFeatures(n)},c.onerror=function(){console.log(arguments)},c.send("data="+r)}},ol.source.Overpass.prototype.hasFeature=function(t){for(var e,o=t.getGeometry().getFirstCoordinate(),i=t.getId(),n=this.getFeaturesInExtent([o[0]-.1,o[1]-.1,o[0]+.1,o[1]+.1]),r=0;e=n[r];r++)if(i===e.getId())return!0;return!1},ol.source.TileWFS=function(t){(t=t||{}).featureLimit||(t.featureLimit=1/0);var e=t.tileZoom||14,o={strategy:ol.loadingstrategy.tile(ol.tilegrid.createXYZ({minZoom:e,maxZoom:e,tileSize:512}))},i=new ol.format.GeoJSON,n=t.url+"?service=WFS&request=GetFeature&version="+(t.version||"1.1.0")+"&typename="+(t.typeName||"")+"&outputFormat=application/json";t.maxFeatures&&(n+="&maxFeatures="+t.maxFeatures+"&count="+t.maxFeatures);var r={loading:0,loaded:0};o.loader=function(e,o,s){r.loading===r.loaded&&(r.loading=r.loaded=0,this.getFeatures().length>t.maxFeatures&&(this.clear(),this.refresh())),r.loading++,this.dispatchEvent({type:"tileloadstart",loading:r.loading,loaded:r.loaded}),this._loadTile(n,e,s,i,r)},ol.source.Vector.call(this,o),this.set("pagination",t.pagination)},ol.ext.inherits(ol.source.TileWFS,ol.source.Vector),ol.source.TileWFS.prototype._loadTile=function(t,e,o,i,n){var r=t+"&srsname="+o.getCode()+"&bbox="+e.join(",")+","+o.getCode();this.get("pagination")&&!/&startIndex/.test(t)&&(r+="&startIndex=0"),ol.ext.Ajax.get({url:r,success:function(r){if(n.loaded++,r.error)this.dispatchEvent({type:"tileloaderror",error:r,loading:n.loading,loaded:n.loaded});else{var s=i.readFeatures(r,{featureProjection:o});s.length>0&&this.addFeatures(s);var a=r.numberReturned||0;/&startIndex/.test(t)&&(a+=parseInt(t.replace(/.*&startIndex=(\d*).*/,"$1")),t=t.replace(/&startIndex=(\d*)/,"")),athis.get("maxResolution"))){if(this.res_=400*e,this.animate_){var o=t.frameState.time-this.animate_;othis.animateDuration_&&(this.animate_=!1),!!this.animate_},ol.layer.Vector3D.prototype._getFeatureHeight=function(t){if(this.animate_){var e=this.height_(t),o=this.toHeight_(t);return e*(1-this.elapsedRatio_)+this.elapsedRatio_*o}return this.height_(t)},ol.layer.Vector3D.prototype.hvector_=function(t,e){var o=[t[0]*this.matrix_[0]+t[1]*this.matrix_[1]+this.matrix_[4],t[0]*this.matrix_[2]+t[1]*this.matrix_[3]+this.matrix_[5]];return{p0:o,p1:[o[0]+e/this.res_*(o[0]-this.center_[0]),o[1]+e/this.res_*(o[1]-this.center_[1])]}},ol.layer.Vector3D.prototype.getFeature3D_=function(t,e){var o=this.get("geometry")(t),i=o.getCoordinates();switch(o.getType()){case"Polygon":i=[i];case"MultiPolygon":for(var n=[],r=0;r=0;r--)t.lineTo(n[r].p1[0],n[r].p1[1]);t.closePath()}t.fill("evenodd"),t.stroke();break;case"Point":var a=(n=e[o]).feature.get("label");if(a){var l=n.geom.p1,c=t.measureText(a),h=Number(t.font.match(/\d+(\.\d+)?/g).join([]));t.fillRect(l[0]-c.width/2-5,l[1]-h-5,c.width+10,h+10),t.strokeRect(l[0]-c.width/2-5,l[1]-h-5,c.width+10,h+10),t.save(),t.fillStyle=ol.color.asString(this._style.getText().getFill().getColor()),t.textAlign="center",t.textBaseline="bottom",t.fillText(a,l[0],l[1]),t.restore()}}},ol.source.WikiCommons=function(t){var e=t||{};e.loader=this._loaderFn,this._maxResolution=e.maxResolution||100,this._lang=e.lang||"fr",this._limit=e.limit||100,e.attributions||(e.attributions=["© Wikimedia Commons"]),e.strategy||(e.strategy=ol.loadingstrategy.bbox),ol.source.Vector.call(this,e)},ol.ext.inherits(ol.source.WikiCommons,ol.source.Vector),ol.source.WikiCommons.prototype.readFeature=function(t,e){return t.set("descriptionurl",e.descriptionurl),t.set("url",e.url),t.set("title",e.title.replace(/^file:|.jpg$/gi,"")),t.set("thumbnail",e.url.replace(/^(.+wikipedia\/commons)\/([a-zA-Z0-9]\/[a-zA-Z0-9]{2})\/(.+)$/,"$1/thumb/$2/$3/200px-$3")),t.set("user",e.user),e.extmetadata&&e.extmetadata.LicenseShortName&&t.set("copy",e.extmetadata.LicenseShortName.value),!0},ol.source.WikiCommons.prototype._loaderFn=function(t,e,o){if(!(e>this._maxResolution)){var i=this,n=ol.proj.transformExtent(t,o,"EPSG:4326"),r="https://commons.wikimedia.org/w/api.php?action=query&format=json&origin=*&prop=coordinates|imageinfo&generator=geosearch&iiprop=timestamp|user|url|extmetadata|metadata|size&iiextmetadatafilter=LicenseShortName&ggsbbox="+n[3]+"|"+n[0]+"|"+n[1]+"|"+n[2]+"&ggslimit="+this._limit+"&iilimit="+(this._limit-1)+"&ggsnamespace=6";ol.ext.Ajax.get({url:r,success:function(t){var e,n,r,s=[];if(t.query&&t.query.pages){for(var a in t.query.pages){if((e=t.query.pages[a]).coordinates&&e.coordinates.length)n=[e.coordinates[0].lon,e.coordinates[0].lat];else{var l=e.imageinfo[0].metadata;if(!l)continue;n=[];for(var c=0,h=0;h1e3)return void this.stopAnimation();s=r.start=(new Date).getTime()}if(r.start){var h=t.vectorContext||ol.render.getVectorContext(t),p=(s-r.start)/e;p>1&&(this.stopAnimation(),p=1),p=this.get("animationMethod")(p);var u=this.getStyle(),d="function"==typeof u?u:u.length?function(){return u}:function(){return[u]};for(t.context.save(),t.context.globalAlpha=this.getOpacity(),o=0;c=r.clusters[o];o++){var g=c.f.getGeometry().getCoordinates(),m=g[0]-c.pt[0],f=g[1]-c.pt[1];r.revers?(g[0]=c.pt[0]+p*m,g[1]=c.pt[1]+p*f):(g[0]=g[0]-p*m,g[1]=g[1]-p*f);var y=d(c.f,n,!0);if(y.length||(y=[y]),1!==c.f.get("features").length||m||f){var v=new ol.geom.Point(g);l=new ol.Feature(v)}else l=c.f.get("features")[0];for(var _,x=0;_=y[x];x++)if(_.getText()&&/\n/.test(_.getText().getText())){var b,w=_.getText().getOffsetX(),S=_.getText().getOffsetY(),C=_.getText().getRotation()||0,M=1.2*Number((_.getText().getFont()||"10px").match(/\d+/)),E=_.getText().getText().split("\n"),T=E.length-1,L=_.clone();E.forEach(function(e,o){switch(1==o&&(L.setImage(),L.setFill(),L.setStroke()),_.getText().getTextBaseline()){case"alphabetic":case"ideographic":case"bottom":b=T;break;case"hanging":case"top":b=0;break;default:b=T/2}L.getText().setOffsetX(w-Math.sin(C)*M*(o-b)),L.getText().setOffsetY(S+Math.cos(C)*M*(o-b)),L.getText().setText(e),h.drawFeature(l,ol.ext.getVectorContextStyle(t,L))})}else h.drawFeature(l,ol.ext.getVectorContextStyle(t,_))}t.context.restore(),t.frameState.animate=!0,t.context.save(),t.context.beginPath(),t.context.rect(0,0,0,0),t.context.clip(),this.clip_=!0}}},ol.layer.AnimatedCluster.prototype.postanimate=function(t){this.clip_&&(t.context.restore(),this.clip_=!1)},ol.layer.GeoImage=function(t){ol.layer.Image.call(this,t)},ol.ext.inherits(ol.layer.GeoImage,ol.layer.Image),ol.layer.GeoImage.prototype.getExtent=function(){return this.getSource().getExtent()},ol.layer.Geoportail=function(t,e,o){e=e||{},o=o||{},"string"!=typeof t&&(o=e||{},t=(e=t).layer);var i=e.maxZoom;e.source&&(t=e.source.getLayer(),e.gppKey=e.source.getGPPKey());var n=window.geoportailConfig&&(window.geoportailConfig.capabilities[e.gppKey||e.key]||window.geoportailConfig.capabilities.default)||ol.layer.Geoportail.capabilities;for(var r in(n=n[t])||(n=ol.layer.Geoportail.capabilities[t]),n||(n={title:t,originators:[]},console.error('ol.layer.Geoportail: no layer definition for "'+t+'"\nTry to use ol/layer/Geoportail~loadCapabilities() to get it.')),n)void 0===o[r]&&(o[r]=n[r]);this._originators=n.originators,o.gppKey||o.key||(o.gppKey=e.gppKey||e.key),e.source||(e.source=new ol.source.Geoportail(t,o)),e.title||(e.title=n.title),e.name||(e.name=t),e.layer=t,e.queryable||(e.queryable=n.queryable),e.desc||(e.desc=n.desc),!e.extent&&n.bbox&&n.bbox[0]>-170&&n.bbox[2]<170&&(e.extent=ol.proj.transformExtent(n.bbox,"EPSG:4326",e.projection||"EPSG:3857")),e.maxZoom=i,!e.maxResolution&&o.minZoom&&(e.source.getTileGrid().minZoom-=o.minZoom>1?2:1,e.maxResolution=e.source.getTileGrid().getResolution(e.source.getTileGrid().minZoom),e.source.getTileGrid().minZoom=o.minZoom),ol.layer.Tile.call(this,e)},ol.ext.inherits(ol.layer.Geoportail,ol.layer.Tile),ol.layer.Geoportail.capabilities={"GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2":{key:"cartes",server:"https://wxs.ign.fr/geoportail/wmts",layer:"GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2",title:"Plan IGN v2",format:"image/png",style:"normal",queryable:!1,tilematrix:"PM",minZoom:0,maxZoom:19,bbox:[-175,-85,175,85],desc:"Cartographie multi-échelles sur le territoire national, issue des bases de données vecteur de l’IGN, mis à jour régulièrement et réalisée selon un processus entièrement automatisé. Version actuellement en beta test",originators:{IGN:{href:"http://www.ign.fr",attribution:"Institut national de l'information géographique et forestière",logo:"https://wxs.ign.fr/static/logos/IGN/IGN.gif",minZoom:0,maxZoom:19,constraint:[{minZoom:0,maxZoom:19,bbox:[-175,-85,175,85]}]}}},"CADASTRALPARCELS.PARCELLAIRE_EXPRESS":{key:"parcellaire",server:"https://wxs.ign.fr/geoportail/wmts",layer:"CADASTRALPARCELS.PARCELLAIRE_EXPRESS",title:"PCI vecteur",format:"image/png",style:"PCI vecteur",queryable:!1,tilematrix:"PM",minZoom:0,maxZoom:19,bbox:[-63.37252,-21.475586,55.925865,51.31212],desc:"Plan cadastral informatisé vecteur de la DGFIP.",originators:{IGN:{href:"http://www.ign.fr",attribution:"Institut national de l'information géographique et forestière",logo:"https://wxs.ign.fr/static/logos/IGN/IGN.gif",minZoom:0,maxZoom:19,constraint:[{minZoom:0,maxZoom:19,bbox:[-63.37252,-21.475586,55.925865,51.31212]}]}}},"ORTHOIMAGERY.ORTHOPHOTOS":{key:"ortho",server:"https://wxs.ign.fr/geoportail/wmts",layer:"ORTHOIMAGERY.ORTHOPHOTOS",title:"Photographies aériennes",format:"image/jpeg",style:"normal",queryable:!0,tilematrix:"PM",minZoom:0,bbox:[-178.18713,-22.767689,167.94624,51.11242],desc:"Photographies aériennes",originators:{CRCORSE:{href:"http://www.corse.fr//",attribution:"CRCORSE",logo:"https://wxs.ign.fr/static/logos/CRCORSE/CRCORSE.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[8.428783,41.338627,9.688606,43.08541]}]},SIGLR:{href:"http://www.siglr.org//",attribution:"SIGLR",logo:"https://wxs.ign.fr/static/logos/SIGLR/SIGLR.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[1.6784439,42.316307,4.8729386,44.978218]}]},"BOURGOGNE-FRANCHE-COMTE":{href:"https://www.bourgognefranchecomte.fr/",attribution:"Auvergne",logo:"https://wxs.ign.fr/static/logos/BOURGOGNE-FRANCHE-COMTE/BOURGOGNE-FRANCHE-COMTE.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[2.837849,46.131435,7.1713247,48.408287]}]},FEDER_AUVERGNE:{href:"http://www.europe-en-auvergne.eu/",attribution:"Auvergne",logo:"https://wxs.ign.fr/static/logos/FEDER_AUVERGNE/FEDER_AUVERGNE.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[2.0398402,44.60505,3.38408,45.49146]}]},FEDER_PAYSDELALOIRE:{href:"https://www.europe.paysdelaloire.fr/",attribution:"Pays-de-la-Loire",logo:"https://wxs.ign.fr/static/logos/FEDER_PAYSDELALOIRE/FEDER_PAYSDELALOIRE.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[-2.457367,46.19304,.951426,48.57609]}]},IGN:{href:"http://www.ign.fr",attribution:"Institut national de l'information géographique et forestière",logo:"https://wxs.ign.fr/static/logos/IGN/IGN.gif",minZoom:13,maxZoom:20,constraint:[{minZoom:19,maxZoom:19,bbox:[-63.160706,-21.401262,55.84643,51.11242]},{bbox:[.035491213,43.221077,6.0235267,49.696926]},{minZoom:20,maxZoom:20,bbox:[.035491213,43.221077,6.0235267,49.696926]},{minZoom:13,maxZoom:18,bbox:[-178.18713,-21.401329,55.85611,51.11242]}]},"E-MEGALIS":{href:"http://www.e-megalisbretagne.org//",attribution:"Syndicat mixte de coopération territoriale (e-Megalis)",logo:"https://wxs.ign.fr/static/logos/E-MEGALIS/E-MEGALIS.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[-3.7059498,47.971947,-1.8486879,48.99035]}]},FEDER2:{href:"http://www.europe-en-france.gouv.fr/",attribution:"Fonds européen de développement économique et régional",logo:"https://wxs.ign.fr/static/logos/FEDER2/FEDER2.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[1.3577043,48.824635,4.269964,50.37648]}]},PREFECTURE_GUADELOUPE:{href:"www.guadeloupe.pref.gouv.fr/",attribution:"guadeloupe",logo:"https://wxs.ign.fr/static/logos/PREFECTURE_GUADELOUPE/PREFECTURE_GUADELOUPE.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[-61.82342,14.371942,-60.787838,16.521578]}]},OCCITANIE:{href:"https://www.laregion.fr/",attribution:"La Région Occitanie; Pyrénées - Méditerranée",logo:"https://wxs.ign.fr/static/logos/OCCITANIE/OCCITANIE.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[2.2086434,48.805965,2.4859917,48.915382]}]},RGD_SAVOIE:{href:"http://www.rgd.fr",attribution:"Régie de Gestion de Données des Pays de Savoie (RGD 73-74)",logo:"https://wxs.ign.fr/static/logos/RGD_SAVOIE/RGD_SAVOIE.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:19,maxZoom:19,bbox:[5.7759595,45.65335,7.0887337,46.438328]},{minZoom:13,maxZoom:18,bbox:[5.5923314,45.017353,7.2323394,46.438328]}]},CG45:{href:"http://www.loiret.com",attribution:"Le conseil général du Loiret",logo:"https://wxs.ign.fr/static/logos/CG45/CG45.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[1.4883244,47.471867,3.1349874,48.354233]}]},CRAIG:{href:"http://www.craig.fr",attribution:"Centre Régional Auvergnat de l'Information Géographique (CRAIG)",logo:"https://wxs.ign.fr/static/logos/CRAIG/CRAIG.gif",minZoom:13,maxZoom:20,constraint:[{minZoom:13,maxZoom:19,bbox:[2.0398402,44.60505,6.4295278,46.8038]},{minZoom:20,maxZoom:20,bbox:[2.2243388,44.76621,2.7314367,45.11295]}]},"e-Megalis":{href:"http://www.e-megalisbretagne.org//",attribution:"Syndicat mixte de coopération territoriale (e-Megalis)",logo:"https://wxs.ign.fr/static/logos/e-Megalis/e-Megalis.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[-5.1937118,47.23789,-.98568505,48.980812]}]},PPIGE:{href:"http://www.ppige-npdc.fr/",attribution:"PPIGE",logo:"https://wxs.ign.fr/static/logos/PPIGE/PPIGE.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[1.5212119,49.957302,4.2673664,51.090965]}]},CG06:{href:"http://www.cg06.fr",attribution:"Département Alpes Maritimes (06) en partenariat avec : Groupement Orthophoto 06 (NCA, Ville de Cannes, CARF, CASA,CG06, CA de Grasse) ",logo:"https://wxs.ign.fr/static/logos/CG06/CG06.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[6.6093955,43.44647,7.7436337,44.377018]}]},"MEGALIS-BRETAGNE":{href:"https://www.megalisbretagne.org/",attribution:"Syndicat mixte Mégalis Bretagne",logo:"https://wxs.ign.fr/static/logos/MEGALIS-BRETAGNE/MEGALIS-BRETAGNE.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[-5.2086344,47.591938,-3.3396015,48.808697]}]},FEDER:{href:"http://www.europe-en-france.gouv.fr/",attribution:"Fonds européen de développement économique et régional",logo:"https://wxs.ign.fr/static/logos/FEDER/FEDER.gif",minZoom:0,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[-1.9662633,42.316307,8.25674,50.18387]},{minZoom:0,maxZoom:12,bbox:[-2.400665,41.333557,9.560094,50.366302]}]},"LANGUEDOC-ROUSSILLON":{href:"https://www.laregion.fr/",attribution:"Région Occitanie",logo:"https://wxs.ign.fr/static/logos/LANGUEDOC-ROUSSILLON/LANGUEDOC-ROUSSILLON.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[1.6784439,42.63972,4.208843,43.979004]}]},GRAND_EST:{href:"https://www.grandest.fr/",attribution:"Hauts-de-France",logo:"https://wxs.ign.fr/static/logos/GRAND_EST/GRAND_EST.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[5.362788,47.390827,7.6924667,49.58011]}]},CNES_AUVERGNE:{href:"http://www.cnes.fr/",attribution:"Centre national d'études spatiales (CNES)",logo:"https://wxs.ign.fr/static/logos/CNES_AUVERGNE/CNES_AUVERGNE.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[2.2656832,45.279934,4.0227704,46.8038]}]},HAUTS_DE_FRANCE:{href:"https://www.hautsdefrance.fr/",attribution:"Hauts-de-France",logo:"https://wxs.ign.fr/static/logos/HAUTS_DE_FRANCE/HAUTS_DE_FRANCE.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[2.0740242,48.81521,4.3390365,51.11242]}]},MPM:{href:"http://www.marseille-provence.com/",attribution:"Marseille Provence Métropole",logo:"https://wxs.ign.fr/static/logos/MPM/MPM.gif",minZoom:20,maxZoom:20,constraint:[{minZoom:20,maxZoom:20,bbox:[5.076959,43.153347,5.7168245,43.454994]}]},DITTT:{href:"http://www.dittt.gouv.nc/portal/page/portal/dittt/",attribution:"Direction des Infrastructures, de la Topographie et des Transports Terrestres",logo:"https://wxs.ign.fr/static/logos/DITTT/DITTT.gif",minZoom:13,maxZoom:18,constraint:[{minZoom:13,maxZoom:18,bbox:[163.47784,-22.767689,167.94624,-19.434975]}]},CNES_978:{href:"http://www.cnes.fr/",attribution:"Centre national d'études spatiales (CNES)",logo:"https://wxs.ign.fr/static/logos/CNES_978/CNES_978.gif",minZoom:13,maxZoom:18,constraint:[{minZoom:13,maxZoom:18,bbox:[-63.160706,18.04345,-62.962185,18.133898]}]},CNES_ALSACE:{href:"http://www.cnes.fr/",attribution:"Centre national d'études spatiales (CNES)",logo:"https://wxs.ign.fr/static/logos/CNES_ALSACE/CNES_ALSACE.gif",minZoom:13,maxZoom:18,constraint:[{minZoom:13,maxZoom:18,bbox:[6.8086324,47.39981,7.668318,48.32695]}]},CNES_974:{href:"http://www.cnes.fr/",attribution:"Centre national d'études spatiales (CNES)",logo:"https://wxs.ign.fr/static/logos/CNES_974/CNES_974.gif",minZoom:13,maxZoom:18,constraint:[{minZoom:13,maxZoom:18,bbox:[55.205757,-21.401262,55.84643,-20.862825]}]},CNES_975:{href:"http://www.cnes.fr/",attribution:"Centre national d'études spatiales (CNES)",logo:"https://wxs.ign.fr/static/logos/CNES_975/CNES_975.gif",minZoom:13,maxZoom:18,constraint:[{minZoom:13,maxZoom:18,bbox:[-56.410988,46.734093,-56.10308,47.149963]}]},CNES_976:{href:"http://www.cnes.fr/",attribution:"Centre national d'études spatiales (CNES)",logo:"https://wxs.ign.fr/static/logos/CNES_976/CNES_976.gif",minZoom:13,maxZoom:18,constraint:[{minZoom:13,maxZoom:18,bbox:[44.916977,-13.089187,45.30442,-12.564543]}]},CNES_977:{href:"http://www.cnes.fr/",attribution:"Centre national d'études spatiales (CNES)",logo:"https://wxs.ign.fr/static/logos/CNES_977/CNES_977.gif",minZoom:13,maxZoom:18,constraint:[{minZoom:13,maxZoom:18,bbox:[-62.952805,17.862621,-62.78276,17.98024]}]},CNES:{href:"http://www.cnes.fr/",attribution:"Centre national d'études spatiales (CNES)",logo:"https://wxs.ign.fr/static/logos/CNES/CNES.gif",minZoom:13,maxZoom:16,constraint:[{minZoom:13,maxZoom:16,bbox:[-55.01953,1.845384,-50.88867,6.053161]}]},ASTRIUM:{href:"http://www.geo-airbusds.com/",attribution:"Airbus Defence and Space",logo:"https://wxs.ign.fr/static/logos/ASTRIUM/ASTRIUM.gif",minZoom:13,maxZoom:16,constraint:[{minZoom:13,maxZoom:16,bbox:[-55.01953,1.845384,-50.88867,6.053161]}]},CNES_971:{href:"http://www.cnes.fr/",attribution:"Centre national d'études spatiales (CNES)",logo:"https://wxs.ign.fr/static/logos/CNES_971/CNES_971.gif",minZoom:13,maxZoom:18,constraint:[{minZoom:13,maxZoom:18,bbox:[-61.82342,15.819616,-60.99497,16.521578]}]},CNES_972:{href:"http://www.cnes.fr/",attribution:"Centre national d'études spatiales (CNES)",logo:"https://wxs.ign.fr/static/logos/CNES_972/CNES_972.gif",minZoom:13,maxZoom:18,constraint:[{minZoom:13,maxZoom:18,bbox:[-61.247208,14.371855,-60.778458,14.899901]}]}}},"GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD":{server:"https://wxs.ign.fr/geoportail/wmts",layer:"GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD",title:"Carte IGN",format:"image/jpeg",style:"normal",queryable:!1,tilematrix:"PM",minZoom:0,maxZoom:18,bbox:[-179.62723,-84.5047,179.74588,85.47958],desc:"Cartographie topographique multi-échelles du territoire français issue des bases de données vecteur de l’IGN - emprise nationale, visible du 1/200 au 1/130000000",originators:{IGN:{href:"http://www.ign.fr",attribution:"Institut national de l'information géographique et forestière",logo:"https://wxs.ign.fr/static/logos/IGN/IGN.gif",minZoom:0,maxZoom:18,constraint:[{minZoom:5,maxZoom:5,bbox:[-179.57285,-83.84196,178.4975,85.36646]},{minZoom:0,maxZoom:2,bbox:[-175.99709,-84.42859,175.99709,84.2865]},{minZoom:3,maxZoom:3,bbox:[-176.23093,-84.5047,179.08267,84.89126]},{minZoom:4,maxZoom:4,bbox:[-179.62723,-84.0159,-179.21112,85.47958]},{minZoom:6,maxZoom:8,bbox:[-179.49689,-84.02368,179.74588,85.30035]},{minZoom:15,maxZoom:18,bbox:[-5.6663494,41.209736,10.819784,51.175068]},{minZoom:14,maxZoom:14,bbox:[-5.713191,40.852314,11.429714,51.44377]},{minZoom:13,maxZoom:13,bbox:[-63.37252,13.428586,11.429714,51.44377]},{minZoom:11,maxZoom:12,bbox:[-63.37252,13.428586,11.496459,51.444122]},{minZoom:9,maxZoom:9,bbox:[-64.81273,13.428586,11.496459,51.444016]},{minZoom:10,maxZoom:10,bbox:[-63.37252,13.428586,11.496459,51.444016]}]}}},"GEOGRAPHICALGRIDSYSTEMS.MAPS":{server:"https://wxs.ign.fr/geoportail/wmts",layer:"GEOGRAPHICALGRIDSYSTEMS.MAPS",title:"Cartes IGN",format:"image/jpeg",style:"normal",queryable:!0,tilematrix:"PM",minZoom:0,maxZoom:18,bbox:[-180,-75,180,80],desc:"Cartes IGN",originators:{IGN:{href:"http://www.ign.fr",attribution:"Institut national de l'information géographique et forestière",logo:"https://wxs.ign.fr/static/logos/IGN/IGN.gif",minZoom:0,maxZoom:18,constraint:[{minZoom:7,maxZoom:7,bbox:[-178.20573,-68.138855,144.84375,51.909786]},{minZoom:8,maxZoom:8,bbox:[-178.20573,-68.138855,168.24327,51.909786]},{minZoom:13,maxZoom:13,bbox:[-178.20573,-67.101425,168.24327,51.44377]},{minZoom:14,maxZoom:14,bbox:[-178.20573,-67.101425,168.23909,51.44377]},{minZoom:11,maxZoom:12,bbox:[-178.20573,-67.101425,168.24327,51.444122]},{minZoom:9,maxZoom:10,bbox:[-178.20573,-68.138855,168.24327,51.444016]},{minZoom:15,maxZoom:15,bbox:[-178.20573,-46.502903,168.23909,51.175068]},{minZoom:16,maxZoom:16,bbox:[-178.20573,-46.502903,168.29811,51.175068]},{minZoom:0,maxZoom:6,bbox:[-180,-60,180,80]},{minZoom:18,maxZoom:18,bbox:[-5.6663494,41.209736,10.819784,51.175068]},{minZoom:17,maxZoom:17,bbox:[-179.5,-75,179.5,75]}]},DITTT:{href:"http://www.dittt.gouv.nc/portal/page/portal/dittt/",attribution:"Direction des Infrastructures, de la Topographie et des Transports Terrestres",logo:"https://wxs.ign.fr/static/logos/DITTT/DITTT.gif",minZoom:8,maxZoom:16,constraint:[{minZoom:8,maxZoom:10,bbox:[163.47784,-22.972307,168.24327,-19.402702]},{minZoom:11,maxZoom:13,bbox:[163.47784,-22.972307,168.24327,-19.494438]},{minZoom:14,maxZoom:15,bbox:[163.47784,-22.764496,168.23909,-19.493542]},{minZoom:16,maxZoom:16,bbox:[163.47784,-22.809465,168.29811,-19.403923]}]}}},"ADMINEXPRESS-COG-CARTO.LATEST":{key:"administratif",server:"https://wxs.ign.fr/geoportail/wmts",layer:"ADMINEXPRESS-COG-CARTO.LATEST",title:"ADMINEXPRESS COG CARTO",format:"image/png",style:"normal",queryable:!0,tilematrix:"PM",minZoom:6,maxZoom:16,bbox:[-63.37252,-21.475586,55.925865,51.31212],desc:"Limites administratives Express COG code officiel géographique 2021",originators:{IGN:{href:"https://www.ign.fr",attribution:"Institut national de l'information géographique et forestière",logo:"https://wxs.ign.fr/static/logos/IGN/IGN.gif",minZoom:6,maxZoom:16,constraint:[{minZoom:6,maxZoom:16,bbox:[-63.37252,-21.475586,55.925865,51.31212]}]}}},"GEOGRAPHICALGRIDSYSTEMS.SLOPES.MOUNTAIN":{key:"altimetrie",server:"https://wxs.ign.fr/geoportail/wmts",layer:"GEOGRAPHICALGRIDSYSTEMS.SLOPES.MOUNTAIN",title:"Carte des pentes",format:"image/png",style:"normal",queryable:!1,tilematrix:"PM",minZoom:0,maxZoom:17,bbox:[-63.161392,-21.544624,56.001812,51.099052],desc:"Carte des zones ayant une valeur de pente supérieure à 30°-35°-40°-45° d'après la BD ALTI au pas de 5m",originators:{IGN:{href:"http://www.ign.fr",attribution:"Institut national de l'information géographique et forestière",logo:"https://wxs.ign.fr/static/logos/IGN/IGN.gif",minZoom:0,maxZoom:17,constraint:[{minZoom:0,maxZoom:17,bbox:[-5.1504726,41.32521,9.570543,51.099052]}]}}},"ELEVATION.SLOPES":{key:"altimetrie",server:"https://wxs.ign.fr/geoportail/wmts",layer:"ELEVATION.SLOPES",title:"Altitude",format:"image/jpeg",style:"normal",queryable:!0,tilematrix:"PM",minZoom:6,maxZoom:14,bbox:[-178.20589,-22.595179,167.43176,50.93085],desc:"La couche altitude se compose d'un MNT (Modèle Numérique de Terrain) affiché en teintes hypsométriques et issu de la BD ALTI®.",originators:{IGN:{href:"http://www.ign.fr",attribution:"Institut national de l'information géographique et forestière",logo:"https://wxs.ign.fr/static/logos/IGN/IGN.gif",minZoom:6,maxZoom:14,constraint:[{minZoom:6,maxZoom:14,bbox:[55.205746,-21.392344,55.846554,-20.86271]}]}}},"GEOGRAPHICALGRIDSYSTEMS.MAPS.BDUNI.J1":{key:"cartes",server:"https://wxs.ign.fr/geoportail/wmts",layer:"GEOGRAPHICALGRIDSYSTEMS.MAPS.BDUNI.J1",title:"Plan IGN j+1",format:"image/png",style:"normal",queryable:!1,tilematrix:"PM",minZoom:0,maxZoom:18,bbox:[-179.5,-75,179.5,75],desc:"Plan IGN j+1",originators:{IGN:{href:"http://www.ign.fr",attribution:"Institut national de l'information géographique et forestière",logo:"https://wxs.ign.fr/static/logos/IGN/IGN.gif",minZoom:0,maxZoom:18,constraint:[{minZoom:0,maxZoom:18,bbox:[-179,-80,179,80]}]}}},"TRANSPORTNETWORKS.ROADS":{key:"topographie",server:"https://wxs.ign.fr/geoportail/wmts",layer:"TRANSPORTNETWORKS.ROADS",title:"Routes",format:"image/png",style:"normal",queryable:!1,tilematrix:"PM",minZoom:6,maxZoom:18,bbox:[-63.969162,-21.49687,55.964417,71.584076],desc:"Affichage du réseau routier français et européen.",originators:{IGN:{href:"http://www.ign.fr",attribution:"Institut national de l'information géographique et forestière",logo:"https://wxs.ign.fr/static/logos/IGN/IGN.gif",minZoom:6,maxZoom:18,constraint:[{minZoom:15,maxZoom:18,bbox:[-63.37252,-21.475586,55.925865,51.31212]},{minZoom:6,maxZoom:14,bbox:[-63.969162,-21.49687,55.964417,71.584076]}]}}}},ol.layer.Geoportail.register=function(t,e){ol.layer.Geoportail.capabilities[t]=e},ol.layer.Geoportail.isRegistered=function(t){return ol.layer.Geoportail.capabilities[t]&&ol.layer.Geoportail.capabilities[t].key},ol.layer.Geoportail.loadCapabilities=function(t,e){var o=function(){},i=function(){},n=function(){};this.getCapabilities(t,e).then(function(t){ol.layer.Geoportail.capabilities=t,o(t)}).catch(function(t){i(t)}).finally(function(t){n(t)});var r={then:function(t){return"function"==typeof t&&(o=t),r},catch:function(t){return"function"==typeof t&&(i=t),r},finally:function(t){return"function"==typeof t&&(n=t),r}};return r},ol.layer.Geoportail.getCapabilities=function(t){var e={},o=function(){},i=function(){},n=function(){},r=[156543.03390625,78271.516953125,39135.7584765625,19567.87923828125,9783.939619140625,4891.9698095703125,2445.9849047851562,1222.9924523925781,611.4962261962891,305.74811309814453,152.87405654907226,76.43702827453613,38.218514137268066,19.109257068634033,9.554628534317017,4.777314267158508,2.388657133579254,1.194328566789627,.5971642833948135,.29858214169740677,.14929107084870338];function s(t){t=281e-6*Number(t);for(var e=0;er[e])return e}function a(t){for(var e=t.constraint.length-1;e>0;e--)for(var o=0;o$/,"$1"),originators:{}},u=r.getElementsByTagName("gpp:Originator"),d=0;h=u[d];d++){for(var g,m=p.originators[h.attributes.name.value]={href:h.getElementsByTagName("gpp:URL")[0].innerHTML,attribution:h.getElementsByTagName("gpp:Attribution")[0].innerHTML,logo:h.getElementsByTagName("gpp:Logo")[0].innerHTML,minZoom:20,maxZoom:0,constraint:[]},f=h.getElementsByTagName("gpp:Constraint"),y=0;g=f[y];y++){var v=s(g.getElementsByTagName("sld:MinScaleDenominator")[0].innerHTML),_=s(g.getElementsByTagName("sld:MaxScaleDenominator")[0].innerHTML);_>m.maxZoom&&(m.maxZoom=_),_m.maxZoom&&(m.maxZoom=v),vthis.getMaxResolution()){var i=this.getMinResolution(),n=this.getMaxResolution();for(n>1e5&&(n=156543),i<.15&&(i=.15),e=n;n>i;)n/=2,e=i*=2}var r=this.getExtent();return t||(t=[21020,6355964]),r&&!ol.extent.containsCoordinate(r,t)&&(t=[(r[0]+r[2])/2,(r[1]+r[3])/2]),o&&(t=ol.proj.transform(t,o,this.getSource().getProjection())),this.getSource&&this.getSource()?[this.getSource().getPreview(t,e)]:[]},ol.layer.Group.prototype.getPreview=function(t,e){if(this.get("preview"))return[this.get("preview")];var o=[];if(this.getLayers)for(var i=this.getLayers().getArray(),n=0;nthis.get("maxResolution"))){if(this.res_=400*e,this.animate_){var o=t.frameState.time-this.animate_;othis.animateDuration_&&(this.animate_=!1),!!this.animate_},ol.render3D.prototype.getFeatureHeight=function(t){if(this.animate_){var e=this.height_(t),o=this.toHeight_(t);return e*(1-this.elapsedRatio_)+this.elapsedRatio_*o}return this.height_(t)},ol.render3D.prototype.hvector_=function(t,e){var o=[t[0]*this.matrix_[0]+t[1]*this.matrix_[1]+this.matrix_[4],t[0]*this.matrix_[2]+t[1]*this.matrix_[3]+this.matrix_[5]];return{p0:o,p1:[o[0]+e/this.res_*(o[0]-this.center_[0]),o[1]+e/this.res_*(o[1]-this.center_[1])]}},ol.render3D.prototype.getFeature3D_=function(t,e){var o=this.get("geometry")(t),i=o.getCoordinates();switch(o.getType()){case"Polygon":i=[i];case"MultiPolygon":for(var n=[],r=0;r=0;r--)t.lineTo(n[r].p1[0],n[r].p1[1]);t.closePath()}t.fill("evenodd"),t.stroke();break;case"Point":var a=(n=e[o]).feature.get("label");if(a){var l=n.geom.p1,c=t.fillStyle;t.fillStyle=t.strokeStyle,t.textAlign="center",t.textBaseline="bottom",t.fillText(a,l[0],l[1]);var h=t.measureText(a),p=Number(t.font.match(/\d+(\.\d+)?/g).join([]));t.fillStyle="rgba(255,255,255,0.5)",t.fillRect(l[0]-h.width/2-5,l[1]-p-5,h.width+10,p+10),t.strokeRect(l[0]-h.width/2-5,l[1]-p-5,h.width+10,p+10),t.fillStyle=c}}},ol.render3D.prototype.drawGhost3D_=function(t,e){var o,i,n,r;for(o=0;o=2&&this.finishDrawing(),!0)},ol.layer.SketchOverlay.prototype.removeLastPoint=function(){this._geom.pop(),this._lastCoord=this._geom[this._geom.length-1],this.drawSketch()},ol.layer.SketchOverlay.prototype.startDrawing=function(t){t=t||{},this._geom=[],t.type&&this.setGeometryType(t.type),this.drawSketch(),this._drawing||this.dispatchEvent({type:"drawstart",feature:this.getFeature()}),this._drawing=!0},ol.layer.SketchOverlay.prototype.finishDrawing=function(t){var e=this.getSource().getFeatures()[2].clone(),o=!!e;switch(this.getGeometryType()){case"Circle":case"LineString":o=this._geom.length>1;break;case"Polygon":o=this._geom.length>2}return!(t&&!o)&&(this._geom=[],this._lastCoord=null,this.drawSketch(),this._drawing&&this.dispatchEvent({type:"drawend",valid:o,feature:e}),this._drawing=!1,e)},ol.layer.SketchOverlay.prototype.abortDrawing=function(){this._drawing&&this.dispatchEvent({type:"drawabort",feature:this.getFeature()}),this._drawing=!1,this._geom=[],this._lastCoord=null,this.drawSketch()},ol.layer.SketchOverlay.prototype.setPosition=function(t){this._position=t,this.drawLink()},ol.layer.SketchOverlay.prototype.getPosition=function(){return this._position},ol.layer.SketchOverlay.prototype.drawLink=function(){var t=this.getSource().getFeatures();this._position?(this._lastCoord&&this._lastCoord===this._position?t[0].getGeometry().setCoordinates([]):t[0].getGeometry().setCoordinates(this._position),this._geom.length?"Circle"===this.getGeometryType()?t[1].setGeometry(new ol.geom.Circle(this._geom[0],ol.coordinate.dist2d(this._geom[0],this._position))):"Polygon"===this.getGeometryType()?t[1].setGeometry(new ol.geom.LineString([this._lastCoord,this._position,this._geom[0]])):t[1].setGeometry(new ol.geom.LineString([this._lastCoord,this._position])):t[1].setGeometry(new ol.geom.LineString([]))):(t[0].getGeometry().setCoordinates([]),t[1].setGeometry(new ol.geom.LineString([])))},ol.layer.SketchOverlay.prototype.getFeature=function(){return this.getSource().getFeatures()[2]},ol.layer.SketchOverlay.prototype.drawSketch=function(){this.drawLink();var t=this.getSource().getFeatures();if(this._geom.length)switch(this._lastCoord||(this._lastCoord=this._geom[this._geom.length-1]),t[3].getGeometry().setCoordinates(this._lastCoord),this._type){case"Point":t[2].setGeometry(new ol.geom.Point(this._lastCoord));break;case"Circle":t[2].getGeometry()?t[2].getGeometry().setRadius(ol.coordinate.dist2d(this._geom[0],this._geom[this._geom.length-1])):t[2].setGeometry(new ol.geom.Circle(this._geom[0],ol.coordinate.dist2d(this._geom[0],this._geom[this._geom.length-1])));break;case"LineString":t[2].getGeometry()?t[2].getGeometry().setCoordinates(this._geom):t[2].setGeometry(new ol.geom.LineString(this._geom));break;case"Polygon":this._geom.push(this._geom[0]),t[2].getGeometry()?t[2].getGeometry().setCoordinates([this._geom]):t[2].setGeometry(new ol.geom.Polygon([this._geom])),this._geom.pop();break;default:console.error("[ol/layer/SketchOverlay~drawSketch] geometry type not supported ("+this._type+")")}else t[2].setGeometry(null),t[3].setGeometry(new ol.geom.Point([]))},ol.PerspectiveMap=function(t){var e=t.target instanceof Element?t.target:document.getElementById(t.target);"absolute"!==window.getComputedStyle(e).position&&(e.style.position="relative"),e.style.overflow="hidden";var o=ol.ext.element.create("DIV",{className:"ol-perspective-map",parent:e}),i={};Object.assign(i,t),i.target=o,ol.Map.call(this,i),this._tiltCondition=t.tiltCondition||ol.events.condition.altKeyOnly},ol.ext.inherits(ol.PerspectiveMap,ol.Map),ol.PerspectiveMap.prototype.getPixelRatio=function(){return window.devicePixelRatio},ol.PerspectiveMap.prototype.setPerspective=function(t,e){e=e||{},t>30?t=30:t<0&&(t=0);var o=this._angle||0,i=Math.round(10*t)/10,n=this.getTarget().querySelector(".ol-layers").style;cancelAnimationFrame(this._animatedPerspective),requestAnimationFrame(function(t){this._animatePerpective(t,t,n,o,i,e.duration,e.easing||ol.easing.inAndOut)}.bind(this))},ol.PerspectiveMap.prototype._animatePerpective=function(t,e,o,i,n,r,s){var a,l,c;0===r?(a=1,l=!0):l=(a=(e-t)/(r||500))>=1,a=s(a);var h=(c=this._angle=l?n:i+(n-i)*a)/30;o.transform="translateY(-"+17*h+"%) perspective(200px) rotateX("+c+"deg) scaleY("+(1-h/2)+")",this.getMatrix3D(!0),this.render(),l||requestAnimationFrame(function(e){this._animatePerpective(t,e,o,i,n,r||500,s||ol.easing.inAndOut)}.bind(this)),this.dispatchEvent({type:"change:perspective",angle:c,animating:!l})},ol.PerspectiveMap.prototype.handleMapBrowserEvent=function(t){if(t.pixel=[t.originalEvent.offsetX/this.getPixelRatio(),t.originalEvent.offsetY/this.getPixelRatio()],t.coordinate=this.getCoordinateFromPixel(t.pixel),ol.Map.prototype.handleMapBrowserEvent.call(this,t),this._tiltCondition(t))switch(t.type){case"pointerdown":this._dragging=t.originalEvent.offsetY;break;case"pointerup":this._dragging=!1;break;case"pointerdrag":if(!1!==this._dragging){var e=t.originalEvent.offsetY>this._dragging?.5:-.5;e&&this.setPerspective((this._angle||0)+e,{duration:0}),this._dragging=t.originalEvent.offsetY}}else this._dragging=!1},ol.PerspectiveMap.prototype.getMatrix3D=function(t){if(t){var e=this.getTarget().querySelector(".ol-layers"),o=ol.matrix3D.getTransform(e),i=ol.matrix3D.getTransformOrigin(e);this._matrixTransform=ol.matrix3D.computeTransformMatrix(o,i)}return this._matrixTransform||(this._matrixTransform=ol.matrix3D.identity()),this._matrixTransform},ol.PerspectiveMap.prototype.getPixelScreenFromCoordinate=function(t){var e=this.getPixelFromCoordinate(t),o=this.getMatrix3D(),i=ol.matrix3D.transformVertex(o,e);return[(i=ol.matrix3D.projectVertex(i))[0],i[1]]},ol.PerspectiveMap.prototype.getPixelFromPixelScreen=function(t){var e=ol.matrix3D.inverse(this.getMatrix3D()),o=ol.matrix3D.transformVertex(e,t);return[(o=ol.matrix3D.projectVertex(o))[0],o[1]]},function(){var t=ol.Overlay.prototype.updatePixelPosition;ol.Overlay.prototype.updatePixelPosition=function(){var e=this.getMap();if(e&&e instanceof ol.PerspectiveMap){var o=this.getPosition();if(!e||!e.isRendered()||!o)return void this.setVisible(!1);var i=e.getPixelScreenFromCoordinate(o),n=e.getSize();i[0]-=n[0]/4,i[1]-=n[1]/4,this.updateRenderedPosition(i,n)}else t.call(this)}}(),window.ol&&!ol.particule&&(ol.particule={}),ol.particule.Base=function(t){t||(t={}),ol.Object.call(this),this.setOverlay(t.overlay),this.coordinate=t.coordinate||[0,0]},ol.ext.inherits(ol.particule.Base,ol.Object),ol.particule.Base.prototype.setOverlay=function(t){this._overlay=t},ol.particule.Base.prototype.getOverlay=function(){return this._overlay},ol.particule.Base.prototype.draw=function(){},ol.particule.Base.prototype.update=function(){},ol.particule.Base.prototype.getRandomCoord=function(t){return this.getOverlay().randomCoord?this.getOverlay().randomCoord():[t,0]},ol.particule.Bird=function(t){t||(t={}),ol.particule.Base.call(this,t),this.bird=new Image,this.bird.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABDCAQAAAD+S8VaAAAAAnNCSVQICFXsRgQAAAAJcEhZcwAAAvMAAALzAdLpCioAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAG90lEQVR42uWaaVRTRxTHJ4AUUIoIiqISOArIDiIhBBfccCMoR0vVUpXjTqun4Fr1tO5i3YuodaFqRMECKm4VUHEhUvWgBYuilgpiRVZpCARI3r8fWA4hYY9AXu77+ObNzO/O8u787xDSyeYSTzSICpu+DjV0ogrze84PBneByuJv3JpbBlx6MEBbJfG/8S2RAACFXXtU0gERN1BjCc9UEN/e7I2w1gFPinv3UDkHbFiGOqOwJVjlHMALRT3LLJ7trGIOuHwFUsY7q2IOuJ0u7YB//pswWFn6/vnUcbOCAn7ctfnUrsijl85dv5pw786fd9OTsvg5/JykN3fTb6ZcTDgVvefIkqXmVvKr0NN/IUQDO7C1qwJrOwyftIZ7cmIiN21eZlB+SOUtFKNl9kF0hb9ujmyVM73FMmWv3m+2J4zxw74NDN5/5vT1qzeT7j3n5/Bz7mcmPk24cy32Ai8i9Pj2nwIX+jo4kc8UMMqeXr5bfC6N/2tUHrdsCQ4gAR/QNhNRJ8+6GklXH7xStlxW+ViLxrpjqBswJ/z4rYyCFrQnwJPCxGe/x53i+fO+XOth2xpsvQm+PkfGP3YuYIo1oInTyIJiLDFtoZfUP+AXeaW2rZHXKZ8xJ35NeU+1odVSbIIBbEQeb70Tffd6ckmj0QbDy9/zOufdILE6SN0TBkVafnn0ka/NatrrditDXpmYKw36pREwPyr+Y0V72n0CsxoedTDFrMJJyRMDZJYIx8+yYICQKbDJtcjtL9IGAcEMKN7efIy+snnTYv/tR8Ry3+eWRUYFzavRB9SWL7icXKWAVrPRr96wEqjBTjg5bop03GGi77XF85FdqVZNIQ1konOsEvx35yOCN1xMFimszjNSDqh+ektGfVG3xjyTzaqkX3uDTiaCdh0ZA/qSgWXWWfb7CYMQQsiUUANK1j8hoJf1lSFUg0u+z1xCiFuMUYWsAy7QCj9ZzhIgIDCkpi4nhBCGsafNGx2peXCQRvhlcGrEAQSOhYQQQtyTG74YCglN8CswrVF8goEVhBBCrMzdozi33OOHJmvUvQqghQtKMEUu+GDB0Cj2Q/vsUdJn0JH8+oXG4rWS46djSD0ePcr2lUuafbZlIbN0UAnngpyA0I3FumeZxxQYVlZ/ooWleKm0+FHQbTDuWnAp5F6cbNfskcDtcg9J9aMGNUxDIiglgy+CPxhypj4Ddu/cfFpxOrIqrv7QAsH4V2nwYxoEvwQEOpRlAeeG07hWnopH7FMHgTr6VmhAA1xEQNjF4bMxQwpcj2I9duVZLiVtTb7YT7T2I30JccyqrrA7ZuESRF0SvhQ/QKfByDu/VZAs5O6rXS9U6onZ+A2CLgQvwWn0l5n4TAFnjOKksR5En6i73q6/q3IRhvwugB8LBylwi6IhixxX9Wd/CoWQwTrJTuaEOSwzENcKDR7Yj4xOg4+Hq3SEXzX8fIfcObAZPizV+bGxqLZhMyxBWgdP+xi4ScGbCNnhhrodqxnrso65pLidNxMQENihqoPgS3AY5rU7krh35eCPbon2c4hap2nnxob2GQQE+zpAM4qFb53EoUWxE3t93jXyBwyXcG1KD+8/IXwBAmFYg26Vx37oHjnIlnQlGzbJvMCX+lQrPgT6dat9yAcT/S6aSOIs2rjjxLaQ9SsX83gv8uShiNuAn4mR9fZ5dizpphRpREvj1YvOhiU84OdmoghFyKH47y/GHohtLf45ITvVuLyfyKLI5RlntyJSXx2+P+gaejt5O7FNCSEkcFHTuAmPom6/qqxJqFRee33wHGc6rVLjXtym8C8nTTcnDNMh/n5BfnN8mFY18jWdbPlceeBViEsPi16xxFSL7ncjukVelTvxUzsxjOlAUzsULv8/GfdEJa7G7D7YWLCcUzbNkfb42zaXNaG2h4XTHH/n9x+bjIHKqeAdNMZf55fbrKBYLNq+lqb433lkFrUk5hNKdu6mIf5XA1KetzibR+09TLcfonrMtVYlNKk9h2gV//FCW3tCFmMXT0nOe83bxpklbdDJqrD+BC1mwUzTtOw2Sl/UFjpsh8ci2pHirFgxV8nxV/oJxO2RwR6+HNFbmfkZ15PaqwQe/VmJ+R18Aql37XTAsQ9EefUBW6NeEk34IaWN8HkIQk+Jva0SzwGXP6p1XDeEoqB1qx/L0B3dKY+VSr0JDurDFNaK2ZoYg5142sx1m3LEYxUsq+Vv8ejVSv8bdJ/UXySds9eDB4JwEnFIRS6KUIi/8RJxCEEARte74GBR6DycFpGgtZNFPkHrHgOx61miSaPDEOtEn8qWwvepZMc5Mel3ItZmHbbM12wSXV/snMHZQ6eRlzEzI9d9rnftskwERhXVNxF7ik1Krd87pbLCbWYR9Y7v0f/htaJHbsoDhwAAAABJRU5ErkJggg==",this.set("size",[this.bird.width||50,this.bird.height||50])},ol.ext.inherits(ol.particule.Bird,ol.particule.Base),ol.particule.Bird.prototype.draw=function(t){var e=this.getOverlay().get("angle");t.save(),t.translate(this.coordinate[0],this.coordinate[1]),t.rotate(e+Math.PI/2),t.scale(.5,.5),t.drawImage(this.bird,-this.bird.width/2,-this.bird.height/2),t.restore()},ol.particule.Bird.prototype.update=function(t){var e=this.getOverlay().get("speed")*t/this.getOverlay()._fps,o=this.getOverlay().get("angle");this.coordinate[0]+=e*Math.cos(o),this.coordinate[1]+=e*Math.sin(o)},ol.particule.Cloud=function(t){t||(t={}),ol.particule.Base.call(this,t),this.set("size",[100,100]);var e=document.createElement("CANVAS");e.width=200,e.height=200;var o=e.getContext("2d"),i=this.gradient=o.createRadialGradient(50,50,0,50,50,50);i.addColorStop(0,"rgba(255,255,255,.2"),i.addColorStop(1,"rgba(255,255,255,0"),this.image=e;for(var n=0;n<7;n++){o.save();var r=100*Math.random(),s=100*Math.random();o.translate(r,s),o.fillStyle=i,o.fillRect(0,0,e.width,e.height),o.restore()}},ol.ext.inherits(ol.particule.Cloud,ol.particule.Base),ol.particule.Cloud.prototype.draw=function(t){t.save(),t.translate(this.coordinate[0],this.coordinate[1]),t.drawImage(this.image,-this.image.width/2,-this.image.width/2),t.restore()},ol.particule.Cloud.prototype.update=function(t){var e=this.getOverlay().get("speed")*t/this.getOverlay()._fps,o=this.getOverlay().get("angle");this.coordinate[0]+=e*Math.cos(o),this.coordinate[1]+=e*Math.sin(o)},ol.particule.Rain=function(t){t||(t={}),ol.particule.Base.call(this,t),this.z=Math.floor(5*Math.random())+1;var e=document.createElement("CANVAS");e.width=50,e.height=50;var o=e.getContext("2d");this.gradient=o.createRadialGradient(0,0,0,0,0,25),this.gradient.addColorStop(0,"rgba(0,0,80,0)"),this.gradient.addColorStop(1,"rgba(0,0,80,.3)")},ol.ext.inherits(ol.particule.Rain,ol.particule.Base),ol.particule.Rain.prototype.draw=function(t){t.save();var e=this.getOverlay().get("angle");t.beginPath();var o=10*Math.cos(e)*(1+this.z/2),i=10*Math.sin(e)*(1+this.z/2);t.lineWidth=Math.round(this.z/2),t.strokeStyle=this.gradient,t.translate(this.coordinate[0],this.coordinate[1]),t.moveTo(0,0),t.lineTo(o,i),t.stroke(),t.restore()},ol.particule.Rain.prototype.update=function(t){var e=this.getOverlay().get("speed")*t/this.getOverlay()._fps*this.z,o=this.getOverlay().get("angle");this.coordinate[0]+=e*Math.cos(o),this.coordinate[1]+=e*Math.sin(o)},ol.particule.RainDrop=function(t){t||(t={}),ol.particule.Base.call(this,t),this.size=0;var e=document.createElement("CANVAS");e.width=100,e.height=100;var o=e.getContext("2d"),i=o.createRadialGradient(50,50,0,50,50,50);i.addColorStop(0,"rgba(128,128,192,.8"),i.addColorStop(1,"rgba(128,128,192,0"),this.image=e,o.fillStyle=i,o.fillRect(0,0,e.width,e.height)},ol.ext.inherits(ol.particule.RainDrop,ol.particule.Base),ol.particule.RainDrop.prototype.draw=function(t){this.size>0&&(t.save(),t.translate(this.coordinate[0],this.coordinate[1]),t.globalAlpha=this.size/50,t.scale(1-this.size/50,1-this.size/50),t.drawImage(this.image,-50,-50),t.restore())},ol.particule.RainDrop.prototype.update=function(t){(this.size>0||Math.random()<.01)&&(this.size<=0&&(this.size=50,this.coordinates=this.getRandomCoord()),this.size=this.size-Math.round(t/20))},ol.particule.Snow=function(t){t||(t={}),ol.particule.Base.call(this,t),this.z=(Math.floor(5*Math.random())+1)/5,this.angle=Math.random()*Math.PI;var e=document.createElement("CANVAS");e.width=20,e.height=20;var o=e.getContext("2d"),i=o.createRadialGradient(10,10,0,10,10,10);i.addColorStop(0,"rgba(255, 255, 255,1)"),i.addColorStop(.8,"rgba(210, 236, 242,.8)"),i.addColorStop(1,"rgba(237, 247, 249,0)"),this.image=e,o.fillStyle=i,o.fillRect(0,0,e.width,e.height)},ol.ext.inherits(ol.particule.Snow,ol.particule.Base),ol.particule.Snow.prototype.draw=function(t){t.save(),t.translate(this.coordinate[0],this.coordinate[1]),t.globalAlpha=.4+this.z/2,t.scale(this.z,this.z),t.drawImage(this.image,-10,-10),t.restore()},ol.particule.Snow.prototype.update=function(t){var e=this.getOverlay().get("speed")*t/this.getOverlay()._fps*this.z*5,o=this.getOverlay().get("angle");this.angle=this.angle+t/this.getOverlay()._fps/100,this.coordinate[0]+=2*Math.sin(this.angle+this.z)+e*Math.cos(o),this.coordinate[1]+=Math.cos(this.angle)+e*Math.sin(o)},ol.Overlay.Popup=function(t){"number"==typeof(t=t||{}).offsetBox?this.offsetBox=[t.offsetBox,t.offsetBox,t.offsetBox,t.offsetBox]:this.offsetBox=t.offsetBox;var e=document.createElement("div");t.element=e,this.closeBox=t.closeBox,this.onclose=t.onclose,this.onshow=t.onshow,ol.ext.element.create("BUTTON",{className:"closeBox"+(t.closeBox?" hasclosebox":""),type:"button",click:function(){this.hide()}.bind(this),parent:e}),!1!==t.anchor&&ol.ext.element.create("DIV",{className:"anchor",parent:e}),this.content=ol.ext.element.create("DIV",{html:t.html||"",className:"ol-popup-content",parent:e}),t.minibar&&ol.ext.element.scrollDiv(this.content,{vertical:!0,mousewheel:!0,minibar:!0}),t.stopEvent&&(e.addEventListener("mousedown",function(t){t.stopPropagation()}),e.addEventListener("touchstart",function(t){t.stopPropagation()})),ol.Overlay.call(this,t),this._elt=e,this.setPositioning(t.positioning||"auto"),this.setPopupClass(t.popupClass||t.className||"default"),t.anim&&this.addPopupClass("anim"),t.position&&setTimeout(function(){this.show(t.position)}.bind(this))},ol.ext.inherits(ol.Overlay.Popup,ol.Overlay),ol.Overlay.Popup.prototype.getClassPositioning=function(){var t="",e=this.getPositioning();return/bottom/.test(e)&&(t+="ol-popup-bottom "),/top/.test(e)&&(t+="ol-popup-top "),/left/.test(e)&&(t+="ol-popup-left "),/right/.test(e)&&(t+="ol-popup-right "),/^center/.test(e)&&(t+="ol-popup-middle "),/center$/.test(e)&&(t+="ol-popup-center "),t},ol.Overlay.Popup.prototype.setClosebox=function(t){this.closeBox=t,t?this.element.classList.add("hasclosebox"):this.element.classList.remove("hasclosebox")},ol.Overlay.Popup.prototype.setPopupClass=function(t){var e=["ol-popup"];this.getVisible()&&e.push("visible"),this.element.className="";var o=this.getClassPositioning().split(" ").filter(function(t){return t.length>0});t?t.split(" ").filter(function(t){return t.length>0}).forEach(function(t){e.push(t)}):e.push("default"),o.forEach(function(t){e.push(t)}),this.closeBox&&e.push("hasclosebox"),this.element.classList.add.apply(this.element.classList,e)},ol.Overlay.Popup.prototype.addPopupClass=function(t){this.element.classList.add(t)},ol.Overlay.Popup.prototype.removePopupClass=function(t){this.element.classList.remove(t)},ol.Overlay.Popup.prototype.setPositioning=function(t){void 0!==t&&(/auto/.test(t)?(this.autoPositioning=t.split("-"),1==this.autoPositioning.length&&(this.autoPositioning[1]="auto")):this.autoPositioning=!1,"center"==(t=t.replace(/auto/g,"center"))&&(t="bottom-center"),this.setPositioning_(t))},ol.Overlay.Popup.prototype.setPositioning_=function(t){if(this.element){ol.Overlay.prototype.setPositioning.call(this,t),this.element.classList.remove("ol-popup-top","ol-popup-bottom","ol-popup-left","ol-popup-right","ol-popup-center","ol-popup-middle");var e=this.getClassPositioning().split(" ").filter(function(t){return t.length>0});this.element.classList.add.apply(this.element.classList,e)}},ol.Overlay.Popup.prototype.getVisible=function(){return this.element.classList.contains("visible")},ol.Overlay.Popup.prototype.show=function(t,e){e||"string"!=typeof t||(e=t,t=null),!0===t&&(t=this.getPosition());var o=this,i=this.getMap();if(i&&(e&&e!==this.prevHTML&&(this.prevHTML=e,this.content.innerHTML="",e instanceof Element?this.content.appendChild(e):ol.ext.element.create("DIV",{html:e,parent:this.content}),Array.prototype.slice.call(this.content.querySelectorAll("img")).forEach(function(t){t.addEventListener("load",function(){try{i.renderSync()}catch(t){}o.content.dispatchEvent(new Event("scroll"))})})),t)){if(this.autoPositioning){var n=i.getPixelFromCoordinate(t),r=i.getSize(),s=[];"auto"==this.autoPositioning[0]?s[0]=n[1]this._particules.length)for(var i=this._particules.length;ithis._canvas.width+e[0]?(t.coordinate[0]=-e[0],t.coordinate[1]=Math.random()*(this._canvas.height+e[1])-e[1]/2):t.coordinate[1]<-e[1]?(t.coordinate[0]=Math.random()*(this._canvas.width+e[0])-e[0]/2,t.coordinate[1]=this._canvas.height+e[1]):t.coordinate[1]>this._canvas.height+e[1]&&(t.coordinate[0]=Math.random()*(this._canvas.width+e[0])-e[0]/2,t.coordinate[1]=-e[1])},ol.Overlay.AnimatedCanvas.prototype.clear=function(){this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height)},ol.Overlay.AnimatedCanvas.prototype.getCanvas=function(){return this._canvas},ol.Overlay.AnimatedCanvas.prototype.setAnimation=function(t){t=!1!==t,this.set("animation",t),t?(this._pause=!0,requestAnimationFrame(this._animate.bind(this))):this.dispatchEvent({type:"animation:stop",time:this._time})},ol.Overlay.AnimatedCanvas.prototype._animate=function(t){this.getVisible()&&this.get("animation")&&(this._pause?requestAnimationFrame(function(t){this._time=t,requestAnimationFrame(this._animate.bind(this))}.bind(this)):(t-this._time>this._fps&&(this.draw(t-this._time),this._time=t),requestAnimationFrame(this._animate.bind(this)))),this._pause=!1},ol.Overlay.Fixed=function(t){ol.Overlay.call(this,t)},ol.ext.inherits(ol.Overlay.Fixed,ol.Overlay),ol.Overlay.Fixed.prototype.setPosition=function(t,e){this.getMap()&&t&&(this._pixel=this.getMap().getPixelFromCoordinate(t)),ol.Overlay.prototype.setPosition.call(this,t),e&&ol.Overlay.prototype.updatePixelPosition.call(this)},ol.Overlay.Fixed.prototype.updatePixelPosition=function(){if(this.getMap()&&this._pixel&&this.getPosition()){var t=this.getMap().getPixelFromCoordinate(this.getPosition());Math.round(1e3*t[0])===Math.round(1e3*this._pixel[0])&&Math.round(1e3*t[0])===Math.round(1e3*this._pixel[0])||this.setPosition(this.getMap().getCoordinateFromPixel(this._pixel))}},ol.Overlay.FixedPopup=function(t){t.anchor=!1,t.positioning=t.positioning||"center-center",t.className=(t.className||"")+" ol-fixPopup",ol.Overlay.Popup.call(this,t),this.set("minScale",t.minScale||.5),this.set("maxScale",t.maxScale||2);var e=document.createElement("canvas");this._overlay=new ol.layer.Image({source:new ol.source.ImageCanvas({canvasFunction:function(t,o,i,n){return e.width=n[0],e.height=n[1],e}})}),this._style=t.style||new ol.style.Style({fill:new ol.style.Fill({color:[102,153,255]})}),this._overlay.on(["postcompose","postrender"],function(t){if(this.getVisible()&&this._pixel){var e=this.getMap(),o=this.getPosition(),i=e.getPixelFromCoordinate(o),n=this.element.getBoundingClientRect(),r=this.getMap().getTargetElement().getBoundingClientRect(),s=[n.left-r.left+n.width/2,n.top-r.top+n.height/2];t.context.save();var a=t.inversePixelTransform;a?t.context.transform(a[0],a[1],a[2],a[3],a[4],a[5]):t.context.scale(t.frameState.pixelRatio,t.frameState.pixelRatio),t.context.beginPath(),t.context.moveTo(i[0],i[1]),Math.abs(s[0]-i[0])>Math.abs(s[1]-i[1])?(t.context.lineTo(s[0],s[1]-8),t.context.lineTo(s[0],s[1]+8)):(t.context.lineTo(s[0]-8,s[1]),t.context.lineTo(s[0]+8,s[1])),t.context.moveTo(i[0],i[1]),this._style.getFill()&&(t.context.fillStyle=ol.color.asString(this._style.getFill().getColor()),t.context.fill()),this._style.getStroke()&&(t.context.strokeStyle=ol.color.asString(this._style.getStroke().getColor()),t.context.lineWidth=this._style.getStroke().width(),t.context.stroke()),t.context.restore()}}.bind(this));var o=function(){this.setPixelPosition()}.bind(this);function i(t){var e=0,o=0,i=0;for(var n in t)e+=t[n].clientX,o+=t[n].clientY,i++;return[e/i,o/i]}function n(t){var e=Object.keys(t);return!(e.length<2)&&ol.coordinate.dist2d([t[e[0]].clientX,t[e[0]].clientY],[t[e[1]].clientX,t[e[1]].clientY])}this.on(["hide","show"],function(){setTimeout(o)}.bind(this));var r,s,a,l,c={},h={},p=[];this.element.addEventListener("pointerdown",function(t){for(var e in t.preventDefault(),t.stopPropagation(),c)h[e]&&(c[e]=h[e]);c[t.pointerId]=t,p=this._pixel,s=this.get("rotation")||0,a=this.get("scale")||1,r=n(c),l=!1}.bind(this)),this.element.addEventListener("click",function(t){l&&(t.preventDefault(),t.stopPropagation())},!0);var u=function(t){c[t.pointerId]&&(delete c[t.pointerId],t.preventDefault()),h[t.pointerId]&&delete h[t.pointerId]}.bind(this);document.addEventListener("pointerup",u),document.addEventListener("pointercancel",u),document.addEventListener("pointermove",function(t){if(c[t.pointerId]){t.preventDefault(),h[t.pointerId]=t;var e=i(c),o=i(h),u=o[0]-e[0],d=o[1]-e[1];l=l||Math.abs(u)>3||Math.abs(d)>3;var g=function(){var t,e,o=Object.keys(c);if(o.length<2)return!1;t=c[o[0]];var i=[(e=c[o[1]]).clientX-t.clientX,e.clientY-t.clientY];t=h[o[0]];var n=[(e=h[o[1]]).clientX-t.clientX,e.clientY-t.clientY],r=Math.sqrt(i[0]*i[0]+i[1]*i[1]),s=Math.sqrt(n[0]*n[0]+n[1]*n[1]),a=360*Math.acos((i[0]*n[0]+i[1]*n[1])/(r*s))/Math.PI;return i[0]*n[1]-i[1]*n[0]<0?-a:a}();g&&this.setRotation(s+1.5*g,!1);var m=n(h);!1!==m&&r&&(this.setScale(a*m/r,!1),r=a*m/this.get("scale")),this.setPixelPosition([p[0]+u,p[1]+d])}}.bind(this))},ol.ext.inherits(ol.Overlay.FixedPopup,ol.Overlay.Popup),ol.Overlay.FixedPopup.prototype.setMap=function(t){ol.Overlay.Popup.prototype.setMap.call(this,t),this._overlay.setMap(this.getMap()),this._listener&&ol.Observable.unByKey(this._listener),t&&(this._listener=t.on("change:size",function(){this.setPixelPosition()}.bind(this)))},ol.Overlay.FixedPopup.prototype.updatePixelPosition=function(){var t=this.getMap(),e=this.getPosition();if(t&&t.isRendered()&&e)if(this._pixel)this.setVisible(!0);else{this._pixel=t.getPixelFromCoordinate(e);var o=t.getSize();this.updateRenderedPosition(this._pixel,o)}else this.setVisible(!1)},ol.Overlay.FixedPopup.prototype.updateRenderedPosition=function(t,e){ol.Overlay.Popup.prototype.updateRenderedPosition.call(this,t,e),this.setRotation(),this.setScale()},ol.Overlay.FixedPopup.prototype.setPixelPosition=function(t,e){var o,i=this.getMap(),n=i?i.getSize():[0,0];if(e&&(this.setPositioning(e),(o=ol.ext.element.offsetRect(this.element)).width=o.height=0,/top/.test(e)?t[1]+=o.height/2:/bottom/.test(e)?t[1]=n[1]-o.height/2-t[1]:t[1]=n[1]/2+t[1],/left/.test(e)?t[0]+=o.width/2:/right/.test(e)?t[0]=n[0]-o.width/2-t[0]:t[0]=n[0]/2+t[0]),t&&(this._pixel=t),i&&this._pixel){this.updateRenderedPosition(this._pixel,n);var r=!1;o=ol.ext.element.offsetRect(this.element);var s=ol.ext.element.offsetRect(i.getTargetElement());o.lefts.left+s.width&&(this._pixel[0]=this._pixel[0]+s.left-o.left+s.width-o.width,r=!0),o.tops.top+s.height&&(this._pixel[1]=this._pixel[1]+s.top-o.top+s.height-o.height,r=!0),r&&this.updateRenderedPosition(this._pixel,n),this._overlay.changed()}},ol.Overlay.FixedPopup.prototype.getPixelPosition=function(){return this._pixel},ol.Overlay.FixedPopup.prototype.setPopupClass=function(t){ol.Overlay.Popup.prototype.setPopupClass.call(this,t),this.addPopupClass("ol-fixPopup")},ol.Overlay.FixedPopup.prototype.setRotation=function(t,e){"number"==typeof t&&this.set("rotation",t),!1!==e&&(/rotate/.test(this.element.style.transform)?this.element.style.transform=this.element.style.transform.replace(/rotate\((-?[\d,.]+)deg\)/,"rotate("+(this.get("rotation")||0)+"deg)"):this.element.style.transform=this.element.style.transform+" rotate("+(this.get("rotation")||0)+"deg)")},ol.Overlay.FixedPopup.prototype.setScale=function(t,e){"number"==typeof t&&this.set("scale",t),t=Math.min(Math.max(this.get("minScale")||0,this.get("scale")||1),this.get("maxScale")||2),this.set("scale",t),!1!==e&&(/scale/.test(this.element.style.transform)?this.element.style.transform=this.element.style.transform.replace(/scale\(([\d,.]+)\)/,"scale("+t+")"):this.element.style.transform=this.element.style.transform+" scale("+t+")")},ol.Overlay.FixedPopup.prototype.setLinkStyle=function(t){this._style=t,this._overlay.changed()},ol.Overlay.FixedPopup.prototype.getLinkStyle=function(){return this._style},ol.Overlay.Magnify=function(t){var e=document.createElement("div");e.className="ol-magnify",this._elt=e,ol.Overlay.call(this,{positioning:t.positioning||"center-center",element:this._elt,stopEvent:!1}),this.mgmap_=new ol.Map({controls:new ol.Collection,interactions:new ol.Collection,target:t.target||this._elt,view:new ol.View({projection:t.projection}),layers:t.layers}),this.mgview_=this.mgmap_.getView(),this.external_=!!t.target,this.set("zoomOffset",t.zoomOffset||1),this.set("active",!0),this.on("propertychange",this.setView_.bind(this))},ol.ext.inherits(ol.Overlay.Magnify,ol.Overlay),ol.Overlay.Magnify.prototype.setMap=function(t){this.getMap()&&this.getMap().getViewport().removeEventListener("mousemove",this.onMouseMove_),this._listener&&ol.Observable.unByKey(this._listener),this._listener=null,ol.Overlay.prototype.setMap.call(this,t),t.getViewport().addEventListener("mousemove",this.onMouseMove_.bind(this)),this._listener=t.getView().on("propertychange",this.setView_.bind(this)),this.setView_()},ol.Overlay.Magnify.prototype.getMagMap=function(){return this.mgmap_},ol.Overlay.Magnify.prototype.getActive=function(){return this.get("active")},ol.Overlay.Magnify.prototype.setActive=function(t){return this.set("active",t)},ol.Overlay.Magnify.prototype.onMouseMove_=function(t){if(this.get("active")){var e=this.getMap().getEventCoordinate(t);this.external_||this.setPosition(e),this.mgview_.setCenter(e),this._elt.querySelector("canvas")&&"none"!=this._elt.querySelector("canvas").style.display||this.mgmap_.updateSize()}else this.setPosition()},ol.Overlay.Magnify.prototype.setView_=function(t){if(this.get("active")){if(!t)return this.setView_({key:"rotation"}),void this.setView_({key:"resolution"});switch(t.key){case"rotation":this.mgview_.setRotation(this.getMap().getView().getRotation());break;case"zoomOffset":case"resolution":var e=Math.max(0,this.getMap().getView().getZoom()+Number(this.get("zoomOffset")));this.mgview_.setZoom(e)}}else this.setPosition()},ol.Overlay.Placemark=function(t){(t=t||{}).popupClass=(t.popupClass||"")+" placemark anim",t.positioning="bottom-center",ol.Overlay.Popup.call(this,t),this.setPositioning=function(){},t.color&&(this.element.style.color=t.color),t.backgroundColor&&(this.element.style.backgroundColor=t.backgroundColor),t.contentColor&&this.setContentColor(t.contentColor),t.size&&this.setRadius(t.size)},ol.ext.inherits(ol.Overlay.Placemark,ol.Overlay.Popup),ol.Overlay.Placemark.prototype.show=function(t,e){!0===t&&(t=this.getPosition()),this.hide(),ol.Overlay.Popup.prototype.show.apply(this,[t,e])},ol.Overlay.Placemark.prototype.setColor=function(t){this.element.style.color=t},ol.Overlay.Placemark.prototype.setBackgroundColor=function(t){this._elt.style.backgroundColor=t},ol.Overlay.Placemark.prototype.setContentColor=function(t){var e=this.element.getElementsByClassName("ol-popup-content")[0];e&&(e.style.color=t)},ol.Overlay.Placemark.prototype.setClassName=function(t){var e=this.element.className;this.element.className="ol-popup placemark ol-popup-bottom ol-popup-center "+(/visible/.test(e)?"visible ":"")+(/anim/.test(e)?"anim ":"")+t},ol.Overlay.Placemark.prototype.setRadius=function(t){this.element.style.fontSize=t+"px"},ol.Overlay.PopupFeature=function(t){t=t||{},ol.Overlay.Popup.call(this,t),this.setTemplate(t.template),this.set("canFix",t.canFix),this.set("showImage",t.showImage),this.set("maxChar",t.maxChar||200),this.set("keepSelection",t.keepSelection),t.select&&"function"==typeof t.select.on&&(this._select=t.select,t.select.on("select",function(e){this._noselect||(e.selected[0]?this.show(e.mapBrowserEvent.coordinate,t.select.getFeatures().getArray(),e.selected[0]):this.hide())}.bind(this)))},ol.ext.inherits(ol.Overlay.PopupFeature,ol.Overlay.Popup),ol.Overlay.PopupFeature.prototype.setTemplate=function(t){this._template=t,this._attributeObject(this._template)},ol.Overlay.PopupFeature.prototype._attributeObject=function(t){if(t&&t.attributes instanceof Array){var e={};t.attributes.forEach(function(t){e[t]=!0}),t.attributes=e}return t.attributes},ol.Overlay.PopupFeature.prototype.show=function(t,e,o){(t instanceof ol.Feature||t instanceof Array&&t[0]instanceof ol.Feature)&&(e=t,t=null),e instanceof Array||(e=[e]),this._features=e.slice(),this._count||(this._count=1),this._count=1;var i=this.get("keepSelection")&&o||e[0],n=this._getHtml(i);n?(this.element.classList.contains("ol-fixed")||this.hide(),t&&"Point"!==e[0].getGeometry().getType()||(t=e[0].getGeometry().getFirstCoordinate()),ol.Overlay.Popup.prototype.show.call(this,t,n)):this.hide()},ol.Overlay.PopupFeature.prototype._getHtml=function(t){if(!t)return"";var e=ol.ext.element.create("DIV",{className:"ol-popupfeature"});this.get("canFix")&&ol.ext.element.create("I",{className:"ol-fix",parent:e}).addEventListener("click",function(){this.element.classList.toggle("ol-fixed")}.bind(this));var o,i=this._template;if("function"==typeof i)i=i(t,this._count,this._features.length);else if(!i||!i.attributes)for(var n in(i=i||{}).attributes={},t.getProperties())"geometry"!=n&&(i.attributes[n]=n);i.title&&(o="function"==typeof i.title?i.title(t):t.get(i.title),ol.ext.element.create("H1",{html:o,parent:e}));if(i.attributes){var r,s=ol.ext.element.create("TABLE",{parent:e}),a=this._attributeObject(i),l=t.getProperties();for(var c in a)if(l.hasOwnProperty(c)){var h,p=a[c],u=l[c];"function"==typeof p.format&&(u=p.format(u,t));var d=!0;if("boolean"==typeof p.visible?d=p.visible:"function"==typeof p.visible&&(d=p.visible(t,u)),d){if(r=ol.ext.element.create("TR",{parent:s}),ol.ext.element.create("TD",{html:p.title||c,parent:r}),this.get("showImage")&&/(http(s?):)([/|.|\w|\s|-])*\.(?:jpg|gif|png)/.test(u))h=ol.ext.element.create("IMG",{src:u});else{h=(p.before||"")+u+(p.after||"");var g=this.get("maxChar")||200;"string"==typeof h&&h.length>g&&(h=h.substr(0,g)+"[...]")}ol.ext.element.create("TD",{html:h,parent:r})}}}if(ol.ext.element.create("BUTTON",{className:"ol-zoombt",parent:e}).addEventListener("click",function(){if("Point"===t.getGeometry().getType())this.getMap().getView().animate({center:t.getGeometry().getFirstCoordinate(),zoom:Math.max(this.getMap().getView().getZoom(),18)});else{var e=t.getGeometry().getExtent();this.getMap().getView().fit(e,{duration:1e3})}}.bind(this)),!this.get("keepSelection")&&this._features.length>1){var m=ol.ext.element.create("DIV",{className:"ol-count",parent:e});ol.ext.element.create("DIV",{className:"ol-prev",parent:m,click:function(){this._count--,this._count<1&&(this._count=this._features.length),e=this._getHtml(this._features[this._count-1]),setTimeout(function(){ol.Overlay.Popup.prototype.show.call(this,this.getPosition(),e)}.bind(this),350)}.bind(this)}),ol.ext.element.create("TEXT",{html:this._count+"/"+this._features.length,parent:m}),ol.ext.element.create("DIV",{className:"ol-next",parent:m,click:function(){this._count++,this._count>this._features.length&&(this._count=1),e=this._getHtml(this._features[this._count-1]),setTimeout(function(){ol.Overlay.Popup.prototype.show.call(this,this.getPosition(),e)}.bind(this),350)}.bind(this)})}return this._select&&!this.get("keepSelection")&&(this._noselect=!0,this._select.getFeatures().clear(),this._select.getFeatures().push(t),this._noselect=!1),this.dispatchEvent({type:"select",feature:t,index:this._count}),e},ol.Overlay.PopupFeature.prototype.setFix=function(t){t?this.element.classList.add("ol-fixed"):this.element.classList.remove("ol-fixed")},ol.Overlay.PopupFeature.prototype.getFix=function(){return this.element.classList.contains("ol-fixed")},ol.Overlay.PopupFeature.localString=function(t,e){return function(o){if(o&&o.toLocaleString)return o.toLocaleString(t,e);var i=new Date(o);return isNaN(i)?o:i.toLocaleString(t,e)}},ol.Overlay.Tooltip=function(t){(t=t||{}).popupClass=t.popupClass||t.className||"tooltips black",t.positioning=t.positioning||"center-left",t.stopEvent=!!t.stopEvent,ol.Overlay.Popup.call(this,t),this.set("maximumFractionDigits",t.maximumFractionDigits||2),"function"==typeof t.formatLength&&(this.formatLength=t.formatLength),"function"==typeof t.formatArea&&(this.formatArea=t.formatArea),"function"==typeof t.getHTML&&(this.getHTML=t.getHTML),this._interaction=new ol.interaction.Interaction({handleEvent:function(t){if("pointermove"===t.type||"click"===t.type){var e=this.getHTML(this._feature,this.get("info"));e?this.show(t.coordinate,e):this.hide(),this._coord=t.coordinate}return!0}.bind(this)})},ol.ext.inherits(ol.Overlay.Tooltip,ol.Overlay.Popup),ol.Overlay.Tooltip.prototype.setMap=function(t){this.getMap()&&this.getMap().removeInteraction(this._interaction),ol.Overlay.Popup.prototype.setMap.call(this,t),this.getMap()&&this.getMap().addInteraction(this._interaction)},ol.Overlay.Tooltip.prototype.getHTML=function(t,e){return this.get("measure")?this.get("measure")+(e?"
"+e:""):e||""},ol.Overlay.Tooltip.prototype.setInfo=function(t){t?setTimeout(function(){this.set("info",t),this.show(this._coord,this.get("info"))}.bind(this)):(this.set("info",""),this.hide())},ol.Overlay.Tooltip.prototype.removeFeature=function(){this.setFeature()},ol.Overlay.Tooltip.prototype.formatArea=function(t){return t>Math.pow(10,-1*this.get("maximumFractionDigits"))?t>1e4?(t/1e6).toLocaleString(void 0,{maximumFractionDigits:this.get("maximumFractionDigits)")})+" km²":t.toLocaleString(void 0,{maximumFractionDigits:this.get("maximumFractionDigits")})+" m²":""},ol.Overlay.Tooltip.prototype.formatLength=function(t){return t>Math.pow(10,-1*this.get("maximumFractionDigits"))?t>100?(t/1e3).toLocaleString(void 0,{maximumFractionDigits:this.get("maximumFractionDigits")})+" km":t.toLocaleString(void 0,{maximumFractionDigits:this.get("maximumFractionDigits")})+" m":""},ol.Overlay.Tooltip.prototype.setFeature=function(t){t&&t.feature&&(t=t.feature),this._feature=t,this._listener&&this._listener.forEach(function(t){ol.Observable.unByKey(t)}),this._listener=[],this.set("measure",""),t&&this._listener.push(t.getGeometry().on("change",function(t){var e,o=t.target;o.getArea?e=this.formatArea(ol.sphere.getArea(o,{projection:this.getMap().getView().getProjection()})):o.getLength&&(e=this.formatLength(ol.sphere.getLength(o,{projection:this.getMap().getView().getProjection()}))),this.set("measure",e)}.bind(this)))},ol.coordinate.convexHull,function(){var t=function(t,e,o){return(t[0]-o[0])*(e[1]-o[1])-(t[1]-o[1])*(e[0]-o[0])<=0};ol.coordinate.convexHull=function(e){var o;e.sort(function(t,e){return t[0]==e[0]?t[1]-e[1]:t[0]-e[0]});var i=[];for(o=0;o=2&&t(i[i.length-2],i[i.length-1],e[o]);)i.pop();i.push(e[o])}var n=[];for(o=e.length-1;o>=0;o--){for(;n.length>=2&&t(n[n.length-2],n[n.length-1],e[o]);)n.pop();n.push(e[o])}return n.pop(),i.pop(),i.concat(n)};var e=function(t){var o,i,n=[];switch(t.getType()){case"Point":n.push(t.getCoordinates());break;case"LineString":case"LinearRing":case"MultiPoint":n=t.getCoordinates();break;case"MultiLineString":for(i=t.getLineStrings(),o=0;o1?".1":".4":a>2?l>1?".2":".3":l>2?a<2?".1":".2":l<1?a<2?".4":".3":".5"},ol.coordinate.fromDFCI=function(t,e){var o,i=1e5,n=t.charCodeAt(0)-65;n=(n<8?n:n-2)*i;var r=t.charCodeAt(1)-65;if(r=(r<8?r:r-2)*i+15e5,2===t.length)o=[n+i/2,r+i/2];else if(i/=5,n+=Number(t.charAt(2))/2*i,r+=Number(t.charAt(3))/2*i,4===t.length)o=[n+i/2,r+i/2];else{i/=10;var s=t.charCodeAt(4)-65;if(n+=(s<8?s:s-2)*i,r+=Number(t.charAt(5))*i,6===t.length)o=[n+i/2,r+i/2];else switch(t.charAt(7)){case"1":o=[n+i/4,r+3*i/4];break;case"2":o=[n+3*i/4,r+3*i/4];break;case"3":o=[n+3*i/4,r+i/4];break;case"4":o=[n+i/4,r+i/4];break;default:o=[n+i/2,r+i/2]}}return e&&(ol.proj.get("EPSG:27572")||(proj4.defs["EPSG:27572"]||proj4.defs("EPSG:27572","+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"),ol.proj.proj4.register(proj4)),o=ol.proj.transform(o,"EPSG:27572",e)),o},ol.coordinate.validDFCI=function(t){if(t.length<2||t.length>8)return!1;if(/[^A-H|^K-N]/.test(t.substr(0,1)))return!1;if(/[^B-H|^K-N]/.test(t.substr(1,1)))return!1;if(t.length>2){if(t.length<4)return!1;if(/[^0,^2,^4,^6,^8]/.test(t.substr(2,1)))return!1;if(/[^0,^2,^4,^6,^8]/.test(t.substr(3,1)))return!1}if(t.length>4){if(t.length<6)return!1;if(/[^A-H|^K-L]/.test(t.substr(4,1)))return!1;if(/[^0-9]/.test(t.substr(5,1)))return!1}if(t.length>6){if(t.length<8)return!1;if("."!==t.substr(6,1))return!1;if(/[^1-5]/.test(t.substr(7,1)))return!1}return!0},ol.coordinate.validDFCICoord=function(t,e){return e&&(ol.proj.get("EPSG:27572")||(proj4.defs["EPSG:27572"]||proj4.defs("EPSG:27572","+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"),ol.proj.proj4.register(proj4)),t=ol.proj.transform(t,e,"EPSG:27572")),!(0>t[0]||t[0]>12e5)&&!(16e5>t[1]||t[1]>27e5)},ol.graph={},ol.graph.Dijskra=function(t){t=t||{},this.source=t.source,this.nodes=new ol.source.Vector,this.maxIteration=t.maxIteration||2e4,this.stepIteration=t.stepIteration||2e3,this.astar=!0,this.candidat=[],ol.Object.call(this),this.set("epsilon",t.epsilon||1e-6)},ol.ext.inherits(ol.graph.Dijskra,ol.Object),ol.graph.Dijskra.prototype.weight=function(){return 1},ol.graph.Dijskra.prototype.direction=function(){return 2},ol.graph.Dijskra.prototype.getLength=function(t){return t.getGeometry&&(t=t.getGeometry()),t.getLength()},ol.graph.Dijskra.prototype.getNodeSource=function(){return this.nodes},ol.graph.Dijskra.prototype.getEdges=function(t){var e=ol.extent.buffer(ol.extent.boundingExtent([t]),this.get("epsilon")),o=[];return this.source.forEachFeatureIntersectingExtent(e,function(t){o.push(t)}),o},ol.graph.Dijskra.prototype.getNode=function(t){var e=ol.extent.buffer(ol.extent.boundingExtent([t]),this.get("epsilon")),o=[];return this.nodes.forEachFeatureIntersectingExtent(e,function(t){o.push(t)}),o[0]},ol.graph.Dijskra.prototype.addNode=function(t,e,o,i,n){if(this.wdist&&e>this.wdist)return!1;var r=this.getNode(t),s=e+this.getLength(new ol.geom.LineString([this.end,t]))*this.weight();if(this.astar&&this.wdist&&s>this.wdist)return!1;if(r){if(r!==this.arrival&&r.get("wdist")<=e)return r;r.set("dist",o),r.set("wdist",e),r.set("dtotal",s),r.set("from",i),r.set("prev",n),r===this.arrival&&(this.wdist=e),this.candidat.push(r)}else r=new ol.Feature({geometry:new ol.geom.Point(t),from:i,prev:n,dist:o||0,wdist:e,dtotal:s}),e<0?r.set("wdist",!1):this.candidat.push(r),this.nodes.addFeature(r);return r},ol.graph.Dijskra.prototype.closestCoordinate=function(t){var e=this.source.getClosestFeatureToCoordinate(t),o=e.getGeometry().getFirstCoordinate(),i=e.getGeometry().getLastCoordinate();return ol.coordinate.dist2d(t,o)o&&(t=e,o=e.get("wdist"));return this.getRoute(t)},ol.graph.Dijskra.prototype._resume=function(){if(this.running){for(;this.candidat.length;){this.candidat.sort(function(t,e){return t.get("dtotal")this.maxIteration)return this.running=!1,void this.dispatchEvent({type:"pause",overflow:-1!==this.nb});if(!(this.nb%this.stepIteration)){var h=this;return window.setTimeout(function(){h._resume()},5),void this.dispatchEvent({type:"calculating"})}}}this.nodes.clear(),this.running=!1,this.dispatchEvent({type:"finish",route:this.getRoute(this.arrival),wDistance:this.wdist,distance:this.arrival.get("dist")})}},ol.graph.Dijskra.prototype.getRoute=function(t){for(var e=[];t;)e.unshift(t.get("from")),t=t.get("prev");return e.shift(),e},ol.geom.GPAltiCode=function(t,e){e=e||{};var o=t.getType();if("Point"===o||"LineString"===o){var i=e.projection||"EPSG:3857",n=e.sampling||0;if(e.samplingDist){var r=t.getLength();n=Math.max(n,Math.round(r/e.samplingDist))}n>5e3&&(n=5e3),n<2&&(n=0),t=t.clone().transform(i,"EPSG:4326");var s,a=[],l=[];switch(o){case"Point":s=[t.getCoordinates()];break;case"LineString":s=t.getCoordinates();break;default:return}n<=s.length&&(n=0),s.forEach(function(t){a.push(Math.round(1e6*t[0])/1e6),l.push(Math.round(1e6*t[1])/1e6)});var c="lon="+a.join("|")+"&lat="+l.join("|");n&&(c+="&sampling="+n),ol.ext.Ajax.get({url:"https://wxs.ign.fr/"+(e.apiKey||"essentiels")+"/alti/rest/"+(a.length>1?"elevationLine":"elevation")+".json?"+c,success:function(t){var r=[];t.elevations.forEach(function(t,e){n?r.push([t.lon,t.lat,t.z]):r.push([s[e][0],s[e][1],t.z])}),"Point"===o&&(r=r[0]);var a=ol.geom.createFromType(o,r);a.transform("EPSG:4326",i),"function"==typeof e.success&&e.success(a)},error:function(t){"function"==typeof e.error&&e.error(t)}})}else console.warn("[GPAltiCode] "+o+" not supported...")},ol.coordinate.GPAltiCode=function(t,e){e=e||{};var o=!t[0].length?new ol.geom.Point(t):new ol.geom.LineString(t);ol.geom.GPAltiCode(o,{projection:e.projection,apiKey:e.apiKey,sampling:e.sampling,samplingDist:e.samplingDist,success:function(t){"function"==typeof e.success&&e.success(t.getCoordinates())},error:e.error})},ol.coordinate.dist2d=function(t,e){var o=t[0]-e[0],i=t[1]-e[1];return Math.sqrt(o*o+i*i)},ol.coordinate.equal=function(t,e){return t[0]==e[0]&&t[1]==e[1]},ol.coordinate.getFeatureCenter=function(t){return ol.coordinate.getGeomCenter(t.getGeometry())},ol.coordinate.getGeomCenter=function(t){switch(t.getType()){case"Point":return t.getCoordinates();case"MultiPolygon":t=t.getPolygon(0);case"Polygon":return t.getInteriorPoint().getCoordinates();default:return t.getClosestPoint(ol.extent.getCenter(t.getExtent()))}},ol.coordinate.offsetCoords=function(t,e){var o,i,n,r,s,a,l,c,h,p,u,d,g,m=[],f=t.length-1,y=f,v=ol.coordinate.equal(t[0],t[f]);v||(u=t[0],d=t[1],g=[u[0]+(d[1]-u[1])/ol.coordinate.dist2d(u,d)*e,u[1]-(d[0]-u[0])/ol.coordinate.dist2d(u,d)*e],m.push(g),t.push(t[f]),f++,y--);for(var _=0;_1e-10&&(n=Math.sqrt((d[0]-u[0])*(d[0]-u[0])+(d[1]-u[1])*(d[1]-u[1])),r=Math.sqrt((g[0]-d[0])*(g[0]-d[0])+(g[1]-d[1])*(g[1]-d[1])),s=u[0]+e*(d[1]-u[1])/n,h=(i*(a=d[0]+e*(g[1]-d[1])/r)-o*s+(l=u[1]-e*(d[0]-u[0])/n)-(c=d[1]-e*(g[0]-d[0])/r))/(i-o),p=(o*i*(a-s)+i*l-o*c)/(i-o),d[0]-u[0]==0&&(p=i*(h=d[0]+e*(d[1]-u[1])/Math.abs(d[1]-u[1]))-i*a+c),g[0]-d[0]==0&&(p=o*(h=g[0]+e*(g[1]-d[1])/Math.abs(g[1]-d[1]))-o*s+l),m.push([h,p]));return v?m.push(m[0]):(t.pop(),u=t[t.length-1],d=t[t.length-2],g=[u[0]-(d[1]-u[1])/ol.coordinate.dist2d(u,d)*e,u[1]+(d[0]-u[0])/ol.coordinate.dist2d(u,d)*e],m.push(g)),m},ol.coordinate.findSegment=function(t,e){for(var o=0;oe||t[s][1]>=e&&t[s+1][1]0;i--)(t[i][0]>e&&t[i-1][0]e)&&(o=[e,(e-t[i][0])/(t[i-1][0]-t[i][0])*(t[i-1][1]-t[i][1])+t[i][1]],t.splice(i,0,o))}function e(t,e){for(var o,i=t.length-1;i>0;i--)(t[i][1]>e&&t[i-1][1]e)&&(o=[(e-t[i][1])/(t[i-1][1]-t[i][1])*(t[i-1][0]-t[i][0])+t[i][0],e],t.splice(i,0,o))}ol.extent.intersection=function(o,i){var n="Polygon"===i.getType();if(!n&&"MultiPolygon"!==i.getType())return null;var r=i.getCoordinates();return n&&(r=[r]),r.forEach(function(i){i.forEach(function(i){t(i,o[0]),t(i,o[2]),e(i,o[1]),e(i,o[3])})}),r.forEach(function(t){t.forEach(function(t){t.forEach(function(t){t[0]o[2]&&(t[0]=o[2]),t[1]o[3]&&(t[1]=o[3])})})}),n?new ol.geom.Polygon(r[0]):new ol.geom.MultiPolygon(r)}}(),ol.coordinate.sampleAt=function(t,e,o,i){var n=[];!1!==i&&n.push(t);var r=ol.coordinate.dist2d(t,e);if(r){var s=Math.round(r/o);if(s>1)for(var a=(e[0]-t[0])/s,l=(e[1]-t[1])/s,c=1;cn?(s=!0,o.push([i[0]+n/e*(t[0]-i[0]),i[1]+n/e*(t[1]-i[1])])):o.push(t)})})}),s?"Polygon"===t.getType()?new ol.geom.Polygon(a[0]):new ol.geom.MultiPolygon(a):t}}else console.warn("[ol/geom/Circle~intersection] Unsupported geometry type: "+t.getType());return t},ol.geom.LineString.prototype.splitAt=function(t,e){var o;if(!t)return[this];if(e||(e=1e-10),t.length&&t[0].length){var i=[this];for(o=0;o1&&c.push(new ol.geom.LineString(l)),c.length?c:[this]},ol.geom.MultiPolygon.prototype.scribbleFill=function(t){var e,o,i,n=[],r=this.getPolygons();for(e=0;o=r[e];e++){var s=o.scribbleFill(t);s&&n.push(s)}if(!n.length)return null;var a,l=n[0];for(e=0;i=n[e];e++){a=i.getLineStrings();for(var c=0;cf);){if(h[o][0].pt[1]===f){var _=Math.min((h[o][0].index-i[0].index+u)%u,(i[0].index-h[o][0].index+u)%u),x=Math.min((i[1].index-i[0].index+u)%u,(i[0].index-i[1].index+u)%u);_12)&&(e=12);for(var a=0,l=0,c=!0,h="",p=-90,u=90,d=-180,g=180;h.length=m?(a=2*a+1,d=m):(a*=2,g=m)}else{var f=(p+u)/2;i>=f?(a=2*a+1,p=f):(a*=2,u=f)}c=!c,5==++l&&(h+=ol.geohash.base32.charAt(a),l=0,a=0)}return h},ol.geohash.toLonLat=function(t){var e=ol.geohash.getExtent(t),o=e[1],i=e[0],n=e[3],r=e[2],s=(o+n)/2,a=(i+r)/2;return s=s.toFixed(Math.floor(2-Math.log(n-o)/Math.LN10)),a=a.toFixed(Math.floor(2-Math.log(r-i)/Math.LN10)),[Number(a),Number(s)]},ol.geohash.getExtent=function(t){if(!t)return!1;t=t.toLowerCase();for(var e=!0,o=-90,i=90,n=-180,r=180,s=0;s=0;c--){var h=l>>c&1;if(e){var p=(n+r)/2;1==h?n=p:r=p}else{var u=(o+i)/2;1==h?o=u:i=u}e=!e}}return[n,o,r,i]},ol.geohash.getAdjacent=function(t,e){if(t=t.toLowerCase(),e=e.toLowerCase(),!t)return!1;if(-1=="nsew".indexOf(e))return!1;var o=t.slice(-1),i=t.slice(0,-1),n=t.length%2;return-1!={n:["prxz","bcfguvyz"],s:["028b","0145hjnp"],e:["bcfguvyz","prxz"],w:["0145hjnp","028b"]}[e][n].indexOf(o)&&""!=i&&(i=ol.geohash.getAdjacent(i,e)),i+ol.geohash.base32.charAt({n:["p0r21436x8zb9dcf5h7kjnmqesgutwvy","bc01fg45238967deuvhjyznpkmstqrwx"],s:["14365h7k9dcfesgujnmqp0r2twvyx8zb","238967debc01fg45kmstqrwxuvhjyznp"],e:["bc01fg45238967deuvhjyznpkmstqrwx","p0r21436x8zb9dcf5h7kjnmqesgutwvy"],w:["238967debc01fg45kmstqrwxuvhjyznp","14365h7k9dcfesgujnmqp0r2twvyx8zb"]}[e][n].indexOf(o))},ol.geohash.getNeighbours=function(t){return{n:ol.geohash.getAdjacent(t,"n"),ne:ol.geohash.getAdjacent(ol.geohash.getAdjacent(t,"n"),"e"),e:ol.geohash.getAdjacent(t,"e"),se:ol.geohash.getAdjacent(ol.geohash.getAdjacent(t,"s"),"e"),s:ol.geohash.getAdjacent(t,"s"),sw:ol.geohash.getAdjacent(ol.geohash.getAdjacent(t,"s"),"w"),w:ol.geohash.getAdjacent(t,"w"),nw:ol.geohash.getAdjacent(ol.geohash.getAdjacent(t,"n"),"w")}},ol.sphere.greatCircleBearing=function(t,e){var o=Math.PI/180,i=[t[0]*o,t[1]*o],n=[e[0]*o,e[1]*o];return Math.atan2(Math.sin(n[0]-i[0])*Math.cos(n[1]),Math.cos(i[1])*Math.sin(n[1])-Math.sin(i[1])*Math.cos(n[1])*Math.cos(n[0]-i[0]))},ol.sphere.computeDestinationPoint=function(t,e,o,i){i=i||{};var n=Math.PI/180,r=i.radius||6371008.8,s=t[1]*n,a=t[0]*n,l=e/r,c=Math.asin(Math.sin(s)*Math.cos(l)+Math.cos(s)*Math.sin(l)*Math.cos(o)),h=(a+Math.atan2(Math.sin(o)*Math.sin(l)*Math.cos(s),Math.cos(l)-Math.sin(s)*Math.sin(c)))/n;return!1!==i.normalize&&(h<-180||h>180)&&(h=540*h%360-180),[h,c/n]},ol.sphere.greatCircleTrack=function(t,e,o){o=o||{};for(var i=ol.sphere.greatCircleBearing(t,e),n=ol.sphere.getDistance(t,e,o.radius),r=o.distance||1e3,s=r,a=[t];s1&&(l[0]>e[0]?e[0]+=360:e[0]-=360),a.push(e),a},ol.sphere.getMapScale=function(t,e){var o=t.getView(),i=o.getProjection(),n=o.getCenter(),r=t.getPixelFromCoordinate(n);r[1]+=1;var s=t.getCoordinateFromPixel(r),a=ol.sphere.getDistance(ol.proj.transform(n,i,"EPSG:4326"),ol.proj.transform(s,i,"EPSG:4326"));return a*=(e||96)/.0254},ol.sphere.setMapScale=function(t,e,o){if(t&&e){var i=e;if("string"==typeof e&&((i=e.split("/")[1])||(i=e),i=i.replace(/[^\d]/g,""),i=parseInt(i)),!i)return;var n=t.getView(),r=n.getProjection(),s=n.getCenter(),a=t.getPixelFromCoordinate(s);a[1]+=1;var l=t.getCoordinateFromPixel(a),c=ol.sphere.getDistance(ol.proj.transform(s,r,"EPSG:4326"),ol.proj.transform(l,r,"EPSG:4326"));return c*=(o||96)/.0254,n.setResolution(n.getResolution()*i/c),i}},ol.Map.prototype.animExtent=function(t,e){var o;(e=e||{}).projection&&(t=ol.proj.transformExtent(t,e.projection,this.getView().getProjection()));var i=(new Date).getTime(),n=e.duration||1e3,r=e.easing||ol.easing.upAndDown,s=e.style&&e.style.getWidth()||2,a=e.style&&e.style.getColr()||"red";o=this.on("postcompose",function(e){var l=e.frameState,c=l.pixelRatio,h=l.time-i;if(h>n)ol.Observable.unByKey(o);else{var p=h/n,u=this.getPixelFromCoordinate([t[0],t[1]]),d=this.getPixelFromCoordinate([t[2],t[3]]),g=e.context;g.save(),g.scale(c,c),g.beginPath(),g.globalAlpha=r(1-p),g.lineWidth=s,g.strokeStyle=a,g.rect(u[0],u[1],d[0]-u[0],d[1]-u[1]),g.stroke(),g.restore(),l.animate=!0}}.bind(this));try{this.renderSync()}catch(t){}},ol.geom.Geometry.prototype.cspline=function(t){return this.calcCSpline_?(this.csplineGeometryRevision==this.getRevision()&&this.csplineOption==JSON.stringify(t)||(this.csplineGeometry_=this.calcCSpline_(t),this.csplineGeometryRevision=this.getRevision(),this.csplineOption=JSON.stringify(t)),this.csplineGeometry_):this},ol.geom.GeometryCollection.prototype.calcCSpline_=function(t){for(var e=[],o=this.getGeometries(),i=0;i2&&t[0][0]==t[t.length-1][0]&&t[0][1]==t[t.length-1][1]?(r.unshift(t[t.length-2]),r.push(t[1])):(r.unshift(t[0]),r.push(t[t.length-1])),v=1;vr&&n>s?e=-o-i:r>s?o=-e-i:i=-e-o,[e,o,i]},ol.HexGrid.prototype.hex_round=function(t){return this.cube2hex(this.cube_round(this.hex2cube(t)))},ol.HexGrid.prototype.hex_corner=function(t,e,o){return[t[0]+e*this.layout_[8+o%6*2],t[1]+e*this.layout_[9+o%6*2]]},ol.HexGrid.prototype.getHexagonAtCoord=function(t){return this.getHexagon(this.coord2hex(t))},ol.HexGrid.prototype.getHexagon=function(t){for(var e=[],o=this.hex2coord(t),i=0;i<=7;i++)e.push(this.hex_corner(o,this.size_,i,this.layout_[8]));return e},ol.HexGrid.prototype.hex2coord=function(t){return[this.origin_[0]+this.size_*(this.layout_[0]*t[0]+this.layout_[1]*t[1]),this.origin_[1]+this.size_*(this.layout_[2]*t[0]+this.layout_[3]*t[1])]},ol.HexGrid.prototype.coord2hex=function(t){var e=[(t[0]-this.origin_[0])/this.size_,(t[1]-this.origin_[1])/this.size_],o=this.layout_[4]*e[0]+this.layout_[5]*e[1],i=this.layout_[6]*e[0]+this.layout_[7]*e[1];return this.hex_round([o,i])},ol.HexGrid.prototype.cube_distance=function(t,e){return Math.max(Math.abs(t[0]-e[0]),Math.abs(t[1]-e[1]),Math.abs(t[2]-e[2]))},function(){function t(t,e,o){return t+(e-t)*o}function e(e,o,i){return[t(e[0]+1e-6,o[0],i),t(e[1]+1e-6,o[1],i),t(e[2]+1e-6,o[2],i)]}ol.HexGrid.prototype.cube_line=function(t,o){var i=this.cube_distance(t,o);if(!i)return[t];for(var n=[],r=0;r<=i;r++)n.push(this.cube_round(e(t,o,r/i)));return n}}(),ol.HexGrid.prototype.neighbors={cube:[[1,-1,0],[1,0,-1],[0,1,-1],[-1,1,0],[-1,0,1],[0,-1,1]],hex:[[1,0],[1,-1],[0,-1],[-1,0],[-1,1],[0,1]]},ol.HexGrid.prototype.hex_neighbors=function(t,e){if(void 0!==e)return[t[0]+this.neighbors.hex[e%6][0],t[1]+this.neighbors.hex[e%6][1]];var o=[];for(e=0;e<6;e++)o.push([t[0]+this.neighbors.hex[e][0],t[1]+this.neighbors.hex[e][1]]);return o},ol.HexGrid.prototype.cube_neighbors=function(t,e){if(void 0!==e)return[t[0]+this.neighbors.cube[e%6][0],t[1]+this.neighbors.cube[e%6][1],t[2]+this.neighbors.cube[e%6][2]];var o=[];for(e=0;e<6;e++)o.push([t[0]+this.neighbors.cube[e][0],t[1]+this.neighbors.cube[e][1],t[2]+this.neighbors.cube[e][2]]);for(e=0;e<6;e++)o[e]=this.cube2hex(o[e]);return o},ol.InseeGrid=function(t){t=t||{},proj4.defs["EPSG:3035"]||(proj4.defs("EPSG:3035","+proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +units=m +no_defs"),ol.proj.proj4.register(proj4)),ol.Object.call(this,t);var e=Math.max(200,200*Math.round((t.size||0)/200));this.set("size",e)},ol.ext.inherits(ol.InseeGrid,ol.Object),ol.InseeGrid.extent=[32e5,2e6,43e5,314e4],ol.InseeGrid.prototype.getExtent=function(t){return ol.proj.transformExtent(ol.InseeGrid.extent,t||"EPSG:3035","EPSG:3857")},ol.InseeGrid.prototype.getGridAtCoordinate=function(t,e){var o=ol.proj.transform(t,e||"EPSG:3857","EPSG:3035"),i=this.get("size"),n=Math.floor(o[0]/i)*i,r=Math.floor(o[1]/i)*i,s=new ol.geom.Polygon([[[n,r],[n+i,r],[n+i,r+i],[n,r+i],[n,r]]]);return s.transform("EPSG:3035",e||"EPSG:3857"),s},ol.Map.prototype.markup=function(t,e){var o,i=this;(e=e||{}).projection&&(t=ol.proj.transform(t,e.projection,this.getView().getProjection()));var n=(new Date).getTime(),r=e.delay||3e3,s=1e3,a=e.maxZoom||100,l=ol.easing.easeOut,c=e.style;c||(c=new ol.style.Circle({radius:10,stroke:new ol.style.Stroke({color:"red",width:2})})),c instanceof ol.style.Image&&(c=new ol.style.Style({image:c})),c instanceof Array||(c=[c]),setTimeout(function(){if(o)try{i.renderSync()}catch(t){}},r),o=this.on("postcompose",function(e){var i=e.frameState,h=i.time-n;if(h>r+s)ol.Observable.unByKey(o),o=null;else{r>h&&this.getView().getZoom()>a&&(r=h);var p=i.pixelRatio,u=0;h>r&&(u=(h-r)/s);var d=e.context;d.save(),d.beginPath(),d.globalAlpha=l(1-u);for(var g=0;g=r&&(i.animate=!0)}}.bind(this));try{this.renderSync()}catch(t){}return o.stop=function(){r=s=0;try{this.target.renderSync()}catch(t){}},o},ol.ordering={},ol.ordering.yOrdering=function(){return function(t,e){return e.getGeometry().getExtent()[1]-t.getGeometry().getExtent()[1]}},ol.ordering.zIndex=function(t){t||(t={});var e=t.attribute||"zIndex";return t.equalFn?function(o,i){return o.get(e)==i.get(e)?t.equalFn(o,i):o.get(e)n)ol.Observable.unByKey(o);else{var p=h/n,u=e.context;u.save(),u.beginPath();var d=r(p);u.globalAlpha=r(1-p),console.log("anim");for(var g=0;g0?Number(t.scale):1)*ol.has.DEVICE_PIXEL_RATIO||ol.has.DEVICE_PIXEL_RATIO,n=o.getContext("2d");if(t.image){var r;t.image.load();var s=t.image.getImage();if(s.width)o.width=Math.round(s.width*i),o.height=Math.round(s.height*i),n.globalAlpha="number"==typeof t.opacity?t.opacity:1,n.drawImage(s,0,0,s.width,s.height,0,0,o.width,o.height),e=n.createPattern(o,"repeat");else{var a=this;e=[0,0,0,0],s.onload=function(){o.width=Math.round(s.width*i),o.height=Math.round(s.height*i),n.globalAlpha="number"==typeof t.opacity?t.opacity:1,n.drawImage(s,0,0,s.width,s.height,0,0,o.width,o.height),e=n.createPattern(o,"repeat"),a.setColor(e)}}}else{var l=this.getPattern_(t);if(o.width=Math.round(l.width*i),o.height=Math.round(l.height*i),n.beginPath(),t.fill&&(n.fillStyle=ol.color.asString(t.fill.getColor()),n.fillRect(0,0,o.width,o.height)),n.scale(i,i),n.lineCap="round",n.lineWidth=l.stroke||1,n.fillStyle=ol.color.asString(t.color||"#000"),n.strokeStyle=ol.color.asString(t.color||"#000"),l.circles)for(r=0;r180&&(n-=360),n*=Math.PI/180;var r=Math.cos(n),s=Math.sin(n);if(Math.abs(s)<1e-4)o.width=o.height=i,o.lines=[[0,.5,i,.5]],o.repeat=[[0,0],[0,i]];else if(Math.abs(r)<1e-4)o.width=o.height=i,o.lines=[[.5,0,.5,i]],o.repeat=[[0,0],[i,0]],"cross"==t.pattern&&(o.lines.push([0,.5,i,.5]),o.repeat.push([0,i]));else{var a=o.width=Math.round(Math.abs(i/s))||1,l=o.height=Math.round(Math.abs(i/r))||1;"cross"==t.pattern?(o.lines=[[-a,-l,2*a,2*l],[2*a,-l,-a,2*l]],o.repeat=[[0,0]]):r*s>0?(o.lines=[[-a,-l,2*a,2*l]],o.repeat=[[0,0],[a,0],[0,l]]):(o.lines=[[2*a,-l,-a,2*l]],o.repeat=[[0,0],[-a,0],[0,l]])}o.stroke=0===t.size?0:t.size||4}return o},ol.style.FillPattern.addPattern=function(t,e){e||(e={}),ol.style.FillPattern.prototype.patterns[t||e.char]={width:e.width||e.size||10,height:e.height||e.size||10,font:e.font,char:e.char,circles:e.circles,lines:e.lines,repeat:e.repeat,stroke:e.stroke,angle:e.angle,fill:e.fill}},ol.style.FillPattern.prototype.patterns={hatch:{width:5,height:5,lines:[[0,2.5,5,2.5]],stroke:1},cross:{width:7,height:7,lines:[[0,3,10,3],[3,0,3,10]],stroke:1},dot:{width:8,height:8,circles:[[5,5,2]],stroke:!1,fill:!0},circle:{width:10,height:10,circles:[[5,5,2]],stroke:1,fill:!1},square:{width:10,height:10,lines:[[3,3,3,8,8,8,8,3,3,3]],stroke:1,fill:!1},tile:{width:10,height:10,lines:[[3,3,3,8,8,8,8,3,3,3]],fill:!0},woven:{width:12,height:12,lines:[[3,3,9,9],[0,12,3,9],[9,3,12,0],[-1,1,1,-1],[13,11,11,13]],stroke:1},crosses:{width:8,height:8,lines:[[2,2,6,6],[2,6,6,2]],stroke:1},caps:{width:8,height:8,lines:[[2,6,4,2,6,6]],stroke:1},nylon:{width:20,height:20,lines:[[1,6,1,1,6,1],[6,11,11,11,11,6],[11,16,11,21,16,21],[16,11,21,11,21,16]],repeat:[[0,0],[-20,0],[0,-20]],stroke:1},hexagon:{width:20,height:12,lines:[[0,10,4,4,10,4,14,10,10,16,4,16,0,10]],stroke:1,repeat:[[0,0],[10,6],[10,-6],[-10,-6]]},cemetry:{width:15,height:19,lines:[[0,3.5,7,3.5],[3.5,0,3.5,10]],stroke:1,repeat:[[0,0],[7,9]]},sand:{width:20,height:20,circles:[[1,2,1],[9,3,1],[2,16,1],[7,8,1],[6,14,1],[4,19,1],[14,2,1],[12,10,1],[14,18,1],[18,8,1],[18,14,1]],fill:1},conglomerate:{width:60,height:40,circles:[[2,4,1],[17,3,1],[26,18,1],[12,17,1],[5,17,2],[28,11,2]],lines:[[7,5,6,7,9,9,11,8,11,6,9,5,7,5],[16,10,15,13,16,14,19,15,21,13,22,9,20,8,19,8,16,10],[24,6,26,7,27,5,26,4,24,4,24,6]],repeat:[[30,0],[-15,20],[15,20],[45,20]],stroke:1},conglomerate2:{width:60,height:40,circles:[[2,4,1],[17,3,1],[26,18,1],[12,17,1],[5,17,2],[28,11,2]],lines:[[7,5,6,7,9,9,11,8,11,6,9,5,7,5],[16,10,15,13,16,14,19,15,21,13,22,9,20,8,19,8,16,10],[24,6,26,7,27,5,26,4,24,4,24,6]],repeat:[[30,0],[-15,20],[15,20],[45,20]],fill:1},gravel:{width:15,height:10,circles:[[4,2,1],[5,9,1],[1,7,1]],lines:[[7,5,6,6,7,7,8,7,9,7,10,5,9,4,7,5],[11,2,14,4,14,1,12,1,11,2]],stroke:1},brick:{width:18,height:16,lines:[[0,1,18,1],[0,10,18,10],[6,1,6,10],[12,10,12,18],[12,0,12,1]],stroke:1},dolomite:{width:20,height:16,lines:[[0,1,20,1],[0,9,20,9],[1,9,6,1],[11,9,14,16],[14,0,14.4,1]],stroke:1},coal:{width:20,height:16,lines:[[1,5,7,1,7,7],[11,10,12,5,18,9],[5,10,2,15,9,15],[15,16,15,13,20,16],[15,0,15,2,20,0]],fill:1},breccia:{width:20,height:16,lines:[[1,5,7,1,7,7,1,5],[11,10,12,5,18,9,11,10],[5,10,2,15,9,15,5,10],[15,16,15,13,22,18],[15,0,15,2,20,0]],stroke:1},clay:{width:20,height:20,lines:[[0,0,3,11,0,20],[11,0,10,3,13,13,11,20],[0,0,10,3,20,0],[0,12,3,11,13,13,20,12]],stroke:1},flooded:{width:15,height:10,lines:[[0,1,10,1],[0,6,5,6],[10,6,15,6]],stroke:1},chaos:{width:40,height:40,lines:[[40,2,40,0,38,0,40,2],[4,0,3,2,2,5,0,0,0,3,2,7,5,6,7,7,8,10,9,12,9,13,9,14,8,14,6,15,2,15,0,20,0,22,2,20,5,19,8,15,10,14,11,12.25,10,12,10,10,12,9,13,7,12,6,13,4,16,7,17,4,20,0,18,0,15,3,14,2,14,0,12,1,11,0,10,1,11,4,10,7,9,8,8,5,6,4,5,3,5,1,5,0,4,0],[7,1,7,3,8,3,8,2,7,1],[4,3,5,5,4,5,4,3],[34,5,33,7,38,10,38,8,36,5,34,5],[27,0,23,2,21,8,30,0,27,0],[25,8,26,12,26,16,22.71875,15.375,20,13,18,15,17,18,13,22,17,21,19,22,21,20,19,18,22,17,30,25,26,26,24,28,21.75,33.34375,20,36,18,40,20,40,24,37,25,32,27,31,26,38,27,37,30,32,32,35,36,37,38,40,38,39,40,40,37,36,34,32,37,31,36,29,33,27,34,24,39,21,40,21,40,16,37,20,31,22,32,25,27,20,29,15,30,20,32,20,34,18,33,12,31,11,29,14,26,9,25,8],[39,24,37,26,40,28,39,24],[13,15,9,19,14,18,13,15],[18,23,14,27,16,27,17,25,20,26,18,23],[6,24,2,26,1,28,2,30,5,28,12,30,16,32,18,30,15,30,12,28,9,25,7,27,6,24],[29,27,32,28,33,31,30,29,27,28,29,27],[5,35,1,33,3,36,13,38,15,35,10,36,5,35]],fill:1},grass:{width:27,height:22,lines:[[0,10.5,13,10.5],[2.5,10,1.5,7],[4.5,10,4.5,5,3.5,4],[7,10,7.5,6,8.5,3],[10,10,11,6]],repeat:[[0,0],[14,10]],stroke:1},swamp:{width:24,height:23,lines:[[0,10.5,9.5,10.5],[2.5,10,2.5,7],[4.5,10,4.5,4],[6.5,10,6.5,6],[3,12.5,7,12.5]],repeat:[[0,0],[14,10]],stroke:1},reed:{width:26,height:23,lines:[[2.5,10,2,7],[4.5,10,4.2,4],[6.5,10,6.8,4],[8.5,10,9,6],[3.7,4,3.7,2.5],[4.7,4,4.7,2.5],[6.3,4,6.3,2.5],[7.3,4,7.3,2.5]],circles:[[4.2,2.5,.5],[18.2,12.5,.5],[6.8,2.5,.5],[20.8,12.5,.5],[9,6,.5],[23,16,.5]],repeat:[[0,0],[14,10]],stroke:1},wave:{width:10,height:8,lines:[[0,0,5,4,10,0]],stroke:1},vine:{width:13,height:13,lines:[[3,0,3,6],[9,7,9,13]],stroke:1},forest:{width:55,height:30,circles:[[7,7,3.5],[20,20,1.5],[42,22,3.5],[35,5,1.5]],stroke:1},forest2:{width:55,height:30,circles:[[7,7,3.5],[20,20,1.5],[42,22,3.5],[35,5,1.5]],fill:1,stroke:1},scrub:{width:26,height:20,lines:[[1,4,4,8,6,4]],circles:[[20,13,1.5]],stroke:1},tree:{width:30,height:30,lines:[[7.78,10.61,4.95,10.61,4.95,7.78,3.54,7.78,2.12,6.36,.71,6.36,0,4.24,.71,2.12,4.24,0,7.78,.71,9.19,3.54,7.78,4.95,7.07,7.07,4.95,7.78]],repeat:[[3,1],[18,16]],stroke:1},tree2:{width:30,height:30,lines:[[7.78,10.61,4.95,10.61,4.95,7.78,3.54,7.78,2.12,6.36,.71,6.36,0,4.24,.71,2.12,4.24,0,7.78,.71,9.19,3.54,7.78,4.95,7.07,7.07,4.95,7.78,4.95,10.61,7.78,10.61]],repeat:[[3,1],[18,16]],fill:1,stroke:1},pine:{width:30,height:30,lines:[[5.66,11.31,2.83,11.31,2.83,8.49,0,8.49,2.83,0,5.66,8.49,2.83,8.49]],repeat:[[3,1],[18,16]],stroke:1},pine2:{width:30,height:30,lines:[[5.66,11.31,2.83,11.31,2.83,8.49,0,8.49,2.83,0,5.66,8.49,2.83,8.49,2.83,11.31,5.66,11.31]],repeat:[[3,1],[18,16]],fill:1,stroke:1},mixtree:{width:30,height:30,lines:[[7.78,10.61,4.95,10.61,4.95,7.78,3.54,7.78,2.12,6.36,.71,6.36,0,4.24,.71,2.12,4.24,0,7.78,.71,9.19,3.54,7.78,4.95,7.07,7.07,4.95,7.78,4.95,10.61,7.78,10.61],[23.66,27.31,20.83,27.31,20.83,24.49,18,24.49,20.83,16,23.66,24.49,20.83,24.49,20.83,27.31,23.66,27.31]],repeat:[[3,1]],stroke:1},mixtree2:{width:30,height:30,lines:[[7.78,10.61,4.95,10.61,4.95,7.78,3.54,7.78,2.12,6.36,.71,6.36,0,4.24,.71,2.12,4.24,0,7.78,.71,9.19,3.54,7.78,4.95,7.07,7.07,4.95,7.78,4.95,10.61,7.78,10.61],[23.66,27.31,20.83,27.31,20.83,24.49,18,24.49,20.83,16,23.66,24.49,20.83,24.49,20.83,27.31,23.66,27.31]],repeat:[[3,1]],fill:1,stroke:1},pines:{width:22,height:20,lines:[[1,4,3.5,1,6,4],[1,8,3.5,5,6,8],[3.5,1,3.5,11],[12,14.5,14.5,14,17,14.5],[12,18,17,18],[14.5,12,14.5,18]],repeat:[[2,1]],stroke:1},rock:{width:20,height:20,lines:[[1,0,1,9],[4,0,4,9],[7,0,7,9],[10,1,19,1],[10,4,19,4],[10,7,19,7],[0,11,9,11],[0,14,9,14],[0,17,9,17],[12,10,12,19],[15,10,15,19],[18,10,18,19]],repeat:[[.5,.5]],stroke:1},rocks:{width:20,height:20,lines:[[5,0,3,0,5,4,4,6,0,3,0,5,3,6,5,9,3.75,10,2.5,10,0,9,0,10,4,11,5,14,4,15,0,13,0,13,0,13,0,14,0,14,5,16,5,18,3,19,0,19,-.25,19.9375,5,20,10,19,10,20,11,20,12,19,14,20,15,20,17,19,20,20,20,19,19,16,20,15,20,11,20,10,19,8,20,5,20,0,19,0,20,2,19,4,17,4,16,3,15,0,14,0,15,4,11,5,10,4,11,0,10,0,9,4,6,5,5,0],[18,5,19,6,18,10,16,10,14,9,16,5,18,5],[5,6,9,5,10,6,10,9,6,10,5,6],[14,5,14,8,13,9,12,9,11,7,12,5,14,5],[5,11,8,10,9,11,10,14,6,15,6,15,5,11],[13,10,14,11,15,14,15,14,15,14,11,15,10,11,11,10,13,10],[15,12,16,11,19,11,19,15,16,14,16,14,15,12],[6,16,9,15,10,18,5,19,6,16],[10,16,14,16,14,18,13,19,11,18,10,16],[15,15,18,16,18,18,16,19,15,18,15,15]],stroke:1}},ol.style.FlowLine=function(t){t||(t={}),ol.style.Style.call(this,{renderer:this._render.bind(this),stroke:t.stroke,text:t.text,zIndex:t.zIndex,geometry:t.geometry}),this._visible=!1!==t.visible,"function"==typeof t.width?this._widthFn=t.width:this.setWidth(t.width),this.setWidth2(t.width2),"function"==typeof t.color?this._colorFn=t.color:this.setColor(t.color),this.setColor2(t.color2),this.setLineCap(t.lineCap),this.setArrow(t.arrow),this.setArrowSize(t.arrowSize),this.setArrowColor(t.arrowColor),this._offset=[0,0],this.setOffset(t.offset0,0),this.setOffset(t.offset1,1),this._noOverlap=t.noOverlap},ol.ext.inherits(ol.style.FlowLine,ol.style.Style),ol.style.FlowLine.prototype.setWidth=function(t){this._width=t||0},ol.style.FlowLine.prototype.setWidth2=function(t){this._width2=t},ol.style.FlowLine.prototype.getOffset=function(t){return this._offset[t]},ol.style.FlowLine.prototype.setOffset=function(t,e){switch(t=Math.max(0,parseFloat(t)),e){case 0:this._offset[0]=t;break;case 1:this._offset[1]=t}},ol.style.FlowLine.prototype.setLineCap=function(t){this._lineCap="round"===t?"round":"butt"},ol.style.FlowLine.prototype.getWidth=function(t,e){if(this._widthFn)return this._widthFn(t,e);var o="number"==typeof this._width2?this._width2:this._width;return this._width+(o-this._width)*e},ol.style.FlowLine.prototype.setColor=function(t){try{this._color=ol.color.asArray(t)}catch(t){this._color=[0,0,0,1]}},ol.style.FlowLine.prototype.setColor2=function(t){try{this._color2=ol.color.asArray(t)}catch(t){this._color2=null}},ol.style.FlowLine.prototype.setArrowColor=function(t){try{this._acolor=ol.color.asString(t)}catch(t){this._acolor=null}},ol.style.FlowLine.prototype.getColor=function(t,e){if(this._colorFn)return ol.color.asString(this._colorFn(t,e));var o=this._color,i=this._color2||this._color;return"rgba("+ +Math.round(o[0]+(i[0]-o[0])*e)+","+Math.round(o[1]+(i[1]-o[1])*e)+","+Math.round(o[2]+(i[2]-o[2])*e)+","+(o[3]+(i[3]-o[3])*e)+")"},ol.style.FlowLine.prototype.getArrow=function(){return this._arrow},ol.style.FlowLine.prototype.setArrow=function(t){this._arrow=parseInt(t),(this._arrow<-1||this._arrow>2)&&(this._arrow=0)},ol.style.FlowLine.prototype.getArrowSize=function(){return this._arrowSize||[16,16]},ol.style.FlowLine.prototype.setArrowSize=function(t){Array.isArray(t)?this._arrowSize=t:"number"==typeof t&&(this._arrowSize=[t,t])},ol.style.FlowLine.prototype.drawArrow=function(t,e,o,i,n){var r=this.getArrowSize()[0]*n,s=ol.coordinate.dist2d(e,o),a=(e[0]-o[0])/s,l=(e[1]-o[1])/s;i=Math.max(this.getArrowSize()[1]/2,i/2)*n,t.beginPath(),t.moveTo(e[0],e[1]),t.lineTo(e[0]-r*a+i*l,e[1]-r*l-i*a),t.lineTo(e[0]-r*a-i*l,e[1]-r*l+i*a),t.lineTo(e[0],e[1]),t.fill()},ol.style.FlowLine.prototype._render=function(t,e){if("LineString"===e.geometry.getType()){var o,i,n,r=e.context;if(!this._visible){var s=e.pixelRatio/e.resolution,a=Math.cos(e.rotation),l=Math.sin(e.rotation);i=e.geometry.getCoordinates();var c=t[0][0]-i[0][0]*s*a-i[0][1]*s*l,h=t[0][1]-i[0][0]*s*l+i[0][1]*s*a;for(t=[],o=0;n=i[o];o++)t[o]=[c+n[0]*s*a+n[1]*s*l,h+n[0]*s*l-n[1]*s*a,n[2]]}var p=this.getArrowSize()[0]*e.pixelRatio;r.save(),this.getOffset(0)&&this._splitAsize(t,this.getOffset(0)*e.pixelRatio),this.getOffset(1)&&this._splitAsize(t,this.getOffset(1)*e.pixelRatio,!0),t.length>1&&(-1===this.getArrow()||2===this.getArrow())&&(n=this._splitAsize(t,p),this._acolor?r.fillStyle=this._acolor:r.fillStyle=this.getColor(e.feature,0),this.drawArrow(r,n[0],n[1],this.getWidth(e.feature,0),e.pixelRatio)),t.length>1&&this.getArrow()>0&&(n=this._splitAsize(t,p,!0),this._acolor?r.fillStyle=this._acolor:r.fillStyle=this.getColor(e.feature,1),this.drawArrow(r,n[0],n[1],this.getWidth(e.feature,1),e.pixelRatio));var u=this._splitInto(t,255,2),d=0,g=u.length;if(r.lineJoin="round",r.lineCap=this._lineCap||"butt",u.length>1)for(d=0;de){i=[i[0]+(n[0]-i[0])*(e-a)/s,i[1]+(n[1]-i[1])*(e-a)/s],s=ol.coordinate.dist2d(i,r),o?(t.push(n),t.push(i),t.push([i[0]+(r[0]-i[0])/s,i[1]+(r[1]-i[1])/s])):(t.unshift(n),t.unshift(i),t.unshift([i[0]+(r[0]-i[0])/s,i[1]+(r[1]-i[1])/s]));break}a+=s,i=n}return[r,i]},ol.style.FlowLine.prototype._splitInto=function(t,e,o){var i,n,r,s=this._noOverlap?1:.9,a=[],l=0;for(i=1;n=t[i];i++)l+=ol.coordinate.dist2d(t[i-1],n);var c=Math.max(o||2,l/(e||255)),h=t[0];l=0;var p=[h];for(i=1,n=t[1];ic){var g=(c-l)/r;p.push([h[0]+u*g,h[1]+d*g]),a.push(p),p=[h=[h[0]+u*g*s,h[1]+d*g*s]],l=0}else l+=r,h=n,p.push(h),n=t[++i]}return a.push(p),a},ol.style.FontSymbol=function(t){var e=0;(t=t||{}).stroke&&(e=t.stroke.getWidth()),ol.style.RegularShape.call(this,{radius:t.radius,fill:t.fill,rotation:t.rotation,rotateWithView:t.rotateWithView}),"number"==typeof t.opacity&&this.setOpacity(t.opacity),this.color_=t.color,this.fontSize_=t.fontSize||1,this.fontStyle_=t.fontStyle||"",this.stroke_=t.stroke,this.fill_=t.fill,this.radius_=t.radius-e,this.form_=t.form||"none",this.gradient_=t.gradient,this.offset_=[t.offsetX?t.offsetX:0,t.offsetY?t.offsetY:0],t.glyph?this.glyph_=this.getGlyph(t.glyph):this.glyph_=this.getTextGlyph(t.text||"",t.font),this.renderMarker_()},ol.ext.inherits(ol.style.FontSymbol,ol.style.RegularShape),ol.style.Image.prototype.getImagePNG=function(t){t=t||window.devicePixelRatio;var e=this.getImage(t);if(!e)return!1;try{return e.toDataURL("image/png")}catch(t){return!1}},ol.style.FontSymbol.prototype.defs={fonts:{},glyphs:{}},ol.style.FontSymbol.addDefs=function(t,e){var o=t;if("string"==typeof t&&(o={font:t,name:t,copyright:""}),o.font&&"string"==typeof o.font){var i=o.font;for(var n in ol.style.FontSymbol.prototype.defs.fonts[i]=o,e){var r=e[n];"string"==typeof r&&1==r.length&&(r={char:r}),ol.style.FontSymbol.prototype.defs.glyphs[n]={font:o.font,char:r.char||""+String.fromCharCode(r.code)||"",theme:r.theme||o.name,name:r.name||n,search:r.search||""}}}else console.log("bad font def")},ol.style.FontSymbol.prototype.clone=function(){var t=new ol.style.FontSymbol({glyph:"",color:this.color_,fontSize:this.fontSize_,fontStyle:this.fontStyle_,stroke:this.stroke_,fill:this.fill_,radius:this.radius_+(this.stroke_?this.stroke_.getWidth():0),form:this.form_,gradient:this.gradient_,offsetX:this.offset_[0],offsetY:this.offset_[1],opacity:this.getOpacity(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView()});return t.setScale(this.getScale()),t.glyph_=this.glyph_,t.renderMarker_(),t},ol.style.FontSymbol.prototype.getFill=function(){return this.fill_},ol.style.FontSymbol.prototype.getStroke=function(){return this.stroke_},ol.style.FontSymbol.prototype.getGlyph=function(t){return t?ol.style.FontSymbol.prototype.defs.glyphs[t]||{font:"sans-serif",char:t.charAt(0),theme:"none",name:"none",search:""}:this.glyph_},ol.style.FontSymbol.prototype.getTextGlyph=function(t,e){return{font:e||"sans-serif",char:String(t),theme:"none",name:"none",search:""}},ol.style.FontSymbol.prototype.getGlyphName=function(){for(var t in ol.style.FontSymbol.prototype.defs.glyphs)if(ol.style.FontSymbol.prototype.defs.glyphs[t]===this.glyph_)return t;return""},ol.style.FontSymbol.prototype.getFontInfo=function(t){return ol.style.FontSymbol.prototype.defs.fonts[t.font]},ol.style.FontSymbol.prototype.renderMarker_=function(t){if(t){var e,o=0;this.stroke_&&(e=ol.color.asString(this.stroke_.getColor()),o=this.stroke_.getWidth());var i=this.getImage(t),n={strokeStyle:e,strokeWidth:o,size:i.width/t},r=i.getContext("2d");if(r.clearRect(0,0,i.width,i.height),this.drawMarker_(n,r,0,0,t),this.setDisplacement)this.setDisplacement([this.offset_[0],-this.offset_[1]]);else{var s=this.getAnchor();s[0]=i.width/2-this.offset_[0],s[1]=i.width/2-this.offset_[1]}}else this.getPixelRatio?(t=window.devicePixelRatio,this.renderMarker_(t),this.getPixelRatio&&1!==t&&this.renderMarker_(1)):this.renderMarker_(1)},ol.style.FontSymbol.prototype.drawPath_=function(t,e){var o=2*this.radius_+t.strokeWidth+1,i=t.strokeWidth/2,n=t.size/2,r={fac:1,posX:t.size/2,posY:t.size/2};switch(e.lineJoin="round",e.beginPath(),this.form_){case"none":r.fac=1;break;case"circle":case"ban":e.arc(n,n,o/2,0,2*Math.PI,!0);break;case"poi":e.arc(n,n-.4*this.radius_,.6*this.radius_,.15*Math.PI,.85*Math.PI,!0),e.lineTo(n-.89*.05*o,(.95+.45*.05)*o+i),e.arc(n,.95*o+i,.05*o,.85*Math.PI,.15*Math.PI,!0),r={fac:.45,posX:n,posY:n-.35*this.radius_};break;case"bubble":e.arc(n,n-.2*this.radius_,.8*this.radius_,.4*Math.PI,.6*Math.PI,!0),e.lineTo(.5*o+i,o+i),r={fac:.7,posX:n,posY:n-.2*this.radius_};break;case"marker":e.arc(n,n-.2*this.radius_,.8*this.radius_,.25*Math.PI,.75*Math.PI,!0),e.lineTo(.5*o+i,o+i),r={fac:.7,posX:n,posY:n-.2*this.radius_};break;case"coma":e.moveTo(n+.8*this.radius_,n-.2*this.radius_),e.quadraticCurveTo(.95*o+i,.75*o+i,.5*o+i,o+i),e.arc(n,n-.2*this.radius_,.8*this.radius_,.45*Math.PI,0,!1),r={fac:.7,posX:n,posY:n-.2*this.radius_};break;default:var s;switch(this.form_){case"shield":s=[.05,0,.95,0,.95,.8,.5,1,.05,.8,.05,0],r.posY=.45*o+i;break;case"blazon":s=[.1,0,.9,0,.9,.8,.6,.8,.5,1,.4,.8,.1,.8,.1,0],r.fac=.8,r.posY=.4*o+i;break;case"bookmark":s=[.05,0,.95,0,.95,1,.5,.8,.05,1,.05,0],r.fac=.9,r.posY=.4*o+i;break;case"hexagon":s=[.05,.2,.5,0,.95,.2,.95,.8,.5,1,.05,.8,.05,.2],r.fac=.9,r.posY=.5*o+i;break;case"diamond":s=[.25,0,.75,0,1,.2,1,.4,.5,1,0,.4,0,.2,.25,0],r.fac=.75,r.posY=.35*o+i;break;case"triangle":s=[0,0,1,0,.5,1,0,0],r.fac=.6,r.posY=.3*o+i;break;case"sign":s=[.5,.05,1,.95,0,.95,.5,.05],r.fac=.7,r.posY=.65*o+i;break;case"lozenge":s=[.5,0,1,.5,.5,1,0,.5,.5,0],r.fac=.7;break;case"square":default:s=[0,0,1,0,1,1,0,1,0,0]}for(var a=0;athis.textPathMaxResolution_)){var e,o=t.frameState.extent,i=t.frameState.coordinateToPixelTransform,n=t.context;n.save(),n.scale(t.frameState.pixelRatio,t.frameState.pixelRatio);for(var r,s=this.getSource().getFeaturesInExtent(o),a=0;r=s[a];a++)for(var l,c=this.textPathStyle_(r,t.frameState.viewState.resolution),h=0;l=c[h];h++){var p,u=l.getGeometry()||r.getGeometry();switch(u.getType()){case"LineString":p=u.getCoordinates();break;case"MultiLineString":p=u.getLineString(0).getCoordinates();break;default:continue}var d=l.getText(),g=m(p,d.getRotateWithView());n.font=d.getFont(),n.textBaseline=d.getTextBaseline(),n.textAlign=d.getTextAlign(),n.lineWidth=d.getStroke()&&d.getStroke().getWidth()||0,n.strokeStyle=d.getStroke()&&d.getStroke().getColor()||"#fff",n.fillStyle=d.getFill()&&d.getFill().getColor()||"#000",n.textJustify="justify"==d.getTextAlign(),n.textOverflow=d.getTextOverflow?d.getTextOverflow():"",n.minWidth=d.getMinWidth?d.getMinWidth():0,n.textPath(d.getText()||r.get("name"),g)}n.restore()}function m(t,o){var n=[];for(e=0;en[n.length-2]){var r=[];for(e=n.length-2;e>=0;e-=2)r.push(n[e]),r.push(n[e+1]);return r}return n}}.bind(this))),void 0===t&&(t=[new ol.style.Style({text:new ol.style.Text})]),this.textPathStyle_="function"==typeof t?t:function(){return t},this.textPathMaxResolution_=Number(e)||Number.MAX_VALUE,this.changed()},ol.style.TextPath=function(t){t||(t={}),ol.style.Text.call(this,t),this.textOverflow_=void 0!==t.textOverflow?t.textOverflow:"visible",this.minWidth_=t.minWidth||0},ol.ext.inherits(ol.style.TextPath,ol.style.Text),ol.style.TextPath.prototype.getTextOverflow=function(){return this.textOverflow_},ol.style.TextPath.prototype.getMinWidth=function(){return this.minWidth_}}(),CanvasRenderingContext2D.prototype.textPath=function(t,e){var o=this;function i(t,e,o,i){var n=o-t,r=i-e;return Math.sqrt(n*n+r*r)}var n,r=0,s=2;function a(t,e){if(!n||r+ne))&&!((s+=2)>=t.length);)r+=n;var o,a,l,c=e-r;return s>=t.length&&(s=t.length-2),c?(o=t[s-2]+(t[s]-t[s-2])*c/n,a=t[s-1]+(t[s+1]-t[s-1])*c/n,l=Math.atan2(t[s+1]-t[s-1],t[s]-t[s-2])):(o=t[s-2],a=t[s-1],l=Math.atan2(t[s+1]-t[s-1],t[s]-t[s-2])),[o,a,l]}for(var l=.25*o.measureText(" ").width,c=0,h=0,p=2;p0?Number(t.scale):1)*ol.has.DEVICE_PIXEL_RATIO||ol.has.DEVICE_PIXEL_RATIO,r=i.getContext("2d");if(t.image){t.image.load();var s=t.image.getImage();if(s.width)i.width=Math.round(s.width*n),i.height=Math.round(s.height*n),r.globalAlpha="number"==typeof t.opacity?t.opacity:1,r.drawImage(s,0,0,s.width,s.height,0,0,i.width,i.height),e=r.createPattern(i,"repeat");else{var a=this;e=[0,0,0,0],s.onload=function(){i.width=Math.round(s.width*n),i.height=Math.round(s.height*n),r.globalAlpha="number"==typeof t.opacity?t.opacity:1,r.drawImage(s,0,0,s.width,s.height,0,0,i.width,i.height),e=r.createPattern(i,"repeat"),a.setColor(e)}}}else{var l=this.getPattern_(t);if(i.width=Math.round(l.width*n),i.height=Math.round(l.height*n),r.beginPath(),t.fill&&(r.fillStyle=ol.color.asString(t.fill.getColor()),r.fillRect(0,0,i.width,i.height)),r.scale(n,n),r.lineCap="round",r.lineWidth=l.stroke||1,r.fillStyle=ol.color.asString(t.color||"#000"),r.strokeStyle=ol.color.asString(t.color||"#000"),l.circles)for(o=0;o180&&(n-=360),n*=Math.PI/180;var r=Math.cos(n),s=Math.sin(n);if(Math.abs(s)<1e-4)o.width=o.height=i,o.lines=[[0,.5,i,.5]],o.repeat=[[0,0],[0,i]];else if(Math.abs(r)<1e-4)o.width=o.height=i,o.lines=[[.5,0,.5,i]],o.repeat=[[0,0],[i,0]],"cross"==t.pattern&&(o.lines.push([0,.5,i,.5]),o.repeat.push([0,i]));else{var a=o.width=Math.round(Math.abs(i/s))||1,l=o.height=Math.round(Math.abs(i/r))||1;"cross"==t.pattern?(o.lines=[[-a,-l,2*a,2*l],[2*a,-l,-a,2*l]],o.repeat=[[0,0]]):r*s>0?(o.lines=[[-a,-l,2*a,2*l]],o.repeat=[[0,0],[a,0],[0,l]]):(o.lines=[[2*a,-l,-a,2*l]],o.repeat=[[0,0],[-a,0],[0,l]])}o.stroke=0===t.size?0:t.size||4}return o},ol.style.Style.defaultStyle,function(){var t=[255,255,255,1],e=[0,153,255,1],o=[new ol.style.Style({stroke:new ol.style.Stroke({color:t,width:5})}),new ol.style.Style({image:new ol.style.Circle({radius:6,fill:new ol.style.Fill({color:e}),stroke:new ol.style.Stroke({color:t,width:1.5})}),stroke:new ol.style.Stroke({color:e,width:3}),fill:new ol.style.Fill({color:[255,255,255,.5]})})];ol.style.Style.defaultStyle=function(t){if(!0===t)return o;t=t||{};var e=new ol.style.Fill({color:t.fillColor||"rgba(255,255,255,0.4)"}),i=new ol.style.Stroke({color:t.color||"#3399CC",width:1.25});return[new ol.style.Style({image:new ol.style.Circle({fill:e,stroke:i,radius:5}),fill:e,stroke:i})]}}(),ol.style.geoportailStyle,function(){var t={},e=0;function o(o){var i="ROUT-"+e+++"-";return function(e,n){var r=!0===o.sens||n0?[0,100,0,1]:[0,128,0,1];if(!t.get("importance"))return"magenta";if("Piste cyclable"===t.get("nature"))return[27,177,27,.5];if("0"!=t.get("position_par_rapport_au_sol")){var e;switch(t.get("importance")){case"1":e=[177,27,177,1];break;case"2":e=[177,27,27,1];break;case"3":e=[217,119,0,1];break;case"4":e=[255,225,0,1];break;case"5":e=[204,204,204,1];break;default:e=[211,211,211,1]}return t.get("position_par_rapport_au_sol")<0&&(e[3]=.7),e}switch(t.get("importance")){case"1":return[255,0,255,1];case"2":return[255,0,0,1];case"3":return[255,165,0,1];case"4":return[255,255,0,1];case"5":return[255,255,255,1];default:return[211,211,211,1]}}(e),width:function(t){return Math.max(t.get("largeur_de_chaussee")||2,2)}(e),lineDash:function(t){switch(t.get("nature")){case"Escalier":return[1,4];case"Sentier":return[8,10]}}(e)}),zIndex:function(t){if(!t.get("position_par_rapport_au_sol"))return 100;var e=Number(t.get("position_par_rapport_au_sol"));return e>0?10+10*e-(Number(t.get("importance"))||10):e<0?Math.max(4+e,0):10-(Number(t.get("importance"))||10)}(e)-100})]),a[0].getText()&&a[0].getText().setRotation(function(t){for(var e,o,i=t.getCoordinates(),n=0,r=t.getLength(),s=0;s=r/2));s++);return-Math.atan2(o,e)}(e.getGeometry())),a}}var i={111:{color:[230,0,77,255],title:"Continuous urban fabric"},112:{color:[255,0,0,255],title:"Discontinuous urban fabric"},121:{color:[204,77,242,255],title:"Industrial or commercial units"},122:{color:[204,0,0,255],title:"Road and rail networks and associated land"},123:{color:[230,204,204,255],title:"Port areas"},124:{color:[230,204,230,255],title:"Airports"},131:{color:[166,0,204,255],title:"Mineral extraction sites"},132:{color:[166,77,0,255],title:"Dump sites"},133:{color:[255,77,255,255],title:"Construction sites"},141:{color:[255,166,255,255],title:"Green urban areas"},142:{color:[255,230,255,255],title:"Sport and leisure facilities"},211:{color:[255,255,168,255],title:"Non-irrigated arable land"},212:{color:[255,255,0,255],title:"Permanently irrigated land"},213:{color:[230,230,0,255],title:"Rice fields"},221:{color:[230,128,0,255],title:"Vineyards"},222:{color:[242,166,77,255],title:"Fruit trees and berry plantations"},223:{color:[230,166,0,255],title:"Olive groves"},231:{color:[230,230,77,255],title:"Pastures"},241:{color:[255,230,166,255],title:"Annual crops associated with permanent crops"},242:{color:[255,230,77,255],title:"Complex cultivation patterns"},243:{color:[230,204,77,255],title:"Land principally occupied by agriculture with significant areas of natural vegetation"},244:{color:[242,204,166,255],title:"Agro-forestry areas"},311:{color:[128,255,0,255],title:"Broad-leaved forest"},312:{color:[0,166,0,255],title:"Coniferous forest"},313:{color:[77,255,0,255],title:"Mixed forest"},321:{color:[204,242,77,255],title:"Natural grasslands"},322:{color:[166,255,128,255],title:"Moors and heathland"},323:{color:[166,230,77,255],title:"Sclerophyllous vegetation"},324:{color:[166,242,0,255],title:"Transitional woodland-shrub"},331:{color:[230,230,230,255],title:"Beaches dunes sands"},332:{color:[204,204,204,255],title:"Bare rocks"},333:{color:[204,255,204,255],title:"Sparsely vegetated areas"},334:{color:[0,0,0,255],title:"Burnt areas"},335:{color:[166,230,204,255],title:"Glaciers and perpetual snow"},411:{color:[166,166,255,255],title:"Inland marshes"},412:{color:[77,77,255,255],title:"Peat bogs"},421:{color:[204,204,255,255],title:"Salt marshes"},422:{color:[230,230,255,255],title:"Salines"},423:{color:[166,166,230,255],title:"Intertidal flats"},511:{color:[0,204,242,255],title:"Water courses"},512:{color:[128,242,230,255],title:"Water bodies"},521:{color:[0,255,166,255],title:"Coastal lagoons"},522:{color:[166,255,230,255],title:"Estuaries"},523:{color:[230,242,255,255],title:"Sea and ocean"}};ol.style.geoportailStyle=function(n,r){switch(r=r||{},n){case"BDTOPO_V3:troncon_de_route":return o(r);case"BDTOPO_V3:batiment":return function(o){var i="BATI-"+e+++"-";return function(e){if(e.get("detruit"))return[];var n=i+e.get("usage_1")+"-"+e.get("nature")+"-"+e.get("etat_de_l_objet"),r=t[n];if(!r){var s=function(t){switch(t.get("nature")){case"Industriel, agricole ou commercial":return[51,102,153,1];case"Remarquable":return[0,192,0,1];default:switch(t.get("usage_1")){case"Résidentiel":case"Indifférencié":return[128,128,128,1];case"Industriel":case"Commercial et services":return[51,102,153,1];case"Sportif":return[51,153,102,1];case"Religieux":return[153,102,51,1];default:return[153,51,51,1]}}}(e),a=[s[0],s[1],s[1],.5],l=!/en service/i.test(e.get("etat_de_l_objet"));l&&(a[3]=.1);var c=o.symbol?function(t){switch(t.get("usage_1")){case"Commercial et services":return"";case"Sportif":return"";default:return null}}(e):null;return[new ol.style.Style({text:c?new ol.style.Text({text:c,font:"12px FontAwesome",fill:new ol.style.Fill({color:[0,0,0,.6]})}):null,fill:new ol.style.Fill({color:a}),stroke:new ol.style.Stroke({color:s,width:1.5,lineDash:l?[5,5]:null})})]}return r}}(r);case"CADASTRALPARCELS.PARCELLAIRE_EXPRESS:parcelle":return function(t){var e=new ol.style.Style({text:new ol.style.Text({text:"0000",font:"bold 12px sans-serif",fill:new ol.style.Fill({color:[100,0,255,1]}),stroke:new ol.style.Stroke({color:[255,255,255,.8],width:3})}),stroke:new ol.style.Stroke({color:[255,165,0,1],width:1.5}),fill:new ol.style.Fill({color:[100,0,255,.1]})});return function(o,i){return i<.8?e.getText().setFont("bold 12px sans-serif"):e.getText().setFont("bold 10px sans-serif"),t.section?e.getText().setText(o.get("section")+"-"+(o.get("numero")||"").replace(/^0*/,"")):e.getText().setText((o.get("numero")||"").replace(/^0*/,"")),e}}(r);default:return/LANDCOVER/.test(n)?(r.date=n.replace(/[^\d]*(\d*).*/,"$1"),function(e){return function(o){var n=o.get("code_"+e.date),r=t["CLC-"+n];if(!r){var s=i[n].color.slice();s[3]=e.opacity||1,r=t["CLC-"+n]=new ol.style.Style({fill:new ol.style.Fill({color:s||[255,255,255,.5]})})}return r}}(r)):(console.warn("[ol/style/geoportailStyle] no style defined for type: "+n),ol.style.Style.defaultStyle())}},ol.style.geoportailStyle.clcColors=JSON.parse(JSON.stringify(i))}(); \ No newline at end of file +function projectVectorOnVector(t,e){var o=(t[0]*e[0]+t[1]*e[1])/(e[0]*e[0]+e[1]*e[1]);return[e[0]*o,e[1]*o]}function countVector(t,e){return[e[0]-t[0],e[1]-t[1]]}function movePoint(t,e){return[t[0]+e[0],t[1]+e[1]]}window.ol&&!ol.ext&&(ol.ext={}),ol.ext.inherits=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t},window.ol&&(ol.inherits||(ol.inherits=ol.ext.inherits)),window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),window.Element&&!Element.prototype.remove&&(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),ol.ext.Ajax=function(t){t=t||{},ol.Object.call(this),this._auth=t.auth,this.set("dataType",t.dataType||"JSON")},ol.ext.inherits(ol.ext.Ajax,ol.Object),ol.ext.Ajax.get=function(t){var e=new ol.ext.Ajax(t);t.success&&e.on("success",function(e){t.success(e.response,e)}),t.error&&e.on("error",function(e){t.error(e)}),e.send(t.url,t.data,t.options)},ol.ext.Ajax.getCORS=function(t,e){var o=new XMLHttpRequest;o.open("GET",t,!0),o.send(),o.onreadystatechange=function(){this.readyState==this.HEADERS_RECEIVED&&e(o.getResponseHeader("Access-Control-Allow-Origin"))}},ol.ext.Ajax.prototype.send=function(t,e,o){var i=this,n=!1!==(o=o||{}).encode;n&&(t=encodeURI(t));var r="";for(var s in e)e.hasOwnProperty(s)&&void 0!==e[s]&&(r+=(r?"&":"?")+s+"="+(n?encodeURIComponent(e[s]):e[s]));this._request&&!1!==o.abort&&this._request.abort();var a=this._request=new XMLHttpRequest;a.open("GET",t+r,!0),o.timeout&&(a.timeout=o.timeout),this._auth&&a.setRequestHeader("Authorization","Basic "+this._auth),this.dispatchEvent({type:"loadstart"}),a.onload=function(){if(i._request=null,i.dispatchEvent({type:"loadend"}),this.status>=200&&this.status<400){var t;try{switch(i.get("dataType")){case"JSON":t=JSON.parse(this.response);break;default:t=this.response}}catch(t){return void i.dispatchEvent({type:"error",status:0,statusText:"parsererror",error:t,options:o,jqXHR:this})}i.dispatchEvent({type:"success",response:t,status:this.status,statusText:this.statusText,options:o,jqXHR:this})}else i.dispatchEvent({type:"error",status:this.status,statusText:this.statusText,options:o,jqXHR:this})},a.ontimeout=function(){i._request=null,i.dispatchEvent({type:"loadend"}),i.dispatchEvent({type:"error",status:this.status,statusText:"Timeout",options:o,jqXHR:this})},a.onerror=function(){i._request=null,i.dispatchEvent({type:"loadend"}),i.dispatchEvent({type:"error",status:this.status,statusText:this.statusText,options:o,jqXHR:this})},a.send()},ol.ext.SVGFilter=function(t){t=t||{},ol.Object.call(this),ol.ext.SVGFilter.prototype.svg||(ol.ext.SVGFilter.prototype.svg=document.createElementNS(this.NS,"svg"),ol.ext.SVGFilter.prototype.svg.setAttribute("version","1.1"),ol.ext.SVGFilter.prototype.svg.setAttribute("width",0),ol.ext.SVGFilter.prototype.svg.setAttribute("height",0),ol.ext.SVGFilter.prototype.svg.style.position="absolute",document.body.appendChild(ol.ext.SVGFilter.prototype.svg)),this.element=document.createElementNS(this.NS,"filter"),this._id=t.id||"_ol_SVGFilter_"+ol.ext.SVGFilter.prototype._id++,this.element.setAttribute("id",this._id),t.color&&this.element.setAttribute("color-interpolation-filters",t.color),t.operation&&this.addOperation(t.operation),ol.ext.SVGFilter.prototype.svg.appendChild(this.element)},ol.ext.inherits(ol.ext.SVGFilter,ol.Object),ol.ext.SVGFilter.prototype.NS="http://www.w3.org/2000/svg",ol.ext.SVGFilter.prototype.svg=null,ol.ext.SVGFilter.prototype._id=0,ol.ext.SVGFilter.prototype.getId=function(){return this._id},ol.ext.SVGFilter.prototype.remove=function(){this.element.remove()},ol.ext.SVGFilter.prototype.addOperation=function(t){t instanceof Array?t.forEach(function(t){this.addOperation(t)}.bind(this)):(t instanceof ol.ext.SVGOperation||(t=new ol.ext.SVGOperation(t)),this.element.appendChild(t.geElement()))},ol.ext.SVGFilter.prototype.grayscale=function(t){this.addOperation({feoperation:"feColorMatrix",type:"saturate",values:t||0})},ol.ext.SVGFilter.prototype.luminanceToAlpha=function(t){t=t||{},this.addOperation({feoperation:"feColorMatrix",type:"luminanceToAlpha"}),t.gamma&&this.addOperation({feoperation:"feComponentTransfer",operations:[{feoperation:"feFuncA",type:"gamma",amplitude:t.gamma,exponent:1,offset:0}]})},ol.ext.SVGFilter.prototype.applyTo=function(t){var e=document.createElement("CANVAS");return e.width=t.naturalWidth||t.width,e.height=t.naturalHeight||t.height,e.getContext("2d").filter="url(#"+this.getId()+")",e.getContext("2d").drawImage(t,0,0),e},ol.ext.SVGOperation=function(t){"string"==typeof t&&(t={feoperation:t}),t&&t.feoperation?(ol.Object.call(this),this._name=t.feoperation,this.element=document.createElementNS(this.NS,this._name),this.setProperties(t),t.operations instanceof Array&&this.appendChild(t.operations)):console.error("[SVGOperation]: no operation defined.")},ol.ext.inherits(ol.ext.SVGOperation,ol.Object),ol.ext.SVGOperation.prototype.NS="http://www.w3.org/2000/svg",ol.ext.SVGOperation.prototype.getName=function(){return this._name},ol.ext.SVGOperation.prototype.set=function(t,e){/^feoperation$|^operations$/.test(t)||(ol.Object.prototype.set.call(this,t,e),this.element.setAttribute(t,e))},ol.ext.SVGOperation.prototype.setProperties=function(t){for(var e in t=t||{})this.set(e,t[e])},ol.ext.SVGOperation.prototype.geElement=function(){return this.element},ol.ext.SVGOperation.prototype.appendChild=function(t){t instanceof Array?t.forEach(function(t){this.appendChild(t)}.bind(this)):(t instanceof ol.ext.SVGOperation||(t=new ol.ext.SVGOperation(t)),this.element.appendChild(t.geElement()))},ol.View.prototype.flyTo&&console.warn("[OL-EXT] ol/View~View.flyTo redefinition"),ol.View.prototype.flyTo=function(t,e){t=t||{},this.cancelAnimations();var o="function"==typeof e?e:function(){},i=t.duration||2e3,n=t.zoomAt||Math.min(t.zoom||100,this.getZoom())-2,r=t.zoom||this.getZoom(),s=t.center||this.getCenter();this.animate({center:s,duration:i,easing:t.easing,anchor:t.anchor,rotation:t.rotation}),this.animate({zoom:n,duration:i/2,easing:t.easing,anchor:t.anchor},{zoom:r,duration:i/2,easing:t.easing,anchor:t.anchor},o)},ol.View.prototype.takeTour=function(t,e){e=e||{};var o=-1,i=function(n){if(n){var r=t[++o];if("function"==typeof e.step&&e.step(o,t),r){r instanceof Array&&(r={center:[r[0],r[1]],zoom:r[2],type:r[3]});var s=0===o?0:e.delay||750;r.easing||(r.easing=e.easing),r.type||(r.type=e.type),setTimeout(function(){switch(r.type){case"moveTo":this.animate(r,i);break;case"flightTo":default:this.flyTo(r,i)}}.bind(this),s)}else"function"==typeof e.done&&e.done(!0)}else"function"==typeof e.done&&e.done(!1)}.bind(this);i(!0)},ol.color.toHSL=function(t,e){void 0===e&&(e=100),Array.isArray(t)||(t=ol.color.asArray(t));var o,i,n=t[0]/255,r=t[1]/255,s=t[2]/255,a=Math.max(n,r,s),l=Math.min(n,r,s),c=(a+l)/2;if(a===l)o=i=0;else{var h=a-l;switch(i=c>.5?h/(2-a-l):h/(a+l),a){case n:o=(r-s)/h+(r3&&(p[3]=t[3]),p},ol.color.fromHSL=function(t,e){void 0===e&&(e=1e3);var o,i,n,r=t[0]/360,s=t[1]/100,a=t[2]/100;if(0==s)o=i=n=a;else{var l=function(t,e,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?t+6*(e-t)*o:o<.5?e:o<2/3?t+(e-t)*(2/3-o)*6:t},c=a<.5?a*(1+s):a+s-a*s,h=2*a-c;o=l(h,c,r+1/3),i=l(h,c,r),n=l(h,c,r-1/3)}var p=[Math.round(255*o*e)/e,Math.round(255*i*e)/e,Math.round(255*n*e)/e];return t.length>3&&(p[3]=t[3]),p},ol.color.toHSV=function(t,e){void 0===e&&(e=100),Array.isArray(t)||(t=ol.color.asArray(t));var o,i,n=t[0]/255,r=t[1]/255,s=t[2]/255,a=Math.max(n,r,s),l=Math.min(n,r,s),c=a,h=a-l;if(i=0==a?0:h/a,a==l)o=0;else switch(a){case n:o=(r-s)/h+(r3&&(p[3]=t[3]),p},ol.color.fromHSV=function(t,e){void 0===e&&(e=1e3);var o,i,n,r=t[0]/360,s=t[1]/100,a=t[2]/100,l=Math.floor(6*r),c=6*r-l,h=a*(1-s),p=a*(1-c*s),u=a*(1-(1-c)*s);switch(l%6){case 0:o=a,i=u,n=h;break;case 1:o=p,i=a,n=h;break;case 2:o=h,i=a,n=u;break;case 3:o=h,i=p,n=a;break;case 4:o=u,i=h,n=a;break;case 5:o=a,i=h,n=p}var d=[Math.round(255*o*e)/e,Math.round(255*i*e)/e,Math.round(255*n*e)/e];return t.length>3&&(d[3]=t[3]),d},ol.color.toHexa=function(t){return"#"+((1<<24)+(t[0]<<16)+(t[1]<<8)+t[2]).toString(16).slice(1)},ol.ext.element={},ol.ext.element.create=function(t,e){var o;if(e=e||{},"TEXT"===t)o=document.createTextNode(e.html||""),e.parent&&e.parent.appendChild(o);else for(var i in o=document.createElement(t),/button/i.test(t)&&o.setAttribute("type","button"),e)switch(i){case"className":e.className&&e.className.trim&&o.setAttribute("class",e.className.trim());break;case"text":o.innerText=e.text;break;case"html":e.html instanceof Element?o.appendChild(e.html):void 0!==e.html&&(o.innerHTML=e.html);break;case"parent":e.parent&&e.parent.appendChild(o);break;case"options":if(/select/i.test(t))for(var n in e.options)ol.ext.element.create("OPTION",{html:n,value:e.options[n],parent:o});break;case"style":this.setStyle(o,e.style);break;case"change":case"click":ol.ext.element.addListener(o,i,e[i]);break;case"on":for(var r in e.on)ol.ext.element.addListener(o,r,e.on[r]);break;case"checked":o.checked=!!e.checked;break;default:o.setAttribute(i,e[i])}return o},ol.ext.element.createSwitch=function(t){var e=ol.ext.element.create("INPUT",{type:"checkbox",on:t.on,click:t.click,change:t.change,parent:t.parent}),o=Object.assign({input:e},t||{});return new ol.ext.input.Switch(o),e},ol.ext.element.createCheck=function(t){var e=ol.ext.element.create("INPUT",{name:t.name,type:"radio"===t.type?"radio":"checkbox",on:t.on,parent:t.parent});console.log(e);var o=Object.assign({input:e},t||{});return"radio"===t.type?new ol.ext.input.Radio(o):new ol.ext.input.Checkbox(o),e},ol.ext.element.setHTML=function(t,e){e instanceof Element?t.appendChild(e):void 0!==e&&(t.innerHTML=e)},ol.ext.element.appendText=function(t,e){t.appendChild(document.createTextNode(e||""))},ol.ext.element.addListener=function(t,e,o,i){"string"==typeof e&&(e=e.split(" ")),e.forEach(function(e){t.addEventListener(e,o,i)})},ol.ext.element.removeListener=function(t,e,o){"string"==typeof e&&(e=e.split(" ")),e.forEach(function(e){t.removeEventListener(e,o)})},ol.ext.element.show=function(t){t.style.display=""},ol.ext.element.hide=function(t){t.style.display="none"},ol.ext.element.hidden=function(t){return"none"===ol.ext.element.getStyle(t,"display")},ol.ext.element.toggle=function(t){t.style.display="none"===t.style.display?"":"none"},ol.ext.element.setStyle=function(t,e){for(var o in e)switch(o){case"top":case"left":case"bottom":case"right":case"minWidth":case"maxWidth":case"width":case"height":"number"==typeof e[o]?t.style[o]=e[o]+"px":t.style[o]=e[o];break;default:t.style[o]=e[o]}},ol.ext.element.getStyle=function(t,e){var o,i=(t.ownerDocument||document).defaultView;if(i&&i.getComputedStyle)e=e.replace(/([A-Z])/g,"-$1").toLowerCase(),o=i.getComputedStyle(t,null).getPropertyValue(e);else if(t.currentStyle&&(e=e.replace(/-(\w)/g,function(t,e){return e.toUpperCase()}),o=t.currentStyle[e],/^\d+(em|pt|%|ex)?$/i.test(o)))return function(e){var o=t.style.left,i=t.runtimeStyle.left;return t.runtimeStyle.left=t.currentStyle.left,t.style.left=e||0,e=t.style.pixelLeft+"px",t.style.left=o,t.runtimeStyle.left=i,e}(o);return/px$/.test(o)?parseInt(o):o},ol.ext.element.outerHeight=function(t){return t.offsetHeight+ol.ext.element.getStyle(t,"marginBottom")},ol.ext.element.outerWidth=function(t){return t.offsetWidth+ol.ext.element.getStyle(t,"marginLeft")},ol.ext.element.offsetRect=function(t){var e=t.getBoundingClientRect();return{top:e.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:e.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0),height:e.height||e.bottom-e.top,width:e.width||e.right-e.left}},ol.ext.element.getFixedOffset=function(t){var e={left:0,top:0},o=function(t){if(!t)return e;if("absolute"===ol.ext.element.getStyle(t,"position")&&"none"!==ol.ext.element.getStyle(t,"transform")){var i=t.getBoundingClientRect();return e.left+=i.left,e.top+=i.top,e}return o(t.offsetParent)};return o(t.offsetParent)},ol.ext.element.positionRect=function(t,e){var o=0,i=0,n=function(r){if(r)return o+=r.offsetLeft,i+=r.offsetTop,n(r.offsetParent);var s={top:t.offsetTop+i,left:t.offsetLeft+o};return e&&(s.top-=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,s.left-=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0),s.bottom=s.top+t.offsetHeight,s.right=s.top+t.offsetWidth,s};return n(t.offsetParent)},ol.ext.element.scrollDiv=function(t,e){var o,i,n,r,s,a=!1,l=0,c=0,h="function"==typeof(e=e||{}).onmove?e.onmove:function(){},p=e.vertical?"screenY":"screenX",u=e.vertical?"scrollTop":"scrollLeft",d=!1,g=0,m=function(){s&&(g++,setTimeout(f))},f=function(){if(s){if(--g)return;var e=t.clientHeight,o=t.scrollHeight;i=e/o,s.style.height=100*i+"%",s.style.top=t.scrollTop/o*100+"%",r.style.height=e+"px",e>o-.5?r.classList.add("ol-100pc"):r.classList.remove("ol-100pc")}},y=function(e){e.target.classList.contains("ol-noscroll")||(d=!1,a=e[p],c=new Date,t.classList.add("ol-move"),e.preventDefault(),window.addEventListener("pointermove",v),ol.ext.element.addListener(window,["pointerup","pointercancel"],b))},v=function(e){if(d=!0,!1!==a){var r=(n?-1/i:1)*(a-e[p]);t[u]+=r,(o=new Date)-c&&(l=(l+r/(o-c))/2),a=e[p],c=o,r&&h(!0)}},_=function(e){var o=e>0?Math.min(100,e/2):Math.max(-100,e/2);e-=o,t[u]+=o,-1100||n?l=0:c>0&&(l=((l||0)+(a-o[p])/c)/2),_(!1===e.animate?0:200*l),a=!1,l=0,c=0,t.classList.contains("ol-move")?t.classList.remove("ol-hasClick"):(t.classList.add("ol-hasClick"),setTimeout(function(){t.classList.remove("ol-hasClick")},500)),n=!1,window.removeEventListener("pointermove",v),ol.ext.element.removeListener(window,["pointerup","pointercancel"],b)},w=function(e){var o=Math.max(-1,Math.min(1,e.wheelDelta||-e.detail));return t.classList.add("ol-move"),t[u]-=30*o,t.classList.remove("ol-move"),!1};return e.mousewheel&&ol.ext.element.addListener(t,["mousewheel","DOMMouseScroll","onmousewheel"],w),{refresh:m}},ol.ext.element.dispatchEvent=function(t,e){var o;try{o=new CustomEvent(t)}catch(e){(o=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,{})}e.dispatchEvent(o)},ol.ext.getMapCanvas=function(t){if(!t)return null;var e=t.getViewport().getElementsByClassName("ol-fixedoverlay")[0];return e||(t.getViewport().querySelector(".ol-layers")?((e=document.createElement("canvas")).className="ol-fixedoverlay",t.getViewport().querySelector(".ol-layers").after(e),t.on("precompose",function(o){e.width=t.getSize()[0]*o.frameState.pixelRatio,e.height=t.getSize()[1]*o.frameState.pixelRatio})):e=t.getViewport().querySelector("canvas")),e},window.ol&&(ol.util?ol.util.VERSION||(ol.util.VERSION=ol.VERSION||"6.1.0"):ol.util={VERSION:ol.VERSION||"5.3.0"}),ol.ext.olVersion=ol.util.VERSION.split("."),ol.ext.olVersion=100*parseInt(ol.ext.olVersion[0])+parseInt(ol.ext.olVersion[1]),ol.ext.getVectorContextStyle=function(t,e){var o=t.frameState.pixelRatio;if(ol.ext.olVersion>605&&1!==o&&e.getImage()instanceof ol.style.Icon){var i=(e=e.clone()).getImage();i.setScale(i.getScale()*o);var n=i.getAnchor();if(i.setDisplacement){var r=i.getDisplacement();r&&(r[0]-=n[0]/o,r[1]+=n[1]/o,i.setAnchor([0,0]))}else n&&(n[0]/=o,n[1]/=o)}return e},window.ol&&(window.ol.ext.imageLoader={}),ol.ext.imageLoader.loadBILImage=function(t,e,o){var i=[parseInt(t.replace(/.*WIDTH=(\d*).*/i,"$1")),parseInt(t.replace(/.*HEIGHT=(\d*).*/i,"$1"))],n=new XMLHttpRequest;n.responseType="blob",n.addEventListener("loadend",function(){var t=this.response;if(void 0!==t){var n=new FileReader;n.addEventListener("loadend",t=>{var o=new Float32Array(t.target.result);e(o,i)}),n.readAsArrayBuffer(t)}else o()}),n.addEventListener("error",function(){o()}),n.open("GET",t),n.send()},ol.ext.imageLoader.loadImage=function(t,e,o){var i=new XMLHttpRequest;i.responseType="blob",i.addEventListener("loadend",function(){var t=this.response;if(void 0!==t){var i=new Image;i.onload=function(){e(i,[i.naturalWidth,i.naturalHeight])},i.src=URL.createObjectURL(t)}else o()}),i.addEventListener("error",function(){o()}),i.open("GET",t),i.send()},ol.ext.imageLoader.pixelTransform=function(t){return function(e,o){ol.ext.imageLoader.loadImage(o,function(o,i){var n=document.createElement("canvas");n.width=i[0],n.height=i[1];var r=n.getContext("2d");r.drawImage(o,0,0);for(var s=r.getImageData(0,0,i[0],i[1]),a=s.data,l=0;l>>3)})},ol.ext.imageLoader.transparent=function(t){var e,o;t instanceof Array&&(e=t[0],o=t[1]);var i=e=ol.color.asArray(e);return o?(o=ol.color.asArray(o),i=[Math.min(e[0],o[0]),Math.min(e[1],o[1]),Math.min(e[2],o[2])],o=[Math.max(e[0],o[0]),Math.max(e[1],o[1]),Math.max(e[2],o[2])],ol.ext.imageLoader.pixelTransform(function(t,n){t[n]>=e[0]&&t[n]<=o[0]&&t[n+1]>=i[1]&&t[n+1]<=o[1]&&t[n+2]>=i[2]&&t[n+2]<=o[2]&&(t[n+3]=0)})):ol.ext.imageLoader.pixelTransform(function(t,e){t[e]===i[0]&&t[e+1]===i[1]&&t[e+2]===i[2]&&(t[e+3]=0)})},ol.ext.imageLoader.seaLevelMap=function(t,e){e=e||{};var o=Math.max(t+.01,.01),i=e.color?ol.color.asArray(e.color):[135,203,249],n="number"==typeof e.minValue?e.minValue:-1/0,r=!1!==e.opacity;return ol.ext.imageLoader.elevationMap(function(t){return tn?[i[0],i[1],i[2],r?255*(o-t)/o:255]:[0,0,0,0]})},ol.ext.imageLoader.shadedRelief=function(){var t=Math.PI/4,e=2*Math.PI-Math.PI/4;return function(o,i){ol.ext.imageLoader.loadBILImage(i,function(i,n){var r=document.createElement("canvas"),s=r.getContext("2d"),a=r.width=n[0],l=r.height=n[1],c=s.getImageData(0,0,a,l),h=c.data;function p(t,e){return t+e*a}for(var u=0;u0?b>0?C=S+1.5*Math.PI:b<0?C=1.5*Math.PI-S:S=1.5*Math.PI:x<0?C=b<0?S+.5*Math.PI:b>0?.5*Math.PI-S:.5*Math.PI:b<0?C=Math.PI:b>0&&(C=0);var M=Math.cos(C-e)*Math.cos(.5*Math.PI-Math.atan(w))*Math.cos(t)+Math.sin(.5*Math.PI-Math.atan(w))*Math.sin(t);M<0&&(M=0),M=Math.sqrt(.8*M+.5);var E=4*p(u,d);h[E]=h[E+1]=h[E+2]=0,h[E+3]=255-255*M}s.putImageData(c,0,0),o.setImage(r)},function(){o.setState(3)})}},ol.ext.imageLoader.elevationMap=function(t){return"function"!=typeof t&&(t=ol.ext.getPixelFromElevation),function(e,o){ol.ext.imageLoader.loadBILImage(o,function(o,i){var n=document.createElement("canvas"),r=n.getContext("2d");n.width=i[0],n.height=i[1];for(var s=r.getImageData(0,0,i[0],i[1]),a=s.data,l=0;l>16,e%65536>>8,e%256,255]},ol.ext.getElevationFromPixel=function(t){return.01*((t[0]<<16)+(t[1]<<8)+t[2])-12e3},ol.matrix3D={},ol.matrix3D.getTransform=function(t){var e,o,i=window.getComputedStyle(t,null),n=(i.getPropertyValue("-webkit-transform")||i.getPropertyValue("-moz-transform")||i.getPropertyValue("-ms-transform")||i.getPropertyValue("-o-transform")||i.getPropertyValue("transform")).split("(")[1].split(")")[0].split(","),r=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];if(16===n.length)for(e=0;e<4;++e)for(o=0;o<4;++o)r[o][e]=+n[4*e+o];else for(e=0;e<3;++e)for(o=0;o<2;++o)r[o][e]=+n[2*e+o];return r},ol.matrix3D.getTransformOrigin=function(t){for(var e=window.getComputedStyle(t,null),o=(e.getPropertyValue("-webkit-transform-origin")||e.getPropertyValue("-moz-transform-origin")||e.getPropertyValue("-ms-transform-origin")||e.getPropertyValue("-o-transform-origin")||e.getPropertyValue("transform-origin")).split(" "),i=[0,0,0,1],n=0;ndocument.documentElement.clientHeight?this._elt.popup.style.top=Math.max(document.documentElement.clientHeight-this._elt.popup.offsetHeight-o.top,0)+"px":this._elt.popup.style.top=e.bottom+"px",e.left+this._elt.popup.offsetWidth+o.left>document.documentElement.clientWidth?this._elt.popup.style.left=Math.max(document.documentElement.clientWidth-this._elt.popup.offsetWidth-o.left,0)+"px":this._elt.popup.style.left=e.left+"px"}},ol.ext.input.PopupBase.prototype.isCollapsed=function(){return!this._elt.popup.classList.contains("ol-visible")},ol.ext.input.PopupBase.prototype.toggle=function(){this.collapse(!this.isCollapsed())},ol.ext.input.Checkbox=function(t){t=t||{},ol.ext.input.Base.call(this,t);var e=this.element=document.createElement("LABEL");t.html instanceof Element?e.appendChild(t.html):void 0!==t.html&&(e.innerHTML=t.html),e.className=("ol-ext-check ol-ext-checkbox "+(t.className||"")).trim(),this.input.parentNode&&this.input.parentNode.insertBefore(e,this.input),e.appendChild(this.input),e.appendChild(document.createElement("SPAN")),t.after&&e.appendChild(document.createTextNode(t.after)),this.input.addEventListener("change",function(){this.dispatchEvent({type:"check",checked:this.input.checked,value:this.input.value})}.bind(this))},ol.ext.inherits(ol.ext.input.Checkbox,ol.ext.input.Base),ol.ext.input.Checkbox.prototype.isChecked=function(){return this.input.checked},ol.ext.input.Collection=function(t){ol.Object.call(this),this.element=ol.ext.element.create("UL",{className:("ol-collection-list "+(t.className||"")).trim(),parent:t.target}),this.collection=t.collection,this._title="function"==typeof t.getTitle?t.getTitle:function(t){return t.title},this.refresh(),this.collection.on("change:length",function(){if(!this._reorder){this.refresh();var t=this.getSelectPosition();t<0?this.dispatchEvent({type:"item:select",position:-1,item:null}):this.dispatchEvent({type:"item:order",position:t,item:this._currentItem})}}.bind(this))},ol.ext.inherits(ol.ext.input.Collection,ol.Object),ol.ext.input.Collection.prototype.select=function(t){if(t!==this._currentItem){var e=-1;this._listElt.forEach(function(o,i){o.item!==t?o.li.classList.remove("ol-select"):(o.li.classList.add("ol-select"),e=i)}),this._currentItem=e>=0?t:null,this.dispatchEvent({type:"item:select",position:e,item:this._currentItem})}},ol.ext.input.Collection.prototype.selectAt=function(t){this.select(this.collection.item(t))},ol.ext.input.Collection.prototype.getSelect=function(){return this._currentItem},ol.ext.input.Collection.prototype.getSelectPosition=function(){return this.collection.getArray().indexOf(this._currentItem)},ol.ext.input.Collection.prototype.refresh=function(){this.element.innerHTML="",this._listElt=[],this.collection.forEach((t,e)=>{var o=ol.ext.element.create("LI",{html:this._title(t),className:this._currentItem===t?"ol-select":"","data-position":e,on:{click:function(){this.select(t)}.bind(this),dblclick:function(){this.dispatchEvent({type:"item:dblclick",position:e,item:t})}.bind(this)},parent:this.element});this._listElt.push({li:o,item:t});var i=ol.ext.element.create("DIV",{className:"ol-noscroll ol-order",parent:o}),n=e,r=function(t){for(var e="touch"===t.pointerType?document.elementFromPoint(t.clientX,t.clientY):t.target;e&&e.parentNode!==this.element;)e=e.parentNode;if(e&&e!==o){var i=parseInt(e.getAttribute("data-position"));e.getAttribute("data-position")e?n-1:n,t),this._reorder=!1,this.dispatchEvent({type:"item:order",position:n>e?n-1:n,oldPosition:e,item:t}),this.refresh())}.bind(this);i.addEventListener("pointerdown",function(){this.select(t),document.addEventListener("pointermove",r),document.addEventListener("pointerup",s),document.addEventListener("pointercancel",s)}.bind(this))})},ol.ext.input.Color=function(t){(t=t||{}).hidden=!1!==t.hidden,t.className=("ol-ext-colorpicker "+(t.hastab?"ol-tab ":"")+(t.className||"")).trim(),ol.ext.input.PopupBase.call(this,t),!1===t.opacity&&this.element.classList.add("ol-nopacity"),this._cursor={};var e=this._hsv={};this._elt.vignet=ol.ext.element.create("DIV",{className:"ol-vignet",parent:this.element});var o=ol.ext.element.create("DIV",{className:"ol-tabbar",parent:this._elt.popup});ol.ext.element.create("DIV",{className:"ol-tab",html:t.paletteLabel||"palette",click:function(){this.element.classList.remove("ol-picker-tab")}.bind(this),parent:o}),ol.ext.element.create("DIV",{className:"ol-tab",html:t.pickerLabel||"picker",click:function(){this.element.classList.add("ol-picker-tab")}.bind(this),parent:o});var i=ol.ext.element.create("DIV",{className:"ol-container",parent:this._elt.popup}),n=this._elt.picker=ol.ext.element.create("DIV",{className:"ol-picker",parent:i}),r=this._cursor.picker=ol.ext.element.create("DIV",{className:"ol-cursor",parent:n});this._listenDrag(n,function(t){var o=Math.max(0,Math.min(t.offsetX/n.clientWidth,1)),i=Math.max(0,Math.min(t.offsetY/n.clientHeight,1));r.style.left=Math.round(100*o)+"%",r.style.top=Math.round(100*i)+"%",e.s=100*o,e.v=100-100*i,this.setColor()}.bind(this));var s=ol.ext.element.create("DIV",{className:"ol-slider",parent:i});this._elt.slider=ol.ext.element.create("DIV",{parent:s});var a=this._cursor.slide=ol.ext.element.create("DIV",{className:"ol-cursor",parent:s});this._listenDrag(s,function(t){var o=Math.max(0,Math.min(t.offsetX/s.clientWidth,1));e.a=100*o,a.style.left=Math.round(100*o)+"%",this.setColor()}.bind(this));var l=ol.ext.element.create("DIV",{className:"ol-tint",parent:i}),c=this._cursor.tint=ol.ext.element.create("DIV",{className:"ol-cursor",parent:l});this._listenDrag(l,function(t){var o=Math.max(0,Math.min(t.offsetY/l.clientHeight,1));e.h=360*o,c.style.top=Math.round(100*o)+"%",this.setColor()}.bind(this)),ol.ext.element.create("DIV",{className:"ol-clear",click:function(){this.setColor([0,0,0,0])}.bind(this),parent:i});var h,p=ol.ext.element.create("DIV",{className:"ol-rgb",parent:i}),u=function(){var t=Math.max(0,Math.min(255,parseInt(this._elt.r.value))),e=Math.max(0,Math.min(255,parseInt(this._elt.g.value))),o=Math.max(0,Math.min(255,parseInt(this._elt.b.value))),i=Math.max(0,Math.min(1,parseFloat(this._elt.a.value)));this.setColor([t,e,o,i])}.bind(this);for(this._elt.r=ol.ext.element.create("INPUT",{type:"number",lang:"en-GB",change:u,min:0,max:255,parent:p}),this._elt.g=ol.ext.element.create("INPUT",{type:"number",lang:"en-GB",change:u,min:0,max:255,parent:p}),this._elt.b=ol.ext.element.create("INPUT",{type:"number",lang:"en-GB",change:u,min:0,max:255,parent:p}),this._elt.a=ol.ext.element.create("INPUT",{type:"number",lang:"en-GB",change:u,min:0,max:1,step:.1,parent:p}),this._elt.txtColor=ol.ext.element.create("INPUT",{type:"text",className:"ol-txt-color",change:function(){var t;this._elt.txtColor.classList.remove("ol-error");try{t=ol.color.asArray(this._elt.txtColor.value)}catch(t){this._elt.txtColor.classList.add("ol-error")}t&&this.setColor(t)}.bind(this),parent:i}),ol.ext.element.create("BUTTON",{html:"OK",click:function(){this._addCustomColor(this.getColor()),this.collapse(!0)}.bind(this),parent:i}),this._paletteColor={},this._elt.palette=ol.ext.element.create("DIV",{className:"ol-palette",parent:this._elt.popup}),h=0;h<8;h++){var d=Math.round(255-255*h/7);this.addPaletteColor([d,d,d],d)}var g=["#f00","#f90","#ff0","#0f0","#0ff","#48e","#00f","#f0f"];for(g.forEach(function(t){this.addPaletteColor(t,ol.color.toHexa(ol.color.asArray(t)))}.bind(this)),h=0;h<5;h++)g.forEach(function(t){t=[(t=ol.color.toHSV(ol.color.asArray(t)))[0],h/4*80+20,100-h/4*60],t=ol.color.fromHSV(t,1),this.addPaletteColor(t,ol.color.toHexa(t))}.bind(this));(ol.ext.element.create("HR",{parent:this._elt.palette}),ol.ext.input.Color.customColorList)||(ol.ext.input.Color.customColorList=new ol.Collection,JSON.parse(localStorage.getItem("ol-ext@colorpicker")||"[]").forEach(function(t){ol.ext.input.Color.customColorList.push(t)}),ol.ext.input.Color.customColorList.on(["add","remove"],function(){localStorage.setItem("ol-ext@colorpicker",JSON.stringify(ol.ext.input.Color.customColorList.getArray()))}));ol.ext.input.Color.customColorList.on("add",function(t){this.addPaletteColor(this.getColorFromID(t.element))}.bind(this)),ol.ext.input.Color.customColorList.on("remove",function(t){this._paletteColor[t.element]&&this._paletteColor[t.element].element.remove(),delete this._paletteColor[t.element]}.bind(this)),ol.ext.input.Color.customColorList.forEach(function(t){this._addCustomColor(this.getColorFromID(t))}.bind(this)),this.setColor(t.color||[0,0,0,0]),this._currentColor=this.getColorID(this.getColor()),this.on("color",function(){this._addCustomColor(this.getColor()),this._currentColor=this.getColorID(this.getColor()),this.setColor()}.bind(this)),this.on("collapse",function(t){if(t.visible)this._currentColor=this.getColorID(this.getColor());else{var e=this.getColor();this._currentColor!==this.getColorID(e)&&this.dispatchEvent({type:"color",color:e})}}.bind(this))},ol.ext.inherits(ol.ext.input.Color,ol.ext.input.PopupBase),ol.ext.input.Color.customColorList=null,ol.ext.input.Color.prototype.addPaletteColor=function(t,e,o){try{t=ol.color.asArray(t)}catch(t){return}var i=this.getColorID(t);!this._paletteColor[i]&&t[3]&&(this._paletteColor[i]={color:t,element:ol.ext.element.create("DIV",{title:e||"",className:t[3]<1?"ol-alpha":"",style:{color:"rgb("+t.join(",")+")"},click:function(){this.setColor(t),this.get("autoClose")&&this.collapse(!0)}.bind(this),parent:this._elt.palette})}),o&&this._selectPalette(t)},ol.ext.input.Color.prototype.showTab=function(t){"palette"===t?this.element.classList.remove("ol-picker-tab"):this.element.classList.add("ol-picker-tab")},ol.ext.input.Color.prototype.getTab=function(){return this.element.classList.contains("ol-picker-tab")?"picker":"palette"},ol.ext.input.Color.prototype._selectPalette=function(t){var e=this.getColorID(t);Object.keys(this._paletteColor).forEach(function(t){this._paletteColor[t].element.classList.remove("ol-select")}.bind(this)),this._paletteColor[e]&&this._paletteColor[e].element.classList.add("ol-select")},ol.ext.input.Color.prototype.setColor=function(t){var e=this._hsv;if(t){t=ol.color.asArray(t);var o=ol.color.toHSV(t);e.h=o[0],e.s=o[1],e.v=o[2],o.length>3?e.a=100*o[3]:e.a=100,this._cursor.picker.style.left=e.s+"%",this._cursor.picker.style.top=100-e.v+"%",this._cursor.tint.style.top=e.h/360*100+"%",this._cursor.slide.style.left=e.a+"%",this.isCollapsed()&&this.dispatchEvent({type:"color",color:t})}else e.a=Math.round(e.a),t=this.getColor();var i="rgba("+t.join(", ")+")";this._elt.picker.style.color="hsl("+e.h+", 100%, 50%)",this._elt.slider.style.backgroundImage="linear-gradient(45deg, transparent, rgba("+this.getColor(!1).join(",")+"))",this._elt.vignet.style.color=i,this._elt.r.value=t[0],this._elt.g.value=t[1],this._elt.b.value=t[2],this._elt.a.value=t[3],this._elt.txtColor.classList.remove("ol-error"),1===t[3]?this._elt.txtColor.value=ol.color.toHexa(t):this._elt.txtColor.value=i,this._selectPalette(t),this.input.value!==i&&(this.input.value=i,this.input.dispatchEvent(new Event("change")))},ol.ext.input.Color.prototype.getColor=function(t){return ol.color.fromHSV([this._hsv.h,this._hsv.s,this._hsv.v,!1!==t?this._hsv.a/100:1],1)},ol.ext.input.Color.prototype._addCustomColor=function(t){var e=this.getColorID(t);this._paletteColor[e]||t[3]&&(ol.ext.input.Color.customColorList.getArray().indexOf(e)<0&&(ol.ext.input.Color.customColorList.push(e),ol.ext.input.Color.customColorList.getLength()>24&&ol.ext.input.Color.customColorList.removeAt(0)),this.addPaletteColor(t))},ol.ext.input.Color.prototype.clearCustomColor=function(){ol.ext.input.Color.customColorList.clear()},ol.ext.input.Color.prototype.getColorID=function(t){return void 0===(t=ol.color.asArray(t))[3]&&(t[3]=1),t.join("-")},ol.ext.input.Color.prototype.getColorFromID=function(t){var e=t.split("-");return[parseFloat(e[0]),parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3])]},ol.ext.input.List=function(t){switch(t=t||{},ol.ext.input.Base.call(this,t),this._content=ol.ext.element.create("DIV"),(t.hidden||t.disabled)&&(t.hover=!0),this.element=ol.ext.element.create("DIV",{html:this._content,className:"ol-input-popup"+(t.hover?" ol-hover":"")}),this.set("hideOnClick",!1!==t.hideOnClick),t.className&&this.element.classList.add(t.className),t.fixed&&(this.element.classList.add("ol-fixed"),this.set("hideOnClick",!1)),t.align){case"middle":this.set("hideOnClick",!1);case"rigth":this.element.classList.add("ol-"+t.align)}var e=this.input;e.parentNode&&e.parentNode.insertBefore(this.element,e),this.element.appendChild(e);var o=this.popup=ol.ext.element.create("UL",{className:"ol-popup",parent:this.element}),i=[];t.options.forEach(t=>{i.push({value:t.value,element:ol.ext.element.create("LI",{html:t.html,title:t.title||t.value,className:"ol-option",on:{pointerdown:function(){this.setValue(t.value),this.get("hideOnClick")&&(o.style.display="none",setTimeout(function(){o.style.display=""},200))}.bind(this)},parent:this.popup})})}),this.input.addEventListener("change",function(){var t,e=this.input.value;i.forEach(function(o){o.value==e?(o.element.classList.add("ol-selected"),t=o.element):o.element.classList.remove("ol-selected")}),this.dispatchEvent({type:"change:value",value:this.getValue()}),this._content.innerHTML=t?t.innerHTML:""}.bind(this));var n=new Event("change");setTimeout(function(){this.input.dispatchEvent(n)}.bind(this))},ol.ext.inherits(ol.ext.input.List,ol.ext.input.Base),ol.ext.input.Radio=function(t){t=t||{},ol.ext.input.Checkbox.call(this,t),this.element.className=("ol-ext-check ol-ext-radio "+(t.className||"")).trim()},ol.ext.inherits(ol.ext.input.Radio,ol.ext.input.Checkbox),ol.ext.input.Size=function(t){(t=t||{}).options=[],(t.size||[0,2,3,5,8,13,21,34,55]).forEach(function(e){t.options.push({value:e,html:ol.ext.element.create("DIV",{className:"ol-option-"+e,style:{fontSize:e?e+"px":void 0}})})}),ol.ext.input.List.call(this,t),this._content.remove(),this.element.classList.add("ol-size")},ol.ext.inherits(ol.ext.input.Size,ol.ext.input.List),ol.ext.input.Size.prototype.getValue=function(){return parseFloat(ol.ext.input.List.prototype.getValue.call(this))},ol.ext.input.Switch=function(t){t=t||{},ol.ext.input.Checkbox.call(this,t),this.element.className=("ol-ext-toggle-switch "+(t.className||"")).trim()},ol.ext.inherits(ol.ext.input.Switch,ol.ext.input.Checkbox),ol.ext.input.Width=function(t){(t=t||{}).options=[],(t.size||[0,1,2,3,5,10,15,20]).forEach(function(e){t.options.push({value:e,html:ol.ext.element.create("DIV",{className:"ol-option-"+e,style:{height:e||void 0}})})}),ol.ext.input.List.call(this,t),this._content.remove(),this.element.classList.add("ol-width")},ol.ext.inherits(ol.ext.input.Width,ol.ext.input.List),ol.ext.input.Width.prototype.getValue=function(){return parseFloat(ol.ext.input.List.prototype.getValue.call(this))},window.ol&&!ol.legend&&(ol.legend={}),ol.legend.Legend=function(t){t=t||{},ol.Object.call(this),this._items=new ol.Collection;var e,o=[];this._items.on("add",function(t){o.push({item:t.element,on:t.element.on("change",function(){this.refresh()}.bind(this))}),e&&(clearTimeout(e),e=null),e=setTimeout(function(){this.refresh()}.bind(this),0)}.bind(this)),this._items.on("remove",function(t){for(var i=0;i=":"≥",">":">",contain:"⊂","!contain":"⊄",regexp:"≃","!regexp":"≄"},ol.control.SelectBase.prototype._escape=function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},ol.control.SelectBase.prototype._checkCondition=function(t,e,o){if(!e.attr)return!0;var i=t.get(e.attr),n=Number(i)==i&&Number(e.val)==e.val;switch(n&&(i=Number(i)),e.op){case"=":return n?i==e.val:new RegExp("^"+this._escape(e.val)+"$",o?"":"i").test(i);case"!=":return n?i!=e.val:!new RegExp("^"+this._escape(e.val)+"$",o?"":"i").test(i);case"<":return i":return i>e.val;case">=":return i>=e.val;case"contain":return new RegExp(this._escape(e.val),o?"":"i").test(i);case"!contain":return!new RegExp(this._escape(e.val),o?"":"i").test(i);case"regexp":return new RegExp(e.val,o?"":"i").test(i);case"!regexp":return!new RegExp(e.val,o?"":"i").test(i);default:return!1}},ol.control.SelectBase.prototype._selectFeatures=function(t,e,o,i,n){var r;o=o||[];for(var s=e.length-1;r=e[s];s--){for(var a,l=i,c=0;a=o[c];c++)a.attr&&(l=i?l&&this._checkCondition(r,a,n):l||this._checkCondition(r,a,n));l?t.push(r):this._features&&this._features.removeAt(s)}return t},ol.control.SelectBase.prototype.getSources=function(){if(this.get("source"))return this.get("source");var t=[];return this.getMap()&&function e(o){o.forEach(function(o){o.getLayers?e(o.getLayers()):o.getSource&&o.getSource()instanceof ol.source.Vector&&t.push(o.getSource())})}(this.getMap().getLayers()),t},ol.control.SelectBase.prototype.doSelect=function(t){var e=[];if((t=t||{}).features)this._selectFeatures(e,t.features,t.conditions,t.matchAll,t.useCase);else if(this._features)this._selectFeatures(e,this._features.getArray(),t.conditions,t.matchAll,t.useCase);else{(t.sources||this.getSources()).forEach(function(o){this._selectFeatures(e,o.getFeatures(),t.conditions,t.matchAll,t.useCase)}.bind(this))}return this.dispatchEvent({type:"select",features:e}),e},ol.control.Button=function(t){t=t||{};var e=document.createElement("div");e.className=(t.className||"")+" ol-button ol-unselectable ol-control";var o=this,i=this.button_=document.createElement(/ol-text-button/.test(t.className)?"div":"button");i.type="button",t.title&&(i.title=t.title),t.name&&(i.name=t.name),t.html instanceof Element?i.appendChild(t.html):i.innerHTML=t.html||"";i.addEventListener("click",function(e){e&&e.preventDefault&&(e.preventDefault(),e.stopPropagation()),t.handleClick&&t.handleClick.call(o,e)}),e.appendChild(i),!t.title&&i.firstElementChild&&(i.title=i.firstElementChild.title),ol.control.Control.call(this,{element:e,target:t.target}),t.title&&this.set("title",t.title),t.title&&this.set("title",t.title),t.name&&this.set("name",t.name)},ol.ext.inherits(ol.control.Button,ol.control.Control),ol.control.Button.prototype.setVisible=function(t){t?ol.ext.element.show(this.element):ol.ext.element.hide(this.element)},ol.control.Button.prototype.setTitle=function(t){this.button_.setAttribute("title",t)},ol.control.Button.prototype.setHtml=function(t){ol.ext.element.setHTML(this.button_,t)},ol.control.Button.prototype.getButtonElement=function(){return this.button_},ol.control.Toggle=function(t){t=t||{};var e=this;this.interaction_=t.interaction,this.interaction_&&(this.interaction_.setActive(t.active),this.interaction_.on("change:active",function(){e.setActive(e.interaction_.getActive())})),t.toggleFn&&(t.onToggle=t.toggleFn),t.handleClick=function(){e.toggle(),t.onToggle&&t.onToggle.call(e,e.getActive())},t.className=(t.className||"")+" ol-toggle",ol.control.Button.call(this,t),this.set("title",t.title),this.set("autoActivate",t.autoActivate),t.bar&&this.setSubBar(t.bar),this.setActive(t.active),this.setDisable(t.disable)},ol.ext.inherits(ol.control.Toggle,ol.control.Button),ol.control.Toggle.prototype.setMap=function(t){!t&&this.getMap()&&(this.interaction_&&this.getMap().removeInteraction(this.interaction_),this.subbar_&&this.getMap().removeControl(this.subbar_)),ol.control.Button.prototype.setMap.call(this,t),t&&(this.interaction_&&t.addInteraction(this.interaction_),this.subbar_&&t.addControl(this.subbar_))},ol.control.Toggle.prototype.getSubBar=function(){return this.subbar_},ol.control.Toggle.prototype.setSubBar=function(t){var e=this.getMap();e&&this.subbar_&&e.removeControl(this.subbar_),this.subbar_=t,t&&(this.subbar_.setTarget(this.element),this.subbar_.element.classList.add("ol-option-bar"),e&&e.addControl(this.subbar_))},ol.control.Toggle.prototype.getDisable=function(){var t=this.element.querySelector("button");return t&&t.disabled},ol.control.Toggle.prototype.setDisable=function(t){this.getDisable()!=t&&(this.element.querySelector("button").disabled=t,t&&this.getActive()&&this.setActive(!1),this.dispatchEvent({type:"change:disable",key:"disable",oldValue:!t,disable:t}))},ol.control.Toggle.prototype.getActive=function(){return this.element.classList.contains("ol-active")},ol.control.Toggle.prototype.toggle=function(){this.getActive()?this.setActive(!1):this.setActive(!0)},ol.control.Toggle.prototype.setActive=function(t){this.interaction_&&this.interaction_.setActive(t),this.subbar_&&this.subbar_.setActive(t),this.getActive()!==t&&(t?this.element.classList.add("ol-active"):this.element.classList.remove("ol-active"),this.dispatchEvent({type:"change:active",key:"active",oldValue:!t,active:t}))},ol.control.Toggle.prototype.setInteraction=function(t){this.interaction_=t},ol.control.Toggle.prototype.getInteraction=function(){return this.interaction_},ol.control.Search=function(t){var e=this;t||(t={}),null==t.typing&&(t.typing=300),this._classname=t.className||"search";var o=(t.className||"")+" ol-search"+(t.target?"":" ol-unselectable ol-control"),i=ol.ext.element.create("DIV",{className:o});if(!1!==t.collapsed&&i.classList.add("ol-collapsed"),t.target||(this.button=document.createElement("BUTTON"),this.button.setAttribute("type","button"),this.button.setAttribute("title",t.title||t.label||"Search"),this.button.addEventListener("click",function(){if(i.classList.toggle("ol-collapsed"),!i.classList.contains("ol-collapsed")){i.querySelector("input.search").focus();for(var t=i.querySelectorAll("li"),o=0;o=0)if(s=l){r&&clearTimeout(r);var c=e.get("minLength");r=setTimeout(function(){if(s.length>=c){var t=e.autocomplete(s,function(t){e.drawList_(t)});t&&e.drawList_(t)}else e.drawList_()},t.typing)}else e.drawList_();else(n=i.querySelector("ul.autocomplete li"))&&n.classList.remove("select");else i.classList.contains("ol-control")&&a.blur(),n.classList.remove("select"),s=l,e._handleSelect(e._list[n.getAttribute("data-search")]);else setTimeout(function(){e.drawList_()},200)};if(a.addEventListener("keyup",l),a.addEventListener("search",l),a.addEventListener("cut",l),a.addEventListener("paste",l),a.addEventListener("input",l),t.noCollapse||(a.addEventListener("blur",function(){setTimeout(function(){a!==document.activeElement&&(i.classList.add("ol-collapsed"),this.set("reverse",!1),i.classList.remove("ol-revers"))}.bind(this),200)}.bind(this)),a.addEventListener("focus",function(){this.get("reverse")||(i.classList.remove("ol-collapsed"),i.classList.remove("ol-revers"))}.bind(this))),i.appendChild(a),t.reverse){var c=ol.ext.element.create("BUTTON",{type:"button",class:"ol-revers",title:t.reverseTitle||"click on the map",click:function(){this.get("reverse")?this.set("reverse",!1):(this.set("reverse",!this.get("reverse")),a.focus(),i.classList.add("ol-revers"))}.bind(this)});i.appendChild(c)}var h=document.createElement("UL");h.classList.add("autocomplete"),i.appendChild(h),ol.control.Control.call(this,{element:i,target:t.target}),"function"==typeof t.getTitle&&(this.getTitle=t.getTitle),"function"==typeof t.autocomplete&&(this.autocomplete=t.autocomplete),this.set("copy",t.copy),this.set("minLength",t.minLength||1),this.set("maxItems",t.maxItems||10),this.set("maxHistory",t.maxHistory||t.maxItems||10),t.onselect&&this.on("select",t.onselect),t.centerOnSelect&&this.on("select",function(t){var e=this.getMap();e&&e.getView().setCenter(t.coordinate)}.bind(this)),t.zoomOnSelect&&this.on("select",function(e){var o=this.getMap();o&&(o.getView().setCenter(e.coordinate),o.getView().getZoom()=0;i--)n[i]&&JSON.stringify(n[i])!==r||n.splice(i,1)}catch(e){for(i=n.length-1;i>=0;i--)n[i]===t&&n.splice(i,1)}n.unshift(t);for(var s=Math.max(0,this.get("maxHistory")||10)||0;n.length>s;)n.pop();this.saveHistory(),this.select(t,e,null,o),e&&(this.setInput(this._getTitleTxt(t)),this.drawList_(),setTimeout(function(){this.collapse(!1)}.bind(this),300))}},ol.control.Search.prototype._history={},ol.control.Search.prototype.saveHistory=function(){try{this.get("maxHistory")>=0?localStorage["ol@search-"+this._classname]=JSON.stringify(this.get("history")):localStorage.removeItem("ol@search-"+this._classname)}catch(t){console.warn("Failed to access localStorage...")}},ol.control.Search.prototype.restoreHistory=function(){if(this._history[this._classname])this.set("history",this._history[this._classname]);else try{this._history[this._classname]=JSON.parse(localStorage["ol@search-"+this._classname]),this.set("history",this._history[this._classname])}catch(t){this.set("history",[])}},ol.control.Search.prototype.clearHistory=function(){this.set("history",[]),this.saveHistory(),this.drawList_()},ol.control.Search.prototype.getHistory=function(){return this.get("history")},ol.control.Search.prototype.autocomplete=function(t,e){return e([]),!1},ol.control.Search.prototype.drawList_=function(t){var e=this,o=this.element.querySelector("ul.autocomplete");if(o.innerHTML="",this._list=[],t)o.setAttribute("class","autocomplete");else{if(this.element.querySelector("input.search").value)return;t=this.get("history"),o.setAttribute("class","autocomplete history")}for(var i,n=Math.min(e.get("maxItems"),t.length),r=0;r=200&&t.status<400?"function"==typeof this._callback&&this._callback(t.response):("function"==typeof this._callback&&this._callback(!1,"error"),console.log("AJAX ERROR",arguments))}.bind(this)),this._ajax.on("error",function(){"function"==typeof this._callback&&this._callback(!1,"error"),console.log("AJAX ERROR",arguments)}.bind(this)),this._ajax.on("loadstart",function(){this.element.classList.add("searching")}.bind(this)),this._ajax.on("loadend",function(){this.element.classList.remove("searching")}.bind(this)),"function"==typeof t.handleResponse&&(this.handleResponse=t.handleResponse)},ol.ext.inherits(ol.control.SearchJSON,ol.control.Search),ol.control.SearchJSON.prototype.ajax=function(t,e,o,i){i=i||{},this._callback=o,this._ajax.set("dataType",i.dataType||"JSON"),this._ajax.send(t,e,i)},ol.control.SearchJSON.prototype.autocomplete=function(t,e){var o=this.requestData(t),i=encodeURI(this.get("url"));this.ajax(i,o,function(t){"function"==typeof e&&e(this.handleResponse(t))})},ol.control.SearchJSON.prototype.requestData=function(t){return{q:t}},ol.control.SearchJSON.prototype.handleResponse=function(t){return t},ol.control.SearchPhoton=function(t){(t=t||{}).className=t.className||"photon",t.url=t.url||"https://photon.komoot.io/api/",t.copy=t.copy||'© OpenStreetMap contributors',ol.control.SearchJSON.call(this,t),this.set("lang",t.lang),this.set("position",t.position)},ol.ext.inherits(ol.control.SearchPhoton,ol.control.SearchJSON),ol.control.SearchPhoton.prototype.getTitle=function(t){var e=t.properties;return(e.housenumber||"")+" "+(e.street||e.name||"")+" "+(e.postcode||"")+" "+(e.city||"")+" ("+e.country+")"},ol.control.SearchPhoton.prototype.requestData=function(t){var e={q:t,lang:this.get("lang"),limit:this.get("maxItems")};if(this.get("position")){var o=this.getMap().getView(),i=new ol.geom.Point(o.getCenter());i=i.transform(o.getProjection(),"EPSG:4326").getCoordinates(),e.lon=i[0],e.lat=i[1]}return e},ol.control.SearchPhoton.prototype.handleResponse=function(t){return t.features},ol.control.SearchPhoton.prototype.equalFeatures=function(t,e){return this.getTitle(t)===this.getTitle(e)&&t.geometry.coordinates[0]===e.geometry.coordinates[0]&&t.geometry.coordinates[1]===e.geometry.coordinates[1]},ol.control.SearchPhoton.prototype.select=function(t){var e=t.geometry.coordinates;try{e=ol.proj.transform(t.geometry.coordinates,"EPSG:4326",this.getMap().getView().getProjection())}catch(t){}this.dispatchEvent({type:"select",search:t,coordinate:e})},ol.control.SearchPhoton.prototype.reverseData=function(t){var e=ol.proj.transform(t,this.getMap().getView().getProjection(),"EPSG:4326");return{lon:e[0],lat:e[1]}},ol.control.SearchPhoton.prototype.reverseGeocode=function(t,e){this.ajax(this.get("url").replace("/api/","/reverse/").replace("/search/","/reverse/"),this.reverseData(t),function(t){t.features&&(t=t.features),t instanceof Array||(t=[t]),e?e.call(this,t):this._handleSelect(t[0],!0)}.bind(this))},ol.control.SearchGeoportail=function(t){(t=t||{}).className=t.className||"IGNF",t.typing=t.typing||500,t.url="https://wxs.ign.fr/"+(t.apiKey||"essentiels")+"/ols/apis/completion",t.copy='© IGN-Géoportail',ol.control.SearchJSON.call(this,t),this.set("type",t.type||"StreetAddress,PositionOfInterest"),this.set("timeout",t.timeout||2e3)},ol.ext.inherits(ol.control.SearchGeoportail,ol.control.SearchJSON),ol.control.SearchGeoportail.prototype.reverseGeocode=function(t,e){var o=ol.proj.transform(t,this.getMap().getView().getProjection(),"EPSG:4326");this._handleSelect({x:o[0],y:o[1],fulltext:o[0].toFixed(6)+","+o[1].toFixed(6)},!0,e);var i="Commune"===this.get("type")?"PositionOfInterest":this.get("type")||"StreetAddress";/,/.test(i)&&(i="StreetAddress");var n=' '+i+" "+o[1]+" "+o[0]+" ";this.ajax(this.get("url").replace("ols/apis/completion","geoportail/ols"),{xls:n},function(t){var i={};if(t){var n=(t=t.replace(/\n|\r/g,"")).replace(/.*(.*)<\/gml:pos>.*/,"$1").split(" ");if(Number(n[1])||Number(n[0]))if(i.x=o[0],i.y=o[1],i.city=t.replace(/.*([^<]*)<\/Place>.*/,"$1"),i.insee=t.replace(/.*([^<]*)<\/Place>.*/,"$1"),i.zipcode=t.replace(/.*([^<]*)<\/PostalCode>.*/,"$1"),//.test(t)){i.kind="",i.country="StreetAddress",i.street=t.replace(/.*([^<]*)<\/Street>.*/,"$1");var r=t.replace(/.*([^<]*)<\/Place>.*/,"$1"),i.country="PositionOfInterest",i.street="",i.fulltext=i.zipcode+" "+i.city;else i={x:o[0],y:o[1],fulltext:o[0].toFixed(6)+","+o[1].toFixed(6)}}else i={x:o[0],y:o[1],fulltext:o[0].toFixed(6)+","+o[1].toFixed(6)};"function"==typeof e?e.call(this,[i]):(this.getHistory().shift(),this._handleSelect(i,!0,e))}.bind(this),{timeout:this.get("timeout"),dataType:"XML"})},ol.control.SearchGeoportail.prototype.getTitle=function(t){return t.fulltext},ol.control.SearchGeoportail.prototype.requestData=function(t){return{text:t,type:"Commune"===this.get("type")?"PositionOfInterest":this.get("type")||"StreetAddress,PositionOfInterest",maximumResponses:this.get("maxItems")}},ol.control.SearchGeoportail.prototype.handleResponse=function(t){var e=t.results;if("Commune"===this.get("type"))for(var o=e.length-1;o>=0;o--)e[o].kind&&(e[o].classification>5||"Département"==e[o].kind)&&e.splice(o,1);return e},ol.control.SearchGeoportail.prototype.select=function(t,e,o,i){if(t.x||t.y){var n=[Number(t.x),Number(t.y)];try{n=ol.proj.transform(n,"EPSG:4326",this.getMap().getView().getProjection())}catch(t){}"Commune"===this.get("type")?this.searchCommune(t,function(){ol.control.Search.prototype.select.call(this,t,e,n,i)}):ol.control.Search.prototype.select.call(this,t,e,n,i)}else this.searchCommune(t)},ol.control.SearchGeoportail.prototype.searchCommune=function(t,e){var o='
'+t.zipcode+" "+t.city+"+
";this.ajax(this.get("url").replace("ols/apis/completion","geoportail/ols"),{xls:o},function(o){if(o){var i=(new DOMParser).parseFromString(o,"text/xml").getElementsByTagName("GeocodedAddress")[0],n=i.getElementsByTagName("gml:Point")[0].textContent.trim().split(" ");t.x=Number(n[1]),t.y=Number(n[0]);for(var r=i.getElementsByTagName("Place"),s=0;se-i){ol.ext.element.setStyle(this.element,{height:"100%"});var r=this.panel_.querySelectorAll("li.visible .li-content")[0],s=r?2*ol.ext.element.getStyle(r,"height"):0;switch(t){case 1:n+=s;break;case-1:n-=s;break;case"+50%":n+=Math.round(e/2);break;case"-50%":n-=Math.round(e/2)}return n+o<=e-3*i/2?(n=e-3*i/2-o,ol.ext.element.hide(this.botv)):ol.ext.element.show(this.botv),n>=0?(n=0,ol.ext.element.hide(this.topv)):ol.ext.element.show(this.topv),ol.ext.element.setStyle(this.panel_,{top:n+"px"}),!0}return ol.ext.element.setStyle(this.element,{height:"auto"}),ol.ext.element.setStyle(this.panel_,{top:0}),ol.ext.element.hide(this.botv),ol.ext.element.hide(this.topv),!1}return!1},ol.control.LayerSwitcher.prototype._setLayerForLI=function(t,e){var o=[];e.getLayers&&o.push(e.getLayers().on("change:length",this.drawPanel.bind(this))),t&&(o.push(e.on("change:opacity",function(){this.setLayerOpacity(e,t)}.bind(this))),o.push(e.on("change:visible",function(){this.setLayerVisibility(e,t)}.bind(this)))),o.push(e.on("propertychange",function(t){"displayInLayerSwitcher"!==t.key&&"openInLayerSwitcher"!==t.key||this.drawPanel(t)}.bind(this))),this._layers.push({li:t,layer:e,listeners:o})},ol.control.LayerSwitcher.prototype.setLayerOpacity=function(t,e){var o=e.querySelector(".layerswitcher-opacity-cursor");o&&(o.style.left=100*t.getOpacity()+"%"),this.dispatchEvent({type:"layer:opacity",layer:t})},ol.control.LayerSwitcher.prototype.setLayerVisibility=function(t,e){var o=e.querySelector(".ol-visibility");o&&(o.checked=t.getVisible()),t.getVisible()?e.classList.add("ol-visible"):e.classList.remove("ol-visible"),this.dispatchEvent({type:"layer:visible",layer:t})},ol.control.LayerSwitcher.prototype._clearLayerForLI=function(){this._layers.forEach(function(t){t.listeners.forEach(function(t){ol.Observable.unByKey(t)})}),this._layers=[]},ol.control.LayerSwitcher.prototype._getLayerForLI=function(t){for(var e,o=0;e=this._layers[o];o++)if(e.li===t)return e.layer;return null},ol.control.LayerSwitcher.prototype.viewChange=function(){this.panel_.querySelectorAll("li").forEach(function(t){var e=this._getLayerForLI(t);e&&(this.testLayerVisibility(e)?t.classList.remove("ol-layer-hidden"):t.classList.add("ol-layer-hidden"))}.bind(this))},ol.control.LayerSwitcher.prototype.getPanel=function(){return this.panelContainer_},ol.control.LayerSwitcher.prototype.drawPanel=function(){if(this.getMap()){var t=this;this.dcount++,setTimeout(function(){t.drawPanel_()},this.get("drawDelay")||0)}},ol.control.LayerSwitcher.prototype.drawPanel_=function(){if(!--this.dcount&&!this.dragging_){var t=this.panelContainer_.scrollTop;this._clearLayerForLI(),this.panel_.querySelectorAll("li").forEach(function(t){t.classList.contains("ol-header")||t.remove()}.bind(this)),this._layerGroup?this.drawList(this.panel_,this._layerGroup.getLayers()):this.getMap()&&this.drawList(this.panel_,this.getMap().getLayers()),this.panelContainer_.scrollTop=t}},ol.control.LayerSwitcher.prototype.switchLayerVisibility=function(t,e){t.get("baseLayer")?(t.getVisible()||t.setVisible(!0),e.forEach(function(e){t!==e&&e.get("baseLayer")&&e.getVisible()&&e.setVisible(!1)})):t.setVisible(!t.getVisible())},ol.control.LayerSwitcher.prototype.testLayerVisibility=function(t){if(!this.getMap())return!0;var e=this.getMap().getView().getResolution(),o=this.getMap().getView().getZoom();if(t.getMaxResolution()<=e||t.getMinResolution()>=e)return!1;if(t.getMinZoom&&(t.getMinZoom()>=o||t.getMaxZoom()2&&(l=!1,a.classList.add("drag"),n=s._getLayerForLI(a),o=!1,r=s._getLayerForLI(a.parentNode.parentNode),i=ol.ext.element.create("LI",{className:"ol-dragover",html:a.innerHTML,style:{position:"absolute","z-index":1e4,left:a.offsetLeft,opacity:.5,width:ol.ext.element.outerWidth(a),height:ol.ext.element.getStyle(a,"height")},parent:c}),s.element.classList.add("drag"),s.dispatchEvent({type:"reorder-start",layer:n,group:r})),!l){var p;for(t.preventDefault(),t.stopPropagation(),ol.ext.element.setStyle(i,{top:e-ol.ext.element.offsetRect(c).top+c.scrollTop+5}),(p=t.touches?document.elementFromPoint(t.touches[0].clientX,t.touches[0].clientY):t.target).classList.contains("ol-switcherbottomdiv")?s.overflow(-1):p.classList.contains("ol-switchertopdiv")&&s.overflow(1);p&&"LI"!==p.tagName;)p=p.parentNode;p&&p.classList.contains("dropover")||a.parentNode.querySelectorAll("li").forEach(function(t){t.classList.remove("dropover"),t.classList.remove("dropover-after"),t.classList.remove("dropover-before")}),p&&p.parentNode.classList.contains("drag")&&p!==a?((o=s._getLayerForLI(p))&&!o.get("allwaysOnTop")==!n.get("allwaysOnTop")?(p.classList.add("dropover"),p.classList.add(a.offsetTopd?c.insertAt(d,e):c.insertAt(d+1,e);break}}l&&s.selectLayer(e),s.dispatchEvent({type:"reorder-end",layer:e,group:r})}a.parentNode.querySelectorAll("li").forEach(function(t){t.classList.remove("dropover"),t.classList.remove("dropover-after"),t.classList.remove("dropover-before")}),a.classList.remove("drag"),a.parentNode.classList.remove("drag"),s.element.classList.remove("drag"),i&&i.remove(),ol.ext.element.removeListener(document,"mousemove touchmove",p),ol.ext.element.removeListener(document,"mouseup touchend touchcancel",t)})},ol.control.LayerSwitcher.prototype.dragOpacity_=function(t){t.stopPropagation(),t.preventDefault();var e=this,o=t.target,i=this._getLayerForLI(o.parentNode.parentNode.parentNode);if(i){var n=t.pageX||t.touches&&t.touches.length&&t.touches[0].pageX||t.changedTouches&&t.changedTouches.length&&t.changedTouches[0].pageX,r=ol.ext.element.getStyle(o,"left")-n;e.dragging_=!0,ol.ext.element.addListener(document,"mouseup touchend touchcancel",function t(){ol.ext.element.removeListener(document,"mouseup touchend touchcancel",t),ol.ext.element.removeListener(document,"mousemove touchmove",s),e.dragging_=!1}),ol.ext.element.addListener(document,"mousemove touchmove",s)}function s(t){var e=t.pageX||t.touches&&t.touches.length&&t.touches[0].pageX||t.changedTouches&&t.changedTouches.length&&t.changedTouches[0].pageX,n=(r+e)/ol.ext.element.getStyle(o.parentNode,"width"),s=Math.max(0,Math.min(1,n));ol.ext.element.setStyle(o,{left:100*s+"%"}),o.parentNode.nextElementSibling.innerHTML=Math.round(100*s),i.setOpacity(s)}},ol.control.LayerSwitcher.prototype.drawList=function(t,e){var o=this,i=e.getArray(),n=function(t){t.stopPropagation(),t.preventDefault();var i=o._getLayerForLI(this.parentNode.parentNode);o.switchLayerVisibility(i,e),o.get("selection")&&i.getVisible()&&o.selectLayer(i),o.onchangeCheck&&o.onchangeCheck(i)};function r(t){t.stopPropagation(),t.preventDefault();var e=o._getLayerForLI(this.parentNode.parentNode);o.oninfo(e),o.dispatchEvent({type:"info",layer:e})}function s(t){t.stopPropagation(),t.preventDefault();var e=o._getLayerForLI(this.parentNode.parentNode);o.onextent?o.onextent(e):o.getMap().getView().fit(e.getExtent(),o.getMap().getSize()),o.dispatchEvent({type:"extent",layer:e})}function a(t){t.stopPropagation(),t.preventDefault();var e,i=this.parentNode.parentNode.parentNode.parentNode,n=o._getLayerForLI(i);n?(e=o._getLayerForLI(this.parentNode.parentNode),n.getLayers().remove(e),0!=n.getLayers().getLength()||n.get("noSwitcherDelete")||a.call(i.querySelectorAll(".layerTrash")[0],t)):(i=this.parentNode.parentNode,o.getMap().removeLayer(o._getLayerForLI(i)))}function l(e){if(this.displayInLayerSwitcher(e)){var l=ol.ext.element.create("LI",{className:(e.getVisible()?"visible ":" ")+(e.get("baseLayer")?"baselayer":""),parent:t});this._setLayerForLI(l,e),this._selectedLayer===e&&l.classList.add("ol-layer-select");var h=ol.ext.element.create("DIV",{className:"ol-layerswitcher-buttons",parent:l}),p=ol.ext.element.create("DIV",{className:"li-content",parent:l});ol.ext.element.create("INPUT",{type:e.get("baseLayer")?"radio":"checkbox",className:"ol-visibility",checked:e.getVisible(),click:n,parent:p});var u=ol.ext.element.create("LABEL",{title:e.get("title")||e.get("name"),click:n,unselectable:"on",style:{userSelect:"none"},parent:p});if(u.addEventListener("selectstart",function(){return!1}),ol.ext.element.create("SPAN",{html:e.get("title")||e.get("name"),click:function(t){this.get("selection")&&(t.stopPropagation(),this.selectLayer(e))}.bind(this),parent:u}),this.reordering&&(c0&&(!e.get("allwaysOnTop")||i[c-1].get("allwaysOnTop")))&&ol.ext.element.create("DIV",{className:"layerup ol-noscroll",title:this.tip.up,on:{"mousedown touchstart":function(t){o.dragOrdering_(t)}},parent:h}),e.getLayers){var d=0;e.getLayers().forEach(function(t){o.displayInLayerSwitcher(t)&&d++}),d&&ol.ext.element.create("DIV",{className:e.get("openInLayerSwitcher")?"collapse-layers":"expend-layers",title:this.tip.plus,click:function(){var t=o._getLayerForLI(this.parentNode.parentNode);t.set("openInLayerSwitcher",!t.get("openInLayerSwitcher"))},parent:h})}if(this.oninfo&&ol.ext.element.create("DIV",{className:"layerInfo",title:this.tip.info,click:r,parent:h}),this.hastrash&&!e.get("noSwitcherDelete")&&ol.ext.element.create("DIV",{className:"layerTrash",title:this.tip.trash,click:a,parent:h}),this.hasextent&&i[c].getExtent()){var g=i[c].getExtent();4==g.length&&g[0]=0;c--)l.call(this,i[c]);this.viewChange(),t===this.panel_&&this.overflow()},ol.control.LayerSwitcher.prototype.getLayerClass=function(t){return t?t.getLayers?"ol-layer-group":t instanceof ol.layer.Vector?"ol-layer-vector":t instanceof ol.layer.VectorTile?"ol-layer-vectortile":t instanceof ol.layer.Tile?"ol-layer-tile":t instanceof ol.layer.Image?"ol-layer-image":t instanceof ol.layer.Heatmap?"ol-layer-heatmap":t.getFeatures?"ol-layer-vectorimage":"unknown":"none"},ol.control.LayerSwitcher.prototype.selectLayer=function(t,e){if(!t){if(!this.getMap())return;t=this.getMap().getLayers().item(this.getMap().getLayers().getLength()-1)}this._selectedLayer=t,this.drawPanel(),e||this.dispatchEvent({type:"select",layer:t})},ol.control.LayerSwitcher.prototype.getSelection=function(){return this._selectedLayer},ol.control.LayerSwitcher.prototype.setprogress_=function(t){if(!t.layerswitcher_progress){var e=0,o=0,i=function(){o===e?(o=e=0,ol.ext.element.setStyle(t.layerswitcher_progress,{width:0})):ol.ext.element.setStyle(t.layerswitcher_progress,{width:(e/o*100).toFixed(1)+"%"})};t.getSource().on("tileloadstart",function(){o++,i()}),t.getSource().on("tileloadend",function(){e++,i()}),t.getSource().on("tileloaderror",function(){e++,i()})}},ol.control.Bar=function(t){t||(t={});var e=document.createElement("div");if(e.classList.add("ol-unselectable","ol-control","ol-bar"),t.className){var o=t.className.split(" ").filter(function(t){return t.length>0});e.classList.add.apply(e.classList,o)}if(t.group&&e.classList.add("ol-group"),ol.control.Control.call(this,{element:e,target:t.target}),this.set("toggleOne",t.toggleOne),this.set("autoDeactivate",t.autoDeactivate),this.controls_=[],t.controls instanceof Array)for(var i=0;i0?this.set("max",Number(e)):e=this.get("max"),e){var i=Math.round(t/e*100);ol.ext.element.setStyle(this._progress,{display:""}),this._progressbar.className=i?"":"notransition",ol.ext.element.setStyle(this._progressbar,{width:i+"%"})}else ol.ext.element.setStyle(this._progress,{display:"none"});this._progressMessage.innerHTML="",ol.ext.element.setHTML(this._progressMessage,o||"")}else ol.ext.element.setStyle(this._progress,{display:"none"})},ol.control.Dialog.prototype._onButton=function(t,e){return function(o){o.preventDefault(),"submit"===t&&!1===this.get("closeOnSubmit")||this.hide();var i=this.getInputs();this.dispatchEvent({type:"button",button:t,inputs:i}),"function"==typeof e&&e(t,i)}.bind(this)},ol.control.Dialog.prototype.getInputs=function(){var t={};return["input","textarea","select"].forEach(function(e){this.element.querySelectorAll("form "+e).forEach(function(e){e.className&&e.className.split(" ").forEach(function(o){t[o]=e})})}.bind(this)),t},ol.control.Dialog.prototype.hide=function(){this.element.classList.remove("ol-visible"),this.dispatchEvent({type:"hide"})},ol.control.Dialog.prototype.close=ol.control.Dialog.prototype.hide,ol.control.Dialog.prototype.isOpen=function(){return this.element.classList.contains("ol-visible")},ol.control.Disable=function(t){t=t||{};var e=document.createElement("div");e.className=(t.className||" ol-disable ol-unselectable ol-control").trim();var o={top:"0px",left:"0px",right:"0px",bottom:"0px",zIndex:1e4,background:"none",display:"none"};Object.keys(o).forEach(function(t){e.style[t]=o[t]}),ol.control.Control.call(this,{element:e})},ol.ext.inherits(ol.control.Disable,ol.control.Control),ol.control.Disable.prototype.isOn=function(){return this.element.classList.contains("ol-disable")},ol.control.Disable.prototype.disableMap=function(t){t?this.element.classList.add("ol-enable").show():this.element.classList.remove("ol-enable").hide()},ol.control.EditBar=function(t){(t=t||{}).interactions=t.interactions||{},ol.control.Bar.call(this,{className:(t.className?t.className+" ":"")+"ol-editbar",toggleOne:!0,target:t.target}),this._source=t.source,this._interactions={},this._setSelectInteraction(t),!1!==t.edition&&this._setEditInteraction(t),this._setModifyInteraction(t)},ol.ext.inherits(ol.control.EditBar,ol.control.Bar),ol.control.EditBar.prototype.setMap=function(t){this.getMap()&&(this._interactions.Delete&&this.getMap().removeInteraction(this._interactions.Delete),this._interactions.ModifySelect&&this.getMap().removeInteraction(this._interactions.ModifySelect)),ol.control.Bar.prototype.setMap.call(this,t),this.getMap()&&(this._interactions.Delete&&this.getMap().addInteraction(this._interactions.Delete),this._interactions.ModifySelect&&this.getMap().addInteraction(this._interactions.ModifySelect))},ol.control.EditBar.prototype.getInteraction=function(t){return this._interactions[t]},ol.control.EditBar.prototype._getTitle=function(t){if(t)return t.get?t.get("title"):"string"==typeof t?t:t.title},ol.control.EditBar.prototype._setSelectInteraction=function(t){var e,o=this,i=new ol.control.Bar;if(!1!==t.interactions.Delete){t.interactions.Delete instanceof ol.interaction.Delete?this._interactions.Delete=t.interactions.Delete:this._interactions.Delete=new ol.interaction.Delete;var n=this._interactions.Delete;n.setActive(!1),this.getMap()&&this.getMap().addInteraction(n),i.addControl(new ol.control.Button({className:"ol-delete",title:this._getTitle(t.interactions.Delete)||"Delete",name:"Delete",handleClick:function(t){n.delete(e.getInteraction().getFeatures());var o={type:"select",selected:[],deselected:e.getInteraction().getFeatures().getArray().slice(),mapBrowserEvent:t.mapBrowserEvent};e.getInteraction().getFeatures().clear(),e.getInteraction().dispatchEvent(o)}}))}if(!1!==t.interactions.Info&&i.addControl(new ol.control.Button({className:"ol-info",name:"Info",title:this._getTitle(t.interactions.Info)||"Show informations",handleClick:function(){o.dispatchEvent({type:"info",features:e.getInteraction().getFeatures()})}})),!1!==t.interactions.Select){t.interactions.Select instanceof ol.interaction.Select?this._interactions.Select=t.interactions.Select:this._interactions.Select=new ol.interaction.Select({condition:ol.events.condition.click});var r=this._interactions.Select;e=new ol.control.Toggle({className:"ol-selection",name:"Select",title:this._getTitle(t.interactions.Select)||"Select",interaction:r,bar:i.getControls().length?i:void 0,autoActivate:!0,active:!0}),this.addControl(e),r.on("change:active",function(){r.getFeatures().clear()})}},ol.control.EditBar.prototype._setEditInteraction=function(t){if(!1!==t.interactions.DrawPoint){t.interactions.DrawPoint instanceof ol.interaction.Draw?this._interactions.DrawPoint=t.interactions.DrawPoint:this._interactions.DrawPoint=new ol.interaction.Draw({type:"Point",source:this._source});var e=new ol.control.Toggle({className:"ol-drawpoint",name:"DrawPoint",title:this._getTitle(t.interactions.DrawPoint)||"Point",interaction:this._interactions.DrawPoint});this.addControl(e)}if(!1!==t.interactions.DrawLine){t.interactions.DrawLine instanceof ol.interaction.Draw?this._interactions.DrawLine=t.interactions.DrawLine:this._interactions.DrawLine=new ol.interaction.Draw({type:"LineString",source:this._source,geometryFunction:function(t,e){return e?e.setCoordinates(t):e=new ol.geom.LineString(t),this.nbpts=e.getCoordinates().length,e}});var o=new ol.control.Toggle({className:"ol-drawline",title:this._getTitle(t.interactions.DrawLine)||"LineString",name:"DrawLine",interaction:this._interactions.DrawLine,bar:new ol.control.Bar({controls:[new ol.control.TextButton({html:this._getTitle(t.interactions.UndoDraw)||"undo",title:this._getTitle(t.interactions.UndoDraw)||"delete last point",handleClick:function(){o.getInteraction().nbpts>1&&o.getInteraction().removeLastPoint()}}),new ol.control.TextButton({html:this._getTitle(t.interactions.FinishDraw)||"finish",title:this._getTitle(t.interactions.FinishDraw)||"finish",handleClick:function(){o.getInteraction().nbpts>2&&o.getInteraction().finishDrawing()}})]})});this.addControl(o)}if(!1!==t.interactions.DrawPolygon&&(t.interactions.DrawPolygon instanceof ol.interaction.Draw?this._interactions.DrawPolygon=t.interactions.DrawPolygon:this._interactions.DrawPolygon=new ol.interaction.Draw({type:"Polygon",source:this._source,geometryFunction:function(t,e){return this.nbpts=t[0].length,e?e.setCoordinates([t[0].concat([t[0][0]])]):e=new ol.geom.Polygon(t),e}}),this._setDrawPolygon("ol-drawpolygon",this._interactions.DrawPolygon,this._getTitle(t.interactions.DrawPolygon)||"Polygon","DrawPolygon",t)),!1!==t.interactions.DrawHole&&(t.interactions.DrawHole instanceof ol.interaction.DrawHole?this._interactions.DrawHole=t.interactions.DrawHole:this._interactions.DrawHole=new ol.interaction.DrawHole,this._setDrawPolygon("ol-drawhole",this._interactions.DrawHole,this._getTitle(t.interactions.DrawHole)||"Hole","DrawHole",t)),!1!==t.interactions.DrawRegular){var i={pts:"pts",circle:"circle"};t.interactions.DrawRegular instanceof ol.interaction.DrawRegular?(this._interactions.DrawRegular=t.interactions.DrawRegular,i.pts=this._interactions.DrawRegular.get("ptsLabel")||i.pts,i.circle=this._interactions.DrawRegular.get("circleLabel")||i.circle):(this._interactions.DrawRegular=new ol.interaction.DrawRegular({source:this._source,sides:4}),t.interactions.DrawRegular&&(i.pts=t.interactions.DrawRegular.ptsLabel||i.pts,i.circle=t.interactions.DrawRegular.circleLabel||i.circle));var n=this._interactions.DrawRegular,r=document.createElement("DIV"),s=ol.ext.element.create("DIV",{parent:r});ol.ext.element.addListener(s,["click","touchstart"],function(){var t=n.getSides()-1;t<2&&(t=2),n.setSides(t),a.textContent=t>2?t+" "+i.pts:i.circle}.bind(this));var a=ol.ext.element.create("TEXT",{html:"4 "+i.pts,parent:r}),l=ol.ext.element.create("DIV",{parent:r});ol.ext.element.addListener(l,["click","touchstart"],function(){var t=n.getSides()+1;t<3&&(t=3),n.setSides(t),a.textContent=t+" "+i.pts}.bind(this));var c=new ol.control.Toggle({className:"ol-drawregular",title:this._getTitle(t.interactions.DrawRegular)||"Regular",name:"DrawRegular",interaction:this._interactions.DrawRegular,bar:new ol.control.Bar({controls:[new ol.control.TextButton({html:r})]})});this.addControl(c)}},ol.control.EditBar.prototype._setDrawPolygon=function(t,e,o,i,n){var r=new ol.control.Toggle({className:t,name:i,title:o,interaction:e,bar:new ol.control.Bar({controls:[new ol.control.TextButton({html:this._getTitle(n.interactions.UndoDraw)||"undo",title:this._getTitle(n.interactions.UndoDraw)||"undo last point",handleClick:function(){r.getInteraction().nbpts>1&&r.getInteraction().removeLastPoint()}}),new ol.control.TextButton({html:this._getTitle(n.interactions.FinishDraw)||"finish",title:this._getTitle(n.interactions.FinishDraw)||"finish",handleClick:function(){r.getInteraction().nbpts>3&&r.getInteraction().finishDrawing()}})]})});return this.addControl(r),r},ol.control.EditBar.prototype._setModifyInteraction=function(t){if(!1!==t.interactions.ModifySelect&&!1!==t.interactions.Select&&(t.interactions.ModifySelect instanceof ol.interaction.ModifyFeature?this._interactions.ModifySelect=t.interactions.ModifySelect:this._interactions.ModifySelect=new ol.interaction.ModifyFeature({features:this.getInteraction("Select").getFeatures()}),this.getMap()&&this.getMap().addInteraction(this._interactions.ModifySelect),this._interactions.ModifySelect.setActive(this._interactions.Select.getActive()),this._interactions.Select.on("change:active",function(){this._interactions.ModifySelect.setActive(this._interactions.Select.getActive())}.bind(this))),!1!==t.interactions.Transform){t.interactions.Transform instanceof ol.interaction.Transform?this._interactions.Transform=t.interactions.Transform:this._interactions.Transform=new ol.interaction.Transform({addCondition:ol.events.condition.shiftKeyOnly});var e=new ol.control.Toggle({html:"",className:"ol-transform",title:this._getTitle(t.interactions.Transform)||"Transform",name:"Transform",interaction:this._interactions.Transform});this.addControl(e)}if(!1!==t.interactions.Split){t.interactions.Split instanceof ol.interaction.Split?this._interactions.Split=t.interactions.Split:this._interactions.Split=new ol.interaction.Split({sources:this._source});var o=new ol.control.Toggle({className:"ol-split",title:this._getTitle(t.interactions.Split)||"Split",name:"Split",interaction:this._interactions.Split});this.addControl(o)}if(!1!==t.interactions.Offset){t.interactions.Offset instanceof ol.interaction.Offset?this._interactions.Offset=t.interactions.Offset:this._interactions.Offset=new ol.interaction.Offset({source:this._source});var i=new ol.control.Toggle({html:"",className:"ol-offset",title:this._getTitle(t.interactions.Offset)||"Offset",name:"Offset",interaction:this._interactions.Offset});this.addControl(i)}},ol.control.Gauge=function(t){t=t||{};var e=ol.ext.element.create("DIV",{className:((t.className||"")+" ol-gauge ol-unselectable ol-control").trim()});this.title_=ol.ext.element.create("SPAN",{parent:e});var o=ol.ext.element.create("DIV",{parent:e});this.gauge_=ol.ext.element.create("BUTTON",{type:"button",style:{width:"0px"},parent:o}),ol.control.Control.call(this,{element:e,target:t.target}),this.setTitle(t.title),this.set("max",t.max||100),this.val(t.val)},ol.ext.inherits(ol.control.Gauge,ol.control.Control),ol.control.Gauge.prototype.setTitle=function(t){this.title_.innerHTML=t||"",this.title_.display=t?"":"none"},ol.control.Gauge.prototype.val=function(t){return void 0!==t&&(this.val_=t,this.gauge_.style.width=t/this.get("max")*100+"%"),this.val_},ol.control.GeoBookmark=function(t){t=t||{};var e=this,o=document.createElement("div");t.target?o.className=t.className||"ol-bookmark":(o.className=(t.className||"ol-bookmark")+" ol-unselectable ol-control ol-collapsed",o.addEventListener("mouseleave",function(){r!==document.activeElement&&(i.style.display="none")}),this.button=ol.ext.element.create("BUTTON",{type:"button",title:t.title||"Geobookmarks",click:function(){var t=""===i.style.display||"none"===i.style.display;i.style.display=t?"block":"none",t&&this.setBookmarks()}.bind(this)}),o.appendChild(this.button));var i=document.createElement("div");o.appendChild(i);var n=document.createElement("ul");i.appendChild(n);var r=document.createElement("input");r.setAttribute("placeholder",t.placeholder||"Add a new geomark..."),r.addEventListener("keydown",function(t){if(t.stopPropagation(),13===t.keyCode){t.preventDefault();var o=this.value;o&&(e.addBookmark(o),this.value="",e.dispatchEvent({type:"add",name:o})),i.style.display="none"}}),r.addEventListener("blur",function(){i.style.display="none"}),i.appendChild(r),ol.control.Control.call(this,{element:o,target:t.target}),this.on("propertychange",function(t){"editable"===t.key&&(o.className=o.className.replace(" ol-editable",""),this.get("editable")&&(o.className+=" ol-editable"))}.bind(this)),this.set("namespace",t.namespace||"ol"),this.set("editable",!1!==t.editable),this.set("deleteTitle",t.deleteTitle||"Suppr.");var s={};try{localStorage[this.get("namespace")+"@bookmark"]&&(s=JSON.parse(localStorage[this.get("namespace")+"@bookmark"]))}catch(t){console.warn("Failed to access localStorage...")}if(t.marks)for(var a in t.marks)s[a]=t.marks[a];this.setBookmarks(s)},ol.ext.inherits(ol.control.GeoBookmark,ol.control.Control),ol.control.GeoBookmark.prototype.setBookmarks=function(t){if(!t){t={};try{t=JSON.parse(localStorage[this.get("namespace")+"@bookmark"]||"{}")}catch(t){console.warn("Failed to access localStorage...")}}var e=this.get("editable"),o=this.element.querySelector("ul"),i=this.element.querySelector("div"),n=this;for(var r in o.innerHTML="",t){var s=document.createElement("li");if(s.textContent=r,s.setAttribute("data-bookmark",JSON.stringify(t[r])),s.setAttribute("data-name",r),s.addEventListener("click",function(){var t=JSON.parse(this.getAttribute("data-bookmark"));n.getMap().getView().setCenter(t.pos),n.getMap().getView().setZoom(t.zoom),n.getMap().getView().setRotation(t.rot||0),i.style.display="none",n.dispatchEvent({type:"select",name:this.getAttribute("data-name"),bookmark:t})}),o.appendChild(s),e&&!t[r].permanent){var a=document.createElement("button");a.setAttribute("data-name",r),a.setAttribute("type","button"),a.setAttribute("title",this.get("deleteTitle")||"Suppr."),a.addEventListener("click",function(t){n.removeBookmark(this.getAttribute("data-name")),n.dispatchEvent({type:"remove",name:this.getAttribute("data-name")}),t.stopPropagation()}),s.appendChild(a)}}try{localStorage[this.get("namespace")+"@bookmark"]=JSON.stringify(t)}catch(t){console.warn("Failed to access localStorage...")}},ol.control.GeoBookmark.prototype.getBookmarks=function(){var t={};try{t=JSON.parse(localStorage[this.get("namespace")+"@bookmark"]||"{}")}catch(t){console.warn("Failed to access localStorage...")}return t},ol.control.GeoBookmark.prototype.removeBookmark=function(t){if(t){var e=this.getBookmarks();delete e[t],this.setBookmarks(e)}},ol.control.GeoBookmark.prototype.addBookmark=function(t,e,o,i){if(t){var n,r=e;r&&r.position?(o=r.zoom,i=r.permanent,n=r.rotation,e=r.position):n=this.getMap().getView().getRotation();var s=this.getBookmarks();s[t]&&s[t].permanent||(s[t]={pos:e||this.getMap().getView().getCenter(),zoom:o||this.getMap().getView().getZoom(),permanent:!!i},n&&(s[t].rot=n),this.setBookmarks(s))}},ol.control.GeolocationBar=function(t){t||(t={}),t.className=t.className||"ol-geobar",ol.control.Bar.call(this,t),this.setPosition(t.position||"bottom-right");var e=this.element,o=new ol.interaction.GeolocationDraw({source:t.source,zoom:t.zoom,minZoom:t.minZoom,tolerance:t.tolerance,followTrack:t.followTrack,minAccuracy:t.minAccuracy||1e4});this._geolocBt=new ol.control.Toggle({className:"geolocBt",interaction:o,onToggle:function(){o.pause(!0),o.setFollowTrack(t.followTrack),e.classList.remove("pauseTrack")}}),this.addControl(this._geolocBt),this._geolocBt.setActive(!1);var i=new ol.control.Bar;this.addControl(i);var n=new ol.control.TextButton({className:"centerBt",html:t.centerLabel||"center",handleClick:function(){o.setFollowTrack("auto")}});i.addControl(n);var r=new ol.control.Button({className:"startBt",handleClick:function(){o.pause(!1),o.setFollowTrack("auto"),e.classList.add("pauseTrack")}});i.addControl(r);var s=new ol.control.Button({className:"pauseBt",handleClick:function(){o.pause(!0),o.setFollowTrack("auto"),e.classList.remove("pauseTrack")}});i.addControl(s),o.on("follow",function(t){t.following?e.classList.remove("centerTrack"):e.classList.add("centerTrack")}),this._geolocBt.on("change:active",function(t){t.active?e.classList.add("ol-active"):e.classList.remove("ol-active")})},ol.ext.inherits(ol.control.GeolocationBar,ol.control.Bar),ol.control.GeolocationBar.prototype.setMap=function(t){this._listener&&ol.Observable.unByKey(this._listener),this._listener=null,ol.control.Bar.prototype.setMap.call(this,t),t&&(this._listener=t.on("moveend",function(){var e=this.getInteraction();e.getActive()&&"auto"===e.get("followTrack")&&e.path_.length&&e.path_[e.path_.length-1][0]!==t.getView().getCenter()[0]&&this.element.classList.add("centerTrack")}.bind(this)))},ol.control.GeolocationBar.prototype.getInteraction=function(){return this._geolocBt.getInteraction()},ol.control.GeolocationButton=function(t){t||(t={}),t.followTrack=t.followTrack||"auto",t.zoom=t.zoom||16;var e,o=new ol.interaction.GeolocationDraw(t);ol.control.Toggle.call(this,{className:t.className=((t.className||"")+" ol-geobt").trim(),interaction:o,title:t.title||"Geolocation",onToggle:function(){o.pause(!0),o.setFollowTrack(t.followTrack||"auto")}}),this.setActive(!1),o.on("tracking",function(t){this.dispatchEvent({type:"position",coordinate:t.geolocation.getPosition()})}.bind(this)),o.on("change:active",function(){this.dispatchEvent({type:"position"}),e&&(clearTimeout(e),e=null),o.getActive()&&(e=setTimeout(function(){o.setActive(!1),e=null}.bind(this),t.delay||3e3))}.bind(this))},ol.ext.inherits(ol.control.GeolocationButton,ol.control.Toggle),ol.control.Globe=function(t){var e,o=t||{},i=this;o.target?(e=document.createElement("div"),this.panel_=o.target):((e=document.createElement("div")).classList.add("ol-globe","ol-unselectable","ol-control"),/top/.test(o.align)&&e.classList.add("ol-control-top"),/right/.test(o.align)&&e.classList.add("ol-control-right"),this.panel_=document.createElement("div"),this.panel_.classList.add("panel"),e.appendChild(this.panel_),this.pointer_=document.createElement("div"),this.pointer_.classList.add("ol-pointer"),e.appendChild(this.pointer_)),ol.control.Control.call(this,{element:e,target:o.target}),this.ovmap_=new ol.Map({controls:new ol.Collection,interactions:new ol.Collection,target:this.panel_,view:new ol.View({zoom:0,center:[0,0]}),layers:o.layers}),setTimeout(function(){i.ovmap_.updateSize()},0),this.set("follow",o.follow||!1),this.extentLayer=new ol.layer.Vector({name:"Cache extent",source:new ol.source.Vector,style:o.style||[new ol.style.Style({image:new ol.style.Circle({fill:new ol.style.Fill({color:"rgba(255,0,0, 1)"}),stroke:new ol.style.Stroke({width:7,color:"rgba(255,0,0, 0.8)"}),radius:5})})]}),this.ovmap_.addLayer(this.extentLayer)},ol.ext.inherits(ol.control.Globe,ol.control.Control),ol.control.Globe.prototype.setMap=function(t){this._listener&&ol.Observable.unByKey(this._listener),this._listener=null,ol.control.Control.prototype.setMap.call(this,t),t&&(this._listener=t.getView().on("propertychange",this.setView.bind(this)),this.setView())},ol.control.Globe.prototype.setView=function(){this.getMap()&&this.get("follow")&&this.setCenter(this.getMap().getView().getCenter())},ol.control.Globe.prototype.getGlobe=function(){return this.ovmap_},ol.control.Globe.prototype.show=function(t){!1!==t?this.element.classList.remove("ol-collapsed"):this.element.classList.add("ol-collapsed"),this.ovmap_.updateSize()},ol.control.Globe.prototype.setPosition=function(t){/top/.test(t)?this.element.classList.add("ol-control-top"):this.element.classList.remove("ol-control-top"),/right/.test(t)?this.element.classList.add("ol-control-right"):this.element.classList.remove("ol-control-right")},ol.control.Globe.prototype.setCenter=function(t,e){var o=this;if(this.pointer_.classList.add("hidden"),t){var i=this.ovmap_,n=i.getPixelFromCoordinate(t);if(n){if(!1!==e){var r=this.element.clientHeight;setTimeout(function(){o.pointer_.style.top=String(Math.min(Math.max(n[1],0),r))+"px",o.pointer_.style.left="50%",o.pointer_.classList.remove("hidden")},800)}i.getView().animate({center:[t[0],0]})}}},ol.control.Graticule=function(t){t||(t={});var e=document.createElement("div");e.className="ol-graticule ol-unselectable ol-hidden",ol.control.CanvasBase.call(this,{element:e}),this.set("projection",t.projection||"EPSG:4326");var o=new ol.proj.Projection({code:this.get("projection")}).getMetersPerUnit();for(this.fac=1;o/this.fac>10;)this.fac*=10;this.fac=1e4/this.fac,this.set("maxResolution",t.maxResolution||1/0),this.set("step",t.step||.1),this.set("stepCoord",t.stepCoord||1),this.set("spacing",t.spacing||40),this.set("margin",t.margin||0),this.set("borderWidth",t.borderWidth||5),this.set("stroke",!1!==t.stroke),this.formatCoord=t.formatCoord||function(t){return t},t.style instanceof ol.style.Style?this.setStyle(t.style):this.setStyle(new ol.style.Style({stroke:new ol.style.Stroke({color:"#000",width:1}),fill:new ol.style.Fill({color:"#fff"}),text:new ol.style.Text({stroke:new ol.style.Stroke({color:"#fff",width:2}),fill:new ol.style.Fill({color:"#000"})})}))},ol.ext.inherits(ol.control.Graticule,ol.control.CanvasBase),ol.control.Graticule.prototype.setStyle=function(t){this._style=t},ol.control.Graticule.prototype._draw=function(t){if(!(this.get("maxResolution")r)(f*=Math.round((h-p)/r*m/f))>this.fac&&(f=Math.round(f/this.fac)*this.fac);p=Math.floor(p/f)*f-f,d=Math.floor(d/f)*f-f,h=Math.floor(h/f)*f+2*f,u=Math.floor(u/f)*f+2*f;var x=ol.proj.get(a).getExtent();x&&(px[2]&&(h=x[2]+f),u>x[3]&&(u=x[3]+f));var b=this.getStyle().getStroke()&&this.get("stroke"),w=this.getStyle().getText(),S=this.getStyle().getFill();o.save(),o.scale(n,n),o.beginPath(),o.rect(_,_,r-2*_,s-2*_),o.clip(),o.beginPath();var C,M,E,T,L,P={top:[],left:[],bottom:[],right:[]};for(C=p;C0&&L[1]<0&&P.top.push([C,E]),E[1]>s&&L[1]0&&P.left.push([M,E]),E[0]r&&P.right.push([M,E]),E=L;if(b&&(o.strokeStyle=this.getStyle().getStroke().getColor(),o.lineWidth=this.getStyle().getStroke().getWidth(),o.stroke()),w){var k,A;o.fillStyle=this.getStyle().getText().getFill().getColor(),o.strokeStyle=this.getStyle().getText().getStroke().getColor(),o.lineWidth=this.getStyle().getText().getStroke().getWidth(),o.font=this.getStyle().getText().getFont(),o.textAlign="center",o.textBaseline="hanging";var I=(S?v:0)+_+2;for(g=0;k=P.top[g];g++)Math.round(k[0]/this.get("step"))%y||(A=this.formatCoord(k[0],"top"),o.strokeText(A,k[1][0],I),o.fillText(A,k[1][0],I));for(o.textBaseline="alphabetic",g=0;k=P.bottom[g];g++)Math.round(k[0]/this.get("step"))%y||(A=this.formatCoord(k[0],"bottom"),o.strokeText(A,k[1][0],s-I),o.fillText(A,k[1][0],s-I));for(o.textBaseline="middle",o.textAlign="left",g=0;k=P.left[g];g++)Math.round(k[0]/this.get("step"))%y||(A=this.formatCoord(k[0],"left"),o.strokeText(A,I,k[1][1]),o.fillText(A,I,k[1][1]));for(o.textAlign="right",g=0;k=P.right[g];g++)Math.round(k[0]/this.get("step"))%y||(A=this.formatCoord(k[0],"right"),o.strokeText(A,r-I,k[1][1]),o.fillText(A,r-I,k[1][1]))}if(S){var F,N,D=this.getStyle().getFill().getColor();for((N=this.getStyle().getStroke())?F=this.getStyle().getStroke().getColor():(F=D,D="#fff"),o.strokeStyle=F,o.lineWidth=N?N.getWidth():1,g=1;g=o[0])return"";var n=Math.floor((e[3]-t[1])/(e[3]-e[1])*o[1]);return n<0||n>=o[1]?"":this.getHIndex(i)+this.getVIndex(n)}},ol.control.GridReference.prototype.getVIndex=function(t){return t},ol.control.GridReference.prototype.getHIndex=function(t){return String.fromCharCode(65+t)},ol.control.GridReference.prototype._draw=function(t){if(!(this.get("maxResolution")r?(v=r-_,e.textBaseline="alphabetic"):e.textBaseline="hanging",e.strokeText(f,y,v),e.fillText(f,y,v);for(e.textBaseline="middle",g=0;gn?(y=n-_,e.textAlign="right"):e.textAlign="left",e.strokeText(f,y,v),e.fillText(f,y,v);e.restore()}},ol.control.Imageline=function(t){var e=ol.ext.element.create("DIV",{className:(t.className||"")+" ol-imageline"+(t.target?"":" ol-unselectable ol-control")+(t.collapsed&&t.collapsible?"ol-collapsed":"")});!t.target&&t.collapsible&&ol.ext.element.create("BUTTON",{type:"button",click:function(){this.toggle()}.bind(this),parent:e}),t.source&&(this._sources=t.source.forEach?t.source:[t.source]),t.layers&&this.setLayers(t.layers),ol.control.Control.call(this,{element:e,target:t.target}),this._setScrolling(),this._scrolldiv.addEventListener("scroll",function(){this.getMap()&&this.getMap().render()}.bind(this)),"function"==typeof t.getImage&&(this._getImage=t.getImage),"function"==typeof t.getTitle&&(this._getTitle=t.getTitle),this.set("maxFeatures",t.maxFeatures||100),this.set("linkColor",t.linkColor||!1),this.set("hover",t.hover||!1),this.set("useExtent",t.useExtent||!1),this.refresh()},ol.ext.inherits(ol.control.Imageline,ol.control.Control),ol.control.Imageline.prototype.setMap=function(t){this._listener&&this._listener.forEach(function(t){ol.Observable.unByKey(t)}.bind(this)),this._listener=null,ol.control.Control.prototype.setMap.call(this,t),t&&(this._listener=[t.on("postcompose",this._drawLink.bind(this)),t.on("moveend",function(){this.get("useExtent")&&this.refresh()}.bind(this))],this.refresh())},ol.control.Imageline.prototype.setLayers=function(t){this._sources=this._getSources(t)},ol.control.Imageline.prototype._getSources=function(t){var e=[];return t.forEach(function(t){t.getVisible()&&(t.getSource()&&t.getSource().getFeatures?e.push(t.getSource()):t.getLayers&&this._getSources(t.getLayers()))}.bind(this)),e},ol.control.Imageline.prototype.useExtent=function(t){this.set("useExtent",t),this.refresh()},ol.control.Imageline.prototype.isCollapsed=function(){return this.element.classList.contains("ol-collapsed")},ol.control.Imageline.prototype.collapse=function(t){t?this.element.classList.add("ol-collapsed"):this.element.classList.remove("ol-collapsed"),this.getMap()&&setTimeout(function(){this.getMap().render()}.bind(this),this.isCollapsed()?0:250),this.dispatchEvent({type:"collapse",collapsed:this.isCollapsed()})},ol.control.Imageline.prototype.toggle=function(){this.element.classList.toggle("ol-collapsed"),this.getMap()&&setTimeout(function(){this.getMap().render()}.bind(this),this.isCollapsed()?0:250),this.dispatchEvent({type:"collapse",collapsed:this.isCollapsed()})},ol.control.Imageline.prototype._getImage=function(t){return t.get("img")},ol.control.Imageline.prototype._getTitle=function(){return""},ol.control.Imageline.prototype.getFeatures=function(){var t=this.getMap();if(!t)return[];var e=[];return(this._sources||this._getSources(t.getLayers())).forEach(function(o){if(e.lengthi[0]?(e.moveTo((i[0]-5)*o,i[1]*o),e.lineTo((i[0]+5)*o,(i[1]+5)*o)):(e.moveTo((i[0]-5)*o,(i[1]+5)*o),e.lineTo((i[0]+5)*o,i[1]*o)),e.lineTo(n[0]*o,n[1]*o),e.fill(),e.restore()}},ol.control.IsochroneGeoportail=function(t){var e=this;t||(t={}),null==t.typing&&(t.typing=300);var o=(t.className?t.className:"")+" ol-isochrone ol-routing";t.target||(o+=" ol-unselectable ol-control");var i=ol.ext.element.create("DIV",{className:o});t.target||ol.ext.element.create("BUTTON",{parent:i}).addEventListener("click",function(){i.classList.toggle("ol-collapsed")});ol.control.Control.call(this,{element:i,target:t.target}),this.set("iter",1);var n=ol.ext.element.create("DIV",{className:"content",parent:i});this._addSearchCtrl(n,t),ol.ext.element.create("BUTTON",{className:"ol-button ol-method-time selected",title:"isochrone",parent:n}).addEventListener("click",function(){this.setMethod("time")}.bind(this)),ol.ext.element.create("I",{className:"ol-button ol-method-distance",title:"isodistance",parent:n}).addEventListener("click",function(){this.setMethod("distance")}.bind(this)),ol.ext.element.create("I",{className:"ol-button ol-car selected",title:"by car",parent:n}).addEventListener("click",function(){this.setMode("car")}.bind(this)),ol.ext.element.create("I",{className:"ol-button ol-pedestrian",title:"by foot",parent:n}).addEventListener("click",function(){this.setMode("pedestrian")}.bind(this)),ol.ext.element.create("I",{className:"ol-button ol-direction-direct selected",title:"direct",parent:n}).addEventListener("click",function(){this.setDirection("direct")}.bind(this)),ol.ext.element.create("I",{className:"ol-button ol-direction-reverse",title:"reverse",parent:n}).addEventListener("click",function(){this.setDirection("reverse")}.bind(this));var r=ol.ext.element.create("DIV",{className:"ol-time",parent:n});ol.ext.element.create("DIV",{html:"isochrone:",parent:r}),ol.ext.element.create("INPUT",{type:"number",parent:r,min:0}).addEventListener("change",function(){e.set("hour",Number(this.value))}),ol.ext.element.create("TEXT",{parent:r,html:"h"}),ol.ext.element.create("INPUT",{type:"number",parent:r,min:0}).addEventListener("change",function(){e.set("minute",Number(this.value))}),ol.ext.element.create("TEXT",{parent:r,html:"mn"}),r=ol.ext.element.create("DIV",{className:"ol-distance",parent:n}),ol.ext.element.create("DIV",{html:"isodistance:",parent:r}),ol.ext.element.create("INPUT",{type:"number",step:"any",parent:r,min:0}).addEventListener("change",function(){e.set("distance",Number(this.value))}),ol.ext.element.create("TEXT",{parent:r,html:"km"}),r=ol.ext.element.create("DIV",{className:"ol-iter",parent:n}),ol.ext.element.create("DIV",{html:"Iteration:",parent:r}),ol.ext.element.create("INPUT",{type:"number",parent:r,value:1,min:1}).addEventListener("change",function(){e.set("iter",Number(this.value))}),ol.ext.element.create("I",{className:"ol-ok",html:"ok",parent:n}).addEventListener("click",function(){var t=0;switch(this.get("method")){case"distance":t=1e3*this.get("distance");break;default:t=3600*(this.get("hour")||0)+60*(this.get("minute")||0)}t&&this.get("coordinate")&&this.search(this.get("coordinate"),t)}.bind(this)),this.set("url","https://wxs.ign.fr/"+(t.apiKey||"essentiels")+"/isochrone/isochrone.json"),this._ajax=new ol.ext.Ajax({dataType:"JSON",auth:t.auth}),this._ajax.on("success",this._success.bind(this)),this._ajax.on("error",this._error.bind(this)),this._ajax.on("loadstart",function(){this.element.classList.add("ol-searching")}.bind(this)),this._ajax.on("loadend",function(){this.element.classList.remove("ol-searching")}.bind(this)),this.setMethod(t.method)},ol.ext.inherits(ol.control.IsochroneGeoportail,ol.control.Control),ol.control.IsochroneGeoportail.prototype.setMap=function(t){ol.control.Control.prototype.setMap.call(this,t),this._search.setMap(t)},ol.control.IsochroneGeoportail.prototype._addSearchCtrl=function(t,e){var o=ol.ext.element.create("DIV",{parent:t}),i=this._search=new ol.control.SearchGeoportail({className:"IGNF ol-collapsed",apiKey:e.apiKey,target:o});i.on("select",function(t){i.setInput(t.search.fulltext),this.set("coordinate",t.coordinate)}.bind(this)),i.on("change:input",function(){this.set("coordinate",!1)}.bind(this))},ol.control.IsochroneGeoportail.prototype.setMethod=function(t){t=/distance/.test(t)?"distance":"time",this.element.querySelector(".ol-method-time").classList.remove("selected"),this.element.querySelector(".ol-method-distance").classList.remove("selected"),this.element.querySelector(".ol-method-"+t).classList.add("selected"),this.element.querySelector("div.ol-time").classList.remove("selected"),this.element.querySelector("div.ol-distance").classList.remove("selected"),this.element.querySelector("div.ol-"+t).classList.add("selected"),this.set("method",t)},ol.control.IsochroneGeoportail.prototype.setMode=function(t){this.set("mode",t),this.element.querySelector(".ol-car").classList.remove("selected"),this.element.querySelector(".ol-pedestrian").classList.remove("selected"),this.element.querySelector(".ol-"+t).classList.add("selected")},ol.control.IsochroneGeoportail.prototype.setDirection=function(t){this.set("direction",t),this.element.querySelector(".ol-direction-direct").classList.remove("selected"),this.element.querySelector(".ol-direction-reverse").classList.remove("selected"),this.element.querySelector(".ol-direction-"+t).classList.add("selected")},ol.control.IsochroneGeoportail.prototype.search=function(t,e,o){var i=this.getMap()?this.getMap().getView().getProjection():"EPSG:3857",n=/distance/.test(this.get("method"))?"distance":"time";if("string"==typeof e){var r=e.replace(/([0-9|.]*)([a-z]*)$/,"$2");switch(n="time",e=parseFloat(e),r){case"mn":e*=60;break;case"h":e*=3600;break;case"m":n="distance";break;case"km":n="distance",e*=1e3}}var s=Math.round(e*(this.get("iter")-(o||0))/this.get("iter"));if("number"==typeof e){var a={"gp-access-lib":"2.1.0",location:ol.proj.toLonLat(t,i),graphName:"pedestrian"===this.get("mode")?"Pieton":"Voiture",exclusions:this.get("exclusions")||void 0,method:n,time:"time"===n?s:void 0,distance:"distance"===n?s:void 0,reverse:"reverse"===this.get("direction"),smoothing:this.get("smoothing")||!0,holes:this.get("holes")||!1};this._ajax.send(this.get("url"),a,{coord:t,option:e,data:a,iteration:(o||0)+1})}},ol.control.IsochroneGeoportail.prototype._success=function(t){var e=this.getMap()?this.getMap().getView().getProjection():"EPSG:3857",o=new ol.format.WKT,i=t.response;i.feature=o.readFeature(i.wktGeometry,{dataProjection:"EPSG:4326",featureProjection:e}),i.feature.set("iteration",t.options.iteration),i.feature.set("method",t.options.data.method),i.feature.set(t.options.data.method,t.options.data[t.options.data.method]),delete i.wktGeometry,i.type="isochrone",i.iteration=t.options.iteration-1,this.dispatchEvent(i),t.options.iteration=0?setTimeout(function(){i.classList.add("ol-collapsed"),o._listener=null},e||3e3):null},100)},ol.control.Notification.prototype.hide=function(){this._listener&&(clearTimeout(this._listener),this._listener=null),this.element.classList.add("ol-collapsed")},ol.control.Notification.prototype.toggle=function(t){this.element.classList.contains("ol-collapsed")?this.show(null,t):this.hide()},ol.control.Overlay=function(t){t||(t={});var e=ol.ext.element.create("DIV",{className:"ol-unselectable ol-overlay "+(t.className||""),html:t.content});ol.control.Control.call(this,{element:e,target:t.target});var o=this;t.hideOnClick&&e.addEventListener("click",function(){o.hide()}),this.set("closeBox",t.closeBox),this._timeout=!1,this.setContent(t.content)},ol.ext.inherits(ol.control.Overlay,ol.control.Control),ol.control.Overlay.prototype.setContent=function(t){var e=this;if(t){var o=this.element;if(t instanceof Element?(o.innerHTML="",o.appendChild(t)):void 0!==t&&(o.innerHTML=t),this.get("closeBox")){var i=document.createElement("div");i.classList.add("ol-closebox"),i.addEventListener("click",function(){e.hide()}),o.insertBefore(i,o.firstChild)}}},ol.control.Overlay.prototype.show=function(t,e){var o=this,i=this.element;i.style.display="block",e?(this.center_=this.getMap().getPixelFromCoordinate(e),i.style.top=this.center_[1]+"px",i.style.left=this.center_[0]+"px"):(this.center_=!1,i.style.top="",i.style.left=""),t&&this.setContent(t),this._timeout&&clearTimeout(this._timeout),this._timeout=setTimeout(function(){i.classList.add("ol-visible"),i.style.top="",i.style.left="",o.dispatchEvent({type:"change:visible",visible:!0,element:o.element})},10)},ol.control.Overlay.prototype.showImage=function(t,e){e=e||{};var o=ol.ext.element.create("DIV",{className:"ol-fullscreen-image"});ol.ext.element.create("IMG",{src:t,parent:o}),e.title&&(o.classList.add("ol-has-title"),ol.ext.element.create("P",{html:e.title,parent:o})),this.show(o,e.coordinate)},ol.control.Overlay.prototype.hide=function(){var t=this.element;this.element.classList.remove("ol-visible"),this.center_&&(t.style.top=this.center_[1]+"px",t.style.left=this.center_[0]+"px",this.center_=!1),this._timeout&&clearTimeout(this._timeout),this._timeout=setTimeout(function(){t.style.display="none"},500),this.dispatchEvent({type:"change:visible",visible:!1,element:this.element})},ol.control.Overlay.prototype.toggle=function(){this.getVisible()?this.hide():this.show()},ol.control.Overlay.prototype.getVisible=function(){return"none"!==ol.ext.element.getStyle(this.element,"display")},ol.control.Overlay.prototype.setClass=function(t){var e=this.element.classList.contains("ol-visible");this.element.className=("ol-unselectable ol-overlay "+(e?"ol-visible ":"")+t).trim()},ol.control.Overview=function(t){t=t||{};var e,o=this;if(this.minZoom=t.minZoom||0,this.maxZoom=t.maxZoom||18,this.rotation=t.rotation,t.target)e=document.createElement("div"),this.panel_=t.target;else{(e=document.createElement("div")).classList.add("ol-overview","ol-unselectable","ol-control","ol-collapsed"),/top/.test(t.align)&&e.classList.add("ol-control-top"),/right/.test(t.align)&&e.classList.add("ol-control-right");var i=document.createElement("button");i.setAttribute("type","button"),i.addEventListener("touchstart",function(t){o.toggleMap(),t.preventDefault()}),i.addEventListener("click",function(){o.toggleMap()}),e.appendChild(i),this.panel_=document.createElement("div"),this.panel_.classList.add("panel"),e.appendChild(this.panel_)}ol.control.Control.call(this,{element:e,target:t.target}),this.ovmap_=new ol.Map({controls:new ol.Collection,interactions:new ol.Collection,target:this.panel_,view:new ol.View({zoom:2,center:[0,0],projection:t.projection}),layers:t.layers}),this.oview_=this.ovmap_.getView(),this.extentLayer=new ol.layer.Vector({name:"Cache extent",source:new ol.source.Vector,style:t.style||[new ol.style.Style({image:new ol.style.Circle({fill:new ol.style.Fill({color:"rgba(255,0,0, 1)"}),stroke:new ol.style.Stroke({width:7,color:"rgba(255,0,0, 0.8)"}),radius:5}),stroke:new ol.style.Stroke({width:5,color:"rgba(255,0,0,0.8)"})})]}),this.ovmap_.addLayer(this.extentLayer);this.ovmap_.addInteraction(new ol.interaction.Pointer({handleDownEvent:function(e){var i,n,r,s,a;return!1!==t.panAnimation?"elastic"==t.panAnimation||t.elasticPan?o.getMap().getView().animate({center:e.coordinate,easing:(i=2,n=.3,r=3*i*Math.PI/2,s=n>0?-1/n:-100,a=Math.cos(r)*Math.pow(2,s),function(t){return t=1-Math.cos(t*Math.PI/2),1-Math.cos(r*t)*Math.pow(2,s*t)+a*t}),duration:1e3}):o.getMap().getView().animate({center:e.coordinate,duration:300}):o.getMap().getView().setCenter(e.coordinate),!1}}))},ol.ext.inherits(ol.control.Overview,ol.control.Control),ol.control.Overview.prototype.getOverviewMap=function(){return this.ovmap_},ol.control.Overview.prototype.toggleMap=function(){this.element.classList.toggle("ol-collapsed"),this.ovmap_.updateSize(),this.setView()},ol.control.Overview.prototype.setPosition=function(t){/top/.test(t)?this.element.classList.add("ol-control-top"):this.element.classList.remove("ol-control-top"),/right/.test(t)?this.element.classList.add("ol-control-right"):this.element.classList.remove("ol-control-right")},ol.control.Overview.prototype.setMap=function(t){if(this._listener)for(var e in this._listener)ol.Observable.unByKey(this._listener[e]);this._listener={},ol.control.Control.prototype.setMap.call(this,t),t&&(this._listener.map=t.on("change:view",function(){this._listener.view&&ol.Observable.unByKey(this._listener.view),t.getView()&&(this._listener.view=t.getView().on("propertychange",this.setView.bind(this)),this.setView())}.bind(this)),this._listener.view=t.getView().on("propertychange",this.setView.bind(this)),this.setView())},ol.control.Overview.prototype.calcExtent_=function(t){var e=this.getMap();if(e){var o=this.extentLayer.getSource();o.clear();var i=new ol.Feature,n=e.getSize(),r=e.getView().getResolution(),s=e.getView().getRotation(),a=e.getView().getCenter();if(r){var l=r*n[0]/2,c=r*n[1]/2,h=this.oview_.getResolution();if(l/h>5||c/h>5){var p,u,d,g=Math.cos(s),m=Math.sin(s);for(t=[[-l,-c],[-l,c],[l,c],[l,-c]],p=0;p<4;++p)u=t[p][0],d=t[p][1],t[p][0]=a[0]+u*g-d*m,t[p][1]=a[1]+u*m+d*g;i.setGeometry(new ol.geom.Polygon([t]))}else i.setGeometry(new ol.geom.Point(a));o.addFeature(i)}}},ol.control.Overview.prototype.setView=function(t){if(!t)return this.setView({key:"rotation"}),this.setView({key:"resolution"}),void this.setView({key:"center"});switch(t.key){case"rotation":this.rotation?this.oview_.setRotation(this.getMap().getView().getRotation()):this.oview_.getRotation()&&this.oview_.setRotation(0);break;case"center":var e=this.getMap().getView().calculateExtent(this.getMap().getSize()),o=this.oview_.calculateExtent(this.ovmap_.getSize());(e[0]o[2]||e[3]>o[3])&&this.oview_.setCenter(this.getMap().getView().getCenter());break;case"resolution":var i=2*Math.round(this.oview_.getZoomForResolution(this.getMap().getView().getResolution())/2)-4;i=Math.min(this.maxZoom,Math.max(this.minZoom,i)),this.oview_.setZoom(i)}this.calcExtent_()},ol.control.Permalink=function(t){var e=t||{},o=this,i=document.createElement("button");if(this.replaceState_=!1!==e.urlReplace,this.fixed_=e.fixed||6,this.hash_=e.anchor?"#":"?",this._localStorage=e.localStorage,!this._localStorage)try{localStorage.removeItem("ol@permalink")}catch(t){console.warn("Failed to access localStorage...")}function n(){"function"==typeof e.onclick?e.onclick(o.getLink()):o.setUrlReplace(!o.replaceState_)}i.addEventListener("click",n,!1),i.addEventListener("touchstart",n,!1);var r=document.createElement("div");r.className=(e.className||"ol-permalink")+" ol-unselectable ol-control",r.appendChild(i),(e.hidden||!1===e.visible)&&ol.ext.element.hide(r),ol.control.Control.call(this,{element:r,target:e.target}),this.set("geohash",e.geohash),this.set("initial",!1),this.on("change",this.viewChange_.bind(this)),this.search_={};var s={},a=document.location.hash||document.location.search||"";if(this.replaceState_&&!a&&this._localStorage)try{a=localStorage["ol@permalink"]}catch(t){console.warn("Failed to access localStorage...")}if(a){a=a.replace(/(^#|^\?)/,"").split("&");for(var l=0;ll.height?"landscape":"portrait"),"landscape"===p&&(c=[c[1],c[0]]);var d=Math.min((c[0]-2*u)/l.width,(c[1]-2*u)/l.height);n=d*l.width,r=d*l.height,s=[(c[0]-n)/2,(c[1]-r)/2]}try{a=l?l.toDataURL(e,o):null}catch(g){return void this.dispatchEvent({type:"error",canvas:l})}var g=Object.assign({type:"print",print:{format:h,orientation:p,unit:"mm",size:c,position:s,imageWidth:n,imageHeight:r},image:a,imageType:e,quality:o,canvas:l},t);this.dispatchEvent(g)}.bind(this)),this.getMap().render()}},ol.control.PrintDialog=function(t){t||(t={}),this._lang=t.lang||"en";var e=ol.ext.element.create("DIV",{className:(t.className||"ol-print")+" ol-unselectable ol-control"});ol.ext.element.create("BUTTON",{type:"button",title:t.title||"Print",click:function(){this.print()}.bind(this),parent:e}),ol.control.Control.call(this,{element:e}),t.openWindow&&this.on("print",function(t){t.canvas&&window.open().document.write('')}),t.target=ol.ext.element.create("DIV");var o=this._printCtrl=new ol.control.Print(t);o.on(["print","error","printing"],function(t){n.setAttribute("data-status",t.type),t.clipboard||this.dispatchEvent(t)}.bind(this)),this._compass=new ol.control.Compass({src:t.northImage||"compact",visible:!1,className:"olext-print-compass",style:new ol.style.Stroke({color:"#333",width:0})});var i=this._printDialog=new ol.control.Dialog({target:document.body,closeBox:!0,className:"ol-ext-print-dialog"}),n=i.getContentElement();this._input={};var r=ol.ext.element.create("DIV",{className:"ol-print-param",parent:n});this._pages=[ol.ext.element.create("DIV",{className:"ol-page"})];var s=ol.ext.element.create("DIV",{className:"ol-map",parent:this._pages[0]});ol.ext.element.create("DIV",{html:this._pages[0],className:"ol-print-map",parent:n}),ol.ext.element.create("H2",{html:this.i18n("title"),parent:r});var a=ol.ext.element.create("UL",{parent:r}),l=ol.ext.element.create("LI",{className:"ol-orientation",parent:a});this._input.orientation={list:l};var c,h=ol.ext.element.create("LABEL",{className:"portrait",parent:l});this._input.orientation.portrait=ol.ext.element.create("INPUT",{type:"radio",name:"ol-print-orientation",value:"portrait",checked:!0,on:{change:function(t){this.setOrientation(t.target.value)}.bind(this)},parent:h}),ol.ext.element.create("SPAN",{html:this.i18n("portrait"),parent:h}),h=ol.ext.element.create("LABEL",{className:"landscape",parent:l}),this._input.orientation.landscape=ol.ext.element.create("INPUT",{type:"radio",name:"ol-print-orientation",value:"landscape",on:{change:function(t){this.setOrientation(t.target.value)}.bind(this)},parent:h}),ol.ext.element.create("SPAN",{html:this.i18n("landscape"),parent:h}),l=ol.ext.element.create("LI",{html:ol.ext.element.create("LABEL",{html:this.i18n("size")}),className:"ol-size",parent:a});var p=this._input.size=ol.ext.element.create("SELECT",{on:{change:function(){this.setSize(p.value||C)}.bind(this)},parent:l});for(c in this.paperSize)ol.ext.element.create("OPTION",{html:c+(this.paperSize[c]?" - "+this.paperSize[c][0]+"x"+this.paperSize[c][1]+" mm":this.i18n("custom")),value:c,parent:p});l=ol.ext.element.create("LI",{html:ol.ext.element.create("LABEL",{html:this.i18n("margin")}),className:"ol-margin",parent:a});var u=this._input.margin=ol.ext.element.create("SELECT",{on:{change:function(){this.setMargin(u.value)}.bind(this)},parent:l});for(c in this.marginSize)ol.ext.element.create("OPTION",{html:this.i18n(c)+" - "+this.marginSize[c]+" mm",value:this.marginSize[c],parent:u});l=ol.ext.element.create("LI",{html:ol.ext.element.create("LABEL",{html:this.i18n("scale")}),className:"ol-scale",parent:a});var d=this._input.scale=ol.ext.element.create("SELECT",{on:{change:function(){this.setScale(parseInt(d.value))}.bind(this)},parent:l});Object.keys(this.scales).forEach(function(t){ol.ext.element.create("OPTION",{html:this.scales[t],value:t,parent:d})}.bind(this)),l=ol.ext.element.create("LI",{className:"ol-legend",parent:a});var g=ol.ext.element.createSwitch({html:this.i18n("legend"),checked:!1,on:{change:function(){T.legend.control.setCanvas(g.checked)}.bind(this)},parent:l});l=ol.ext.element.create("LI",{className:"ol-print-north",parent:a});var m=this._input.north=ol.ext.element.createSwitch({html:this.i18n("north"),checked:"checked",on:{change:function(){m.checked?this._compass.element.classList.add("ol-print-compass"):this._compass.element.classList.remove("ol-print-compass"),this.getMap().render()}.bind(this)},parent:l});l=ol.ext.element.create("LI",{className:"ol-print-title",parent:a});var f=ol.ext.element.createSwitch({html:this.i18n("mapTitle"),checked:!1,on:{change:function(t){T.title.control.setVisible(t.target.checked)}.bind(this)},parent:l}),y=ol.ext.element.create("INPUT",{type:"text",placeholder:this.i18n("mapTitle"),on:{keydown:function(t){13===t.keyCode&&t.preventDefault()},keyup:function(){T.title.control.setTitle(y.value)},change:function(){T.title.control.setTitle(y.value)}.bind(this)},parent:l}),v=ol.ext.element.create("DIV",{className:"ol-user-param",parent:r});l=ol.ext.element.create("LI",{className:"ol-saveas",parent:a});var _=ol.ext.element.create("DIV",{html:this.i18n("copied"),className:"ol-clipboard-copy",parent:l}),x=ol.ext.element.create("SELECT",{on:{change:function(){if(this.formats[x.value].clipboard)o.copyMap(this.formats[x.value],function(t){t&&(_.classList.add("visible"),setTimeout(function(){_.classList.remove("visible")},1e3))});else{var t="string"==typeof this.getSize()?this.getSize():null,e=Object.assign({format:t,size:t?this.paperSize[t]:null,orient:this.getOrientation(),margin:this.getMargin()},this.formats[x.value]);o.print(e)}x.value=""}.bind(this)},parent:l});ol.ext.element.create("OPTION",{html:this.i18n("saveas"),style:{display:"none"},value:"",parent:x}),this.formats.forEach(function(e,o){if(e.pdf){if(!1===t.pdf)return}else if(e.clipboard){if(!1===t.copy)return}else if(!1===t.save)return;ol.ext.element.create("OPTION",{html:this.i18n(e.title),value:o,parent:x})}.bind(this)),l=ol.ext.element.create("LI",{className:"ol-savelegend",parent:a});var b=ol.ext.element.create("DIV",{html:this.i18n("copied"),className:"ol-clipboard-copy",parent:l}),w=ol.ext.element.create("SELECT",{on:{change:function(){var t=T.legend.control.getLegend().getCanvas(),e=document.createElement("CANVAS");e.width=t.width,e.height=t.height;var o,i=e.getContext("2d");if(i.fillStyle="#fff",i.fillRect(0,0,e.width,e.height),i.drawImage(t,0,0),this.formats[w.value].clipboard)e.toBlob(function(t){try{navigator.clipboard.write([new window.ClipboardItem(Object.defineProperty({},t.type,{value:t,enumerable:!0}))]),b.classList.add("visible"),setTimeout(function(){b.classList.remove("visible")},1e3)}catch(t){}},"image/png");else try{o=e.toDataURL(this.formats[w.value].imageType,this.formats[w.value].quality);var n="string"==typeof this.getSize()?this.getSize():"A4",r=e.width/96*25.4,s=e.height/96*25.4,a=this.paperSize[n];"landscape"===this.getOrientation()&&(a=[a[1],a[0]]);var l=[(a[0]-r)/2,(a[1]-s)/2];this.dispatchEvent({type:"print",print:{legend:!0,format:n,orientation:this.getOrientation(),unit:"mm",size:this.paperSize[n],position:l,imageWidth:r,imageHeight:s},image:o,imageType:this.formats[w.value].imageType,pdf:this.formats[w.value].pdf,quality:this.formats[w.value].quality,canvas:e})}catch(t){}w.value=""}.bind(this)},parent:l});ol.ext.element.create("OPTION",{html:this.i18n("saveLegend"),style:{display:"none"},value:"",parent:w}),this.formats.forEach(function(t,e){ol.ext.element.create("OPTION",{html:this.i18n(t.title),value:e,parent:w})}.bind(this));var S,C,M,E=ol.ext.element.create("DIV",{className:"ol-ext-buttons",parent:r});ol.ext.element.create("BUTTON",{html:this.i18n("printBt"),type:"submit",click:function(t){t.preventDefault(),window.print()},parent:E}),ol.ext.element.create("BUTTON",{html:this.i18n("cancel"),type:"button",click:function(){i.hide()},parent:E}),ol.ext.element.create("DIV",{html:this.i18n("errorMsg"),className:"ol-error",parent:r});var T={};i.on("show",function(){this.dispatchEvent({type:"show",userElement:v,dialog:this._printDialog,page:this.getPage()});var t=this.getMap();t&&(document.body.classList.add("ol-print-document"),S=t.getTargetElement(),C=t.getSize(),"string"==typeof this.getSize()?this.setSize(this.getSize()):this.setSize(C),t.setTarget(s),M&&ol.Observable.unByKey(M),M=t.on("moveend",function(){this.setScale(ol.sphere.getMapScale(t))}.bind(this)),this.setScale(ol.sphere.getMapScale(t)),T={},this.getMap().getControls().forEach(function(t){t instanceof ol.control.Legend&&(T.legend={control:t}),t instanceof ol.control.CanvasTitle&&(T.title={control:t}),t instanceof ol.control.Compass&&(T.compass?t.element.classList.remove("ol-print-compass"):(this._input.north.checked?t.element.classList.add("ol-print-compass"):t.element.classList.remove("ol-print-compass"),this._compass=t,T.compass={control:t}))}.bind(this)),T.title?(f.checked=T.title.isVisible=T.title.control.getVisible(),y.value=T.title.control.getTitle(),f.parentNode.parentNode.classList.remove("hidden")):f.parentNode.parentNode.classList.add("hidden"),T.legend?(T.legend.ison=T.legend.control.onCanvas(),T.legend.collapsed=T.legend.control.isCollapsed(),T.legend.control.collapse(!1),w.parentNode.classList.remove("hidden"),g.parentNode.parentNode.classList.remove("hidden"),g.checked=!T.legend.collapsed,T.legend.control.setCanvas(!T.legend.collapsed)):(w.parentNode.classList.add("hidden"),g.parentNode.parentNode.classList.add("hidden")))}.bind(this)),i.on("hide",function(){document.body.classList.remove("ol-print-document"),S&&(this.getMap().setTarget(S),S=null,M&&ol.Observable.unByKey(M),T.title&&T.title.control.setVisible(T.title.isVisible),T.legend&&(T.legend.control.setCanvas(T.legend.ison),T.legend.control.collapse(T.legend.collapsed)),this.dispatchEvent({type:"hide"}))}.bind(this)),window.addEventListener("resize",function(){this.setSize()}.bind(this)),t.saveAs&&this.on("print",function(e){e.pdf||e.canvas.toBlob(function(o){var i=(e.print.legend?"legend.":"map.")+e.imageType.replace("image/","");t.saveAs(o,i)},e.imageType,e.quality)}),t.jsPDF&&this.on("print",function(e){if(e.pdf){var o=new t.jsPDF({orientation:e.print.orientation,unit:e.print.unit,format:e.print.size});o.addImage(e.image,"JPEG",e.print.position[0],e.print.position[0],e.print.imageWidth,e.print.imageHeight),o.save(e.print.legend?"legend.pdf":"map.pdf")}})},ol.ext.inherits(ol.control.PrintDialog,ol.control.Control),ol.control.PrintDialog.prototype.isOpen=function(){return this._printDialog.isOpen()},ol.control.PrintDialog.addLang=function(t,e){ol.control.PrintDialog.prototype._labels[t]=e},ol.control.PrintDialog.prototype.i18n=function(t){var e=this._labels.en[t]||"bad param";return this._labels[this._lang]&&this._labels[this._lang][t]&&(e=this._labels[this._lang][t]),e},ol.control.PrintDialog.prototype._labels={en:{title:"Print",orientation:"Orientation",portrait:"Portrait",landscape:"Landscape",size:"Page size",custom:"screen size",margin:"Margin",scale:"Scale",legend:"Legend",north:"North arrow",mapTitle:"Map title",saveas:"Save as...",saveLegend:"Save legend...",copied:"✔ Copied to clipboard",errorMsg:"Can't save map canvas...",printBt:"Print...",clipboardFormat:"copy to clipboard...",jpegFormat:"save as jpeg",pngFormat:"save as png",pdfFormat:"save as pdf",none:"none",small:"small",large:"large",cancel:"cancel"},fr:{title:"Imprimer",orientation:"Orientation",portrait:"Portrait",landscape:"Paysage",size:"Taille du papier",custom:"taille écran",margin:"Marges",scale:"Echelle",legend:"Légende",north:"Flèche du nord",mapTitle:"Titre de la carte",saveas:"Enregistrer sous...",saveLegend:"Enregistrer la légende...",copied:"✔ Carte copiée",errorMsg:"Impossible d'enregistrer la carte",printBt:"Imprimer",clipboardFormat:"copier dans le presse-papier...",jpegFormat:"enregistrer un jpeg",pngFormat:"enregistrer un png",pdfFormat:"enregistrer un pdf",none:"aucune",small:"petites",large:"larges",cancel:"annuler"},de:{title:"Drucken",orientation:"Ausrichtung",portrait:"Hochformat",landscape:"Querformat",size:"Papierformat",custom:"Bildschirmgröße",margin:"Rand",scale:"Maßstab",legend:"Legende",north:"Nordpfeil",mapTitle:"Kartentitel",saveas:"Speichern als...",saveLegend:"Legende speichern...",copied:"✔ In die Zwischenablage kopiert",errorMsg:"Kann Karte nicht speichern...",printBt:"Drucken...",clipboardFormat:"in die Zwischenablage kopieren...",jpegFormat:"speichern als jpeg",pngFormat:"speichern als png",pdfFormat:"speichern als pdf",none:"kein",small:"klein",large:"groß",cancel:"abbrechen"},zh:{title:"打印",orientation:"方向",portrait:"纵向",landscape:"横向",size:"页面大小",custom:"屏幕大小",margin:"外边距",scale:"尺度",legend:"图例",north:"指北针",mapTitle:"地图名字",saveas:"保存为...",saveLegend:"保存图例为...",copied:"✔ 已复制到剪贴板",errorMsg:"无法保存地图...",printBt:"打印...",cancel:"取消"}},ol.control.PrintDialog.prototype.paperSize={"":null,A0:[841,1189],A1:[594,841],A2:[420,594],A3:[297,420],A4:[210,297],"US Letter":[215.9,279.4],A5:[148,210],B4:[257,364],B5:[182,257]},ol.control.PrintDialog.prototype.marginSize={none:0,small:5,large:10},ol.control.PrintDialog.prototype.formats=[{title:"clipboardFormat",imageType:"image/png",clipboard:!0},{title:"jpegFormat",imageType:"image/jpeg",quality:.8},{title:"pngFormat",imageType:"image/png",quality:.8},{title:"pdfFormat",imageType:"image/jpeg",pdf:!0}],ol.control.PrintDialog.prototype.scales={" 5000":"1/5.000"," 10000":"1/10.000"," 25000":"1/25.000"," 50000":"1/50.000"," 100000":"1/100.000"," 250000":"1/250.000"," 1000000":"1/1.000.000"},ol.control.PrintDialog.prototype.getOrientation=function(){return this._orientation||"portrait"},ol.control.PrintDialog.prototype.setOrientation=function(t){this._orientation="landscape"===t?"landscape":"portrait",this._input.orientation[this._orientation].checked=!0,this.setSize()},ol.control.PrintDialog.prototype.getMargin=function(){return this._margin||0},ol.control.PrintDialog.prototype.setMargin=function(t){this._margin=t,this._input.margin.value=t,this.setSize()},ol.control.PrintDialog.prototype.getSize=function(){return this._size},ol.control.PrintDialog.prototype.setSize=function(t){if(this._printDialog.getContentElement().setAttribute("data-status",""),t?this._size=t:t=this._size,t){if("string"==typeof t){for(var e in this.paperSize)e&&new RegExp(e,"i").test(t)&&(t=e);this.paperSize[t]||(t=this._size="A4"),this._input.size.value=t,t=[Math.trunc(96*this.paperSize[t][0]/25.4),Math.trunc(96*this.paperSize[t][1]/25.4)],"landscape"===this.getOrientation()&&(t=[t[1],t[0]]),this.getPage().classList.remove("margin")}else this._input.size.value="",this.getPage().classList.add("margin");var o=this.getPage(),i=o.parentNode.getBoundingClientRect(),n=(i.width-40)/t[0],r=(i.height-40)/t[1],s=Math.min(n,r,1);o.style.width=t[0]+"px",o.style.height=t[1]+"px",o.style["-webkit-transform"]=o.style.transform="translate(-50%,-50%) scale("+s+")";var a=Math.round(5/s);o.style["-webkit-box-shadow"]=o.style["box-shadow"]=a+"px "+a+"px "+a+"px rgba(0,0,0,.6)",o.style.padding=96*this.getMargin()/25.4+"px",this.getMap()&&this.getMap().updateSize(),this.dispatchEvent({type:"dialog:refresh"})}},ol.control.PrintDialog.prototype.getContentElement=function(){return this._printDialog.getContentElement()},ol.control.PrintDialog.prototype.getUserElement=function(){return this._printDialog.getContentElement().querySelector(".ol-user-param")},ol.control.PrintDialog.prototype.getPage=function(){return this._pages[0]},ol.control.PrintDialog.prototype.setMap=function(t){this.getMap()&&(this.getMap().removeControl(this._compass),this.getMap().removeControl(this._printCtrl),this.getMap().removeControl(this._printDialog)),ol.control.Control.prototype.setMap.call(this,t),this.getMap()&&(this.getMap().addControl(this._compass),this.getMap().addControl(this._printCtrl),this.getMap().addControl(this._printDialog))},ol.control.PrintDialog.prototype.setScale=function(t){ol.sphere.setMapScale(this.getMap(),t),this._input.scale.value=" "+100*Math.round(t/100)},ol.control.PrintDialog.prototype.getScale=function(){return ol.sphere.getMapScale(this.getMap())},ol.control.PrintDialog.prototype.print=function(t){(t=t||{}).size&&this.setSize(t.size),t.scale&&this.setScale(t.scale),t.orientation&&this.setOrientation(t.orientation),t.margin&&this.setMargin(t.margin),this._printDialog.show()},ol.control.PrintDialog.prototype.getrintControl=function(){return this._printCtrl},ol.control.Profil=function(t){t=t||{},this.info=t.info||ol.control.Profil.prototype.info;var e,o=this;if(t.target)(e=document.createElement("div")).classList.add(t.className||"ol-profil");else{(e=document.createElement("div")).className=((t.className||"ol-profil")+" ol-unselectable ol-control ol-collapsed").trim(),this.button=document.createElement("button"),this.button.title=t.title||"Profile",this.button.setAttribute("type","button");var i=function(t){o.toggle(),t.preventDefault()};this.button.addEventListener("click",i),this.button.addEventListener("touchstart",i),e.appendChild(this.button)}t.style instanceof ol.style.Style?this._style=t.style:this._style=new ol.style.Style({text:new ol.style.Text,stroke:new ol.style.Stroke({width:1.5,color:"#369"})}),this._style.getText()||this._style.setText(new ol.style.Text),t.selectStyle instanceof ol.style.Style?this._selectStyle=t.selectStyle:this._selectStyle=new ol.style.Style({fill:new ol.style.Fill({color:"#369"})});var n=document.createElement("div");n.classList.add("ol-inner"),e.appendChild(n);var r=document.createElement("div");r.style.position="relative",n.appendChild(r);var s=this.ratio=2;this.canvas_=document.createElement("canvas"),this.canvas_.width=(t.width||300)*s,this.canvas_.height=(t.height||150)*s;var a={msTransform:"scale(0.5,0.5)",msTransformOrigin:"0 0",webkitTransform:"scale(0.5,0.5)",webkitTransformOrigin:"0 0",mozTransform:"scale(0.5,0.5)",mozTransformOrigin:"0 0",transform:"scale(0.5,0.5)",transformOrigin:"0 0"};Object.keys(a).forEach(function(t){t in o.canvas_.style&&(o.canvas_.style[t]=a[t])});var l=document.createElement("div");r.appendChild(l),l.style.width=this.canvas_.width/s+"px",l.style.height=this.canvas_.height/s+"px",l.appendChild(this.canvas_),l.addEventListener("pointerdown",this.onMove.bind(this)),document.addEventListener("pointerup",this.onMove.bind(this)),l.addEventListener("mousemove",this.onMove.bind(this)),l.addEventListener("touchmove",this.onMove.bind(this)),ol.control.Control.call(this,{element:e,target:t.target}),this.set("selectable",t.selectable),this.margin_={top:10*s,left:45*s,bottom:30*s,right:10*s},this.info.ytitle||(this.margin_.left-=20*s),this.info.xtitle||(this.margin_.bottom-=20*s),this.bar_=document.createElement("div"),this.bar_.classList.add("ol-profilbar"),this.bar_.style.top=this.margin_.top/s+"px",this.bar_.style.height=(this.canvas_.height-this.margin_.top-this.margin_.bottom)/s+"px",r.appendChild(this.bar_),this.cursor_=document.createElement("div"),this.cursor_.classList.add("ol-profilcursor"),r.appendChild(this.cursor_),this.popup_=document.createElement("div"),this.popup_.classList.add("ol-profilpopup"),this.cursor_.appendChild(this.popup_);var c=document.createElement("table");c.cellPadding="0",c.cellSpacing="0",c.style.clientWidth=this.canvas_.width/s+"px",r.appendChild(c);var h=document.createElement("tr");h.classList.add("track-info"),c.appendChild(h);var p=document.createElement("td");p.innerHTML=(this.info.zmin||"Zmin")+': ',h.appendChild(p);var u=document.createElement("td");u.innerHTML=(this.info.zmax||"Zmax")+': ',h.appendChild(u);var d=document.createElement("td");d.innerHTML=(this.info.distance||"Distance")+': ',h.appendChild(d);var g=document.createElement("td");g.innerHTML=(this.info.time||"Time")+': ',h.appendChild(g);var m=document.createElement("tr");m.classList.add("point-info"),c.appendChild(m);var f=document.createElement("td");f.innerHTML=(this.info.altitude||"Altitude")+': ',m.appendChild(f);var y=document.createElement("td");y.innerHTML=(this.info.distance||"Distance")+': ',m.appendChild(y);var v,_,x=document.createElement("td");(x.innerHTML=(this.info.time||"Time")+': ',m.appendChild(x),this.tab_=[],t.feature&&this.setGeometry(t.feature),t.zoomable)&&(this.set("selectable",!0),this.on("change:geometry",function(){_=null}),this.on("dragstart",function(t){v=t.index}),this.on("dragend",function(t){if(Math.abs(v-t.index)>10){if(!_)var o=ol.ext.element.create("BUTTON",{parent:e,className:"ol-zoom-out",click:function(t){t.stopPropagation(),t.preventDefault(),_&&(this.dispatchEvent({type:"zoom"}),this.setGeometry(_,this._geometry[1])),e.removeChild(o)}.bind(this)});var i=_||this._geometry[0],n=new ol.geom.LineString(this.getSelection(v,t.index));this.setGeometry(n,this._geometry[1]),_=i,this.dispatchEvent({type:"zoom",geometry:n,start:v,end:t.index})}}.bind(this)))},ol.ext.inherits(ol.control.Profil,ol.control.Control),ol.control.Profil.prototype.info={zmin:"Zmin",zmax:"Zmax",ytitle:"Altitude (m)",xtitle:"Distance (km)",time:"Time",altitude:"Altitude",distance:"Distance",altitudeUnits:"m",distanceUnitsM:"m",distanceUnitsKM:"km"},ol.control.Profil.prototype.popup=function(t){this.popup_.innerHTML=t},ol.control.Profil.prototype._drawAt=function(t,e){t?(this.cursor_.style.left=e+"px",this.cursor_.style.top=(this.canvas_.height-this.margin_.bottom+t[1]*this.scale_[1]+this.dy_)/this.ratio+"px",this.cursor_.style.display="block",this.bar_.parentElement.classList.add("over"),this.bar_.style.left=e+"px",this.bar_.style.display="block",this.element.querySelector(".point-info .z").textContent=t[1]+this.info.altitudeUnits,this.element.querySelector(".point-info .dist").textContent=(t[0]/1e3).toFixed(1)+this.info.distanceUnitsKM,this.element.querySelector(".point-info .time").textContent=t[2],e>this.canvas_.width/this.ratio/2?this.popup_.classList.add("ol-left"):this.popup_.classList.remove("ol-left")):(this.cursor_.style.display="none",this.bar_.style.display="none",this.cursor_.style.display="none",this.bar_.parentElement.classList.remove("over"))},ol.control.Profil.prototype.showAt=function(t){var e,o,i,n=1/0;if(void 0===t)this.bar_.parentElement.classList.contains("over")&&this._drawAt();else if(t.length)for(e=1;o=this.tab_[e];e++){var r=ol.coordinate.dist2d(o[3],t);r=t));e++);if(i){var s=(i[0]*this.scale_[0]+this.margin_.left)/this.ratio;return this._drawAt(i,s),i[3]}return null},ol.control.Profil.prototype.showAtTime=function(t,e){var o,i,n;if(t instanceof Date?t=t.getTime()/1e3:e&&(t+=this.tab_[0][3][3]),void 0===t)this.bar_.parentElement.classList.contains("over")&&this._drawAt();else for(o=0;(i=this.tab_[o])&&(n=i,!(i[3][3]>=t));o++);if(n){var r=(n[0]*this.scale_[0]+this.margin_.left)/this.ratio;return this._drawAt(n,r),n[3]}return null},ol.control.Profil.prototype.pointAtTime=function(t){var e,o;for(e=1;o=this.tab_[e];e++){var i=o[3][3];if(i>=t){var n=this.tab_[e-1][3];return(n[3]+i)/2this.margin_.left/l-20&&s<(this.canvas_.width-this.margin_.right)/l+8&&a>this.margin_.top/l&&a<(this.canvas_.height-this.margin_.bottom)/l){var c,h,p=(s*l-this.margin_.left)/this.scale_[0],u=this.tab_[0];for(c=1;h=this.tab_[c];c++)if(h[0]>=p){p<(h[0]+u[0])/2&&(c=0,h=u);break}switch(h||(h=this.tab_[this.tab_.length-1]),s=Math.max(this.margin_.left/l,Math.min(s,(this.canvas_.width-this.margin_.right)/l)),this._drawAt(h,s),this.dispatchEvent({type:"over",click:"click"===t.type,index:c,coord:h[3],time:h[2],distance:h[0]}),t.type){case"pointerdown":this._dragging={event:{type:"dragstart",index:c,coord:h[3],time:h[2],distance:h[0]},pageX:n,pageY:r};break;case"pointerup":this._dragging&&this._dragging.pageX?Math.abs(this._dragging.pageX-n)<3&&Math.abs(this._dragging.pageY-r)<3&&(this.dispatchEvent({type:"click",index:c,coord:h[3],time:h[2],distance:h[0]}),this.refresh()):this.dispatchEvent({type:"dragend",index:c,coord:h[3],time:h[2],distance:h[0]}),this._dragging=!1;break;default:if(this._dragging)if(this._dragging.pageX)(Math.abs(this._dragging.pageX-n)>3||Math.abs(this._dragging.pageY-r)>3)&&(this._dragging.pageX=this._dragging.pageY=!1,this.dispatchEvent(this._dragging.event));else{this.dispatchEvent({type:"dragging",index:c,coord:h[3],time:h[2],distance:h[0]});var d=Math.min(this._dragging.event.index,c),g=Math.max(this._dragging.event.index,c);this.refresh(),this.get("selectable")&&this._drawGraph(this.tab_.slice(d,g),this._selectStyle)}}}else this.bar_.parentElement.classList.contains("over")&&(this._drawAt(),this.dispatchEvent({type:"out"})),"pointerup"===t.type&&this._dragging&&(this.dispatchEvent({type:"dragcancel"}),this._dragging=!1)}},ol.control.Profil.prototype.show=function(){this.element.classList.remove("ol-collapsed"),this.dispatchEvent({type:"show",show:!0})},ol.control.Profil.prototype.hide=function(){this.element.classList.add("ol-collapsed"),this.dispatchEvent({type:"show",show:!1})},ol.control.Profil.prototype.toggle=function(){this.element.classList.toggle("ol-collapsed");var t=this.element.classList.contains("ol-collapsed");this.dispatchEvent({type:"show",show:!t})},ol.control.Profil.prototype.isShown=function(){return!this.element.classList.contains("ol-collapsed")},ol.control.Profil.prototype.getSelection=function(t,e){for(var o=[],i=Math.max(Math.min(t,e),0),n=Math.min(Math.max(t,e),this.tab_.length-1),r=i;r<=n;r++)o.push(this.tab_[r][3]);return o},ol.control.Profil.prototype._drawGraph=function(t,e){if(t.length){var o,i,n=this.canvas_.getContext("2d"),r=this.scale_[0],s=this.scale_[1],a=this.dy_,l=this.ratio;for(n.beginPath(),o=0;i=t[o];o++)0==o?n.moveTo(i[0]*r,i[1]*s+a):n.lineTo(i[0]*r,i[1]*s+a);e.getStroke()&&(n.strokeStyle=e.getStroke().getColor()||"#000",n.lineWidth=e.getStroke().getWidth()*l,n.setLineDash([]),n.stroke()),e.getFill()&&(n.fillStyle=e.getFill().getColor()||"#000",n.Style=e.getFill().getColor()||"#000",n.lineTo(t[t.length-1][0]*r,0),n.lineTo(t[0][0]*r,0),n.fill())}},ol.control.Profil.prototype.setGeometry=function(t,e){if(e||(e={}),t instanceof ol.Feature&&(t=t.getGeometry()),this._geometry=[t,e],/Z/.test(t.getLayout())){/M/.test(t.getLayout())?this.element.querySelector(".time").parentElement.style.display="block":this.element.querySelector(".time").parentElement.style.display="none";var o=t.getCoordinates();switch(t.getType()){case"LineString":break;case"MultiLineString":o=o[0];break;default:return}var i,n,r,s,a,l,c,h=e.projection||this.getMap().getView().getProjection(),p=1/0,u=-1/0,d=this.tab_=[];for(i=0;n=o[i];i++)(s=n[2])u&&(u=s),0==i?r=0:r+=(l=o[i-1],c=n,ol.sphere.getDistance(ol.proj.transform(l,h,"EPSG:4326"),ol.proj.transform(c,h,"EPSG:4326"))),a=g(o[0][3],n[3]),d.push([r,s,a,n]);this._z=[p,u],this.set("graduation",e.graduation||100),this.set("zmin",e.zmin),this.set("zmax",e.zmax),this.set("amplitude",e.amplitude),this.set("unit",e.unit),this.set("zunit",e.zunit),this.set("zDigits",e.zDigits),this.set("zMaxChars",e.zMaxChars),this.dispatchEvent({type:"change:geometry",geometry:t}),this.refresh()}function g(t,e){if(!t||!e)return"-";var o=(e-t)/60,i=Math.trunc(o/60),n=Math.trunc(o-60*i);return i+"h"+(n<10?"0":"")+n+"mn"}},ol.control.Profil.prototype.refresh=function(){var t=this.canvas_,e=t.getContext("2d"),o=t.width,i=t.height;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,o,i);var n,r=this._z[0],s=this._z[1],a=this.tab_,l=a[a.length-1][0],c=a[a.length-1][2];if(l){e.setTransform(1,0,0,1,this.margin_.left,i-this.margin_.bottom);var h=this.ratio;o-=this.margin_.right+this.margin_.left,i-=this.margin_.top+this.margin_.bottom,e.strokeStyle=this._style.getText().getFill().getColor()||"#000",e.lineWidth=.5*h,e.beginPath(),e.moveTo(0,0),e.lineTo(0,-i),e.moveTo(0,0),e.lineTo(o,0),e.stroke(),this.element.querySelector(".track-info .zmin").textContent=r.toFixed(2)+this.info.altitudeUnits,this.element.querySelector(".track-info .zmax").textContent=s.toFixed(2)+this.info.altitudeUnits,this.element.querySelector(".track-info .dist").textContent=l>1e3?(l/1e3).toFixed(1)+this.info.distanceUnitsKM:l.toFixed(1)+this.info.distanceUnitsM,this.element.querySelector(".track-info .time").textContent=c;for(var p=this.get("graduation");;){if(!(i/(((s=Math.ceil(s/p)*p)-(r=Math.floor(r/p)*p))/p)<15*h))break;p*=2}"number"==typeof this.get("zmin")&&r>this.get("zmin")&&(r=this.get("zmin")),"number"==typeof this.get("zmax")&&s1e3?(C=100*Math.round(l/1e3))>1e3&&(C=1e3*Math.ceil(C/1e3)):(M="m",C=l>100?10*Math.round(l/100):l>10?Math.round(l/10):l>1?Math.round(l)/10:l),n=0;n<=l;n+=C){var E="m"==M?n:n/1e3;e.fillText(Math.round(10*E)/10,n*d,4*h),e.moveTo(n*d,2*h),e.lineTo(n*d,0)}e.font=12*h+"px arial",e.fillText(this.info.xtitle.replace("(km)","("+M+")"),o/2,18*h),e.save(),e.rotate(-Math.PI/2),e.fillText(this.info.ytitle,i/2,-this.margin_.left),e.restore(),e.stroke()}else console.error("[ol/control/Profil] no data...",a)},ol.control.Profil.prototype.getImage=function(t,e){return"canvas"===t?this.canvas_:this.canvas_.toDataURL(t,e)},ol.control.ProgressBar=function(t){t=t||{};var e=ol.ext.element.create("DIV",{className:((t.className||"")+" ol-progress-bar ol-unselectable ol-control").trim()});this._waiting=ol.ext.element.create("DIV",{html:t.label||"",className:"ol-waiting",parent:e}),this._bar=ol.ext.element.create("DIV",{className:"ol-bar",parent:e}),ol.control.Control.call(this,{element:e,target:t.target}),this._layerlistener=[],this.setLayers(t.layers)},ol.ext.inherits(ol.control.ProgressBar,ol.control.Control),ol.control.ProgressBar.prototype.setPercent=function(t){this._bar.style.width=100*(Number(t)||0)+"%",void 0===t?ol.ext.element.hide(this.element):ol.ext.element.show(this.element)},ol.control.ProgressBar.prototype.setLabel=function(t){this._waiting.innerHTML=t},ol.control.ProgressBar.prototype.setLayers=function(t){this._layerlistener.forEach(function(t){ol.Observable.unByKey(t)}),this._layerlistener=[],this.setPercent();var e,o=0,i=0;(t instanceof ol.layer.Layer&&(t=[t]),t&&t.forEach)&&t.forEach(function(t){t instanceof ol.layer.Layer&&(this._layerlistener.push(t.getSource().on("tileloadstart",function(){o++,this.setPercent(i/o),clearTimeout(e)}.bind(this))),this._layerlistener.push(t.getSource().on(["tileloadend","tileloaderror"],function(){++i===o?(o=i=0,this.setPercent(1),e=setTimeout(this.setPercent.bind(this),300)):this.setPercent(i/o)}.bind(this))))}.bind(this))},ol.control.RoutingGeoportail=function(t){var e=this;t||(t={}),null==t.typing&&(t.typing=300),t.apiKey=t.apiKey||"itineraire",t.search||(t.search={}),t.search.apiKey=t.search.apiKey||"essentiels",this._classname=t.className||"search",this._source=new ol.source.Vector,this._auth=t.authentication;var o=document.createElement("DIV"),i=(t.className||"")+" ol-routing";(t.target||(i+=" ol-unselectable ol-control"),o.setAttribute("class",i),t.target)||ol.ext.element.create("BUTTON",{parent:o}).addEventListener("click",function(){o.classList.toggle("ol-collapsed")});ol.control.Control.call(this,{element:o,target:t.target}),this.set("url","https://wxs.ign.fr/calcul/geoportail/"+t.apiKey+"/rest/1.0.0/route");var n=ol.ext.element.create("DIV",{className:"content",parent:o}),r=ol.ext.element.create("DIV",{className:"search-input",parent:n});this._search=[],this.addSearch(r,t),this.addSearch(r,t),ol.ext.element.create("I",{className:"ol-car",title:t.carlabel||"by car",parent:n}).addEventListener("click",function(){e.setMode("car")}),ol.ext.element.create("I",{className:"ol-pedestrian",title:t.pedlabel||"pedestrian",parent:n}).addEventListener("click",function(){e.setMode("pedestrian")}),ol.ext.element.create("I",{className:"ol-ok",title:t.runlabel||"search",html:"OK",parent:n}).addEventListener("click",function(){e.calculate()}),ol.ext.element.create("I",{className:"ol-cancel",html:"cancel",parent:n}).addEventListener("click",function(){this.resultElement.innerHTML=""}.bind(this)),this.resultElement=document.createElement("DIV"),this.resultElement.setAttribute("class","ol-result"),o.appendChild(this.resultElement),this.setMode(t.mode||"car"),this.set("timeout",t.timeout||2e4)},ol.ext.inherits(ol.control.RoutingGeoportail,ol.control.Control),ol.control.RoutingGeoportail.prototype.setMode=function(t,e){this.set("mode",t),this.element.querySelector(".ol-car").classList.remove("selected"),this.element.querySelector(".ol-pedestrian").classList.remove("selected"),this.element.querySelector(".ol-"+t).classList.add("selected"),e||this.calculate()},ol.control.RoutingGeoportail.prototype.setMethod=function(t,e){this.set("method",t),e||this.calculate()},ol.control.RoutingGeoportail.prototype.addButton=function(t,e,o){var i=document.createElement("I");return i.setAttribute("class",t),i.setAttribute("type","button"),i.setAttribute("title",e),i.innerHTML=o||"",this.element.appendChild(i),i},ol.control.RoutingGeoportail.prototype.getSource=function(){return this._source},ol.control.RoutingGeoportail.prototype._resetArray=function(t){this._search=[];var e=t.parentNode.querySelectorAll(".search-input > div");e.forEach(function(t){t.olsearch&&(t.olsearch.get("feature")&&(t.olsearch.get("feature").set("step",this._search.length),0===this._search.length?t.olsearch.get("feature").set("pos","start"):this._search.length===e.length-1?t.olsearch.get("feature").set("pos","end"):t.olsearch.get("feature").set("pos","")),this._search.push(t.olsearch))}.bind(this))},ol.control.RoutingGeoportail.prototype.removeSearch=function(t,e,o){t.removeChild(o),o.olsearch.get("feature")&&this._source.removeFeature(o.olsearch.get("feature")),this.getMap()&&this.getMap().removeControl(o.olsearch),this._resetArray(t)},ol.control.RoutingGeoportail.prototype.addSearch=function(t,e,o){var i=this,n=ol.ext.element.create("DIV");o?t.insertBefore(n,o.nextSibling):t.appendChild(n),ol.ext.element.create("BUTTON",{title:e.startlabel||"add/remove",parent:n}).addEventListener("click",function(o){o.ctrlKey?this._search.length>2&&this.removeSearch(t,e,n):o.shiftKey&&this.addSearch(t,e,n)}.bind(this));var r=n.olsearch=new ol.control.SearchGeoportail({className:"IGNF ol-collapsed",apiKey:e.search.apiKey,authentication:e.search.authentication,target:n,reverse:!0});r._changeCounter=0,this._resetArray(t),r.on("select",function(t){r.setInput(t.search.fulltext);var e=r.get("feature");e?(r.checkgeom=!1,t.silent||e.getGeometry().setCoordinates(t.coordinate),r.checkgeom=!0):(e=new ol.Feature(new ol.geom.Point(t.coordinate)),r.set("feature",e),this._source.addFeature(e),r.checkgeom=!0,e.getGeometry().on("change",function(){r.checkgeom&&this.onGeometryChange(r,e)}.bind(this))),e.set("name",r.getTitle(t.search)),e.set("step",this._search.indexOf(r)),0===e.get("step")?e.set("pos","start"):e.get("step")===this._search.length-1&&e.set("pos","end"),r.set("selection",t.search)}.bind(this)),r.element.querySelector("input").addEventListener("change",function(){r.set("selection",null),i.resultElement.innerHTML=""}),this.getMap()&&this.getMap().addControl(r)},ol.control.RoutingGeoportail.prototype.onGeometryChange=function(t,e,o){var i=ol.proj.transform(e.getGeometry().getCoordinates(),this.getMap().getView().getProjection(),"EPSG:4326");if(t._handleSelect({x:i[0],y:i[1],fulltext:i[0].toFixed(6)+","+i[1].toFixed(6)},!0,{silent:!0}),o){if(t._changeCounter--,!t._changeCounter)return void t.reverseGeocode(e.getGeometry().getCoordinates(),{silent:!0})}else t._changeCounter++,setTimeout(function(){this.onGeometryChange(t,e,!0)}.bind(this),1e3)},ol.control.RoutingGeoportail.prototype.setMap=function(t){ol.control.Control.prototype.setMap.call(this,t);for(var e=0;e"+r+(e?" - "+e:"")+"",on:{pointerenter:function(){this.dispatchEvent({type:"step:hover",hover:!1,index:o,feature:t})}.bind(this),pointerleave:function(){this.dispatchEvent({type:"step:hover",hover:!1,index:o,feature:t})}.bind(this)},click:function(){this.dispatchEvent({type:"step:select",index:o,feature:t})}.bind(this),parent:i})}.bind(this))},ol.control.RoutingGeoportail.prototype.handleResponse=function(t,e,o){if("ERROR"!==t.status){for(var i,n,r,s={type:"routing",features:[]},a=0,l=0,c=new ol.format.GeoJSON,h=0;r=t.portions[h];h++)for(var p,u=0;p=r.steps[u];u++){p.type="Feature",p.properties=p.attributes.name||p.attributes,p.properties.distance=p.distance,p.properties.duration=Math.round(60*p.duration),p.instruction&&(p.properties.instruction_type=p.instruction.type,p.properties.instruction_modifier=p.instruction.modifier),a+=p.distance,l+=p.duration,p.properties.distanceT=Math.round(100*a)/100,p.properties.durationT=Math.round(60*l),p.properties.name=p.properties.cpx_toponyme_route_nommee||p.properties.cpx_toponyme||p.properties.cpx_numero||p.properties.nom_1_droite||p.properties.nom_1_gauche||"";var d=p.geometry.coordinates[p.geometry.coordinates.length-1];n&&!ol.coordinate.equal(d,p.geometry.coordinates[p.geometry.coordinates.length-1])&&p.geometry.coordinates.unshift(n),n=p.geometry.coordinates[p.geometry.coordinates.length-1],i=c.readFeature(p,{featureProjection:this.getMap().getView().getProjection()}),s.features.push(i)}s.distance=parseFloat(t.distance),s.duration=parseFloat(t.duration)/60;var g=c.readGeometry(t.geometry,{featureProjection:this.getMap().getView().getProjection()});return s.feature=new ol.Feature({geometry:g,start:this._search[0].getTitle(e),end:this._search[0].getTitle(o),distance:s.distance,duration:s.duration}),this.dispatchEvent(s),this.path=s,s}this.dispatchEvent({type:"errror",status:"200",statusText:t.message})},ol.control.RoutingGeoportail.prototype.abort=function(){this._request&&(this._request.abort(),this._request=null,this.dispatchEvent({type:"abort"}))},ol.control.RoutingGeoportail.prototype.calculate=function(t){if(this.resultElement.innerHTML="",t){var e=[];t.forEach(function(t){e.push({x:t[0],y:t[1]})}),t=e}else{t=[];for(var o=0;o=200&&t.status<400?c.listRouting(c.handleResponse(JSON.parse(t.response),i,n)):this.dispatchEvent({type:"error",status:t.status,statusText:t.statusText})}.bind(this),function(t){this.dispatchEvent({type:"error",status:t.status,statusText:t.statusText})}.bind(this)),!0},ol.control.RoutingGeoportail.prototype.ajax=function(t,e,o){var i=this;this._request&&this._request.abort();var n=this._request=new XMLHttpRequest;n.open("GET",t,!0),n.timeout=this.get("timeout")||2e4,this._auth&&n.setRequestHeader("Authorization","Basic "+this._auth),this.element.classList.add("ol-searching"),n.onload=function(){i._request=null,i.element.classList.remove("ol-searching"),e.call(i,this)},n.ontimeout=function(){i._request=null,i.element.classList.remove("ol-searching"),o&&o.call(i,this)},n.onerror=function(){i._request=null,i.element.classList.remove("ol-searching"),o&&o.call(i,this)},n.send()},ol.control.Scale=function(t){t||(t={}),null==t.typing&&(t.typing=300);var e=document.createElement("DIV"),o=(t.className||"")+" ol-scale";t.target||(o+=" ol-unselectable ol-control"),this._input=document.createElement("INPUT"),this._input.value="-",e.setAttribute("class",o),!1===t.editable&&(this._input.readOnly=!0),e.appendChild(this._input),ol.control.Control.call(this,{element:e,target:t.target}),this._input.addEventListener("change",this.setScale.bind(this)),this.set("ppi",t.ppi||96)},ol.ext.inherits(ol.control.Scale,ol.control.Control),ol.control.Scale.prototype.setMap=function(t){this._listener&&ol.Observable.unByKey(this._listener),this._listener=null,ol.control.Control.prototype.setMap.call(this,t),t&&(this._listener=t.on("moveend",this.getScale.bind(this)))},ol.control.Scale.prototype.getScale=function(){var t=this.getMap();if(t){var e=ol.sphere.getMapScale(t,this.get("ppi"));return this._input.value=this.formatScale(e),e}},ol.control.Scale.prototype.formatScale=function(t){return"1 / "+(t=t>100?100*Math.round(t/100):Math.round(t)).toLocaleString()},ol.control.Scale.prototype.setScale=function(t){var e=this.getMap();e&&t&&(t.target&&(t=t.target.value),ol.sphere.setMapScale(e,t,this.get("ppi"))),this.getScale()},ol.control.SearchBAN=function(t){(t=t||{}).typing=t.typing||500,t.url=t.url||"https://api-adresse.data.gouv.fr/search/",t.className=t.className||"BAN",t.copy='© BAN-data.gouv.fr',ol.control.SearchPhoton.call(this,t),this.set("postcode",t.postcode),this.set("citycode",t.citycode),this.set("type",t.type)},ol.ext.inherits(ol.control.SearchBAN,ol.control.SearchPhoton),ol.control.SearchBAN.prototype.getTitle=function(t){return t.properties.label},ol.control.SearchBAN.prototype.select=function(t){var e=t.geometry.coordinates;try{e=ol.proj.transform(t.geometry.coordinates,"EPSG:4326",this.getMap().getView().getProjection())}catch(t){}this.dispatchEvent({type:"select",search:t,coordinate:e})},ol.control.SearchBAN.prototype.requestData=function(t){var e=ol.control.SearchPhoton.prototype.requestData.call(this,t);return e.postcode=this.get("postcode"),e.citycode=this.get("citycode"),e.type=this.get("type"),e},ol.control.SearchDFCI=function(t){t||(t={}),t.className=t.className||"dfci",t.placeholder=t.placeholder||"Code DFCI",ol.control.Search.call(this,t)},ol.ext.inherits(ol.control.SearchDFCI,ol.control.Search),ol.control.SearchDFCI.prototype.autocomplete=function(t){if((t=(t=t.toUpperCase()).replace(/[^0-9,^A-H,^K-N]/g,"")).length<2)return this.setInput(t),[];var e,o=this.getMap().getView().getProjection(),i=[],n=ol.coordinate.fromDFCI(t,o),r=Math.floor(t.length/2)-1,s=ol.coordinate.toDFCI(n,r,o);if(s=s.replace(/[^0-9,^A-H,^K-N]/g,""),!/NaN/.test(s)&&s){if(console.log("ok",s),this.setInput(s+t.substring(s.length,t.length)),i.push({coordinate:ol.coordinate.fromDFCI(s,o),name:s}),5===t.length)for(n=ol.coordinate.fromDFCI(t+0,o),s=ol.coordinate.toDFCI(n,r+1,o).substring(0,5),e=0;e<10;e++)i.push({coordinate:ol.coordinate.fromDFCI(s+e,o),name:s+e});if(2===r)for(e=0;e<6;e++)i.push({coordinate:ol.coordinate.fromDFCI(s+"."+e,o),name:s+"."+e})}return i},ol.control.SearchFeature=function(t){t||(t={}),t.className=t.className||"feature",ol.control.Search.call(this,t),"function"==typeof t.getSearchString&&(this.getSearchString=t.getSearchString),this.set("property",t.property||"name"),this.source_=t.source},ol.ext.inherits(ol.control.SearchFeature,ol.control.Search),ol.control.SearchFeature.prototype.restoreHistory=function(){this.set("history",[])},ol.control.SearchFeature.prototype.saveHistory=function(){try{localStorage.removeItem("ol@search-"+this._classname)}catch(t){console.warn("Failed to access localStorage...")}},ol.control.SearchFeature.prototype.getTitle=function(t){return t.get(this.get("property")||"name")},ol.control.SearchFeature.prototype.getSearchString=function(t){return this.getTitle(t)},ol.control.SearchFeature.prototype.getSource=function(){return this.source_},ol.control.SearchFeature.prototype.setSource=function(t){this.source_=t},ol.control.SearchFeature.prototype.autocomplete=function(t){var e=[];if(this.source_){t=t.replace(/^\*/,"");for(var o,i=new RegExp(t,"i"),n=this.source_.getFeatures(),r=this.get("maxItems"),s=0;o=n[s];s++){var a=this.getSearchString(o);if(void 0!==a&&i.test(a)&&(e.push(o),--r<=0))break}}return e},ol.control.SearchGPS=function(t){t||(t={}),t.className=(t.className||"")+" ol-searchgps",t.placeholder=t.placeholder||"lon,lat",ol.control.Search.call(this,t),this.geolocation=new ol.Geolocation({projection:"EPSG:4326",trackingOptions:{maximumAge:1e4,enableHighAccuracy:!0,timeout:6e5}}),ol.ext.element.create("BUTTON",{className:"ol-geoloc",title:"Locate with GPS",parent:this.element,click:function(){this.geolocation.setTracking(!0)}.bind(this)}),ol.ext.element.createSwitch({html:"decimal",after:"DMS",change:function(t){t.target.checked?this.element.classList.add("ol-dms"):this.element.classList.remove("ol-dms")}.bind(this),parent:this.element}),this._createForm();var e=this.element.querySelector("ul.autocomplete");this.element.appendChild(e)},ol.ext.inherits(ol.control.SearchGPS,ol.control.Search),ol.control.SearchGPS.prototype._createForm=function(){var t=function(t){if(t.target.classList.contains("ol-dms")&&(i.value=(n.value<0?-1:1)*Number(n.value)+Number(r.value)/60+Number(s.value)/3600,i.value=(n.value<0?-1:1)*Math.round(1e7*i.value)/1e7,a.value=(l.value<0?-1:1)*Number(l.value)+Number(c.value)/60+Number(h.value)/3600,a.value=(l.value<0?-1:1)*Math.round(1e7*a.value)/1e7),i.value||a.value?this._input.value=i.value+","+a.value:this._input.value="",!t.target.classList.contains("ol-dms")){var e=ol.coordinate.toStringHDMS([Number(i.value),Number(a.value)]),o=e.replace(/(N|S|E|W)/g,"").split("″");o[1]=o[1].trim().split(" "),n.value=(/W/.test(e)?-1:1)*parseInt(o[1][0]),r.value=parseInt(o[1][1]),s.value=parseInt(o[1][2]),o[0]=o[0].trim().split(" "),l.value=(/W/.test(e)?-1:1)*parseInt(o[0][0]),c.value=parseInt(o[0][1]),h.value=parseInt(o[0][2])}this.search()}.bind(this);function e(e,i){var n=ol.ext.element.create("INPUT",{className:e,type:"number",step:"any",lang:"en",parent:o,on:{"change keyup":t}});return i&&ol.ext.element.create("SPAN",{className:"ol-dms",html:i,parent:o}),n}var o=ol.ext.element.create("DIV",{className:"ol-longitude",parent:this.element});ol.ext.element.create("LABEL",{html:"Longitude",parent:o});var i=e("ol-decimal"),n=e("ol-dms","°"),r=e("ol-dms","'"),s=e("ol-dms",'"');o=ol.ext.element.create("DIV",{className:"ol-latitude",parent:this.element}),ol.ext.element.create("LABEL",{html:"Latitude",parent:o});var a=e("ol-decimal"),l=e("ol-dms","°"),c=e("ol-dms","'"),h=e("ol-dms",'"');this.button&&this.button.addEventListener("click",function(){i.focus()}),this.on("select",function(t){i.value=t.search.gps[0],a.value=t.search.gps[1]}.bind(this)),this.geolocation.on("change",function(){this.geolocation.setTracking(!1);var t=this.geolocation.getPosition();i.value=t[0],a.value=t[1],this._triggerCustomEvent("keyup",i)}.bind(this))},ol.control.SearchGPS.prototype.autocomplete=function(t){var e=[],o=t.split(",");o[0]=Number(o[0]),o[1]=Number(o[1]),(t=ol.coordinate.toStringHDMS(o))&&(t=t.replace(/(°|′|″) /g,"$1"));var i=ol.proj.transform([o[0],o[1]],"EPSG:4326",this.getMap().getView().getProjection());return e.push({gps:o,coordinate:i,name:t}),e},ol.control.SearchGeoportailParcelle=function(t){var e=this;t.type="Commune",t.className=(t.className?t.className:"")+" IGNF-parcelle ol-collapsed-list ol-collapsed-num",t.inputLabel="Commune",t.noCollapse=!0,t.placeholder=t.placeholder||"Choisissez une commune...",ol.control.SearchGeoportail.call(this,t),this.set("copy",null);var o=this.element,i=document.createElement("DIV");o.appendChild(i);var n,r=document.createElement("LABEL");r.innerText="Préfixe",i.appendChild(r),(r=document.createElement("LABEL")).innerText="Section",i.appendChild(r),(r=document.createElement("LABEL")).innerText="Numéro",i.appendChild(r),i.appendChild(document.createElement("BR")),this._inputParcelle={prefix:document.createElement("INPUT"),section:document.createElement("INPUT"),numero:document.createElement("INPUT")},this._inputParcelle.prefix.setAttribute("maxlength",3),this._inputParcelle.section.setAttribute("maxlength",2),this._inputParcelle.numero.setAttribute("maxlength",4);var s=function(){n&&clearTimeout(n),n=setTimeout(function(){e.autocompleteParcelle()},t.typing||0)};for(var a in this._inputParcelle)i.appendChild(this._inputParcelle[a]),this._inputParcelle[a].addEventListener("keyup",s),this._inputParcelle[a].addEventListener("blur",function(){n=setTimeout(function(){o.classList.add("ol-collapsed-num")},200)}),this._inputParcelle[a].addEventListener("focus",function(){clearTimeout(n),o.classList.remove("ol-collapsed-num")});this.activateParcelle(!1);var l=document.createElement("DIV");l.className="autocomplete-parcelle",o.appendChild(l);var c=document.createElement("UL");c.classList.add("autocomplete-parcelle"),l.appendChild(c),(c=document.createElement("UL")).classList.add("autocomplete-page"),l.appendChild(c),this._input.addEventListener("blur",function(){setTimeout(function(){o.classList.add("ol-collapsed-list")},200)}),this._input.addEventListener("focus",function(){o.classList.remove("ol-collapsed-list"),e._listParcelle([]),e._commune&&(e._commune=null,e._input.value="",e.drawList_()),e.activateParcelle(!1)}),this.on("select",this.selectCommune.bind(this)),this.set("pageSize",t.pageSize||5)},ol.ext.inherits(ol.control.SearchGeoportailParcelle,ol.control.SearchGeoportail),ol.control.SearchGeoportailParcelle.prototype.selectCommune=function(t){this._commune=t.search.insee,this._input.value=t.search.insee+" - "+t.search.fulltext,this.activateParcelle(!0),this._inputParcelle.numero.focus(),this.autocompleteParcelle()},ol.control.SearchGeoportailParcelle.prototype.setParcelle=function(t,e){this._inputParcelle.prefix.value=(t.Commune||"")+(t.CommuneAbsorbee||""),this._inputParcelle.section.value=t.Section||"",this._inputParcelle.numero.value=t.Numero||"",e&&this._triggerCustomEvent("keyup",this._inputParcelle.prefix)},ol.control.SearchGeoportailParcelle.prototype.activateParcelle=function(t){for(var e in this._inputParcelle)this._inputParcelle[e].readOnly=!t;t?this._inputParcelle.section.parentElement.classList.add("ol-active"):this._inputParcelle.section.parentElement.classList.remove("ol-active")},ol.control.SearchGeoportailParcelle.prototype.autocompleteParcelle=function(){function t(t,e,o){if(!t)return t;for(o=o||"0";t.length";this.ajax(this.get("url").replace("ols/apis/completion","geoportail/ols"),{xls:o},function(t){for(var o,i=(new DOMParser).parseFromString(t,"text/xml").getElementsByTagName("GeocodedAddress"),n=[],r=0;o=i[r];r++){for(var s,a=(o.getElementsByTagName("gml:pos")[0]||o.getElementsByTagName("pos")[0]).childNodes[0].nodeValue.split(" "),l=o.getElementsByTagName("Place"),c={lon:Number(a[1]),lat:Number(a[0])},h=0;s=l[h];h++)c[s.attributes.type.value]=s.childNodes[0].nodeValue;n.push(c)}e(n)},{dataType:"XML"})},ol.control.SearchGeoportailParcelle.prototype._listParcelle=function(t){var e=this,o=this.element.querySelector("ul.autocomplete-parcelle");o.innerHTML="";var i=this.element.querySelector("ul.autocomplete-page");function n(t){var e,n=o.children,r="ol-list-"+t;for(e=0;e1?"":"none"}i.innerHTML="",this._listParc=[],t.sort(function(t,e){var o=t.INSEE+t.CommuneAbsorbee+t.Section+t.Numero,i=e.INSEE+e.CommuneAbsorbee+e.Section+e.Numero;return o===i?0:o0&&l.classList.add("ol-list-"+Math.floor(a/s)),this._listParc.push(r),l.addEventListener("click",function(t){e._handleParcelle(e._listParc[t.currentTarget.getAttribute("data-search")])}),l.innerHTML=r.INSEE+r.CommuneAbsorbee+r.Section+r.Numero,o.appendChild(l),s>0&&!(a%s)&&((l=document.createElement("LI")).innerText=Math.floor(a/s),l.addEventListener("click",function(t){n(t.currentTarget.innerText)}),i.appendChild(l))}s>0&&n(0)},ol.control.SearchGeoportailParcelle.prototype._handleParcelle=function(t){this.dispatchEvent({type:"parcelle",search:t,coordinate:ol.proj.fromLonLat([t.lon,t.lat],this.getMap().getView().getProjection())})},ol.control.SearchNominatim=function(t){(t=t||{}).className=t.className||"nominatim",t.typing=t.typing||500,t.url=t.url||"https://nominatim.openstreetmap.org/search",t.copy='© OpenStreetMap contributors',ol.control.SearchJSON.call(this,t),this.set("polygon",t.polygon),this.set("viewbox",t.viewbox),this.set("bounded",t.bounded)},ol.ext.inherits(ol.control.SearchNominatim,ol.control.SearchJSON),ol.control.SearchNominatim.prototype.getTitle=function(t){var e=[];t.class&&e.push(t.class),t.type&&e.push(t.type);var o=t.display_name+(e.length?""+e.join(" - ")+"":"");return t.icon&&(o=""+o),o},ol.control.SearchNominatim.prototype.requestData=function(t){var e={format:"json",addressdetails:1,q:t,polygon_geojson:this.get("polygon")?1:0,bounded:this.get("bounded")?1:0,limit:this.get("maxItems")};return this.get("viewbox")&&(e.viewbox=this.get("viewbox")),e},ol.control.SearchNominatim.prototype.select=function(t){var e=[Number(t.lon),Number(t.lat)];try{e=ol.proj.transform(e,"EPSG:4326",this.getMap().getView().getProjection())}catch(t){}this.dispatchEvent({type:"select",search:t,coordinate:e})},ol.control.SearchJSON.prototype.handleResponse=function(t){return t.results||t},ol.control.SearchNominatim.prototype.reverseGeocode=function(t,e){var o=ol.proj.transform(t,this.getMap().getView().getProjection(),"EPSG:4326");this.ajax(this.get("url").replace("search","reverse"),{lon:o[0],lat:o[1],format:"json"},function(t){e?e.call(this,[t]):t&&!t.error&&this._handleSelect(t,!0)}.bind(this))},ol.control.SearchWikipedia=function(t){(t=t||{}).lang=t.lang||"en",t.className=t.className||"ol-search-wikipedia",t.url="https://"+t.lang+".wikipedia.org/w/api.php",t.placeholder=t.placeholder||"search string, File:filename",t.copy='Wikipedia® - CC-By-SA',ol.control.SearchJSON.call(this,t),this.set("lang",t.lang)},ol.ext.inherits(ol.control.SearchWikipedia,ol.control.SearchJSON),ol.control.SearchWikipedia.prototype.getTitle=function(t){return ol.ext.element.create("DIV",{html:t.title,title:t.desc})},ol.control.SearchWikipedia.prototype.setLang=function(t){this.set("lang",t),this.set("url","https://"+t+".wikipedia.org/w/api.php")},ol.control.SearchWikipedia.prototype.requestData=function(t){return{action:"opensearch",search:t,lang:this.get("lang"),format:"json",origin:"*",limit:this.get("maxItems")}},ol.control.SearchWikipedia.prototype.handleResponse=function(t){for(var e=[],o=0;o100));l++);var c=new RegExp(t,"i");for(var h in i)if("geometry"!==h&&c.test(h)){var p=document.createElement("li");p.textContent=h,p.addEventListener("click",function(){e.previousElementSibling.value=this.textContent;var t=document.createEvent("HTMLEvents");t.initEvent("change",!0,!1),e.previousElementSibling.dispatchEvent(t),e.classList.add("ol-hidden")}),e.appendChild(p)}},ol.control.Select.prototype._getLiCondition=function(t){var e=this,o=document.createElement("li"),i=document.createElement("div");i.classList.add("ol-autocomplete"),i.addEventListener("mouseleave",function(){this.querySelector("ul").classList.add("ol-hidden")}),o.appendChild(i);var n=document.createElement("input");n.classList.add("ol-attr"),n.setAttribute("type","search"),n.setAttribute("placeholder",this.get("attrPlaceHolder")),n.addEventListener("keyup",function(){e._autocomplete(this.value,this.nextElementSibling)}),n.addEventListener("focusout",function(){setTimeout(function(){i.querySelector("ul").classList.add("ol-hidden")},300)}),n.addEventListener("click",function(){setTimeout(function(){e._autocomplete(this.value,this.nextElementSibling),this.nextElementSibling.classList.remove("ol-hidden")}.bind(this))}),n.addEventListener("change",function(){e._conditions[t].attr=this.value}),n.value=e._conditions[t].attr,i.appendChild(n);var r=document.createElement("ul");r.classList.add("ol-hidden"),i.appendChild(r);var s=document.createElement("select");for(var a in o.appendChild(s),this.operationsList){var l=document.createElement("option");l.value=a,l.textContent=this.operationsList[a],s.appendChild(l)}s.value=e._conditions[t].op,s.addEventListener("change",function(){e._conditions[t].op=this.value});var c=document.createElement("input");if(c.setAttribute("type","text"),c.setAttribute("placeholder",this.get("valuePlaceHolder")),c.addEventListener("change",function(){e._conditions[t].val=this.value}),c.value=e._conditions[t].val,o.appendChild(c),this._conditions.length>1){var h=document.createElement("div");h.classList.add("ol-delete"),h.addEventListener("click",function(){e.removeCondition(t)}),o.appendChild(h)}return o},ol.control.Select.prototype.removeCondition=function(t){this._conditions.splice(t,1),this._drawlist()},ol.control.Select.prototype.doSelect=function(t){return(t=t||{}).useCase=t.useCase||this._useCase.checked,t.matchAll=t.matchAll||this._all.checked,t.conditions=t.conditions||this._conditions,ol.control.SelectBase.prototype.doSelect.call(this,t)},ol.control.SelectCheck=function(t){t||(t={});var e=t.content=ol.ext.element.create("DIV");t.label&&ol.ext.element.create("LABEL",{html:t.label,parent:e}),this._input=ol.ext.element.create("DIV",{parent:e}),t.className=t.className||"ol-select-check",ol.control.SelectBase.call(this,t),this.set("property",t.property||"name"),this.set("max",t.max||1e4),this.set("defaultLabel",t.defaultLabel),this.set("type",t.type),this._selectAll=t.selectAll,this._onchoice=t.onchoice,t.values?this.setValues({values:t.values,sort:!0}):this.setValues()},ol.ext.inherits(ol.control.SelectCheck,ol.control.SelectBase),ol.control.SelectCheck.prototype.setMap=function(t){ol.control.SelectBase.prototype.setMap.call(this,t),this.setValues()},ol.control.SelectCheck.prototype.doSelect=function(t){console.log("select"),t=t||{};var e=[];return this._checks.forEach(function(t){t.checked&&t.value&&e.push({attr:this.get("property"),op:"=",val:t.value})}.bind(this)),e.length?ol.control.SelectBase.prototype.doSelect.call(this,{features:t.features,conditions:e}):ol.control.SelectBase.prototype.doSelect.call(this,{features:t.features,matchAll:this._selectAll})},ol.control.SelectCheck.prototype.setValues=function(t){var e,o;if((t=t||{}).values)t.values instanceof Array?(o={},t.values.forEach(function(t){o[t]=t})):o=t.values;else{o={};var i=this.get("property");this.getSources().forEach(function(t){for(var e=t.getFeatures(),n=Math.min(e.length,this.get("max")),r=0;r "+t[o]+"
";ol.ext.element.setHTML(this.element,e)}else ol.ext.element.hide(this.element)},ol.control.Status.prototype.setPosition=function(t){this.element.classList.remove("ol-left"),this.element.classList.remove("ol-right"),this.element.classList.remove("ol-bottom"),this.element.classList.remove("ol-center"),/^left$|^right$|^bottom$|^center$/.test(t)&&this.element.classList.add("ol-"+t)},ol.control.Status.prototype.show=function(t){!1===t?ol.ext.element.hide(this.element):ol.ext.element.show(this.element)},ol.control.Status.prototype.hide=function(){ol.ext.element.hide(this.element)},ol.control.Status.prototype.toggle=function(){ol.ext.element.toggle(this.element)},ol.control.Status.prototype.isShown=function(){return"none"===this.element.style.display},ol.control.Storymap=function(t){t.target&&(t.html?t.html instanceof Element&&(t.html=t.html.innerHTML):t.html=t.target.innerHTML,t.target.innerHTML="");var e=ol.ext.element.create("DIV",{className:(t.className||"")+" ol-storymap"+(t.target?"":" ol-unselectable ol-control")});this.content=ol.ext.element.create("DIV",{parent:e}),ol.control.Control.call(this,{element:e,target:t.target}),ol.ext.element.scrollDiv(this.content,{vertical:!0,mousewheel:!0,minibar:t.minibar}),this.setStory(t.html)},ol.ext.inherits(ol.control.Storymap,ol.control.Control),ol.control.Storymap.prototype.setChapter=function(t){for(var e,o=this.content.querySelectorAll(".chapter"),i=0;e=o[i];i++)e.getAttribute("name")===t&&(this.content.scrollTop=e.offsetTop-30)},ol.control.Storymap.prototype.setStory=function(t){t instanceof Element?(this.content.innerHTML="",this.content.appendChild(t)):this.content.innerHTML=t,this.content.querySelectorAll(".chapter").forEach(function(t){t.addEventListener("click",function(e){t.classList.contains("ol-select")?"IMG"===e.target.tagName&&e.target.dataset.title&&this.dispatchEvent({coordinate:this.getMap()?this.getMap().getCoordinateFromPixel([e.layerX,e.layerY]):null,type:"clickimage",img:e.target,title:e.target.dataset.title,element:t,name:t.getAttribute("name"),originalEvent:e}):(this.content.scrollTop=t.offsetTop-30,e.preventDefault())}.bind(this))}.bind(this));var e=this.content.querySelectorAll(".ol-scroll-next");e.forEach(function(t){t.addEventListener("click",function(e){if(t.parentElement.classList.contains("ol-select")){for(var o,i=this.content.querySelectorAll(".chapter"),n=t.offsetTop,r=0;o=i[r];r++)if(o.offsetTop>n){n=o.offsetTop;break}this.content.scrollTop=n-30,e.stopPropagation(),e.preventDefault()}}.bind(this))}.bind(this)),(e=this.content.querySelectorAll(".ol-scroll-top")).forEach(function(t){t.addEventListener("click",function(t){this.content.scrollTop=0,t.stopPropagation(),t.preventDefault()}.bind(this))}.bind(this));var o=function(t){var e=[parseFloat(t.getAttribute("data-lon")),parseFloat(t.getAttribute("data-lat"))],o=ol.proj.fromLonLat(e,this.getMap().getView().getProjection()),i=parseFloat(t.getAttribute("data-zoom"));return{type:"scrollto",element:t,name:t.getAttribute("name"),coordinate:o,lon:e,zoom:i}}.bind(this),i=this.content.querySelectorAll(".chapter")[0];setTimeout(function(){i.classList.add("ol-select"),this.dispatchEvent(o(i))}.bind(this)),this.content.addEventListener("scroll",function(){var t,e=this.content.querySelectorAll(".chapter"),n=ol.ext.element.getStyle(this.content,"height");if(this.content.scrollTop)for(var r,s=0;r=e[s];s++){if(r.offsetTop-this.content.scrollTop>n/3)break;t=r}else t=e[0];if(t&&t!==i){i&&i.classList.remove("ol-select"),(i=t).classList.add("ol-select");var a=o(i),l=this.getMap().getView();switch(l.cancelAnimations(),i.getAttribute("data-animation")){case"flyto":l.flyTo({center:a.coordinate,zoomAt:Math.min(l.getZoom(),a.zoom)-1,zoom:a.zoom})}this.dispatchEvent(a)}}.bind(this))},ol.control.Swipe=function(t){t=t||{};var e=document.createElement("button"),o=document.createElement("div");o.className=(t.className||"ol-swipe")+" ol-unselectable ol-control",o.appendChild(e),o.addEventListener("mousedown",this.move.bind(this)),o.addEventListener("touchstart",this.move.bind(this)),ol.control.Control.call(this,{element:o}),this.precomposeRight_=this.precomposeRight.bind(this),this.precomposeLeft_=this.precomposeLeft.bind(this),this.postcompose_=this.postcompose.bind(this),this.layers=[],t.layers&&this.addLayer(t.layers,!1),t.rightLayers&&this.addLayer(t.rightLayers,!0),this.on("propertychange",function(t){if(this.getMap())try{this.getMap().renderSync()}catch(t){}"horizontal"===this.get("orientation")?(this.element.style.top=100*this.get("position")+"%",this.element.style.left=""):("vertical"!==this.get("orientation")&&this.set("orientation","vertical"),this.element.style.left=100*this.get("position")+"%",this.element.style.top=""),"orientation"===t.key&&(this.element.classList.remove("horizontal","vertical"),this.element.classList.add(this.get("orientation"))),this.isMoving||this.layers.forEach(function(t){t.layer.getImageRatio&&t.layer.changed()})}.bind(this)),this.set("position",t.position||.5),this.set("orientation",t.orientation||"vertical")},ol.ext.inherits(ol.control.Swipe,ol.control.Control),ol.control.Swipe.prototype.setMap=function(t){var e,o;if(this.getMap()){for(e=0;e=0&&this.getMap()&&(this.layers[o].right?t[e].un(["precompose","prerender"],this.precomposeRight_):t[e].un(["precompose","prerender"],this.precomposeLeft_),t[e].un(["postcompose","postrender"],this.postcompose_),this.layers.splice(o,1))}if(this.getMap())try{this.getMap().renderSync()}catch(t){}},ol.control.Swipe.prototype.getRectangle=function(){var t;return"vertical"===this.get("orientation")?[0,0,(t=this.getMap().getSize())[0]*this.get("position"),t[1]]:[0,0,(t=this.getMap().getSize())[0],t[1]*this.get("position")]},ol.control.Swipe.prototype.move=function(t){var e,o=this;switch(this._movefn||(this._movefn=this.move.bind(this)),t.type){case"touchcancel":case"touchend":case"mouseup":o.isMoving=!1,["mouseup","mousemove","touchend","touchcancel","touchmove"].forEach(function(t){document.removeEventListener(t,o._movefn)}),this.layers.forEach(function(t){t.layer.getImageRatio&&t.layer.changed()});break;case"mousedown":case"touchstart":o.isMoving=!0,["mouseup","mousemove","touchend","touchcancel","touchmove"].forEach(function(t){document.addEventListener(t,o._movefn)});case"mousemove":case"touchmove":if(o.isMoving)if("vertical"===o.get("orientation")){var i=t.pageX||t.touches&&t.touches.length&&t.touches[0].pageX||t.changedTouches&&t.changedTouches.length&&t.changedTouches[0].pageX;if(!i)break;i-=o.getMap().getTargetElement().getBoundingClientRect().left+window.pageXOffset-document.documentElement.clientLeft;var n=(e=o.getMap().getSize()[0])-Math.min(Math.max(0,e-i),e);e=n/e,o.set("position",e),o.dispatchEvent({type:"moving",size:[n,o.getMap().getSize()[1]],position:[e,0]})}else{var r=t.pageY||t.touches&&t.touches.length&&t.touches[0].pageY||t.changedTouches&&t.changedTouches.length&&t.changedTouches[0].pageY;if(!r)break;r-=o.getMap().getTargetElement().getBoundingClientRect().top+window.pageYOffset-document.documentElement.clientTop;var s=(e=o.getMap().getSize()[1])-Math.min(Math.max(0,e-r),e);e=s/e,o.set("position",e),o.dispatchEvent({type:"moving",size:[o.getMap().getSize()[0],s],position:[0,e]})}}},ol.control.Swipe.prototype._transformPt=function(t,e){var o=t.inversePixelTransform,i=e[0],n=e[1];return e[0]=o[0]*i+o[2]*n+o[4],e[1]=o[1]*i+o[3]*n+o[5],e},ol.control.Swipe.prototype._drawRect=function(t,e){var o=t.inversePixelTransform;if(o){var i=[[e[0][0],e[0][1]],[e[0][0],e[1][1]],[e[1][0],e[1][1]],[e[1][0],e[0][1]],[e[0][0],e[0][1]]];if(t.context.save(),t.target.getImageRatio){var n=-Math.atan2(t.frameState.pixelToCoordinateTransform[1],t.frameState.pixelToCoordinateTransform[0]);t.context.translate(t.frameState.size[0]/2,t.frameState.size[1]/2),t.context.rotate(n),t.context.translate(-t.frameState.size[0]/2,-t.frameState.size[1]/2)}i.forEach(function(e,i){e=[e[0]*o[0]-e[1]*o[1]+o[4],-e[0]*o[2]+e[1]*o[3]+o[5]],i?t.context.lineTo(e[0],e[1]):t.context.moveTo(e[0],e[1])}),t.context.restore()}else{var r=t.frameState.pixelRatio;t.context.rect(e[0][0]*r,e[0][1]*r,e[1][0]*r,e[1][1]*r)}},ol.control.Swipe.prototype.precomposeLeft=function(t){var e=t.context;if(e instanceof WebGLRenderingContext){if("prerender"===t.type){e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.enable(e.SCISSOR_TEST);var o=this.getMap().getSize(),i=this._transformPt(t,[0,o[1]]),n=this._transformPt(t,[o[0],0]),r=n[0]-i[0],s=n[1]-i[1];"vertical"===this.get("orientation")?r=Math.round(r*this.get("position")):(s=Math.round(s*this.get("position")),i[1]+=o[1]-s),e.scissor(i[0],i[1],r,s)}}else{var a=t.frameState.size;e.save(),e.beginPath();var l=[[0,0],[a[0],a[1]]];"vertical"===this.get("orientation")?l[1]=[.5*a[0]+this.getMap().getSize()[0]*(this.get("position")-.5),a[1]]:l[1]=[a[0],.5*a[1]+this.getMap().getSize()[1]*(this.get("position")-.5)],this._drawRect(t,l),e.clip()}},ol.control.Swipe.prototype.precomposeRight=function(t){var e=t.context;if(e instanceof WebGLRenderingContext){if("prerender"===t.type){e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.enable(e.SCISSOR_TEST);var o=this.getMap().getSize(),i=this._transformPt(t,[0,o[1]]),n=this._transformPt(t,[o[0],0]),r=n[0]-i[0],s=n[1]-i[1];"vertical"===this.get("orientation")?(r=Math.round(r*(1-this.get("position"))),i[0]+=o[0]-r):s=Math.round(s*(1-this.get("position"))),e.scissor(i[0],i[1],r,s)}}else{var a=t.frameState.size;e.save(),e.beginPath();var l=[[0,0],[a[0],a[1]]];"vertical"===this.get("orientation")?l[0]=[.5*a[0]+this.getMap().getSize()[0]*(this.get("position")-.5),0]:l[0]=[0,.5*a[1]+this.getMap().getSize()[1]*(this.get("position")-.5)],this._drawRect(t,l),e.clip()}},ol.control.Swipe.prototype.postcompose=function(t){if(t.context instanceof WebGLRenderingContext){if("postrender"===t.type){var e=t.context;e.disable(e.SCISSOR_TEST)}}else t.target.getClassName&&"ol-layer"!==t.target.getClassName()&&t.target.get("declutter")?setTimeout(function(){t.context.restore()},0):t.context.restore()},ol.control.SwipeMap=function(t){t=t||{};var e=document.createElement("button"),o=document.createElement("div");o.className=(t.className||"ol-swipe")+" ol-unselectable ol-control",o.appendChild(e),o.addEventListener("mousedown",this.move.bind(this)),o.addEventListener("touchstart",this.move.bind(this)),ol.control.Control.call(this,{element:o}),this.on("propertychange",function(t){"horizontal"===this.get("orientation")?(this.element.style.top=100*this.get("position")+"%",this.element.style.left=""):("vertical"!==this.get("orientation")&&this.set("orientation","vertical"),this.element.style.left=100*this.get("position")+"%",this.element.style.top=""),"orientation"===t.key&&(this.element.classList.remove("horizontal","vertical"),this.element.classList.add(this.get("orientation"))),this._clip()}.bind(this)),this.on("change:active",this._clip.bind(this)),this.set("position",t.position||.5),this.set("orientation",t.orientation||"vertical"),this.set("right",t.right)},ol.ext.inherits(ol.control.SwipeMap,ol.control.Control),ol.control.SwipeMap.prototype.setMap=function(t){this.getMap()&&(this._listener&&ol.Observable.unByKey(this._listener),this.getMap().getViewport().querySelector(".ol-layers").style.clip="");ol.control.Control.prototype.setMap.call(this,t),t&&(this._listener=t.on("change:size",this._clip.bind(this)))},ol.control.SwipeMap.prototype._clip=function(){if(this.getMap()){var t=this.getMap().getViewport().querySelector(".ol-layers"),e=this.getRectangle();t.style.clip="rect("+e[1]+"px,"+e[2]+"px,"+e[3]+"px,"+e[0]+"px)"}},ol.control.SwipeMap.prototype.getRectangle=function(){var t=this.getMap().getSize();return"vertical"===this.get("orientation")?this.get("right")?[t[0]*this.get("position"),0,t[0],t[1]]:[0,0,t[0]*this.get("position"),t[1]]:this.get("right")?[0,t[1]*this.get("position"),t[0],t[1]]:[0,0,t[0],t[1]*this.get("position")]},ol.control.SwipeMap.prototype.move=function(t){var e,o=this;switch(this._movefn||(this._movefn=this.move.bind(this)),t.type){case"touchcancel":case"touchend":case"mouseup":o.isMoving=!1,["mouseup","mousemove","touchend","touchcancel","touchmove"].forEach(function(t){document.removeEventListener(t,o._movefn)});break;case"mousedown":case"touchstart":o.isMoving=!0,["mouseup","mousemove","touchend","touchcancel","touchmove"].forEach(function(t){document.addEventListener(t,o._movefn)});case"mousemove":case"touchmove":if(o.isMoving)if("vertical"===o.get("orientation")){var i=t.pageX||t.touches&&t.touches.length&&t.touches[0].pageX||t.changedTouches&&t.changedTouches.length&&t.changedTouches[0].pageX;if(!i)break;i-=o.getMap().getTargetElement().getBoundingClientRect().left+window.pageXOffset-document.documentElement.clientLeft;var n=(e=o.getMap().getSize()[0])-Math.min(Math.max(0,e-i),e);e=n/e,o.set("position",e),o.dispatchEvent({type:"moving",size:[n,o.getMap().getSize()[1]],position:[e,0]})}else{var r=t.pageY||t.touches&&t.touches.length&&t.touches[0].pageY||t.changedTouches&&t.changedTouches.length&&t.changedTouches[0].pageY;if(!r)break;r-=o.getMap().getTargetElement().getBoundingClientRect().top+window.pageYOffset-document.documentElement.clientTop;var s=(e=o.getMap().getSize()[1])-Math.min(Math.max(0,e-r),e);e=s/e,o.set("position",e),o.dispatchEvent({type:"moving",size:[o.getMap().getSize()[0],s],position:[0,e]})}}},ol.control.Target=function(t){t=t||{},this.style=t.style||[new ol.style.Style({image:new ol.style.RegularShape({points:4,radius:11,radius1:0,radius2:0,snapToPixel:!0,stroke:new ol.style.Stroke({color:"#fff",width:3})})}),new ol.style.Style({image:new ol.style.RegularShape({points:4,radius:11,radius1:0,radius2:0,snapToPixel:!0,stroke:new ol.style.Stroke({color:"#000",width:1})})})],this.style instanceof Array||(this.style=[this.style]),this.composite=t.composite||"";var e=document.createElement("div");e.className="ol-target ol-unselectable ol-control",ol.control.CanvasBase.call(this,{element:e,target:t.target}),this.setVisible(!1!==t.visible)},ol.ext.inherits(ol.control.Target,ol.control.CanvasBase),ol.control.Target.prototype.setVisible=function(t){if(this.set("visible",t),this.getMap())try{this.getMap().renderSync()}catch(t){}},ol.control.Target.prototype.getVisible=function(){return this.get("visible")},ol.control.Target.prototype._draw=function(t){var e=this.getContext(t);if(e&&this.getMap()&&this.getVisible()){var o=t.frameState.pixelRatio;e.save(),e.scale(o,o);var i=e.canvas.width/(2*o),n=e.canvas.height/(2*o),r=new ol.geom.Point(this.getMap().getCoordinateFromPixel([i,n]));this.composite&&(e.globalCompositeOperation=this.composite);for(var s=0;s=1?t++:t=Math.min(1,t+.1),t=Math.round(100*t)/100,this.refresh(t)}.bind(this)}),this.addButton({className:"ol-zoom-out",handleClick:function(){var t=this.get("zoom");t>1?t--:t-=.1,t=Math.round(100*t)/100,this.refresh(t)}.bind(this)})),this._intervalDiv=ol.ext.element.create("DIV",{className:"ol-center-date",parent:this.element}),this.element.addEventListener("mouseover",function(){this._select&&this._select.elt.classList.remove("ol-select")}.bind(this));var o=null;this._scrollDiv.addEventListener("scroll",function(){this._setScrollLeft(),o&&(clearTimeout(o),o=null),o=setTimeout(function(){this.dispatchEvent({type:"scroll",date:this.getDate(),dateStart:this.getDate("start"),dateEnd:this.getDate("end")})}.bind(this),t.scrollTimeout||15)}.bind(this)),ol.ext.element.scrollDiv(this._scrollDiv,{onmove:function(t){this._moving=t}.bind(this)}),this._tline=[],this._scrollLeft=0,this.set("maxWidth",t.maxWidth||2e3),this.set("minDate",t.minDate||1/0),this.set("maxDate",t.maxDate||-1/0),this.set("graduation",t.graduation),this.set("minZoom",t.minZoom||.2),this.set("maxZoom",t.maxZoom||4),this.setInterval(t.interval),t.getHTML&&(this._getHTML=t.getHTML),t.getFeatureDate&&(this._getFeatureDate=t.getFeatureDate),t.endFeatureDate&&(this._endFeatureDate=t.endFeatureDate),this.setFeatures(t.features||t.source,t.zoom)},ol.ext.inherits(ol.control.Timeline,ol.control.Control),ol.control.Timeline.prototype.setMap=function(t){ol.control.Control.prototype.setMap.call(this,t),this.refresh(this.get("zoom")||1,!0)},ol.control.Timeline.prototype.addButton=function(t){this.element.classList.add("ol-hasbutton"),ol.ext.element.create("BUTTON",{className:t.className||void 0,title:t.title,html:t.html,click:t.handleClick,parent:this._buttons})},ol.control.Timeline.prototype.setInterval=function(t){"string"==typeof t&&(t=/s$/.test(t)?1e3*parseFloat(t):/mn$/.test(t)?1e3*parseFloat(t)*60:/h$/.test(t)?1e3*parseFloat(t)*3600:/d$/.test(t)?1e3*parseFloat(t)*3600*24:/y$/.test(t)?1e3*parseFloat(t)*3600*24*365:0),this.set("interval",t||0),t?this.element.classList.add("ol-interval"):this.element.classList.remove("ol-interval"),this.refresh(this.get("zoom"))},ol.control.Timeline.prototype._getHTML=function(t){return t.get("name")||""},ol.control.Timeline.prototype._getFeatureDate=function(t){return t&&t.get?t.get("date"):null},ol.control.Timeline.prototype._endFeatureDate=function(){},ol.control.Timeline.prototype.isCollapsed=function(){return this.element.classList.contains("ol-collapsed")},ol.control.Timeline.prototype.collapse=function(t){t?this.element.classList.add("ol-collapsed"):this.element.classList.remove("ol-collapsed"),this.dispatchEvent({type:"collapse",collapsed:this.isCollapsed()})},ol.control.Timeline.prototype.toggle=function(){this.element.classList.toggle("ol-collapsed"),this.dispatchEvent({type:"collapse",collapsed:this.isCollapsed()})},ol.control.Timeline.prototype.setFeatures=function(t,e){this._features=this._source=null,t instanceof ol.source.Vector?this._source=t:t instanceof Array?this._features=t:this._features=[],this.refresh(e)},ol.control.Timeline.prototype.getFeatures=function(){return this._features||this._source.getFeatures()},ol.control.Timeline.prototype.refresh=function(t,e){if(this.getMap()){t||(t=this.get("zoom")),t=Math.min(this.get("maxZoom"),Math.max(this.get("minZoom"),t||1)),this.set("zoom",t),this._scrollDiv.innerHTML="";var o,i,n=this.getFeatures(),r=this._tline=[];n.forEach(function(t){(o=this._getFeatureDate(t))&&(o instanceof Date||(o=new Date(o)),this._endFeatureDate&&((i=this._endFeatureDate(t))instanceof Date||(i=new Date(i))),isNaN(o)||r.push({date:o,end:isNaN(i)?null:i,feature:t}))}.bind(this)),r.sort(function(t,e){return t.dateh?h/c:1)*t;c=(l-(a=this._minDate=this._minDate-10/p))*p,ol.ext.element.setStyle(s,{width:c,maxWidth:"unset"}),this._drawTime(s,a,l,p),this.get("interval")?ol.ext.element.setStyle(this._intervalDiv,{width:this.get("interval")*p}):ol.ext.element.setStyle(this._intervalDiv,{width:""});var u=[],d=ol.ext.element.getStyle(this._scrollDiv,"lineHeight"),g=ol.ext.element.create("DIV",{className:"ol-features",parent:s});r.forEach(function(t){for(var e=t.date,o=t.elt=ol.ext.element.create("DIV",{className:"ol-feature",style:{left:Math.round((e-a)*p)},html:this._getHTML(t.feature),parent:g}),i=o.querySelectorAll("img"),n=0;ns);r++);u[r]=l+ol.ext.element.getStyle(o,"width"),ol.ext.element.setStyle(o,{top:r*d})}.bind(this)),this._nbline=u.length,e&&this.setDate(this._minDate,{anim:!1,position:"start"}),this.dispatchEvent({type:"scroll",date:this.getDate(),dateStart:this.getDate("start"),dateEnd:this.getDate("end")})}},ol.control.Timeline.prototype._getOffsetFromDate=function(t){return(t-this._minDate)*this._scale},ol.control.Timeline.prototype._getDateFromOffset=function(t){return t/this._scale+this._minDate},ol.control.Timeline.prototype._setScrollLeft=function(t){this._scrollLeft=t,void 0!==t&&(this._scrollDiv.scrollLeft=t)},ol.control.Timeline.prototype._getScrollLeft=function(){return void 0===this._scrollLeft?this._scrollDiv.scrollLeft:this._scrollLeft},ol.control.Timeline.prototype._drawTime=function(t,e,o,i){var n,r,s,a,l=ol.ext.element.create("DIV",{className:"ol-times",parent:t}),c=ol.ext.element.getStyle(l,"left"),h=ol.ext.element.getStyle(l,"height"),p=new Date(this._minDate).getFullYear();r=(new Date(0).setFullYear(String(p))-new Date(0).setFullYear(String(p-1)))*i;for(var u=Math.round(2*h/r)+1;!((n=new Date(0).setFullYear(p))>this._maxDate);)ol.ext.element.create("DIV",{className:"ol-time ol-year",style:{left:this._getOffsetFromDate(n)-c},html:p,parent:l}),p+=u;if(/day|month/.test(this.get("graduation"))&&(r=(new Date(0,0,1).setFullYear(String(p))-new Date(0,0,1).setFullYear(String(p-1)))*i,(a=Math.max(1,Math.round(12/Math.round(r/h/2))))<12))for(p=new Date(this._minDate).getFullYear(),s=a+1;(n=new Date(0,0,1)).setFullYear(p),n.setMonth(s-1),!(n>this._maxDate);)ol.ext.element.create("DIV",{className:"ol-time ol-month",style:{left:this._getOffsetFromDate(n)-c},html:n.toLocaleDateString(void 0,{month:"short"}),parent:l}),(s+=a)>12&&(p++,s=a+1);if("day"===this.get("graduation")){r=(new Date(0,1,1)-new Date(0,0,1))*i;var d=Math.max(1,Math.round(31/Math.round(r/h/2)));if(d<31){p=new Date(this._minDate).getFullYear(),s=0;for(var g=d;;)if((n=new Date(0,0,1)).setFullYear(p),n.setMonth(s),n.setDate(g),isNaN(n))++s>12&&(s=1,p++),g=d;else{if(n>this._maxDate)break;if(g>1){var m=this._getOffsetFromDate(n);this._getOffsetFromDate(new Date(p,s+1,1))-m>h&&ol.ext.element.create("DIV",{className:"ol-time ol-day",style:{left:m-c},html:g,parent:l})}p=n.getFullYear(),s=n.getMonth(),(g=n.getDate()+d)>new Date(p,s+1,0).getDate()&&(s++,g=d)}}}},ol.control.Timeline.prototype.setDate=function(t,e){var o;if(e=e||{},t instanceof Date?o=t:(this.getFeatures().indexOf(t)>=0&&(o=this._getFeatureDate(t)),!o||o instanceof Date||(o=new Date(o)),o&&!isNaN(o)||(o=new Date(String(t)))),!isNaN(o)){!1===e.anim&&this._scrollDiv.classList.add("ol-move");var i=this._getOffsetFromDate(o);if("start"===e.position?i+=ol.ext.element.outerWidth(this._scrollDiv)/2-ol.ext.element.getStyle(this._scrollDiv,"marginLeft")/2:"end"===e.position&&(i-=ol.ext.element.outerWidth(this._scrollDiv)/2-ol.ext.element.getStyle(this._scrollDiv,"marginLeft")/2),this._setScrollLeft(i),!1===e.anim&&this._scrollDiv.classList.remove("ol-move"),t)for(var n,r=0;n=this._tline[r];r++)n.feature===t?(n.elt.classList.add("ol-select"),this._select=n):n.elt.classList.remove("ol-select")}},ol.control.Timeline.prototype.roundDate=function(t,e){switch(e){case"mn":return new Date(this._roundTo(t,6e4));case"hour":return new Date(this._roundTo(t,36e5));case"day":return new Date(this._roundTo(t,864e5));case"month":return(t=new Date(this._roundTo(t,864e5))).getDate()>15&&(t=new Date(t.setMonth(t.getMonth()+1))),t=t.setDate(1),new Date(t);default:return new Date(t)}},ol.control.Timeline.prototype.getDate=function(t,e){var o;switch(e||(e=t),t){case"start":o=this.get("interval")?-ol.ext.element.getStyle(this._intervalDiv,"width")/2+ol.ext.element.getStyle(this._scrollDiv,"marginLeft")/2:-ol.ext.element.outerWidth(this._scrollDiv)/2+ol.ext.element.getStyle(this._scrollDiv,"marginLeft")/2;break;case"end":o=this.get("interval")?ol.ext.element.getStyle(this._intervalDiv,"width")/2-ol.ext.element.getStyle(this._scrollDiv,"marginLeft")/2:ol.ext.element.outerWidth(this._scrollDiv)/2-ol.ext.element.getStyle(this._scrollDiv,"marginLeft")/2;break;default:o=0}var i=this._getDateFromOffset(this._getScrollLeft()+o);return i=this.roundDate(i,e),new Date(i)},ol.control.Timeline.prototype._roundTo=function(t,e){return Math.round(t/e)*e},ol.control.Timeline.prototype.getStartDate=function(){return new Date(this.get("minDate"))},ol.control.Timeline.prototype.getEndDate=function(){return new Date(this.get("maxDate"))},ol.control.VideoRecorder=function(t){t||(t={});var e=ol.ext.element.create("DIV",{className:(t.className||"ol-videorec")+" ol-unselectable ol-control"});ol.ext.element.create("BUTTON",{type:"button",className:"ol-start",title:"start",click:function(){this.start()}.bind(this),parent:e}),ol.ext.element.create("BUTTON",{type:"button",className:"ol-stop",title:"stop",click:function(){this.stop()}.bind(this),parent:e}),ol.ext.element.create("BUTTON",{type:"button",className:"ol-pause",title:"pause",click:function(){this.pause()}.bind(this),parent:e}),ol.ext.element.create("BUTTON",{type:"button",className:"ol-resume",title:"resume",click:function(){this.resume()}.bind(this),parent:e}),ol.control.Control.call(this,{element:e,target:t.target}),this.set("framerate",30),this.set("videoBitsPerSecond",5e6),"DIALOG"===t.videoTarget?(this._dialog=new ol.control.Dialog({className:"ol-fullscreen-dialog",target:document.body,closeBox:!0}),this._videoTarget=this._dialog.getContentElement()):this._videoTarget=t.videoTarget,this._printCtrl=new ol.control.Print({target:ol.ext.element.create("DIV")})},ol.ext.inherits(ol.control.VideoRecorder,ol.control.Control),ol.control.VideoRecorder.prototype.setMap=function(t){this.getMap()&&(this.getMap().removeControl(this._printCtrl),this._dialog&&this.getMap().removeControl(this._dialog)),ol.control.Control.prototype.setMap.call(this,t),this.getMap()&&(this.getMap().addControl(this._printCtrl),this._dialog&&this.getMap().addControl(this._dialog))},ol.control.VideoRecorder.prototype.start=function(){var t=this._printCtrl,e=!1;function o(i){e||t.fastPrint({canvas:i},o)}t.fastPrint({},function(t){var i;try{i=t.captureStream(this.get("framerate")||30)}catch(t){return void this.dispatchEvent({type:"error",error:t})}this._mediaRecorder=new MediaRecorder(i,{videoBitsPerSecond:this.get("videoBitsPerSecond")||5e6});var n=[];this._mediaRecorder.ondataavailable=function(t){n.push(t.data)},this._mediaRecorder.onstop=function(){e=!0;var t,o=new Blob(n,{type:"video/mp4"});(n=[],this._videoTarget instanceof Element)?("VIDEO"===this._videoTarget.tagName?t=this._videoTarget:(t=this._videoTarget.querySelector("video"))||(t=ol.ext.element.create("VIDEO",{controls:"",parent:this._videoTarget})),this._dialog&&this._dialog.show(),t.src=URL.createObjectURL(o),this.dispatchEvent({type:"stop",videoURL:t.src})):this.dispatchEvent({type:"stop",videoURL:URL.createObjectURL(o)})}.bind(this),this._mediaRecorder.onpause=function(){e=!0,this.dispatchEvent({type:"pause"})}.bind(this),this._mediaRecorder.onresume=function(){e=!1,o(t),this.dispatchEvent({type:"resume"})}.bind(this),this._mediaRecorder.onerror=function(t){this.dispatchEvent({type:"error",error:t})}.bind(this),e=!1,o(t),this._mediaRecorder.start(),this.dispatchEvent({type:"start",canvas:t}),this.element.setAttribute("data-state","rec")}.bind(this))},ol.control.VideoRecorder.prototype.stop=function(){this._mediaRecorder&&(this._mediaRecorder.stop(),this._mediaRecorder=null,this.element.setAttribute("data-state","inactive"))},ol.control.VideoRecorder.prototype.pause=function(){this._mediaRecorder&&(this._mediaRecorder.pause(),this.element.setAttribute("data-state","pause"))},ol.control.VideoRecorder.prototype.resume=function(){this._mediaRecorder&&(this._mediaRecorder.resume(),this.element.setAttribute("data-state","rec"))},ol.control.WMSCapabilities=function(t){t=t||{};var e=Object.assign({},t||{});this._proxy=t.proxy,e.target===document.body&&delete e.target,e.target?(e.className=((e.className||"")+" ol-wmscapabilities ol-hidden").trim(),delete e.target):(e.className=((e.className||"")+" ol-wmscapabilities").trim(),e.handleClick=function(){this.showDialog()}.bind(this)),ol.control.Button.call(this,e),this.set("srs",t.srs||[]),this.set("cors",t.cors),this.set("trace",t.trace),this.set("title",t.title),this.set("loadLabel",t.loadLabel),this.set("optional",t.optional),this.createDialog(t),this._elements.formVersion.value="1.0.0";var o=this._getParser();this._ajax=new ol.ext.Ajax({dataType:"text",auth:t.authentication}),this._ajax.on("success",function(t){var e;try{e=o.read(t.response)}catch(t){this.showError({type:"load",error:t})}e&&(e.Capability.Layer.Layer?this.showCapabilities(e):this.showError({type:"noLayer"})),this.dispatchEvent({type:"capabilities",capabilities:e}),"function"==typeof t.options.callback&&t.options.callback(e)}.bind(this)),this._ajax.on("error",function(t){this.showError({type:"load",error:t}),this.dispatchEvent({type:"capabilities"}),t.options.callback}.bind(this)),this._ajax.on("loadstart",function(){this._elements.element.classList.add("ol-searching")}.bind(this)),this._ajax.on("loadend",function(){this._elements.element.classList.remove("ol-searching")}.bind(this)),t.onselect&&this.on("load",function(e){t.onselect(e.layer,e.options)})},ol.ext.inherits(ol.control.WMSCapabilities,ol.control.Button),ol.control.WMSCapabilities.prototype._getParser=function(){return new ol.format.WMSCapabilities},ol.control.WMSCapabilities.prototype.error={load:"Can't retrieve service capabilities, try to add it manually...",badUrl:"The input value is not a valid url...",TileMatrix:"No TileMatrixSet supported...",noLayer:"No layer available for this service...",srs:"The service projection looks different from that of your map, it may not display correctly..."},ol.control.WMSCapabilities.prototype.labels={formTitle:"Title:",formLayer:"Layers:",formMap:"Map:",formStyle:"Style:",formFormat:"Format:",formMinZoom:"Min zoom level:",formMaxZoom:"Max zoom level:",formExtent:"Extent:",mapExtent:"use map extent...",formProjection:"Projection:",formCrossOrigin:"CrossOrigin:",formVersion:"Version:",formAttribution:"Attribution:"},ol.control.WMSCapabilities.prototype.createDialog=function(t){var e=t.target;e&&e!==document.body||(this._dialog=new ol.control.Dialog({className:"ol-wmscapabilities",closeBox:!0,closeOnSubmit:!1,target:t.target}),this._dialog.on("button",function(t){"submit"===t.button&&this.getCapabilities(t.inputs.url.value)}.bind(this)),e=null);var o=ol.ext.element.create("DIV",{className:("ol-wmscapabilities "+(t.className||"")).trim(),parent:e});this._elements={element:e||o};var i=ol.ext.element.create("DIV",{className:"ol-url",parent:o}),n=this._elements.input=ol.ext.element.create("INPUT",{className:"url",type:"text",tabIndex:1,placeholder:t.placeholder||"service url...",autocorrect:"off",autocapitalize:"off",parent:i});if(n.addEventListener("keyup",function(e){13===e.keyCode&&this.getCapabilities(n.value,t)}.bind(this)),t.services){var r=ol.ext.element.create("SELECT",{className:"url",on:{change:function(e){var o=e.target.options[e.target.selectedIndex].value;this.getCapabilities(o,t),e.target.selectedIndex=0}.bind(this)},parent:i});for(var s in ol.ext.element.create("OPTION",{html:" ",parent:r}),t.services)ol.ext.element.create("OPTION",{html:s,value:t.services[s],parent:r})}ol.ext.element.create("BUTTON",{click:function(){this.getCapabilities(n.value,t)}.bind(this),html:t.searchLabel||"search",parent:i}),this._elements.error=ol.ext.element.create("DIV",{className:"ol-error",parent:i});var a=this._elements.result=ol.ext.element.create("DIV",{className:"ol-result",parent:o}),l=ol.ext.element.create("DIV",{className:"ol-preview",html:t.previewLabel||"preview",parent:a});this._elements.preview=ol.ext.element.create("IMG",{parent:l}),this._img=new Image,this._img.crossOrigin="Anonymous",this._img.addEventListener("error",function(){l.className="ol-preview tainted",this._elements.formCrossOrigin.checked=!1}.bind(this)),this._img.addEventListener("load",function(){l.className="ol-preview ok",this._elements.formCrossOrigin.checked=!0}.bind(this)),this._elements.select=ol.ext.element.create("DIV",{className:"ol-select-list",tabIndex:2,parent:a}),this._elements.data=ol.ext.element.create("DIV",{className:"ol-data",parent:a}),this._elements.buttons=ol.ext.element.create("DIV",{className:"ol-buttons",parent:a}),this._elements.legend=ol.ext.element.create("IMG",{className:"ol-legend",parent:a});var c=this._elements.form=ol.ext.element.create("UL",{className:"ol-wmsform",parent:o}),h=function(t,e,o){var i=ol.ext.element.create("LI",{parent:c});if(ol.ext.element.create("LABEL",{html:this.labels[t],parent:i}),"boolean"==typeof e)this._elements[t]=ol.ext.element.create("INPUT",{type:"checkbox",checked:e,parent:i});else if(e instanceof Array){var n=this._elements[t]=ol.ext.element.create("SELECT",{parent:i});e.forEach(function(t){ol.ext.element.create("OPTION",{html:t,value:t,parent:n})}.bind(this))}else this._elements[t]=ol.ext.element.create("INPUT",{value:void 0===e?"":e,placeholder:o||"",type:typeof e,parent:i});return i}.bind(this);h("formTitle"),h("formLayer","","layer1,layer2,...");var p=h("formMap");p.setAttribute("data-param","map"),(p=h("formStyle")).setAttribute("data-param","style"),h("formFormat",["image/png","image/jpeg"]),h("formMinZoom",0),h("formMaxZoom",20),(p=h("formExtent","","xmin,ymin,xmax,ymax")).setAttribute("data-param","extent");var u=p.querySelector("input");return ol.ext.element.create("BUTTON",{title:this.labels.mapExtent,click:function(){u.value=this.getMap().getView().calculateExtent(this.getMap().getSize()).join(",")}.bind(this),parent:p}),(p=h("formProjection","")).setAttribute("data-param","proj"),h("formCrossOrigin",!1),(p=h("formVersion","1.3.0")).setAttribute("data-param","version"),h("formAttribution",""),ol.ext.element.create("BUTTON",{html:this.get("loadLabel")||"Load",click:function(){var t=this._getFormOptions(),e=this.getLayerFromOptions(t);this.dispatchEvent({type:"load",layer:e,options:t}),this._dialog.hide()}.bind(this),parent:c}),o},ol.control.WMSCapabilities.prototype.getLayerFromOptions=function(t){t.layer.source=new ol.source.TileWMS(t.source);var e=new ol.layer.Tile(t.layer);return delete t.layer.source,e},ol.control.WMSCapabilities.prototype.setMap=function(t){ol.control.Button.prototype.setMap.call(this,t),this._dialog&&this._dialog.setMap(t)},ol.control.WMSCapabilities.prototype.getDialog=function(){return this._dialog},ol.control.WMSCapabilities.prototype.showDialog=function(t,e){this.showError(),this._elements.formProjection.value||(this._elements.formProjection.value=this.getMap().getView().getProjection().getCode()),this._dialog&&this._dialog.show({title:void 0===this.get("title")?"WMS":this.get("title"),content:this._elements.element}),this.getCapabilities(t,e);var o=this._elements.select.querySelector(".selected");o&&(this._elements.select.scrollTop=o.offsetTop-20)},ol.control.WMSCapabilities.prototype.testUrl=function(t){return!!new RegExp("^(https?:\\/\\/)((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=\\/-]*)?(\\#[-a-z\\d_]*)?$","i").test(t)},ol.control.WMSCapabilities.prototype.getRequestParam=function(t){return{SERVICE:"WMS",REQUEST:"GetCapabilities",VERSION:t.version||"1.3.0"}},ol.control.WMSCapabilities.prototype.getCapabilities=function(t,e){if(t)if(this.testUrl(t)){e=e||{};var o=(t=t.split("?"))[1];t=t[0],this._elements.formMap.value="",this._elements.formLayer.value="",this._elements.formStyle.value="",this._elements.formTitle.value="",this._elements.formProjection.value=this.getMap().getView().getProjection().getCode(),this._elements.formFormat.selectedIndex=0;var i=e.map||"",n={};o&&(o=o.replace(/^\?/,"").split("&")).forEach(function(t){if((t=t.split("="))[1]=decodeURIComponent(t[1]||""),/^map$/i.test(t[0])&&(i=t[1],this._elements.formMap.value=i),/^layers$/i.test(t[0])&&(this._elements.formLayer.value=t[1],this._elements.formTitle.value=t[1].split(",")[0]),/^style$/i.test(t[0])&&(this._elements.formStyle.value=t[1]),/^crs$/i.test(t[0])&&(this._elements.formProjection.value=t[1]),/^format$/i.test(t[0]))for(var e,o=0;e=this._elements.formFormat.options[o];o++)if(e.value===t[1]){this._elements.formFormat.selectedIndex=o;break}this.get("optional")&&this.get("optional").split(",").forEach(function(e){e===t[0]&&(n[e]=t[1])}.bind(this))}.bind(this));var r=this.getRequestParam(e),s=[];for(var a in i&&(r.MAP=i,s.push("map="+i)),n)r[a]=n[a],s.push(a+"="+n[a]);if(this._elements.input.value=(t||"")+(s?"?"+s.join("&"):""),this.clearForm(),this._proxy){var l="";for(var c in r)l+=(l?"&":"")+c+"="+r[c];this._ajax.send(this._proxy,{url:l},{timeout:e.timeout||1e4,callback:e.onload,abort:!1})}else this._ajax.send(t,r,{timeout:e.timeout||1e4,callback:e.onload,abort:!1})}else this.showError({type:"badUrl"})},ol.control.WMSCapabilities.prototype.showError=function(t){this._elements.error.innerHTML=t?this.error[t.type]||"ERROR ("+t.type+")":"",t&&"load"===t.type?this._elements.form.classList.add("visible"):this._elements.form.classList.remove("visible")},ol.control.WMSCapabilities.prototype.clearForm=function(){this._elements.result.classList.remove("ol-visible"),this.showError(),this._elements.select.innerHTML="",this._elements.data.innerHTML="",this._elements.preview.src="",this._elements.legend.src="",this._elements.legend.classList.remove("visible")},ol.control.WMSCapabilities.prototype.showCapabilities=function(t){this._elements.result.classList.add("ol-visible");var e=[],o=function(i,n){n=n||0,i.Layer.forEach(function(r){r.Attribution||(r.Attribution=i.Attribution),r.EX_GeographicBoundingBox||(r.EX_GeographicBoundingBox=i.EX_GeographicBoundingBox);var s=ol.ext.element.create("DIV",{className:(r.Layer?"ol-title ":"")+"level-"+n,html:r.Name||r.Title,click:function(){this._elements.buttons.innerHTML="",this._elements.data.innerHTML="",this._elements.legend.src=this._elements.preview.src="",this._elements.element.classList.remove("ol-form"),this.showError();var o=this.getOptionsFromCap(r,t),i=this.getLayerFromOptions(o);if(this._currentOptions=o,e.forEach(function(t){t.classList.remove("selected")}),s.classList.add("selected"),i){ol.ext.element.create("BUTTON",{html:this.get("loadLabel")||"Load",className:"ol-load",click:function(){this.dispatchEvent({type:"load",layer:i,options:o}),this._dialog&&this._dialog.hide()}.bind(this),parent:this._elements.buttons}),ol.ext.element.create("BUTTON",{className:"ol-wmsform",click:function(){this._elements.element.classList.toggle("ol-form")}.bind(this),parent:this._elements.buttons});var n=this.getMap().getView().getResolution(),a=this.getMap().getView().getCenter();this._elements.preview.src=i.getPreview(a,n,this.getMap().getView().getProjection()),this._img.src=this._elements.preview.src,ol.ext.element.create("p",{className:"ol-title",html:o.data.title,parent:this._elements.data}),ol.ext.element.create("p",{html:o.data.abstract,parent:this._elements.data}),o.data.legend.length?(this._elements.legend.src=o.data.legend[0],this._elements.legend.classList.add("visible")):(this._elements.legend.src="",this._elements.legend.classList.remove("visible"))}}.bind(this),parent:this._elements.select});e.push(s),r.Layer&&o(r,n+1)}.bind(this))}.bind(this);this._elements.select.innerHTML="",o(t.Capability.Layer)},ol.control.WMSCapabilities.prototype.getLayerResolution=function(t,e,o){var i="min"===t?"MinScaleDenominator":"MaxScaleDenominator";if(void 0!==e[i])return e[i]/(72/2.54*100);if(!e.Layer)return"min"===t?0:156543.03392804097;o="min"===t?156543.03392804097:0;for(var n=0;n=0?l=!0:t.CRS.indexOf("EPSG:4326")>=0?(a="EPSG:4326",l=!0):this.get("srs").forEach(function(e){t.CRS.indexOf(e)>=0&&(a=e,l=!0)}):l=!1,l||(this.showError({type:"srs"}),this.get("trace")&&console.log("BAD srs: ",t.CRS));var c=t.EX_GeographicBoundingBox;c&&(c=ol.proj.transformExtent(c,"EPSG:4326",this.getMap().getView().getProjection()));var h=[];t.Attribution&&h.push('© '+t.Attribution.Title.replace(/");var p={title:t.Title,extent:c,queryable:t.queryable,abstract:t.Abstract,minResolution:this.getLayerResolution("min",t),maxResolution:this.getLayerResolution("max",t)||156543.03392804097},u={url:e.Capability.Request.GetMap.DCPType[0].HTTP.Get.OnlineResource,projection:a,attributions:h,crossOrigin:this.get("cors")?"anonymous":null,params:{LAYERS:t.Name,FORMAT:o,VERSION:e.version||"1.3.0"}},d=new ol.View({projection:this.getMap().getView().getProjection()});d.setResolution(p.minResolution);var g=Math.round(d.getZoom());d.setResolution(p.maxResolution);var m=Math.round(d.getZoom());if(this._fillForm({title:p.title,layers:u.params.LAYERS,format:u.params.FORMAT,minZoom:m,maxZoom:g,extent:c?c.join(","):"",projection:u.projection,attribution:u.attributions[0]||"",version:u.params.VERSION}),this.get("trace")){var f=JSON.stringify([u],null,"\t").replace(/\\"/g,'"');p.source="SOURCE";var y="new ol.layer.Tile ("+JSON.stringify(p,null,"\t")+")";y=y.replace(/\\"/g,'"').replace('"SOURCE"',"new ol.source.TileWMS("+f+")").replace(/\\t/g,"\t").replace(/\\n/g,"\n").replace("([\n\t","(").replace("}\n])","})"),console.log(y),delete p.source}var v=[];return t.Style&&t.Style.forEach(function(t){t.LegendURL&&v.push(t.LegendURL[0].OnlineResource)}),{layer:p,source:u,data:{title:t.Title,abstract:t.Abstract,logo:t.Attribution&&t.Attribution.LogoURL?t.Attribution.LogoURL.OnlineResource:void 0,keyword:t.KeywordList,legend:v,opaque:t.opaque,queryable:t.queryable}}},ol.control.WMSCapabilities.prototype._getFormOptions=function(){var t=parseInt(this._elements.formMinZoom.value),e=parseInt(this._elements.formMaxZoom.value),o=new ol.View({projection:this.getMap().getView().getProjection()});o.setZoom(t);var i=o.getResolution();o.setZoom(e);var n=o.getResolution(),r=[];this._elements.formExtent.value&&this._elements.formExtent.value.split(",").forEach(function(t){r.push(parseFloat(t))}),4!==r.length&&(r=void 0);var s=[];this._elements.formAttribution.value&&s.push(this._elements.formAttribution.value);var a={layer:{title:this._elements.formTitle.value,extent:r,maxResolution:i,minResolution:n},source:{url:this._elements.input.value,crossOrigin:this._elements.formCrossOrigin.checked?"anonymous":null,projection:this._elements.formProjection.value,attributions:s,params:{FORMAT:this._elements.formFormat.options[this._elements.formFormat.selectedIndex].value,LAYERS:this._elements.formLayer.value,VERSION:this._elements.formVersion.value}},data:{title:this._elements.formTitle.value}};return this._elements.formMap.value&&(a.source.params.MAP=this._elements.formMap.value),a},ol.control.WMSCapabilities.prototype._fillForm=function(t){var e,o;for(this._elements.formTitle.value=t.title,this._elements.formLayer.value=t.layers,this._elements.formStyle.value=t.style,o=0;e=this._elements.formFormat.options[o];o++)if(e.value===t.format){this._elements.formFormat.selectedIndex=o;break}this._elements.formExtent.value=t.extent||"",this._elements.formMaxZoom.value=t.maxZoom,this._elements.formMinZoom.value=t.minZoom,this._elements.formProjection.value=t.projection,this._elements.formAttribution.value=t.attribution,this._elements.formVersion.value=t.version},ol.control.WMSCapabilities.prototype.loadLayer=function(t,e,o){this.getCapabilities(t,{onload:function(t){t?t.Capability.Layer.Layer.forEach(function(i){if(i.Name===e||i.Identifier===e){var n=this.getOptionsFromCap(i,t),r=this.getLayerFromOptions(n);this.dispatchEvent({type:"load",layer:r,options:n}),"function"==typeof o&&o({layer:r,options:n})}}.bind(this)):this.dispatchEvent({type:"load",error:!0})}.bind(this)})},ol.control.WMTSCapabilities=function(t){(t=t||{}).title=t.title||"WMTS",ol.control.WMSCapabilities.call(this,t),this.getDialog().element.classList.add("ol-wmtscapabilities")},ol.ext.inherits(ol.control.WMTSCapabilities,ol.control.WMSCapabilities),ol.control.WMTSCapabilities.prototype._getParser=function(){var t=new ol.format.WMTSCapabilities;return{read:function(e){var o=t.read(e);o.Capability={Layer:o.Contents},o.Capability.Layer.Attribution={Title:o.ServiceProvider.ProviderName};var i=[];return o.Contents.Layer.forEach(function(t){t.Format&&/jpeg|png/.test(t.Format[0])&&i.push(t)}),o.Contents.Layer=i,o}.bind(this)}},ol.control.WMTSCapabilities.prototype.getRequestParam=function(t){return{SERVICE:"WMTS",REQUEST:"GetCapabilities",VERSION:t.version||"1.0.0"}},ol.control.WMTSCapabilities.prototype._getTG=function(t,e,o){for(var i=new Array,n=new Array,r=ol.extent.getWidth(ol.proj.get("EPSG:3857").getExtent())/256,s=0;s<=(o||20);s++){var a="PM"!==t?t+":"+s:s;i[s]=a,n[s]=r/Math.pow(2,s)}return{origin:[-20037508,20037508],resolutions:n,matrixIds:i,minZoom:e||0}},ol.control.WMTSCapabilities.prototype.getTileGrid=function(t,e,o){return new ol.tilegrid.WMTS(this._getTG(t,e,o))},ol.control.WMTSCapabilities.prototype.getOptionsFromCap=function(t,e){var o=t.WGS84BoundingBox;o&&(o=ol.proj.transformExtent(o,"EPSG:4326",this.getMap().getView().getProjection()));var i,n=1/0,r=-1/0;if(t.TileMatrixSetLink.forEach(function(e){"PM"!==e.TileMatrixSet&&"EPSG:3857"!==e.TileMatrixSet||(i=e,t.TileMatrixSet=e.TileMatrixSet)}),i){i.TileMatrixSetLimits.forEach(function(t){var e=t.TileMatrix.split(":").pop();n=Math.min(n,parseInt(e)),r=Math.max(r,parseInt(e))});var s=new ol.View;s.setZoom(n);var a={title:t.Title,extent:o,abstract:t.Abstract,maxResolution:s.getResolution()},l={url:e.OperationsMetadata.GetTile.DCP.HTTP.Get[0].href,layer:t.Identifier,matrixSet:t.TileMatrixSet,format:t.Format[0]||"image/jpeg",projection:"EPSG:3857",minZoom:n,maxZoom:r,style:t.Style?t.Style[0].Identifier:"normal",attributions:t.Attribution.Title,crossOrigin:this.get("cors")?"anonymous":null,wrapX:!1!==this.get("wrapX")};if(this._fillForm({title:a.title,layers:l.layer,style:l.style,format:l.format,minZoom:n,maxZoom:r,extent:o?o.join(","):"",projection:l.projection,attribution:l.attributions||"",version:"1.0.0"}),this.get("trace")){l.tileGrid="TILEGRID";var c=JSON.stringify([l],null,"\t").replace(/\\"/g,'"');c=c.replace('"TILEGRID"',"new ol.tilegrid.WMTS("+JSON.stringify(this._getTG(l.matrixSet,l.minZoom,l.maxZoom),null,"\t").replace(/\n/g,"\n\t\t")+")"),delete l.tileGrid,a.source="SOURCE";var h="new ol.layer.Tile ("+JSON.stringify(a,null,"\t")+")";h=h.replace(/\\"/g,'"').replace('"SOURCE"',"new ol.source.WMTS("+c+")").replace(/\\t/g,"\t").replace(/\\n/g,"\n").replace(/"tileGrid": {/g,'"tileGrid": new ol.tilegrid.WMTS({').replace(/},\n(\t*)"style"/g,'}),\n$1"style"').replace("([\n\t","(").replace("}\n])","})"),console.log(h),delete a.source}return{layer:a,source:l,data:{title:t.Title,abstract:t.Abstract,legend:t.Style?[t.Style[0].LegendURL[0].href]:void 0}}}this.showError({type:"TileMatrix"})},ol.control.WMTSCapabilities.prototype._getFormOptions=function(){var t=this._currentOptions||{};t.layer||(t.layer={}),t.source||(t.source={}),t.data||(t.data={});var e=parseInt(this._elements.formMinZoom.value)||0,o=parseInt(this._elements.formMaxZoom.value)||20,i=[];this._elements.formExtent.value&&this._elements.formExtent.value.split(",").forEach(function(t){i.push(parseFloat(t))}),4!==i.length&&(i=void 0);var n=[];this._elements.formAttribution.value&&n.push(this._elements.formAttribution.value);var r=new ol.View({projection:this.getMap().getView().getProjection()});return r.setZoom(e),{layer:{title:this._elements.formTitle.value,extent:i,abstract:t.layer.abstract||"",maxResolution:r.getResolution()},source:{url:this._elements.input.value,layer:this._elements.formLayer.value,matrixSet:t.source.matrixSet||"PM",format:this._elements.formFormat.options[this._elements.formFormat.selectedIndex].value,projection:"EPSG:3857",minZoom:e,maxZoom:o,style:this._elements.formStyle.value||"normal",attributions:n,crossOrigin:this._elements.formCrossOrigin.checked?"anonymous":null,wrapX:!1!==this.get("wrapX")},data:{title:this._elements.formTitle.value,abstract:t.data.abstract,legend:t.data.legend}}},ol.control.WMTSCapabilities.prototype.getLayerFromOptions=function(t){if(t){t.source.tileGrid=this.getTileGrid(t.source.matrixSet,t.source.minZoom,t.source.maxZoom),t.layer.source=new ol.source.WMTS(t.source);var e=new ol.layer.Tile(t.layer);return delete t.layer.source,delete t.source.tileGrid,e}},ol.featureAnimation=function(t){t=t||{},this.duration_="number"==typeof t.duration?t.duration>=0?t.duration:0:1e3,this.fade_="function"==typeof t.fade?t.fade:null,this.repeat_=Number(t.repeat);var e="function"==typeof t.easing?t.easing:ol.easing.linear;t.revers?this.easing_=function(t){return 1-e(t)}:this.easing_=e,this.hiddenStyle=t.hiddenStyle,ol.Object.call(this)},ol.ext.inherits(ol.featureAnimation,ol.Object),ol.featureAnimation.hiddenStyle=new ol.style.Style({image:new ol.style.Circle({}),stroke:new ol.style.Stroke({color:"transparent"})}),ol.featureAnimation.prototype.drawGeom_=function(t,e,o){this.fade_&&(t.context.globalAlpha=this.fade_(1-t.elapsed));for(var i=t.style,n=0;n=0;l--)0===e[l].duration_&&e.splice(l,1);var c=0,h=0,p=o&&this.getFilters?this.getFilters():[];function u(o){a.type=o.type;try{a.vectorContext=o.vectorContext||ol.render.getVectorContext(o)}catch(o){}if(a.frameState=o.frameState,a.inversePixelTransform=o.inversePixelTransform,a.extent||(a.extent=o.frameState.extent,a.start=o.frameState.time,a.context=o.context),a.time=o.frameState.time-a.start,a.elapsed=a.time/e[h].duration_,a.elapsed>1&&(a.elapsed=1),o.context.save(),p.forEach(function(t){t.get("active")&&t.precompose(o)}),this.getOpacity&&(o.context.globalAlpha=this.getOpacity()),e[h].animate(a)){var i={type:"animating",step:h,start:a.start,time:a.time,elapsed:a.elapsed,rotation:a.rotation||0,geom:a.geom,coordinate:a.coord,feature:t};e[h].dispatchEvent(i),n.dispatchEvent(i)}else++c0&&(this.duration_=this.dist_/this.speed_)},ol.ext.inherits(ol.featureAnimation.Path,ol.featureAnimation),ol.featureAnimation.Path.prototype.animate=function(t){if(!t.time&&!this.dist_)return!1;var e,o,i,n,r,s,a=this.dist_*this.easing_(t.elapsed),l=0;o=this.path_[0];for(var c=1;c=a){i=(a-l)/s,o=[e[0]+(o[0]-e[0])*i,e[1]+(o[1]-e[1])*i];break}l+=s}var h=t.style;if(t.rotation=Math.PI/2+Math.atan2(e[1]-o[1],e[0]-o[0]),!1!==this.rotate_){var p=[],u=this.rotate_-t.rotation+t.frameState.viewState.rotation;t.rotation=Math.PI/2+Math.atan2(e[1]-o[1],e[0]-o[0]);for(var d=0;i=t.style[d];d++)i.getImage()&&i.getImage().setRotation(u),p.push(i);t.style=p}return t.geom.setCoordinates(o),this.drawGeom_(t,t.geom),t.style=h,t.time<=this.duration_},ol.featureAnimation.Shake=function(t){t=t||{},ol.featureAnimation.call(this,t),this.amplitude_=t.amplitude||40,this.bounce_=-Math.PI*(t.bounce||6),this.horizontal_=t.horizontal},ol.ext.inherits(ol.featureAnimation.Shake,ol.featureAnimation),ol.featureAnimation.Shake.prototype.animate=function(t){var e=t.geom.clone(),o=t.geom.clone(),i=this.easing_(t.elapsed);return i=Math.sin(this.bounce_*i)*this.amplitude_*(1-i)*t.frameState.viewState.resolution,this.horizontal_?(e.translate(i,0),o.translate(i,0)):e.translate(0,i),this.drawGeom_(t,e,o),t.time<=this.duration_},ol.featureAnimation.Show=function(t){ol.featureAnimation.call(this,t)},ol.ext.inherits(ol.featureAnimation.Show,ol.featureAnimation),ol.featureAnimation.Show.prototype.animate=function(t){return this.drawGeom_(t,t.geom),t.time<=this.duration_},ol.featureAnimation.Slide=function(t){t=t||{},this.speed_=t.speed||0,ol.featureAnimation.call(this,t),this.side_=t.side||"left"},ol.ext.inherits(ol.featureAnimation.Slide,ol.featureAnimation),ol.featureAnimation.Slide.prototype.animate=function(t){t.time||("left"==this.side_?this.dx=t.extent[0]-t.bbox[2]:this.dx=t.extent[2]-t.bbox[0],this.speed_&&(this.duration_=Math.abs(this.dx)/this.speed_/t.frameState.viewState.resolution));var e=t.geom.clone();return e.translate(this.dx*(1-this.easing_(t.elapsed)),0),this.drawGeom_(t,e),t.time<=this.duration_},ol.featureAnimation.Teleport=function(t){ol.featureAnimation.call(this,t)},ol.ext.inherits(ol.featureAnimation.Teleport,ol.featureAnimation),ol.featureAnimation.Teleport.prototype.animate=function(t){var e=this.easing_(t.elapsed);if(e){t.context.save();var o=t.frameState.pixelRatio;t.context.globalAlpha=e,t.context.scale(e,1/e);var i=t.frameState.coordinateToPixelTransform,n=(1/e-1)*o*(i[0]*t.coord[0]+i[1]*t.coord[1]+i[4]),r=(e-1)*o*(i[2]*t.coord[0]+i[3]*t.coord[1]+i[5]);t.context.translate(n,r),this.drawGeom_(t,t.geom),t.context.restore()}return t.time<=this.duration_},ol.featureAnimation.Throw=function(t){t=t||{},ol.featureAnimation.call(this,t),this.speed_=t.speed||0,this.side_=t.side||"left"};ol.ext.inherits(ol.featureAnimation.Throw,ol.featureAnimation),ol.featureAnimation.Throw.prototype.animate=function(t){var e,o;!t.time&&this.speed_&&("left"==this.side_?(e=this.dx=t.extent[0]-t.bbox[2],o=this.dy=t.extent[3]-t.bbox[1]):(e=this.dx=t.extent[2]-t.bbox[0],o=this.dy=t.extent[3]-t.bbox[1]),this.duration_=Math.sqrt(e*e+o*o)/this.speed_/t.frameState.viewState.resolution);var i=t.geom.clone(),n=t.geom.clone();return i.translate(this.dx*(1-this.easing_(t.elapsed)),this.dy*Math.cos(Math.PI/2*this.easing_(t.elapsed))),n.translate(this.dx*(1-this.easing_(t.elapsed)),0),this.drawGeom_(t,i,n),t.time<=this.duration_},ol.featureAnimation.Zoom=function(t){t=t||{},ol.featureAnimation.call(this,t),this.set("zoomout",t.zoomOut)},ol.ext.inherits(ol.featureAnimation.Zoom,ol.featureAnimation),ol.featureAnimation.ZoomOut=function(t){(t=t||{}).zoomOut=!0,ol.featureAnimation.Zoom.call(this,t)},ol.ext.inherits(ol.featureAnimation.ZoomOut,ol.featureAnimation.Zoom),ol.featureAnimation.Zoom.prototype.animate=function(t){var e=this.easing_(t.elapsed);if(e){this.get("zoomout")&&(e=1/e);var o,i,n=t.style,r=[];for(o=0;o=0;o--)this.filters_[o]===e&&this.filters_.splice(o,1);for(o=e._listener.length-1;o>=0;o--)e._listener[o].target===this&&(e.removeFromLayer&&e.removeFromLayer(this),ol.Observable.unByKey(e._listener[o].listener),e._listener.splice(o,1));t.call(this)}else this.filters_.forEach(function(t){this.removeFilter(t)}.bind(this))}ol.Map.prototype.addFilter=function(t){console.warn("[OL-EXT] addFilter deprecated on map."),e.call(this,t)},ol.Map.prototype.removeFilter=function(t){o.call(this,t)},ol.Map.prototype.getFilters=function(){return this.filters_||[]},ol.layer.Base.prototype.addFilter=function(t){e.call(this,t)},ol.layer.Base.prototype.removeFilter=function(t){o.call(this,t)},ol.layer.Base.prototype.getFilters=function(){return this.filters_||[]}}(),ol.filter.Mask=function(t){if(t=t||{},ol.filter.Base.call(this,t),t.feature)switch(t.feature.getGeometry().getType()){case"Polygon":case"MultiPolygon":this.feature_=t.feature}this.set("inner",t.inner),this.fillColor_=t.fill&&ol.color.asString(t.fill.getColor())||"rgba(0,0,0,0.2)"},ol.ext.inherits(ol.filter.Mask,ol.filter.Base),ol.filter.Mask.prototype.drawFeaturePath_=function(t,e){var o,i=t.context,n=i.canvas,r=t.frameState.pixelRatio;if(t.frameState.coordinateToPixelTransform){var s=t.frameState.coordinateToPixelTransform;if(t.inversePixelTransform){var a=t.inversePixelTransform;o=function(t){return[(t=[t[0]*s[0]+t[1]*s[1]+s[4],t[0]*s[2]+t[1]*s[3]+s[5]])[0]*a[0]-t[1]*a[1]+a[4],-t[0]*a[2]+t[1]*a[3]+a[5]]}}else o=function(t){return[(t[0]*s[0]+t[1]*s[1]+s[4])*r,(t[0]*s[2]+t[1]*s[3]+s[5])*r]}}else s=t.frameState.coordinateToPixelMatrix,o=function(t){return[(t[0]*s[0]+t[1]*s[1]+s[12])*r,(t[0]*s[4]+t[1]*s[5]+s[13])*r]};var l=this.feature_.getGeometry().getCoordinates();function c(t){for(var e=0;e=0&&(t.once("postrender",function(t){t.context.canvas.parentNode.style["mix-blend-mode"]="",t.context.canvas.parentNode.style.filter="",t.context.canvas.parentNode.style.display=""}.bind(this)),t.changed(),this._layers.splice(e,1))},ol.filter.CanvasFilter=function(t){ol.filter.Base.call(this,t),this._svg={}},ol.ext.inherits(ol.filter.CanvasFilter,ol.filter.Base),ol.filter.CanvasFilter.prototype.addSVGFilter=function(t){t.getId&&(t="#"+t.getId()),this._svg[t]=1,this.dispatchEvent({type:"propertychange",key:"svg",oldValue:this._svg})},ol.filter.CanvasFilter.prototype.removeSVGFilter=function(t){t.getId&&(t="#"+t.getId()),delete this._svg[t],this.dispatchEvent({type:"propertychange",key:"svg",oldValue:this._svg})},ol.filter.CanvasFilter.prototype.precompose=function(){},ol.filter.CanvasFilter.prototype.postcompose=function(t){var e=[];for(var o in void 0!==this.get("url")&&e.push("url("+this.get("url")+")"),this._svg)e.push("url("+o+")");void 0!==this.get("blur")&&e.push("blur("+this.get("blur")+"px)"),void 0!==this.get("brightness")&&e.push("brightness("+this.get("brightness")+"%)"),void 0!==this.get("contrast")&&e.push("contrast("+this.get("contrast")+"%)"),void 0!==this.get("shadow")&&e.push("drop-shadow("+this.get("shadow")[0]+"px "+this.get("shadow")[1]+"px "+(this.get("shadowBlur")||0)+"px "+this.get("shadowColor")+")"),void 0!==this.get("grayscale")&&e.push("grayscale("+this.get("grayscale")+"%)"),void 0!==this.get("hueRotate")&&e.push("hue-rotate("+this.get("hueRotate")+"deg)"),void 0!==this.get("invert")&&e.push("invert("+this.get("invert")+"%)"),void 0!==this.get("saturate")&&e.push("saturate("+this.get("saturate")+"%)"),void 0!==this.get("sepia")&&e.push("sepia("+this.get("sepia")+"%)"),(e=e.join(" "))&&(t.context.save(),t.context.filter=e,t.context.drawImage(t.context.canvas,0,0),t.context.restore())},ol.filter.Clip=function(t){if(t=t||{},ol.filter.Base.call(this,t),this.set("coords",t.coords),this.set("units",t.units),this.set("keepAspectRatio",t.keepAspectRatio),this.set("extent",t.extent||[0,0,1,1]),this.set("color",t.color),!t.extent&&"%"!=t.units&&t.coords){for(var e,o=1/0,i=1/0,n=-1/0,r=-1/0,s=0;e=t.coords[s];s++)o>e[0]&&(o=e[0]),ne[1]&&(i=e[1]),r0;r--)i=r*l/a[0]-(r==a[0]?e[0]*(a[1]%2)+o:0),n=c-e[1]*(r%2)-o,t.lineTo(i,n);for(r=a[1];r>0;r--)i=e[0]*(r%2)+o,n=r*c/a[1]-(r==a[1]?o:0),t.lineTo(i,n);t.closePath()},ol.filter.Fold.prototype.precompose=function(t){var e=t.context;e.save(),e.shadowColor="rgba(0,0,0,0.3)",e.shadowBlur=8,e.shadowOffsetX=2,e.shadowOffsetY=3,this.drawLine_(e,this.get("fsize"),this.get("margin")),e.fillStyle="#fff",this.get("fill")&&e.fill(),e.strokeStyle="rgba(0,0,0,0.1)",e.stroke(),e.restore(),e.save(),this.drawLine_(e,this.get("fsize"),this.get("margin")+this.get("padding")),e.clip()},ol.filter.Fold.prototype.postcompose=function(t){var e=t.context,o=e.canvas;if(e.restore(),e.save(),this.drawLine_(e,this.get("fsize"),this.get("margin")),e.clip(),this.get("shadow")){var i=this.get("fold"),n=o.width/i[0],r=o.height/i[1],s=e.createRadialGradient(5*n/8,5*n/8,n/4,n/2,n/2,n);s.addColorStop(0,"transparent"),s.addColorStop(1,"rgba(0,0,0,"+this.get("opacity")+")"),e.fillStyle=s,e.scale(1,r/n);for(var a=0;athis.pixels.length)for(;this.pixels.length-1}:this._whiteList=function(){return!0},"function"==typeof t.blackList?this._blackList=t.blackList:t.blackList&&t.blackList.indexOf?this._blackList=function(e){return t.blackList.indexOf(e)>-1}:this._blackList=function(){return!1},this._deleteNull=!1!==t.deleteNullProperties&&[null,void 0,""];var e=2;t.dataProjection&&"EPSG:4326"!==t.dataProjection||(e=7),isNaN(parseInt(t.decimals))||(e=parseInt(t.decimals)),this._decimals=e,this.setLayout(t.layout||"XY")},ol.ext.inherits(ol.format.GeoJSONX,ol.format.GeoJSON),ol.format.GeoJSONX.prototype._radix="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/ !#$%&'()*-.:<=>?@[]^_`{|}~",ol.format.GeoJSONX.prototype._size=ol.format.GeoJSONX.prototype._radix.length,ol.format.GeoJSONX.prototype._type={Point:0,LineString:1,Polygon:2,MultiPoint:3,MultiLineString:4,MultiPolygon:5,GeometryCollection:null},ol.format.GeoJSONX.prototype._toType=["Point","LineString","Polygon","MultiPoint","MultiLineString","MultiPolygon"],ol.format.GeoJSONX.prototype.setLayout=function(t){switch(t){case"XYZ":case"XYZM":this._layout=t;break;default:this._layout="XY"}},ol.format.GeoJSONX.prototype.getLayout=function(){return this._layout},ol.format.GeoJSONX.prototype.encodeNumber=function(t,e){!isNaN(Number(t))&&null!==t&&isFinite(t)||(t=0),e||0===e||(e=this._decimals),(t=Math.round(t*Math.pow(10,e)))<0?t=-2*t-1:t*=2;for(var o,i="",n=t;o=n%this._size,i=this._radix.charAt(o)+i,0!=(n=Math.floor(n/this._size)););return i},ol.format.GeoJSONX.prototype.decodeNumber=function(t,e){e||0===e||(e=this._decimals);var o=0;t.split("").forEach(function(t){o=o*this._size+this._radix.indexOf(t)}.bind(this));var i=Math.floor(o/2);return i!==o/2&&(i=-1-i),i/Math.pow(10,e)},ol.format.GeoJSONX.prototype.encodeCoordinates=function(t,e){var o,i,n;if("number"==typeof t[0])return i=this.encodeNumber(t[0],e)+","+this.encodeNumber(t[1],e),"Z"==this._layout[2]&&t.length>2&&(i+=","+this.encodeNumber(t[o][2],2)),"M"==this._layout[3]&&t.length>3&&(i+=","+this.encodeNumber(t[o][3],0)),i;if(t.length&&t[0]){if("number"==typeof t[0][0]){var r=[0,0,0,0],s=[],a="Z"==this._layout[2]&&t[0].length>2,l="M"==this._layout[3]&&t[0].length>3;for(o=0;o1){var n=Math.pow(10,e),r=[0,0,0,0];return t.forEach(function(o,i){t[i]=o.split(","),t[i][0]=Math.round((this.decodeNumber(t[i][0],e)+r[0])*n)/n,t[i][1]=Math.round((this.decodeNumber(t[i][1],e)+r[1])*n)/n,t[i].length>2&&(t[i][2]=Math.round((this.decodeNumber(t[i][2],2)+r[2])*n)/n),t[i].length>3&&(t[i][3]=Math.round((this.decodeNumber(t[i][3],0)+r[3])*n)/n),r=t[i]}.bind(this)),t}return t=t[0].split(","),i=[this.decodeNumber(t[0],e),this.decodeNumber(t[1],e)],t.length>2&&(i[2]=this.decodeNumber(t[2],2)),t.length>3&&(i[3]=this.decodeNumber(t[3],0)),i}if(t.length){var s=[];for(o=0;o0?1:-1)*Math.min(.015,n/7e4*t),e=0;e=0})),"function"==typeof t.features)this._features=t.features;else if(t.features){var n=t.features;this._features=function(t){return n.indexOf?!!n[n.indexOf(t)]:!!n.item(n.getArray().indexOf(t))}}else this._features=function(){return!0};this.on("drawstart",this._startDrawing.bind(this)),this.on("drawend",this._finishDrawing.bind(this))},ol.ext.inherits(ol.interaction.DrawHole,ol.interaction.Draw),ol.interaction.DrawHole.prototype.setMap=function(t){this.getMap()&&this.getMap().removeInteraction(this._select),t&&t.addInteraction(this._select),ol.interaction.Draw.prototype.setMap.call(this,t)},ol.interaction.DrawHole.prototype.setActive=function(t){this._select.getFeatures().clear(),ol.interaction.Draw.prototype.setActive.call(this,t)},ol.interaction.DrawHole.prototype.removeLastPoint=function(){this._feature&&this._feature.getGeometry().getCoordinates()[0].length>2&&ol.interaction.Draw.prototype.removeLastPoint.call(this)},ol.interaction.DrawHole.prototype.getPolygon=function(){return this._polygon},ol.interaction.DrawHole.prototype._startDrawing=function(t){var e=this.getMap();this._feature=t.feature;var o=t.feature.getGeometry().getCoordinates()[0][0];this._current=null,e.forEachFeatureAtPixel(e.getPixelFromCoordinate(o),function(t,e){if(this._features(t,e)){var i=t.getGeometry();if("Polygon"===i.getType()&&i.intersectsCoordinate(o))this._polygonIndex=!1,this._polygon=i,this._current=t;else if("MultiPolygon"===i.getType()&&i.intersectsCoordinate(o))for(var n,r=0;n=i.getPolygon(r);r++)if(n.intersectsCoordinate(o)){this._polygonIndex=r,this._polygon=n,this._current=t;break}}}.bind(this),{layerFilter:this.layers_}),this._select.getFeatures().clear(),this._current?this._select.getFeatures().push(this._current):(this.setActive(!1),this.setActive(!0))},ol.interaction.DrawHole.prototype._finishDrawing=function(t){t.hole=t.feature,t.feature=this._select.getFeatures().item(0),this.dispatchEvent({type:"modifystart",features:[this._current]});var e=t.hole.getGeometry().getCoordinates()[0];if(e.length>3)if(!1!==this._polygonIndex){for(var o,i=t.feature.getGeometry(),n=new ol.geom.MultiPolygon([]),r=0;o=i.getPolygon(r);r++)r===this._polygonIndex?(o.appendLinearRing(new ol.geom.LinearRing(e)),n.appendPolygon(o)):n.appendPolygon(o);t.feature.setGeometry(n)}else this.getPolygon().appendLinearRing(new ol.geom.LinearRing(e));this.dispatchEvent({type:"modifyend",features:[this._current]}),this._feature=null,this._select.getFeatures().clear()},ol.interaction.DrawHole.prototype._geometryFn=function(t,e){var o=t[0].pop();return this.getPolygon()&&!this.getPolygon().intersectsCoordinate(o)||(this.lastOKCoord=[o[0],o[1]]),t[0].push([this.lastOKCoord[0],this.lastOKCoord[1]]),e?e.setCoordinates([t[0].concat([t[0][0]])]):e=new ol.geom.Polygon(t),e},ol.interaction.DrawRegular=function(t){t||(t={}),this.squaredClickTolerance_=t.clickTolerance?t.clickTolerance*t.clickTolerance:36,this.maxCircleCoordinates_=t.maxCircleCoordinates||100,this.features_=t.features,this.source_=t.source,this.conditionFn_=t.condition,this.squareFn_=t.squareCondition,this.centeredFn_=t.centerCondition,this.canRotate_=!1!==t.canRotate,this.geometryName_=t.geometryName,this.setSides(t.sides);var e=ol.style.Style.defaultStyle(!0);this.sketch_=new ol.Collection,this.overlayLayer_=new ol.layer.Vector({source:new ol.source.Vector({features:this.sketch_,useSpatialIndex:!1}),name:"DrawRegular overlay",displayInLayerSwitcher:!1,style:t.style||e}),ol.interaction.Interaction.call(this,{handleEvent:this.handleEvent_})},ol.ext.inherits(ol.interaction.DrawRegular,ol.interaction.Interaction),ol.interaction.DrawRegular.prototype.setMap=function(t){this.getMap()&&this.getMap().removeLayer(this.overlayLayer_),ol.interaction.Interaction.prototype.setMap.call(this,t),this.overlayLayer_.setMap(t)},ol.interaction.DrawRegular.prototype.setActive=function(t){this.reset(),ol.interaction.Interaction.prototype.setActive.call(this,t)},ol.interaction.DrawRegular.prototype.reset=function(){this.overlayLayer_.getSource().clear(),this.started_=!1},ol.interaction.DrawRegular.prototype.setSides=function(t){t=parseInt(t),this.sides_=t>2?t:0},ol.interaction.DrawRegular.prototype.canRotate=function(t){return!0!==t&&!1!==t||(this.canRotate_=t),this.canRotate_},ol.interaction.DrawRegular.prototype.getSides=function(){return this.sides_},ol.interaction.DrawRegular.prototype.startAngle={default:Math.PI/2,3:-Math.PI/2,4:Math.PI/4},ol.interaction.DrawRegular.prototype.getGeom_=function(){if(this.overlayLayer_.getSource().clear(),!this.center_)return!1;var t;if(this.coord_){var e,o,i,n,r,s=this.center_,a=this.coord_;if(!this.sides_&&this.square_&&!this.centered_)return s=[(a[0]+s[0])/2,(a[1]+s[1])/2],e=[a[0]-s[0],a[1]-s[1]],i=Math.sqrt(e[0]*e[0]+e[1]*e[1]),n=new ol.geom.Circle(s,i,"XY"),r=this.getMap().getPixelFromCoordinate(s),o=Math.max(100,Math.abs(r[0]-this.coordPx_[0]),Math.abs(r[1]-this.coordPx_[1])),o=Math.min(this.maxCircleCoordinates_,Math.round(o/3)),ol.geom.Polygon.fromCircle(n,o,0);var l=this.canRotate_&&this.centered_&&this.square_;if(e=[a[0]-s[0],a[1]-s[1]],this.square_&&!l){var c=Math.max(Math.abs(e[0]),Math.abs(e[1]));a=[s[0]+(e[0]>0?c:-c),s[1]+(e[1]>0?c:-c)]}if((i=Math.sqrt(e[0]*e[0]+e[1]*e[1]))>0){var h;if(n=new ol.geom.Circle(s,i,"XY"),h=l?Math.atan2(e[1],e[0]):this.startAngle[this.sides_]||this.startAngle.default,this.sides_?t=ol.geom.Polygon.fromCircle(n,this.sides_,h):(r=this.getMap().getPixelFromCoordinate(this.center_),o=Math.max(100,Math.abs(r[0]-this.coordPx_[0]),Math.abs(r[1]-this.coordPx_[1])),o=Math.min(this.maxCircleCoordinates_,Math.round(o/(this.centered_?3:5))),t=ol.geom.Polygon.fromCircle(n,o,0)),l)return t;var p=t.getExtent(),u=((s=this.centered_?[2*this.center_[0]-this.coord_[0],2*this.center_[1]-this.coord_[1]]:this.center_)[0]-a[0])/(p[0]-p[2]),d=(s[1]-a[1])/(p[1]-p[3]);if(this.square_){var g=Math.min(Math.abs(u),Math.abs(d));u=Math.sign(u)*g,d=Math.sign(d)*g}var m=[s[0]-p[0]*u,s[1]-p[1]*d];return t.applyTransform(function(t,e,o){for(var i=0;i450,this._longTouch&&this.handleMoveEvent_(t)}.bind(this),500);break;case"pointerup":this.started_&&this.coord_&&(e=this.downPx_[0]-t.pixel[0])*e+(o=this.downPx_[1]-t.pixel[1])*o<=this.squaredClickTolerance_&&("pointermove"==this.lastEvent||"keydown"==this.lastEvent?this.end_(t):(e=this.upPx_[0]-t.pixel[0])*e+(o=this.upPx_[1]-t.pixel[1])*o<=this.squaredClickTolerance_?this.end_(t):(this.handleMoveEvent_(t),this.drawPoint_(t.coordinate,!0))),this.upPx_=t.pixel;break;case"pointerdrag":if(this.started_){var i=this.getMap().getPixelFromCoordinate(this.center_);(e=i[0]-t.pixel[0])*e+(o=i[1]-t.pixel[1])*o<=this.squaredClickTolerance_&&this.reset()}return!this._longTouch;case"pointermove":this.started_&&(e=this.downPx_[0]-t.pixel[0])*e+(o=this.downPx_[1]-t.pixel[1])*o>this.squaredClickTolerance_&&(this.handleMoveEvent_(t),this.lastEvent=t.type);break;default:if(this.lastEvent=t.type,this.started_&&"dblclick"===t.type)return!1}return!0},ol.interaction.DrawRegular.prototype.finishDrawing=function(){this.started_&&this.coord_&&this.end_({pixel:this.upPx_,coordinate:this.coord_})},ol.interaction.DrawRegular.prototype.handleMoveEvent_=function(t){if(this.started_){this.coord_=t.coordinate,this.coordPx_=t.pixel;var e=this.drawSketch_(t);this.dispatchEvent({type:"drawing",feature:e,pixel:t.pixel,startCoordinate:this.center_,coordinate:t.coordinate,square:this.square_,centered:this.centered_})}else this.drawPoint_(t.coordinate)},ol.interaction.DrawRegular.prototype.start_=function(t){if(this.started_)this.coord_=t.coordinate;else{this.started_=!0,this.center_=t.coordinate,this.coord_=null;var e=this.feature_=new ol.Feature({});e.setGeometryName(this.geometryName_),e.setGeometry(new ol.geom.Polygon([[t.coordinate,t.coordinate,t.coordinate]])),this.drawSketch_(t),this.dispatchEvent({type:"drawstart",feature:e,pixel:t.pixel,coordinate:t.coordinate})}},ol.interaction.DrawRegular.prototype.end_=function(t){if(this.coord_=t.coordinate,this.started_=!1,!this.coord_||this.center_[0]===this.coord_[0]&&this.center_[1]===this.coord_[1])this.dispatchEvent({type:"drawcancel",feature:null,pixel:t.pixel,coordinate:t.coordinate,square:this.square_,centered:this.centered_});else{var e=this.feature_;e.setGeometry(this.getGeom_()),this.source_?this.source_.addFeature(e):this.features_&&this.features_.push(e),this.dispatchEvent({type:"drawend",feature:e,pixel:t.pixel,coordinate:t.coordinate,square:this.square_,centered:this.centered_})}this.center_=this.coord_=null,this.drawSketch_()},ol.interaction.DrawTouch=function(t){(t=t||{}).handleEvent=function(t){if(this.get("tap"))switch(this.sketch.setPosition(this.getPosition()),t.type){case"singleclick":this.addPoint();break;case"dblclick":return this.addPoint(),this.finishDrawing(),!1}return!0},t.sketchStyle||(t.sketchStyle=ol.style.Style.defaultStyle());var e=this.sketch=new ol.layer.SketchOverlay(t);e.on(["drawstart","drawabort"],function(t){this.dispatchEvent(t)}.bind(this)),e.on(["drawend"],function(e){e.feature&&e.valid&&t.source&&t.source.addFeature(e.feature),this.dispatchEvent(e)}.bind(this)),ol.interaction.CenterTouch.call(this,t),this._source=t.source,this.set("tap",!1!==t.tap)},ol.ext.inherits(ol.interaction.DrawTouch,ol.interaction.CenterTouch),ol.interaction.DrawTouch.prototype.setMap=function(t){if(this._listener)for(var e in this._listener)ol.Observable.unByKey(e);this._listener={},ol.interaction.CenterTouch.prototype.setMap.call(this,t),this.sketch.setMap(t),t&&(this._listener.center=t.on("postcompose",function(){ol.coordinate.equal(this.getPosition(),this.sketch.getPosition()||[])||this.sketch.setPosition(this.getPosition())}.bind(this)))},ol.interaction.DrawTouch.prototype.setGeometryType=function(t){return this.sketch.setGeometryType(t)},ol.interaction.DrawTouch.prototype.getGeometryType=function(){return this.sketch.getGeometryType()},ol.interaction.DrawTouch.prototype.finishDrawing=function(){this.sketch.finishDrawing(!0)},ol.interaction.DrawTouch.prototype.addPoint=function(){this.sketch.addPoint(this.getPosition())},ol.interaction.DrawTouch.prototype.removeLastPoint=function(){this.sketch.removeLastPoint()},ol.interaction.DrawTouch.prototype.setActive=function(t){ol.interaction.CenterTouch.prototype.setActive.call(this,t),this.sketch.abortDrawing(),this.sketch.setVisible(t)},ol.interaction.DropFile=function(t){t=t||{},ol.interaction.DragAndDrop.call(this,{});var e=t.zone||document;e.addEventListener("dragenter",this.onstop),e.addEventListener("dragover",this.onstop),e.addEventListener("dragleave",this.onstop),this.formatConstructors_=t.formatConstructors||[ol.format.GPX,ol.format.GeoJSONX,ol.format.GeoJSONP,ol.format.GeoJSON,ol.format.IGC,ol.format.KML,ol.format.TopoJSON],this.projection_=t.projection,this.accept_=t.accept||["gpx","json","geojsonx","geojsonp","geojson","igc","kml","topojson"];var o=this;e.addEventListener("drop",function(t){return o.ondrop(t)})},ol.ext.inherits(ol.interaction.DropFile,ol.interaction.DragAndDrop),ol.interaction.DropFile.prototype.setMap=function(t){ol.interaction.Interaction.prototype.setMap.call(this,t)},ol.interaction.DropFile.prototype.onstop=function(t){return t.preventDefault(),t.stopPropagation(),!1},ol.interaction.DropFile.prototype.ondrop=function(t){if(t.preventDefault(),t.dataTransfer&&t.dataTransfer.files.length)for(var e,o=this,i=this.projection_||(this.getMap()?this.getMap().getView().getProjection():null),n=t.dataTransfer.files,r=/\.([0-9a-z]+)(?=[?#])|(\.)(?:[\w]+)$/,s=0;e=n[s];s++){var a=e.name.match(r)[0],l=this.accept_.indexOf(a.toLocaleLowerCase())>=0;if(o.dispatchEvent({type:"loadstart",file:e,filesize:e.size,filetype:e.type,fileextension:a,projection:i,isok:l}),this.formatConstructors_.length){var c=new FileReader,h=this.formatConstructors_,p=e;c.onload=function(t){var e,n,r=t.target.result,s=[];for(e=0,n=h.length;e0)return o.dispatchEvent({type:"addfeatures",features:s,file:p,projection:i}),void o.dispatchEvent({type:"loadend",features:s,file:p,projection:i})}catch(t){}}o.dispatchEvent({type:"loadend",file:p,result:r})},c.readAsText(e)}}return!1},ol.interaction.FillAttribute=function(t,e){if((t=t||{}).condition||(t.condition=ol.events.condition.click),ol.interaction.Select.call(this,t),this.setActive(!1!==t.active),this.set("name",t.name),this._attributes=e,this.on("select",function(t){this.getFeatures().clear(),this.fill(t.selected,this._attributes)}.bind(this)),void 0===t.cursor){var o=document.createElement("CANVAS");o.width=o.height=32;var i=o.getContext("2d");i.beginPath(),i.moveTo(9,3),i.lineTo(2,9),i.lineTo(10,17),i.lineTo(17,11),i.closePath(),i.fillStyle="#fff",i.fill(),i.stroke(),i.beginPath(),i.moveTo(6,4),i.lineTo(0,8),i.lineTo(0,13),i.lineTo(3,17),i.lineTo(3,8),i.closePath(),i.fillStyle="#000",i.fill(),i.stroke(),i.moveTo(8,8),i.lineTo(10,0),i.lineTo(11,0),i.lineTo(13,3),i.lineTo(13,7),i.stroke(),this._cursor="url("+o.toDataURL()+") 0 13, auto"}t.cursor&&(this._cursor=t.cursor)},ol.ext.inherits(ol.interaction.FillAttribute,ol.interaction.Select),ol.interaction.FillAttribute.prototype.setCursor=function(t){this._cursor=t},ol.interaction.FillAttribute.prototype.getCursor=function(){return this._cursor},ol.interaction.FillAttribute.prototype.setActive=function(t){t!==this.getActive()&&(ol.interaction.Select.prototype.setActive.call(this,t),this.getMap()&&this._cursor&&(t?(this._previousCursor=this.getMap().getTargetElement().style.cursor,this.getMap().getTargetElement().style.cursor=this._cursor):(this.getMap().getTargetElement().style.cursor=this._previousCursor,this._previousCursor=void 0)))},ol.interaction.FillAttribute.prototype.setAttributes=function(t){this._attributes=t},ol.interaction.FillAttribute.prototype.setAttribute=function(t,e){this._attributes[t]=e},ol.interaction.FillAttribute.prototype.getAttributes=function(){return this._attributes},ol.interaction.FillAttribute.prototype.getAttribute=function(t){return this._attributes[t]},ol.interaction.FillAttribute.prototype.fill=function(t,e){if(t.length&&e){for(var o,i=!1,n=0;o=t[n];n++){for(var r in e)o.get(r)!==e[r]&&(i=!0);if(i)break}i&&(this.dispatchEvent({type:"setattributestart",features:t,properties:e}),t.forEach(function(t){for(var o in e)t.set(o,e[o])}),this.dispatchEvent({type:"setattributeend",features:t,properties:e}))}},ol.interaction.Flashlight=function(t){ol.interaction.Pointer.call(this,{handleDownEvent:this.setPosition,handleMoveEvent:this.setPosition}),t=t||{},this.pos=!1,this.radius=t.radius||100,this.setColor(t)},ol.ext.inherits(ol.interaction.Flashlight,ol.interaction.Pointer),ol.interaction.Flashlight.prototype.setMap=function(t){this.getMap()&&this.getMap().render(),this._listener&&ol.Observable.unByKey(this._listener),this._listener=null,ol.interaction.Pointer.prototype.setMap.call(this,t),t&&(this._listener=t.on("postcompose",this.postcompose_.bind(this)))},ol.interaction.Flashlight.prototype.setRadius=function(t){if(this.radius=t,this.getMap())try{this.getMap().renderSync()}catch(t){}},ol.interaction.Flashlight.prototype.setColor=function(t){var e=t.fill?t.fill:[0,0,0,.8],o=ol.color.asArray(e);if(this.startColor=ol.color.asString(o),t.color?o=this.endColor=ol.color.asString(ol.color.asArray(t.color)||t.color):(o[3]=0,this.endColor=ol.color.asString(o)),o[3]=.1,this.midColor=ol.color.asString(o),this.getMap())try{this.getMap().renderSync()}catch(t){}},ol.interaction.Flashlight.prototype.setPosition=function(t){if(t.pixel?this.pos=t.pixel:this.pos=t,this.getMap())try{this.getMap().renderSync()}catch(t){}},ol.interaction.Flashlight.prototype.postcompose_=function(t){var e=ol.ext.getMapCanvas(this.getMap()).getContext("2d"),o=t.frameState.pixelRatio,i=e.canvas.width,n=e.canvas.height;if(e.save(),e.scale(o,o),this.pos){var r=Math.max(i,n),s=e.createRadialGradient(this.pos[0],this.pos[1],i*this.radius/r,this.pos[0],this.pos[1],n*this.radius/r);s.addColorStop(0,this.startColor),s.addColorStop(.8,this.midColor),s.addColorStop(1,this.endColor),e.fillStyle=s,e.fillRect(this.pos[0]-r,this.pos[1]-r,2*r,2*r)}else e.fillStyle=this.startColor,e.fillRect(0,0,i,n);e.restore()},ol.interaction.FocusMap=function(){ol.interaction.Interaction.call(this,{}),this.focusBt=ol.ext.element.create("BUTTON",{on:{focus:function(){this.dispatchEvent({type:"focus"})}.bind(this)},style:{position:"absolute",zIndex:-1,top:0,opacity:0}})},ol.ext.inherits(ol.interaction.FocusMap,ol.interaction.Interaction),ol.interaction.FocusMap.prototype.setMap=function(t){this._listener&&ol.Observable.unByKey(this._listener),this._listener=null,this.getMap()&&this.getMap().getViewport().removeChild(this.focusBt),ol.interaction.Interaction.prototype.setMap.call(this,t),this.getMap()&&(this._listener=this.getMap().on("pointerdown",function(){this.getActive()&&this.focusBt.focus()}.bind(this)),this.getMap().getViewport().appendChild(this.focusBt))},ol.interaction.GeolocationDraw=function(t){t||(t={}),this.geolocation=new ol.Geolocation({projection:"EPSG:4326",trackingOptions:{maximumAge:1e4,enableHighAccuracy:!0,timeout:6e5}}),this.geolocation.on("change",this.draw_.bind(this)),this.path_=[],this.lastPosition_=!1;var e=[255,255,255,1],o=[0,153,255,1],i=new ol.style.Circle({radius:6,fill:new ol.style.Fill({color:o}),stroke:new ol.style.Stroke({color:e,width:1.5})}),n=[new ol.style.Style({stroke:new ol.style.Stroke({color:e,width:5})}),new ol.style.Style({stroke:new ol.style.Stroke({color:o,width:3}),fill:new ol.style.Fill({color:[255,255,255,.5]})})],r=new ol.style.RegularShape({radius:10.5,points:3,rotation:0,fill:new ol.style.Fill({color:o}),stroke:new ol.style.Stroke({color:e,width:1.5})}),s=r.getImage(),a=s.getContext("2d"),l=document.createElement("canvas");l.width=l.height=s.width,l.getContext("2d").drawImage(s,0,0),a.clearRect(0,0,s.width,s.height),a.drawImage(l,0,0,s.width,s.height,3,0,s.width-6,s.height);this.locStyle={error:new ol.style.Style({fill:new ol.style.Fill({color:[255,0,0,.2]})}),warn:new ol.style.Style({fill:new ol.style.Fill({color:[255,192,0,.2]})}),ok:new ol.style.Style({fill:new ol.style.Fill({color:[0,255,0,.2]})})},this.overlayLayer_=new ol.layer.Vector({source:new ol.source.Vector,name:"GeolocationDraw overlay",style:t.style||function(t){return void 0===t.get("heading")?n[1].setImage(i):(n[1].setImage(r),r.setRotation(t.get("heading")||0)),n}}),this.sketch_=[new ol.Feature,new ol.Feature,new ol.Feature],this.overlayLayer_.getSource().addFeatures(this.sketch_),this.features_=t.features,this.source_=t.source,this.condition_=t.condition||function(t){return t.getAccuracy()e&&(r.push(o[a]),s=n)}return r[r.length-1]!==o[o.length-1]&&r.push(o[o.length-1]),t="Polygon"===this.get("type")?new ol.geom.Polygon([r],"XYZM"):new ol.geom.LineString(r,"XYZM")},ol.interaction.GeolocationDraw.prototype.setMap=function(t){this.getMap()&&this.getMap().removeLayer(this.overlayLayer_),ol.interaction.Pointer.prototype.setMap.call(this,t),this.overlayLayer_.setMap(t),t&&this.geolocation.setProjection(t.getView().getProjection())},ol.interaction.GeolocationDraw.prototype.setActive=function(t){if(t!==this.getActive()){if(ol.interaction.Interaction.prototype.setActive.call(this,t),this.overlayLayer_.setVisible(t),this.getMap()){this.geolocation.setTracking(t);try{this.getMap().renderSync()}catch(t){}}if(this.pause(!t),t)this.reset(),this.dispatchEvent({type:"drawstart",feature:this.sketch_[1]});else{var e=this.sketch_[1].clone();e.getGeometry()&&(this.features_&&this.features_.push(e),this.source_&&this.source_.addFeature(e)),this.dispatchEvent({type:"drawend",feature:e})}}},ol.interaction.GeolocationDraw.prototype.simulate=function(t,e){if(this._track&&clearTimeout(this._track.timeout),t){var o=(e=e||{}).delay||1e3;this._track={track:t,pos:0,timeout:setTimeout(function t(){if(this._track.pos>=this._track.track.length)this._track=!1;else{var i=this._track.track[this._track.pos];i[2]=i[3]||0,i[3]=(new Date).getTime(),this._track.pos++,!1!==e.repeat&&(this._track.pos=this._track.pos%this._track.track.length),this.getActive()&&this.draw_(!0,i,e.accuracy),this._track.timeout=setTimeout(t.bind(this),o)}}.bind(this),0)}}else this._track=!1},ol.interaction.GeolocationDraw.prototype.simulating=function(){return!!this._track},ol.interaction.GeolocationDraw.prototype.reset=function(){this.sketch_[1].setGeometry(),this.path_=[],this.lastPosition_=!1},ol.interaction.GeolocationDraw.prototype.start=function(){this.setActive(!0)},ol.interaction.GeolocationDraw.prototype.stop=function(){this.setActive(!1)},ol.interaction.GeolocationDraw.prototype.pause=function(t){this.pause_=!1!==t},ol.interaction.GeolocationDraw.prototype.isPaused=function(){return this.pause_},ol.interaction.GeolocationDraw.prototype.setFollowTrack=function(t){this.set("followTrack",t);var e,o=this.getMap();if(this.getActive()&&o)if("position"!==t&&(e=this.get("minZoom")?Math.max(this.get("minZoom"),o.getView().getZoom()):this.get("zoom")),!1===t||this.lastPosition_)"auto"===t&&this.lastPosition_&&o.getView().animate({center:this.lastPosition_,zoom:e});else{var i=this.path_[this.path_.length-1];i&&o.getView().animate({center:i,zoom:e})}this.lastPosition_=!1,this.dispatchEvent({type:"follow",following:!1!==t})},ol.interaction.GeolocationDraw.prototype.draw_=function(t,e,o){var i=this.getMap();if(i){var n,r,s,a,l;if(this._track){if(!0!==t)return;if(r=e,n=o||10,this.path_&&this.path_.length){var c=this.path_[this.path_.length-1];l=Math.atan2(e[0]-c[0],e[1]-c[1])}var h=new ol.geom.Circle(r,i.getView().getResolution()*n);s=ol.geom.Polygon.fromCircle(h)}else n=(a=this.geolocation).getAccuracy(),r=this.getPosition(a),s=a.getAccuracyGeometry(),l=a.getHeading();switch(this.get("followTrack")){case!0:1==this.get("followTrack")&&(this.get("minZoom")?this.get("minZoom")>i.getView().getZoom()&&i.getView().setZoom(this.get("minZoom")):i.getView().setZoom(this.get("zoom")||16),ol.extent.containsExtent(i.getView().calculateExtent(i.getSize()),s.getExtent())||i.getView().fit(s.getExtent())),i.getView().setCenter(r);break;case"position":i.getView().setCenter(r);break;case"auto":if(this.lastPosition_){var p=i.getView().getCenter();p[0]!=this.lastPosition_[0]||p[1]!=this.lastPosition_[1]?this.setFollowTrack(!1):(i.getView().setCenter(r),this.lastPosition_=r)}else i.getView().setCenter(r),this.get("minZoom")?this.get("minZoom")>i.getView().getZoom()&&i.getView().setZoom(this.get("minZoom")):this.get("zoom")&&i.getView().setZoom(this.get("zoom")),this.lastPosition_=r;break;case"visible":ol.extent.containsCoordinate(i.getView().calculateExtent(i.getSize()),r)||i.getView().setCenter(r)}var u,d=this.sketch_[0];if(d.setGeometry(s),n1?(u=new ol.geom.LineString(this.path_,"XYZM"),this.get("tolerance")&&(u=this.simplify3D(u,this.get("tolerance"))),d.setGeometry(u)):d.setGeometry();break;case"Polygon":this.path_.length>2?(u=new ol.geom.Polygon([this.path_],"XYZM"),this.get("tolerance")&&(u=this.simplify3D(u,this.get("tolerance"))),d.setGeometry(u)):d.setGeometry()}this.dispatchEvent({type:"drawing",feature:this.sketch_[1],geolocation:a})}this.sketch_[2].setGeometry(new ol.geom.Point(r)),this.sketch_[2].set("heading",l),this.dispatchEvent({type:"tracking",feature:this.sketch_[1],geolocation:a})}},ol.interaction.GeolocationDraw.prototype.getPosition=function(t){var e=t.getPosition();return e.push(Math.round(100*(t.getAltitude()||0))/100),e.push(Math.round((new Date).getTime()/1e3)),e},ol.interaction.Hover=function(t){t||(t={});var e=this,o=!1;ol.interaction.Interaction.call(this,{handleEvent:function(i){if(!e.getActive())return!0;switch(i.type){case"pointerdrag":o=!0;break;case"pointerup":o=!1;break;case"pointermove":o||e.handleMove_(i)}return!t.handleEvent||t.handleEvent(i)}}),this.setLayerFilter(t.layerFilter),t.layers&&t.layers.length&&this.setLayerFilter(function(e){return t.layers.indexOf(e)>=0}),this.setFeatureFilter(t.featureFilter),this.set("hitTolerance",t.hitTolerance),this.setCursor(t.cursor)},ol.ext.inherits(ol.interaction.Hover,ol.interaction.Interaction),ol.interaction.Hover.prototype.setMap=function(t){void 0!==this.previousCursor_&&this.getMap()&&(this.getMap().getTargetElement().style.cursor=this.previousCursor_,this.previousCursor_=void 0),ol.interaction.Interaction.prototype.setMap.call(this,t)},ol.interaction.Hover.prototype.setActive=function(t){if(ol.interaction.Interaction.prototype.setActive.call(this,t),this.cursor_&&this.getMap()&&this.getMap().getTargetElement()){var e=this.getMap().getTargetElement().style;void 0!==this.previousCursor_&&(e.cursor=this.previousCursor_,this.previousCursor_=void 0)}},ol.interaction.Hover.prototype.setCursor=function(t){!t&&void 0!==this.previousCursor_&&this.getMap()&&(this.getMap().getTargetElement().style.cursor=this.previousCursor_,this.previousCursor_=void 0),this.cursor_=t},ol.interaction.Hover.prototype.setFeatureFilter=function(t){this.featureFilter_="function"==typeof t?t:function(){return!0}},ol.interaction.Hover.prototype.setLayerFilter=function(t){this.layerFilter_="function"==typeof t?t:function(){return!0}},ol.interaction.Hover.prototype.handleMove_=function(t){var e=this.getMap();if(e){var o,i,n=this,r=e.forEachFeatureAtPixel(t.pixel,function(t,e){return n.featureFilter_.call(null,t,e)?(o=t,i=e,!0):(o=i=null,!1)},{hitTolerance:this.get("hitTolerance"),layerFilter:n.layerFilter_});if(r&&this.dispatchEvent({type:"hover",feature:o,layer:i,coordinate:t.coordinate,pixel:t.pixel,map:t.map,originalEvent:t.originalEvent,dragging:t.dragging}),this.feature_===o&&this.layer_===i||(this.feature_=o,this.layer_=i,o?this.dispatchEvent({type:"enter",feature:o,layer:i,coordinate:t.coordinate,pixel:t.pixel,map:t.map,originalEvent:t.originalEvent,dragging:t.dragging}):this.dispatchEvent({type:"leave",coordinate:t.coordinate,pixel:t.pixel,map:t.map,originalEvent:t.originalEvent,dragging:t.dragging})),this.cursor_){var s=e.getTargetElement().style;r?s.cursor!=this.cursor_&&(this.previousCursor_=s.cursor,s.cursor=this.cursor_):void 0!==this.previousCursor_&&(s.cursor=this.previousCursor_,this.previousCursor_=void 0)}}},ol.interaction.LongTouch=function(t){t||(t={}),this.delay_=t.delay||1e3;var e,o,i=t.handleLongTouchEvent||function(){},n=null,r=t.pixelTolerance||0;ol.interaction.Interaction.call(this,{handleEvent:function(t){if(this.getActive())switch(t.type){case"pointerdown":n&&clearTimeout(n),e=t.pixel,o={type:"longtouch",originalEvent:t.originalEvent,frameState:t.frameState,pixel:t.pixel,coordinate:t.coordinate,map:this.getMap()},n=setTimeout(function(){i(o),o.map.dispatchEvent(o)},this.delay_);break;case"pointerdrag":n&&(Math.abs(t.pixel[0]-e[0])>r||Math.abs(t.pixel[1]-e[1])>r)&&(clearTimeout(n),n=null);break;case"pointerup":n&&(clearTimeout(n),n=null)}else n&&(clearTimeout(n),n=null);return!0}})},ol.ext.inherits(ol.interaction.LongTouch,ol.interaction.Interaction),ol.interaction.Modify.prototype.getModifiedFeatures=function(){var t={};this.dragSegments_.forEach(function(e){var o=e[0].feature;window.ol&&window.ol.util?t[ol.util.getUid(o)]=o:t[ol.getUid(o)]=o});var e=[];for(var o in t)e.push(t[o]);return e},ol.interaction.ModifyFeature=function(t){var e,o;t||(t={}),ol.interaction.Pointer.call(this,{handleEvent:function(t){switch(t.type){case"pointerdown":return e=this.handleDownEvent(t),o=e||this._deleteCondition(t),!e;case"pointerup":return e=!1,this.handleUpEvent(t);case"pointerdrag":return!e||this.handleDragEvent(t);case"pointermove":return!!e||this.handleMoveEvent(t);case"singleclick":case"click":return!o;default:return!0}}}),this.snapDistance_=t.pixelTolerance||10,this.tolerance_=1e-10,this.cursor_=t.cursor,this.sources_=t.sources?t.sources instanceof Array?t.sources:[t.sources]:[],t.source&&this.sources_.push(t.source),t.features&&this.sources_.push(new ol.source.Vector({features:t.features})),this.filterSplit_=t.filter||function(){return!0},this._condition=t.condition||ol.events.condition.primaryAction,this._deleteCondition=t.deleteCondition||ol.events.condition.altKeyOnly,this._insertVertexCondition=t.insertVertexCondition||ol.events.condition.always;var i=function(){return[new ol.style.Style({image:new ol.style.Circle({radius:6,fill:new ol.style.Fill({color:[0,153,255,1]}),stroke:new ol.style.Stroke({color:"#FFF",width:1.25})})})]};t.style&&(i="function"==typeof t.style?t.style:function(){return t.style}),this.overlayLayer_=new ol.layer.Vector({source:new ol.source.Vector({useSpatialIndex:!1}),name:"Modify overlay",displayInLayerSwitcher:!1,style:i,wrapX:t.wrapX})},ol.ext.inherits(ol.interaction.ModifyFeature,ol.interaction.Pointer),ol.interaction.ModifyFeature.prototype.setMap=function(t){this.getMap()&&this.getMap().removeLayer(this.overlayLayer_),ol.interaction.Interaction.prototype.setMap.call(this,t),this.overlayLayer_.setMap(t)},ol.interaction.ModifyFeature.prototype.setActive=function(t){ol.interaction.Interaction.prototype.setActive.call(this,t),this.overlayLayer_&&this.overlayLayer_.getSource().clear()},ol.interaction.ModifyFeature.prototype.setFilter=function(t){"function"==typeof t?this.filterSplit_=t:void 0===t&&(this.filterSplit_=function(){return!0})},ol.interaction.ModifyFeature.prototype.getClosestFeature=function(t){for(var e,o,i=this.snapDistance_+1,n=0;nthis.snapDistance_)return this.currentFeature&&this.dispatchEvent({type:"select",selected:[],deselected:[this.currentFeature]}),this.currentFeature=null,!1;var l=this.getNearestCoord(o,e.getGeometry());if(l){l=l.coord;var c=this.getMap().getPixelFromCoordinate(l);return ol.coordinate.dist2d(t.pixel,c)2){for(o=c[1].getCoordinates(),i=2;n=c[i];i++){var h=n.getCoordinates();h.shift(),o=o.concat(h)}c=[c[0],new ol.geom.LineString(o)]}if(2===c.length){var p=c[0].getCoordinates(),u=c[1].getCoordinates(),d=p.length+u.length-1;p.pop(),u.shift(),a={geom:t,type:t.getType(),coord1:p,coord2:u,node:t.getCoordinates().length===d,closed:!1}}else if(1===c.length){n=c[0].getCoordinates();var g=ol.coordinate.equal(n[0],e),m=ol.coordinate.equal(n[n.length-1],e);g?(n.shift(),m&&n.pop(),a={geom:t,type:t.getType(),coord1:[],coord2:n,node:!0,closed:m}):m&&(n.pop(),a={geom:t,type:t.getType(),coord1:n,coord2:[],node:!0,closed:!1})}}break;case"MultiLineString":var f=t.getLineStrings();for(i=0;r=f[i];i++)if(a=this.getArcs(r,e)){a.geom=t,a.type=t.getType(),a.lstring=i;break}break;case"Polygon":var y=t.getLinearRings();for(i=0;r=y[i];i++)if(a=this.getArcs(r,e)){a.geom=t,a.type=t.getType(),a.index=i;break}break;case"MultiPolygon":var v=t.getPolygons();for(i=0;r=v[i];i++)if(a=this.getArcs(r,e)){a.geom=t,a.type=t.getType(),a.poly=i;break}break;case"GeometryCollection":for(s=t.getGeometries(),i=0;r=s[i];i++)if(a=this.getArcs(r,e)){a.geom=t,a.g=i,a.typeg=a.type,a.type=t.getType();break}break;default:console.error("ol/interaction/ModifyFeature "+t.getType()+" not supported!")}return a},ol.interaction.ModifyFeature.prototype.handleDownEvent=function(t){if(!this.getActive())return!1;var e=this.getClosestFeature(t);if(e&&(this._condition(t)||this._deleteCondition(t))){var o=[];return this.arcs=[],this.sources_.forEach(function(t){var i=ol.extent.buffer(ol.extent.boundingExtent([e.coord]),this.tolerance_);o=o.concat(o,t.getFeaturesInExtent(i))}.bind(this)),this._modifiedFeatures=[],o.forEach(function(o){var i=this.getArcs(o.getGeometry(),e.coord);i&&(this._insertVertexCondition(t)||i.node)&&(i.feature=o,this._modifiedFeatures.push(o),this.arcs.push(i))}.bind(this)),!this._modifiedFeatures.length||(this._deleteCondition(t)?!this._removePoint(e,t):(this.dispatchEvent({type:"modifystart",coordinate:e.coord,originalEvent:t.originalEvent,features:this._modifiedFeatures}),this.handleDragEvent({coordinate:e.coord,originalEvent:t.originalEvent}),!0))}return!1},ol.interaction.ModifyFeature.prototype.getModifiedFeatures=function(){return this._modifiedFeatures||[]},ol.interaction.ModifyFeature.prototype.removePoint=function(){this._removePoint({},{})},ol.interaction.ModifyFeature.prototype._getModification=function(t){var e=t.coord1.concat(t.coord2);switch(t.type){case"LineString":if(t.closed&&e.push(e[0]),e.length>1&&t.geom.getCoordinates().length!=e.length)return t.coords=e,!0;break;case"MultiLineString":if(t.closed&&e.push(e[0]),e.length>1){var o=t.geom.getCoordinates();if(o[t.lstring].length!=e.length)return o[t.lstring]=e,t.coords=o,!0}break;case"Polygon":if(t.closed&&e.push(e[0]),e.length>3&&(o=t.geom.getCoordinates())[t.index].length!=e.length)return o[t.index]=e,t.coords=o,!0;break;case"MultiPolygon":if(t.closed&&e.push(e[0]),e.length>3&&(o=t.geom.getCoordinates())[t.poly][t.index].length!=e.length)return o[t.poly][t.index]=e,t.coords=o,!0;break;case"GeometryCollection":t.type=t.typeg;var i=t.geom,n=i.getGeometries();t.geom=n[t.g];var r=this._getModification(t);return i.setGeometries(n),t.geom=i,t.type="GeometryCollection",r}return!1},ol.interaction.ModifyFeature.prototype._removePoint=function(t,e){if(!this.arcs)return!1;this.overlayLayer_.getSource().clear();var o=!1;return this.arcs.forEach(function(t){o=o||this._getModification(t)}.bind(this)),o&&(this.dispatchEvent({type:"modifystart",coordinate:t.coord,originalEvent:e.originalEvent,features:this._modifiedFeatures}),this.arcs.forEach(function(t){if("GeometryCollection"===t.geom.getType()){if(t.coords){var e=t.geom.getGeometries();e[t.g].setCoordinates(t.coords),t.geom.setGeometries(e)}}else t.coords&&t.geom.setCoordinates(t.coords)}.bind(this)),this.dispatchEvent({type:"modifyend",coordinate:t.coord,originalEvent:e.originalEvent,features:this._modifiedFeatures})),this.arcs=[],o},ol.interaction.ModifyFeature.prototype.handleUpEvent=function(t){return!!this.getActive()&&(!this.arcs||!this.arcs.length||(this.overlayLayer_.getSource().clear(),this.dispatchEvent({type:"modifyend",coordinate:t.coordinate,originalEvent:t.originalEvent,features:this._modifiedFeatures}),this.arcs=[],!0))},ol.interaction.ModifyFeature.prototype.setArcCoordinates=function(t,e){var o;switch(t.type){case"Point":t.geom.setCoordinates(e[0]);break;case"MultiPoint":(o=t.geom.getCoordinates())[t.index]=e[0],t.geom.setCoordinates(o);break;case"LineString":t.geom.setCoordinates(e);break;case"MultiLineString":(o=t.geom.getCoordinates())[t.lstring]=e,t.geom.setCoordinates(o);break;case"Polygon":(o=t.geom.getCoordinates())[t.index]=e,t.geom.setCoordinates(o);break;case"MultiPolygon":(o=t.geom.getCoordinates())[t.poly][t.index]=e,t.geom.setCoordinates(o);break;case"GeometryCollection":t.type=t.typeg;var i=t.geom,n=i.getGeometries();t.geom=n[t.g],this.setArcCoordinates(t,e),i.setGeometries(n),t.geom=i,t.type="GeometryCollection"}},ol.interaction.ModifyFeature.prototype.handleDragEvent=function(t){if(!this.getActive())return!1;if(!this.arcs)return!0;this.overlayLayer_.getSource().clear();var e=new ol.Feature(new ol.geom.Point(t.coordinate));return this.overlayLayer_.getSource().addFeature(e),!this.arcs.length||(this.arcs.forEach(function(e){var o=e.coord1.concat([t.coordinate],e.coord2);e.closed&&o.push(t.coordinate),this.setArcCoordinates(e,o)}.bind(this)),this.dispatchEvent({type:"modifying",coordinate:t.coordinate,originalEvent:t.originalEvent,features:this._modifiedFeatures}),!0)},ol.interaction.ModifyFeature.prototype.handleMoveEvent=function(t){if(!this.getActive())return!1;this.overlayLayer_.getSource().clear();var e=this.getClosestFeature(t);if(e){var o=new ol.Feature(new ol.geom.Point(e.coord));this.overlayLayer_.getSource().addFeature(o)}var i=t.map.getTargetElement();this.cursor_&&(e?i.style.cursor!=this.cursor_&&(this.previousCursor_=i.style.cursor,i.style.cursor=this.cursor_):void 0!==this.previousCursor_&&(i.style.cursor=this.previousCursor_,this.previousCursor_=void 0))},ol.interaction.ModifyFeature.prototype.getCurrentFeature=function(){return this.currentFeature},ol.interaction.ModifyTouch=function(t){var e=this;t||(t={}),this._popup=new ol.Overlay.Popup({popupClass:t.className||"modifytouch",positioning:t.positioning||"bottom-rigth",offsetBox:t.offsetBox||10}),this._source=t.source,this._features=t.features;var o=document.createElement("a");o.appendChild(document.createTextNode(t.title||"remove point")),o.onclick=function(){e.removePoint()},this.setPopupContent(o);var i=(t.pixelTolerance||0)+5;t.condition=function(t){var e,o,n=this.getMap().getFeaturesAtPixel(t.pixel,{hitTolerance:i}),r=!1;if(n){var s=this._features;if(!s){e=[t.pixel[0]-i,t.pixel[1]-i],o=[t.pixel[0]+i,t.pixel[1]+i],e=this.getMap().getCoordinateFromPixel(e),o=this.getMap().getCoordinateFromPixel(o);var a=ol.extent.boundingExtent([e,o]);s=this._source.getFeaturesInExtent(a)}s.getArray&&(s=s.getArray());for(var l,c=0;(l=n[c])&&!(s.indexOf(l)>=0);c++);if(l){e=t.pixel,o=l.getGeometry().getClosestPoint(t.coordinate),o=this.getMap().getPixelFromCoordinate(o);var h=e[0]-o[0],p=e[1]-o[1];r=Math.sqrt(h*h+p*p)1)return!1;var a=n.getGeometry().getClosestPoint(t.coordinate),l=a[0]-t.coordinate[0],c=a[1]-t.coordinate[1];return Math.sqrt(l*l+c*c)/t.frameState.viewState.resolution<5&&{feature:n,hit:a,coordinates:n.getGeometry().getCoordinates(),geom:n.getGeometry().clone(),geomType:s}}return!1},{hitTolerance:5})},ol.interaction.Offset.prototype.handleDownEvent_=function(t){return this.current_=this.getFeatureAtPixel_(t),!!this.current_&&(this.currentStyle_=this.current_.feature.getStyle(),this.source_&&(this.get("duplicate")||t.originalEvent.ctrlKey)?(this.current_.feature=this.current_.feature.clone(),this.current_.feature.setStyle(this._style(this.current_.feature)),this.source_.addFeature(this.current_.feature)):(this.current_.feature.setStyle(this._style(this.current_.feature)),this._modifystart=!0),this.dispatchEvent({type:"offsetstart",feature:this.current_.feature,offset:0}),!0)},ol.interaction.Offset.prototype.handleDragEvent_=function(t){this._modifystart&&(this.dispatchEvent({type:"modifystart",features:[this.current_.feature]}),this._modifystart=!1);var e,o,i,n,r=this.current_.geom.getClosestPoint(t.coordinate),s=ol.coordinate.dist2d(r,t.coordinate);switch(this.current_.geomType){case"Polygon":if(e=ol.coordinate.findSegment(r,this.current_.coordinates[0]).segment){o=[e[1][0]-e[0][0],e[1][1]-e[0][1]],i=[t.coordinate[0]-r[0],t.coordinate[1]-r[1]],o[0]*i[1]-o[1]*i[0]>0&&(s=-s),n=[];for(var a=0;a0&&(s=-s),n=ol.coordinate.offsetCoords(this.current_.coordinates,s),this.current_.feature.setGeometry(new ol.geom.LineString(n)))}this.dispatchEvent({type:"offsetting",feature:this.current_.feature,offset:s,segment:[r,t.coordinate],coordinate:t.coordinate})},ol.interaction.Offset.prototype.handleUpEvent_=function(t){this._modifystart||this.dispatchEvent({type:"offsetend",feature:this.current_.feature,coordinate:t.coordinate}),this.current_.feature.setStyle(this.currentStyle_),this.current_=!1},ol.interaction.Offset.prototype.handleMoveEvent_=function(t){this.getFeatureAtPixel_(t)?(!1===this.previousCursor_&&(this.previousCursor_=t.map.getTargetElement().style.cursor),t.map.getTargetElement().style.cursor="pointer"):(t.map.getTargetElement().style.cursor=this.previousCursor_,this.previousCursor_=!1)},ol.interaction.Ripple=function(t){ol.interaction.Pointer.call(this,{handleDownEvent:this.rainDrop,handleMoveEvent:this.rainDrop}),t=t||{},this.riprad=t.radius||3,this.ripplemap=[],this.last_map=[],this.rains(this.interval),t.layer.on(["postcompose","postrender"],this.postcompose_.bind(this))},ol.ext.inherits(ol.interaction.Ripple,ol.interaction.Pointer),ol.interaction.Ripple.prototype.rains=function(t){this.onrain&&clearTimeout(this.onrain);var e=this,o=("number"==typeof t?t:1e3)/2,i=3*o/2,n=Math.random;i&&function t(){e.width&&e.rainDrop([n()*e.width,n()*e.height]),e.onrain=setTimeout(t,n()*o+i)}()},ol.interaction.Ripple.prototype.rainDrop=function(t){if(this.width){var e,o;t.pixel?(e=t.pixel[0]*this.ratio,o=t.pixel[1]*this.ratio):(e=t[0]*this.ratio,o=t[1]*this.ratio),e<<=0;for(var i=(o<<=0)-this.riprad*this.ratio;i>1,this.half_height=this.height>>1,this.size=this.width*(this.height+2)*2,this.oldind=this.width,this.newind=this.width*(this.height+3);for(var l=0;l>1,i-=this.ripplemap[g],i-=i>>5,this.ripplemap[g]=i,i=1024-i,this.last_map[l]!=i&&(this.last_map[l]=i,e=((d-this.half_width)*i/1024<<0)+this.half_width,o=((u-this.half_height)*i/1024<<0)+this.half_height,e>=this.width&&(e=this.width-1),e<0&&(e=0),o>=this.height&&(o=this.height-1),o<0&&(o=0),r=4*(e+o*this.width),h[n=4*l]=p[r],h[n+1]=p[r+1],h[n+2]=p[r+2]),++l}s.putImageData(this.ripple,0,0),this.getMap().render()},ol.interaction.SelectCluster=function(t){t=t||{},this.pointRadius=t.pointRadius||12,this.circleMaxObjects=t.circleMaxObjects||10,this.maxObjects=t.maxObjects||60,this.spiral=!1!==t.spiral,this.animate=t.animate,this.animationDuration=t.animationDuration||500,this.selectCluster_=!1!==t.selectCluster,this._autoClose=!1!==t.autoClose;var e=this.overlayLayer_=new ol.layer.Vector({source:new ol.source.Vector({features:new ol.Collection,wrapX:t.wrapX,useSpatialIndex:!0}),name:"Cluster overlay",updateWhileAnimating:!0,updateWhileInteracting:!0,displayInLayerSwitcher:!1,style:t.featureStyle});if(t.layers)if("function"==typeof t.layers){var o=t.layers;t.layers=function(t){return t===e||o(t)}}else t.layers.push&&t.layers.push(this.overlayLayer_);if(t.filter){var i=t.filter;t.filter=function(t,e){return!(!e&&t.get("selectclusterlink"))&&i(t,e)}}else t.filter=function(t,e){return!(!e&&t.get("selectclusterlink"))};this.filter_=t.filter,this._autoClose||t.toggleCondition||(t.toggleCondition=ol.events.condition.singleClick),ol.interaction.Select.call(this,t),this.on("select",this.selectCluster.bind(this))},ol.ext.inherits(ol.interaction.SelectCluster,ol.interaction.Select),ol.interaction.SelectCluster.prototype.setMap=function(t){this.getMap()&&this.getMap().removeLayer(this.overlayLayer_),this._listener&&ol.Observable.unByKey(this._listener),this._listener=null,ol.interaction.Select.prototype.setMap.call(this,t),this.overlayLayer_.setMap(t),t&&t.getView()&&(this._listener=t.getView().on("change:resolution",this.clear.bind(this)))},ol.interaction.SelectCluster.prototype.clear=function(){this.getFeatures().clear(),this.overlayLayer_.getSource().clear()},ol.interaction.SelectCluster.prototype.getLayer=function(){return this.overlayLayer_},ol.interaction.SelectCluster.prototype.selectCluster=function(t){if(t instanceof ol.Feature&&(t={selected:[t]}),t.selected.length){var e=t.selected[0];if(!e.get("selectclusterfeature")){var o=this.overlayLayer_.getSource();this._autoClose&&o.clear();var i=e.get("features");if(i&&1!=i.length){this.selectCluster_||this.getFeatures().clear();var n,r,s,a,l,c,h,p=e.getGeometry().getCoordinates(),u=this.getMap().getView().getResolution(),d=[];if(!this.spiral||i.length<=this.circleMaxObjects)for(a=Math.min(i.length,this.circleMaxObjects),n=u*this.pointRadius*(.5+a/4),s=0;s{var e=t.get("selectcluserfeatures");e&&e.forEach(t=>{this.overlayLayer_.getSource().removeFeature(t)})})}},ol.interaction.SelectCluster.prototype.animateCluster_=function(t,e){if(this.listenerKey_&&ol.Observable.unByKey(this.listenerKey_),e.length){var o=this.overlayLayer_.getStyle(),i="function"==typeof o?o:o.length?function(){return o}:function(){return[o]},n=this.animationDuration||500,r=(new Date).getTime();this.listenerKey_=this.overlayLayer_.on(["postcompose","postrender"],function(o){for(var s,a=o.vectorContext||ol.render.getVectorContext(o),l=o.frameState.pixelRatio,c=this.getMap().getView().getResolution(),h=ol.easing.easeOut((o.frameState.time-r)/n),p=0;s=e[p];p++)if(s.get("features")){var u=s.getGeometry().getCoordinates();u[0]=t[0]+h*(u[0]-t[0]),u[1]=t[1]+h*(u[1]-t[1]);for(var d=new ol.geom.Point(u),g=i(s,c),m=0;m1)return ol.Observable.unByKey(this.listenerKey_),this.overlayLayer_.getSource().addFeatures(e),void this.overlayLayer_.changed();o.frameState.animate=!0}.bind(this));var s=new ol.Feature(new ol.geom.Point(this.getMap().getView().getCenter()));s.setStyle(new ol.style.Style({image:new ol.style.Circle({})})),this.overlayLayer_.getSource().addFeature(s)}},ol.interaction.SelectCluster.prototype.getClusterExtent=function(t){if(!t.get("features"))return null;var e=ol.extent.createEmpty();return t.get("features").forEach(function(t){e=ol.extent.extend(e,t.getGeometry().getExtent())}),e[0]===e[2]&&e[1]===e[3]?null:e},ol.interaction.SnapGuides=function(t){function e(t,e){var o=t[1][0]-t[0][0],i=t[1][1]-t[0][1],n=e[1][0]-e[0][0],r=e[1][1]-e[0][1],s=o*r-i*n;if(0!=s){var a=(o*t[0][1]-o*e[0][1]-i*t[0][0]+i*e[0][0])/s;return[e[0][0]+a*n,e[0][1]+a*r]}return!1}function o(t,e){var o=t[0]-e[0],i=t[1]-e[1];return Math.sqrt(o*o+i*i)}t||(t={}),this.snapDistance_=t.pixelTolerance||10,this.enableInitialGuides_=t.enableInitialGuides||!1;var i=[new ol.style.Style({stroke:new ol.style.Stroke({color:"#ffcc33",lineDash:[8,5],width:1.25})})];t.style&&(i=t.style instanceof Array?t.style:[t.style]),this.overlaySource_=new ol.source.Vector({features:new ol.Collection,useSpatialIndex:!1});var n=t.vectorClass||ol.layer.Vector;this.overlayLayer_=new n({renderMode:"image",source:this.overlaySource_,style:function(){return i},name:"Snap overlay",displayInLayerSwitcher:!1}),ol.interaction.Interaction.call(this,{handleEvent:function(t){if(this.getActive()){for(var i,n=this.overlaySource_.getFeatures(),r=null,s=null,a=t.frameState.viewState.resolution,l=0;i=n[l];l++){var c=i.getGeometry().getClosestPoint(t.coordinate);if(o(c,t.coordinate)/athis.projExtent_[2]&&(i[2]=this.projExtent_[2]),i[3]>this.projExtent_[3]&&(i[3]=this.projExtent_[3]);var r=t[0][0]-t[1][0],s=t[0][1]-t[1][1],a=1/Math.sqrt(r*r+s*s),l=function(o){for(var l,c=[],h=n*o*2,p=0;(o>0?ph)&&(l=e?[t[0][0]+s*a*p,t[0][1]-r*a*p]:[t[0][0]+r*a*p,t[0][1]+s*a*p],ol.extent.containsCoordinate(i,l));p+=n*o/100)c.push(l);return new ol.Feature(new ol.geom.LineString([c[0],c[c.length-1]]))},c=l(1),h=l(-1);return this.overlaySource_.addFeature(c),this.overlaySource_.addFeature(h),[c,h]}},ol.interaction.SnapGuides.prototype.addOrthoGuide=function(t){return this.addGuide(t,!0)},ol.interaction.SnapGuides.prototype.setDrawInteraction=function(t){var e=this,o=0,i=[];function n(t){var n=t.target.getCoordinates();switch(t.target.getType()){case"Point":return;case"Polygon":n=n[0].slice(0,-1)}var r=n.length;if(2===r&&e.enableInitialGuides_){var s=n[0][0],a=n[0][1];n=[[s,a],[s,a-1]]}if(r!=o&&(e.enableInitialGuides_?r>=2:r>2)){e.clearGuides(i);try{var l=n[r-2],c=n[r-2-1];r>2&&(l[0]!==c[0]||l[1]!==c[1])&&(i=e.addOrthoGuide([n[r-2],n[r-2-1]])),i=(i=i.concat(e.addGuide([n[0],n[1]]))).concat(e.addOrthoGuide([n[0],n[1]])),o=r}catch(t){}}}t.on("drawstart",function(t){t.feature.getGeometry().on("change",n)}),t.on(["drawend","change:active"],function(t){e.clearGuides(i),t.feature&&t.feature.getGeometry().un("change",n),o=0,i=[]})},ol.interaction.SnapGuides.prototype.setModifyInteraction=function(t){function e(t,e){return(t%e+e)%e}var o=this,i=[];function n(t){var n=t.target.vertexFeature_;if(n){var r=t.target.getModifiedFeatures()[0].getGeometry(),s=r.getCoordinates();switch(r.getType()){case"Point":return;case"Polygon":s=s[0].slice(0,-1)}var a=n.getGeometry().getCoordinates(),l=s.findIndex(function(t){return t[0]===a[0]&&t[1]===a[1]}),c=s.length;o.clearGuides(i),i=(i=(i=(i=o.addOrthoGuide([s[e(l-1,c)],s[e(l-2,c)]])).concat(o.addGuide([s[e(l-1,c)],s[e(l-2,c)]]))).concat(o.addGuide([s[e(l+1,c)],s[e(l+2,c)]]))).concat(o.addOrthoGuide([s[e(l+1,c)],s[e(l+2,c)]]))}}t.on("modifystart",function(t){setTimeout(n,0,t)}),t.on("modifyend",function(){o.clearGuides(i),i=[]})},ol.interaction.SnapLayerPixel=function(t){t=t||{},this._layer=t.layer,this._layer.on(["postcompose","postrender"],function(t){this._ctx=t.context}.bind(this));var e=t.radius||8,o=2*e;ol.interaction.Interaction.call(this,{handleEvent:function(t){if(this._layer.getVisible()&&this._layer.getOpacity()&&ol.events.condition.altKeyOnly(t)&&this.getMap()){var i,n,r,s,a=t.pixel[0]-e,l=t.pixel[1]-e,c=this._ctx.getImageData(a,l,o,o).data,h=-1,p=[];for(i=0;i10?u:0)}for(i=1;ih&&(h=d,r=i,s=n)}t.pixel=[a+r,l+s],t.coordinate=this.getMap().getCoordinateFromPixel(t.pixel)}return!0}})},ol.ext.inherits(ol.interaction.SnapLayerPixel,ol.interaction.Interaction),ol.interaction.Split=function(t){t||(t={}),ol.interaction.Interaction.call(this,{handleEvent:function(t){switch(t.type){case"singleclick":return this.handleDownEvent(t);case"pointermove":return this.handleMoveEvent(t);default:return!0}}}),this.snapDistance_=t.snapDistance||25,this.tolerance_=t.tolerance||1e-10,this.cursor_=t.cursor,this.sources_=t.sources?t.sources instanceof Array?t.sources:[t.sources]:[],t.features&&this.sources_.push(new ol.source.Vector({features:t.features})),this.filterSplit_=t.filter||function(){return!0};var e=[255,255,255,1],o=[0,153,255,1],i=new ol.style.Fill({color:"rgba(255,255,255,0.4)"}),n=new ol.style.Stroke({color:"#3399CC",width:1.25}),r=[new ol.style.Style({image:new ol.style.Circle({fill:i,stroke:n,radius:5}),fill:i,stroke:n})],s=[new ol.style.Style({stroke:new ol.style.Stroke({color:e,width:5})}),new ol.style.Style({image:new ol.style.Circle({radius:6,fill:new ol.style.Fill({color:o}),stroke:new ol.style.Stroke({color:e,width:1.5})}),stroke:new ol.style.Stroke({color:o,width:3})})];t.sketchStyle&&(r=t.sketchStyle instanceof Array?t.sketchStyle:[t.sketchStyle]),t.featureStyle&&(s=t.featureStyle instanceof Array?t.featureStyle:[t.featureStyle]),this.overlayLayer_=new ol.layer.Vector({source:new ol.source.Vector({useSpatialIndex:!1}),name:"Split overlay",displayInLayerSwitcher:!1,style:function(t){return t._sketch_?r:s}})},ol.ext.inherits(ol.interaction.Split,ol.interaction.Interaction),ol.interaction.Split.prototype.setMap=function(t){this.getMap()&&this.getMap().removeLayer(this.overlayLayer_),ol.interaction.Interaction.prototype.setMap.call(this,t),this.overlayLayer_.setMap(t)},ol.interaction.Split.prototype.getClosestFeature=function(t){var e,o,i,n,r=this.snapDistance_+1;if(this.sources_.forEach(function(s){var a=s.getClosestFeatureToCoordinate(t.coordinate);if(a&&a.getGeometry().splitAt){var l=a.getGeometry().getClosestPoint(t.coordinate),c=new ol.geom.LineString([t.coordinate,l]),h=c.getLength()/t.frameState.viewState.resolution;hthis.snapDistance_)return!1;var s=this.getNearestCoord(i,o.getGeometry().getCoordinates()),a=this.getMap().getPixelFromCoordinate(s);return ol.coordinate.dist2d(t.pixel,a)1){var n=[];for(o=0;o1)return!1;var c=((t[0][1]-e[1][1])*i-(t[0][0]-e[1][0])*r)/a;if(Math.abs(c)1)return!1;var h=t[0][0]*t[1][1]-t[0][1]*t[1][0],p=e[0][0]*e[1][1]-e[0][1]*e[1][0];return[(h*n-p*i)/a,(h*s-p*r)/a]},ol.interaction.Splitter.prototype.splitSource=function(t,e){this.getActive()&&(this.splitting||(this.source_.dispatchEvent({type:"beforesplit",feaure:t,source:this.source_}),this.dispatchEvent({type:"beforesplit",feaure:t,source:this.source_}),e?this._splitSource(t):setTimeout(function(){this._splitSource(t)}.bind(this))))},ol.interaction.Splitter.prototype._splitSource=function(t){var e,o,i;this.splitting=!0,this.added_=[],this.removed_=[];var n,r=t.getGeometry().getCoordinates(),s=[];function a(e){if(e!==t)for(var o=e.getGeometry().getCoordinates(),i=0;i1))return h=e,!0}return!1}for(e=0;e1){for(o=0;o30&&!this.isout_&&(this.lastSparkle=t.frameState.time,this.sparkles.push({p:[this.sparkle[0]+15*Math.random()-7.5,this.sparkle[1]+15*Math.random()],o:1})),e.save(),e.scale(t.frameState.pixelRatio,t.frameState.pixelRatio),e.fillStyle=this.get("color");for(var i,n=this.sparkles.length-1;i=this.sparkles[n];n--){if(i.o<.2){this.sparkles.splice(0,n+1);break}e.globalAlpha=i.o,e.beginPath(),e.arc(i.p[0],i.p[1],2.2,0,2*Math.PI,!1),e.fill(),i.o*=.98,i.p[0]+=Math.random()-.5,i.p[1]+=o*(1+Math.random())/30}e.restore(),this.sparkles.length&&this.getMap().render()},ol.interaction.TouchCompass=function(t){t=t||{};var e={handleDownEvent:function(t){var e=this.getCenter_(),o=t.pixel[0]-e[0],i=t.pixel[1]-e[1];return this.start=t,Math.sqrt(o*o+i*i)this.get("maxButtons")&&this.set("maxButtons",t.buttons.length);var o=this.overlay.element,i=t.buttons.length>4?0:1;t.buttons.forEach(function(t,e){e<5&&ol.ext.element.create("DIV",{className:((t.className||"")+" ol-button ol-button-"+(e+i)).trim(),html:ol.ext.element.create("DIV",{html:t.html}),click:t.click,on:t.on,parent:o})})}var n=!1,r=!1;this.on("dragstart",function(t){return this._pixel=this.getMap().getPixelFromCoordinate(this.overlay.getPosition()),r=t,!t.overlay}),this.on("dragend",function(t){return this._pixel=this.getMap().getPixelFromCoordinate(this.overlay.getPosition()),!t.overlay||(n?(this.dispatchEvent({type:"dragend",dragging:n,originalEvent:t.originalEvent,frameState:t.frameState,pixel:this._pixel,coordinate:this.overlay.getPosition()}),n=!1):t.originalEvent.target===this.overlay.element&&this.dispatchEvent({type:"click",dragging:n,originalEvent:t.originalEvent,frameState:t.frameState,pixel:this._pixel,coordinate:this.overlay.getPosition()}),!1)}.bind(this)),this.on("dragging",function(t){return this._pixel=this.getMap().getPixelFromCoordinate(this.overlay.getPosition()),!t.overlay||(n=!0,r&&(this.dispatchEvent({type:"dragstart",dragging:n,originalEvent:r.originalEvent,frameState:t.frameState,pixel:this._pixel,coordinate:r.coordinate}),r=!1),this.dispatchEvent({type:"dragging",dragging:n,originalEvent:t.originalEvent,frameState:t.frameState,pixel:this._pixel,coordinate:this.overlay.getPosition()}),!1)}.bind(this))},ol.ext.inherits(ol.interaction.TouchCursor,ol.interaction.DragOverlay),ol.interaction.TouchCursor.prototype.setMap=function(t){for(var e in this.getMap()&&(this.getMap().removeInteraction(this.ctouch),this.getActive()&&this.getMap().removeOverlay(this.overlay)),this._listeners)ol.Observable.unByKey(this._listeners[e]);this._listeners={},ol.interaction.DragOverlay.prototype.setMap.call(this,t),t&&(this.getActive()&&(t.addOverlay(this.overlay),setTimeout(function(){this.setPosition(this.getPosition()||t.getView().getCenter())}.bind(this))),t.addInteraction(this.ctouch),this._listeners.addInteraction=t.getInteractions().on("add",function(e){e.element.get("onTop")||(t.removeInteraction(this.ctouch),t.addInteraction(this.ctouch))}.bind(this)))},ol.interaction.TouchCursor.prototype.setActive=function(t,e){t!==this.getActive()?(this.ctouch.setActive(t),t?(this.getMap()&&this.getMap().addOverlay(this.overlay),e?this.setPosition(e):this.getMap()&&this.setPosition(this.getMap().getView().getCenter()),this._activate=setTimeout(function(){this.overlay.element.classList.add("active")}.bind(this),100)):(this.setPosition(),this.overlay.element.classList.remove("active"),this._activate&&clearTimeout(this._activate),this.getMap()&&this.getMap().removeOverlay(this.overlay)),ol.interaction.DragOverlay.prototype.setActive.call(this,t)):e?this.setPosition(e):this.getMap()&&this.setPosition(this.getMap().getView().getCenter())},ol.interaction.TouchCursor.prototype.setPosition=function(t){this.overlay.setPosition(t,!0),this.getMap()&&t&&(this._pixel=this.getMap().getPixelFromCoordinate(t))},ol.interaction.TouchCursor.prototype.offsetPosition=function(t){var e=this.overlay.getPosition();e&&this.overlay.setPosition([e[0]+t[0],e[1]+t[1]])},ol.interaction.TouchCursor.prototype.getPosition=function(){return this.overlay.getPosition()},ol.interaction.TouchCursor.prototype.getPixel=function(){if(this.getMap())return this.getMap().getPixelFromCoordinate(this.getPosition())},ol.interaction.TouchCursor.prototype.getOverlay=function(){return this.overlay},ol.interaction.TouchCursor.prototype.getOverlayElement=function(){return this.overlay.element},ol.interaction.TouchCursor.prototype.getButtonElement=function(t){return"number"==typeof t?this.getOverlayElement().getElementsByClassName("ol-button")[t]:this.getOverlayElement().getElementsByClassName(t)[0]},ol.interaction.TouchCursor.prototype.removeButton=function(t){if(void 0===t)for(var e=this.getOverlayElement().getElementsByClassName("ol-button"),o=e.length-1;o>=0;o--)this.getOverlayElement().removeChild(e[o]);else{var i=this.getButtonElement(t);i&&this.getOverlayElement().removeChild(i)}},ol.interaction.TouchCursor.prototype.addButton=function(t){var e=this.getOverlayElement().getElementsByClassName("ol-button"),o=this.get("maxButtons")||5;if(e.length>=o)console.error("[ol/interaction/TouchCursor~addButton] too many button on the cursor (max="+o+")...");else{var i=ol.ext.element.create("DIV",{className:((t.className||"")+" ol-button").trim(),html:ol.ext.element.create("DIV",{html:t.html}),click:t.click,on:t.on});t.before&&0!==e.length?this.getOverlayElement().insertBefore(i,e[0]):this.getOverlayElement().appendChild(i);for(var n=e.length>=o?0:1,r=0;r=0&&(this.ispt_&&this.get("translate")||this.get("translateFeature"))&&(e.handle="translate"),e.handle){this.mode_=e.handle,this.opt_=e.option,this.constraint_=e.constraint;var i=this.getMap().getView().getRotation();this.coordinate_=t.coordinate,this.pixel_=t.pixel,this.geoms_=[],this.rotatedGeoms_=[];for(var n,r=ol.extent.createEmpty(),s=ol.extent.createEmpty(),a=0;n=this.selection_.item(a);a++)if(this.geoms_.push(n.getGeometry().clone()),r=ol.extent.extend(r,n.getGeometry().getExtent()),this.get("enableRotatedTransform")&&0!==i){var l=this.getGeometryRotateToZero_(n,!0);this.rotatedGeoms_.push(l),s=ol.extent.extend(s,l.getExtent())}if(this.extent_=ol.geom.Polygon.fromExtent(r).getCoordinates()[0],this.get("enableRotatedTransform")&&0!==i&&(this.rotatedExtent_=ol.geom.Polygon.fromExtent(s).getCoordinates()[0]),"rotate"===this.mode_){this.center_=this.getCenter()||ol.extent.getCenter(r);var c=t.map.getTargetElement();c.style.cursor=this.Cursors.rotate0,this.previousCursor_=c.style.cursor}else this.center_=ol.extent.getCenter(r);return this.angle_=Math.atan2(this.center_[1]-t.coordinate[1],this.center_[0]-t.coordinate[0]),this.dispatchEvent({type:this.mode_+"start",feature:this.selection_.item(0),features:this.selection_,pixel:t.pixel,coordinate:t.coordinate}),!0}if(this.get("selection")){if(o){this.addFn_(t)||this.selection_.clear();var h=this.selection_.getArray().indexOf(o);h<0?this.selection_.push(o):this.selection_.removeAt(h)}else this.selection_.clear();return this.ispt_=1===this.selection_.getLength()&&"Point"==this.selection_.item(0).getGeometry().getType(),this.iscircle_=1===this.selection_.getLength()&&"Circle"==this.selection_.item(0).getGeometry().getType(),this.drawSketch_(),this.watchFeatures_(),this.dispatchEvent({type:"select",feature:o,features:this.selection_,pixel:t.pixel,coordinate:t.coordinate}),!1}}},ol.interaction.Transform.prototype.getFeatures=function(){return this.selection_},ol.interaction.Transform.prototype.getCenter=function(){return this.get("center")},ol.interaction.Transform.prototype.setCenter=function(t){return this.set("center",t)},ol.interaction.Transform.prototype.handleDragEvent_=function(t){if(this._handleEvent(t,this.features_)){var e,o,i,n,r=this.getMap().getView().getRotation(),s=[this.coordinate_[0],this.coordinate_[1]],a=[t.coordinate[0],t.coordinate[1]];switch(this.isUpdating_=!0,this.mode_){case"rotate":var l=Math.atan2(this.center_[1]-a[1],this.center_[0]-a[0]);if(!this.ispt)for(e=0;i=this.selection_.item(e);e++)(n=this.geoms_[e].clone()).rotate(l-this.angle_,this.center_),"Circle"==n.getType()&&n.setCenterAndRadius(n.getCenter(),n.getRadius()),i.setGeometry(n);this.drawSketch_(!0),this.dispatchEvent({type:"rotating",feature:this.selection_.item(0),features:this.selection_,angle:l-this.angle_,pixel:t.pixel,coordinate:t.coordinate});break;case"translate":var c=a[0]-s[0],h=a[1]-s[1];for(e=0;i=this.selection_.item(e);e++)i.getGeometry().translate(c,h);this.handles_.forEach(function(t){t.getGeometry().translate(c,h)}),this.coordinate_=t.coordinate,this.dispatchEvent({type:"translating",feature:this.selection_.item(0),features:this.selection_,delta:[c,h],pixel:t.pixel,coordinate:t.coordinate});break;case"scale":var p=this.center_;if(this.get("modifyCenter")(t)){var u=this.extent_;this.get("enableRotatedTransform")&&0!==r&&(u=this.rotatedExtent_),p=u[(Number(this.opt_)+2)%4]}var d=1==this.geoms_.length&&this._isRectangle(this.geoms_[0]),g=this.constraint_,m=this.opt_,f=this.coordinate_,y=t.coordinate;if(this.get("enableRotatedTransform")&&0!==r){var v=new ol.geom.Point(this.coordinate_);v.rotate(-1*r,p),f=v.getCoordinates();var _=new ol.geom.Point(t.coordinate);_.rotate(-1*r,p),y=_.getCoordinates()}var x=(y[0]-p[0])/(f[0]-p[0]),b=(y[1]-p[1])/(f[1]-p[1]),w=[y[0]-f[0],y[1]-f[1]];if(this.get("enableRotatedTransform")&&0!==r){var S=new ol.geom.Point(p);S.rotate(-1*r,this.getMap().getView().getCenter()),p=S.getCoordinates()}for(this.get("noFlip")&&(x<0&&(x=-x),b<0&&(b=-b)),this.constraint_?"h"==this.constraint_?x=1:b=1:this.get("keepAspectRatio")(t)&&(x=b=Math.min(x,b)),e=0;i=this.selection_.item(e);e++)(n=0!==r&&this.get("enableRotatedTransform")?this.rotatedGeoms_[e].clone():this.geoms_[e].clone()).applyTransform(function(t,e,i){if(i<2)return e;if(d){var r=[[6],[0,8],[2],[4]],s=[t[0],t[1]],a=[t[2],t[3]],l=[t[4],t[5]],c=[t[6],t[7]],h=[t[8],t[9]];if(g){var u=m%2==0?countVector(s,a):countVector(c,s),f=projectVectorOnVector(w,u),v=[...r[m],...r[m+1this.get("maxLength");)this.shift();if(this.get("maxSize"))for(;this.length()>1&&this.size()>this.get("maxSize");)this.shift()},ol.interaction.UndoRedo.prototype.getStack=function(t){return"redo"===t?this._redo:this._undo},ol.interaction.UndoRedo.prototype.push=function(t,e,o){return this._defs[t]?(this._undoStack.push({type:t,name:o,custom:!0,prop:e}),!0):(console.warn('[UndoRedoInteraction]: "'+t+'" is not defined.'),!1)},ol.interaction.UndoRedo.prototype.shift=function(){this._doShift=!0;var t=this._undoStack.removeAt(0);if(this._doShift=!1,"blockstart"===t.type)for(t=this._undoStack.item(0);this._undoStack.getLength()&&t.level>0;)this._undoStack.removeAt(0),t=this._undoStack.item(0)},ol.interaction.UndoRedo.prototype.setActive=function(t){ol.interaction.Interaction.prototype.setActive.call(this,t),this._record=t},ol.interaction.UndoRedo.prototype.setMap=function(t){this._mapListener&&this._mapListener.forEach(function(t){ol.Observable.unByKey(t)}),this._mapListener=[],ol.interaction.Interaction.prototype.setMap.call(this,t),t&&(this._mapListener.push(t.on("undoblockstart",this.blockStart.bind(this))),this._mapListener.push(t.on("undoblockend",this.blockEnd.bind(this)))),this._watchSources(),this._watchInteractions()},ol.interaction.UndoRedo.prototype._watchSources=function(){var t=this.getMap();this._sourceListener&&this._sourceListener.forEach(function(t){ol.Observable.unByKey(t)}),this._sourceListener=[];var e=this;t&&(function t(o,i){return i||(i=[]),o.forEach(function(o){o instanceof ol.layer.Vector?(!e._layers||e._layers.indexOf(o)>=0)&&i.push(o):o.getLayers&&t(o.getLayers(),i)}),i}(t.getLayers()).forEach(function(t){var e=t.getSource();this._sourceListener.push(e.on(["addfeature","removefeature"],this._onAddRemove.bind(this))),this._sourceListener.push(e.on("clearstart",function(){this.blockStart("clear")}.bind(this))),this._sourceListener.push(e.on("clearend",this.blockEnd.bind(this)))}.bind(this)),this._sourceListener.push(t.getLayers().on(["add","remove"],this._watchSources.bind(this))))},ol.interaction.UndoRedo.prototype._watchInteractions=function(){var t=this.getMap();this._interactionListener&&this._interactionListener.forEach(function(t){ol.Observable.unByKey(t)}),this._interactionListener=[],t&&(t.getInteractions().forEach(function(t){this._interactionListener.push(t.on(["setattributestart","modifystart","rotatestart","translatestart","scalestart","deletestart","deleteend","beforesplit","aftersplit"],this._onInteraction.bind(this)))}.bind(this)),this._interactionListener.push(t.getInteractions().on(["add","remove"],this._watchInteractions.bind(this))))},ol.interaction.UndoRedo.prototype._onAddRemove=function(t){this._record&&(this._redoStack.clear(),this._redo.length=0,this._undoStack.push({type:t.type,source:t.target,feature:t.feature}))},ol.interaction.UndoRedo.prototype._onInteraction=function(t){var e=this._onInteraction[t.type];e&&e.call(this,t)},ol.interaction.UndoRedo.prototype._onInteraction.setattributestart=function(t){this.blockStart(t.target.get("name")||"setattribute");var e=Object.assign({},t.properties);t.features.forEach(function(t){var o={};for(var i in e)o[i]=t.get(i);this._undoStack.push({type:"changeattribute",feature:t,newProperties:e,oldProperties:o})}.bind(this)),this.blockEnd()},ol.interaction.UndoRedo.prototype._onInteraction.rotatestart=ol.interaction.UndoRedo.prototype._onInteraction.translatestart=ol.interaction.UndoRedo.prototype._onInteraction.scalestart=ol.interaction.UndoRedo.prototype._onInteraction.modifystart=function(t){this.blockStart(t.type.replace(/start$/,"")),t.features.forEach(function(t){this._undoStack.push({type:"changegeometry",feature:t,oldGeom:t.getGeometry().clone()})}.bind(this)),this.blockEnd()},ol.interaction.UndoRedo.prototype.blockStart=function(t){this._redoStack.clear(),this._redo.length=0,this._undoStack.push({type:"blockstart",name:t}),this._level++},ol.interaction.UndoRedo.prototype._onInteraction.beforesplit=function(){var t=this._undoStack.getLength();t>2&&"blockend"===this._undoStack.item(t-1).type&&"changegeometry"===this._undoStack.item(t-2).type?this._undoStack.pop():this.blockStart("split")},ol.interaction.UndoRedo.prototype._onInteraction.deletestart=function(){this.blockStart("delete")},ol.interaction.UndoRedo.prototype.blockEnd=function(){this._undoStack.push({type:"blockend"}),this._level--},ol.interaction.UndoRedo.prototype._onInteraction.aftersplit=ol.interaction.UndoRedo.prototype._onInteraction.deleteend=ol.interaction.UndoRedo.prototype.blockEnd,ol.interaction.UndoRedo.prototype._handleDo=function(t,e){if(this.getActive()){if(this._record=!1,t.custom)this._defs[t.type]?e?this._defs[t.type].undo(t.prop):this._defs[t.type].redo(t.prop):console.warn('[UndoRedoInteraction]: "'+t.type+'" is not defined.');else switch(t.type){case"addfeature":e?t.source.removeFeature(t.feature):t.source.addFeature(t.feature);break;case"removefeature":e?t.source.addFeature(t.feature):t.source.removeFeature(t.feature);break;case"changegeometry":var o=t.feature.getGeometry();t.feature.setGeometry(t.oldGeom),t.oldGeom=o;break;case"changeattribute":var i=t.newProperties,n=t.oldProperties;for(var r in n)void 0===n?t.feature.unset(r):t.feature.set(r,n[r]);t.oldProperties=i,t.newProperties=n;break;case"blockstart":this._block+=e?-1:1;break;case"blockend":this._block+=e?1:-1;break;default:console.warn('[UndoRedoInteraction]: "'+t.type+'" is not defined.')}this._block<0&&(this._block=0),this._block&&(e?this.undo():this.redo()),this._record=!0,this.dispatchEvent({type:e?"undo":"redo",action:t})}},ol.interaction.UndoRedo.prototype.undo=function(){var t=this._undoStack.item(this._undoStack.getLength()-1);t&&(this._redoStack.push(t),this._undoStack.pop(),this._handleDo(t,!0))},ol.interaction.UndoRedo.prototype.redo=function(){var t=this._redoStack.item(this._redoStack.getLength()-1);t&&(this._undoStack.push(t),this._redoStack.pop(),this._handleDo(t,!1))},ol.interaction.UndoRedo.prototype.clear=function(){this._doClear=!0,this._undo.length=this._redo.length=0,this._undoStack.clear(),this._redoStack.clear(),this._doClear=!1,this.dispatchEvent({type:"stack:clear"})},ol.interaction.UndoRedo.prototype.hasUndo=function(){return this._undoStack.getLength()},ol.interaction.UndoRedo.prototype.hasRedo=function(){return this._redoStack.getLength()},ol.source.BinBase=function(t){t=t||{},this._bindModify=this._onModifyFeature.bind(this),this._watch=!0,ol.source.Vector.call(this,t),this._origin=t.source,this._listen=!1!==t.listenChange,this._geomFn=t.geometryFunction||ol.coordinate.getFeatureCenter||function(t){return t.getGeometry().getFirstCoordinate()},this.reset(),this._origin.on("addfeature",this._onAddFeature.bind(this)),this._origin.on("removefeature",this._onRemoveFeature.bind(this)),this._origin.on("clearstart",this._onClearFeature.bind(this)),this._origin.on("clearend",this._onClearFeature.bind(this)),"function"==typeof t.flatAttributes&&(this._flatAttributes=t.flatAttributes)},ol.ext.inherits(ol.source.BinBase,ol.source.Vector),ol.source.BinBase.prototype._onAddFeature=function(t,e,o){var i=t.feature||t.target;(e=e||this.getBinAt(this._geomFn(i),!0))&&e.get("features").push(i),this._listen&&!1!==o&&i.on("change",this._bindModify)},ol.source.BinBase.prototype._onRemoveFeature=function(t,e,o){if(this._watch){var i=t.feature||t.target;if(e=e||this.getBinAt(this._geomFn(i))){for(var n,r=e.get("features"),s=0;n=r[s];s++)if(n===i){r.splice(s,1);break}r.length||this.removeFeature(e)}this._listen&&!1!==o&&i.un("change",this._bindModify)}},ol.source.BinBase.prototype._onClearFeature=function(t){"clearstart"===t.type?(this._listen&&this._origin.getFeatures().forEach(function(t){t.un("change",this._bindModify)}.bind(this)),this.clear(),this._watch=!1):this._watch=!0},ol.source.BinBase.prototype.getBin=function(t){for(var e,o=this.getFeatures(),i=0;e=o[i];i++)for(var n,r=e.get("features"),s=0;n=r[s];s++)if(n===t)return e;return null},ol.source.BinBase.prototype.getGridGeomAt=function(t){return new ol.geom.Polygon([t])},ol.source.BinBase.prototype.getBinAt=function(t,e){var o={},i=this.getGridGeomAt(t,o);if(!i)return null;var n=i.getInteriorPoint?i.getInteriorPoint().getCoordinates():i.getInteriorPoints().getCoordinates()[0],r=this.getFeaturesAtCoordinate(n)[0];return!r&&e&&(o.geometry=i,o.features=[],o.center=n,r=new ol.Feature(o),this.addFeature(r)),r||null},ol.source.BinBase.prototype._onModifyFeature=function(t){var e=this.getBin(t.target),o=this.getBinAt(this._geomFn(t.target),"create");e!==o&&(e&&this._onRemoveFeature(t,e,!1),o&&this._onAddFeature(t,o,!1)),this.changed()},ol.source.BinBase.prototype.reset=function(){this.clear();for(var t,e=this._origin.getFeatures(),o=0;t=e[o];o++)this._onAddFeature({feature:t});this.changed()},ol.source.BinBase.prototype.getGridFeatures=function(){var t=[];return this.getFeatures().forEach(function(e){var o=new ol.Feature(e.getGeometry().clone());for(var i in e.getProperties())"features"!==i&&"geometry"!==i&&o.set(i,e.get(i));o.set("nb",e.get("features").length),this._flatAttributes(o,e.get("features")),t.push(o)}.bind(this)),t},ol.source.BinBase.prototype._flatAttributes=function(){},ol.source.BinBase.prototype.setFlatAttributesFn=function(t){"function"==typeof t&&(this._flatAttributes=t)},ol.source.BinBase.prototype.getSource=function(){return this._origin},ol.source.DBPedia=function(t){var e=t||{};e.loader=this._loaderFn,this._url=e.url||"http://fr.dbpedia.org/sparql",this._maxResolution=e.maxResolution||100,this._lang=e.lang||"fr",this._limit=e.limit||1e3,e.attributions||(e.attributions=["© DBpedia CC-by-SA"]),e.strategy||(e.strategy=ol.loadingstrategy.bbox),ol.source.Vector.call(this,e)},ol.ext.inherits(ol.source.DBPedia,ol.source.Vector),ol.source.DBPedia.prototype.readFeature=function(t,e,o){for(var i in e)"uri"===e[i].type&&(e[i].value=encodeURI(e[i].value)),t.set(i,e[i].value);return!o||o.get("subject")!=e.subject.value||(o.set("type",o.get("type")+"\n"+e.type.value),!1)},ol.source.DBPedia.prototype.querySubject=function(){return"?subject rdfs:label ?label. OPTIONAL {?subject dbpedia-owl:thumbnail ?thumbnail}.OPTIONAL {?subject dbpedia-owl:abstract ?abstract} . OPTIONAL {?subject rdf:type ?type}"},ol.source.DBPedia.prototype.queryFilter=function(){return"lang(?label) = '"+this._lang+"' && lang(?abstract) = '"+this._lang+"'"},ol.source.DBPedia.prototype._loaderFn=function(t,e,o){if(!(e>this._maxResolution)){var i=this,n=ol.proj.transformExtent(t,o,"EPSG:4326"),r="PREFIX geo: SELECT DISTINCT * WHERE { ?subject geo:lat ?lat . ?subject geo:long ?long . "+this.querySubject()+" . FILTER("+this.queryFilter()+") . FILTER(xsd:float(?lat) <= "+n[3]+" && "+n[1]+" <= xsd:float(?lat) && xsd:float(?long) <= "+n[2]+" && "+n[0]+" <= xsd:float(?long) ) . } LIMIT "+this._limit;ol.ext.Ajax.get({url:this._url,data:{query:r,format:"json"},success:function(t){var e,n,r,s=t.results.bindings,a=[],l=null;for(var c in s)e=s[c],n=[Number(s[c].long.value),Number(s[c].lat.value)],r=new ol.Feature(new ol.geom.Point(ol.proj.transform(n,"EPSG:4326",o))),i.readFeature(r,e,l)&&(a.push(r),l=r);i.addFeatures(a)}})}},ol.style.clearDBPediaStyleCache,ol.style.dbPediaStyleFunction,function(){var t={};ol.style.clearDBPediaStyleCache=function(){t={}},ol.style.dbPediaStyleFunction=function(e){var o;switch(e||(e={}),typeof e.glyph){case"function":o=e.glyph;break;case"string":o=function(){return e.glyph};break;default:o=function(t){var e=t.get("type");if(e){if(e.match("/Museum"))return"fa-camera";if(e.match("/Monument"))return"fa-building";if(e.match("/Sculpture"))return"fa-android";if(e.match("/Religious"))return"fa-institution";if(e.match("/Castle"))return"fa-key";if(e.match("Water"))return"fa-tint";if(e.match("Island"))return"fa-leaf";if(e.match("/Event"))return"fa-heart";if(e.match("/Artwork"))return"fa-asterisk";if(e.match("/Stadium"))return"fa-futbol-o";if(e.match("/Place"))return"fa-street-view"}return"fa-star"}}var i=e.radius||8,n=e.fill||new ol.style.Fill({color:"navy"}),r=e.stroke||new ol.style.Stroke({color:"#fff",width:2}),s=e.prefix?e.prefix+"_":"";return function(e){var a=o(e),l=s+a,c=t[l];return c||(t[l]=c=new ol.style.Style({image:new ol.style.FontSymbol({glyph:a,radius:i,fill:n,stroke:r})})),[c]}}}(),ol.source.DFCI=function(t){(t=t||{}).loader=this._calcGrid,t.strategy=function(t,e){return this.resolution&&this.resolution!=e&&(this.clear(),this.refresh()),[t]},this._bbox=[[0,16e5],[11e5,26e5]],ol.source.Vector.call(this,t),this.set("resolutions",t.resolutions||[1e3,100,20]),proj4.defs["EPSG:27572"]||proj4.defs("EPSG:27572","+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"),ol.proj.proj4.register(proj4)},ol.ext.inherits(ol.source.DFCI,ol.source.Vector),ol.source.DFCI.prototype._calcGrid=function(t,e,o){var i,n,r=this.get("resolutions");e>(r[0]||1e3)?this.resolution!=e&&(this._features0||(n=[this._bbox[0][0],this._bbox[0][1],this._bbox[1][0],this._bbox[1][1]],this._features0=this._getFeatures(0,n,o)),this.addFeatures(this._features0)):e>(r[1]||100)?(this.clear(),n=ol.proj.transformExtent(t,o,"EPSG:27572"),i=this._getFeatures(1,n,o),this.addFeatures(i)):e>(r[2]||0)?(this.clear(),n=ol.proj.transformExtent(t,o,"EPSG:27572"),i=this._getFeatures(2,n,o),this.addFeatures(i)):(this.clear(),n=ol.proj.transformExtent(t,o,"EPSG:27572"),i=this._getFeatures(3,n,o),this.addFeatures(i)),this.resolution=e},ol.source.DFCI.prototype._midPt=function(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]},ol.source.DFCI.prototype._trFeature=function(t,e,o,i){var n=new ol.geom.Polygon([t]),r=new ol.Feature(n.transform("EPSG:27572",i));return r.set("id",e),r.set("level",o),r},ol.source.DFCI.prototype._getFeatures=function(t,e,o){var i,n=[],r=1e5;t>0&&(r/=5),t>1&&(r/=10);for(var s=[Math.max(this._bbox[0][0],Math.floor(e[0]/r)*r),Math.max(this._bbox[0][1],Math.floor(e[1]/r)*r)],a=[Math.min(this._bbox[1][0]+99999,Math.floor(e[2]/r)*r),Math.min(this._bbox[1][1]+99999,Math.floor(e[3]/r)*r)],l=s[0];l<=a[0];l+=r)for(var c=s[1];c<=a[1];c+=r){var h,p=[[l,c],[l+r,c],[l+r,c+r],[l,c+r],[l,c]];if(t>2){var u=this._midPt(p[0],p[2]),d=[];for(i=0;i=-180;v-=d)c.push([v,y]);c.push(c[0])}if("daynight"===n){var _=[];c.forEach(function(t){_.push(t.slice())}),_[0][1]=-_[0][1],_[_.length-1][1]=-_[0][1],_[_.length-1][1]=-_[0][1],c=[c,_]}return c}}(),ol.source.Delaunay=function(t){t=t||{},this._nodes=t.source,delete t.source,ol.source.Vector.call(this,t),this.hull=[],this._nodes.on("addfeature",this._onAddNode.bind(this)),this._nodes.on("removefeature",this._onRemoveNode.bind(this)),this.set("epsilon",t.epsilon||1e-4)},ol.ext.inherits(ol.source.Delaunay,ol.source.Vector),ol.source.Delaunay.prototype.clear=function(t){ol.source.Vector.prototype.clear.call(this,t),this.getNodeSource().clear(t)},ol.source.Delaunay.prototype._addTriangle=function(t){t.push(t[0]);var e=new ol.Feature(new ol.geom.Polygon([t]));return this.addFeature(e),this.flip.push(e),e},ol.source.Delaunay.prototype.getNodes=function(){return this._nodes.getFeatures()},ol.source.Delaunay.prototype.getNodeSource=function(){return this._nodes},ol.source.Delaunay.prototype._onRemoveNode=function(t){var e=t.feature.getGeometry().getCoordinates();if(e&&!this.getNodesAt(e).length){var o,i=this.getTrianglesAt(e);this.flip=[];for(var n=[];i.length;){var r=i.pop();this.removeFeature(r),r=r.getGeometry().getCoordinates()[0];var s=[];for(o=0;o<3;o++)l=r[o],ol.coordinate.equal(l,e)||s.push(l);n.push(s)}for(s=n.pop(),o=0;;){var a=n[o];if(f(a[0],a[1],0)||f(a[1],a[0],0)||f(a[0],a[1],s.length-1)||f(a[1],a[0],s.length-1)?(n.splice(o,1),o=0):o++,!n.length)break;if(o>=n.length)throw"[DELAUNAY:removePoint] No edge found"}var l,c=ol.coordinate.equal(s[0],s[s.length-1]);for(c&&s.pop();l=this.hull[o];o++)if(ol.coordinate.equal(e,l)){this.hull.splice(o,1);break}this.hull=ol.coordinate.convexHull(this.hull.concat(s));var h,p=function(t){for(var e,o=0,i=0;i=0?1:-1},u=s.slice();for(c?h=p(s):(u.push(e),h=p(u)),o=0;o<=s.length+1&&!(s.length<3);o++){var d=[s[o%s.length],s[(o+1)%s.length],s[(o+2)%s.length]];if(p(d)===h){for(var g=!0,m=o+3;m1)this._nodes.removeFeature(i);else if(n.length<=3){if(3===n.length){var s=[];for(e=0;e<3;e++)s.push(n[e].getGeometry().getCoordinates());this._addTriangle(s),this.hull=ol.coordinate.convexHull(s)}}else{var a=this.getFeaturesAtCoordinate(r)[0];if(a){this.removeFeature(a),a.set("del",!0);var l=a.getGeometry().getCoordinates()[0];for(e=0;e<3;e++)this._addTriangle([r,l[e],l[(e+1)%3]])}else{var c=this.hull.slice();for(c.push(r),c=ol.coordinate.convexHull(c),e=0;(o=c[e])&&!ol.coordinate.equal(o,r);e++);var h=c[e=0!==e?e-1:c.length-1],p=c[(e+2)%c.length];for(e=0;(o=this.hull[e])&&!ol.coordinate.equal(o,h);e++);for(;;){if(e>1e3){console.error("[DELAUNAY:addPoint] Too many iterations");break}if(e++,o=this.hull[e%this.hull.length],this._addTriangle([r,o,h]),h=o,o[0]===p[0]&&o[1]===p[1])break}this.hull=c}this.flipTriangles()}}else this._nodes.removeFeature(i)},ol.source.Delaunay.prototype.flipTriangles=function(){for(var t,e=1e3;this.flip.length;){if(e--<0){console.error("[DELAUNAY:flipTriangles] Too many iterations");break}var o=this.flip.pop();if(!o.get("del"))for(var i=o.getGeometry().getCoordinates()[0],n=0;n<3;n++){var r=[(i[(n+1)%3][0]+i[n][0])/2,(i[(n+1)%3][1]+i[n][1])/2],s=this.getTrianglesAt(r),a=null;if(s.length>1){var l=s[0].getGeometry().getCoordinates()[0],c=s[1].getGeometry().getCoordinates()[0];for(t=0;tGéoportail © IGN-France',ol.source.Geoportail.prototype.serviceURL=function(){return this._server?this._server.replace(/^(https?:\/\/[^/]*)(.*)$/,"$1/"+this._gppKey+"$2"):(window.geoportailConfig?window.geoportailConfig.url:"https://wxs.ign.fr/")+this._gppKey+"/geoportail/wmts"},ol.source.Geoportail.prototype.getGPPKey=function(){return this._gppKey},ol.source.Geoportail.prototype.setGPPKey=function(t,e){this._gppKey=t;var o=this.serviceURL();this.setTileUrlFunction(function(){var t=ol.source.Geoportail.prototype.getTileUrlFunction().apply(this,arguments);if(t){var e=t.split("?");return o+"?"+e[1]}return t}),e&&this.setTileLoadFunction(ol.source.Geoportail.tileLoadFunctionWithAuthentication(e,this.getFormat()))},ol.source.Geoportail.prototype.getFeatureInfoUrl=function(t,e,o,i){i=i||{},o||(o=this.getProjection());var n=this.tileGrid.getTileCoordForCoordAndResolution(t,e),r=this.getTileUrlFunction()(n,1,o);if(!r)return r;var s=this.tileGrid.getResolution(n[0]),a=this.tileGrid.getTileCoordExtent(n),l=Math.floor((t[0]-a[0])/(s/1)),c=Math.floor((a[3]-t[1])/(s/1));return r.replace(/Request=GetTile/i,"Request=getFeatureInfo")+"&INFOFORMAT="+(i.INFO_FORMAT||"text/plain")+"&I="+l+"&J="+c},ol.source.Geoportail.prototype.getFeatureInfo=function(t,e,o){var i=this.getFeatureInfoUrl(t,e,null,o);ol.ext.Ajax.get({url:i,dataType:o.format||"text/plain",options:{encode:!1},success:function(t){o.callback&&o.callback(t)},error:o.error||function(){}})},ol.source.Geoportail.tileLoadFunctionWithAuthentication=function(t,e){if(t)return function(o,i){var n=new XMLHttpRequest;n.open("GET",i),n.setRequestHeader("Authorization","Basic "+t),n.responseType="arraybuffer",n.onload=function(){var t=new Uint8Array(this.response),i=new Blob([t],{type:e}),n=(window.URL||window.webkitURL).createObjectURL(i);o.getImage().src=n},n.onerror=function(){o.getImage().src=""},n.send()}},ol.source.GridBin=function(t){t=t||{},ol.source.BinBase.call(this,t),this.set("gridProjection",t.gridProjection||"EPSG:4326"),this.set("size",t.size||1)},ol.ext.inherits(ol.source.GridBin,ol.source.BinBase),ol.source.GridBin.prototype.setGridProjection=function(t){this.set("gridProjection",t),this.reset()},ol.source.GridBin.prototype.setSize=function(t){this.set("size",t),this.reset()},ol.source.GridBin.prototype.getGridGeomAt=function(t){t=ol.proj.transform(t,this.getProjection()||"EPSG:3857",this.get("gridProjection"));var e=this.get("size"),o=e*Math.floor(t[0]/e),i=e*Math.floor(t[1]/e);return new ol.geom.Polygon([[[o,i],[o+e,i],[o+e,i+e],[o,i+e],[o,i]]]).transform(this.get("gridProjection"),this.getProjection()||"EPSG:3857")},ol.source.HexBin=function(t){t=t||{},this._hexgrid=new ol.HexGrid(t),ol.source.BinBase.call(this,t)},ol.ext.inherits(ol.source.HexBin,ol.source.BinBase),ol.source.HexBin.prototype.getGridGeomAt=function(t){var e=this._hexgrid.coord2hex(t);return new ol.geom.Polygon([this._hexgrid.getHexagon(e)])},ol.source.HexBin.prototype.setSize=function(t,e){this._hexgrid.setSize(t),e||this.reset()},ol.source.HexBin.prototype.getSize=function(){return this._hexgrid.getSize()},ol.source.HexBin.prototype.setLayout=function(t,e){this._hexgrid.setLayout(t),e||this.reset()},ol.source.HexBin.prototype.getLayout=function(){return this._hexgrid.getLayout()},ol.source.HexBin.prototype.setOrigin=function(t,e){this._hexgrid.setOrigin(t),e||this.reset()},ol.source.HexBin.prototype.getOrigin=function(){return this._hexgrid.getOrigin()},ol.source.HexBin.prototype.getHexFeatures=function(){return ol.source.BinBase.prototype.getGridFeatures.call(this)},ol.source.IDW=function(t){(t=t||{}).canvasFunction=this.calculateImage,this._source=t.source,this._canvas=document.createElement("CANVAS"),this._source.on(["addfeature","removefeature","clear","removefeature"],function(){this.changed()}.bind(this)),ol.source.ImageCanvas.call(this,t),this.set("scale",t.scale||4),this._weight="function"==typeof t.weight?t.weight:function(e){return e.get(t.weight||"weight")}},ol.ext.inherits(ol.source.IDW,ol.source.ImageCanvas),ol.source.IDW.prototype.getSource=function(){return this._source},ol.source.IDW.prototype.hue2rgb=function(t){return(t=(t+6)%6)<1?Math.round(255*t):t<3?255:t<4?Math.round(255*(4-t)):0},ol.source.IDW.prototype.getColor=function(t){var e=4-.04*t;return[this.hue2rgb(e+2),this.hue2rgb(e),this.hue2rgb(e-2),255]},ol.source.IDW.prototype.setData=function(t,e,o){var i=this.getColor(t);e[o]=i[0],e[o+1]=i[1],e[o+2]=i[2],e[o+3]=i[3]},ol.source.IDW.prototype.getValue=function(t){if(!this._canvas)return null;var e=this.transform(t);return this._canvas.getContext("2d").getImageData(Math.round(e[0]),Math.round(e[1]),1,1).data},ol.source.IDW.prototype.calculateImage=function(t,e,o,i){if(!this._source)return this._canvas;var n,r,s=document.createElement("CANVAS"),a=s.width=Math.round(i[0]/(this.get("scale")*o)),l=s.height=Math.round(i[1]/(this.get("scale")*o)),c=s.getContext("2d"),h=c.getImageData(0,0,a,l),p=[],u=a/(t[2]-t[0]),d=l/(t[1]-t[3]),g=this.transform=function(e,o){return[(e[0]-t[0])*u,(e[1]-t[3])*d,o]};for(this._source.getFeatures().forEach(function(t){p.push(g(t.getGeometry().getFirstCoordinate(),this._weight(t)))}.bind(this)),r=0;rMapillary"]),e.strategy||(e.strategy=ol.loadingstrategy.bbox),ol.source.Vector.call(this,e)},ol.ext.inherits(ol.source.Mapillary,ol.source.Vector),ol.source.Mapillary.prototype.readFeature=function(){return!0},ol.source.Mapillary.prototype._loaderFn=function(t,e,o){if(!(e>this._maxResolution)){var i=ol.proj.transformExtent(t,o,"EPSG:4326"),n=Date.now()-15552e6,r="https://a.mapillary.com/v2/search/im?client_id="+this.get("clientId")+"&max_lat="+i[3]+"&max_lon="+i[2]+"&min_lat="+i[1]+"&min_lon="+i[0]+"&limit="+(this._limit-1)+"&start_time="+n;ol.ext.Ajax.get({url:r,dataType:"jsonp",success:function(t){console.log(t)}})}},ol.source.OilPainting=function(t){t.operation=this._operation,t.operationType="image",ol.source.Raster.call(this,t),this.set("radius",t.radius||4),this.set("intensity",t.intensity||25),this.on("beforeoperations",function(t){var e=Math.round((t.extent[2]-t.extent[0])/t.resolution),o=Math.round((t.extent[3]-t.extent[1])/t.resolution);t.data.image=new ImageData(e,o),t.data.radius=Number(this.get("radius"))||1,t.data.intensity=Number(this.get("intensity"))}.bind(this))},ol.ext.inherits(ol.source.OilPainting,ol.source.Raster),ol.source.OilPainting.prototype.set=function(t,e){if(e)switch(t){case"intensity":case"radius":(e=Number(e))<1&&(e=1),this.changed()}return ol.source.Raster.prototype.set.call(this,t,e)},ol.source.OilPainting.prototype._operation=function(t,e){for(var o=t[0].width,i=t[0].height,n=t[0].data,r=[],s=e.image,a=s.data,l=[],c=[],h=0;h0&&h+v0&&p+_this._maxResolution)){var i=this,n=ol.proj.transformExtent(t,o,"EPSG:4326"),r="[bbox:"+(n=n[1]+","+n[0]+","+n[3]+","+n[2])+"][out:xml][timeout:25];";for(var s in r+="(",this._types)if(this._types[s]){r+=s;for(var a,l=0;a=this._filter[l];l++)r+="["+a+"]";r+=";"}r+=");out;>;out skel qt;";var c=new XMLHttpRequest;c.open("POST",this._url,!0),c.onload=function(){for(var t,e=(new ol.format.OSMXML).readFeatures(this.responseText,{featureProjection:o}),n=[],r=0;t=e[r];r++)i.hasFeature(t)||n.push(t);i.addFeatures(n)},c.onerror=function(){console.log(arguments)},c.send("data="+r)}},ol.source.Overpass.prototype.hasFeature=function(t){for(var e,o=t.getGeometry().getFirstCoordinate(),i=t.getId(),n=this.getFeaturesInExtent([o[0]-.1,o[1]-.1,o[0]+.1,o[1]+.1]),r=0;e=n[r];r++)if(i===e.getId())return!0;return!1},ol.source.TileWFS=function(t){(t=t||{}).featureLimit||(t.featureLimit=1/0);var e=t.tileZoom||14,o={strategy:ol.loadingstrategy.tile(ol.tilegrid.createXYZ({minZoom:e,maxZoom:e,tileSize:512}))},i=new ol.format.GeoJSON,n=t.url+"?service=WFS&request=GetFeature&version="+(t.version||"1.1.0")+"&typename="+(t.typeName||"")+"&outputFormat=application/json";t.maxFeatures&&(n+="&maxFeatures="+t.maxFeatures+"&count="+t.maxFeatures);var r={loading:0,loaded:0};o.loader=function(e,o,s){r.loading===r.loaded&&(r.loading=r.loaded=0,this.getFeatures().length>t.maxFeatures&&(this.clear(),this.refresh())),r.loading++,this.dispatchEvent({type:"tileloadstart",loading:r.loading,loaded:r.loaded}),this._loadTile(n,e,s,i,r)},ol.source.Vector.call(this,o),this.set("pagination",t.pagination)},ol.ext.inherits(ol.source.TileWFS,ol.source.Vector),ol.source.TileWFS.prototype._loadTile=function(t,e,o,i,n){var r=t+"&srsname="+o.getCode()+"&bbox="+e.join(",")+","+o.getCode();this.get("pagination")&&!/&startIndex/.test(t)&&(r+="&startIndex=0"),ol.ext.Ajax.get({url:r,success:function(r){if(n.loaded++,r.error)this.dispatchEvent({type:"tileloaderror",error:r,loading:n.loading,loaded:n.loaded});else{var s=i.readFeatures(r,{featureProjection:o});s.length>0&&this.addFeatures(s);var a=r.numberReturned||0;/&startIndex/.test(t)&&(a+=parseInt(t.replace(/.*&startIndex=(\d*).*/,"$1")),t=t.replace(/&startIndex=(\d*)/,"")),athis.get("maxResolution"))){if(this.res_=400*e,this.animate_){var o=t.frameState.time-this.animate_;othis.animateDuration_&&(this.animate_=!1),!!this.animate_},ol.layer.Vector3D.prototype._getFeatureHeight=function(t){if(this.animate_){var e=this.height_(t),o=this.toHeight_(t);return e*(1-this.elapsedRatio_)+this.elapsedRatio_*o}return this.height_(t)},ol.layer.Vector3D.prototype.hvector_=function(t,e){var o=[t[0]*this.matrix_[0]+t[1]*this.matrix_[1]+this.matrix_[4],t[0]*this.matrix_[2]+t[1]*this.matrix_[3]+this.matrix_[5]];return{p0:o,p1:[o[0]+e/this.res_*(o[0]-this.center_[0]),o[1]+e/this.res_*(o[1]-this.center_[1])]}},ol.layer.Vector3D.prototype.getFeature3D_=function(t,e){var o=this.get("geometry")(t),i=o.getCoordinates();switch(o.getType()){case"Polygon":i=[i];case"MultiPolygon":for(var n=[],r=0;r=0;r--)t.lineTo(n[r].p1[0],n[r].p1[1]);t.closePath()}t.fill("evenodd"),t.stroke();break;case"Point":var a=(n=e[o]).feature.get("label");if(a){var l=n.geom.p1,c=t.measureText(a),h=Number(t.font.match(/\d+(\.\d+)?/g).join([]));t.fillRect(l[0]-c.width/2-5,l[1]-h-5,c.width+10,h+10),t.strokeRect(l[0]-c.width/2-5,l[1]-h-5,c.width+10,h+10),t.save(),t.fillStyle=ol.color.asString(this._style.getText().getFill().getColor()),t.textAlign="center",t.textBaseline="bottom",t.fillText(a,l[0],l[1]),t.restore()}}},ol.source.WikiCommons=function(t){var e=t||{};e.loader=this._loaderFn,this._maxResolution=e.maxResolution||100,this._lang=e.lang||"fr",this._limit=e.limit||100,e.attributions||(e.attributions=["© Wikimedia Commons"]),e.strategy||(e.strategy=ol.loadingstrategy.bbox),ol.source.Vector.call(this,e)},ol.ext.inherits(ol.source.WikiCommons,ol.source.Vector),ol.source.WikiCommons.prototype.readFeature=function(t,e){return t.set("descriptionurl",e.descriptionurl),t.set("url",e.url),t.set("title",e.title.replace(/^file:|.jpg$/gi,"")),t.set("thumbnail",e.url.replace(/^(.+wikipedia\/commons)\/([a-zA-Z0-9]\/[a-zA-Z0-9]{2})\/(.+)$/,"$1/thumb/$2/$3/200px-$3")),t.set("user",e.user),e.extmetadata&&e.extmetadata.LicenseShortName&&t.set("copy",e.extmetadata.LicenseShortName.value),!0},ol.source.WikiCommons.prototype._loaderFn=function(t,e,o){if(!(e>this._maxResolution)){var i=this,n=ol.proj.transformExtent(t,o,"EPSG:4326"),r="https://commons.wikimedia.org/w/api.php?action=query&format=json&origin=*&prop=coordinates|imageinfo&generator=geosearch&iiprop=timestamp|user|url|extmetadata|metadata|size&iiextmetadatafilter=LicenseShortName&ggsbbox="+n[3]+"|"+n[0]+"|"+n[1]+"|"+n[2]+"&ggslimit="+this._limit+"&iilimit="+(this._limit-1)+"&ggsnamespace=6";ol.ext.Ajax.get({url:r,success:function(t){var e,n,r,s=[];if(t.query&&t.query.pages){for(var a in t.query.pages){if((e=t.query.pages[a]).coordinates&&e.coordinates.length)n=[e.coordinates[0].lon,e.coordinates[0].lat];else{var l=e.imageinfo[0].metadata;if(!l)continue;n=[];for(var c=0,h=0;h1e3)return void this.stopAnimation();s=r.start=(new Date).getTime()}if(r.start){var h=t.vectorContext||ol.render.getVectorContext(t),p=(s-r.start)/e;p>1&&(this.stopAnimation(),p=1),p=this.get("animationMethod")(p);var u=this.getStyle(),d="function"==typeof u?u:u.length?function(){return u}:function(){return[u]};for(t.context.save(),t.context.globalAlpha=this.getOpacity(),o=0;c=r.clusters[o];o++){var g=c.f.getGeometry().getCoordinates(),m=g[0]-c.pt[0],f=g[1]-c.pt[1];r.revers?(g[0]=c.pt[0]+p*m,g[1]=c.pt[1]+p*f):(g[0]=g[0]-p*m,g[1]=g[1]-p*f);var y=d(c.f,n,!0);if(y.length||(y=[y]),1!==c.f.get("features").length||m||f){var v=new ol.geom.Point(g);l=new ol.Feature(v)}else l=c.f.get("features")[0];for(var _,x=0;_=y[x];x++)if(_.getText()&&/\n/.test(_.getText().getText())){var b,w=_.getText().getOffsetX(),S=_.getText().getOffsetY(),C=_.getText().getRotation()||0,M=1.2*Number((_.getText().getFont()||"10px").match(/\d+/)),E=_.getText().getText().split("\n"),T=E.length-1,L=_.clone();E.forEach(function(e,o){switch(1==o&&(L.setImage(),L.setFill(),L.setStroke()),_.getText().getTextBaseline()){case"alphabetic":case"ideographic":case"bottom":b=T;break;case"hanging":case"top":b=0;break;default:b=T/2}L.getText().setOffsetX(w-Math.sin(C)*M*(o-b)),L.getText().setOffsetY(S+Math.cos(C)*M*(o-b)),L.getText().setText(e),h.drawFeature(l,ol.ext.getVectorContextStyle(t,L))})}else h.drawFeature(l,ol.ext.getVectorContextStyle(t,_))}t.context.restore(),t.frameState.animate=!0,t.context.save(),t.context.beginPath(),t.context.rect(0,0,0,0),t.context.clip(),this.clip_=!0}}},ol.layer.AnimatedCluster.prototype.postanimate=function(t){this.clip_&&(t.context.restore(),this.clip_=!1)},ol.layer.GeoImage=function(t){ol.layer.Image.call(this,t)},ol.ext.inherits(ol.layer.GeoImage,ol.layer.Image),ol.layer.GeoImage.prototype.getExtent=function(){return this.getSource().getExtent()},ol.layer.Geoportail=function(t,e,o){e=e||{},o=o||{},"string"!=typeof t&&(o=e||{},t=(e=t).layer);var i=e.maxZoom;e.source&&(t=e.source.getLayer(),e.gppKey=e.source.getGPPKey());var n=window.geoportailConfig&&(window.geoportailConfig.capabilities[e.gppKey||e.key]||window.geoportailConfig.capabilities.default)||ol.layer.Geoportail.capabilities;for(var r in(n=n[t])||(n=ol.layer.Geoportail.capabilities[t]),n||(n={title:t,originators:[]},console.error('ol.layer.Geoportail: no layer definition for "'+t+'"\nTry to use ol/layer/Geoportail~loadCapabilities() to get it.')),n)void 0===o[r]&&(o[r]=n[r]);this._originators=n.originators,o.gppKey||o.key||(o.gppKey=e.gppKey||e.key),e.source||(e.source=new ol.source.Geoportail(t,o)),e.title||(e.title=n.title),e.name||(e.name=t),e.layer=t,e.queryable||(e.queryable=n.queryable),e.desc||(e.desc=n.desc),!e.extent&&n.bbox&&n.bbox[0]>-170&&n.bbox[2]<170&&(e.extent=ol.proj.transformExtent(n.bbox,"EPSG:4326",e.projection||"EPSG:3857")),e.maxZoom=i,!e.maxResolution&&o.minZoom&&(e.source.getTileGrid().minZoom-=o.minZoom>1?2:1,e.maxResolution=e.source.getTileGrid().getResolution(e.source.getTileGrid().minZoom),e.source.getTileGrid().minZoom=o.minZoom),ol.layer.Tile.call(this,e)},ol.ext.inherits(ol.layer.Geoportail,ol.layer.Tile),ol.layer.Geoportail.capabilities={"GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2":{key:"cartes",server:"https://wxs.ign.fr/geoportail/wmts",layer:"GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2",title:"Plan IGN v2",format:"image/png",style:"normal",queryable:!1,tilematrix:"PM",minZoom:0,maxZoom:19,bbox:[-175,-85,175,85],desc:"Cartographie multi-échelles sur le territoire national, issue des bases de données vecteur de l’IGN, mis à jour régulièrement et réalisée selon un processus entièrement automatisé. Version actuellement en beta test",originators:{IGN:{href:"http://www.ign.fr",attribution:"Institut national de l'information géographique et forestière",logo:"https://wxs.ign.fr/static/logos/IGN/IGN.gif",minZoom:0,maxZoom:19,constraint:[{minZoom:0,maxZoom:19,bbox:[-175,-85,175,85]}]}}},"CADASTRALPARCELS.PARCELLAIRE_EXPRESS":{key:"parcellaire",server:"https://wxs.ign.fr/geoportail/wmts",layer:"CADASTRALPARCELS.PARCELLAIRE_EXPRESS",title:"PCI vecteur",format:"image/png",style:"PCI vecteur",queryable:!1,tilematrix:"PM",minZoom:0,maxZoom:19,bbox:[-63.37252,-21.475586,55.925865,51.31212],desc:"Plan cadastral informatisé vecteur de la DGFIP.",originators:{IGN:{href:"http://www.ign.fr",attribution:"Institut national de l'information géographique et forestière",logo:"https://wxs.ign.fr/static/logos/IGN/IGN.gif",minZoom:0,maxZoom:19,constraint:[{minZoom:0,maxZoom:19,bbox:[-63.37252,-21.475586,55.925865,51.31212]}]}}},"ORTHOIMAGERY.ORTHOPHOTOS":{key:"ortho",server:"https://wxs.ign.fr/geoportail/wmts",layer:"ORTHOIMAGERY.ORTHOPHOTOS",title:"Photographies aériennes",format:"image/jpeg",style:"normal",queryable:!0,tilematrix:"PM",minZoom:0,bbox:[-178.18713,-22.767689,167.94624,51.11242],desc:"Photographies aériennes",originators:{CRCORSE:{href:"http://www.corse.fr//",attribution:"CRCORSE",logo:"https://wxs.ign.fr/static/logos/CRCORSE/CRCORSE.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[8.428783,41.338627,9.688606,43.08541]}]},SIGLR:{href:"http://www.siglr.org//",attribution:"SIGLR",logo:"https://wxs.ign.fr/static/logos/SIGLR/SIGLR.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[1.6784439,42.316307,4.8729386,44.978218]}]},"BOURGOGNE-FRANCHE-COMTE":{href:"https://www.bourgognefranchecomte.fr/",attribution:"Auvergne",logo:"https://wxs.ign.fr/static/logos/BOURGOGNE-FRANCHE-COMTE/BOURGOGNE-FRANCHE-COMTE.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[2.837849,46.131435,7.1713247,48.408287]}]},FEDER_AUVERGNE:{href:"http://www.europe-en-auvergne.eu/",attribution:"Auvergne",logo:"https://wxs.ign.fr/static/logos/FEDER_AUVERGNE/FEDER_AUVERGNE.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[2.0398402,44.60505,3.38408,45.49146]}]},FEDER_PAYSDELALOIRE:{href:"https://www.europe.paysdelaloire.fr/",attribution:"Pays-de-la-Loire",logo:"https://wxs.ign.fr/static/logos/FEDER_PAYSDELALOIRE/FEDER_PAYSDELALOIRE.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[-2.457367,46.19304,.951426,48.57609]}]},IGN:{href:"http://www.ign.fr",attribution:"Institut national de l'information géographique et forestière",logo:"https://wxs.ign.fr/static/logos/IGN/IGN.gif",minZoom:13,maxZoom:20,constraint:[{minZoom:19,maxZoom:19,bbox:[-63.160706,-21.401262,55.84643,51.11242]},{bbox:[.035491213,43.221077,6.0235267,49.696926]},{minZoom:20,maxZoom:20,bbox:[.035491213,43.221077,6.0235267,49.696926]},{minZoom:13,maxZoom:18,bbox:[-178.18713,-21.401329,55.85611,51.11242]}]},"E-MEGALIS":{href:"http://www.e-megalisbretagne.org//",attribution:"Syndicat mixte de coopération territoriale (e-Megalis)",logo:"https://wxs.ign.fr/static/logos/E-MEGALIS/E-MEGALIS.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[-3.7059498,47.971947,-1.8486879,48.99035]}]},FEDER2:{href:"http://www.europe-en-france.gouv.fr/",attribution:"Fonds européen de développement économique et régional",logo:"https://wxs.ign.fr/static/logos/FEDER2/FEDER2.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[1.3577043,48.824635,4.269964,50.37648]}]},PREFECTURE_GUADELOUPE:{href:"www.guadeloupe.pref.gouv.fr/",attribution:"guadeloupe",logo:"https://wxs.ign.fr/static/logos/PREFECTURE_GUADELOUPE/PREFECTURE_GUADELOUPE.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[-61.82342,14.371942,-60.787838,16.521578]}]},OCCITANIE:{href:"https://www.laregion.fr/",attribution:"La Région Occitanie; Pyrénées - Méditerranée",logo:"https://wxs.ign.fr/static/logos/OCCITANIE/OCCITANIE.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[2.2086434,48.805965,2.4859917,48.915382]}]},RGD_SAVOIE:{href:"http://www.rgd.fr",attribution:"Régie de Gestion de Données des Pays de Savoie (RGD 73-74)",logo:"https://wxs.ign.fr/static/logos/RGD_SAVOIE/RGD_SAVOIE.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:19,maxZoom:19,bbox:[5.7759595,45.65335,7.0887337,46.438328]},{minZoom:13,maxZoom:18,bbox:[5.5923314,45.017353,7.2323394,46.438328]}]},CG45:{href:"http://www.loiret.com",attribution:"Le conseil général du Loiret",logo:"https://wxs.ign.fr/static/logos/CG45/CG45.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[1.4883244,47.471867,3.1349874,48.354233]}]},CRAIG:{href:"http://www.craig.fr",attribution:"Centre Régional Auvergnat de l'Information Géographique (CRAIG)",logo:"https://wxs.ign.fr/static/logos/CRAIG/CRAIG.gif",minZoom:13,maxZoom:20,constraint:[{minZoom:13,maxZoom:19,bbox:[2.0398402,44.60505,6.4295278,46.8038]},{minZoom:20,maxZoom:20,bbox:[2.2243388,44.76621,2.7314367,45.11295]}]},"e-Megalis":{href:"http://www.e-megalisbretagne.org//",attribution:"Syndicat mixte de coopération territoriale (e-Megalis)",logo:"https://wxs.ign.fr/static/logos/e-Megalis/e-Megalis.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[-5.1937118,47.23789,-.98568505,48.980812]}]},PPIGE:{href:"http://www.ppige-npdc.fr/",attribution:"PPIGE",logo:"https://wxs.ign.fr/static/logos/PPIGE/PPIGE.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[1.5212119,49.957302,4.2673664,51.090965]}]},CG06:{href:"http://www.cg06.fr",attribution:"Département Alpes Maritimes (06) en partenariat avec : Groupement Orthophoto 06 (NCA, Ville de Cannes, CARF, CASA,CG06, CA de Grasse) ",logo:"https://wxs.ign.fr/static/logos/CG06/CG06.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[6.6093955,43.44647,7.7436337,44.377018]}]},"MEGALIS-BRETAGNE":{href:"https://www.megalisbretagne.org/",attribution:"Syndicat mixte Mégalis Bretagne",logo:"https://wxs.ign.fr/static/logos/MEGALIS-BRETAGNE/MEGALIS-BRETAGNE.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[-5.2086344,47.591938,-3.3396015,48.808697]}]},FEDER:{href:"http://www.europe-en-france.gouv.fr/",attribution:"Fonds européen de développement économique et régional",logo:"https://wxs.ign.fr/static/logos/FEDER/FEDER.gif",minZoom:0,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[-1.9662633,42.316307,8.25674,50.18387]},{minZoom:0,maxZoom:12,bbox:[-2.400665,41.333557,9.560094,50.366302]}]},"LANGUEDOC-ROUSSILLON":{href:"https://www.laregion.fr/",attribution:"Région Occitanie",logo:"https://wxs.ign.fr/static/logos/LANGUEDOC-ROUSSILLON/LANGUEDOC-ROUSSILLON.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[1.6784439,42.63972,4.208843,43.979004]}]},GRAND_EST:{href:"https://www.grandest.fr/",attribution:"Hauts-de-France",logo:"https://wxs.ign.fr/static/logos/GRAND_EST/GRAND_EST.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[5.362788,47.390827,7.6924667,49.58011]}]},CNES_AUVERGNE:{href:"http://www.cnes.fr/",attribution:"Centre national d'études spatiales (CNES)",logo:"https://wxs.ign.fr/static/logos/CNES_AUVERGNE/CNES_AUVERGNE.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[2.2656832,45.279934,4.0227704,46.8038]}]},HAUTS_DE_FRANCE:{href:"https://www.hautsdefrance.fr/",attribution:"Hauts-de-France",logo:"https://wxs.ign.fr/static/logos/HAUTS_DE_FRANCE/HAUTS_DE_FRANCE.gif",minZoom:13,maxZoom:19,constraint:[{minZoom:13,maxZoom:19,bbox:[2.0740242,48.81521,4.3390365,51.11242]}]},MPM:{href:"http://www.marseille-provence.com/",attribution:"Marseille Provence Métropole",logo:"https://wxs.ign.fr/static/logos/MPM/MPM.gif",minZoom:20,maxZoom:20,constraint:[{minZoom:20,maxZoom:20,bbox:[5.076959,43.153347,5.7168245,43.454994]}]},DITTT:{href:"http://www.dittt.gouv.nc/portal/page/portal/dittt/",attribution:"Direction des Infrastructures, de la Topographie et des Transports Terrestres",logo:"https://wxs.ign.fr/static/logos/DITTT/DITTT.gif",minZoom:13,maxZoom:18,constraint:[{minZoom:13,maxZoom:18,bbox:[163.47784,-22.767689,167.94624,-19.434975]}]},CNES_978:{href:"http://www.cnes.fr/",attribution:"Centre national d'études spatiales (CNES)",logo:"https://wxs.ign.fr/static/logos/CNES_978/CNES_978.gif",minZoom:13,maxZoom:18,constraint:[{minZoom:13,maxZoom:18,bbox:[-63.160706,18.04345,-62.962185,18.133898]}]},CNES_ALSACE:{href:"http://www.cnes.fr/",attribution:"Centre national d'études spatiales (CNES)",logo:"https://wxs.ign.fr/static/logos/CNES_ALSACE/CNES_ALSACE.gif",minZoom:13,maxZoom:18,constraint:[{minZoom:13,maxZoom:18,bbox:[6.8086324,47.39981,7.668318,48.32695]}]},CNES_974:{href:"http://www.cnes.fr/",attribution:"Centre national d'études spatiales (CNES)",logo:"https://wxs.ign.fr/static/logos/CNES_974/CNES_974.gif",minZoom:13,maxZoom:18,constraint:[{minZoom:13,maxZoom:18,bbox:[55.205757,-21.401262,55.84643,-20.862825]}]},CNES_975:{href:"http://www.cnes.fr/",attribution:"Centre national d'études spatiales (CNES)",logo:"https://wxs.ign.fr/static/logos/CNES_975/CNES_975.gif",minZoom:13,maxZoom:18,constraint:[{minZoom:13,maxZoom:18,bbox:[-56.410988,46.734093,-56.10308,47.149963]}]},CNES_976:{href:"http://www.cnes.fr/",attribution:"Centre national d'études spatiales (CNES)",logo:"https://wxs.ign.fr/static/logos/CNES_976/CNES_976.gif",minZoom:13,maxZoom:18,constraint:[{minZoom:13,maxZoom:18,bbox:[44.916977,-13.089187,45.30442,-12.564543]}]},CNES_977:{href:"http://www.cnes.fr/",attribution:"Centre national d'études spatiales (CNES)",logo:"https://wxs.ign.fr/static/logos/CNES_977/CNES_977.gif",minZoom:13,maxZoom:18,constraint:[{minZoom:13,maxZoom:18,bbox:[-62.952805,17.862621,-62.78276,17.98024]}]},CNES:{href:"http://www.cnes.fr/",attribution:"Centre national d'études spatiales (CNES)",logo:"https://wxs.ign.fr/static/logos/CNES/CNES.gif",minZoom:13,maxZoom:16,constraint:[{minZoom:13,maxZoom:16,bbox:[-55.01953,1.845384,-50.88867,6.053161]}]},ASTRIUM:{href:"http://www.geo-airbusds.com/",attribution:"Airbus Defence and Space",logo:"https://wxs.ign.fr/static/logos/ASTRIUM/ASTRIUM.gif",minZoom:13,maxZoom:16,constraint:[{minZoom:13,maxZoom:16,bbox:[-55.01953,1.845384,-50.88867,6.053161]}]},CNES_971:{href:"http://www.cnes.fr/",attribution:"Centre national d'études spatiales (CNES)",logo:"https://wxs.ign.fr/static/logos/CNES_971/CNES_971.gif",minZoom:13,maxZoom:18,constraint:[{minZoom:13,maxZoom:18,bbox:[-61.82342,15.819616,-60.99497,16.521578]}]},CNES_972:{href:"http://www.cnes.fr/",attribution:"Centre national d'études spatiales (CNES)",logo:"https://wxs.ign.fr/static/logos/CNES_972/CNES_972.gif",minZoom:13,maxZoom:18,constraint:[{minZoom:13,maxZoom:18,bbox:[-61.247208,14.371855,-60.778458,14.899901]}]}}},"GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD":{server:"https://wxs.ign.fr/geoportail/wmts",layer:"GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD",title:"Carte IGN",format:"image/jpeg",style:"normal",queryable:!1,tilematrix:"PM",minZoom:0,maxZoom:18,bbox:[-179.62723,-84.5047,179.74588,85.47958],desc:"Cartographie topographique multi-échelles du territoire français issue des bases de données vecteur de l’IGN - emprise nationale, visible du 1/200 au 1/130000000",originators:{IGN:{href:"http://www.ign.fr",attribution:"Institut national de l'information géographique et forestière",logo:"https://wxs.ign.fr/static/logos/IGN/IGN.gif",minZoom:0,maxZoom:18,constraint:[{minZoom:5,maxZoom:5,bbox:[-179.57285,-83.84196,178.4975,85.36646]},{minZoom:0,maxZoom:2,bbox:[-175.99709,-84.42859,175.99709,84.2865]},{minZoom:3,maxZoom:3,bbox:[-176.23093,-84.5047,179.08267,84.89126]},{minZoom:4,maxZoom:4,bbox:[-179.62723,-84.0159,-179.21112,85.47958]},{minZoom:6,maxZoom:8,bbox:[-179.49689,-84.02368,179.74588,85.30035]},{minZoom:15,maxZoom:18,bbox:[-5.6663494,41.209736,10.819784,51.175068]},{minZoom:14,maxZoom:14,bbox:[-5.713191,40.852314,11.429714,51.44377]},{minZoom:13,maxZoom:13,bbox:[-63.37252,13.428586,11.429714,51.44377]},{minZoom:11,maxZoom:12,bbox:[-63.37252,13.428586,11.496459,51.444122]},{minZoom:9,maxZoom:9,bbox:[-64.81273,13.428586,11.496459,51.444016]},{minZoom:10,maxZoom:10,bbox:[-63.37252,13.428586,11.496459,51.444016]}]}}},"GEOGRAPHICALGRIDSYSTEMS.MAPS":{server:"https://wxs.ign.fr/geoportail/wmts",layer:"GEOGRAPHICALGRIDSYSTEMS.MAPS",title:"Cartes IGN",format:"image/jpeg",style:"normal",queryable:!0,tilematrix:"PM",minZoom:0,maxZoom:18,bbox:[-180,-75,180,80],desc:"Cartes IGN",originators:{IGN:{href:"http://www.ign.fr",attribution:"Institut national de l'information géographique et forestière",logo:"https://wxs.ign.fr/static/logos/IGN/IGN.gif",minZoom:0,maxZoom:18,constraint:[{minZoom:7,maxZoom:7,bbox:[-178.20573,-68.138855,144.84375,51.909786]},{minZoom:8,maxZoom:8,bbox:[-178.20573,-68.138855,168.24327,51.909786]},{minZoom:13,maxZoom:13,bbox:[-178.20573,-67.101425,168.24327,51.44377]},{minZoom:14,maxZoom:14,bbox:[-178.20573,-67.101425,168.23909,51.44377]},{minZoom:11,maxZoom:12,bbox:[-178.20573,-67.101425,168.24327,51.444122]},{minZoom:9,maxZoom:10,bbox:[-178.20573,-68.138855,168.24327,51.444016]},{minZoom:15,maxZoom:15,bbox:[-178.20573,-46.502903,168.23909,51.175068]},{minZoom:16,maxZoom:16,bbox:[-178.20573,-46.502903,168.29811,51.175068]},{minZoom:0,maxZoom:6,bbox:[-180,-60,180,80]},{minZoom:18,maxZoom:18,bbox:[-5.6663494,41.209736,10.819784,51.175068]},{minZoom:17,maxZoom:17,bbox:[-179.5,-75,179.5,75]}]},DITTT:{href:"http://www.dittt.gouv.nc/portal/page/portal/dittt/",attribution:"Direction des Infrastructures, de la Topographie et des Transports Terrestres",logo:"https://wxs.ign.fr/static/logos/DITTT/DITTT.gif",minZoom:8,maxZoom:16,constraint:[{minZoom:8,maxZoom:10,bbox:[163.47784,-22.972307,168.24327,-19.402702]},{minZoom:11,maxZoom:13,bbox:[163.47784,-22.972307,168.24327,-19.494438]},{minZoom:14,maxZoom:15,bbox:[163.47784,-22.764496,168.23909,-19.493542]},{minZoom:16,maxZoom:16,bbox:[163.47784,-22.809465,168.29811,-19.403923]}]}}},"ADMINEXPRESS-COG-CARTO.LATEST":{key:"administratif",server:"https://wxs.ign.fr/geoportail/wmts",layer:"ADMINEXPRESS-COG-CARTO.LATEST",title:"ADMINEXPRESS COG CARTO",format:"image/png",style:"normal",queryable:!0,tilematrix:"PM",minZoom:6,maxZoom:16,bbox:[-63.37252,-21.475586,55.925865,51.31212],desc:"Limites administratives Express COG code officiel géographique 2021",originators:{IGN:{href:"https://www.ign.fr",attribution:"Institut national de l'information géographique et forestière",logo:"https://wxs.ign.fr/static/logos/IGN/IGN.gif",minZoom:6,maxZoom:16,constraint:[{minZoom:6,maxZoom:16,bbox:[-63.37252,-21.475586,55.925865,51.31212]}]}}},"GEOGRAPHICALGRIDSYSTEMS.SLOPES.MOUNTAIN":{key:"altimetrie",server:"https://wxs.ign.fr/geoportail/wmts",layer:"GEOGRAPHICALGRIDSYSTEMS.SLOPES.MOUNTAIN",title:"Carte des pentes",format:"image/png",style:"normal",queryable:!1,tilematrix:"PM",minZoom:0,maxZoom:17,bbox:[-63.161392,-21.544624,56.001812,51.099052],desc:"Carte des zones ayant une valeur de pente supérieure à 30°-35°-40°-45° d'après la BD ALTI au pas de 5m",originators:{IGN:{href:"http://www.ign.fr",attribution:"Institut national de l'information géographique et forestière",logo:"https://wxs.ign.fr/static/logos/IGN/IGN.gif",minZoom:0,maxZoom:17,constraint:[{minZoom:0,maxZoom:17,bbox:[-5.1504726,41.32521,9.570543,51.099052]}]}}},"ELEVATION.SLOPES":{key:"altimetrie",server:"https://wxs.ign.fr/geoportail/wmts",layer:"ELEVATION.SLOPES",title:"Altitude",format:"image/jpeg",style:"normal",queryable:!0,tilematrix:"PM",minZoom:6,maxZoom:14,bbox:[-178.20589,-22.595179,167.43176,50.93085],desc:"La couche altitude se compose d'un MNT (Modèle Numérique de Terrain) affiché en teintes hypsométriques et issu de la BD ALTI®.",originators:{IGN:{href:"http://www.ign.fr",attribution:"Institut national de l'information géographique et forestière",logo:"https://wxs.ign.fr/static/logos/IGN/IGN.gif",minZoom:6,maxZoom:14,constraint:[{minZoom:6,maxZoom:14,bbox:[55.205746,-21.392344,55.846554,-20.86271]}]}}},"GEOGRAPHICALGRIDSYSTEMS.MAPS.BDUNI.J1":{key:"cartes",server:"https://wxs.ign.fr/geoportail/wmts",layer:"GEOGRAPHICALGRIDSYSTEMS.MAPS.BDUNI.J1",title:"Plan IGN j+1",format:"image/png",style:"normal",queryable:!1,tilematrix:"PM",minZoom:0,maxZoom:18,bbox:[-179.5,-75,179.5,75],desc:"Plan IGN j+1",originators:{IGN:{href:"http://www.ign.fr",attribution:"Institut national de l'information géographique et forestière",logo:"https://wxs.ign.fr/static/logos/IGN/IGN.gif",minZoom:0,maxZoom:18,constraint:[{minZoom:0,maxZoom:18,bbox:[-179,-80,179,80]}]}}},"TRANSPORTNETWORKS.ROADS":{key:"topographie",server:"https://wxs.ign.fr/geoportail/wmts",layer:"TRANSPORTNETWORKS.ROADS",title:"Routes",format:"image/png",style:"normal",queryable:!1,tilematrix:"PM",minZoom:6,maxZoom:18,bbox:[-63.969162,-21.49687,55.964417,71.584076],desc:"Affichage du réseau routier français et européen.",originators:{IGN:{href:"http://www.ign.fr",attribution:"Institut national de l'information géographique et forestière",logo:"https://wxs.ign.fr/static/logos/IGN/IGN.gif",minZoom:6,maxZoom:18,constraint:[{minZoom:15,maxZoom:18,bbox:[-63.37252,-21.475586,55.925865,51.31212]},{minZoom:6,maxZoom:14,bbox:[-63.969162,-21.49687,55.964417,71.584076]}]}}}},ol.layer.Geoportail.register=function(t,e){ol.layer.Geoportail.capabilities[t]=e},ol.layer.Geoportail.isRegistered=function(t){return ol.layer.Geoportail.capabilities[t]&&ol.layer.Geoportail.capabilities[t].key},ol.layer.Geoportail.loadCapabilities=function(t,e){var o=function(){},i=function(){},n=function(){};this.getCapabilities(t,e).then(function(t){ol.layer.Geoportail.capabilities=t,o(t)}).catch(function(t){i(t)}).finally(function(t){n(t)});var r={then:function(t){return"function"==typeof t&&(o=t),r},catch:function(t){return"function"==typeof t&&(i=t),r},finally:function(t){return"function"==typeof t&&(n=t),r}};return r},ol.layer.Geoportail.getCapabilities=function(t){var e={},o=function(){},i=function(){},n=function(){},r=[156543.03390625,78271.516953125,39135.7584765625,19567.87923828125,9783.939619140625,4891.9698095703125,2445.9849047851562,1222.9924523925781,611.4962261962891,305.74811309814453,152.87405654907226,76.43702827453613,38.218514137268066,19.109257068634033,9.554628534317017,4.777314267158508,2.388657133579254,1.194328566789627,.5971642833948135,.29858214169740677,.14929107084870338];function s(t){t=281e-6*Number(t);for(var e=0;er[e])return e}function a(t){for(var e=t.constraint.length-1;e>0;e--)for(var o=0;o$/,"$1"),originators:{}},u=r.getElementsByTagName("gpp:Originator"),d=0;h=u[d];d++){for(var g,m=p.originators[h.attributes.name.value]={href:h.getElementsByTagName("gpp:URL")[0].innerHTML,attribution:h.getElementsByTagName("gpp:Attribution")[0].innerHTML,logo:h.getElementsByTagName("gpp:Logo")[0].innerHTML,minZoom:20,maxZoom:0,constraint:[]},f=h.getElementsByTagName("gpp:Constraint"),y=0;g=f[y];y++){var v=s(g.getElementsByTagName("sld:MinScaleDenominator")[0].innerHTML),_=s(g.getElementsByTagName("sld:MaxScaleDenominator")[0].innerHTML);_>m.maxZoom&&(m.maxZoom=_),_m.maxZoom&&(m.maxZoom=v),vthis.getMaxResolution()){var i=this.getMinResolution(),n=this.getMaxResolution();for(n>1e5&&(n=156543),i<.15&&(i=.15),e=n;n>i;)n/=2,e=i*=2}var r=this.getExtent();return t||(t=[21020,6355964]),r&&!ol.extent.containsCoordinate(r,t)&&(t=[(r[0]+r[2])/2,(r[1]+r[3])/2]),o&&(t=ol.proj.transform(t,o,this.getSource().getProjection())),this.getSource&&this.getSource()?[this.getSource().getPreview(t,e)]:[]},ol.layer.Group.prototype.getPreview=function(t,e){if(this.get("preview"))return[this.get("preview")];var o=[];if(this.getLayers)for(var i=this.getLayers().getArray(),n=0;nthis.get("maxResolution"))){if(this.res_=400*e,this.animate_){var o=t.frameState.time-this.animate_;othis.animateDuration_&&(this.animate_=!1),!!this.animate_},ol.render3D.prototype.getFeatureHeight=function(t){if(this.animate_){var e=this.height_(t),o=this.toHeight_(t);return e*(1-this.elapsedRatio_)+this.elapsedRatio_*o}return this.height_(t)},ol.render3D.prototype.hvector_=function(t,e){var o=[t[0]*this.matrix_[0]+t[1]*this.matrix_[1]+this.matrix_[4],t[0]*this.matrix_[2]+t[1]*this.matrix_[3]+this.matrix_[5]];return{p0:o,p1:[o[0]+e/this.res_*(o[0]-this.center_[0]),o[1]+e/this.res_*(o[1]-this.center_[1])]}},ol.render3D.prototype.getFeature3D_=function(t,e){var o=this.get("geometry")(t),i=o.getCoordinates();switch(o.getType()){case"Polygon":i=[i];case"MultiPolygon":for(var n=[],r=0;r=0;r--)t.lineTo(n[r].p1[0],n[r].p1[1]);t.closePath()}t.fill("evenodd"),t.stroke();break;case"Point":var a=(n=e[o]).feature.get("label");if(a){var l=n.geom.p1,c=t.fillStyle;t.fillStyle=t.strokeStyle,t.textAlign="center",t.textBaseline="bottom",t.fillText(a,l[0],l[1]);var h=t.measureText(a),p=Number(t.font.match(/\d+(\.\d+)?/g).join([]));t.fillStyle="rgba(255,255,255,0.5)",t.fillRect(l[0]-h.width/2-5,l[1]-p-5,h.width+10,p+10),t.strokeRect(l[0]-h.width/2-5,l[1]-p-5,h.width+10,p+10),t.fillStyle=c}}},ol.render3D.prototype.drawGhost3D_=function(t,e){var o,i,n,r;for(o=0;o=2&&this.finishDrawing(),!0)},ol.layer.SketchOverlay.prototype.removeLastPoint=function(){this._geom.pop(),this._lastCoord=this._geom[this._geom.length-1],this.drawSketch()},ol.layer.SketchOverlay.prototype.startDrawing=function(t){t=t||{},this._geom=[],t.type&&this.setGeometryType(t.type),this.drawSketch(),this._drawing||this.dispatchEvent({type:"drawstart",feature:this.getFeature()}),this._drawing=!0},ol.layer.SketchOverlay.prototype.finishDrawing=function(t){var e=this.getSource().getFeatures()[2].clone(),o=!!e;switch(this.getGeometryType()){case"Circle":case"LineString":o=this._geom.length>1;break;case"Polygon":o=this._geom.length>2}return!(t&&!o)&&(this._geom=[],this._lastCoord=null,this.drawSketch(),this._drawing&&this.dispatchEvent({type:"drawend",valid:o,feature:e}),this._drawing=!1,e)},ol.layer.SketchOverlay.prototype.abortDrawing=function(){this._drawing&&this.dispatchEvent({type:"drawabort",feature:this.getFeature()}),this._drawing=!1,this._geom=[],this._lastCoord=null,this.drawSketch()},ol.layer.SketchOverlay.prototype.setPosition=function(t){this._position=t,this.drawLink()},ol.layer.SketchOverlay.prototype.getPosition=function(){return this._position},ol.layer.SketchOverlay.prototype.drawLink=function(){var t=this.getSource().getFeatures();this._position?(this._lastCoord&&this._lastCoord===this._position?t[0].getGeometry().setCoordinates([]):t[0].getGeometry().setCoordinates(this._position),this._geom.length?"Circle"===this.getGeometryType()?t[1].setGeometry(new ol.geom.Circle(this._geom[0],ol.coordinate.dist2d(this._geom[0],this._position))):"Polygon"===this.getGeometryType()?t[1].setGeometry(new ol.geom.LineString([this._lastCoord,this._position,this._geom[0]])):t[1].setGeometry(new ol.geom.LineString([this._lastCoord,this._position])):t[1].setGeometry(new ol.geom.LineString([]))):(t[0].getGeometry().setCoordinates([]),t[1].setGeometry(new ol.geom.LineString([])))},ol.layer.SketchOverlay.prototype.getFeature=function(){return this.getSource().getFeatures()[2]},ol.layer.SketchOverlay.prototype.drawSketch=function(){this.drawLink();var t=this.getSource().getFeatures();if(this._geom.length)switch(this._lastCoord||(this._lastCoord=this._geom[this._geom.length-1]),t[3].getGeometry().setCoordinates(this._lastCoord),this._type){case"Point":t[2].setGeometry(new ol.geom.Point(this._lastCoord));break;case"Circle":t[2].getGeometry()?t[2].getGeometry().setRadius(ol.coordinate.dist2d(this._geom[0],this._geom[this._geom.length-1])):t[2].setGeometry(new ol.geom.Circle(this._geom[0],ol.coordinate.dist2d(this._geom[0],this._geom[this._geom.length-1])));break;case"LineString":t[2].getGeometry()?t[2].getGeometry().setCoordinates(this._geom):t[2].setGeometry(new ol.geom.LineString(this._geom));break;case"Polygon":this._geom.push(this._geom[0]),t[2].getGeometry()?t[2].getGeometry().setCoordinates([this._geom]):t[2].setGeometry(new ol.geom.Polygon([this._geom])),this._geom.pop();break;default:console.error("[ol/layer/SketchOverlay~drawSketch] geometry type not supported ("+this._type+")")}else t[2].setGeometry(null),t[3].setGeometry(new ol.geom.Point([]))},ol.PerspectiveMap=function(t){var e=t.target instanceof Element?t.target:document.getElementById(t.target);"absolute"!==window.getComputedStyle(e).position&&(e.style.position="relative"),e.style.overflow="hidden";var o=ol.ext.element.create("DIV",{className:"ol-perspective-map",parent:e}),i={};Object.assign(i,t),i.target=o,ol.Map.call(this,i),this._tiltCondition=t.tiltCondition||ol.events.condition.altKeyOnly},ol.ext.inherits(ol.PerspectiveMap,ol.Map),ol.PerspectiveMap.prototype.getPixelRatio=function(){return window.devicePixelRatio},ol.PerspectiveMap.prototype.setPerspective=function(t,e){e=e||{},t>30?t=30:t<0&&(t=0);var o=this._angle||0,i=Math.round(10*t)/10,n=this.getTarget().querySelector(".ol-layers").style;cancelAnimationFrame(this._animatedPerspective),requestAnimationFrame(function(t){this._animatePerpective(t,t,n,o,i,e.duration,e.easing||ol.easing.inAndOut)}.bind(this))},ol.PerspectiveMap.prototype._animatePerpective=function(t,e,o,i,n,r,s){var a,l,c;0===r?(a=1,l=!0):l=(a=(e-t)/(r||500))>=1,a=s(a);var h=(c=this._angle=l?n:i+(n-i)*a)/30;o.transform="translateY(-"+17*h+"%) perspective(200px) rotateX("+c+"deg) scaleY("+(1-h/2)+")",this.getMatrix3D(!0),this.render(),l||requestAnimationFrame(function(e){this._animatePerpective(t,e,o,i,n,r||500,s||ol.easing.inAndOut)}.bind(this)),this.dispatchEvent({type:"change:perspective",angle:c,animating:!l})},ol.PerspectiveMap.prototype.handleMapBrowserEvent=function(t){if(t.pixel=[t.originalEvent.offsetX/this.getPixelRatio(),t.originalEvent.offsetY/this.getPixelRatio()],t.coordinate=this.getCoordinateFromPixel(t.pixel),ol.Map.prototype.handleMapBrowserEvent.call(this,t),this._tiltCondition(t))switch(t.type){case"pointerdown":this._dragging=t.originalEvent.offsetY;break;case"pointerup":this._dragging=!1;break;case"pointerdrag":if(!1!==this._dragging){var e=t.originalEvent.offsetY>this._dragging?.5:-.5;e&&this.setPerspective((this._angle||0)+e,{duration:0}),this._dragging=t.originalEvent.offsetY}}else this._dragging=!1},ol.PerspectiveMap.prototype.getMatrix3D=function(t){if(t){var e=this.getTarget().querySelector(".ol-layers"),o=ol.matrix3D.getTransform(e),i=ol.matrix3D.getTransformOrigin(e);this._matrixTransform=ol.matrix3D.computeTransformMatrix(o,i)}return this._matrixTransform||(this._matrixTransform=ol.matrix3D.identity()),this._matrixTransform},ol.PerspectiveMap.prototype.getPixelScreenFromCoordinate=function(t){var e=this.getPixelFromCoordinate(t),o=this.getMatrix3D(),i=ol.matrix3D.transformVertex(o,e);return[(i=ol.matrix3D.projectVertex(i))[0],i[1]]},ol.PerspectiveMap.prototype.getPixelFromPixelScreen=function(t){var e=ol.matrix3D.inverse(this.getMatrix3D()),o=ol.matrix3D.transformVertex(e,t);return[(o=ol.matrix3D.projectVertex(o))[0],o[1]]},function(){var t=ol.Overlay.prototype.updatePixelPosition;ol.Overlay.prototype.updatePixelPosition=function(){var e=this.getMap();if(e&&e instanceof ol.PerspectiveMap){var o=this.getPosition();if(!e||!e.isRendered()||!o)return void this.setVisible(!1);var i=e.getPixelScreenFromCoordinate(o),n=e.getSize();i[0]-=n[0]/4,i[1]-=n[1]/4,this.updateRenderedPosition(i,n)}else t.call(this)}}(),window.ol&&!ol.particule&&(ol.particule={}),ol.particule.Base=function(t){t||(t={}),ol.Object.call(this),this.setOverlay(t.overlay),this.coordinate=t.coordinate||[0,0]},ol.ext.inherits(ol.particule.Base,ol.Object),ol.particule.Base.prototype.setOverlay=function(t){this._overlay=t},ol.particule.Base.prototype.getOverlay=function(){return this._overlay},ol.particule.Base.prototype.draw=function(){},ol.particule.Base.prototype.update=function(){},ol.particule.Base.prototype.getRandomCoord=function(t){return this.getOverlay().randomCoord?this.getOverlay().randomCoord():[t,0]},ol.particule.Bird=function(t){t||(t={}),ol.particule.Base.call(this,t),this.bird=new Image,this.bird.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABDCAQAAAD+S8VaAAAAAnNCSVQICFXsRgQAAAAJcEhZcwAAAvMAAALzAdLpCioAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAG90lEQVR42uWaaVRTRxTHJ4AUUIoIiqISOArIDiIhBBfccCMoR0vVUpXjTqun4Fr1tO5i3YuodaFqRMECKm4VUHEhUvWgBYuilgpiRVZpCARI3r8fWA4hYY9AXu77+ObNzO/O8u787xDSyeYSTzSICpu+DjV0ogrze84PBneByuJv3JpbBlx6MEBbJfG/8S2RAACFXXtU0gERN1BjCc9UEN/e7I2w1gFPinv3UDkHbFiGOqOwJVjlHMALRT3LLJ7trGIOuHwFUsY7q2IOuJ0u7YB//pswWFn6/vnUcbOCAn7ctfnUrsijl85dv5pw786fd9OTsvg5/JykN3fTb6ZcTDgVvefIkqXmVvKr0NN/IUQDO7C1qwJrOwyftIZ7cmIiN21eZlB+SOUtFKNl9kF0hb9ujmyVM73FMmWv3m+2J4zxw74NDN5/5vT1qzeT7j3n5/Bz7mcmPk24cy32Ai8i9Pj2nwIX+jo4kc8UMMqeXr5bfC6N/2tUHrdsCQ4gAR/QNhNRJ8+6GklXH7xStlxW+ViLxrpjqBswJ/z4rYyCFrQnwJPCxGe/x53i+fO+XOth2xpsvQm+PkfGP3YuYIo1oInTyIJiLDFtoZfUP+AXeaW2rZHXKZ8xJ35NeU+1odVSbIIBbEQeb70Tffd6ckmj0QbDy9/zOufdILE6SN0TBkVafnn0ka/NatrrditDXpmYKw36pREwPyr+Y0V72n0CsxoedTDFrMJJyRMDZJYIx8+yYICQKbDJtcjtL9IGAcEMKN7efIy+snnTYv/tR8Ry3+eWRUYFzavRB9SWL7icXKWAVrPRr96wEqjBTjg5bop03GGi77XF85FdqVZNIQ1konOsEvx35yOCN1xMFimszjNSDqh+ektGfVG3xjyTzaqkX3uDTiaCdh0ZA/qSgWXWWfb7CYMQQsiUUANK1j8hoJf1lSFUg0u+z1xCiFuMUYWsAy7QCj9ZzhIgIDCkpi4nhBCGsafNGx2peXCQRvhlcGrEAQSOhYQQQtyTG74YCglN8CswrVF8goEVhBBCrMzdozi33OOHJmvUvQqghQtKMEUu+GDB0Cj2Q/vsUdJn0JH8+oXG4rWS46djSD0ePcr2lUuafbZlIbN0UAnngpyA0I3FumeZxxQYVlZ/ooWleKm0+FHQbTDuWnAp5F6cbNfskcDtcg9J9aMGNUxDIiglgy+CPxhypj4Ddu/cfFpxOrIqrv7QAsH4V2nwYxoEvwQEOpRlAeeG07hWnopH7FMHgTr6VmhAA1xEQNjF4bMxQwpcj2I9duVZLiVtTb7YT7T2I30JccyqrrA7ZuESRF0SvhQ/QKfByDu/VZAs5O6rXS9U6onZ+A2CLgQvwWn0l5n4TAFnjOKksR5En6i73q6/q3IRhvwugB8LBylwi6IhixxX9Wd/CoWQwTrJTuaEOSwzENcKDR7Yj4xOg4+Hq3SEXzX8fIfcObAZPizV+bGxqLZhMyxBWgdP+xi4ScGbCNnhhrodqxnrso65pLidNxMQENihqoPgS3AY5rU7krh35eCPbon2c4hap2nnxob2GQQE+zpAM4qFb53EoUWxE3t93jXyBwyXcG1KD+8/IXwBAmFYg26Vx37oHjnIlnQlGzbJvMCX+lQrPgT6dat9yAcT/S6aSOIs2rjjxLaQ9SsX83gv8uShiNuAn4mR9fZ5dizpphRpREvj1YvOhiU84OdmoghFyKH47y/GHohtLf45ITvVuLyfyKLI5RlntyJSXx2+P+gaejt5O7FNCSEkcFHTuAmPom6/qqxJqFRee33wHGc6rVLjXtym8C8nTTcnDNMh/n5BfnN8mFY18jWdbPlceeBViEsPi16xxFSL7ncjukVelTvxUzsxjOlAUzsULv8/GfdEJa7G7D7YWLCcUzbNkfb42zaXNaG2h4XTHH/n9x+bjIHKqeAdNMZf55fbrKBYLNq+lqb433lkFrUk5hNKdu6mIf5XA1KetzibR+09TLcfonrMtVYlNKk9h2gV//FCW3tCFmMXT0nOe83bxpklbdDJqrD+BC1mwUzTtOw2Sl/UFjpsh8ci2pHirFgxV8nxV/oJxO2RwR6+HNFbmfkZ15PaqwQe/VmJ+R18Aql37XTAsQ9EefUBW6NeEk34IaWN8HkIQk+Jva0SzwGXP6p1XDeEoqB1qx/L0B3dKY+VSr0JDurDFNaK2ZoYg5142sx1m3LEYxUsq+Vv8ejVSv8bdJ/UXySds9eDB4JwEnFIRS6KUIi/8RJxCEEARte74GBR6DycFpGgtZNFPkHrHgOx61miSaPDEOtEn8qWwvepZMc5Mel3ItZmHbbM12wSXV/snMHZQ6eRlzEzI9d9rnftskwERhXVNxF7ik1Krd87pbLCbWYR9Y7v0f/htaJHbsoDhwAAAABJRU5ErkJggg==",this.set("size",[this.bird.width||50,this.bird.height||50])},ol.ext.inherits(ol.particule.Bird,ol.particule.Base),ol.particule.Bird.prototype.draw=function(t){var e=this.getOverlay().get("angle");t.save(),t.translate(this.coordinate[0],this.coordinate[1]),t.rotate(e+Math.PI/2),t.scale(.5,.5),t.drawImage(this.bird,-this.bird.width/2,-this.bird.height/2),t.restore()},ol.particule.Bird.prototype.update=function(t){var e=this.getOverlay().get("speed")*t/this.getOverlay()._fps,o=this.getOverlay().get("angle");this.coordinate[0]+=e*Math.cos(o),this.coordinate[1]+=e*Math.sin(o)},ol.particule.Cloud=function(t){t||(t={}),ol.particule.Base.call(this,t),this.set("size",[100,100]);var e=document.createElement("CANVAS");e.width=200,e.height=200;var o=e.getContext("2d"),i=this.gradient=o.createRadialGradient(50,50,0,50,50,50);i.addColorStop(0,"rgba(255,255,255,.2"),i.addColorStop(1,"rgba(255,255,255,0"),this.image=e;for(var n=0;n<7;n++){o.save();var r=100*Math.random(),s=100*Math.random();o.translate(r,s),o.fillStyle=i,o.fillRect(0,0,e.width,e.height),o.restore()}},ol.ext.inherits(ol.particule.Cloud,ol.particule.Base),ol.particule.Cloud.prototype.draw=function(t){t.save(),t.translate(this.coordinate[0],this.coordinate[1]),t.drawImage(this.image,-this.image.width/2,-this.image.width/2),t.restore()},ol.particule.Cloud.prototype.update=function(t){var e=this.getOverlay().get("speed")*t/this.getOverlay()._fps,o=this.getOverlay().get("angle");this.coordinate[0]+=e*Math.cos(o),this.coordinate[1]+=e*Math.sin(o)},ol.particule.Rain=function(t){t||(t={}),ol.particule.Base.call(this,t),this.z=Math.floor(5*Math.random())+1;var e=document.createElement("CANVAS");e.width=50,e.height=50;var o=e.getContext("2d");this.gradient=o.createRadialGradient(0,0,0,0,0,25),this.gradient.addColorStop(0,"rgba(0,0,80,0)"),this.gradient.addColorStop(1,"rgba(0,0,80,.3)")},ol.ext.inherits(ol.particule.Rain,ol.particule.Base),ol.particule.Rain.prototype.draw=function(t){t.save();var e=this.getOverlay().get("angle");t.beginPath();var o=10*Math.cos(e)*(1+this.z/2),i=10*Math.sin(e)*(1+this.z/2);t.lineWidth=Math.round(this.z/2),t.strokeStyle=this.gradient,t.translate(this.coordinate[0],this.coordinate[1]),t.moveTo(0,0),t.lineTo(o,i),t.stroke(),t.restore()},ol.particule.Rain.prototype.update=function(t){var e=this.getOverlay().get("speed")*t/this.getOverlay()._fps*this.z,o=this.getOverlay().get("angle");this.coordinate[0]+=e*Math.cos(o),this.coordinate[1]+=e*Math.sin(o)},ol.particule.RainDrop=function(t){t||(t={}),ol.particule.Base.call(this,t),this.size=0;var e=document.createElement("CANVAS");e.width=100,e.height=100;var o=e.getContext("2d"),i=o.createRadialGradient(50,50,0,50,50,50);i.addColorStop(0,"rgba(128,128,192,.8"),i.addColorStop(1,"rgba(128,128,192,0"),this.image=e,o.fillStyle=i,o.fillRect(0,0,e.width,e.height)},ol.ext.inherits(ol.particule.RainDrop,ol.particule.Base),ol.particule.RainDrop.prototype.draw=function(t){this.size>0&&(t.save(),t.translate(this.coordinate[0],this.coordinate[1]),t.globalAlpha=this.size/50,t.scale(1-this.size/50,1-this.size/50),t.drawImage(this.image,-50,-50),t.restore())},ol.particule.RainDrop.prototype.update=function(t){(this.size>0||Math.random()<.01)&&(this.size<=0&&(this.size=50,this.coordinates=this.getRandomCoord()),this.size=this.size-Math.round(t/20))},ol.particule.Snow=function(t){t||(t={}),ol.particule.Base.call(this,t),this.z=(Math.floor(5*Math.random())+1)/5,this.angle=Math.random()*Math.PI;var e=document.createElement("CANVAS");e.width=20,e.height=20;var o=e.getContext("2d"),i=o.createRadialGradient(10,10,0,10,10,10);i.addColorStop(0,"rgba(255, 255, 255,1)"),i.addColorStop(.8,"rgba(210, 236, 242,.8)"),i.addColorStop(1,"rgba(237, 247, 249,0)"),this.image=e,o.fillStyle=i,o.fillRect(0,0,e.width,e.height)},ol.ext.inherits(ol.particule.Snow,ol.particule.Base),ol.particule.Snow.prototype.draw=function(t){t.save(),t.translate(this.coordinate[0],this.coordinate[1]),t.globalAlpha=.4+this.z/2,t.scale(this.z,this.z),t.drawImage(this.image,-10,-10),t.restore()},ol.particule.Snow.prototype.update=function(t){var e=this.getOverlay().get("speed")*t/this.getOverlay()._fps*this.z*5,o=this.getOverlay().get("angle");this.angle=this.angle+t/this.getOverlay()._fps/100,this.coordinate[0]+=2*Math.sin(this.angle+this.z)+e*Math.cos(o),this.coordinate[1]+=Math.cos(this.angle)+e*Math.sin(o)},ol.Overlay.Popup=function(t){"number"==typeof(t=t||{}).offsetBox?this.offsetBox=[t.offsetBox,t.offsetBox,t.offsetBox,t.offsetBox]:this.offsetBox=t.offsetBox;var e=document.createElement("div");t.element=e,this.closeBox=t.closeBox,this.onclose=t.onclose,this.onshow=t.onshow,ol.ext.element.create("BUTTON",{className:"closeBox"+(t.closeBox?" hasclosebox":""),type:"button",click:function(){this.hide()}.bind(this),parent:e}),!1!==t.anchor&&ol.ext.element.create("DIV",{className:"anchor",parent:e}),this.content=ol.ext.element.create("DIV",{html:t.html||"",className:"ol-popup-content",parent:e}),t.minibar&&ol.ext.element.scrollDiv(this.content,{vertical:!0,mousewheel:!0,minibar:!0}),t.stopEvent&&(e.addEventListener("mousedown",function(t){t.stopPropagation()}),e.addEventListener("touchstart",function(t){t.stopPropagation()})),ol.Overlay.call(this,t),this._elt=e,this.setPositioning(t.positioning||"auto"),this.setPopupClass(t.popupClass||t.className||"default"),t.anim&&this.addPopupClass("anim"),t.position&&setTimeout(function(){this.show(t.position)}.bind(this))},ol.ext.inherits(ol.Overlay.Popup,ol.Overlay),ol.Overlay.Popup.prototype.getClassPositioning=function(){var t="",e=this.getPositioning();return/bottom/.test(e)&&(t+="ol-popup-bottom "),/top/.test(e)&&(t+="ol-popup-top "),/left/.test(e)&&(t+="ol-popup-left "),/right/.test(e)&&(t+="ol-popup-right "),/^center/.test(e)&&(t+="ol-popup-middle "),/center$/.test(e)&&(t+="ol-popup-center "),t},ol.Overlay.Popup.prototype.setClosebox=function(t){this.closeBox=t,t?this.element.classList.add("hasclosebox"):this.element.classList.remove("hasclosebox")},ol.Overlay.Popup.prototype.setPopupClass=function(t){var e=["ol-popup"];this.getVisible()&&e.push("visible"),this.element.className="";var o=this.getClassPositioning().split(" ").filter(function(t){return t.length>0});t?t.split(" ").filter(function(t){return t.length>0}).forEach(function(t){e.push(t)}):e.push("default"),o.forEach(function(t){e.push(t)}),this.closeBox&&e.push("hasclosebox"),this.element.classList.add.apply(this.element.classList,e)},ol.Overlay.Popup.prototype.addPopupClass=function(t){this.element.classList.add(t)},ol.Overlay.Popup.prototype.removePopupClass=function(t){this.element.classList.remove(t)},ol.Overlay.Popup.prototype.setPositioning=function(t){void 0!==t&&(/auto/.test(t)?(this.autoPositioning=t.split("-"),1==this.autoPositioning.length&&(this.autoPositioning[1]="auto")):this.autoPositioning=!1,"center"==(t=t.replace(/auto/g,"center"))&&(t="bottom-center"),this.setPositioning_(t))},ol.Overlay.Popup.prototype.setPositioning_=function(t){if(this.element){ol.Overlay.prototype.setPositioning.call(this,t),this.element.classList.remove("ol-popup-top","ol-popup-bottom","ol-popup-left","ol-popup-right","ol-popup-center","ol-popup-middle");var e=this.getClassPositioning().split(" ").filter(function(t){return t.length>0});this.element.classList.add.apply(this.element.classList,e)}},ol.Overlay.Popup.prototype.getVisible=function(){return this.element.classList.contains("visible")},ol.Overlay.Popup.prototype.show=function(t,e){e||"string"!=typeof t||(e=t,t=null),!0===t&&(t=this.getPosition());var o=this,i=this.getMap();if(i&&(e&&e!==this.prevHTML&&(this.prevHTML=e,this.content.innerHTML="",e instanceof Element?this.content.appendChild(e):ol.ext.element.create("DIV",{html:e,parent:this.content}),Array.prototype.slice.call(this.content.querySelectorAll("img")).forEach(function(t){t.addEventListener("load",function(){try{i.renderSync()}catch(t){}o.content.dispatchEvent(new Event("scroll"))})})),t)){if(this.autoPositioning){var n=i.getPixelFromCoordinate(t),r=i.getSize(),s=[];"auto"==this.autoPositioning[0]?s[0]=n[1]this._particules.length)for(var i=this._particules.length;ithis._canvas.width+e[0]?(t.coordinate[0]=-e[0],t.coordinate[1]=Math.random()*(this._canvas.height+e[1])-e[1]/2):t.coordinate[1]<-e[1]?(t.coordinate[0]=Math.random()*(this._canvas.width+e[0])-e[0]/2,t.coordinate[1]=this._canvas.height+e[1]):t.coordinate[1]>this._canvas.height+e[1]&&(t.coordinate[0]=Math.random()*(this._canvas.width+e[0])-e[0]/2,t.coordinate[1]=-e[1])},ol.Overlay.AnimatedCanvas.prototype.clear=function(){this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height)},ol.Overlay.AnimatedCanvas.prototype.getCanvas=function(){return this._canvas},ol.Overlay.AnimatedCanvas.prototype.setAnimation=function(t){t=!1!==t,this.set("animation",t),t?(this._pause=!0,requestAnimationFrame(this._animate.bind(this))):this.dispatchEvent({type:"animation:stop",time:this._time})},ol.Overlay.AnimatedCanvas.prototype._animate=function(t){this.getVisible()&&this.get("animation")&&(this._pause?requestAnimationFrame(function(t){this._time=t,requestAnimationFrame(this._animate.bind(this))}.bind(this)):(t-this._time>this._fps&&(this.draw(t-this._time),this._time=t),requestAnimationFrame(this._animate.bind(this)))),this._pause=!1},ol.Overlay.Fixed=function(t){ol.Overlay.call(this,t)},ol.ext.inherits(ol.Overlay.Fixed,ol.Overlay),ol.Overlay.Fixed.prototype.setPosition=function(t,e){this.getMap()&&t&&(this._pixel=this.getMap().getPixelFromCoordinate(t)),ol.Overlay.prototype.setPosition.call(this,t),e&&ol.Overlay.prototype.updatePixelPosition.call(this)},ol.Overlay.Fixed.prototype.updatePixelPosition=function(){if(this.getMap()&&this._pixel&&this.getPosition()){var t=this.getMap().getPixelFromCoordinate(this.getPosition());Math.round(1e3*t[0])===Math.round(1e3*this._pixel[0])&&Math.round(1e3*t[0])===Math.round(1e3*this._pixel[0])||this.setPosition(this.getMap().getCoordinateFromPixel(this._pixel))}},ol.Overlay.FixedPopup=function(t){t.anchor=!1,t.positioning=t.positioning||"center-center",t.className=(t.className||"")+" ol-fixPopup",ol.Overlay.Popup.call(this,t),this.set("minScale",t.minScale||.5),this.set("maxScale",t.maxScale||2);var e=document.createElement("canvas");this._overlay=new ol.layer.Image({source:new ol.source.ImageCanvas({canvasFunction:function(t,o,i,n){return e.width=n[0],e.height=n[1],e}})}),this._style=t.style||new ol.style.Style({fill:new ol.style.Fill({color:[102,153,255]})}),this._overlay.on(["postcompose","postrender"],function(t){if(this.getVisible()&&this._pixel){var e=this.getMap(),o=this.getPosition(),i=e.getPixelFromCoordinate(o),n=this.element.getBoundingClientRect(),r=this.getMap().getTargetElement().getBoundingClientRect(),s=[n.left-r.left+n.width/2,n.top-r.top+n.height/2];t.context.save();var a=t.inversePixelTransform;a?t.context.transform(a[0],a[1],a[2],a[3],a[4],a[5]):t.context.scale(t.frameState.pixelRatio,t.frameState.pixelRatio),t.context.beginPath(),t.context.moveTo(i[0],i[1]),Math.abs(s[0]-i[0])>Math.abs(s[1]-i[1])?(t.context.lineTo(s[0],s[1]-8),t.context.lineTo(s[0],s[1]+8)):(t.context.lineTo(s[0]-8,s[1]),t.context.lineTo(s[0]+8,s[1])),t.context.moveTo(i[0],i[1]),this._style.getFill()&&(t.context.fillStyle=ol.color.asString(this._style.getFill().getColor()),t.context.fill()),this._style.getStroke()&&(t.context.strokeStyle=ol.color.asString(this._style.getStroke().getColor()),t.context.lineWidth=this._style.getStroke().width(),t.context.stroke()),t.context.restore()}}.bind(this));var o=function(){this.setPixelPosition()}.bind(this);function i(t){var e=0,o=0,i=0;for(var n in t)e+=t[n].clientX,o+=t[n].clientY,i++;return[e/i,o/i]}function n(t){var e=Object.keys(t);return!(e.length<2)&&ol.coordinate.dist2d([t[e[0]].clientX,t[e[0]].clientY],[t[e[1]].clientX,t[e[1]].clientY])}this.on(["hide","show"],function(){setTimeout(o)}.bind(this));var r,s,a,l,c={},h={},p=[];this.element.addEventListener("pointerdown",function(t){for(var e in t.preventDefault(),t.stopPropagation(),c)h[e]&&(c[e]=h[e]);c[t.pointerId]=t,p=this._pixel,s=this.get("rotation")||0,a=this.get("scale")||1,r=n(c),l=!1}.bind(this)),this.element.addEventListener("click",function(t){l&&(t.preventDefault(),t.stopPropagation())},!0);var u=function(t){c[t.pointerId]&&(delete c[t.pointerId],t.preventDefault()),h[t.pointerId]&&delete h[t.pointerId]}.bind(this);document.addEventListener("pointerup",u),document.addEventListener("pointercancel",u),document.addEventListener("pointermove",function(t){if(c[t.pointerId]){t.preventDefault(),h[t.pointerId]=t;var e=i(c),o=i(h),u=o[0]-e[0],d=o[1]-e[1];l=l||Math.abs(u)>3||Math.abs(d)>3;var g=function(){var t,e,o=Object.keys(c);if(o.length<2)return!1;t=c[o[0]];var i=[(e=c[o[1]]).clientX-t.clientX,e.clientY-t.clientY];t=h[o[0]];var n=[(e=h[o[1]]).clientX-t.clientX,e.clientY-t.clientY],r=Math.sqrt(i[0]*i[0]+i[1]*i[1]),s=Math.sqrt(n[0]*n[0]+n[1]*n[1]),a=360*Math.acos((i[0]*n[0]+i[1]*n[1])/(r*s))/Math.PI;return i[0]*n[1]-i[1]*n[0]<0?-a:a}();g&&this.setRotation(s+1.5*g,!1);var m=n(h);!1!==m&&r&&(this.setScale(a*m/r,!1),r=a*m/this.get("scale")),this.setPixelPosition([p[0]+u,p[1]+d])}}.bind(this))},ol.ext.inherits(ol.Overlay.FixedPopup,ol.Overlay.Popup),ol.Overlay.FixedPopup.prototype.setMap=function(t){ol.Overlay.Popup.prototype.setMap.call(this,t),this._overlay.setMap(this.getMap()),this._listener&&ol.Observable.unByKey(this._listener),t&&(this._listener=t.on("change:size",function(){this.setPixelPosition()}.bind(this)))},ol.Overlay.FixedPopup.prototype.updatePixelPosition=function(){var t=this.getMap(),e=this.getPosition();if(t&&t.isRendered()&&e)if(this._pixel)this.setVisible(!0);else{this._pixel=t.getPixelFromCoordinate(e);var o=t.getSize();this.updateRenderedPosition(this._pixel,o)}else this.setVisible(!1)},ol.Overlay.FixedPopup.prototype.updateRenderedPosition=function(t,e){ol.Overlay.Popup.prototype.updateRenderedPosition.call(this,t,e),this.setRotation(),this.setScale()},ol.Overlay.FixedPopup.prototype.setPixelPosition=function(t,e){var o,i=this.getMap(),n=i?i.getSize():[0,0];if(e&&(this.setPositioning(e),(o=ol.ext.element.offsetRect(this.element)).width=o.height=0,/top/.test(e)?t[1]+=o.height/2:/bottom/.test(e)?t[1]=n[1]-o.height/2-t[1]:t[1]=n[1]/2+t[1],/left/.test(e)?t[0]+=o.width/2:/right/.test(e)?t[0]=n[0]-o.width/2-t[0]:t[0]=n[0]/2+t[0]),t&&(this._pixel=t),i&&this._pixel){this.updateRenderedPosition(this._pixel,n);var r=!1;o=ol.ext.element.offsetRect(this.element);var s=ol.ext.element.offsetRect(i.getTargetElement());o.lefts.left+s.width&&(this._pixel[0]=this._pixel[0]+s.left-o.left+s.width-o.width,r=!0),o.tops.top+s.height&&(this._pixel[1]=this._pixel[1]+s.top-o.top+s.height-o.height,r=!0),r&&this.updateRenderedPosition(this._pixel,n),this._overlay.changed()}},ol.Overlay.FixedPopup.prototype.getPixelPosition=function(){return this._pixel},ol.Overlay.FixedPopup.prototype.setPopupClass=function(t){ol.Overlay.Popup.prototype.setPopupClass.call(this,t),this.addPopupClass("ol-fixPopup")},ol.Overlay.FixedPopup.prototype.setRotation=function(t,e){"number"==typeof t&&this.set("rotation",t),!1!==e&&(/rotate/.test(this.element.style.transform)?this.element.style.transform=this.element.style.transform.replace(/rotate\((-?[\d,.]+)deg\)/,"rotate("+(this.get("rotation")||0)+"deg)"):this.element.style.transform=this.element.style.transform+" rotate("+(this.get("rotation")||0)+"deg)")},ol.Overlay.FixedPopup.prototype.setScale=function(t,e){"number"==typeof t&&this.set("scale",t),t=Math.min(Math.max(this.get("minScale")||0,this.get("scale")||1),this.get("maxScale")||2),this.set("scale",t),!1!==e&&(/scale/.test(this.element.style.transform)?this.element.style.transform=this.element.style.transform.replace(/scale\(([\d,.]+)\)/,"scale("+t+")"):this.element.style.transform=this.element.style.transform+" scale("+t+")")},ol.Overlay.FixedPopup.prototype.setLinkStyle=function(t){this._style=t,this._overlay.changed()},ol.Overlay.FixedPopup.prototype.getLinkStyle=function(){return this._style},ol.Overlay.Magnify=function(t){var e=document.createElement("div");e.className="ol-magnify",this._elt=e,ol.Overlay.call(this,{positioning:t.positioning||"center-center",element:this._elt,stopEvent:!1}),this.mgmap_=new ol.Map({controls:new ol.Collection,interactions:new ol.Collection,target:t.target||this._elt,view:new ol.View({projection:t.projection}),layers:t.layers}),this.mgview_=this.mgmap_.getView(),this.external_=!!t.target,this.set("zoomOffset",t.zoomOffset||1),this.set("active",!0),this.on("propertychange",this.setView_.bind(this))},ol.ext.inherits(ol.Overlay.Magnify,ol.Overlay),ol.Overlay.Magnify.prototype.setMap=function(t){this.getMap()&&this.getMap().getViewport().removeEventListener("mousemove",this.onMouseMove_),this._listener&&ol.Observable.unByKey(this._listener),this._listener=null,ol.Overlay.prototype.setMap.call(this,t),t.getViewport().addEventListener("mousemove",this.onMouseMove_.bind(this)),this._listener=t.getView().on("propertychange",this.setView_.bind(this)),this.setView_()},ol.Overlay.Magnify.prototype.getMagMap=function(){return this.mgmap_},ol.Overlay.Magnify.prototype.getActive=function(){return this.get("active")},ol.Overlay.Magnify.prototype.setActive=function(t){return this.set("active",t)},ol.Overlay.Magnify.prototype.onMouseMove_=function(t){if(this.get("active")){var e=this.getMap().getEventCoordinate(t);this.external_||this.setPosition(e),this.mgview_.setCenter(e),this._elt.querySelector("canvas")&&"none"!=this._elt.querySelector("canvas").style.display||this.mgmap_.updateSize()}else this.setPosition()},ol.Overlay.Magnify.prototype.setView_=function(t){if(this.get("active")){if(!t)return this.setView_({key:"rotation"}),void this.setView_({key:"resolution"});switch(t.key){case"rotation":this.mgview_.setRotation(this.getMap().getView().getRotation());break;case"zoomOffset":case"resolution":var e=Math.max(0,this.getMap().getView().getZoom()+Number(this.get("zoomOffset")));this.mgview_.setZoom(e)}}else this.setPosition()},ol.Overlay.Placemark=function(t){(t=t||{}).popupClass=(t.popupClass||"")+" placemark anim",t.positioning="bottom-center",ol.Overlay.Popup.call(this,t),this.setPositioning=function(){},t.color&&(this.element.style.color=t.color),t.backgroundColor&&(this.element.style.backgroundColor=t.backgroundColor),t.contentColor&&this.setContentColor(t.contentColor),t.size&&this.setRadius(t.size)},ol.ext.inherits(ol.Overlay.Placemark,ol.Overlay.Popup),ol.Overlay.Placemark.prototype.show=function(t,e){!0===t&&(t=this.getPosition()),this.hide(),ol.Overlay.Popup.prototype.show.apply(this,[t,e])},ol.Overlay.Placemark.prototype.setColor=function(t){this.element.style.color=t},ol.Overlay.Placemark.prototype.setBackgroundColor=function(t){this._elt.style.backgroundColor=t},ol.Overlay.Placemark.prototype.setContentColor=function(t){var e=this.element.getElementsByClassName("ol-popup-content")[0];e&&(e.style.color=t)},ol.Overlay.Placemark.prototype.setClassName=function(t){var e=this.element.className;this.element.className="ol-popup placemark ol-popup-bottom ol-popup-center "+(/visible/.test(e)?"visible ":"")+(/anim/.test(e)?"anim ":"")+t},ol.Overlay.Placemark.prototype.setRadius=function(t){this.element.style.fontSize=t+"px"},ol.Overlay.PopupFeature=function(t){t=t||{},ol.Overlay.Popup.call(this,t),this.setTemplate(t.template),this.set("canFix",t.canFix),this.set("showImage",t.showImage),this.set("maxChar",t.maxChar||200),this.set("keepSelection",t.keepSelection),t.select&&"function"==typeof t.select.on&&(this._select=t.select,t.select.on("select",function(e){this._noselect||(e.selected[0]?this.show(e.mapBrowserEvent.coordinate,t.select.getFeatures().getArray(),e.selected[0]):this.hide())}.bind(this)))},ol.ext.inherits(ol.Overlay.PopupFeature,ol.Overlay.Popup),ol.Overlay.PopupFeature.prototype.setTemplate=function(t){this._template=t,this._attributeObject(this._template)},ol.Overlay.PopupFeature.prototype._attributeObject=function(t){if(t&&t.attributes instanceof Array){var e={};t.attributes.forEach(function(t){e[t]=!0}),t.attributes=e}return t.attributes},ol.Overlay.PopupFeature.prototype.show=function(t,e,o){(t instanceof ol.Feature||t instanceof Array&&t[0]instanceof ol.Feature)&&(e=t,t=null),e instanceof Array||(e=[e]),this._features=e.slice(),this._count||(this._count=1),this._count=1;var i=this.get("keepSelection")&&o||e[0],n=this._getHtml(i);n?(this.element.classList.contains("ol-fixed")||this.hide(),t&&"Point"!==e[0].getGeometry().getType()||(t=e[0].getGeometry().getFirstCoordinate()),ol.Overlay.Popup.prototype.show.call(this,t,n)):this.hide()},ol.Overlay.PopupFeature.prototype._getHtml=function(t){if(!t)return"";var e=ol.ext.element.create("DIV",{className:"ol-popupfeature"});this.get("canFix")&&ol.ext.element.create("I",{className:"ol-fix",parent:e}).addEventListener("click",function(){this.element.classList.toggle("ol-fixed")}.bind(this));var o,i=this._template;if("function"==typeof i)i=i(t,this._count,this._features.length);else if(!i||!i.attributes)for(var n in(i=i||{}).attributes={},t.getProperties())"geometry"!=n&&(i.attributes[n]=n);i.title&&(o="function"==typeof i.title?i.title(t):t.get(i.title),ol.ext.element.create("H1",{html:o,parent:e}));if(i.attributes){var r,s=ol.ext.element.create("TABLE",{parent:e}),a=this._attributeObject(i),l=t.getProperties();for(var c in a)if(l.hasOwnProperty(c)){var h,p=a[c],u=l[c];"function"==typeof p.format&&(u=p.format(u,t));var d=!0;if("boolean"==typeof p.visible?d=p.visible:"function"==typeof p.visible&&(d=p.visible(t,u)),d){if(r=ol.ext.element.create("TR",{parent:s}),ol.ext.element.create("TD",{html:p.title||c,parent:r}),this.get("showImage")&&/(http(s?):)([/|.|\w|\s|-])*\.(?:jpg|gif|png)/.test(u))h=ol.ext.element.create("IMG",{src:u});else{h=(p.before||"")+u+(p.after||"");var g=this.get("maxChar")||200;"string"==typeof h&&h.length>g&&(h=h.substr(0,g)+"[...]")}ol.ext.element.create("TD",{html:h,parent:r})}}}if(ol.ext.element.create("BUTTON",{className:"ol-zoombt",parent:e}).addEventListener("click",function(){if("Point"===t.getGeometry().getType())this.getMap().getView().animate({center:t.getGeometry().getFirstCoordinate(),zoom:Math.max(this.getMap().getView().getZoom(),18)});else{var e=t.getGeometry().getExtent();this.getMap().getView().fit(e,{duration:1e3})}}.bind(this)),!this.get("keepSelection")&&this._features.length>1){var m=ol.ext.element.create("DIV",{className:"ol-count",parent:e});ol.ext.element.create("DIV",{className:"ol-prev",parent:m,click:function(){this._count--,this._count<1&&(this._count=this._features.length),e=this._getHtml(this._features[this._count-1]),setTimeout(function(){ol.Overlay.Popup.prototype.show.call(this,this.getPosition(),e)}.bind(this),350)}.bind(this)}),ol.ext.element.create("TEXT",{html:this._count+"/"+this._features.length,parent:m}),ol.ext.element.create("DIV",{className:"ol-next",parent:m,click:function(){this._count++,this._count>this._features.length&&(this._count=1),e=this._getHtml(this._features[this._count-1]),setTimeout(function(){ol.Overlay.Popup.prototype.show.call(this,this.getPosition(),e)}.bind(this),350)}.bind(this)})}return this._select&&!this.get("keepSelection")&&(this._noselect=!0,this._select.getFeatures().clear(),this._select.getFeatures().push(t),this._noselect=!1),this.dispatchEvent({type:"select",feature:t,index:this._count}),e},ol.Overlay.PopupFeature.prototype.setFix=function(t){t?this.element.classList.add("ol-fixed"):this.element.classList.remove("ol-fixed")},ol.Overlay.PopupFeature.prototype.getFix=function(){return this.element.classList.contains("ol-fixed")},ol.Overlay.PopupFeature.localString=function(t,e){return function(o){if(o&&o.toLocaleString)return o.toLocaleString(t,e);var i=new Date(o);return isNaN(i)?o:i.toLocaleString(t,e)}},ol.Overlay.Tooltip=function(t){(t=t||{}).popupClass=t.popupClass||t.className||"tooltips black",t.positioning=t.positioning||"center-left",t.stopEvent=!!t.stopEvent,ol.Overlay.Popup.call(this,t),this.set("maximumFractionDigits",t.maximumFractionDigits||2),"function"==typeof t.formatLength&&(this.formatLength=t.formatLength),"function"==typeof t.formatArea&&(this.formatArea=t.formatArea),"function"==typeof t.getHTML&&(this.getHTML=t.getHTML),this._interaction=new ol.interaction.Interaction({handleEvent:function(t){if("pointermove"===t.type||"click"===t.type){var e=this.getHTML(this._feature,this.get("info"));e?this.show(t.coordinate,e):this.hide(),this._coord=t.coordinate}return!0}.bind(this)})},ol.ext.inherits(ol.Overlay.Tooltip,ol.Overlay.Popup),ol.Overlay.Tooltip.prototype.setMap=function(t){this.getMap()&&this.getMap().removeInteraction(this._interaction),ol.Overlay.Popup.prototype.setMap.call(this,t),this.getMap()&&this.getMap().addInteraction(this._interaction)},ol.Overlay.Tooltip.prototype.getHTML=function(t,e){return this.get("measure")?this.get("measure")+(e?"
"+e:""):e||""},ol.Overlay.Tooltip.prototype.setInfo=function(t){t?setTimeout(function(){this.set("info",t),this.show(this._coord,this.get("info"))}.bind(this)):(this.set("info",""),this.hide())},ol.Overlay.Tooltip.prototype.removeFeature=function(){this.setFeature()},ol.Overlay.Tooltip.prototype.formatArea=function(t){return t>Math.pow(10,-1*this.get("maximumFractionDigits"))?t>1e4?(t/1e6).toLocaleString(void 0,{maximumFractionDigits:this.get("maximumFractionDigits)")})+" km²":t.toLocaleString(void 0,{maximumFractionDigits:this.get("maximumFractionDigits")})+" m²":""},ol.Overlay.Tooltip.prototype.formatLength=function(t){return t>Math.pow(10,-1*this.get("maximumFractionDigits"))?t>100?(t/1e3).toLocaleString(void 0,{maximumFractionDigits:this.get("maximumFractionDigits")})+" km":t.toLocaleString(void 0,{maximumFractionDigits:this.get("maximumFractionDigits")})+" m":""},ol.Overlay.Tooltip.prototype.setFeature=function(t){t&&t.feature&&(t=t.feature),this._feature=t,this._listener&&this._listener.forEach(function(t){ol.Observable.unByKey(t)}),this._listener=[],this.set("measure",""),t&&this._listener.push(t.getGeometry().on("change",function(t){var e,o=t.target;o.getArea?e=this.formatArea(ol.sphere.getArea(o,{projection:this.getMap().getView().getProjection()})):o.getLength&&(e=this.formatLength(ol.sphere.getLength(o,{projection:this.getMap().getView().getProjection()}))),this.set("measure",e)}.bind(this)))},ol.coordinate.convexHull,function(){var t=function(t,e,o){return(t[0]-o[0])*(e[1]-o[1])-(t[1]-o[1])*(e[0]-o[0])<=0};ol.coordinate.convexHull=function(e){var o;e.sort(function(t,e){return t[0]==e[0]?t[1]-e[1]:t[0]-e[0]});var i=[];for(o=0;o=2&&t(i[i.length-2],i[i.length-1],e[o]);)i.pop();i.push(e[o])}var n=[];for(o=e.length-1;o>=0;o--){for(;n.length>=2&&t(n[n.length-2],n[n.length-1],e[o]);)n.pop();n.push(e[o])}return n.pop(),i.pop(),i.concat(n)};var e=function(t){var o,i,n=[];switch(t.getType()){case"Point":n.push(t.getCoordinates());break;case"LineString":case"LinearRing":case"MultiPoint":n=t.getCoordinates();break;case"MultiLineString":for(i=t.getLineStrings(),o=0;o1?".1":".4":a>2?l>1?".2":".3":l>2?a<2?".1":".2":l<1?a<2?".4":".3":".5"},ol.coordinate.fromDFCI=function(t,e){var o,i=1e5,n=t.charCodeAt(0)-65;n=(n<8?n:n-2)*i;var r=t.charCodeAt(1)-65;if(r=(r<8?r:r-2)*i+15e5,2===t.length)o=[n+i/2,r+i/2];else if(i/=5,n+=Number(t.charAt(2))/2*i,r+=Number(t.charAt(3))/2*i,4===t.length)o=[n+i/2,r+i/2];else{i/=10;var s=t.charCodeAt(4)-65;if(n+=(s<8?s:s-2)*i,r+=Number(t.charAt(5))*i,6===t.length)o=[n+i/2,r+i/2];else switch(t.charAt(7)){case"1":o=[n+i/4,r+3*i/4];break;case"2":o=[n+3*i/4,r+3*i/4];break;case"3":o=[n+3*i/4,r+i/4];break;case"4":o=[n+i/4,r+i/4];break;default:o=[n+i/2,r+i/2]}}return e&&(ol.proj.get("EPSG:27572")||(proj4.defs["EPSG:27572"]||proj4.defs("EPSG:27572","+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"),ol.proj.proj4.register(proj4)),o=ol.proj.transform(o,"EPSG:27572",e)),o},ol.coordinate.validDFCI=function(t){if(t.length<2||t.length>8)return!1;if(/[^A-H|^K-N]/.test(t.substr(0,1)))return!1;if(/[^B-H|^K-N]/.test(t.substr(1,1)))return!1;if(t.length>2){if(t.length<4)return!1;if(/[^0,^2,^4,^6,^8]/.test(t.substr(2,1)))return!1;if(/[^0,^2,^4,^6,^8]/.test(t.substr(3,1)))return!1}if(t.length>4){if(t.length<6)return!1;if(/[^A-H|^K-L]/.test(t.substr(4,1)))return!1;if(/[^0-9]/.test(t.substr(5,1)))return!1}if(t.length>6){if(t.length<8)return!1;if("."!==t.substr(6,1))return!1;if(/[^1-5]/.test(t.substr(7,1)))return!1}return!0},ol.coordinate.validDFCICoord=function(t,e){return e&&(ol.proj.get("EPSG:27572")||(proj4.defs["EPSG:27572"]||proj4.defs("EPSG:27572","+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs"),ol.proj.proj4.register(proj4)),t=ol.proj.transform(t,e,"EPSG:27572")),!(0>t[0]||t[0]>12e5)&&!(16e5>t[1]||t[1]>27e5)},ol.graph={},ol.graph.Dijskra=function(t){t=t||{},this.source=t.source,this.nodes=new ol.source.Vector,this.maxIteration=t.maxIteration||2e4,this.stepIteration=t.stepIteration||2e3,this.astar=!0,this.candidat=[],ol.Object.call(this),this.set("epsilon",t.epsilon||1e-6)},ol.ext.inherits(ol.graph.Dijskra,ol.Object),ol.graph.Dijskra.prototype.weight=function(){return 1},ol.graph.Dijskra.prototype.direction=function(){return 2},ol.graph.Dijskra.prototype.getLength=function(t){return t.getGeometry&&(t=t.getGeometry()),t.getLength()},ol.graph.Dijskra.prototype.getNodeSource=function(){return this.nodes},ol.graph.Dijskra.prototype.getEdges=function(t){var e=ol.extent.buffer(ol.extent.boundingExtent([t]),this.get("epsilon")),o=[];return this.source.forEachFeatureIntersectingExtent(e,function(t){o.push(t)}),o},ol.graph.Dijskra.prototype.getNode=function(t){var e=ol.extent.buffer(ol.extent.boundingExtent([t]),this.get("epsilon")),o=[];return this.nodes.forEachFeatureIntersectingExtent(e,function(t){o.push(t)}),o[0]},ol.graph.Dijskra.prototype.addNode=function(t,e,o,i,n){if(this.wdist&&e>this.wdist)return!1;var r=this.getNode(t),s=e+this.getLength(new ol.geom.LineString([this.end,t]))*this.weight();if(this.astar&&this.wdist&&s>this.wdist)return!1;if(r){if(r!==this.arrival&&r.get("wdist")<=e)return r;r.set("dist",o),r.set("wdist",e),r.set("dtotal",s),r.set("from",i),r.set("prev",n),r===this.arrival&&(this.wdist=e),this.candidat.push(r)}else r=new ol.Feature({geometry:new ol.geom.Point(t),from:i,prev:n,dist:o||0,wdist:e,dtotal:s}),e<0?r.set("wdist",!1):this.candidat.push(r),this.nodes.addFeature(r);return r},ol.graph.Dijskra.prototype.closestCoordinate=function(t){var e=this.source.getClosestFeatureToCoordinate(t),o=e.getGeometry().getFirstCoordinate(),i=e.getGeometry().getLastCoordinate();return ol.coordinate.dist2d(t,o)o&&(t=e,o=e.get("wdist"));return this.getRoute(t)},ol.graph.Dijskra.prototype._resume=function(){if(this.running){for(;this.candidat.length;){this.candidat.sort(function(t,e){return t.get("dtotal")this.maxIteration)return this.running=!1,void this.dispatchEvent({type:"pause",overflow:-1!==this.nb});if(!(this.nb%this.stepIteration)){var h=this;return window.setTimeout(function(){h._resume()},5),void this.dispatchEvent({type:"calculating"})}}}this.nodes.clear(),this.running=!1,this.dispatchEvent({type:"finish",route:this.getRoute(this.arrival),wDistance:this.wdist,distance:this.arrival.get("dist")})}},ol.graph.Dijskra.prototype.getRoute=function(t){for(var e=[];t;)e.unshift(t.get("from")),t=t.get("prev");return e.shift(),e},ol.geom.GPAltiCode=function(t,e){e=e||{};var o=t.getType();if("Point"===o||"LineString"===o){var i=e.projection||"EPSG:3857",n=e.sampling||0;if(e.samplingDist){var r=t.getLength();n=Math.max(n,Math.round(r/e.samplingDist))}n>5e3&&(n=5e3),n<2&&(n=0),t=t.clone().transform(i,"EPSG:4326");var s,a=[],l=[];switch(o){case"Point":s=[t.getCoordinates()];break;case"LineString":s=t.getCoordinates();break;default:return}n<=s.length&&(n=0),s.forEach(function(t){a.push(Math.round(1e6*t[0])/1e6),l.push(Math.round(1e6*t[1])/1e6)});var c="lon="+a.join("|")+"&lat="+l.join("|");n&&(c+="&sampling="+n),ol.ext.Ajax.get({url:"https://wxs.ign.fr/"+(e.apiKey||"essentiels")+"/alti/rest/"+(a.length>1?"elevationLine":"elevation")+".json?"+c,success:function(t){var r=[];t.elevations.forEach(function(t,e){n?r.push([t.lon,t.lat,t.z]):r.push([s[e][0],s[e][1],t.z])}),"Point"===o&&(r=r[0]);var a=ol.geom.createFromType(o,r);a.transform("EPSG:4326",i),"function"==typeof e.success&&e.success(a)},error:function(t){"function"==typeof e.error&&e.error(t)}})}else console.warn("[GPAltiCode] "+o+" not supported...")},ol.coordinate.GPAltiCode=function(t,e){e=e||{};var o=!t[0].length?new ol.geom.Point(t):new ol.geom.LineString(t);ol.geom.GPAltiCode(o,{projection:e.projection,apiKey:e.apiKey,sampling:e.sampling,samplingDist:e.samplingDist,success:function(t){"function"==typeof e.success&&e.success(t.getCoordinates())},error:e.error})},ol.coordinate.dist2d=function(t,e){var o=t[0]-e[0],i=t[1]-e[1];return Math.sqrt(o*o+i*i)},ol.coordinate.equal=function(t,e){return t[0]==e[0]&&t[1]==e[1]},ol.coordinate.getFeatureCenter=function(t){return ol.coordinate.getGeomCenter(t.getGeometry())},ol.coordinate.getGeomCenter=function(t){switch(t.getType()){case"Point":return t.getCoordinates();case"MultiPolygon":t=t.getPolygon(0);case"Polygon":return t.getInteriorPoint().getCoordinates();default:return t.getClosestPoint(ol.extent.getCenter(t.getExtent()))}},ol.coordinate.offsetCoords=function(t,e){var o,i,n,r,s,a,l,c,h,p,u,d,g,m=[],f=t.length-1,y=f,v=ol.coordinate.equal(t[0],t[f]);v||(u=t[0],d=t[1],g=[u[0]+(d[1]-u[1])/ol.coordinate.dist2d(u,d)*e,u[1]-(d[0]-u[0])/ol.coordinate.dist2d(u,d)*e],m.push(g),t.push(t[f]),f++,y--);for(var _=0;_1e-10&&(n=Math.sqrt((d[0]-u[0])*(d[0]-u[0])+(d[1]-u[1])*(d[1]-u[1])),r=Math.sqrt((g[0]-d[0])*(g[0]-d[0])+(g[1]-d[1])*(g[1]-d[1])),s=u[0]+e*(d[1]-u[1])/n,h=(i*(a=d[0]+e*(g[1]-d[1])/r)-o*s+(l=u[1]-e*(d[0]-u[0])/n)-(c=d[1]-e*(g[0]-d[0])/r))/(i-o),p=(o*i*(a-s)+i*l-o*c)/(i-o),d[0]-u[0]==0&&(p=i*(h=d[0]+e*(d[1]-u[1])/Math.abs(d[1]-u[1]))-i*a+c),g[0]-d[0]==0&&(p=o*(h=g[0]+e*(g[1]-d[1])/Math.abs(g[1]-d[1]))-o*s+l),m.push([h,p]));return v?m.push(m[0]):(t.pop(),u=t[t.length-1],d=t[t.length-2],g=[u[0]-(d[1]-u[1])/ol.coordinate.dist2d(u,d)*e,u[1]+(d[0]-u[0])/ol.coordinate.dist2d(u,d)*e],m.push(g)),m},ol.coordinate.findSegment=function(t,e){for(var o=0;oe||t[s][1]>=e&&t[s+1][1]0;i--)(t[i][0]>e&&t[i-1][0]e)&&(o=[e,(e-t[i][0])/(t[i-1][0]-t[i][0])*(t[i-1][1]-t[i][1])+t[i][1]],t.splice(i,0,o))}function e(t,e){for(var o,i=t.length-1;i>0;i--)(t[i][1]>e&&t[i-1][1]e)&&(o=[(e-t[i][1])/(t[i-1][1]-t[i][1])*(t[i-1][0]-t[i][0])+t[i][0],e],t.splice(i,0,o))}ol.extent.intersection=function(o,i){var n="Polygon"===i.getType();if(!n&&"MultiPolygon"!==i.getType())return null;var r=i.getCoordinates();return n&&(r=[r]),r.forEach(function(i){i.forEach(function(i){t(i,o[0]),t(i,o[2]),e(i,o[1]),e(i,o[3])})}),r.forEach(function(t){t.forEach(function(t){t.forEach(function(t){t[0]o[2]&&(t[0]=o[2]),t[1]o[3]&&(t[1]=o[3])})})}),n?new ol.geom.Polygon(r[0]):new ol.geom.MultiPolygon(r)}}(),ol.coordinate.sampleAt=function(t,e,o,i){var n=[];!1!==i&&n.push(t);var r=ol.coordinate.dist2d(t,e);if(r){var s=Math.round(r/o);if(s>1)for(var a=(e[0]-t[0])/s,l=(e[1]-t[1])/s,c=1;cn?(s=!0,o.push([i[0]+n/e*(t[0]-i[0]),i[1]+n/e*(t[1]-i[1])])):o.push(t)})})}),s?"Polygon"===t.getType()?new ol.geom.Polygon(a[0]):new ol.geom.MultiPolygon(a):t}}else console.warn("[ol/geom/Circle~intersection] Unsupported geometry type: "+t.getType());return t},ol.geom.LineString.prototype.splitAt=function(t,e){var o;if(!t)return[this];if(e||(e=1e-10),t.length&&t[0].length){var i=[this];for(o=0;o1&&c.push(new ol.geom.LineString(l)),c.length?c:[this]},ol.geom.MultiPolygon.prototype.scribbleFill=function(t){var e,o,i,n=[],r=this.getPolygons();for(e=0;o=r[e];e++){var s=o.scribbleFill(t);s&&n.push(s)}if(!n.length)return null;var a,l=n[0];for(e=0;i=n[e];e++){a=i.getLineStrings();for(var c=0;cf);){if(h[o][0].pt[1]===f){var _=Math.min((h[o][0].index-i[0].index+u)%u,(i[0].index-h[o][0].index+u)%u),x=Math.min((i[1].index-i[0].index+u)%u,(i[0].index-i[1].index+u)%u);_12)&&(e=12);for(var a=0,l=0,c=!0,h="",p=-90,u=90,d=-180,g=180;h.length=m?(a=2*a+1,d=m):(a*=2,g=m)}else{var f=(p+u)/2;i>=f?(a=2*a+1,p=f):(a*=2,u=f)}c=!c,5==++l&&(h+=ol.geohash.base32.charAt(a),l=0,a=0)}return h},ol.geohash.toLonLat=function(t){var e=ol.geohash.getExtent(t),o=e[1],i=e[0],n=e[3],r=e[2],s=(o+n)/2,a=(i+r)/2;return s=s.toFixed(Math.floor(2-Math.log(n-o)/Math.LN10)),a=a.toFixed(Math.floor(2-Math.log(r-i)/Math.LN10)),[Number(a),Number(s)]},ol.geohash.getExtent=function(t){if(!t)return!1;t=t.toLowerCase();for(var e=!0,o=-90,i=90,n=-180,r=180,s=0;s=0;c--){var h=l>>c&1;if(e){var p=(n+r)/2;1==h?n=p:r=p}else{var u=(o+i)/2;1==h?o=u:i=u}e=!e}}return[n,o,r,i]},ol.geohash.getAdjacent=function(t,e){if(t=t.toLowerCase(),e=e.toLowerCase(),!t)return!1;if(-1=="nsew".indexOf(e))return!1;var o=t.slice(-1),i=t.slice(0,-1),n=t.length%2;return-1!={n:["prxz","bcfguvyz"],s:["028b","0145hjnp"],e:["bcfguvyz","prxz"],w:["0145hjnp","028b"]}[e][n].indexOf(o)&&""!=i&&(i=ol.geohash.getAdjacent(i,e)),i+ol.geohash.base32.charAt({n:["p0r21436x8zb9dcf5h7kjnmqesgutwvy","bc01fg45238967deuvhjyznpkmstqrwx"],s:["14365h7k9dcfesgujnmqp0r2twvyx8zb","238967debc01fg45kmstqrwxuvhjyznp"],e:["bc01fg45238967deuvhjyznpkmstqrwx","p0r21436x8zb9dcf5h7kjnmqesgutwvy"],w:["238967debc01fg45kmstqrwxuvhjyznp","14365h7k9dcfesgujnmqp0r2twvyx8zb"]}[e][n].indexOf(o))},ol.geohash.getNeighbours=function(t){return{n:ol.geohash.getAdjacent(t,"n"),ne:ol.geohash.getAdjacent(ol.geohash.getAdjacent(t,"n"),"e"),e:ol.geohash.getAdjacent(t,"e"),se:ol.geohash.getAdjacent(ol.geohash.getAdjacent(t,"s"),"e"),s:ol.geohash.getAdjacent(t,"s"),sw:ol.geohash.getAdjacent(ol.geohash.getAdjacent(t,"s"),"w"),w:ol.geohash.getAdjacent(t,"w"),nw:ol.geohash.getAdjacent(ol.geohash.getAdjacent(t,"n"),"w")}},ol.sphere.greatCircleBearing=function(t,e){var o=Math.PI/180,i=[t[0]*o,t[1]*o],n=[e[0]*o,e[1]*o];return Math.atan2(Math.sin(n[0]-i[0])*Math.cos(n[1]),Math.cos(i[1])*Math.sin(n[1])-Math.sin(i[1])*Math.cos(n[1])*Math.cos(n[0]-i[0]))};ol.sphere.computeDestinationPoint=function(t,e,o,i){i=i||{};var n=Math.PI/180,r=i.radius||6371008.8,s=t[1]*n,a=t[0]*n,l=e/r,c=Math.asin(Math.sin(s)*Math.cos(l)+Math.cos(s)*Math.sin(l)*Math.cos(o)),h=(a+Math.atan2(Math.sin(o)*Math.sin(l)*Math.cos(s),Math.cos(l)-Math.sin(s)*Math.sin(c)))/n;return!1!==i.normalize&&(h<-180||h>180)&&(h=540*h%360-180),[h,c/n]},ol.sphere.greatCircleTrack=function(t,e,o){o=o||{};for(var i=ol.sphere.greatCircleBearing(t,e),n=ol.sphere.getDistance(t,e,o.radius),r=o.distance||1e3,s=r,a=[t];s1&&(l[0]>e[0]?e[0]+=360:e[0]-=360),a.push(e),a},ol.sphere.getMapScale=function(t,e){var o=t.getView(),i=o.getProjection(),n=o.getCenter(),r=t.getPixelFromCoordinate(n);r[1]+=1;var s=t.getCoordinateFromPixel(r),a=ol.sphere.getDistance(ol.proj.transform(n,i,"EPSG:4326"),ol.proj.transform(s,i,"EPSG:4326"));return a*=(e||96)/.0254},ol.sphere.setMapScale=function(t,e,o){if(t&&e){var i=e;if("string"==typeof e&&((i=e.split("/")[1])||(i=e),i=i.replace(/[^\d]/g,""),i=parseInt(i)),!i)return;var n=t.getView(),r=n.getProjection(),s=n.getCenter(),a=t.getPixelFromCoordinate(s);a[1]+=1;var l=t.getCoordinateFromPixel(a),c=ol.sphere.getDistance(ol.proj.transform(s,r,"EPSG:4326"),ol.proj.transform(l,r,"EPSG:4326"));return c*=(o||96)/.0254,n.setResolution(n.getResolution()*i/c),i}},ol.Map.prototype.animExtent=function(t,e){var o;(e=e||{}).projection&&(t=ol.proj.transformExtent(t,e.projection,this.getView().getProjection()));var i=(new Date).getTime(),n=e.duration||1e3,r=e.easing||ol.easing.upAndDown,s=e.style&&e.style.getWidth()||2,a=e.style&&e.style.getColr()||"red";o=this.on("postcompose",function(e){var l=e.frameState,c=l.pixelRatio,h=l.time-i;if(h>n)ol.Observable.unByKey(o);else{var p=h/n,u=this.getPixelFromCoordinate([t[0],t[1]]),d=this.getPixelFromCoordinate([t[2],t[3]]),g=e.context;g.save(),g.scale(c,c),g.beginPath(),g.globalAlpha=r(1-p),g.lineWidth=s,g.strokeStyle=a,g.rect(u[0],u[1],d[0]-u[0],d[1]-u[1]),g.stroke(),g.restore(),l.animate=!0}}.bind(this));try{this.renderSync()}catch(t){}},ol.geom.Geometry.prototype.cspline=function(t){return this.calcCSpline_?(this.csplineGeometryRevision==this.getRevision()&&this.csplineOption==JSON.stringify(t)||(this.csplineGeometry_=this.calcCSpline_(t),this.csplineGeometryRevision=this.getRevision(),this.csplineOption=JSON.stringify(t)),this.csplineGeometry_):this},ol.geom.GeometryCollection.prototype.calcCSpline_=function(t){for(var e=[],o=this.getGeometries(),i=0;i2&&t[0][0]==t[t.length-1][0]&&t[0][1]==t[t.length-1][1]?(r.unshift(t[t.length-2]),r.push(t[1])):(r.unshift(t[0]),r.push(t[t.length-1])),v=1;vr&&n>s?e=-o-i:r>s?o=-e-i:i=-e-o,[e,o,i]},ol.HexGrid.prototype.hex_round=function(t){return this.cube2hex(this.cube_round(this.hex2cube(t)))},ol.HexGrid.prototype.hex_corner=function(t,e,o){return[t[0]+e*this.layout_[8+o%6*2],t[1]+e*this.layout_[9+o%6*2]]},ol.HexGrid.prototype.getHexagonAtCoord=function(t){return this.getHexagon(this.coord2hex(t))},ol.HexGrid.prototype.getHexagon=function(t){for(var e=[],o=this.hex2coord(t),i=0;i<=7;i++)e.push(this.hex_corner(o,this.size_,i,this.layout_[8]));return e},ol.HexGrid.prototype.hex2coord=function(t){return[this.origin_[0]+this.size_*(this.layout_[0]*t[0]+this.layout_[1]*t[1]),this.origin_[1]+this.size_*(this.layout_[2]*t[0]+this.layout_[3]*t[1])]},ol.HexGrid.prototype.coord2hex=function(t){var e=[(t[0]-this.origin_[0])/this.size_,(t[1]-this.origin_[1])/this.size_],o=this.layout_[4]*e[0]+this.layout_[5]*e[1],i=this.layout_[6]*e[0]+this.layout_[7]*e[1];return this.hex_round([o,i])},ol.HexGrid.prototype.cube_distance=function(t,e){return Math.max(Math.abs(t[0]-e[0]),Math.abs(t[1]-e[1]),Math.abs(t[2]-e[2]))},function(){function t(t,e,o){return t+(e-t)*o}function e(e,o,i){return[t(e[0]+1e-6,o[0],i),t(e[1]+1e-6,o[1],i),t(e[2]+1e-6,o[2],i)]}ol.HexGrid.prototype.cube_line=function(t,o){var i=this.cube_distance(t,o);if(!i)return[t];for(var n=[],r=0;r<=i;r++)n.push(this.cube_round(e(t,o,r/i)));return n}}(),ol.HexGrid.prototype.neighbors={cube:[[1,-1,0],[1,0,-1],[0,1,-1],[-1,1,0],[-1,0,1],[0,-1,1]],hex:[[1,0],[1,-1],[0,-1],[-1,0],[-1,1],[0,1]]},ol.HexGrid.prototype.hex_neighbors=function(t,e){if(void 0!==e)return[t[0]+this.neighbors.hex[e%6][0],t[1]+this.neighbors.hex[e%6][1]];var o=[];for(e=0;e<6;e++)o.push([t[0]+this.neighbors.hex[e][0],t[1]+this.neighbors.hex[e][1]]);return o},ol.HexGrid.prototype.cube_neighbors=function(t,e){if(void 0!==e)return[t[0]+this.neighbors.cube[e%6][0],t[1]+this.neighbors.cube[e%6][1],t[2]+this.neighbors.cube[e%6][2]];var o=[];for(e=0;e<6;e++)o.push([t[0]+this.neighbors.cube[e][0],t[1]+this.neighbors.cube[e][1],t[2]+this.neighbors.cube[e][2]]);for(e=0;e<6;e++)o[e]=this.cube2hex(o[e]);return o},ol.InseeGrid=function(t){t=t||{},proj4.defs["EPSG:3035"]||(proj4.defs("EPSG:3035","+proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +units=m +no_defs"),ol.proj.proj4.register(proj4)),ol.Object.call(this,t);var e=Math.max(200,200*Math.round((t.size||0)/200));this.set("size",e)},ol.ext.inherits(ol.InseeGrid,ol.Object),ol.InseeGrid.extent=[32e5,2e6,43e5,314e4],ol.InseeGrid.prototype.getExtent=function(t){return ol.proj.transformExtent(ol.InseeGrid.extent,t||"EPSG:3035","EPSG:3857")},ol.InseeGrid.prototype.getGridAtCoordinate=function(t,e){var o=ol.proj.transform(t,e||"EPSG:3857","EPSG:3035"),i=this.get("size"),n=Math.floor(o[0]/i)*i,r=Math.floor(o[1]/i)*i,s=new ol.geom.Polygon([[[n,r],[n+i,r],[n+i,r+i],[n,r+i],[n,r]]]);return s.transform("EPSG:3035",e||"EPSG:3857"),s},ol.Map.prototype.markup=function(t,e){var o,i=this;(e=e||{}).projection&&(t=ol.proj.transform(t,e.projection,this.getView().getProjection()));var n=(new Date).getTime(),r=e.delay||3e3,s=1e3,a=e.maxZoom||100,l=ol.easing.easeOut,c=e.style;c||(c=new ol.style.Circle({radius:10,stroke:new ol.style.Stroke({color:"red",width:2})})),c instanceof ol.style.Image&&(c=new ol.style.Style({image:c})),c instanceof Array||(c=[c]),setTimeout(function(){if(o)try{i.renderSync()}catch(t){}},r),o=this.on("postcompose",function(e){var i=e.frameState,h=i.time-n;if(h>r+s)ol.Observable.unByKey(o),o=null;else{r>h&&this.getView().getZoom()>a&&(r=h);var p=i.pixelRatio,u=0;h>r&&(u=(h-r)/s);var d=e.context;d.save(),d.beginPath(),d.globalAlpha=l(1-u);for(var g=0;g=r&&(i.animate=!0)}}.bind(this));try{this.renderSync()}catch(t){}return o.stop=function(){r=s=0;try{this.target.renderSync()}catch(t){}},o},ol.ordering={},ol.ordering.yOrdering=function(){return function(t,e){return e.getGeometry().getExtent()[1]-t.getGeometry().getExtent()[1]}},ol.ordering.zIndex=function(t){t||(t={});var e=t.attribute||"zIndex";return t.equalFn?function(o,i){return o.get(e)==i.get(e)?t.equalFn(o,i):o.get(e)n)ol.Observable.unByKey(o);else{var p=h/n,u=e.context;u.save(),u.beginPath();var d=r(p);u.globalAlpha=r(1-p),console.log("anim");for(var g=0;g0?Number(t.scale):1)*ol.has.DEVICE_PIXEL_RATIO||ol.has.DEVICE_PIXEL_RATIO,n=o.getContext("2d");if(t.image){var r;t.image.load();var s=t.image.getImage();if(s.width)o.width=Math.round(s.width*i),o.height=Math.round(s.height*i),n.globalAlpha="number"==typeof t.opacity?t.opacity:1,n.drawImage(s,0,0,s.width,s.height,0,0,o.width,o.height),e=n.createPattern(o,"repeat");else{var a=this;e=[0,0,0,0],s.onload=function(){o.width=Math.round(s.width*i),o.height=Math.round(s.height*i),n.globalAlpha="number"==typeof t.opacity?t.opacity:1,n.drawImage(s,0,0,s.width,s.height,0,0,o.width,o.height),e=n.createPattern(o,"repeat"),a.setColor(e)}}}else{var l=this.getPattern_(t);if(o.width=Math.round(l.width*i),o.height=Math.round(l.height*i),n.beginPath(),t.fill&&(n.fillStyle=ol.color.asString(t.fill.getColor()),n.fillRect(0,0,o.width,o.height)),n.scale(i,i),n.lineCap="round",n.lineWidth=l.stroke||1,n.fillStyle=ol.color.asString(t.color||"#000"),n.strokeStyle=ol.color.asString(t.color||"#000"),l.circles)for(r=0;r180&&(n-=360),n*=Math.PI/180;var r=Math.cos(n),s=Math.sin(n);if(Math.abs(s)<1e-4)o.width=o.height=i,o.lines=[[0,.5,i,.5]],o.repeat=[[0,0],[0,i]];else if(Math.abs(r)<1e-4)o.width=o.height=i,o.lines=[[.5,0,.5,i]],o.repeat=[[0,0],[i,0]],"cross"==t.pattern&&(o.lines.push([0,.5,i,.5]),o.repeat.push([0,i]));else{var a=o.width=Math.round(Math.abs(i/s))||1,l=o.height=Math.round(Math.abs(i/r))||1;"cross"==t.pattern?(o.lines=[[-a,-l,2*a,2*l],[2*a,-l,-a,2*l]],o.repeat=[[0,0]]):r*s>0?(o.lines=[[-a,-l,2*a,2*l]],o.repeat=[[0,0],[a,0],[0,l]]):(o.lines=[[2*a,-l,-a,2*l]],o.repeat=[[0,0],[-a,0],[0,l]])}o.stroke=0===t.size?0:t.size||4}return o},ol.style.FillPattern.addPattern=function(t,e){e||(e={}),ol.style.FillPattern.prototype.patterns[t||e.char]={width:e.width||e.size||10,height:e.height||e.size||10,font:e.font,char:e.char,circles:e.circles,lines:e.lines,repeat:e.repeat,stroke:e.stroke,angle:e.angle,fill:e.fill}},ol.style.FillPattern.prototype.patterns={hatch:{width:5,height:5,lines:[[0,2.5,5,2.5]],stroke:1},cross:{width:7,height:7,lines:[[0,3,10,3],[3,0,3,10]],stroke:1},dot:{width:8,height:8,circles:[[5,5,2]],stroke:!1,fill:!0},circle:{width:10,height:10,circles:[[5,5,2]],stroke:1,fill:!1},square:{width:10,height:10,lines:[[3,3,3,8,8,8,8,3,3,3]],stroke:1,fill:!1},tile:{width:10,height:10,lines:[[3,3,3,8,8,8,8,3,3,3]],fill:!0},woven:{width:12,height:12,lines:[[3,3,9,9],[0,12,3,9],[9,3,12,0],[-1,1,1,-1],[13,11,11,13]],stroke:1},crosses:{width:8,height:8,lines:[[2,2,6,6],[2,6,6,2]],stroke:1},caps:{width:8,height:8,lines:[[2,6,4,2,6,6]],stroke:1},nylon:{width:20,height:20,lines:[[1,6,1,1,6,1],[6,11,11,11,11,6],[11,16,11,21,16,21],[16,11,21,11,21,16]],repeat:[[0,0],[-20,0],[0,-20]],stroke:1},hexagon:{width:20,height:12,lines:[[0,10,4,4,10,4,14,10,10,16,4,16,0,10]],stroke:1,repeat:[[0,0],[10,6],[10,-6],[-10,-6]]},cemetry:{width:15,height:19,lines:[[0,3.5,7,3.5],[3.5,0,3.5,10]],stroke:1,repeat:[[0,0],[7,9]]},sand:{width:20,height:20,circles:[[1,2,1],[9,3,1],[2,16,1],[7,8,1],[6,14,1],[4,19,1],[14,2,1],[12,10,1],[14,18,1],[18,8,1],[18,14,1]],fill:1},conglomerate:{width:60,height:40,circles:[[2,4,1],[17,3,1],[26,18,1],[12,17,1],[5,17,2],[28,11,2]],lines:[[7,5,6,7,9,9,11,8,11,6,9,5,7,5],[16,10,15,13,16,14,19,15,21,13,22,9,20,8,19,8,16,10],[24,6,26,7,27,5,26,4,24,4,24,6]],repeat:[[30,0],[-15,20],[15,20],[45,20]],stroke:1},conglomerate2:{width:60,height:40,circles:[[2,4,1],[17,3,1],[26,18,1],[12,17,1],[5,17,2],[28,11,2]],lines:[[7,5,6,7,9,9,11,8,11,6,9,5,7,5],[16,10,15,13,16,14,19,15,21,13,22,9,20,8,19,8,16,10],[24,6,26,7,27,5,26,4,24,4,24,6]],repeat:[[30,0],[-15,20],[15,20],[45,20]],fill:1},gravel:{width:15,height:10,circles:[[4,2,1],[5,9,1],[1,7,1]],lines:[[7,5,6,6,7,7,8,7,9,7,10,5,9,4,7,5],[11,2,14,4,14,1,12,1,11,2]],stroke:1},brick:{width:18,height:16,lines:[[0,1,18,1],[0,10,18,10],[6,1,6,10],[12,10,12,18],[12,0,12,1]],stroke:1},dolomite:{width:20,height:16,lines:[[0,1,20,1],[0,9,20,9],[1,9,6,1],[11,9,14,16],[14,0,14.4,1]],stroke:1},coal:{width:20,height:16,lines:[[1,5,7,1,7,7],[11,10,12,5,18,9],[5,10,2,15,9,15],[15,16,15,13,20,16],[15,0,15,2,20,0]],fill:1},breccia:{width:20,height:16,lines:[[1,5,7,1,7,7,1,5],[11,10,12,5,18,9,11,10],[5,10,2,15,9,15,5,10],[15,16,15,13,22,18],[15,0,15,2,20,0]],stroke:1},clay:{width:20,height:20,lines:[[0,0,3,11,0,20],[11,0,10,3,13,13,11,20],[0,0,10,3,20,0],[0,12,3,11,13,13,20,12]],stroke:1},flooded:{width:15,height:10,lines:[[0,1,10,1],[0,6,5,6],[10,6,15,6]],stroke:1},chaos:{width:40,height:40,lines:[[40,2,40,0,38,0,40,2],[4,0,3,2,2,5,0,0,0,3,2,7,5,6,7,7,8,10,9,12,9,13,9,14,8,14,6,15,2,15,0,20,0,22,2,20,5,19,8,15,10,14,11,12.25,10,12,10,10,12,9,13,7,12,6,13,4,16,7,17,4,20,0,18,0,15,3,14,2,14,0,12,1,11,0,10,1,11,4,10,7,9,8,8,5,6,4,5,3,5,1,5,0,4,0],[7,1,7,3,8,3,8,2,7,1],[4,3,5,5,4,5,4,3],[34,5,33,7,38,10,38,8,36,5,34,5],[27,0,23,2,21,8,30,0,27,0],[25,8,26,12,26,16,22.71875,15.375,20,13,18,15,17,18,13,22,17,21,19,22,21,20,19,18,22,17,30,25,26,26,24,28,21.75,33.34375,20,36,18,40,20,40,24,37,25,32,27,31,26,38,27,37,30,32,32,35,36,37,38,40,38,39,40,40,37,36,34,32,37,31,36,29,33,27,34,24,39,21,40,21,40,16,37,20,31,22,32,25,27,20,29,15,30,20,32,20,34,18,33,12,31,11,29,14,26,9,25,8],[39,24,37,26,40,28,39,24],[13,15,9,19,14,18,13,15],[18,23,14,27,16,27,17,25,20,26,18,23],[6,24,2,26,1,28,2,30,5,28,12,30,16,32,18,30,15,30,12,28,9,25,7,27,6,24],[29,27,32,28,33,31,30,29,27,28,29,27],[5,35,1,33,3,36,13,38,15,35,10,36,5,35]],fill:1},grass:{width:27,height:22,lines:[[0,10.5,13,10.5],[2.5,10,1.5,7],[4.5,10,4.5,5,3.5,4],[7,10,7.5,6,8.5,3],[10,10,11,6]],repeat:[[0,0],[14,10]],stroke:1},swamp:{width:24,height:23,lines:[[0,10.5,9.5,10.5],[2.5,10,2.5,7],[4.5,10,4.5,4],[6.5,10,6.5,6],[3,12.5,7,12.5]],repeat:[[0,0],[14,10]],stroke:1},reed:{width:26,height:23,lines:[[2.5,10,2,7],[4.5,10,4.2,4],[6.5,10,6.8,4],[8.5,10,9,6],[3.7,4,3.7,2.5],[4.7,4,4.7,2.5],[6.3,4,6.3,2.5],[7.3,4,7.3,2.5]],circles:[[4.2,2.5,.5],[18.2,12.5,.5],[6.8,2.5,.5],[20.8,12.5,.5],[9,6,.5],[23,16,.5]],repeat:[[0,0],[14,10]],stroke:1},wave:{width:10,height:8,lines:[[0,0,5,4,10,0]],stroke:1},vine:{width:13,height:13,lines:[[3,0,3,6],[9,7,9,13]],stroke:1},forest:{width:55,height:30,circles:[[7,7,3.5],[20,20,1.5],[42,22,3.5],[35,5,1.5]],stroke:1},forest2:{width:55,height:30,circles:[[7,7,3.5],[20,20,1.5],[42,22,3.5],[35,5,1.5]],fill:1,stroke:1},scrub:{width:26,height:20,lines:[[1,4,4,8,6,4]],circles:[[20,13,1.5]],stroke:1},tree:{width:30,height:30,lines:[[7.78,10.61,4.95,10.61,4.95,7.78,3.54,7.78,2.12,6.36,.71,6.36,0,4.24,.71,2.12,4.24,0,7.78,.71,9.19,3.54,7.78,4.95,7.07,7.07,4.95,7.78]],repeat:[[3,1],[18,16]],stroke:1},tree2:{width:30,height:30,lines:[[7.78,10.61,4.95,10.61,4.95,7.78,3.54,7.78,2.12,6.36,.71,6.36,0,4.24,.71,2.12,4.24,0,7.78,.71,9.19,3.54,7.78,4.95,7.07,7.07,4.95,7.78,4.95,10.61,7.78,10.61]],repeat:[[3,1],[18,16]],fill:1,stroke:1},pine:{width:30,height:30,lines:[[5.66,11.31,2.83,11.31,2.83,8.49,0,8.49,2.83,0,5.66,8.49,2.83,8.49]],repeat:[[3,1],[18,16]],stroke:1},pine2:{width:30,height:30,lines:[[5.66,11.31,2.83,11.31,2.83,8.49,0,8.49,2.83,0,5.66,8.49,2.83,8.49,2.83,11.31,5.66,11.31]],repeat:[[3,1],[18,16]],fill:1,stroke:1},mixtree:{width:30,height:30,lines:[[7.78,10.61,4.95,10.61,4.95,7.78,3.54,7.78,2.12,6.36,.71,6.36,0,4.24,.71,2.12,4.24,0,7.78,.71,9.19,3.54,7.78,4.95,7.07,7.07,4.95,7.78,4.95,10.61,7.78,10.61],[23.66,27.31,20.83,27.31,20.83,24.49,18,24.49,20.83,16,23.66,24.49,20.83,24.49,20.83,27.31,23.66,27.31]],repeat:[[3,1]],stroke:1},mixtree2:{width:30,height:30,lines:[[7.78,10.61,4.95,10.61,4.95,7.78,3.54,7.78,2.12,6.36,.71,6.36,0,4.24,.71,2.12,4.24,0,7.78,.71,9.19,3.54,7.78,4.95,7.07,7.07,4.95,7.78,4.95,10.61,7.78,10.61],[23.66,27.31,20.83,27.31,20.83,24.49,18,24.49,20.83,16,23.66,24.49,20.83,24.49,20.83,27.31,23.66,27.31]],repeat:[[3,1]],fill:1,stroke:1},pines:{width:22,height:20,lines:[[1,4,3.5,1,6,4],[1,8,3.5,5,6,8],[3.5,1,3.5,11],[12,14.5,14.5,14,17,14.5],[12,18,17,18],[14.5,12,14.5,18]],repeat:[[2,1]],stroke:1},rock:{width:20,height:20,lines:[[1,0,1,9],[4,0,4,9],[7,0,7,9],[10,1,19,1],[10,4,19,4],[10,7,19,7],[0,11,9,11],[0,14,9,14],[0,17,9,17],[12,10,12,19],[15,10,15,19],[18,10,18,19]],repeat:[[.5,.5]],stroke:1},rocks:{width:20,height:20,lines:[[5,0,3,0,5,4,4,6,0,3,0,5,3,6,5,9,3.75,10,2.5,10,0,9,0,10,4,11,5,14,4,15,0,13,0,13,0,13,0,14,0,14,5,16,5,18,3,19,0,19,-.25,19.9375,5,20,10,19,10,20,11,20,12,19,14,20,15,20,17,19,20,20,20,19,19,16,20,15,20,11,20,10,19,8,20,5,20,0,19,0,20,2,19,4,17,4,16,3,15,0,14,0,15,4,11,5,10,4,11,0,10,0,9,4,6,5,5,0],[18,5,19,6,18,10,16,10,14,9,16,5,18,5],[5,6,9,5,10,6,10,9,6,10,5,6],[14,5,14,8,13,9,12,9,11,7,12,5,14,5],[5,11,8,10,9,11,10,14,6,15,6,15,5,11],[13,10,14,11,15,14,15,14,15,14,11,15,10,11,11,10,13,10],[15,12,16,11,19,11,19,15,16,14,16,14,15,12],[6,16,9,15,10,18,5,19,6,16],[10,16,14,16,14,18,13,19,11,18,10,16],[15,15,18,16,18,18,16,19,15,18,15,15]],stroke:1}},ol.style.FlowLine=function(t){t||(t={}),ol.style.Style.call(this,{renderer:this._render.bind(this),stroke:t.stroke,text:t.text,zIndex:t.zIndex,geometry:t.geometry}),this._visible=!1!==t.visible,"function"==typeof t.width?this._widthFn=t.width:this.setWidth(t.width),this.setWidth2(t.width2),"function"==typeof t.color?this._colorFn=t.color:this.setColor(t.color),this.setColor2(t.color2),this.setLineCap(t.lineCap),this.setArrow(t.arrow),this.setArrowSize(t.arrowSize),this.setArrowColor(t.arrowColor),this._offset=[0,0],this.setOffset(t.offset0,0),this.setOffset(t.offset1,1),this._noOverlap=t.noOverlap},ol.ext.inherits(ol.style.FlowLine,ol.style.Style),ol.style.FlowLine.prototype.setWidth=function(t){this._width=t||0},ol.style.FlowLine.prototype.setWidth2=function(t){this._width2=t},ol.style.FlowLine.prototype.getOffset=function(t){return this._offset[t]},ol.style.FlowLine.prototype.setOffset=function(t,e){switch(t=Math.max(0,parseFloat(t)),e){case 0:this._offset[0]=t;break;case 1:this._offset[1]=t}},ol.style.FlowLine.prototype.setLineCap=function(t){this._lineCap="round"===t?"round":"butt"},ol.style.FlowLine.prototype.getWidth=function(t,e){if(this._widthFn)return this._widthFn(t,e);var o="number"==typeof this._width2?this._width2:this._width;return this._width+(o-this._width)*e},ol.style.FlowLine.prototype.setColor=function(t){try{this._color=ol.color.asArray(t)}catch(t){this._color=[0,0,0,1]}},ol.style.FlowLine.prototype.setColor2=function(t){try{this._color2=ol.color.asArray(t)}catch(t){this._color2=null}},ol.style.FlowLine.prototype.setArrowColor=function(t){try{this._acolor=ol.color.asString(t)}catch(t){this._acolor=null}},ol.style.FlowLine.prototype.getColor=function(t,e){if(this._colorFn)return ol.color.asString(this._colorFn(t,e));var o=this._color,i=this._color2||this._color;return"rgba("+ +Math.round(o[0]+(i[0]-o[0])*e)+","+Math.round(o[1]+(i[1]-o[1])*e)+","+Math.round(o[2]+(i[2]-o[2])*e)+","+(o[3]+(i[3]-o[3])*e)+")"},ol.style.FlowLine.prototype.getArrow=function(){return this._arrow},ol.style.FlowLine.prototype.setArrow=function(t){this._arrow=parseInt(t),(this._arrow<-1||this._arrow>2)&&(this._arrow=0)},ol.style.FlowLine.prototype.getArrowSize=function(){return this._arrowSize||[16,16]},ol.style.FlowLine.prototype.setArrowSize=function(t){Array.isArray(t)?this._arrowSize=t:"number"==typeof t&&(this._arrowSize=[t,t])},ol.style.FlowLine.prototype.drawArrow=function(t,e,o,i,n){var r=this.getArrowSize()[0]*n,s=ol.coordinate.dist2d(e,o),a=(e[0]-o[0])/s,l=(e[1]-o[1])/s;i=Math.max(this.getArrowSize()[1]/2,i/2)*n,t.beginPath(),t.moveTo(e[0],e[1]),t.lineTo(e[0]-r*a+i*l,e[1]-r*l-i*a),t.lineTo(e[0]-r*a-i*l,e[1]-r*l+i*a),t.lineTo(e[0],e[1]),t.fill()},ol.style.FlowLine.prototype._render=function(t,e){if("LineString"===e.geometry.getType()){var o,i,n,r=e.context;if(!this._visible){var s=e.pixelRatio/e.resolution,a=Math.cos(e.rotation),l=Math.sin(e.rotation);i=e.geometry.getCoordinates();var c=t[0][0]-i[0][0]*s*a-i[0][1]*s*l,h=t[0][1]-i[0][0]*s*l+i[0][1]*s*a;for(t=[],o=0;n=i[o];o++)t[o]=[c+n[0]*s*a+n[1]*s*l,h+n[0]*s*l-n[1]*s*a,n[2]]}var p=this.getArrowSize()[0]*e.pixelRatio;r.save(),this.getOffset(0)&&this._splitAsize(t,this.getOffset(0)*e.pixelRatio),this.getOffset(1)&&this._splitAsize(t,this.getOffset(1)*e.pixelRatio,!0),t.length>1&&(-1===this.getArrow()||2===this.getArrow())&&(n=this._splitAsize(t,p),this._acolor?r.fillStyle=this._acolor:r.fillStyle=this.getColor(e.feature,0),this.drawArrow(r,n[0],n[1],this.getWidth(e.feature,0),e.pixelRatio)),t.length>1&&this.getArrow()>0&&(n=this._splitAsize(t,p,!0),this._acolor?r.fillStyle=this._acolor:r.fillStyle=this.getColor(e.feature,1),this.drawArrow(r,n[0],n[1],this.getWidth(e.feature,1),e.pixelRatio));var u=this._splitInto(t,255,2),d=0,g=u.length;if(r.lineJoin="round",r.lineCap=this._lineCap||"butt",u.length>1)for(d=0;de){i=[i[0]+(n[0]-i[0])*(e-a)/s,i[1]+(n[1]-i[1])*(e-a)/s],s=ol.coordinate.dist2d(i,r),o?(t.push(n),t.push(i),t.push([i[0]+(r[0]-i[0])/s,i[1]+(r[1]-i[1])/s])):(t.unshift(n),t.unshift(i),t.unshift([i[0]+(r[0]-i[0])/s,i[1]+(r[1]-i[1])/s]));break}a+=s,i=n}return[r,i]},ol.style.FlowLine.prototype._splitInto=function(t,e,o){var i,n,r,s=this._noOverlap?1:.9,a=[],l=0;for(i=1;n=t[i];i++)l+=ol.coordinate.dist2d(t[i-1],n);var c=Math.max(o||2,l/(e||255)),h=t[0];l=0;var p=[h];for(i=1,n=t[1];ic){var g=(c-l)/r;p.push([h[0]+u*g,h[1]+d*g]),a.push(p),p=[h=[h[0]+u*g*s,h[1]+d*g*s]],l=0}else l+=r,h=n,p.push(h),n=t[++i]}return a.push(p),a},ol.style.FontSymbol=function(t){var e=0;(t=t||{}).stroke&&(e=t.stroke.getWidth()),ol.style.RegularShape.call(this,{radius:t.radius,fill:t.fill,rotation:t.rotation,rotateWithView:t.rotateWithView}),"number"==typeof t.opacity&&this.setOpacity(t.opacity),this.color_=t.color,this.fontSize_=t.fontSize||1,this.fontStyle_=t.fontStyle||"",this.stroke_=t.stroke,this.fill_=t.fill,this.radius_=t.radius-e,this.form_=t.form||"none",this.gradient_=t.gradient,this.offset_=[t.offsetX?t.offsetX:0,t.offsetY?t.offsetY:0],t.glyph?this.glyph_=this.getGlyph(t.glyph):this.glyph_=this.getTextGlyph(t.text||"",t.font),this.renderMarker_()},ol.ext.inherits(ol.style.FontSymbol,ol.style.RegularShape),ol.style.Image.prototype.getImagePNG=function(t){t=t||window.devicePixelRatio;var e=this.getImage(t);if(!e)return!1;try{return e.toDataURL("image/png")}catch(t){return!1}},ol.style.FontSymbol.prototype.defs={fonts:{},glyphs:{}},ol.style.FontSymbol.addDefs=function(t,e){var o=t;if("string"==typeof t&&(o={font:t,name:t,copyright:""}),o.font&&"string"==typeof o.font){var i=o.font;for(var n in ol.style.FontSymbol.prototype.defs.fonts[i]=o,e){var r=e[n];"string"==typeof r&&1==r.length&&(r={char:r}),ol.style.FontSymbol.prototype.defs.glyphs[n]={font:o.font,char:r.char||""+String.fromCharCode(r.code)||"",theme:r.theme||o.name,name:r.name||n,search:r.search||""}}}else console.log("bad font def")},ol.style.FontSymbol.prototype.clone=function(){var t=new ol.style.FontSymbol({glyph:"",color:this.color_,fontSize:this.fontSize_,fontStyle:this.fontStyle_,stroke:this.stroke_,fill:this.fill_,radius:this.radius_+(this.stroke_?this.stroke_.getWidth():0),form:this.form_,gradient:this.gradient_,offsetX:this.offset_[0],offsetY:this.offset_[1],opacity:this.getOpacity(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView()});return t.setScale(this.getScale()),t.glyph_=this.glyph_,t.renderMarker_(),t},ol.style.FontSymbol.prototype.getFill=function(){return this.fill_},ol.style.FontSymbol.prototype.getStroke=function(){return this.stroke_},ol.style.FontSymbol.prototype.getGlyph=function(t){return t?ol.style.FontSymbol.prototype.defs.glyphs[t]||{font:"sans-serif",char:t.charAt(0),theme:"none",name:"none",search:""}:this.glyph_},ol.style.FontSymbol.prototype.getTextGlyph=function(t,e){return{font:e||"sans-serif",char:String(t),theme:"none",name:"none",search:""}},ol.style.FontSymbol.prototype.getGlyphName=function(){for(var t in ol.style.FontSymbol.prototype.defs.glyphs)if(ol.style.FontSymbol.prototype.defs.glyphs[t]===this.glyph_)return t;return""},ol.style.FontSymbol.prototype.getFontInfo=function(t){return ol.style.FontSymbol.prototype.defs.fonts[t.font]},ol.style.FontSymbol.prototype.renderMarker_=function(t){if(t){var e,o=0;this.stroke_&&(e=ol.color.asString(this.stroke_.getColor()),o=this.stroke_.getWidth());var i=this.getImage(t),n={strokeStyle:e,strokeWidth:o,size:i.width/t},r=i.getContext("2d");if(r.clearRect(0,0,i.width,i.height),this.drawMarker_(n,r,0,0,t),this.setDisplacement)this.setDisplacement([this.offset_[0],-this.offset_[1]]);else{var s=this.getAnchor();s[0]=i.width/2-this.offset_[0],s[1]=i.width/2-this.offset_[1]}}else this.getPixelRatio?(t=window.devicePixelRatio,this.renderMarker_(t),this.getPixelRatio&&1!==t&&this.renderMarker_(1)):this.renderMarker_(1)},ol.style.FontSymbol.prototype.drawPath_=function(t,e){var o=2*this.radius_+t.strokeWidth+1,i=t.strokeWidth/2,n=t.size/2,r={fac:1,posX:t.size/2,posY:t.size/2};switch(e.lineJoin="round",e.beginPath(),this.form_){case"none":r.fac=1;break;case"circle":case"ban":e.arc(n,n,o/2,0,2*Math.PI,!0);break;case"poi":e.arc(n,n-.4*this.radius_,.6*this.radius_,.15*Math.PI,.85*Math.PI,!0),e.lineTo(n-.89*.05*o,(.95+.45*.05)*o+i),e.arc(n,.95*o+i,.05*o,.85*Math.PI,.15*Math.PI,!0),r={fac:.45,posX:n,posY:n-.35*this.radius_};break;case"bubble":e.arc(n,n-.2*this.radius_,.8*this.radius_,.4*Math.PI,.6*Math.PI,!0),e.lineTo(.5*o+i,o+i),r={fac:.7,posX:n,posY:n-.2*this.radius_};break;case"marker":e.arc(n,n-.2*this.radius_,.8*this.radius_,.25*Math.PI,.75*Math.PI,!0),e.lineTo(.5*o+i,o+i),r={fac:.7,posX:n,posY:n-.2*this.radius_};break;case"coma":e.moveTo(n+.8*this.radius_,n-.2*this.radius_),e.quadraticCurveTo(.95*o+i,.75*o+i,.5*o+i,o+i),e.arc(n,n-.2*this.radius_,.8*this.radius_,.45*Math.PI,0,!1),r={fac:.7,posX:n,posY:n-.2*this.radius_};break;default:var s;switch(this.form_){case"shield":s=[.05,0,.95,0,.95,.8,.5,1,.05,.8,.05,0],r.posY=.45*o+i;break;case"blazon":s=[.1,0,.9,0,.9,.8,.6,.8,.5,1,.4,.8,.1,.8,.1,0],r.fac=.8,r.posY=.4*o+i;break;case"bookmark":s=[.05,0,.95,0,.95,1,.5,.8,.05,1,.05,0],r.fac=.9,r.posY=.4*o+i;break;case"hexagon":s=[.05,.2,.5,0,.95,.2,.95,.8,.5,1,.05,.8,.05,.2],r.fac=.9,r.posY=.5*o+i;break;case"diamond":s=[.25,0,.75,0,1,.2,1,.4,.5,1,0,.4,0,.2,.25,0],r.fac=.75,r.posY=.35*o+i;break;case"triangle":s=[0,0,1,0,.5,1,0,0],r.fac=.6,r.posY=.3*o+i;break;case"sign":s=[.5,.05,1,.95,0,.95,.5,.05],r.fac=.7,r.posY=.65*o+i;break;case"lozenge":s=[.5,0,1,.5,.5,1,0,.5,.5,0],r.fac=.7;break;case"square":default:s=[0,0,1,0,1,1,0,1,0,0]}for(var a=0;athis.textPathMaxResolution_)){var e,o=t.frameState.extent,i=t.frameState.coordinateToPixelTransform,n=t.context;n.save(),n.scale(t.frameState.pixelRatio,t.frameState.pixelRatio);for(var r,s=this.getSource().getFeaturesInExtent(o),a=0;r=s[a];a++)for(var l,c=this.textPathStyle_(r,t.frameState.viewState.resolution),h=0;l=c[h];h++){var p,u=l.getGeometry()||r.getGeometry();switch(u.getType()){case"LineString":p=u.getCoordinates();break;case"MultiLineString":p=u.getLineString(0).getCoordinates();break;default:continue}var d=l.getText(),g=m(p,d.getRotateWithView());n.font=d.getFont(),n.textBaseline=d.getTextBaseline(),n.textAlign=d.getTextAlign(),n.lineWidth=d.getStroke()&&d.getStroke().getWidth()||0,n.strokeStyle=d.getStroke()&&d.getStroke().getColor()||"#fff",n.fillStyle=d.getFill()&&d.getFill().getColor()||"#000",n.textJustify="justify"==d.getTextAlign(),n.textOverflow=d.getTextOverflow?d.getTextOverflow():"",n.minWidth=d.getMinWidth?d.getMinWidth():0,n.textPath(d.getText()||r.get("name"),g)}n.restore()}function m(t,o){var n=[];for(e=0;en[n.length-2]){var r=[];for(e=n.length-2;e>=0;e-=2)r.push(n[e]),r.push(n[e+1]);return r}return n}}.bind(this))),void 0===t&&(t=[new ol.style.Style({text:new ol.style.Text})]),this.textPathStyle_="function"==typeof t?t:function(){return t},this.textPathMaxResolution_=Number(e)||Number.MAX_VALUE,this.changed()},ol.style.TextPath=function(t){t||(t={}),ol.style.Text.call(this,t),this.textOverflow_=void 0!==t.textOverflow?t.textOverflow:"visible",this.minWidth_=t.minWidth||0},ol.ext.inherits(ol.style.TextPath,ol.style.Text),ol.style.TextPath.prototype.getTextOverflow=function(){return this.textOverflow_},ol.style.TextPath.prototype.getMinWidth=function(){return this.minWidth_}}(),CanvasRenderingContext2D.prototype.textPath=function(t,e){var o=this;function i(t,e,o,i){var n=o-t,r=i-e;return Math.sqrt(n*n+r*r)}var n,r=0,s=2;function a(t,e){if(!n||r+ne))&&!((s+=2)>=t.length);)r+=n;var o,a,l,c=e-r;return s>=t.length&&(s=t.length-2),c?(o=t[s-2]+(t[s]-t[s-2])*c/n,a=t[s-1]+(t[s+1]-t[s-1])*c/n,l=Math.atan2(t[s+1]-t[s-1],t[s]-t[s-2])):(o=t[s-2],a=t[s-1],l=Math.atan2(t[s+1]-t[s-1],t[s]-t[s-2])),[o,a,l]}for(var l=.25*o.measureText(" ").width,c=0,h=0,p=2;p0?Number(t.scale):1)*ol.has.DEVICE_PIXEL_RATIO||ol.has.DEVICE_PIXEL_RATIO,r=i.getContext("2d");if(t.image){t.image.load();var s=t.image.getImage();if(s.width)i.width=Math.round(s.width*n),i.height=Math.round(s.height*n),r.globalAlpha="number"==typeof t.opacity?t.opacity:1,r.drawImage(s,0,0,s.width,s.height,0,0,i.width,i.height),e=r.createPattern(i,"repeat");else{var a=this;e=[0,0,0,0],s.onload=function(){i.width=Math.round(s.width*n),i.height=Math.round(s.height*n),r.globalAlpha="number"==typeof t.opacity?t.opacity:1,r.drawImage(s,0,0,s.width,s.height,0,0,i.width,i.height),e=r.createPattern(i,"repeat"),a.setColor(e)}}}else{var l=this.getPattern_(t);if(i.width=Math.round(l.width*n),i.height=Math.round(l.height*n),r.beginPath(),t.fill&&(r.fillStyle=ol.color.asString(t.fill.getColor()),r.fillRect(0,0,i.width,i.height)),r.scale(n,n),r.lineCap="round",r.lineWidth=l.stroke||1,r.fillStyle=ol.color.asString(t.color||"#000"),r.strokeStyle=ol.color.asString(t.color||"#000"),l.circles)for(o=0;o180&&(n-=360),n*=Math.PI/180;var r=Math.cos(n),s=Math.sin(n);if(Math.abs(s)<1e-4)o.width=o.height=i,o.lines=[[0,.5,i,.5]],o.repeat=[[0,0],[0,i]];else if(Math.abs(r)<1e-4)o.width=o.height=i,o.lines=[[.5,0,.5,i]],o.repeat=[[0,0],[i,0]],"cross"==t.pattern&&(o.lines.push([0,.5,i,.5]),o.repeat.push([0,i]));else{var a=o.width=Math.round(Math.abs(i/s))||1,l=o.height=Math.round(Math.abs(i/r))||1;"cross"==t.pattern?(o.lines=[[-a,-l,2*a,2*l],[2*a,-l,-a,2*l]],o.repeat=[[0,0]]):r*s>0?(o.lines=[[-a,-l,2*a,2*l]],o.repeat=[[0,0],[a,0],[0,l]]):(o.lines=[[2*a,-l,-a,2*l]],o.repeat=[[0,0],[-a,0],[0,l]])}o.stroke=0===t.size?0:t.size||4}return o},ol.style.Style.defaultStyle,function(){var t=[255,255,255,1],e=[0,153,255,1],o=[new ol.style.Style({stroke:new ol.style.Stroke({color:t,width:5})}),new ol.style.Style({image:new ol.style.Circle({radius:6,fill:new ol.style.Fill({color:e}),stroke:new ol.style.Stroke({color:t,width:1.5})}),stroke:new ol.style.Stroke({color:e,width:3}),fill:new ol.style.Fill({color:[255,255,255,.5]})})];ol.style.Style.defaultStyle=function(t){if(!0===t)return o;t=t||{};var e=new ol.style.Fill({color:t.fillColor||"rgba(255,255,255,0.4)"}),i=new ol.style.Stroke({color:t.color||"#3399CC",width:1.25});return[new ol.style.Style({image:new ol.style.Circle({fill:e,stroke:i,radius:5}),fill:e,stroke:i})]}}(),ol.style.geoportailStyle,function(){var t={},e=0;function o(o){var i="ROUT-"+e+++"-";return function(e,n){var r=!0===o.sens||n0?[0,100,0,1]:[0,128,0,1];if(!t.get("importance"))return"magenta";if("Piste cyclable"===t.get("nature"))return[27,177,27,.5];if("0"!=t.get("position_par_rapport_au_sol")){var e;switch(t.get("importance")){case"1":e=[177,27,177,1];break;case"2":e=[177,27,27,1];break;case"3":e=[217,119,0,1];break;case"4":e=[255,225,0,1];break;case"5":e=[204,204,204,1];break;default:e=[211,211,211,1]}return t.get("position_par_rapport_au_sol")<0&&(e[3]=.7),e}switch(t.get("importance")){case"1":return[255,0,255,1];case"2":return[255,0,0,1];case"3":return[255,165,0,1];case"4":return[255,255,0,1];case"5":return[255,255,255,1];default:return[211,211,211,1]}}(e),width:function(t){return Math.max(t.get("largeur_de_chaussee")||2,2)}(e),lineDash:function(t){switch(t.get("nature")){case"Escalier":return[1,4];case"Sentier":return[8,10]}}(e)}),zIndex:function(t){if(!t.get("position_par_rapport_au_sol"))return 100;var e=Number(t.get("position_par_rapport_au_sol"));return e>0?10+10*e-(Number(t.get("importance"))||10):e<0?Math.max(4+e,0):10-(Number(t.get("importance"))||10)}(e)-100})]),a[0].getText()&&a[0].getText().setRotation(function(t){for(var e,o,i=t.getCoordinates(),n=0,r=t.getLength(),s=0;s=r/2));s++);return-Math.atan2(o,e)}(e.getGeometry())),a}}var i={111:{color:[230,0,77,255],title:"Continuous urban fabric"},112:{color:[255,0,0,255],title:"Discontinuous urban fabric"},121:{color:[204,77,242,255],title:"Industrial or commercial units"},122:{color:[204,0,0,255],title:"Road and rail networks and associated land"},123:{color:[230,204,204,255],title:"Port areas"},124:{color:[230,204,230,255],title:"Airports"},131:{color:[166,0,204,255],title:"Mineral extraction sites"},132:{color:[166,77,0,255],title:"Dump sites"},133:{color:[255,77,255,255],title:"Construction sites"},141:{color:[255,166,255,255],title:"Green urban areas"},142:{color:[255,230,255,255],title:"Sport and leisure facilities"},211:{color:[255,255,168,255],title:"Non-irrigated arable land"},212:{color:[255,255,0,255],title:"Permanently irrigated land"},213:{color:[230,230,0,255],title:"Rice fields"},221:{color:[230,128,0,255],title:"Vineyards"},222:{color:[242,166,77,255],title:"Fruit trees and berry plantations"},223:{color:[230,166,0,255],title:"Olive groves"},231:{color:[230,230,77,255],title:"Pastures"},241:{color:[255,230,166,255],title:"Annual crops associated with permanent crops"},242:{color:[255,230,77,255],title:"Complex cultivation patterns"},243:{color:[230,204,77,255],title:"Land principally occupied by agriculture with significant areas of natural vegetation"},244:{color:[242,204,166,255],title:"Agro-forestry areas"},311:{color:[128,255,0,255],title:"Broad-leaved forest"},312:{color:[0,166,0,255],title:"Coniferous forest"},313:{color:[77,255,0,255],title:"Mixed forest"},321:{color:[204,242,77,255],title:"Natural grasslands"},322:{color:[166,255,128,255],title:"Moors and heathland"},323:{color:[166,230,77,255],title:"Sclerophyllous vegetation"},324:{color:[166,242,0,255],title:"Transitional woodland-shrub"},331:{color:[230,230,230,255],title:"Beaches dunes sands"},332:{color:[204,204,204,255],title:"Bare rocks"},333:{color:[204,255,204,255],title:"Sparsely vegetated areas"},334:{color:[0,0,0,255],title:"Burnt areas"},335:{color:[166,230,204,255],title:"Glaciers and perpetual snow"},411:{color:[166,166,255,255],title:"Inland marshes"},412:{color:[77,77,255,255],title:"Peat bogs"},421:{color:[204,204,255,255],title:"Salt marshes"},422:{color:[230,230,255,255],title:"Salines"},423:{color:[166,166,230,255],title:"Intertidal flats"},511:{color:[0,204,242,255],title:"Water courses"},512:{color:[128,242,230,255],title:"Water bodies"},521:{color:[0,255,166,255],title:"Coastal lagoons"},522:{color:[166,255,230,255],title:"Estuaries"},523:{color:[230,242,255,255],title:"Sea and ocean"}};ol.style.geoportailStyle=function(n,r){switch(r=r||{},n){case"BDTOPO_V3:troncon_de_route":return o(r);case"BDTOPO_V3:batiment":return function(o){var i="BATI-"+e+++"-";return function(e){if(e.get("detruit"))return[];var n=i+e.get("usage_1")+"-"+e.get("nature")+"-"+e.get("etat_de_l_objet"),r=t[n];if(!r){var s=function(t){switch(t.get("nature")){case"Industriel, agricole ou commercial":return[51,102,153,1];case"Remarquable":return[0,192,0,1];default:switch(t.get("usage_1")){case"Résidentiel":case"Indifférencié":return[128,128,128,1];case"Industriel":case"Commercial et services":return[51,102,153,1];case"Sportif":return[51,153,102,1];case"Religieux":return[153,102,51,1];default:return[153,51,51,1]}}}(e),a=[s[0],s[1],s[1],.5],l=!/en service/i.test(e.get("etat_de_l_objet"));l&&(a[3]=.1);var c=o.symbol?function(t){switch(t.get("usage_1")){case"Commercial et services":return"";case"Sportif":return"";default:return null}}(e):null;return[new ol.style.Style({text:c?new ol.style.Text({text:c,font:"12px FontAwesome",fill:new ol.style.Fill({color:[0,0,0,.6]})}):null,fill:new ol.style.Fill({color:a}),stroke:new ol.style.Stroke({color:s,width:1.5,lineDash:l?[5,5]:null})})]}return r}}(r);case"CADASTRALPARCELS.PARCELLAIRE_EXPRESS:parcelle":return function(t){var e=new ol.style.Style({text:new ol.style.Text({text:"0000",font:"bold 12px sans-serif",fill:new ol.style.Fill({color:[100,0,255,1]}),stroke:new ol.style.Stroke({color:[255,255,255,.8],width:3})}),stroke:new ol.style.Stroke({color:[255,165,0,1],width:1.5}),fill:new ol.style.Fill({color:[100,0,255,.1]})});return function(o,i){return i<.8?e.getText().setFont("bold 12px sans-serif"):e.getText().setFont("bold 10px sans-serif"),t.section?e.getText().setText(o.get("section")+"-"+(o.get("numero")||"").replace(/^0*/,"")):e.getText().setText((o.get("numero")||"").replace(/^0*/,"")),e}}(r);default:return/LANDCOVER/.test(n)?(r.date=n.replace(/[^\d]*(\d*).*/,"$1"),function(e){return function(o){var n=o.get("code_"+e.date),r=t["CLC-"+n];if(!r){var s=i[n].color.slice();s[3]=e.opacity||1,r=t["CLC-"+n]=new ol.style.Style({fill:new ol.style.Fill({color:s||[255,255,255,.5]})})}return r}}(r)):(console.warn("[ol/style/geoportailStyle] no style defined for type: "+n),ol.style.Style.defaultStyle())}},ol.style.geoportailStyle.clcColors=JSON.parse(JSON.stringify(i))}(); \ No newline at end of file diff --git a/examples/filter/map.filter.canvasfilter.html b/examples/filter/map.filter.canvasfilter.html index 89120864f..e7b05a3ca 100644 --- a/examples/filter/map.filter.canvasfilter.html +++ b/examples/filter/map.filter.canvasfilter.html @@ -86,6 +86,8 @@

ol-ext: Canvas filter

%
  • % +
  • + %
  • @@ -187,6 +189,14 @@

    ol-ext: Canvas filter

    } } + // Paper filter + var paperFilter = new ol.ext.SVGFilter.Paper({ scale : 2, light: 100 }); + function setPaper(val) { + paperFilter.setLight(val); + filter.dispatchEvent({ type: 'propertychange' }); + } + filter.addSVGFilter(paperFilter); + map.addControl(new ol.control.Permalink({ visible: false })); diff --git a/examples/layer/map.layer.bdtopo.vtile.html b/examples/layer/map.layer.bdtopo.vtile.html new file mode 100644 index 000000000..d2b9477e2 --- /dev/null +++ b/examples/layer/map.layer.bdtopo.vtile.html @@ -0,0 +1,212 @@ + + + + + ol-ext: Geoportail vector tile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    ol-ext: Geoportail vector tile

    +
    +

    + Testing Geoportail vector tiles. +

    + + + +
    + + + + + \ No newline at end of file diff --git a/examples/layer/map.wmscapabilities.html b/examples/layer/map.wmscapabilities.html index e71ee8364..a236fc2e1 100644 --- a/examples/layer/map.wmscapabilities.html +++ b/examples/layer/map.wmscapabilities.html @@ -108,6 +108,7 @@

    ol-ext: WMS Capabilities control

    var plink = new ol.control.Permalink({ visible: false, localStorage: 'position' }); map.addControl(plink); map.addControl(new ol.control.SearchNominatim({ zoomOnSelect: 13 })); + if (plink.hasUrlParam('edugeo')) $('.options button').show(); var cap = new ol.control.WMSCapabilities({ // target: $('.options').get(0), @@ -175,8 +176,8 @@

    ol-ext: WMS Capabilities control

    "layers": [] } map.getLayers().getArray().forEach(function(l) { - if (l.get('WMS')) { - carte.layers.push({ + if (l.getSource() instanceof ol.source.TileWMS) { + var wms = { "wms": true, "type": "WMS", "name": l.get('title'), @@ -198,8 +199,7 @@

    ol-ext: WMS Capabilities control

    "params": { "LAYERS": l.getSource().getParams().LAYERS, "FORMAT": l.getSource().getParams().FORMAT, - "VERSION": l.getSource().getParams().VERSION, - "MAP": l.getSource().getParams().MAP || '' + "VERSION": l.getSource().getParams().VERSION } }, "attribution": { @@ -210,7 +210,9 @@

    ol-ext: WMS Capabilities control

    }, "maxZoomCluster": 20, "radiusCluster": 40 - }) + } + if (l.getSource().getParams().MAP) wms.wmsparam.source.params.MAP = l.getSource().getParams().MAP; + carte.layers.push(wms) } }); var blob = new Blob([JSON.stringify(carte, null, ' ')], {type: 'text/plain;charset=utf-8'}); diff --git a/index.html b/index.html index 3c2ca1bdc..52754bed5 100644 --- a/index.html +++ b/index.html @@ -238,6 +238,7 @@ color: #337ab7; cursor: pointer; } + diff --git a/package.json b/package.json index 1e59d68eb..79f35e8df 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ol-ext", - "version": "3.2.23", + "version": "3.2.24", "description": "A set of cool extensions for OpenLayers (ol) in node modules structure", "main": "dist/ol-ext.js", "style": "dist/ol-ext.css", diff --git a/src/control/PrintDialog.js b/src/control/PrintDialog.js index 4ce9a9303..61710a8ec 100644 --- a/src/control/PrintDialog.js +++ b/src/control/PrintDialog.js @@ -724,6 +724,7 @@ ol_control_PrintDialog.prototype.paperSize = { 'A2': [420,594], 'A3': [297,420], 'A4': [210,297], + 'US Letter': [215.9,279.4], 'A5': [148,210], 'B4': [257,364], 'B5': [182,257] @@ -824,7 +825,13 @@ ol_control_PrintDialog.prototype.setSize = function (size) { if (!size) return; if (typeof(size) === 'string') { - size = size.toLocaleUpperCase(); + // Test uppercase + for (var k in this.paperSize) { + if (k && new RegExp(k, 'i').test(size)) { + size = k; + } + } + // Default if (!this.paperSize[size]) size = this._size = 'A4'; this._input.size.value = size; size = [ diff --git a/src/control/Status.js b/src/control/Status.js index 00bcdcb8d..5798223c3 100644 --- a/src/control/Status.js +++ b/src/control/Status.js @@ -2,8 +2,7 @@ import ol_ext_inherits from '../util/ext' import ol_control_Control from 'ol/control/Control' import ol_ext_element from '../util/element' -/** A control with scroll-driven navigation to create narrative maps - * +/** A control to display status information on top of the map * @constructor * @extends {ol.control.Control} * @param {Object=} options Control options. diff --git a/src/control/WMSCapabilities.css b/src/control/WMSCapabilities.css index 43810ab09..a448a946e 100644 --- a/src/control/WMSCapabilities.css +++ b/src/control/WMSCapabilities.css @@ -219,11 +219,13 @@ } .ol-ext-dialog.ol-wmscapabilities form { - max-height: calc(85% - 1em); width: 600px; min-height: 15em; top: 15%; - transform: translate(-50%, 0); + transform: translate(-50%, -15%); +} +.ol-ext-dialog.ol-wmscapabilities .ol-content { + max-height: calc(100vh - 6em); } .ol-ext-dialog.ol-wmtscapabilities [data-param="map"] { diff --git a/src/filter/Base.js b/src/filter/Base.js index 2d0ff4b23..247d901a8 100644 --- a/src/filter/Base.js +++ b/src/filter/Base.js @@ -22,7 +22,7 @@ export {ol_filter}; * * @constructor * @extends {ol.Object} - * @param {Object} options Extend {@link _ol_control_Control_} options. + * @param {Object} options * @param {boolean} [options.active] */ var ol_filter_Base = function(options) { @@ -98,6 +98,12 @@ function addFilter_(filter) { function removeFilter_(filter) { var i if (!this.filters_) this.filters_ = []; + if (!filter) { + this.filters_.forEach(function(f) { + this.removeFilter(f) + }.bind(this)) + return; + } for (i=this.filters_.length-1; i>=0; i--) { if (this.filters_[i]===filter) this.filters_.splice(i,1); } diff --git a/src/filter/Fold.js b/src/filter/Fold.js index f3482c4c5..c4d0fdaaa 100644 --- a/src/filter/Fold.js +++ b/src/filter/Fold.js @@ -11,12 +11,13 @@ import ol_filter_Base from './Base' * @requires ol_filter * @extends {ol_filter_Base} * @param {Object} [options] - * @param {Array} [options.fold] number of fold (horizontal and vertical) - * @param {number} [options.margin] margin in px, default 8 - * @param {number} [options.padding] padding in px, default 8 - * @param {number|number[]} [options.fsize] fold size in px, default 8,10 - * @param {boolean} [options.fill] true to fill the background, default false - * @param {boolean} [options.shadow] true to display shadow, default true + * @param {Array} [options.fold[8,4]] number of fold (horizontal and vertical) + * @param {number} [options.margin=8] margin in px, default 8 + * @param {number} [options.padding=8] padding in px, default 8 + * @param {number|number[]} [options.fsize=[8,10]] fold size in px, default 8,10 + * @param {boolean} [options.fill=false] true to fill the background, default false + * @param {boolean} [options.shadow=true] true to display shadow + * @param {boolean} [options.opacity=.2] effect opacity */ var ol_filter_Fold = function(options) { options = options || {}; @@ -29,6 +30,7 @@ var ol_filter_Fold = function(options) { this.set('fsize', options.fsize || [8,10]); this.set('fill', options.fill); this.set('shadow', options.shadow!==false); + this.set('opacity', (options.hasOwnProperty('opacity') ? options.opacity : .2)); }; ol_ext_inherits(ol_filter_Fold, ol_filter_Base); @@ -100,7 +102,7 @@ ol_filter_Fold.prototype.postcompose = function(e) { var grd = ctx.createRadialGradient(5*w/8,5*w/8,w/4,w/2,w/2,w); grd.addColorStop(0,"transparent"); - grd.addColorStop(1,"rgba(0,0,0,0.2)"); + grd.addColorStop(1,"rgba(0,0,0," + this.get('opacity') + ")"); ctx.fillStyle = grd; ctx.scale (1,h/w); for (var i=0; i} pt points to split the line -* @param {Number} tol distance tolerance for 2 points to be equal -*/ + * @param {ol.Coordinate | Array} pt points to split the line + * @param {Number} tol distance tolerance for 2 points to be equal + */ ol_geom_LineString.prototype.splitAt = function(pt, tol) { var i; if (!pt) return [this]; diff --git a/src/interaction/SelectCluster.js b/src/interaction/SelectCluster.js index 287ed0200..0a91a7738 100644 --- a/src/interaction/SelectCluster.js +++ b/src/interaction/SelectCluster.js @@ -164,12 +164,14 @@ ol_interaction_SelectCluster.prototype.selectCluster = function (e) { if (this._autoClose) { this.clear(); } else { - const deselectedFeatures = e.deselected; + var deselectedFeatures = e.deselected; deselectedFeatures.forEach(deselectedFeature => { - const selectClusterFeatures = deselectedFeature.get('selectcluserfeatures'); - selectClusterFeatures.forEach(selectClusterFeature => { - this.overlayLayer_.getSource().removeFeature(selectClusterFeature); - }); + var selectClusterFeatures = deselectedFeature.get('selectcluserfeatures'); + if (selectClusterFeatures) { + selectClusterFeatures.forEach(selectClusterFeature => { + this.overlayLayer_.getSource().removeFeature(selectClusterFeature); + }); + } }); } return; diff --git a/src/interaction/Transform.js b/src/interaction/Transform.js index 4a5191ae0..96aeb2b50 100644 --- a/src/interaction/Transform.js +++ b/src/interaction/Transform.js @@ -190,9 +190,11 @@ ol_interaction_Transform.prototype.setDefaultStyle = function(options) { fill: fill, stroke: stroke, radius: this.isTouch ? 12 : 6, + displacement: this.isTouch ? [24, -24] : [12, -12], points: 15 }); - circle.getAnchor()[0] = this.isTouch ? -10 : -5; + // Old version with no displacement + if (!circle.setDisplacement) circle.getAnchor()[0] = this.isTouch ? -10 : -5; var bigpt = new ol_style_RegularShape({ fill: fill, stroke: stroke, @@ -241,7 +243,9 @@ ol_interaction_Transform.prototype.setStyle = function(style, olstyle) { for (var i=0; i