var KLStoryMap;(()=>{var t={481:(t,e,i)=>{var o,n;!function(s,a,r){var h,l,c=s.L,d={};d.version="0.7.7","object"==typeof t.exports?t.exports=d:(n="function"==typeof(o=d)?o.call(e,i,e,t):o)===r||(t.exports=n),d.noConflict=function(){return s.L=c,this},s.L=d,d.Util={extend:function(t){var e,i,o,n,s=Array.prototype.slice.call(arguments,1);for(i=0,o=s.length;i2?Array.prototype.slice.call(arguments,2):null;return function(){return t.apply(e,i||arguments)}},stamp:(h=0,l="_leaflet_id",function(t){return t[l]=t[l]||++h,t[l]}),invokeEach:function(t,e,i){var o,n;if("object"==typeof t){for(o in n=Array.prototype.slice.call(arguments,3),t)e.apply(i,[o,t[o]].concat(n));return!0}return!1},limitExecByInterval:function(t,e,i){var o,n;return function s(){var a=arguments;o?n=!0:(o=!0,setTimeout((function(){o=!1,n&&(s.apply(i,a),n=!1)}),e),t.apply(i,a))}},falseFn:function(){return!1},formatNum:function(t,e){var i=Math.pow(10,e||5);return Math.round(t*i)/i},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},splitWords:function(t){return d.Util.trim(t).split(/\s+/)},setOptions:function(t,e){return t.options=d.extend({},t.options,e),t.options},getParamString:function(t,e,i){var o=[];for(var n in t)o.push(encodeURIComponent(i?n.toUpperCase():n)+"="+encodeURIComponent(t[n]));return(e&&-1!==e.indexOf("?")?"&":"?")+o.join("&")},template:function(t,e){return t.replace(/\{ *([\w_]+) *\}/g,(function(t,i){var o=e[i];if(o===r)throw new Error("No value provided for variable "+t);return"function"==typeof o&&(o=o(e)),o}))},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function t(t){var e,i,o=["webkit","moz","o","ms"];for(e=0;e0||t+"_idx"in e&&e[t+"_idx_len"]>0)},removeEventListener:function(t,e,i){if(!this[A])return this;if(!t)return this.clearAllEventListeners();if(d.Util.invokeEach(t,this.removeEventListener,this,e,i))return this;var o,n,s,a,r,h,l,c,p=this[A],_=i&&i!==this&&d.stamp(i);for(o=0,n=(t=d.Util.splitWords(t)).length;o=0;r--)a[r].action!==e||i&&a[r].context!==i||(a.splice(r,1)[0].action=d.Util.falseFn);i&&c&&0===a.length&&(delete c[_],p[l]--)}}else delete p[s],delete p[h],delete p[l];return this},clearAllEventListeners:function(){return delete this[A],this},fireEvent:function(t,e){if(!this.hasEventListeners(t))return this;var i,o,n,s,a,r=d.Util.extend({},e,{type:t,target:this}),h=this[A];if(h[t])for(o=0,n=(i=h[t].slice()).length;o1||"matchMedia"in s&&s.matchMedia("(min-resolution:144dpi)")&&s.matchMedia("(min-resolution:144dpi)").matches,k=a.documentElement,P=p&&"transition"in k.style,T="WebKitCSSMatrix"in s&&"m11"in new s.WebKitCSSMatrix&&!y,D="MozPerspective"in k.style,S="OTransition"in k.style,C=!s.L_DISABLE_3D&&(P||T||D||S)&&!f,E=!s.L_NO_TOUCH&&!f&&(x||"ontouchstart"in s||s.DocumentTouch&&a instanceof s.DocumentTouch),d.Browser={ie:p,ielt9:_,webkit:m,gecko:w&&!m&&!s.opera&&!p,android:v,android23:y,chrome:g,ie3d:P,webkit3d:T,gecko3d:D,opera3d:S,any3d:C,mobile:b,mobileWebkit:b&&m,mobileWebkit3d:b&&T,mobileOpera:b&&s.opera,touch:E,msPointer:L,pointer:x,retina:M},d.Point=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e},d.Point.prototype={clone:function(){return new d.Point(this.x,this.y)},add:function(t){return this.clone()._add(d.point(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(d.point(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},distanceTo:function(t){var e=(t=d.point(t)).x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return(t=d.point(t)).x===this.x&&t.y===this.y},contains:function(t){return t=d.point(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+d.Util.formatNum(this.x)+", "+d.Util.formatNum(this.y)+")"}},d.point=function(t,e,i){return t instanceof d.Point?t:d.Util.isArray(t)?new d.Point(t[0],t[1]):t===r||null===t?t:new d.Point(t,e,i)},d.Bounds=function(t,e){if(t)for(var i=e?[t,e]:t,o=0,n=i.length;o=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=d.bounds(t);var e=this.min,i=this.max,o=t.min,n=t.max,s=n.x>=e.x&&o.x<=i.x,a=n.y>=e.y&&o.y<=i.y;return s&&a},isValid:function(){return!(!this.min||!this.max)}},d.bounds=function(t,e){return!t||t instanceof d.Bounds?t:new d.Bounds(t,e)},d.Transformation=function(t,e,i,o){this._a=t,this._b=e,this._c=i,this._d=o},d.Transformation.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new d.Point((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}},d.DomUtil={get:function(t){return"string"==typeof t?a.getElementById(t):t},getStyle:function(t,e){var i=t.style[e];if(!i&&t.currentStyle&&(i=t.currentStyle[e]),(!i||"auto"===i)&&a.defaultView){var o=a.defaultView.getComputedStyle(t,null);i=o?o[e]:null}return"auto"===i?null:i},getViewportOffset:function(t){var e,i=0,o=0,n=t,s=a.body,r=a.documentElement;do{if(i+=n.offsetTop||0,o+=n.offsetLeft||0,i+=parseInt(d.DomUtil.getStyle(n,"borderTopWidth"),10)||0,o+=parseInt(d.DomUtil.getStyle(n,"borderLeftWidth"),10)||0,e=d.DomUtil.getStyle(n,"position"),n.offsetParent===s&&"absolute"===e)break;if("fixed"===e){i+=s.scrollTop||r.scrollTop||0,o+=s.scrollLeft||r.scrollLeft||0;break}if("relative"===e&&!n.offsetLeft){var h=d.DomUtil.getStyle(n,"width"),l=d.DomUtil.getStyle(n,"max-width"),c=n.getBoundingClientRect();"none"===h&&"none"===l||(o+=c.left+n.clientLeft),i+=c.top+(s.scrollTop||r.scrollTop||0);break}n=n.offsetParent}while(n);n=t;do{if(n===s)break;i-=n.scrollTop||0,o-=n.scrollLeft||0,n=n.parentNode}while(n);return new d.Point(o,i)},documentIsLtr:function(){return d.DomUtil._docIsLtrCached||(d.DomUtil._docIsLtrCached=!0,d.DomUtil._docIsLtr="ltr"===d.DomUtil.getStyle(a.body,"direction")),d.DomUtil._docIsLtr},create:function(t,e,i){var o=a.createElement(t);return o.className=e,i&&i.appendChild(o),o},hasClass:function(t,e){if(t.classList!==r)return t.classList.contains(e);var i=d.DomUtil._getClass(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)},addClass:function(t,e){if(t.classList!==r)for(var i=d.Util.splitWords(e),o=0,n=i.length;o=o.lat&&i.lat<=n.lat&&e.lng>=o.lng&&i.lng<=n.lng},intersects:function(t){t=d.latLngBounds(t);var e=this._southWest,i=this._northEast,o=t.getSouthWest(),n=t.getNorthEast(),s=n.lat>=e.lat&&o.lat<=i.lat,a=n.lng>=e.lng&&o.lng<=i.lng;return s&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t){return!!t&&(t=d.latLngBounds(t),this._southWest.equals(t.getSouthWest())&&this._northEast.equals(t.getNorthEast()))},isValid:function(){return!(!this._southWest||!this._northEast)}},d.latLngBounds=function(t,e){return!t||t instanceof d.LatLngBounds?t:new d.LatLngBounds(t,e)},d.Projection={},d.Projection.SphericalMercator={MAX_LATITUDE:85.0511287798,project:function(t){var e=d.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,o=Math.max(Math.min(i,t.lat),-i),n=t.lng*e,s=o*e;return s=Math.log(Math.tan(Math.PI/4+s/2)),new d.Point(n,s)},unproject:function(t){var e=d.LatLng.RAD_TO_DEG,i=t.x*e,o=(2*Math.atan(Math.exp(t.y))-Math.PI/2)*e;return new d.LatLng(o,i)}},d.Projection.LonLat={project:function(t){return new d.Point(t.lng,t.lat)},unproject:function(t){return new d.LatLng(t.y,t.x)}},d.CRS={latLngToPoint:function(t,e){var i=this.projection.project(t),o=this.scale(e);return this.transformation._transform(i,o)},pointToLatLng:function(t,e){var i=this.scale(e),o=this.transformation.untransform(t,i);return this.projection.unproject(o)},project:function(t){return this.projection.project(t)},scale:function(t){return 256*Math.pow(2,t)},getSize:function(t){var e=this.scale(t);return d.point(e,e)}},d.CRS.Simple=d.extend({},d.CRS,{projection:d.Projection.LonLat,transformation:new d.Transformation(1,0,-1,0),scale:function(t){return Math.pow(2,t)}}),d.CRS.EPSG3857=d.extend({},d.CRS,{code:"EPSG:3857",projection:d.Projection.SphericalMercator,transformation:new d.Transformation(.5/Math.PI,.5,-.5/Math.PI,.5),project:function(t){return this.projection.project(t).multiplyBy(6378137)}}),d.CRS.EPSG900913=d.extend({},d.CRS.EPSG3857,{code:"EPSG:900913"}),d.CRS.EPSG4326=d.extend({},d.CRS,{code:"EPSG:4326",projection:d.Projection.LonLat,transformation:new d.Transformation(1/360,.5,-1/360,.5)}),d.Map=d.Class.extend({includes:d.Mixin.Events,options:{crs:d.CRS.EPSG3857,fadeAnimation:d.DomUtil.TRANSITION&&!d.Browser.android23,trackResize:!0,markerZoomAnimation:d.DomUtil.TRANSITION&&d.Browser.any3d},initialize:function(t,e){e=d.setOptions(this,e),this._initContainer(t),this._initLayout(),this._onResize=d.bind(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.center&&e.zoom!==r&&this.setView(d.latLng(e.center),e.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._tileLayersNum=0,this.callInitHooks(),this._addLayers(e.layers)},setView:function(t,e){return e=e===r?this.getZoom():e,this._resetView(d.latLng(t),this._limitZoom(e)),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=this._limitZoom(t),this)},zoomIn:function(t,e){return this.setZoom(this._zoom+(t||1),e)},zoomOut:function(t,e){return this.setZoom(this._zoom-(t||1),e)},setZoomAround:function(t,e,i){var o=this.getZoomScale(e),n=this.getSize().divideBy(2),s=(t instanceof d.Point?t:this.latLngToContainerPoint(t)).subtract(n).multiplyBy(1-1/o),a=this.containerPointToLatLng(n.add(s));return this.setView(a,e,{zoom:i})},fitBounds:function(t,e){e=e||{},t=t.getBounds?t.getBounds():d.latLngBounds(t);var i=d.point(e.paddingTopLeft||e.padding||[0,0]),o=d.point(e.paddingBottomRight||e.padding||[0,0]),n=this.getBoundsZoom(t,!1,i.add(o));n=e.maxZoom?Math.min(e.maxZoom,n):n;var s=o.subtract(i).divideBy(2),a=this.project(t.getSouthWest(),n),r=this.project(t.getNorthEast(),n),h=this.unproject(a.add(r).divideBy(2).add(s),n);return this.setView(h,n,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t){return this.fire("movestart"),this._rawPanBy(d.point(t)),this.fire("move"),this.fire("moveend")},setMaxBounds:function(t){return t=d.latLngBounds(t),this.options.maxBounds=t,t?(this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds,this)):this.off("moveend",this._panInsideMaxBounds,this)},panInsideBounds:function(t,e){var i=this.getCenter(),o=this._limitCenter(i,this._zoom,t);return i.equals(o)?this:this.panTo(o,e)},addLayer:function(t){var e=d.stamp(t);return this._layers[e]||(this._layers[e]=t,!t.options||isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[e]=t,this._updateZoomLevels()),this.options.zoomAnimation&&d.TileLayer&&t instanceof d.TileLayer&&(this._tileLayersNum++,this._tileLayersToLoad++,t.on("load",this._onTileLayerLoad,this)),this._loaded&&this._layerAdd(t)),this},removeLayer:function(t){var e=d.stamp(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&this.fire("layerremove",{layer:t}),this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels()),this.options.zoomAnimation&&d.TileLayer&&t instanceof d.TileLayer&&(this._tileLayersNum--,this._tileLayersToLoad--,t.off("load",this._onTileLayerLoad,this)),this):this},hasLayer:function(t){return!!t&&d.stamp(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},invalidateSize:function(t){if(!this._loaded)return this;t=d.extend({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._initialCenter=null;var i=this.getSize(),o=e.divideBy(2).round(),n=i.divideBy(2).round(),s=o.subtract(n);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(d.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){this._loaded&&this.fire("unload"),this._initEvents("off");try{delete this._container._leaflet}catch(t){this._container._leaflet=r}return this._clearPanes(),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this},getCenter:function(){return this._checkIfLoaded(),this._initialCenter&&!this._moved()?this._initialCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new d.LatLngBounds(e,i)},getMinZoom:function(){return this.options.minZoom===r?this._layersMinZoom===r?0:this._layersMinZoom:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===r?this._layersMaxZoom===r?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=d.latLngBounds(t);var o,n=this.getMinZoom()-(e?1:0),s=this.getMaxZoom(),a=this.getSize(),r=t.getNorthWest(),h=t.getSouthEast(),l=!0;i=d.point(i||[0,0]);do{n++,o=this.project(h,n).subtract(this.project(r,n)).add(i),l=e?o.x0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom();return Math.max(e,Math.min(i,t))}}),d.map=function(t,e){return new d.Map(t,e)},d.Projection.Mercator={MAX_LATITUDE:85.0840591556,R_MINOR:6356752.314245179,R_MAJOR:6378137,project:function(t){var e=d.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,o=Math.max(Math.min(i,t.lat),-i),n=this.R_MAJOR,s=this.R_MINOR,a=t.lng*e*n,r=o*e,h=s/n,l=Math.sqrt(1-h*h),c=l*Math.sin(r);c=Math.pow((1-c)/(1+c),.5*l);var p=Math.tan(.5*(.5*Math.PI-r))/c;return r=-n*Math.log(p),new d.Point(a,r)},unproject:function(t){for(var e,i=d.LatLng.RAD_TO_DEG,o=this.R_MAJOR,n=this.R_MINOR,s=t.x*i/o,a=n/o,r=Math.sqrt(1-a*a),h=Math.exp(-t.y/o),l=Math.PI/2-2*Math.atan(h),c=15,p=.1;Math.abs(p)>1e-7&&--c>0;)e=r*Math.sin(l),l+=p=Math.PI/2-2*Math.atan(h*Math.pow((1-e)/(1+e),.5*r))-l;return new d.LatLng(l*i,s)}},d.CRS.EPSG3395=d.extend({},d.CRS,{code:"EPSG:3395",projection:d.Projection.Mercator,transformation:(O=d.Projection.Mercator.R_MAJOR,z=.5/(Math.PI*O),new d.Transformation(z,.5,-z,.5))}),d.TileLayer=d.Class.extend({includes:d.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",zoomOffset:0,opacity:1,unloadInvisibleTiles:d.Browser.mobile,updateWhenIdle:d.Browser.mobile},initialize:function(t,e){(e=d.setOptions(this,e)).detectRetina&&d.Browser.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomOffset++,e.minZoom>0&&e.minZoom--,this.options.maxZoom--),e.bounds&&(e.bounds=d.latLngBounds(e.bounds)),this._url=t;var i=this.options.subdomains;"string"==typeof i&&(this.options.subdomains=i.split(""))},onAdd:function(t){this._map=t,this._animated=t._zoomAnimated,this._initContainer(),t.on({viewreset:this._reset,moveend:this._update},this),this._animated&&t.on({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||(this._limitedUpdate=d.Util.limitExecByInterval(this._update,150,this),t.on("move",this._limitedUpdate,this)),this._reset(),this._update()},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this._container.parentNode.removeChild(this._container),t.off({viewreset:this._reset,moveend:this._update},this),this._animated&&t.off({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||t.off("move",this._limitedUpdate,this),this._container=null,this._map=null},bringToFront:function(){var t=this._map._panes.tilePane;return this._container&&(t.appendChild(this._container),this._setAutoZIndex(t,Math.max)),this},bringToBack:function(){var t=this._map._panes.tilePane;return this._container&&(t.insertBefore(this._container,t.firstChild),this._setAutoZIndex(t,Math.min)),this},getAttribution:function(){return this.options.attribution},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},redraw:function(){return this._map&&(this._reset({hard:!0}),this._update()),this},_updateZIndex:function(){this._container&&this.options.zIndex!==r&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t,e){var i,o,n,s=t.children,a=-e(1/0,-1/0);for(o=0,n=s.length;oi&&(o=Math.round(t.getZoomScale(e)/t.getZoomScale(i)*o)),o},_update:function(){if(this._map){var t=this._map,e=t.getPixelBounds(),i=t.getZoom(),o=this._getTileSize();if(!(i>this.options.maxZoom||i=i.x)||t.y<0||t.y>=i.y)return!1}if(e.bounds){var o=this._getTileSize(),n=t.multiplyBy(o),s=n.add([o,o]),a=this._map.unproject(n),r=this._map.unproject(s);if(e.continuousWorld||e.noWrap||(a=a.wrap(),r=r.wrap()),!e.bounds.intersects([a,r]))return!1}return!0},_removeOtherTiles:function(t){var e,i,o,n;for(n in this._tiles)e=n.split(":"),i=parseInt(e[0],10),o=parseInt(e[1],10),(it.max.x||ot.max.y)&&this._removeTile(n)},_removeTile:function(t){var e=this._tiles[t];this.fire("tileunload",{tile:e,url:e.src}),this.options.reuseTiles?(d.DomUtil.removeClass(e,"leaflet-tile-loaded"),this._unusedTiles.push(e)):e.parentNode===this._tileContainer&&this._tileContainer.removeChild(e),d.Browser.android||(e.onload=null,e.src=d.Util.emptyImageUrl),delete this._tiles[t]},_addTile:function(t,e){var i=this._getTilePos(t),o=this._getTile();d.DomUtil.setPosition(o,i,d.Browser.chrome),this._tiles[t.x+":"+t.y]=o,this._loadTile(o,t),o.parentNode!==this._tileContainer&&e.appendChild(o)},_getZoomForUrl:function(){var t=this.options,e=this._map.getZoom();return t.zoomReverse&&(e=t.maxZoom-e),e+=t.zoomOffset,t.maxNativeZoom?Math.min(e,t.maxNativeZoom):e},_getTilePos:function(t){var e=this._map.getPixelOrigin(),i=this._getTileSize();return t.multiplyBy(i).subtract(e)},getTileUrl:function(t){return d.Util.template(this._url,d.extend({s:this._getSubdomain(t),z:t.z,x:t.x,y:t.y},this.options))},_getWrapTileNum:function(){return this._map.options.crs.getSize(this._map.getZoom()).divideBy(this._getTileSize())._floor()},_adjustTilePoint:function(t){var e=this._getWrapTileNum();this.options.continuousWorld||this.options.noWrap||(t.x=(t.x%e.x+e.x)%e.x),this.options.tms&&(t.y=e.y-t.y-1),t.z=this._getZoomForUrl()},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_getTile:function(){if(this.options.reuseTiles&&this._unusedTiles.length>0){var t=this._unusedTiles.pop();return this._resetTile(t),t}return this._createTile()},_resetTile:function(){},_createTile:function(){var t=d.DomUtil.create("img","leaflet-tile");return t.style.width=t.style.height=this._getTileSize()+"px",t.galleryimg="no",t.onselectstart=t.onmousemove=d.Util.falseFn,d.Browser.ielt9&&this.options.opacity!==r&&d.DomUtil.setOpacity(t,this.options.opacity),d.Browser.mobileWebkit3d&&(t.style.WebkitBackfaceVisibility="hidden"),t},_loadTile:function(t,e){t._layer=this,t.onload=this._tileOnLoad,t.onerror=this._tileOnError,this._adjustTilePoint(e),t.src=this.getTileUrl(e),this.fire("tileloadstart",{tile:t,url:t.src})},_tileLoaded:function(){this._tilesToLoad--,this._animated&&d.DomUtil.addClass(this._tileContainer,"leaflet-zoom-animated"),this._tilesToLoad||(this.fire("load"),this._animated&&(clearTimeout(this._clearBgBufferTimer),this._clearBgBufferTimer=setTimeout(d.bind(this._clearBgBuffer,this),500)))},_tileOnLoad:function(){var t=this._layer;this.src!==d.Util.emptyImageUrl&&(d.DomUtil.addClass(this,"leaflet-tile-loaded"),t.fire("tileload",{tile:this,url:this.src})),t._tileLoaded()},_tileOnError:function(){var t=this._layer;t.fire("tileerror",{tile:this,url:this.src});var e=t.options.errorTileUrl;e&&(this.src=e),t._tileLoaded()}}),d.tileLayer=function(t,e){return new d.TileLayer(t,e)},d.TileLayer.WMS=d.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},initialize:function(t,e){this._url=t;var i=d.extend({},this.defaultWmsParams),o=e.tileSize||this.options.tileSize;for(var n in e.detectRetina&&d.Browser.retina?i.width=i.height=2*o:i.width=i.height=o,e)this.options.hasOwnProperty(n)||"crs"===n||(i[n]=e[n]);this.wmsParams=i,d.setOptions(this,e)},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,d.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._map,i=this.options.tileSize,o=t.multiplyBy(i),n=o.add([i,i]),s=this._crs.project(e.unproject(o,t.z)),a=this._crs.project(e.unproject(n,t.z)),r=this._wmsVersion>=1.3&&this._crs===d.CRS.EPSG4326?[a.y,s.x,s.y,a.x].join(","):[s.x,a.y,a.x,s.y].join(","),h=d.Util.template(this._url,{s:this._getSubdomain(t)});return h+d.Util.getParamString(this.wmsParams,h,!0)+"&BBOX="+r},setParams:function(t,e){return d.extend(this.wmsParams,t),e||this.redraw(),this}}),d.tileLayer.wms=function(t,e){return new d.TileLayer.WMS(t,e)},d.TileLayer.Canvas=d.TileLayer.extend({options:{async:!1},initialize:function(t){d.setOptions(this,t)},redraw:function(){for(var t in this._map&&(this._reset({hard:!0}),this._update()),this._tiles)this._redrawTile(this._tiles[t]);return this},_redrawTile:function(t){this.drawTile(t,t._tilePoint,this._map._zoom)},_createTile:function(){var t=d.DomUtil.create("canvas","leaflet-tile");return t.width=t.height=this.options.tileSize,t.onselectstart=t.onmousemove=d.Util.falseFn,t},_loadTile:function(t,e){t._layer=this,t._tilePoint=e,this._redrawTile(t),this.options.async||this.tileDrawn(t)},drawTile:function(){},tileDrawn:function(t){this._tileOnLoad.call(t)}}),d.tileLayer.canvas=function(t){return new d.TileLayer.Canvas(t)},d.ImageOverlay=d.Class.extend({includes:d.Mixin.Events,options:{opacity:1},initialize:function(t,e,i){this._url=t,this._bounds=d.latLngBounds(e),d.setOptions(this,i)},onAdd:function(t){this._map=t,this._image||this._initImage(),t._panes.overlayPane.appendChild(this._image),t.on("viewreset",this._reset,this),t.options.zoomAnimation&&d.Browser.any3d&&t.on("zoomanim",this._animateZoom,this),this._reset()},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._image),t.off("viewreset",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},bringToFront:function(){return this._image&&this._map._panes.overlayPane.appendChild(this._image),this},bringToBack:function(){var t=this._map._panes.overlayPane;return this._image&&t.insertBefore(this._image,t.firstChild),this},setUrl:function(t){this._url=t,this._image.src=this._url},getAttribution:function(){return this.options.attribution},_initImage:function(){this._image=d.DomUtil.create("img","leaflet-image-layer"),this._map.options.zoomAnimation&&d.Browser.any3d?d.DomUtil.addClass(this._image,"leaflet-zoom-animated"):d.DomUtil.addClass(this._image,"leaflet-zoom-hide"),this._updateOpacity(),d.extend(this._image,{galleryimg:"no",onselectstart:d.Util.falseFn,onmousemove:d.Util.falseFn,onload:d.bind(this._onImageLoad,this),src:this._url})},_animateZoom:function(t){var e=this._map,i=this._image,o=e.getZoomScale(t.zoom),n=this._bounds.getNorthWest(),s=this._bounds.getSouthEast(),a=e._latLngToNewLayerPoint(n,t.zoom,t.center),r=e._latLngToNewLayerPoint(s,t.zoom,t.center)._subtract(a),h=a._add(r._multiplyBy(.5*(1-1/o)));i.style[d.DomUtil.TRANSFORM]=d.DomUtil.getTranslateString(h)+" scale("+o+") "},_reset:function(){var t=this._image,e=this._map.latLngToLayerPoint(this._bounds.getNorthWest()),i=this._map.latLngToLayerPoint(this._bounds.getSouthEast())._subtract(e);d.DomUtil.setPosition(t,e),t.style.width=i.x+"px",t.style.height=i.y+"px"},_onImageLoad:function(){this.fire("load")},_updateOpacity:function(){d.DomUtil.setOpacity(this._image,this.options.opacity)}}),d.imageOverlay=function(t,e,i){return new d.ImageOverlay(t,e,i)},d.Icon=d.Class.extend({options:{className:""},initialize:function(t){d.setOptions(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i,o=this._getIconUrl(t);if(!o){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}return i=e&&"IMG"===e.tagName?this._createImg(o,e):this._createImg(o),this._setIconStyles(i,t),i},_setIconStyles:function(t,e){var i,o=this.options,n=d.point(o[e+"Size"]);!(i="shadow"===e?d.point(o.shadowAnchor||o.iconAnchor):d.point(o.iconAnchor))&&n&&(i=n.divideBy(2,!0)),t.className="leaflet-marker-"+e+" "+o.className,i&&(t.style.marginLeft=-i.x+"px",t.style.marginTop=-i.y+"px"),n&&(t.style.width=n.x+"px",t.style.height=n.y+"px")},_createImg:function(t,e){return(e=e||a.createElement("img")).src=t,e},_getIconUrl:function(t){return d.Browser.retina&&this.options[t+"RetinaUrl"]?this.options[t+"RetinaUrl"]:this.options[t+"Url"]}}),d.icon=function(t){return new d.Icon(t)},d.Icon.Default=d.Icon.extend({options:{iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]},_getIconUrl:function(t){var e=t+"Url";if(this.options[e])return this.options[e];d.Browser.retina&&"icon"===t&&(t+="-2x");var i=d.Icon.Default.imagePath;if(!i)throw new Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");return i+"/marker-"+t+".png"}}),d.Icon.Default.imagePath=function(){var t,e,i,o,n=a.getElementsByTagName("script"),s=/[\/^]leaflet[\-\._]?([\w\-\._]*)\.js\??/;for(t=0,e=n.length;tn?(e.height=n+"px",d.DomUtil.addClass(t,s)):d.DomUtil.removeClass(t,s),this._containerWidth=this._container.offsetWidth},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=this._animated,i=d.point(this.options.offset);e&&d.DomUtil.setPosition(this._container,t),this._containerBottom=-i.y-(e?0:t.y),this._containerLeft=-Math.round(this._containerWidth/2)+i.x+(e?0:t.x),this._container.style.bottom=this._containerBottom+"px",this._container.style.left=this._containerLeft+"px"}},_zoomAnimation:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);d.DomUtil.setPosition(this._container,e)},_adjustPan:function(){if(this.options.autoPan){var t=this._map,e=this._container.offsetHeight,i=this._containerWidth,o=new d.Point(this._containerLeft,-e-this._containerBottom);this._animated&&o._add(d.DomUtil.getPosition(this._container));var n=t.layerPointToContainerPoint(o),s=d.point(this.options.autoPanPadding),a=d.point(this.options.autoPanPaddingTopLeft||s),r=d.point(this.options.autoPanPaddingBottomRight||s),h=t.getSize(),l=0,c=0;n.x+i+r.x>h.x&&(l=n.x+i-h.x+r.x),n.x-l-a.x<0&&(l=n.x-a.x),n.y+e+r.y>h.y&&(c=n.y+e-h.y+r.y),n.y-c-a.y<0&&(c=n.y-a.y),(l||c)&&t.fire("autopanstart").panBy([l,c])}},_onCloseButtonClick:function(t){this._close(),d.DomEvent.stop(t)}}),d.popup=function(t,e){return new d.Popup(t,e)},d.Map.include({openPopup:function(t,e,i){if(this.closePopup(),!(t instanceof d.Popup)){var o=t;t=new d.Popup(i).setLatLng(e).setContent(o)}return t._isOpen=!0,this._popup=t,this.addLayer(t)},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&(this.removeLayer(t),t._isOpen=!1),this}}),d.Marker.include({openPopup:function(){return this._popup&&this._map&&!this._map.hasLayer(this._popup)&&(this._popup.setLatLng(this._latlng),this._map.openPopup(this._popup)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(){return this._popup&&(this._popup._isOpen?this.closePopup():this.openPopup()),this},bindPopup:function(t,e){var i=d.point(this.options.icon.options.popupAnchor||[0,0]);return i=i.add(d.Popup.prototype.options.offset),e&&e.offset&&(i=i.add(e.offset)),e=d.extend({offset:i},e),this._popupHandlersAdded||(this.on("click",this.togglePopup,this).on("remove",this.closePopup,this).on("move",this._movePopup,this),this._popupHandlersAdded=!0),t instanceof d.Popup?(d.setOptions(t,e),this._popup=t,t._source=this):this._popup=new d.Popup(e,this).setContent(t),this},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this.togglePopup,this).off("remove",this.closePopup,this).off("move",this._movePopup,this),this._popupHandlersAdded=!1),this},getPopup:function(){return this._popup},_movePopup:function(t){this._popup.setLatLng(t.latlng)}}),d.LayerGroup=d.Class.extend({initialize:function(t){var e,i;if(this._layers={},t)for(e=0,i=t.length;e';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}(),d.Path=d.Browser.svg||!d.Browser.vml?d.Path:d.Path.extend({statics:{VML:!0,CLIP_PADDING:.02},_createElement:function(){try{return a.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return a.createElement("')}}catch(t){return function(t){return a.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_initPath:function(){var t=this._container=this._createElement("shape");d.DomUtil.addClass(t,"leaflet-vml-shape"+(this.options.className?" "+this.options.className:"")),this.options.clickable&&d.DomUtil.addClass(t,"leaflet-clickable"),t.coordsize="1 1",this._path=this._createElement("path"),t.appendChild(this._path),this._map._pathRoot.appendChild(t)},_initStyle:function(){this._updateStyle()},_updateStyle:function(){var t=this._stroke,e=this._fill,i=this.options,o=this._container;o.stroked=i.stroke,o.filled=i.fill,i.stroke?(t||((t=this._stroke=this._createElement("stroke")).endcap="round",o.appendChild(t)),t.weight=i.weight+"px",t.color=i.color,t.opacity=i.opacity,i.dashArray?t.dashStyle=d.Util.isArray(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):t.dashStyle="",i.lineCap&&(t.endcap=i.lineCap.replace("butt","flat")),i.lineJoin&&(t.joinstyle=i.lineJoin)):t&&(o.removeChild(t),this._stroke=null),i.fill?(e||(e=this._fill=this._createElement("fill"),o.appendChild(e)),e.color=i.fillColor||i.color,e.opacity=i.fillOpacity):e&&(o.removeChild(e),this._fill=null)},_updatePath:function(){var t=this._container.style;t.display="none",this._path.v=this.getPathString()+" ",t.display=""}}),d.Map.include(d.Browser.svg||!d.Browser.vml?{}:{_initPathRoot:function(){if(!this._pathRoot){var t=this._pathRoot=a.createElement("div");t.className="leaflet-vml-container",this._panes.overlayPane.appendChild(t),this.on("moveend",this._updatePathViewport),this._updatePathViewport()}}}),d.Browser.canvas=!!a.createElement("canvas").getContext,d.Path=d.Path.SVG&&!s.L_PREFER_CANVAS||!d.Browser.canvas?d.Path:d.Path.extend({statics:{CANVAS:!0,SVG:!1},redraw:function(){return this._map&&(this.projectLatlngs(),this._requestUpdate()),this},setStyle:function(t){return d.setOptions(this,t),this._map&&(this._updateStyle(),this._requestUpdate()),this},onRemove:function(t){t.off("viewreset",this.projectLatlngs,this).off("moveend",this._updatePath,this),this.options.clickable&&(this._map.off("click",this._onClick,this),this._map.off("mousemove",this._onMouseMove,this)),this._requestUpdate(),this.fire("remove"),this._map=null},_requestUpdate:function(){this._map&&!d.Path._updateRequest&&(d.Path._updateRequest=d.Util.requestAnimFrame(this._fireMapMoveEnd,this._map))},_fireMapMoveEnd:function(){d.Path._updateRequest=null,this.fire("moveend")},_initElements:function(){this._map._initPathRoot(),this._ctx=this._map._canvasCtx},_updateStyle:function(){var t=this.options;t.stroke&&(this._ctx.lineWidth=t.weight,this._ctx.strokeStyle=t.color),t.fill&&(this._ctx.fillStyle=t.fillColor||t.color),t.lineCap&&(this._ctx.lineCap=t.lineCap),t.lineJoin&&(this._ctx.lineJoin=t.lineJoin)},_drawPath:function(){var t,e,i,o,n,s;for(this._ctx.beginPath(),t=0,i=this._parts.length;th&&(s=a,h=r);h>i&&(e[s]=1,this._simplifyDPStep(t,e,i,o,s),this._simplifyDPStep(t,e,i,s,n))},_reducePoints:function(t,e){for(var i=[t[0]],o=1,n=0,s=t.length;oe&&(i.push(t[o]),n=o);return ne.max.x&&(i|=2),t.ye.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,o=e.y-t.y;return i*i+o*o},_sqClosestPointOnSegment:function(t,e,i,o){var n,s=e.x,a=e.y,r=i.x-s,h=i.y-a,l=r*r+h*h;return l>0&&((n=((t.x-s)*r+(t.y-a)*h)/l)>1?(s=i.x,a=i.y):n>0&&(s+=r*n,a+=h*n)),r=t.x-s,h=t.y-a,o?r*r+h*h:new d.Point(s,a)}},d.Polyline=d.Path.extend({initialize:function(t,e){d.Path.prototype.initialize.call(this,e),this._latlngs=this._convertLatLngs(t)},options:{smoothFactor:1,noClip:!1},projectLatlngs:function(){this._originalPoints=[];for(var t=0,e=this._latlngs.length;t=2&&t[0].equals(t[t.length-1])&&t.pop()},projectLatlngs:function(){var t,e,i,o;if(d.Polyline.prototype.projectLatlngs.call(this),this._holePoints=[],this._holes)for(t=0,i=this._holes.length;tt.max.x||i.y-e>t.max.y||i.x+et.y!=o.y>t.y&&t.x<(o.x-i.x)*(t.y-i.y)/(o.y-i.y)+i.x&&(l=!l);return l}}:{}),d.Circle.include(d.Path.CANVAS?{_drawPath:function(){var t=this._point;this._ctx.beginPath(),this._ctx.arc(t.x,t.y,this._radius,0,2*Math.PI,!1)},_containsPoint:function(t){var e=this._point,i=this.options.stroke?this.options.weight/2:0;return t.distanceTo(e)<=this._radius+i}}:{}),d.CircleMarker.include(d.Path.CANVAS?{_updateStyle:function(){d.Path.prototype._updateStyle.call(this)}}:{}),d.GeoJSON=d.FeatureGroup.extend({initialize:function(t,e){d.setOptions(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,o,n=d.Util.isArray(t)?t:t.features;if(n){for(e=0,i=n.length;e=0;i--)d.DomEvent.on(t,d.Draggable.START[i],e);return d.DomEvent.on(t,"click",d.DomEvent._fakeStop).on(t,"dblclick",e)},preventDefault:function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this},stop:function(t){return d.DomEvent.preventDefault(t).stopPropagation(t)},getMousePosition:function(t,e){if(!e)return new d.Point(t.clientX,t.clientY);var i=e.getBoundingClientRect();return new d.Point(t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop)},getWheelDelta:function(t){var e=0;return t.wheelDelta&&(e=t.wheelDelta/120),t.detail&&(e=-t.detail/3),e},_skipEvents:{},_fakeStop:function(t){d.DomEvent._skipEvents[t.type]=!0},_skipped:function(t){var e=this._skipEvents[t.type];return this._skipEvents[t.type]=!1,e},_checkMouse:function(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(t){return!1}return i!==t},_getEvent:function(){var t=s.event;if(!t)for(var e=arguments.callee.caller;e&&(!(t=e.arguments[0])||s.Event!==t.constructor);)e=e.caller;return t},_filterClick:function(t,e){var i=t.timeStamp||t.originalEvent.timeStamp,o=d.DomEvent._lastClick&&i-d.DomEvent._lastClick;if(!(o&&o>100&&o<500||t.target._simulatedClick&&!t._simulated))return d.DomEvent._lastClick=i,e(t);d.DomEvent.stop(t)}},d.DomEvent.on=d.DomEvent.addListener,d.DomEvent.off=d.DomEvent.removeListener,d.Draggable=d.Class.extend({includes:d.Mixin.Events,statics:{START:d.Browser.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"}},initialize:function(t,e){this._element=t,this._dragStartTarget=e||t},enable:function(){if(!this._enabled){for(var t=d.Draggable.START.length-1;t>=0;t--)d.DomEvent.on(this._dragStartTarget,d.Draggable.START[t],this._onDown,this);this._enabled=!0}},disable:function(){if(this._enabled){for(var t=d.Draggable.START.length-1;t>=0;t--)d.DomEvent.off(this._dragStartTarget,d.Draggable.START[t],this._onDown,this);this._enabled=!1,this._moved=!1}},_onDown:function(t){if(this._moved=!1,!t.shiftKey&&(1===t.which||1===t.button||t.touches)&&(d.DomEvent.stopPropagation(t),!d.Draggable._disabled&&(d.DomUtil.disableImageDrag(),d.DomUtil.disableTextSelection(),!this._moving))){var e=t.touches?t.touches[0]:t;this._startPoint=new d.Point(e.clientX,e.clientY),this._startPos=this._newPos=d.DomUtil.getPosition(this._element),d.DomEvent.on(a,d.Draggable.MOVE[t.type],this._onMove,this).on(a,d.Draggable.END[t.type],this._onUp,this)}},_onMove:function(t){if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,i=new d.Point(e.clientX,e.clientY).subtract(this._startPoint);(i.x||i.y)&&(d.Browser.touch&&Math.abs(i.x)+Math.abs(i.y)<3||(d.DomEvent.preventDefault(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=d.DomUtil.getPosition(this._element).subtract(i),d.DomUtil.addClass(a.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,d.DomUtil.addClass(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(i),this._moving=!0,d.Util.cancelAnimFrame(this._animRequest),this._animRequest=d.Util.requestAnimFrame(this._updatePosition,this,!0,this._dragStartTarget)))}},_updatePosition:function(){this.fire("predrag"),d.DomUtil.setPosition(this._element,this._newPos),this.fire("drag")},_onUp:function(){for(var t in d.DomUtil.removeClass(a.body,"leaflet-dragging"),this._lastTarget&&(d.DomUtil.removeClass(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),d.Draggable.MOVE)d.DomEvent.off(a,d.Draggable.MOVE[t],this._onMove).off(a,d.Draggable.END[t],this._onUp);d.DomUtil.enableImageDrag(),d.DomUtil.enableTextSelection(),this._moved&&this._moving&&(d.Util.cancelAnimFrame(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1}}),d.Handler=d.Class.extend({initialize:function(t){this._map=t},enable:function(){this._enabled||(this._enabled=!0,this.addHooks())},disable:function(){this._enabled&&(this._enabled=!1,this.removeHooks())},enabled:function(){return!!this._enabled}}),d.Map.mergeOptions({dragging:!0,inertia:!d.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,inertiaThreshold:d.Browser.touch?32:18,easeLinearity:.25,worldCopyJump:!1}),d.Map.Drag=d.Handler.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new d.Draggable(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDrag,this),t.on("viewreset",this._onViewReset,this),t.whenReady(this._onViewReset,this))}this._draggable.enable()},removeHooks:function(){this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){var t=this._map;t._panAnim&&t._panAnim.stop(),t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(){if(this._map.options.inertia){var t=this._lastTime=+new Date,e=this._lastPos=this._draggable._newPos;this._positions.push(e),this._times.push(t),t-this._times[0]>200&&(this._positions.shift(),this._times.shift())}this._map.fire("move").fire("drag")},_onViewReset:function(){var t=this._map.getSize()._divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.project([0,180]).x},_onPreDrag:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,o=this._draggable._newPos.x,n=(o-e+i)%t+e-i,s=(o+e+i)%t-e-i,a=Math.abs(n+i)i.inertiaThreshold||!this._positions[0];if(e.fire("dragend",t),n)e.fire("moveend");else{var s=this._lastPos.subtract(this._positions[0]),a=(this._lastTime+o-this._times[0])/1e3,r=i.easeLinearity,h=s.multiplyBy(r/a),l=h.distanceTo([0,0]),c=Math.min(i.inertiaMaxSpeed,l),p=h.multiplyBy(c/l),_=c/(i.inertiaDeceleration*r),u=p.multiplyBy(-_/2).round();u.x&&u.y?(u=e._limitOffset(u,e.options.maxBounds),d.Util.requestAnimFrame((function(){e.panBy(u,{duration:_,easeLinearity:r,noMoveStart:!0})}))):e.fire("moveend")}}}),d.Map.addInitHook("addHandler","dragging",d.Map.Drag),d.Map.mergeOptions({doubleClickZoom:!0}),d.Map.DoubleClickZoom=d.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom()+(t.originalEvent.shiftKey?-1:1);"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}}),d.Map.addInitHook("addHandler","doubleClickZoom",d.Map.DoubleClickZoom),d.Map.mergeOptions({scrollWheelZoom:!0}),d.Map.ScrollWheelZoom=d.Handler.extend({addHooks:function(){d.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this),d.DomEvent.on(this._map._container,"MozMousePixelScroll",d.DomEvent.preventDefault),this._delta=0},removeHooks:function(){d.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll),d.DomEvent.off(this._map._container,"MozMousePixelScroll",d.DomEvent.preventDefault)},_onWheelScroll:function(t){var e=d.DomEvent.getWheelDelta(t);this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(40-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(d.bind(this._performZoom,this),i),d.DomEvent.preventDefault(t),d.DomEvent.stopPropagation(t)},_performZoom:function(){var t=this._map,e=this._delta,i=t.getZoom();e=e>0?Math.ceil(e):Math.floor(e),e=Math.max(Math.min(e,4),-4),e=t._limitZoom(i+e)-i,this._delta=0,this._startTime=null,e&&("center"===t.options.scrollWheelZoom?t.setZoom(i+e):t.setZoomAround(this._lastMousePos,i+e))}}),d.Map.addInitHook("addHandler","scrollWheelZoom",d.Map.ScrollWheelZoom),d.extend(d.DomEvent,{_touchstart:d.Browser.msPointer?"MSPointerDown":d.Browser.pointer?"pointerdown":"touchstart",_touchend:d.Browser.msPointer?"MSPointerUp":d.Browser.pointer?"pointerup":"touchend",addDoubleTapListener:function(t,e,i){var o,n,s=!1,r="_leaflet_",h=this._touchstart,l=this._touchend,c=[];function p(t){var e;if(d.Browser.pointer?(c.push(t.pointerId),e=c.length):e=t.touches.length,!(e>1)){var i=Date.now(),a=i-(o||i);n=t.touches?t.touches[0]:t,s=a>0&&a<=250,o=i}}function _(t){if(d.Browser.pointer){var i=c.indexOf(t.pointerId);if(-1===i)return;c.splice(i,1)}if(s){if(d.Browser.pointer){var a,r={};for(var h in n)a=n[h],r[h]="function"==typeof a?a.bind(n):a;n=r}n.type="dblclick",e(n),o=null}}t[r+h+i]=p,t[r+l+i]=_;var u=d.Browser.pointer?a.documentElement:t;return t.addEventListener(h,p,!1),u.addEventListener(l,_,!1),d.Browser.pointer&&u.addEventListener(d.DomEvent.POINTER_CANCEL,_,!1),this},removeDoubleTapListener:function(t,e){var i="_leaflet_";return t.removeEventListener(this._touchstart,t[i+this._touchstart+e],!1),(d.Browser.pointer?a.documentElement:t).removeEventListener(this._touchend,t[i+this._touchend+e],!1),d.Browser.pointer&&a.documentElement.removeEventListener(d.DomEvent.POINTER_CANCEL,t[i+this._touchend+e],!1),this}}),d.extend(d.DomEvent,{POINTER_DOWN:d.Browser.msPointer?"MSPointerDown":"pointerdown",POINTER_MOVE:d.Browser.msPointer?"MSPointerMove":"pointermove",POINTER_UP:d.Browser.msPointer?"MSPointerUp":"pointerup",POINTER_CANCEL:d.Browser.msPointer?"MSPointerCancel":"pointercancel",_pointers:[],_pointerDocumentListener:!1,addPointerListener:function(t,e,i,o){switch(e){case"touchstart":return this.addPointerListenerStart(t,e,i,o);case"touchend":return this.addPointerListenerEnd(t,e,i,o);case"touchmove":return this.addPointerListenerMove(t,e,i,o);default:throw"Unknown touch event type"}},addPointerListenerStart:function(t,e,i,o){var n=this._pointers,s=function(t){"mouse"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&d.DomEvent.preventDefault(t);for(var e=!1,o=0;o1)||(this._moved||(d.DomUtil.addClass(e._mapPane,"leaflet-touching"),e.fire("movestart").fire("zoomstart"),this._moved=!0),d.Util.cancelAnimFrame(this._animRequest),this._animRequest=d.Util.requestAnimFrame(this._updateOnMove,this,!0,this._map._container),d.DomEvent.preventDefault(t)))}},_updateOnMove:function(){var t=this._map,e=this._getScaleOrigin(),i=t.layerPointToLatLng(e),o=t.getScaleZoom(this._scale);t._animateZoom(i,o,this._startCenter,this._scale,this._delta,!1,!0)},_onTouchEnd:function(){if(this._moved&&this._zooming){var t=this._map;this._zooming=!1,d.DomUtil.removeClass(t._mapPane,"leaflet-touching"),d.Util.cancelAnimFrame(this._animRequest),d.DomEvent.off(a,"touchmove",this._onTouchMove).off(a,"touchend",this._onTouchEnd);var e=this._getScaleOrigin(),i=t.layerPointToLatLng(e),o=t.getZoom(),n=t.getScaleZoom(this._scale)-o,s=n>0?Math.ceil(n):Math.floor(n),r=t._limitZoom(o+s),h=t.getZoomScale(r)/this._scale;t._animateZoom(i,r,e,h)}else this._zooming=!1},_getScaleOrigin:function(){var t=this._centerOffset.subtract(this._delta).divideBy(this._scale);return this._startCenter.add(t)}}),d.Map.addInitHook("addHandler","touchZoom",d.Map.TouchZoom),d.Map.mergeOptions({tap:!0,tapTolerance:15}),d.Map.Tap=d.Handler.extend({addHooks:function(){d.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){d.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(d.DomEvent.preventDefault(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],i=e.target;this._startPos=this._newPos=new d.Point(e.clientX,e.clientY),i.tagName&&"a"===i.tagName.toLowerCase()&&d.DomUtil.addClass(i,"leaflet-active"),this._holdTimeout=setTimeout(d.bind((function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))}),this),1e3),d.DomEvent.on(a,"touchmove",this._onMove,this).on(a,"touchend",this._onUp,this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),d.DomEvent.off(a,"touchmove",this._onMove,this).off(a,"touchend",this._onUp,this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],i=e.target;i&&i.tagName&&"a"===i.tagName.toLowerCase()&&d.DomUtil.removeClass(i,"leaflet-active"),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new d.Point(e.clientX,e.clientY)},_simulateEvent:function(t,e){var i=a.createEvent("MouseEvents");i._simulated=!0,e.target._simulatedClick=!0,i.initMouseEvent(t,!0,!0,s,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(i)}}),d.Browser.touch&&!d.Browser.pointer&&d.Map.addInitHook("addHandler","tap",d.Map.Tap),d.Map.mergeOptions({boxZoom:!0}),d.Map.BoxZoom=d.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._moved=!1},addHooks:function(){d.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){d.DomEvent.off(this._container,"mousedown",this._onMouseDown),this._moved=!1},moved:function(){return this._moved},_onMouseDown:function(t){if(this._moved=!1,!t.shiftKey||1!==t.which&&1!==t.button)return!1;d.DomUtil.disableTextSelection(),d.DomUtil.disableImageDrag(),this._startLayerPoint=this._map.mouseEventToLayerPoint(t),d.DomEvent.on(a,"mousemove",this._onMouseMove,this).on(a,"mouseup",this._onMouseUp,this).on(a,"keydown",this._onKeyDown,this)},_onMouseMove:function(t){this._moved||(this._box=d.DomUtil.create("div","leaflet-zoom-box",this._pane),d.DomUtil.setPosition(this._box,this._startLayerPoint),this._container.style.cursor="crosshair",this._map.fire("boxzoomstart"));var e=this._startLayerPoint,i=this._box,o=this._map.mouseEventToLayerPoint(t),n=o.subtract(e),s=new d.Point(Math.min(o.x,e.x),Math.min(o.y,e.y));d.DomUtil.setPosition(i,s),this._moved=!0,i.style.width=Math.max(0,Math.abs(n.x)-4)+"px",i.style.height=Math.max(0,Math.abs(n.y)-4)+"px"},_finish:function(){this._moved&&(this._pane.removeChild(this._box),this._container.style.cursor=""),d.DomUtil.enableTextSelection(),d.DomUtil.enableImageDrag(),d.DomEvent.off(a,"mousemove",this._onMouseMove).off(a,"mouseup",this._onMouseUp).off(a,"keydown",this._onKeyDown)},_onMouseUp:function(t){this._finish();var e=this._map,i=e.mouseEventToLayerPoint(t);if(!this._startLayerPoint.equals(i)){var o=new d.LatLngBounds(e.layerPointToLatLng(this._startLayerPoint),e.layerPointToLatLng(i));e.fitBounds(o),e.fire("boxzoomend",{boxZoomBounds:o})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}}),d.Map.addInitHook("addHandler","boxZoom",d.Map.BoxZoom),d.Map.mergeOptions({keyboard:!0,keyboardPanOffset:80,keyboardZoomOffset:1}),d.Map.Keyboard=d.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,173]},initialize:function(t){this._map=t,this._setPanOffset(t.options.keyboardPanOffset),this._setZoomOffset(t.options.keyboardZoomOffset)},addHooks:function(){var t=this._map._container;-1===t.tabIndex&&(t.tabIndex="0"),d.DomEvent.on(t,"focus",this._onFocus,this).on(t,"blur",this._onBlur,this).on(t,"mousedown",this._onMouseDown,this),this._map.on("focus",this._addHooks,this).on("blur",this._removeHooks,this)},removeHooks:function(){this._removeHooks();var t=this._map._container;d.DomEvent.off(t,"focus",this._onFocus,this).off(t,"blur",this._onBlur,this).off(t,"mousedown",this._onMouseDown,this),this._map.off("focus",this._addHooks,this).off("blur",this._removeHooks,this)},_onMouseDown:function(){if(!this._focused){var t=a.body,e=a.documentElement,i=t.scrollTop||e.scrollTop,o=t.scrollLeft||e.scrollLeft;this._map._container.focus(),s.scrollTo(o,i)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanOffset:function(t){var e,i,o=this._panKeys={},n=this.keyCodes;for(e=0,i=n.left.length;eLeaflet'},initialize:function(t){d.setOptions(this,t),this._attributions={}},onAdd:function(t){for(var e in this._container=d.DomUtil.create("div","leaflet-control-attribution"),d.DomEvent.disableClickPropagation(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return t.on("layeradd",this._onLayerAdd,this).on("layerremove",this._onLayerRemove,this),this._update(),this._container},onRemove:function(t){t.off("layeradd",this._onLayerAdd).off("layerremove",this._onLayerRemove)},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){if(t)return this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this},removeAttribution:function(t){if(t)return this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}},_onLayerAdd:function(t){t.layer.getAttribution&&this.addAttribution(t.layer.getAttribution())},_onLayerRemove:function(t){t.layer.getAttribution&&this.removeAttribution(t.layer.getAttribution())}}),d.Map.mergeOptions({attributionControl:!0}),d.Map.addInitHook((function(){this.options.attributionControl&&(this.attributionControl=(new d.Control.Attribution).addTo(this))})),d.control.attribution=function(t){return new d.Control.Attribution(t)},d.Control.Scale=d.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1},onAdd:function(t){this._map=t;var e="leaflet-control-scale",i=d.DomUtil.create("div",e),o=this.options;return this._addScales(o,e,i),t.on(o.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=d.DomUtil.create("div",e+"-line",i)),t.imperial&&(this._iScale=d.DomUtil.create("div",e+"-line",i))},_update:function(){var t=this._map.getBounds(),e=t.getCenter().lat,i=6378137*Math.PI*Math.cos(e*Math.PI/180)*(t.getNorthEast().lng-t.getSouthWest().lng)/180,o=this._map.getSize(),n=this.options,s=0;o.x>0&&(s=i*(n.maxWidth/o.x)),this._updateScales(n,s)},_updateScales:function(t,e){t.metric&&e&&this._updateMetric(e),t.imperial&&e&&this._updateImperial(e)},_updateMetric:function(t){var e=this._getRoundNum(t);this._mScale.style.width=this._getScaleWidth(e/t)+"px",this._mScale.innerHTML=e<1e3?e+" m":e/1e3+" km"},_updateImperial:function(t){var e,i,o,n=3.2808399*t,s=this._iScale;n>5280?(e=n/5280,i=this._getRoundNum(e),s.style.width=this._getScaleWidth(i/e)+"px",s.innerHTML=i+" mi"):(o=this._getRoundNum(n),s.style.width=this._getScaleWidth(o/n)+"px",s.innerHTML=o+" ft")},_getScaleWidth:function(t){return Math.round(this.options.maxWidth*t)-10},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return e*(i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1)}}),d.control.scale=function(t){return new d.Control.Scale(t)},d.Control.Layers=d.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0},initialize:function(t,e,i){for(var o in d.setOptions(this,i),this._layers={},this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[o],o);for(o in e)this._addLayer(e[o],o,!0)},onAdd:function(t){return this._initLayout(),this._update(),t.on("layeradd",this._onLayerChange,this).on("layerremove",this._onLayerChange,this),this._container},onRemove:function(t){t.off("layeradd",this._onLayerChange,this).off("layerremove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._update(),this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._update(),this},removeLayer:function(t){var e=d.stamp(t);return delete this._layers[e],this._update(),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=d.DomUtil.create("div",t);e.setAttribute("aria-haspopup",!0),d.Browser.touch?d.DomEvent.on(e,"click",d.DomEvent.stopPropagation):d.DomEvent.disableClickPropagation(e).disableScrollPropagation(e);var i=this._form=d.DomUtil.create("form",t+"-list");if(this.options.collapsed){d.Browser.android||d.DomEvent.on(e,"mouseover",this._expand,this).on(e,"mouseout",this._collapse,this);var o=this._layersLink=d.DomUtil.create("a",t+"-toggle",e);o.href="#",o.title="Layers",d.Browser.touch?d.DomEvent.on(o,"click",d.DomEvent.stop).on(o,"click",this._expand,this):d.DomEvent.on(o,"focus",this._expand,this),d.DomEvent.on(i,"click",(function(){setTimeout(d.bind(this._onInputClick,this),0)}),this),this._map.on("click",this._collapse,this)}else this._expand();this._baseLayersList=d.DomUtil.create("div",t+"-base",i),this._separator=d.DomUtil.create("div",t+"-separator",i),this._overlaysList=d.DomUtil.create("div",t+"-overlays",i),e.appendChild(i)},_addLayer:function(t,e,i){var o=d.stamp(t);this._layers[o]={layer:t,name:e,overlay:i},this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex))},_update:function(){if(this._container){this._baseLayersList.innerHTML="",this._overlaysList.innerHTML="";var t,e,i=!1,o=!1;for(t in this._layers)e=this._layers[t],this._addItem(e),o=o||e.overlay,i=i||!e.overlay;this._separator.style.display=o&&i?"":"none"}},_onLayerChange:function(t){var e=this._layers[d.stamp(t.layer)];if(e){this._handlingClick||this._update();var i=e.overlay?"layeradd"===t.type?"overlayadd":"overlayremove":"layeradd"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)}},_createRadioElement:function(t,e){var i='=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var o=this.getZoomScale(e),n=this._getCenterOffset(t)._divideBy(1-1/o),s=this._getCenterLayerPoint()._add(n);return!(!0!==i.animate&&!this.getSize().contains(n))&&(this.fire("movestart").fire("zoomstart"),this._animateZoom(t,e,s,o,null,!0),!0)},_animateZoom:function(t,e,i,o,n,s,a){a||(this._animatingZoom=!0),d.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim"),this._animateToCenter=t,this._animateToZoom=e,d.Draggable&&(d.Draggable._disabled=!0),d.Util.requestAnimFrame((function(){this.fire("zoomanim",{center:t,zoom:e,origin:i,scale:o,delta:n,backwards:s}),setTimeout(d.bind(this._onZoomTransitionEnd,this),250)}),this)},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._animatingZoom=!1,d.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),d.Util.requestAnimFrame((function(){this._resetView(this._animateToCenter,this._animateToZoom,!0,!0),d.Draggable&&(d.Draggable._disabled=!1)}),this))}}:{}),d.TileLayer.include({_animateZoom:function(t){this._animating||(this._animating=!0,this._prepareBgBuffer());var e=this._bgBuffer,i=d.DomUtil.TRANSFORM,o=t.delta?d.DomUtil.getTranslateString(t.delta):e.style[i],n=d.DomUtil.getScaleString(t.scale,t.origin);e.style[i]=t.backwards?n+" "+o:o+" "+n},_endZoomAnim:function(){var t=this._tileContainer,e=this._bgBuffer;t.style.visibility="",t.parentNode.appendChild(t),d.Util.falseFn(e.offsetWidth);var i=this._map.getZoom();(i>this.options.maxZoom||i.5&&o<.5)return t.style.visibility="hidden",void this._stopLoadingImages(t);e.style.visibility="hidden",e.style[d.DomUtil.TRANSFORM]="",this._tileContainer=e,e=this._bgBuffer=t,this._stopLoadingImages(e),clearTimeout(this._clearBgBufferTimer)},_getLoadedTilesPercentage:function(t){var e,i,o=t.getElementsByTagName("img"),n=0;for(e=0,i=o.length;e{"use strict";i.r(e)},434:(t,e,i)=>{var o={"./be.json":656,"./bg.json":242,"./cs.json":435,"./de.json":758,"./el.json":388,"./en.json":38,"./es.json":589,"./et.json":516,"./fr.json":469,"./he.json":146,"./hu.json":450,"./is.json":297,"./it.json":536,"./jp.json":543,"./ko.json":287,"./nl.json":807,"./nn.json":537,"./no.json":950,"./pl.json":893,"./pt.json":253,"./ru.json":112,"./sk.json":211,"./sr.json":424,"./sv.json":116,"./tr.json":619,"./uk.json":613,"./ur.json":810,"./zh-cn.json":867,"./zh-tw.json":803};function n(t){var e=s(t);return i(e)}function s(t){if(!i.o(o,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return o[t]}n.keys=function(){return Object.keys(o)},n.resolve=s,t.exports=n,n.id=434},656:t=>{"use strict";t.exports=JSON.parse('{"name":"Беларуская","lang":"be","messages":{"loading":"Загрузка","wikipedia":"Вікіпедыя","start":"Start Exploring"},"buttons":{"map_overview":"Прагляд мапы","overview":"Прагляд","backtostart":"Вярнуцца ў пачатак","collapse_toggle":"Схаваць мапу","uncollapse_toggle":"Паказаць мапу","swipe_to_navigate":"Swipe to Navigate
OK"}}')},242:t=>{"use strict";t.exports=JSON.parse('{"name":"Български","lang":"bg","messages":{"loading":"Зареждане","wikipedia":"От Уикипедия, свободната енциклопедия","start":"Започнете да разглеждате"},"buttons":{"map_overview":"Преглед на картата","overview":"Преглед","backtostart":"Към началото","collapse_toggle":"Скриване на картата","uncollapse_toggle":"Показване на картата","swipe_to_navigate":"Swipe to Navigate
OK"}}')},435:t=>{"use strict";t.exports=JSON.parse('{"name":"Čeština","lang":"cs","messages":{"loading":"Nahrávání","wikipedia":"Z Wikipedie, svobodné encyklopedie","start":"Prozkoumat"},"buttons":{"map_overview":"Přehledová mapa","overview":"Přehled","backtostart":"Zpět na začátek","collapse_toggle":"Skrýt mapu","uncollapse_toggle":"Zobrazit mapu","swipe_to_navigate":"Swipe to Navigate
OK"}}')},758:t=>{"use strict";t.exports=JSON.parse('{"name":"Deutsch","lang":"de","messages":{"loading":"Daten werden geladen","wikipedia":"von Wikipedia, der freien Enzyklopädie","start":"Explore"},"buttons":{"map_overview":"Kartenübersicht","overview":"Kartenübersicht","backtostart":"Zurück zum Anfang","collapse_toggle":"Karte ausblenden","uncollapse_toggle":"Karte anzeigen","swipe_to_navigate":"Swipe to Navigate
OK"}}')},388:t=>{"use strict";t.exports=JSON.parse('{"name":"Ελληνικά","lang":"el","messages":{"loading":"Φόρτωση","wikipedia":"Από την Wikipedia, την ελεύθερη εγκυκλοπαίδεια","start":"Έναρξη περιήγησης"},"buttons":{"map_overview":"Επισκόπηση χάρτη","overview":"Επισκόπηση","backtostart":"Επιστροφή στην αρχή","collapse_toggle":"Απόκρυψη χάρτη","uncollapse_toggle":"Εμφάνιση χάρτη","swipe_to_navigate":"Κτυπήστε ελαφρά για περιήγηση
OK"}}')},38:t=>{"use strict";t.exports=JSON.parse('{"name":"English","lang":"en","messages":{"loading":"Loading","wikipedia":"From Wikipedia, the free encyclopedia","start":"Start Exploring"},"buttons":{"map_overview":"Map Overview","overview":"Overview","backtostart":"Back To Beginning","collapse_toggle":"Hide Map","uncollapse_toggle":"Show Map","swipe_to_navigate":"Swipe to Navigate
OK"}}')},589:t=>{"use strict";t.exports=JSON.parse('{"name":"Español","lang":"es","messages":{"loading":"cargando","wikipedia":"de Wikipedia, la enciclopedia libre","start":"Explore"},"buttons":{"map_overview":"vista general del mapa","overview":"vista general","backtostart":"volver al comienzo","collapse_toggle":"ocultar mapa","uncollapse_toggle":"mostrar mapa","swipe_to_navigate":"Deslizar para navegar
Entendido"}}')},516:t=>{"use strict";t.exports=JSON.parse('{"name":"eesti","lang":"et","messages":{"loading":"Laadib","wikipedia":"Vikipeedia, vaba entsüklopeedia","start":"Uuri"},"buttons":{"map_overview":"Kaardi ülevaade","overview":"Ülevaade","backtostart":"Tagasi algusesse","collapse_toggle":"Peida kaart","uncollapse_toggle":"Näita kaarti","swipe_to_navigate":"Swipe to Navigate
OK"}}')},469:t=>{"use strict";t.exports=JSON.parse('{"name":"Français","lang":"fr","messages":{"loading":"Chargement","wikipedia":"Extrait de Wikipédia, l\'encyclopédie libre","start":"Explore"},"buttons":{"map_overview":"Vue d\'ensemble de la carte","overview":"Vue d\'ensemble","backtostart":"Retourner au point de départ","collapse_toggle":"Masquer la carte","uncollapse_toggle":"Afficher la carte","swipe_to_navigate":"Faites glisser pour naviguer
OK"}}')},146:t=>{"use strict";t.exports=JSON.parse('{"name":"עברית","lang":"he","direction":"rtl","messages":{"loading":"טוען","wikipedia":"מתוך ויקיפדיה, האנציקלופדיה החופשית","start":"התחל במסע"},"buttons":{"map_overview":"המפה במלואה","overview":"תצוגה מקדימה","backtostart":"חזור להתחלה","collapse_toggle":"הסתר מפה","uncollapse_toggle":"הצג מפה","swipe_to_navigate":"Swipe to Navigate
OK"}}')},450:t=>{"use strict";t.exports=JSON.parse('{"name":"Magyar","lang":"hu","messages":{"loading":"töltés","wikipedia":"Wikipedia","start":"Indítsd"},"buttons":{"map_overview":"teljes térkép","overview":"teljes sztori","backtostart":"vissza az elejére","collapse_toggle":"összecsuk","uncollapse_toggle":"kinyit","swipe_to_navigate":"Húzd el a navigációhoz
OK"}}')},297:t=>{"use strict";t.exports=JSON.parse('{"name":"Icelandic","lang":"is","messages":{"loading":"Hleðsla","wikipedia":"Frá Wikipedia","start":"Hefja"},"buttons":{"map_overview":"Kortayfirlit","overview":"Yfirlit","backtostart":"Hefja aftur","collapse_toggle":"Fela kortið","uncollapse_toggle":"Sýna kortið","swipe_to_navigate":"Strjúktu fyrir valmynd
Allt í lagi"}}')},536:t=>{"use strict";t.exports=JSON.parse('{"name":"Italiano","lang":"it","messages":{"loading":"caricare","wikipedia":"da Wikipedia, la enciclopedia libera","start":"Explore"},"buttons":{"map_overview":"vista generale della mappa","overview":"vista generale","backtostart":"tornare all\' inizio","collapse_toggle":"nascondere mappa","uncollapse_toggle":"mostrare mappa","swipe_to_navigate":"Swipe to Navigate
OK"}}')},543:t=>{"use strict";t.exports=JSON.parse('{"name":"日本語","lang":"jp","messages":{"loading":"ローディング","wikipedia":"フリー百科事典ウィキペディア(Wikipedia)から","start":"Explore"},"buttons":{"map_overview":"概観地図","overview":"概観","backtostart":"初めに戻る","collapse_toggle":"地図を隠す","uncollapse_toggle":"地図を表示","swipe_to_navigate":"Swipe to Navigate
OK"}}')},287:t=>{"use strict";t.exports=JSON.parse('{"name":"한국어","lang":"ko","messages":{"loading":"불러오는중","wikipedia":"위키피디아","start":"시작하기"},"buttons":{"map_overview":"지도 전체보기","overview":"전체보기","backtostart":"되돌아가기","collapse_toggle":"숨기기","uncollapse_toggle":"보이기","swipe_to_navigate":"Swipe to Navigate
OK"}}')},807:t=>{"use strict";t.exports=JSON.parse('{"name":"Nederlands","lang":"nl","messages":{"loading":"Laden","wikipedia":"Van Wikipedia, de gratis encyclopedie","start":"Start Exploring"},"buttons":{"map_overview":"Kaart overzicht","overview":"Overzicht","backtostart":"Terug naar begin","collapse_toggle":"Verberg kaart","uncollapse_toggle":"Toon kaart","swipe_to_navigate":"Swipe to Navigate
OK"}}')},537:t=>{"use strict";t.exports=JSON.parse('{"name":"Norsk nynorsk","lang":"nn","messages":{"loading":"Lastar inn","wikipedia":"Frå Wikipedia, det frie oppslagsverket","start":"Utforsk"},"buttons":{"map_overview":"Sjå oversiktskart","overview":"Oversikt","backtostart":"Til starten","collapse_toggle":"Gøym kartet","uncollapse_toggle":"Vis kartet","swipe_to_navigate":"Swipe to Navigate
OK"}}')},950:t=>{"use strict";t.exports=JSON.parse('{"name":"Norsk","lang":"no","messages":{"loading":"Laster inn","wikipedia":"fra Wikipedia, den frie encyklopedi","start":"Explore"},"buttons":{"map_overview":"Se oversiktskart","overview":"Se oversiktskart","backtostart":"Til begynnelsen","collapse_toggle":"Skjul kartet","uncollapse_toggle":"Vis kartet","swipe_to_navigate":"Swipe to Navigate
OK"}}')},893:t=>{"use strict";t.exports=JSON.parse('{"name":"Polski","lang":"pl","messages":{"loading":"Wczytuję","wikipedia":"z Wikipedii, wolnej encyklopedii","start":"Explore"},"buttons":{"map_overview":"Przeglądaj mapę","overview":"Przeglądaj","backtostart":"Powrót","collapse_toggle":"Ukryj mapę","uncollapse_toggle":"Pokaż mapę","swipe_to_navigate":"Swipe to Navigate
OK"}}')},253:t=>{"use strict";t.exports=JSON.parse('{"name":"Português","lang":"pt","messages":{"loading":"carregando","wikipedia":"de Wikipedia, a enciclopédia livre","start":"início"},"buttons":{"map_overview":"vista geral do mapa","overview":"vista geral","backtostart":"voltar ao início","collapse_toggle":"ocultar mapa","uncollapse_toggle":"mostrar mapa","swipe_to_navigate":"Deslize para navegar
OK"}}')},112:t=>{"use strict";t.exports=JSON.parse('{"name":"Русский","lang":"ru","messages":{"loading":"Загрузка","wikipedia":"Из Википедии, свободной энциклопедии","start":"Начать просмотр"},"buttons":{"map_overview":"Просмотр карты","overview":"Обзор","backtostart":"К началу","collapse_toggle":"Скрыть карту","uncollapse_toggle":"Показать карту","swipe_to_navigate":"Swipe to Navigate
OK"}}')},211:t=>{"use strict";t.exports=JSON.parse('{"name":"Slovenčina","lang":"sk","messages":{"loading":"Nahrávanie","wikipedia":"Z Wikipédie, slobodnej encyklopédie","start":"Preskúmať"},"buttons":{"map_overview":"Prehľadová mapa","overview":"Prehľad","backtostart":"Späť na začiatok","collapse_toggle":"Skryť mapu","uncollapse_toggle":"Zobraziť mapu","swipe_to_navigate":"Navigujte potiahnutím prsta
OK"}}')},424:t=>{"use strict";t.exports=JSON.parse('{"name":"Srpski","lang":"sr","messages":{"loading":"Učitavanje","wikipedia":"Wikipedia","start":"Explore"},"buttons":{"map_overview":"Pregled mapę","backtostart":"Nazad na početak","collapse_toggle":"Sakrij mapu","uncollapse_toggle":"Prikaži mapu","swipe_to_navigate":"Swipe to Navigate
OK"}}')},116:t=>{"use strict";t.exports=JSON.parse('{"name":"Svenska","lang":"sv","messages":{"loading":"Laddar","wikipedia":"Från Wikipedia, den fria encyklopedin","start":"Explore"},"buttons":{"map_overview":"Översiktskarta","overview":"Översikt","backtostart":"Tillbaka till början","collapse_toggle":"Göm kartan","uncollapse_toggle":"Visa kartan","swipe_to_navigate":"Swipe to Navigate
OK"}}')},619:t=>{"use strict";t.exports=JSON.parse('{"name":"Türkçe","lang":"tr","messages":{"loading":"Yükleniyor","wikipedia":"Vikipedi, Özgür Ansiklopedi","start":"Keşfet"},"buttons":{"map_overview":"Genel harita","overview":"Genel harita","backtostart":"Başlangıç menüsüne dön","collapse_toggle":"Menüyü gizle","uncollapse_toggle":"Menüyü göster","swipe_to_navigate":"Dokun ve kaydır
OK"}}')},613:t=>{"use strict";t.exports=JSON.parse('{"name":"Українська","lang":"uk","messages":{"loading":"Завантаження","wikipedia":"З Вікіпедії, вільної енциклопедії","start":"Почати перегляд"},"buttons":{"map_overview":"Перегляд карти","overview":"Огляд","backtostart":"Повернутися до початку","collapse_toggle":"Приховати карту","uncollapse_toggle":"Показати карту","swipe_to_navigate":"Swipe to Navigate
OK"}}')},810:t=>{"use strict";t.exports=JSON.parse('{"name":"Urdu","lang":"ur","direction":"rtl","messages":{"loading":"لوڈ ہو رہا ہے","wikipedia":"ویکیپیڈیا, مفت دستیاب انسائیکلوپیڈیا سے ","start":"دریافت شروع کی جایے "},"buttons":{"map_overview":"نقشے کا جائزہ","overview":"جائزہ","backtostart":"واپس شروع سے","collapse_toggle":"نقشہ غائب","uncollapse_toggle":"نقشہ حاضر","swipe_to_navigate":"Swipe to Navigate
OK"}}')},867:t=>{"use strict";t.exports=JSON.parse('{"name":"中文","lang":"zh-cn","messages":{"loading":"加载中","wikipedia":"来自维基百科,自由的百科全书","start":"Explore"},"buttons":{"map_overview":"地图总览","overview":"总览","backtostart":"回到首页","collapse_toggle":"隐藏地图","uncollapse_toggle":"显示地图","swipe_to_navigate":"Swipe to Navigate
OK"}}')},803:t=>{"use strict";t.exports=JSON.parse('{"name":"正體中文","lang":"zh-tw","messages":{"loading":"載入中","wikipedia":"來自維基百科,自由的百科全書","start":"探索"},"buttons":{"map_overview":"地圖總覽","overview":"總覽","backtostart":"回到首頁","collapse_toggle":"隱藏地圖","uncollapse_toggle":"顯示地圖","swipe_to_navigate":"左右滑動以瀏覽
我知道了"}}')}},e={};function i(o){var n=e[o];if(void 0!==n)return n.exports;var s=e[o]={exports:{}};return t[o](s,s.exports,i),s.exports}i.d=(t,e)=>{for(var o in e)i.o(e,o)&&!i.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";i.r(o),i.d(o,{MediaType:()=>Tt,StamenTileLayer:()=>it,StoryMap:()=>Ot,ZoomifyTileLayer:()=>q,loadCSS:()=>A,setLanguage:()=>W});const t=navigator.userAgent.toLowerCase(),e=document.documentElement,s=-1!==t.indexOf("webkit"),a="ActiveXObject"in window,r=-1!==t.indexOf("phantom"),h=-1!==t.search("android [23]"),l="undefined"!=typeof orientation,c=navigator.msPointerEnabled&&navigator.msMaxTouchPoints&&!window.PointerEvent,d=window.PointerEvent&&navigator.pointerEnabled&&navigator.maxTouchPoints||c,p=a&&"transition"in e.style,_="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!h,u="MozPerspective"in e.style,m="OTransition"in e.style,g=(window.opera,!window.L_NO_TOUCH&&!r&&(d||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch));let f="devicePixelRatio"in window&&window.devicePixelRatio>1;if(!f&&"matchMedia"in window){var v=window.matchMedia("(min-resolution:144dpi)");f=v&&v.matches}a&&document.addEventListener;const y=-1!==t.indexOf("chrome"),w=-1!==t.indexOf("gecko")&&!s&&!window.opera&&!a,b=(t.indexOf("android"),window.L_DISABLE_3D,l),x=(l&&window.opera,!!g),M=!!f,k=function(){var t="portrait";return window.innerWidth>window.innerHeight&&(t="landscape"),Math.abs(window.orientation),trace(t),t};function P(t){for(var e,i=Array.prototype.slice.call(arguments,1),o=0,n=i.length;o'}))}(t)),t.match(/

[\s\S]*?<\/p>/)?t:"

"+t+"

"}const O=function(t){var e={w:0,h:0};return t.w>t.h&&t.h>0?(e.h=t.h,e.w=t.h):(e.w=t.w,e.h=t.w),e},z=function(t){return null!==t.w&&""!==t.w?Math.round(t.w/16*9):null!==t.h&&""!==t.h?Math.round(t.h/9*16):0};function B(t,e,i,o){I.js(t,e,i,o)}function A(t,e,i,o){I.css(t,e,i,o)}let I=new class{constructor(t){this.doc=t,this.pending={},this.queue={css:[],js:[]},this.styleSheets=t.styleSheets,this.env=this.getEnv(),this.head=this.doc.head||this.doc.getElementsByTagName("head")[0],this.pollCount=0}createNode(t,e){var i,o=this.doc.createElement(t);for(i in e)e.hasOwnProperty(i)&&o.setAttribute(i,e[i]);return o}finish(t){var e,i,o=this.pending[t];o&&(e=o.callback,(i=o.urls).shift(),this.pollCount=0,i.length||(e&&e.call(o.context,o.obj),this.pending[t]=null,this.queue[t].length&&this.load(t)))}getEnv(){var t=navigator.userAgent,e={async:!0===this.doc.createElement("script").async};return(e.webkit=/AppleWebKit\//.test(t))||(e.ie=/MSIE/.test(t))||(e.opera=/Opera/.test(t))||(e.gecko=/Gecko\//.test(t))||(e.unknown=!0),e}load(t,e,i,o,n){var s,a,r,h,l,c,d=function(){this.finish(t)}.bind(this),p="css"===t,_=[];if(e)if(e="string"==typeof e?[e]:e.concat(),p||this.env.async||this.env.gecko||this.env.opera)this.queue[t].push({urls:e,callback:i,obj:o,context:n});else for(s=0,a=e.length;s=0;)if(this.styleSheets[t].href===e.urls[0]){this.finish("css");break}this.pollCount+=1,e&&(this.pollCount<200?setTimeout(this.pollWebKit.bind(this),50):this.finish("css"))}}css(t,e,i,o){this.load("css",t,e,i,o)}js(t,e,i,o){this.load("js",t,e,i,o)}}(document);class N{static get(t){return"string"==typeof t?document.getElementById(t):t}static getByClass(t){if(t)return document.getElementsByClassName(t)}static create(t,e,i){var o=document.createElement(t);return o.className=e,i&&i.appendChild(o),o}static createText(t,e){var i=document.createTextNode(t);return e&&e.appendChild(i),i}static getTranslateString(t){return N.TRANSLATE_OPEN+t.x+"px,"+t.y+"px"+N.TRANSLATE_CLOSE}static setPosition(t,e){t._vco_pos=e,Browser.webkit3d?(t.style[N.TRANSFORM]=N.getTranslateString(e),Browser.android&&(t.style["-webkit-perspective"]="1000",t.style["-webkit-backface-visibility"]="hidden")):(t.style.left=e.x+"px",t.style.top=e.y+"px")}static getPosition(t){for(var e={x:0,y:0};t&&!isNaN(t.offsetLeft)&&!isNaN(t.offsetTop);)e.x+=t.offsetLeft,e.y+=t.offsetTop,t=t.offsetParent;return e}static testProp(t){for(var e=document.documentElement.style,i=0;i1?1:t)}mirror(t){return t<.5?easings.sinusoidal(2*t):easings.sinusoidal(1-2*(t-.5))}easeInQuad(t){return t*t}easeOutQuad(t){return t*(2-t)}easeInOutQuad(t){return t<.5?2*t*t:(4-2*t)*t-1}easeInCubic(t){return t*t*t}easeOutCubic(t){return--t*t*t+1}easeInOutCubic(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1}easeInQuart(t){return t*t*t*t}easeOutQuart(t){return 1- --t*t*t*t}easeInOutQuart(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t}easeInQuint(t){return t*t*t*t*t}easeOutQuint(t){return 1+--t*t*t*t*t}easeInOutQuint(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t}}let R=i(38);var j={};function W(t){return j=function(t){var e=i(434)(`./${t}.json`);for(let t in R)e[t]?"object"==typeof R[t]&&(e[t]=Object.assign(R[t],e[t])):e[t]=R[t];return e}(t),j}class H{on(t,e,i){var o=this._vco_events=this._vco_events||{};return o[t]=o[t]||[],o[t].push({action:e,context:i||this}),this}hasEventListeners(t){var e="_vco_events";return e in this&&t in this[e]&&this[e][t].length>0}off(t,e,i){if(!this.hasEventListeners(t))return this;for(var o=0,n=this._vco_events,s=n[t].length;o=0){var i=0,o=this.current_marker;this.current_marker=t;var n=this._markers[this.current_marker];if(this.animator&&this.animator.stop(),this._resetMarkersActive(),n.data.type&&"overview"==n.data.type)this._markerOverview(),e||this._onMarkerChange();else if(n.active(!0),e)n.data.location&&this._viewTo(n.data.location);else{if(n.data.location&&n.data.location.lat)if(i=this._calculateZoomChange(this._getMapCenter(!0),n.location()),this._viewTo(n.data.location,{calculate_zoom:this.options.calculate_zoom,zoom:i}),this.options.line_follows_path){if(this.options.show_history_line&&n.data.real_marker&&this._markers[o].data.real_marker){var s,a=[],r=o;if(rthis.current_marker)for(;r>this.current_marker;)this._markers[r].data.location&&this._markers[r].data.location.lat&&(s={lat:this._markers[r].data.location.lat,lon:this._markers[r].data.location.lon},a.push(s)),r--;a.push({lat:n.data.location.lat,lon:n.data.location.lon}),this._replaceLines(this._line_active,a)}}else this.options.show_history_line&&n.data.real_marker&&this._markers[o].data.real_marker&&this._replaceLines(this._line_active,[{lat:n.data.location.lat,lon:n.data.location.lon},{lat:this._markers[o].data.location.lat,lon:this._markers[o].data.location.lon}]);else this._markerOverview(),e||this._onMarkerChange();this._onMarkerChange()}}}panTo(t,e){this._panTo(t,e)}zoomTo(t,e){this._zoomTo(t,e)}viewTo(t,e){this._viewTo(t,e)}getBoundsZoom(t,e,i,o){this.__getBoundsZoom(t,e,i,o)}markerOverview(){this._markerOverview()}calculateMarkerZooms(){this._calculateMarkerZooms()}createMiniMap(){this._createMiniMap()}setMapOffset(t,e){this.options.map_center_offset.left=t,this.options.map_center_offset.top=e}calculateMinMaxZoom(){for(var t=0;tt&&(this.zoom_min_max.min=t)}initialMapLocation(){this._loaded.data&&this._loaded.map&&(this.goTo(this.options.start_at_slide,!0),this._initialMapLocation())}show(){}hide(){}addTo(t){t.appendChild(this._el.container),this.onAdd()}removeFrom(t){t.removeChild(this._el.container),this.onRemove()}createMarkers(t){this._createMarkers(t)}createMarker(t){this._createMarker(t)}_destroyMarker(t){this._removeMarker(t);for(var e=0;eo||i.y>o;)i=i.divideBy(2).floor(),this._imageSize.push(i),this._gridSize.push(this._getGridSize(i));this._imageSize.reverse(),this._gridSize.reverse(),this.options.maxZoom=this._gridSize.length-1}onAdd(t){L.TileLayer.prototype.onAdd.call(this,t);var e=t.getSize(),i=this._getBestFitZoom(e),o=this._imageSize[i],n=o.x?o.x:0,s=o.y?o.y:0;t.options.crs.pointToLatLng(L.point(n/2,s/2),i)}getZoomifyBounds(t){var e=this._imageSize[0],i=t.options.crs.pointToLatLng(L.point(0,0),0),o=t.options.crs.pointToLatLng(L.point(e.x,e.y),0);return L.latLngBounds(i,o)}getCenterZoom(t){var e=t.getSize(),i=this._getBestFitZoom(e),o=this._imageSize[i],n=o.x?o.x:0,s=o.y?o.y:0,a=t.options.crs.pointToLatLng(L.point(n/2,s/2),i);return{center:a,lat:a.lat,lon:a.lng,zoom:i}}_getGridSize(t){var e=this.options.tileSize,i=t.x?t.x:0,o=t.y?t.y:0;return L.point(Math.ceil(i/e),Math.ceil(o/e))}_getBestFitZoom(t){for(var e,i=this.options.tolerance,o=this._imageSize.length-1;o;){if((e=this._imageSize[o]).x*i=0&&t.x=0&&t.ythis.options.zoomLevelOffset&&this._mainMap.getZoom()this._lastMiniMapZoom?(e=this._mainMap.getZoom()+1,this._miniMap.setZoom(this._miniMap.getZoom()-1)):e=this._mainMap.getZoom():e=o,this._lastMiniMapZoom=this._miniMap.getZoom(),e}_decideMinimized(){return this._userToggledDisplay?this._minimized:this.options.autoToggleDisplay?!!this._mainMap.getBounds().contains(this._miniMap.getBounds()):this._minimized}}L.Map.mergeOptions({miniMapControl:!1}),L.Map.addInitHook((function(){this.options.miniMapControl&&(this.miniMapControl=(new L.Control.MiniMap).addTo(this))})),L.control.minimap=function(t){return new L.Control.MiniMap(t)};class Y{constructor(t,e){this._el={container:{},content_container:{},content:{}},this._marker={},this._icon={},this._custom_icon=!1,this._custom_icon_url="",this._custom_image_icon=!1,this.marker_number=0,this.media_icon_class="",this.timer={},this.data={},this.options={duration:1e3,ease:Z.easeInSpline,width:600,height:600,map_popup:!1},this.animator=null,D(this.options,e),D(this.data,t),this._initLayout()}show(){}hide(){}addTo(t){this._addTo(t)}removeFrom(t){this._removeFrom(t)}updateDisplay(t,e,i){this._updateDisplay(t,e,i)}createMarker(t,e){this._createMarker(t,e)}createPopup(t,e){this._createPopup(t,e)}active(t){this._active(t)}location(){return this._location()}_createMarker(t,e){}_addTo(t){}_removeFrom(t){}_createPopup(t,e){}_active(t){}_location(){return{lat:0,lng:0}}_onMarkerClick(t){this.fire("markerclick",{marker_number:this.marker_number})}_initLayout(){this._createMarker(this.data,this.options)}_updateDisplay(t,e,i){}}T(Y,H);class X extends Y{_createMarker(t,e){if(t.location&&"number"==typeof t.location.lat&&"number"==typeof t.location.lon){this.data.real_marker=!0;var i=e.use_custom_markers||t.location.use_custom_marker;i&&t.location.icon?(this._custom_icon={url:t.location.icon,size:t.location.iconSize||[48,48],anchor:this._customIconAnchor(t.location.iconSize)},this._icon=this._createIcon()):i&&t.location.image?(this._custom_image_icon=t.location.image,this._icon=this._createImage()):this._icon=this._createDefaultIcon(!1),this._marker=new L.marker([t.location.lat,t.location.lon],{title:t.text.headline,icon:this._icon}),this._marker.on("click",this._onMarkerClick,this),e.map_popup&&this._createPopup(t,e)}}_addTo(t){this.data.real_marker&&this._marker.addTo(t)}_createPopup(t,e){}_active(t){this.data.media&&this.data.media.mediatype?this.media_icon_class="vco-mapmarker-icon vco-icon-"+this.data.media.mediatype.type:this.media_icon_class="vco-mapmarker-icon vco-icon-plaintext",this.data.real_marker&&(t?this._marker.setZIndexOffset(100):(clearTimeout(this.timer),this._marker.setZIndexOffset(0)),this._custom_icon?this._icon=this._createIcon():this._custom_image_icon?this._icon=this._createImage(t):this._icon=this._createDefaultIcon(t),this._setIcon())}_createIcon(){return new L.icon({iconUrl:this._custom_icon.url,iconSize:this._custom_icon.size,iconAnchor:this._custom_icon.anchor})}_createImage(t){var e=t?"vco-mapmarker-image-icon-active":"vco-mapmarker-image-icon";return new L.icon({iconUrl:url,iconSize:[48],iconAnchor:[24,48],shadowSize:[68,95],shadowAnchor:[22,94],className:e})}_createDefaultIcon(t){var e=t?"vco-mapmarker-active":"vco-mapmarker";return L.divIcon({className:e+" "+this.media_icon_class,iconAnchor:[10,10]})}_customIconAnchor(t){return t?[.5*t[0],t[1]]:[24,48]}_openPopup(){this._marker.openPopup()}_setIcon(){this._marker.setIcon(this._icon)}_location(){return this.data.real_marker?this._marker.getLatLng():{}}}function $(t,e,i,o){return{url:["https://tiles.stadiamaps.com/tiles/",t=t.replace("-","_"),"/{Z}/{X}/{Y}.",e].join(""),type:e,subdomains:"",minZoom:i,maxZoom:o,attribution:["Leaflet | ",'Map tiles by Stamen Design, served by ','Stadia ','under CC BY 3.0. ','Data by OpenStreetMap, ','under CC BY SA.'].join("")}}let Q={toner:$("stamen_toner","png",0,20),terrain:$("stamen_terrain","jpg",4,18),watercolor:$("stamen_watercolor","jpg",0,16),ch_watercolor:{url:"https://watercolormaps.collection.cooperhewitt.org/tile/watercolor//{z}/{x}/{y}.png",type:"png",subdomains:"",minZoom:0,maxZoom:16,attribution:["Leaflet | ",'Map tiles by Stamen Design, served by ','Cooper Hewitt, Smithsonian Design Museum ','under CC BY 3.0. ','Data by OpenStreetMap, ','under CC BY SA.'].join("")}};function tt(t,e,i){for(var o=et(t),n=0;n StoryMapJS"),this._tile_layer=this._createTileLayer(this.options.map_type),this._tile_layer.on("load",this._onTilesLoaded,this),this._map.addLayer(this._tile_layer),this._image_layer&&this._map.addLayer(this._image_layer),this._line=this._createLine(this._line),this._line.setStyle({color:this.options.line_color_inactive}),this._addLineToMap(this._line),this._line_active=this._createLine(this._line_active),this._line_active.setStyle({opacity:1}),this._addLineToMap(this._line_active),this.options.map_as_image&&(this._line_active.setStyle({opacity:0}),this._line.setStyle({opacity:0}))}_createMiniMap(){this.options.map_as_image&&(this.zoom_min_max.min=0),this.bounds_array||(this.bounds_array=this._getAllMarkersBounds(this._markers)),this._tile_layer_mini=this._createTileLayer(this.options.map_type),this._mini_map=new K(this._tile_layer_mini,{width:150,height:100,position:"topleft",bounds_array:this.bounds_array,zoomLevelFixed:this.zoom_min_max.min,zoomAnimation:!0,aimingRectOptions:{fillColor:"#FFFFFF",color:"#FFFFFF",opacity:.4,weight:1,stroke:!0}}).addTo(this._map),this._mini_map.getContainer().style.backgroundColor=this.options.map_background_color}_createBackgroundMap(t){if(this._image_layer?this._image_layer.clearLayers():(this._image_layer=new L.layerGroup,this._map.addLayer(this._image_layer)),t)for(let s in t){var e,i=t[s],o={x:0,y:0,url:i.src,height:parseInt(i.style.height.split("px")[0]),width:parseInt(i.style.width.split("px")[0]),pos:{start:0,end:0}};if(i.style.left||i.style.top)i.style.left&&(o.x=parseInt(i.style.left.split("px")[0])),i.style.top&&(o.y=parseInt(i.style.top.split("px")[0]));else if(i.style["-webkit-transform"]||i.style.transform||i.style["-ms-transform"]){var n;i.style["-webkit-transform"]?n=i.style["-webkit-transform"].split("3d(")[1].split(", 0)")[0].split(", "):i.style.transform?n=i.style.transform.split("3d(")[1].split(", 0)")[0].split(", "):i.style["-ms-transform"]&&(n=i.style["-ms-transform"].split("3d(")[1].split(", 0)")[0].split(", ")),o.x=parseInt(n[0].split("px")[0]),o.y=parseInt(n[1].split("px")[0])}o.url.match("toner")&&(o.url=o.url.replace("/toner-hybrid/","/toner-lines/"),o.url=o.url.replace("/toner/","/toner-background/")),o.pos.start=this._map.containerPointToLatLng([o.x,o.y]),o.pos.end=this._map.containerPointToLatLng([o.x+o.width,o.y+o.height]),e=new L.imageOverlay(o.url,[o.pos.start,o.pos.end]),this._image_layer.addLayer(e)}}_createTileLayer(t,e){var i=null,o=(e={r:""},"Leaflet | ");t||(t="osm:standard"),"stamen:trees-cabs-crime"==t&&(console.log("stamen:trees-cabs-crime layer no longer available. Using OSM instead"),t="osm"),M&&(e.r="@2x");let n=t.split(":");switch(n[0]){case"mapbox":var s;if(e.attribution=o+"© Mapbox © OpenStreetMap",n.length>2)s="https://api.mapbox.com/styles/v1/"+n[2].substr(9)+"/tiles/256/{z}/{x}/{y}@2x?access_token="+this.options.map_access_token;else s="https://api.tiles.mapbox.com/v4/"+n[1]+"/{z}/{x}/{y}.png?access_token="+this.options.map_access_token;i=new L.TileLayer(s,e);break;case"stadia":var a;n.length>1&&(a=n.slice(1).join(":"),this.options.map_access_token&&(a=`${a}?api_key=${this.options.map_access_token}`)),i=new L.TileLayer(a,e);break;case"stamen":i=new it(n[1]||"toner-lite",e),this._map.getContainer().style.backgroundColor="#FFFFFF";break;case"zoomify":e.width=this.options.zoomify.width,e.height=this.options.zoomify.height,e.tolerance=this.options.zoomify.tolerance||.9,e.attribution=o+this.options.zoomify.attribution,i=new q(this.options.zoomify.path,e);break;case"http":case"https":e.subdomains=this.options.map_subdomains,e.attribution=o+this.options.attribution,i=new L.TileLayer(this.options.map_type,e);break;case"ch-watercolor":e.attribution=o+'Map tiles by Stamen Design, served by Cooper Hewitt, Smithsonian Design Museum under CC BY 3.0. Data by OpenStreetMap, under CC BY SA.',e.type="jpg",e.minZoom=0,e.maxZoom=16,i=new L.TileLayer("https://watercolormaps.collection.cooperhewitt.org/tile/watercolor/{z}/{x}/{y}.jpg",e);break;default:e.subdomains="ab",e.attribution=o+"© OpenStreetMap and contributors, under an open license",i=new L.TileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",e)}return i}_onMapMoveEnd(t){}_onTilesLoaded(t){this._createBackgroundMap(t.target._tiles),this._tile_layer.off("load",this._onTilesLoaded,this)}_onMapZoomed(t){this._map.off("zoomend",this._onMapZoomed,this)}_onMapZoom(t){}_createMarker(t){var e=new X(t,this.options);e.on("markerclick",this._onMarkerClick,this),this._addMarker(e),this._markers.push(e),e.marker_number=this._markers.length-1,this.fire("markerAdded",e)}_addMarker(t){t.addTo(this._map)}_removeMarker(t){}_markerOverview(){var t,e;if(this._line_active.setStyle({opacity:0}),"zoomify"==this.options.map_type&&this.options.map_as_image){var i=this._tile_layer.getCenterZoom(this._map);t=i.center,(this.options.map_center_offset&&0!=this.options.map_center_offset.left||0!=this.options.map_center_offset.top)&&(i.zoom=i.zoom-1,t=this._getMapCenterOffset(t,i.zoom)),this._map.setView(t,i.zoom,{pan:{animate:!0,duration:this.options.duration/1e3,easeLinearity:.1},zoom:{animate:!0,duration:this.options.duration/1e3,easeLinearity:.1}})}else if(this.bounds_array=this._getAllMarkersBounds(this._markers),this.options.map_center_offset&&0!=this.options.map_center_offset.left||0!=this.options.map_center_offset.top){var o=new L.latLngBounds(this.bounds_array);t=o.getCenter(),e=this._map.getBoundsZoom(o),t=this._getMapCenterOffset(t,e-1),this._map.setView(t,e-1,{pan:{animate:!0,duration:this.options.duration/1e3,easeLinearity:.1},zoom:{animate:!0,duration:this.options.duration/1e3,easeLinearity:.1}})}else this._map.fitBounds(this.bounds_array,{padding:[15,15]});this._mini_map&&this._mini_map.minimize()}_getAllMarkersBounds(t){for(var e=[],i=0;i0?this._markers[t-1].location():this._getMapCenter(!0),n=this._calculateZoomChange(e,o),i=tthis.options.skinny_size&&(n-1<=this.zoom_min_max.min?this._mini_map.minimize():this._mini_map.restore())}_getMapLocation(t){return this._map.latLngToContainerPoint(t)}_getMapZoom(){return this._map.getZoom()}_getMapCenter(t){return this._map.getCenter()}_getMapCenterOffset(t,e){var i;return i=this._map.project(t,e).subtract([this.options.map_center_offset.left,this.options.map_center_offset.top]),this._map.unproject(i,e)}_getBoundsZoom(t,e,i){var o=t,n=[3*Math.abs(this.options.map_center_offset.left),3*Math.abs(this.options.map_center_offset.top)];if(i){var s=o.lat+(o.lat-e.lat)/2,a=o.lng+(o.lng-e.lng)/2;o=new L.LatLng(s,a)}var r=new L.LatLngBounds([o,e]);return this.options.less_bounce?this._map.getBoundsZoom(r,!1,n):this._map.getBoundsZoom(r,!0,n)}_getZoomifyZoom(){}_initialMapLocation(){this._map.on("zoomend",this._onMapZoomed,this)}_updateMapDisplay(t,e){if(t){var i=this.options.duration,o=this;e&&(i=e),this.timer&&clearTimeout(this.timer),this.timer=setTimeout((function(){o._refreshMap()}),i)}else this.timer||this._refreshMap();this._mini_map&&this._el.container.offsetWidth1e4&&(this.data.direction="left",e.x>0&&(this.data.direction="right")),Math.abs(e.y)>1e4&&(this.data.direction="up",e.y>0&&(this.data.direction="down")),this._animateMomentum(),i&&this.fire("swipe_"+this.data.direction,this.data)}_animateMomentum(){var t={x:this.data.new_pos.x,y:this.data.new_pos.y},e={duration:this.options.duration,easing:VCO.Ease.easeOutStrong};this.options.enable.y&&((this.options.constraint.top||this.options.constraint.bottom)&&(t.y>this.options.constraint.bottom?t.y=this.options.constraint.bottom:t.ythis.options.constraint.left?t.x=this.options.constraint.left:t.x":j.buttons.collapse_toggle+""):(this.collapsed=!0,this.hide(25),this._el.button_overview.style.display="none",this.fire("collapse",{y:1}),this._el.button_collapse_toggle.innerHTML=b?"":j.buttons.uncollapse_toggle+"")}_initLayout(){this._el.button_overview=N.create("span","vco-menubar-button",this._el.container),st.addListener(this._el.button_overview,"click",this._onButtonOverview,this),this._el.button_backtostart=N.create("span","vco-menubar-button",this._el.container),st.addListener(this._el.button_backtostart,"click",this._onButtonBackToStart,this),this._el.button_collapse_toggle=N.create("span","vco-menubar-button",this._el.container),st.addListener(this._el.button_collapse_toggle,"click",this._onButtonCollapseMap,this),this.options.map_as_image?this._el.button_overview.innerHTML=j.buttons.overview:this._el.button_overview.innerHTML=j.buttons.map_overview,b?(this._el.button_backtostart.innerHTML="",this._el.button_collapse_toggle.innerHTML="",this._el.container.setAttribute("ontouchstart"," ")):(this._el.button_backtostart.innerHTML=j.buttons.backtostart+" ",this._el.button_collapse_toggle.innerHTML=j.buttons.collapse_toggle+""),"landscape"==this.options.layout&&(this._el.button_collapse_toggle.style.display="none")}_initEvents(){}_updateDisplay(t,e,i){t&&(this.options.width=t),e&&(this.options.height=e)}}function rt(t,e){return ht(t,e)}T(at,H,F);const ht=function(){var t=document,e=window,i=e.performance,o=i&&(i.now||i.webkitNow||i.msNow||i.mozNow),n=o?function(){return o.call(i)}:function(){return+new Date},s=t.documentElement,a=!1,r=1e3,h=/^rgb\(|#/,l=/^([+\-])=([\d\.]+)/,c=/^(?:[\+\-]=?)?\d+(?:\.\d+)?(%|in|cm|mm|em|ex|pt|pc|px)$/,d=/rotate\(((?:[+\-]=)?([\-\d\.]+))deg\)/,p=/scale\(((?:[+\-]=)?([\d\.]+))\)/,_=/skew\(((?:[+\-]=)?([\-\d\.]+))deg, ?((?:[+\-]=)?([\-\d\.]+))deg\)/,u=/translate\(((?:[+\-]=)?([\-\d\.]+))px, ?((?:[+\-]=)?([\-\d\.]+))px\)/,m={lineHeight:1,zoom:1,zIndex:1,opacity:1,transform:1},g=function(){var e,i=t.createElement("a").style,o=["webkitTransform","MozTransform","OTransform","msTransform","Transform"];for(e=0;e1e12&&(t=n()),a&&(t=n()),e=i;e--;)w[e](t);w.length&&y(b)}function L(t){var e,i=function(t,e,i){if(Array.prototype.indexOf)return t.indexOf(e);for(i=0;i=0&&(e=w.slice(i+1),w.length=i,w=w.concat(e))}function x(t,e){var i,o={};return(i=t.match(d))&&(o.rotate=O(i[1],e?e.rotate:null)),(i=t.match(p))&&(o.scale=O(i[1],e?e.scale:null)),(i=t.match(_))&&(o.skewx=O(i[1],e?e.skewx:null),o.skewy=O(i[3],e?e.skewy:null)),(i=t.match(u))&&(o.translatex=O(i[1],e?e.translatex:null),o.translatey=O(i[3],e?e.translatey:null)),o}function M(t){var e="";return"rotate"in t&&(e+="rotate("+t.rotate+"deg) "),"scale"in t&&(e+="scale("+t.scale+") "),"translatex"in t&&(e+="translate("+t.translatex+"px,"+t.translatey+"px) "),"skewx"in t&&(e+="skew("+t.skewx+"deg,"+t.skewy+"deg)"),e}function k(t){var e,i,o,n=t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);return(n?(e=n[1],i=n[2],o=n[3],"#"+(1<<24|e<<16|i<<8|o).toString(16).slice(1)):t).replace(/#(\w)(\w)(\w)$/,"#$1$1$2$2$3$3")}function P(t){return t.replace(/-(.)/g,(function(t,e){return e.toUpperCase()}))}function T(t){return"function"==typeof t}function D(t){return Math.sin(t*Math.PI/2)}function S(t,e,i,o,s,a){o=T(o)?o:z.easings[o]||D;var h,l=t||r,c=this,d=a-s,p=n(),_=0,u=0;return h=function t(n){var r=n-p;if(r>l||_)return a=isFinite(a)?a:1,_?u&&e(a):e(a),L(t),i&&i.apply(c);isFinite(a)?e(d*o(r/l)+s):e(o(r/l))},1===w.push(h)&&y(b),{stop:function(t){_=1,u=t,t||(i=null)}}}function C(t,e){var i,o,n=t.length,s=[];for(i=0;i15?15:n<0?0:n,r[o]=n.toString(16);return"#"+r.join("")}(t,i[s][n],o[s][n]):(a=Math.round(((o[s][n]-i[s][n])*t+i[s][n])*r)/r,n in m||(a+=e[s][n]||"px"),a)}function O(t,e,i,o,n){return(i=l.exec(t))?(n=parseFloat(i[2]))&&e+("+"==i[1]?1:-1)*n:parseFloat(t)}function z(t,e){var i,o,n,s=t?s=isFinite(t.length)?t:[t]:[],a=e.complete,r=e.duration,l=e.easing,d=e.bezier,p=[],_=[],u=[],m=[];for(d&&(o=e.left,n=e.top,delete e.right,delete e.bottom,delete e.left,delete e.top),i=s.length;i--;){if(p[i]={},_[i]={},u[i]={},d){var y=v(s[i],"left"),w=v(s[i],"top"),b=[O(T(o)?o(s[i]):o||0,parseFloat(y)),O(T(n)?n(s[i]):n||0,parseFloat(w))];m[i]=T(d)?d(s[i],b):d,m[i].push(b),m[i].unshift([parseInt(y,10),parseInt(w,10)])}for(var L in e){switch(L){case"complete":case"duration":case"easing":case"bezier":continue}var D,z=v(s[i],L),B=T(e[L])?e[L](s[i]):e[L];"string"!=typeof B||!h.test(B)||h.test(z)?(p[i][L]="transform"==L?x(z):"string"==typeof B&&h.test(B)?k(z).slice(1):parseFloat(z),_[i][L]="transform"==L?x(B,p[i][L]):"string"==typeof B&&"#"==B.charAt(0)?k(B).slice(1):O(B,parseFloat(z)),"string"==typeof B&&(D=B.match(c))&&(u[i][L]=D[1])):delete e[L]}}return S.apply(s,[r,function(t,o,n){for(i=s.length;i--;)for(var a in d&&(n=C(m[i],t),s[i].style.left=n[0]+"px",s[i].style.top=n[1]+"px"),e)o=E(t,u,p,_,a,i),"transform"==a?s[i].style[g]=M(o):"opacity"!=a||f?s[i].style[P(a)]=o:s[i].style.filter="alpha(opacity="+100*o+")"},a,l])}return y((function(t){a=t>1e12!=n()>1e12})),z.tween=S,z.getStyle=v,z.bezier=C,z.transform=g,z.parseTransform=x,z.formatTransform=M,z.easings={},z}();class lt{constructor(t,e,i){this._el={container:{},content_container:{},icon:{},title:{},description:{}},this.mediatype={},this.data={title:"Navigation",description:"Description"},this.options={direction:"previous"},this.animator=null,this.animator_position=null,D(this.options,e),D(this.data,t),this._el.container=N.create("div","vco-slidenav-"+this.options.direction),b&&this._el.container.setAttribute("ontouchstart"," "),this._initLayout(),this._initEvents(),i&&i.appendChild(this._el.container)}update(t){this._update(t)}setColor(t){this._el.content_container.className=t?"vco-slidenav-content-container vco-slidenav-inverted":"vco-slidenav-content-container"}updatePosition(t,e,i,o,n,s){var a,r=this,h={duration:i,easing:o,complete:function(){r._onUpdatePositionComplete(s)}},l=n;for(var c in t)t.hasOwnProperty(c)&&(h[c]=e?t[c]+"%":t[c]+"px");this.animator_position&&this.animator_position.stop(),a=h.right?"right":"left",this._el.container.style[a]=e?l+"%":l+"px",this.animator_position=rt(this._el.container,h)}_onUpdatePositionComplete(t){t&&(this._el.container.style.left="",this._el.container.style.right="")}_onMouseClick(){this.fire("clicked",this.options)}_update(t){this.data=D(this.data,t),""!=this.data.title&&(this._el.title.innerHTML=this.data.title),""!=this.data.date&&(this._el.description.innerHTML=this.data.description)}_initLayout(){this._el.content_container=N.create("div","vco-slidenav-content-container",this._el.container),this._el.icon=N.create("div","vco-slidenav-icon",this._el.content_container),this._el.title=N.create("div","vco-slidenav-title",this._el.content_container),this._el.description=N.create("div","vco-slidenav-description",this._el.content_container),this._el.icon.innerHTML=" ",this._update()}_initEvents(){st.addListener(this._el.container,"click",this._onMouseClick,this)}}T(lt,H,F);class ct{constructor(t,e,i){this._el={parent:{},container:{},message_container:{},loading_icon:{},message:{}},this.options={width:600,height:600,message_class:"vco-message",message_icon_class:"vco-loading-icon"},D(this.data,t),D(this.options,e),this._el.container=N.create("div",this.options.message_class),i&&(i.appendChild(this._el.container),this._el.parent=i),this.animator={},this._initLayout(),this._initEvents()}updateMessage(t){this._updateMessage(t)}updateDisplay(t,e){this._updateDisplay(t,e)}_updateMessage(t){this._el.message.innerHTML=t||(j?j.messages.loading:"Loading")}_onMouseClick(){this.fire("clicked",this.options)}_initLayout(){this._el.message_container=N.create("div","vco-message-container",this._el.container),this._el.loading_icon=N.create("div",this.options.message_icon_class,this._el.message_container),this._el.message=N.create("div","vco-message-content",this._el.message_container),this._updateMessage()}_initEvents(){st.addListener(this._el.container,"click",this._onMouseClick,this)}_updateDisplay(t,e,i){}}T(ct,H,F);class dt{constructor(t,e,i){this._el={container:{},content_container:{},content:{},content_item:{},content_link:{},caption:null,credit:null,parent:{},link:null},this.player=null,this.timer=null,this.load_timer=null,this.message=null,this.media_id=null,this._state={loaded:!1,show_meta:!1,media_loaded:!1},this.data={uniqueid:null,url:null,credit:null,caption:null,link:null,link_target:null},this.options={api_key_flickr:"8f2d5becf7b6ba46570741620054b507",credit_height:0,caption_height:0},this.animator={},D(this.options,e),D(this.data,t),this._el.container=N.create("div","vco-media"),this.data.uniqueid&&(this._el.container.id=this.data.uniqueid),this._initLayout(),i&&(i.appendChild(this._el.container),this._el.parent=i)}loadMedia(){var t=this;if(!this._state.loaded)try{this.load_timer=setTimeout((function(){t._loadMedia(),t._state.loaded=!0,t._updateDisplay()}),1200)}catch(t){console.log("Error loading media for ",this._media),console.log(t)}}loadingMessage(){this.message.updateMessage(this._("loading")+" "+this.options.media_name)}updateMediaDisplay(t){this._state.loaded&&(this._updateMediaDisplay(t),b||"portrait"==t||(this._el.content_item.style.maxHeight=this.options.height/2+"px"),this._state.media_loaded&&(this._el.credit&&(this._el.credit.style.width="auto"),this._el.caption&&(this._el.caption.style.width="auto")),w&&(this._el.content_item.offsetWidth>this._el.content_item.offsetHeight&&(this._el.content_item.style.width="100%",this._el.content_item.style.maxWidth="100%"),"portrait"==t&&(this._el.content_item.style.maxHeight="none")),this._state.media_loaded&&(this._el.credit&&(this._el.credit.style.width=this._el.content_item.offsetWidth+"px"),this._el.caption&&(this._el.caption.style.width=this._el.content_item.offsetWidth+"px")))}_loadMedia(){}_updateMediaDisplay(t){}show(){}hide(){}addTo(t){t.appendChild(this._el.container),this.onAdd()}removeFrom(t){t.removeChild(this._el.container),this.onRemove()}updateDisplay(t,e,i){this._updateDisplay(t,e,i)}stopMedia(){this._stopMedia()}loadErrorDisplay(t){this._el.content.removeChild(this._el.content_item),this._el.content_item=N.create("div","vco-media-item vco-media-loaderror",this._el.content),this._el.content_item.innerHTML="

"+t+"

",this.onLoaded(!0)}onLoaded(t){this._state.loaded=!0,this.fire("loaded",this.data),this.message&&this.message.hide(),t||this.showMeta(),this.updateDisplay()}onMediaLoaded(t){this._state.media_loaded=!0,this.fire("media_loaded",this.data),this._el.credit&&(this._el.credit.style.width=this._el.content_item.offsetWidth+"px"),this._el.caption&&(this._el.caption.style.width=this._el.content_item.offsetWidth+"px")}showMeta(t,e){this._state.show_meta=!0,this.data.credit&&""!=this.data.credit&&!this._el.credit&&(this._el.credit=N.create("div","vco-credit",this._el.content_container),this._el.credit.innerHTML=this.data.credit,this.options.credit_height=this._el.credit.offsetHeight),this.data.caption&&""!=this.data.caption&&!this._el.caption&&(this._el.caption=N.create("div","vco-caption",this._el.content_container),this._el.caption.innerHTML=this.data.caption,this.options.caption_height=this._el.caption.offsetHeight)}onAdd(){this.fire("added",this.data)}onRemove(){this.fire("removed",this.data)}_initLayout(){this.message=new ct({},this.options),this.message.addTo(this._el.container),this._el.content_container=N.create("div","vco-media-content-container",this._el.container),this.data.link&&""!=this.data.link?(this._el.link=N.create("a","vco-media-link",this._el.content_container),this._el.link.href=this.data.link,this.data.link_target&&""!=this.data.link_target?this._el.link.target=this.data.link_target:this._el.link.target="_blank",this._el.content=N.create("div","vco-media-content",this._el.link)):this._el.content=N.create("div","vco-media-content",this._el.content_container)}_updateDisplay(t,e,i){t&&(this.options.width=t),e&&(this.options.height=e),i&&(this.options.layout=i),this._el.credit&&(this.options.credit_height=this._el.credit.offsetHeight),this._el.caption&&(this.options.caption_height=this._el.caption.offsetHeight+5),this.updateMediaDisplay(this.options.layout)}_stopMedia(){}}T(dt,H);class pt extends dt{_loadMedia(){var t=this;this.message.updateMessage(j.messages.loading+" "+this.options.media_name),this.data.link?(this._el.content_link=N.create("a","",this._el.content),this._el.content_link.href=this.data.link,this._el.content_link.target="_blank",this._el.content_item=N.create("img","vco-media-item vco-media-image vco-media-shadow",this._el.content_link),this.data.link.match(/\.(jpg|jpeg|png|gif)$/i)&&this._el.content_link.addEventListener("click",(function(t){t.preventDefault(),document.getElementById("lightbox").innerHTML=`\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
`,document.getElementById("lightbox").style.display="block"}))):this._el.content_item=N.create("img","vco-media-item vco-media-image vco-media-shadow",this._el.content),this._el.content_item.addEventListener("load",(function(e){t.onMediaLoaded()})),this._el.content_item.src=this.data.url,this.onLoaded()}_updateMediaDisplay(t){w&&(this._el.content_item.style.width="auto")}}class _t extends dt{_loadMedia(){var t,e=this;this.message.updateMessage(j.messages.loading+" "+this.options.media_name),this.youtube_loaded=!1,this._el.content_item=N.create("div","vco-media-item vco-media-youtube vco-media-shadow",this._el.content),this._el.content_item.id=C(7),t=function(t){var e,i,o,n=[];(e=t.toString()).match("&")?e=e.replace("&","&"):e.match("&")?e=e.replace("&","&"):e.match("&")&&(e=e.replace("&","&")),o=e.slice(e.indexOf("?")+1).split("&");for(var s=0;s")?e.text_array=e.extract.split("

"):e.text_array.push(e.extract);for(var o=0;o"+e.text_array[o+1]);i="

"+e.title+"

",i+=""+j.messages.wikipedia+"",i+=e.text,e.extract.match("REDIRECT")||(this._el.content_item.innerHTML=i,this.onLoaded())}}updateMediaDisplay(){}_updateMediaDisplay(){}}class gt extends dt{_loadMedia(){var t,e=this;this.message.updateMessage(j.messages.loading+" "+this.options.media_name),this._el.content_item=N.create("div","vco-media-item vco-media-iframe vco-media-soundcloud vco-media-shadow",this._el.content),this.media_id=this.data.url,t="https://soundcloud.com/oembed?url="+this.media_id+"&format=json",fetch(t).then((t=>t.json().then((t=>{B("https://w.soundcloud.com/player/api.js",(function(){e.createMedia(t)}))}))))}createMedia(t){this._el.content_item.innerHTML=t.html,this.soundCloudCreated=!0,self.widget=SC.Widget(this._el.content_item.querySelector("iframe")),this.onLoaded()}_stopMedia(){this.soundCloudCreated&&self.widget.pause()}}class ft extends dt{_loadMedia(){var t;this.message.updateMessage(j.messages.loading+" "+this.options.media_name),this._el.content_item=N.create("div","vco-media-item vco-media-iframe vco-media-vimeo vco-media-shadow",this._el.content),this.media_id=this.data.url.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0],t="https://player.vimeo.com/video/"+this.media_id+"?api=1&title=0&byline=0&portrait=0&color=ffffff",this.player=N.create("iframe","",this._el.content_item),this.player.width="100%",this.player.height="100%",this.player.frameBorder="0",this.player.src=t,this.onLoaded()}_updateMediaDisplay(){this._el.content_item.style.height=z({w:this._el.content_item.offsetWidth})+"px"}_stopMedia(){try{this.player.contentWindow.postMessage(JSON.stringify({method:"pause"}),"https://player.vimeo.com")}catch(t){console.log(t)}}}class vt extends dt{_loadMedia(){var t;this.message.updateMessage(j.messages.loading+" "+this.options.media_name),this._el.content_item=N.create("div","vco-media-item vco-media-iframe vco-media-dailymotion",this._el.content),this.data.url.match("video")?this.media_id=this.data.url.split("video/")[1].split(/[?&]/)[0]:this.media_id=this.data.url.split("embed/")[1].split(/[?&]/)[0],t="https://www.dailymotion.com/embed/video/"+this.media_id+"?api=postMessage",this._el.content_item.innerHTML="",this.onLoaded()}_updateMediaDisplay(){this._el.content_item.style.height=z({w:this._el.content_item.offsetWidth})+"px"}_stopMedia(){this._el.content_item.querySelector("iframe").contentWindow.postMessage('{"command":"pause","parameters":[]}',"*")}}class yt extends dt{_loadMedia(){var t;this.message.updateMessage(j.messages.loading+" "+this.options.media_name),this._el.content_item=N.create("div","vco-media-item vco-media-iframe vco-media-vine vco-media-shadow",this._el.content),this.media_id=this.data.url.split("vine.co/v/")[1],t="https://vine.co/v/"+this.media_id+"/embed/simple",this._el.content_item.innerHTML="