diff --git a/static/dist/mapml.js b/static/dist/mapml.js index cd25a2b5..90ca501a 100644 --- a/static/dist/mapml.js +++ b/static/dist/mapml.js @@ -1,2 +1,2 @@ -function t(t){var e,i,n,o;for(i=1,n=arguments.length;i0?Math.floor(t):Math.ceil(t)};function I(t,e,i){return t instanceof z?t:f(t)?new z(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new z(t.x,t.y):new z(t,e,i)}function B(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=N(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>=e.x&&n.x<=i.x,a=o.y>=e.y&&n.y<=i.y;return s&&a},overlaps:function(t){t=N(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>e.x&&n.xe.y&&n.y=n.lat&&i.lat<=o.lat&&e.lng>=n.lng&&i.lng<=o.lng},intersects:function(t){t=O(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=e.lat&&n.lat<=i.lat,a=o.lng>=e.lng&&n.lng<=i.lng;return s&&a},overlaps:function(t){t=O(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>e.lat&&n.late.lng&&n.lng1,St=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",r,e),window.removeEventListener("testPassiveEventSupport",r,e)}catch(t){}return t}(),kt=!!document.createElement("canvas").getContext,At=!(!document.createElementNS||!Y("svg").createSVGRect),zt=!!At&&((K=document.createElement("div")).innerHTML="","http://www.w3.org/2000/svg"===(K.firstChild&&K.firstChild.namespaceURI)),Pt=!At&&function(){try{var t=document.createElement("div");t.innerHTML='';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function It(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Bt={ie:Q,ielt9:tt,edge:et,webkit:it,android:nt,android23:ot,androidStock:at,opera:rt,chrome:lt,gecko:ht,safari:ct,phantom:ut,opera12:dt,win:mt,ie3d:pt,webkit3d:ft,gecko3d:_t,any3d:gt,mobile:yt,mobileWebkit:vt,mobileWebkit3d:bt,msPointer:xt,pointer:Mt,touch:Ct,touchNative:wt,mobileOpera:Lt,mobileGecko:Et,retina:Tt,passiveEvents:St,canvas:kt,svg:At,vml:Pt,inlineSvg:zt,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},Nt=Bt.msPointer?"MSPointerDown":"pointerdown",Rt=Bt.msPointer?"MSPointerMove":"pointermove",Ot=Bt.msPointer?"MSPointerUp":"pointerup",Zt=Bt.msPointer?"MSPointerCancel":"pointercancel",jt={touchstart:Nt,touchmove:Rt,touchend:Ot,touchcancel:Zt},Ft={touchstart:function(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Oe(e);$t(t,e)},touchmove:$t,touchend:$t,touchcancel:$t},qt={},Dt=!1;function Ht(t,e,i){return"touchstart"===e&&(Dt||(document.addEventListener(Nt,Ut,!0),document.addEventListener(Rt,Vt,!0),document.addEventListener(Ot,Gt,!0),document.addEventListener(Zt,Gt,!0),Dt=!0)),Ft[e]?(i=Ft[e].bind(this,i),t.addEventListener(jt[e],i,!1),i):(console.warn("wrong event specified:",e),r)}function Ut(t){qt[t.pointerId]=t}function Vt(t){qt[t.pointerId]&&(qt[t.pointerId]=t)}function Gt(t){delete qt[t.pointerId]}function $t(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in e.touches=[],qt)e.touches.push(qt[i]);e.changedTouches=[e],t(e)}}var Wt,Yt,Xt,Kt,Jt,Qt=fe(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),te=fe(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ee="webkitTransition"===te||"OTransition"===te?te+"End":"transitionend";function ie(t){return"string"==typeof t?document.getElementById(t):t}function ne(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i}function oe(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function se(t){var e=t.parentNode;e&&e.removeChild(t)}function ae(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function re(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function le(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function he(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=me(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function ce(t,e){if(void 0!==t.classList)for(var i=c(e),n=0,o=i.length;n0?2*window.devicePixelRatio:1;function De(t){return Bt.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/qe:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function He(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}var Ue={__proto__:null,on:Te,off:ke,stopPropagation:Be,disableScrollPropagation:Ne,disableClickPropagation:Re,preventDefault:Oe,stop:Ze,getPropagationPath:je,getMousePosition:Fe,getWheelDelta:De,isExternalTarget:He,addListener:Te,removeListener:ke},Ve=A.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=ye(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=C(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;ethis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,O(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=I((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=I(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),s=this.project(t),a=this.getPixelBounds(),r=N([a.min.add(i),a.max.subtract(n)]),l=r.getSize();if(!r.contains(s)){this._enforcingBounds=!0;var h=s.subtract(r.getCenter()),c=r.extend(s).getSize().subtract(l);o.x+=h.x<0?-c.x:c.x,o.y+=h.y<0?-c.y:c.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1}return this},invalidateSize:function(e){if(!this._loaded)return this;e=t({animate:!1,pan:!0},!0===e?{animate:!0}:e);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var o=this.getSize(),s=n.divideBy(2).round(),a=o.divideBy(2).round(),r=s.subtract(a);return r.x||r.y?(e.animate&&e.pan?this.panBy(r):(e.pan&&this._rawPanBy(r),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(i(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:o})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(e){if(e=this._locateOptions=t({timeout:1e4,watch:!1},e),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=i(this._handleGeolocationResponse,this),o=i(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,o,e):navigator.geolocation.getCurrentPosition(n,o,e),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=new Z(t.coords.latitude,t.coords.longitude),i=e.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var o=this.getBoundsZoom(i);this.setView(e,n.maxZoom?Math.min(o,n.maxZoom):o)}var s={latlng:e,bounds:i,timestamp:t.timestamp};for(var a in t.coords)"number"==typeof t.coords[a]&&(s[a]=t.coords[a]);this.fire("locationfound",s)}},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(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),se(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(E(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)se(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i=oe("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=i),i},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new R(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=O(t),i=I(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),a=t.getNorthWest(),r=t.getSouthEast(),l=this.getSize().subtract(i),h=N(this.project(r,n),this.project(a,n)).getSize(),c=Bt.any3d?this.options.zoomSnap:1,u=l.x/h.x,d=l.y/h.y,m=e?Math.max(u,d):Math.min(u,d);return n=this.getScaleZoom(m,n),c&&(n=Math.round(n/(c/100))*(c/100),n=e?Math.ceil(n/c)*c:Math.floor(n/c)*c),Math.max(o,Math.min(s,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new z(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new B(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(j(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(I(t),e)},layerPointToLatLng:function(t){var e=I(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(j(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(j(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(O(t))},distance:function(t,e){return this.options.crs.distance(j(t),j(e))},containerPointToLayerPoint:function(t){return I(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return I(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(I(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(j(t)))},mouseEventToContainerPoint:function(t){return Fe(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=ie(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Te(e,"scroll",this._onScroll,this),this._containerId=o(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Bt.any3d,ce(t,"leaflet-container"+(Bt.touch?" leaflet-touch":"")+(Bt.retina?" leaflet-retina":"")+(Bt.ielt9?" leaflet-oldie":"")+(Bt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=ne(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ge(this._mapPane,new z(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ce(t.markerPane,"leaflet-zoom-hide"),ce(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){ge(this._mapPane,new z(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var o=this._zoom!==e;this._moveStart(o,i)._move(t,e)._moveEnd(o),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((o||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return E(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){ge(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[o(this._container)]=this;var e=t?ke:Te;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),Bt.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){E(this._resizeRequest),this._resizeRequest=C((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],s="mouseout"===e||"mouseover"===e,a=t.target||t.srcElement,r=!1;a;){if((i=this._targets[o(a)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){r=!0;break}if(i&&i.listens(e,!0)){if(s&&!He(a,t))break;if(n.push(i),s)break}if(a===this._container)break;a=a.parentNode}return n.length||r||s||!this.listens(e,!0)||(n=[this]),n},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))){var i=t.type;"mousedown"===i&&Me(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(e,i,n){if("click"===e.type){var o=t({},e);o.type="preclick",this._fireDOMEvent(o,o.type,n)}var s=this._findEventTargets(e,i);if(n){for(var a=[],r=0;r0?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(),n=Bt.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ue(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(i))&&(this.panBy(i,e),!0)},_createAnimProxy:function(){var t=this._proxy=oe("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=Qt,i=this._proxy.style[e];_e(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),i===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){se(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();_e(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=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 n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==i.animate&&!this.getSize().contains(o))&&(C((function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)}),this),!0)},_animateZoom:function(t,e,n,o){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,ce(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:o}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(i(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ue(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function $e(t,e){return new Ge(t,e)}var We=S.extend({options:{position:"topright"},initialize:function(t){u(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return ce(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(se(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Ye=function(t){return new We(t)};Ge.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=oe("div",e+"control-container",this._container);function n(n,o){var s=e+n+" "+e+o;t[n+o]=oe("div",s,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)se(this._controlCorners[t]);se(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Xe=We.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(o(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+o(this),n),this._layerControlInputs.push(e),e.layerId=o(t.layer),Te(e,"click",this._onInputClick,this);var s=document.createElement("span");s.innerHTML=" "+t.name;var a=document.createElement("span");return i.appendChild(a),a.appendChild(e),a.appendChild(s),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){if(!this._preventClick){var t,e,i=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=i.length-1;s>=0;s--)t=i[s],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||o.push(e);for(s=0;s=0;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&ne.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,Te(t,"click",Oe),this.expand();var e=this;setTimeout((function(){ke(t,"click",Oe),e._preventClick=!1}))}}),Ke=We.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=oe("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){var s=oe("a",i,n);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),Re(s),Te(s,"click",Ze),Te(s,"click",o,this),Te(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";ue(this._zoomInButton,e),ue(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(ce(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(ce(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});Ge.mergeOptions({zoomControl:!0}),Ge.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new Ke,this.addControl(this.zoomControl))}));var Je=We.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=oe("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.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=oe("div",e,i)),t.imperial&&(this._iScale=oe("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e,i,n,o=3.2808399*t;o>5280?(e=o/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(n=this._getRoundNum(o),this._updateScale(this._iScale,n+" ft",n/o))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_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)}}),Qe=We.extend({options:{position:"bottomright",prefix:''+(Bt.inlineSvg?' ':"")+"Leaflet"},initialize:function(t){u(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=oe("div","leaflet-control-attribution"),Re(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):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(' ')}}});Ge.mergeOptions({attributionControl:!0}),Ge.addInitHook((function(){this.options.attributionControl&&(new Qe).addTo(this)}));We.Layers=Xe,We.Zoom=Ke,We.Scale=Je,We.Attribution=Qe,Ye.layers=function(t,e,i){return new Xe(t,e,i)},Ye.zoom=function(t){return new Ke(t)},Ye.scale=function(t){return new Je(t)},Ye.attribution=function(t){return new Qe(t)};var ti=S.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});ti.addTo=function(t,e){return t.addHandler(e,this),this};var ei,ii=Bt.touch?"touchstart mousedown":"mousedown",ni=A.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){u(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(Te(this._dragStartTarget,ii,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ni._dragging===this&&this.finishDrag(!0),ke(this._dragStartTarget,ii,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!he(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)ni._dragging===this&&this.finishDrag();else if(!(ni._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(ni._dragging=this,this._preventOutline&&Me(this._element),be(),Wt(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,i=Ce(this._element);this._startPoint=new z(e.clientX,e.clientY),this._startPos=ye(this._element),this._parentScale=Le(i);var n="mousedown"===t.type;Te(document,n?"mousemove":"touchmove",this._onMove,this),Te(document,n?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)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 z(e.clientX,e.clientY)._subtract(this._startPoint);(i.x||i.y)&&(Math.abs(i.x)+Math.abs(i.y)e&&(i.push(t[n]),o=n);ol&&(s=a,l=r);l>i&&(e[s]=1,li(t,e,i,n,s),li(t,e,i,s,o))}function hi(t,e,i,n,o){var s,a,r,l=n?ei:ui(t,i),h=ui(e,i);for(ei=h;;){if(!(l|h))return[t,e];if(l&h)return!1;r=ui(a=ci(t,e,s=l||h,i,o),i),s===l?(t=a,l=r):(e=a,h=r)}}function ci(t,e,i,n,o){var s,a,r=e.x-t.x,l=e.y-t.y,h=n.min,c=n.max;return 8&i?(s=t.x+r*(c.y-t.y)/l,a=c.y):4&i?(s=t.x+r*(h.y-t.y)/l,a=h.y):2&i?(s=c.x,a=t.y+l*(c.x-t.x)/r):1&i&&(s=h.x,a=t.y+l*(h.x-t.x)/r),new z(s,a,o)}function ui(t,e){var i=0;return t.xe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i}function di(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function mi(t,e,i,n){var o,s=e.x,a=e.y,r=i.x-s,l=i.y-a,h=r*r+l*l;return h>0&&((o=((t.x-s)*r+(t.y-a)*l)/h)>1?(s=i.x,a=i.y):o>0&&(s+=r*o,a+=l*o)),r=t.x-s,l=t.y-a,n?r*r+l*l:new z(s,a)}function pi(t){return!f(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}var fi={project:function(t){return new z(t.lng,t.lat)},unproject:function(t){return new Z(t.y,t.x)},bounds:new B([-180,-90],[180,90])},_i={R:6378137,R_MINOR:6356752.314245179,bounds:new B([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,o=this.R_MINOR/i,s=Math.sqrt(1-o*o),a=s*Math.sin(n),r=Math.tan(Math.PI/4-n/2)/Math.pow((1-a)/(1+a),s/2);return n=-i*Math.log(Math.max(r,1e-10)),new z(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,o=this.R_MINOR/n,s=Math.sqrt(1-o*o),a=Math.exp(-t.y/n),r=Math.PI/2-2*Math.atan(a),l=0,h=.1;l<15&&Math.abs(h)>1e-7;l++)e=s*Math.sin(r),e=Math.pow((1-e)/(1+e),s/2),r+=h=Math.PI/2-2*Math.atan(a*e)-r;return new Z(r*i,t.x*i/n)}},gi=t({},D,{code:"EPSG:3395",projection:_i,transformation:function(){var t=.5/(Math.PI*_i.R);return G(t,.5,-t,.5)}()}),yi=t({},D,{code:"EPSG:4326",projection:fi,transformation:G(1/180,1,-1/180,.5)}),vi=t({},q,{projection:fi,transformation:G(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});q.Earth=D,q.EPSG3395=gi,q.EPSG3857=$,q.EPSG900913=W,q.EPSG4326=yi,q.Simple=vi;var bi=A.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[o(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[o(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",(function(){e.off(i,this)}),this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});Ge.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=o(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=o(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return o(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){for(var e=0,i=(t=t?f(t)?t:[t]:[]).length;ethis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()n){l=(s-n)/o,h=[r.x-l*(r.x-a.x),r.y-l*(r.y-a.y)];break}var f=e.unproject(I(h));return j([f.lat+c.lat,f.lng+c.lng])}(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=j(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new R,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return pi(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=pi(t),n=0,o=t.length;n=2&&e[0]instanceof Z&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){zi.prototype._setLatLngs.call(this,t),pi(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return pi(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new z(e,e);if(t=new B(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,o=0,s=this._rings.length;ot.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(h=!h);return h||zi.prototype._containsPoint.call(this,t,!0)}});var Ii=Mi.extend({initialize:function(t,e){u(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,o=f(t)?t:t.features;if(o){for(e=0,i=o.length;e0&&o.push(o[0].slice()),o}function Fi(e,i){return e.feature?t({},e.feature,{geometry:i}):qi(i)}function qi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Di={toGeoJSON:function(t){return Fi(this,{type:"Point",coordinates:Zi(this.getLatLng(),t)})}};Ei.include(Di),ki.include(Di),Si.include(Di),zi.include({toGeoJSON:function(t){var e=!pi(this._latlngs);return Fi(this,{type:(e?"Multi":"")+"LineString",coordinates:ji(this._latlngs,e?1:0,!1,t)})}}),Pi.include({toGeoJSON:function(t){var e=!pi(this._latlngs),i=e&&!pi(this._latlngs[0]),n=ji(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),Fi(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),xi.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(i){e.push(i.toGeoJSON(t).geometry.coordinates)})),Fi(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var i="GeometryCollection"===e,n=[];return this.eachLayer((function(e){if(e.toGeoJSON){var o=e.toGeoJSON(t);if(i)n.push(o.geometry);else{var s=qi(o);"FeatureCollection"===s.type?n.push.apply(n,s.features):n.push(s)}}})),i?Fi(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var Hi=bi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=O(e),u(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ce(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){se(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&re(this._image),this},bringToBack:function(){return this._map&&le(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=O(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:oe("img");ce(e,"leaflet-image-layer"),this._zoomAnimated&&ce(e,"leaflet-zoom-animated"),this.options.className&&ce(e,this.options.className),e.onselectstart=r,e.onmousemove=r,e.onload=i(this.fire,this,"load"),e.onerror=i(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;_e(this._image,i,e)},_reset:function(){var t=this._image,e=new B(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();ge(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){pe(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}});Hi.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:oe("video");if(ce(e,"leaflet-image-layer"),this._zoomAnimated&&ce(e,"leaflet-zoom-animated"),this.options.className&&ce(e,this.options.className),e.onselectstart=r,e.onmousemove=r,e.onloadeddata=i(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),o=[],s=0;s0?o:[e.src]}else{f(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var a=0;ao?(e.height=o+"px",ce(t,s)):ue(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();ge(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var t=this._map,e=parseInt(ne(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,o=new z(this._containerLeft,-i-this._containerBottom);o._add(ye(this._container));var s=t.layerPointToContainerPoint(o),a=I(this.options.autoPanPadding),r=I(this.options.autoPanPaddingTopLeft||a),l=I(this.options.autoPanPaddingBottomRight||a),h=t.getSize(),c=0,u=0;s.x+n+l.x>h.x&&(c=s.x+n-h.x+l.x),s.x-c-r.x<0&&(c=s.x-r.x),s.y+i+l.y>h.y&&(u=s.y+i-h.y+l.y),s.y-u-r.y<0&&(u=s.y-r.y),(c||u)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,u]))}},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Ge.mergeOptions({closePopupOnClick:!0}),Ge.include({openPopup:function(t,e,i){return this._initOverlay(Vi,t,e,i).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),bi.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Vi,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof Mi||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){Ze(t);var e=t.layer||t.target;this._popup._source!==e||e instanceof Ti?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Gi=Ui.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Ui.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Ui.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Ui.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=oe("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+o(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,n=this._map,o=this._container,s=n.latLngToContainerPoint(n.getCenter()),a=n.layerPointToContainerPoint(t),r=this.options.direction,l=o.offsetWidth,h=o.offsetHeight,c=I(this.options.offset),u=this._getAnchor();"top"===r?(e=l/2,i=h):"bottom"===r?(e=l/2,i=0):"center"===r?(e=l/2,i=h/2):"right"===r?(e=0,i=h/2):"left"===r?(e=l,i=h/2):a.xthis.options.maxZoom||in&&this._retainParent(o,s,a,n))},_retainChildren:function(t,e,i,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var a=new z(o,s);a.z=i+1;var r=this._tileCoordsToKey(a),l=this._tiles[r];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),i+1this.options.maxZoom||void 0!==this.options.minZoom&&o1)this._setView(t,i);else{for(var u=o.min.y;u<=o.max.y;u++)for(var d=o.min.x;d<=o.max.x;d++){var m=new z(d,u);if(m.z=this._tileZoom,this._isValidTile(m)){var p=this._tiles[this._tileCoordsToKey(m)];p?p.current=!0:a.push(m)}}if(a.sort((function(t,e){return t.distanceTo(s)-e.distanceTo(s)})),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var f=document.createDocumentFragment();for(d=0;di.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return O(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),o=n.add(i);return[e.unproject(n,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new R(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new z(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(se(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ce(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=r,t.onmousemove=r,Bt.ielt9&&this.options.opacity<1&&pe(t,this.options.opacity)},_addTile:function(t,e){var n=this._getTilePos(t),o=this._tileCoordsToKey(t),s=this.createTile(this._wrapCoords(t),i(this._tileReady,this,t));this._initTile(s),this.createTile.length<2&&C(i(this._tileReady,this,t,null,s)),ge(s,n),this._tiles[o]={el:s,coords:t,current:!0},e.appendChild(s),this.fire("tileloadstart",{tile:s,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var o=this._tileCoordsToKey(t);(n=this._tiles[o])&&(n.loaded=+new Date,this._map._fadeAnimated?(pe(n.el,0),E(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(ce(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Bt.ielt9||!this._map._fadeAnimated?C(this._pruneTiles,this):setTimeout(i(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new z(this._wrapX?a(t.x,this._wrapX):t.x,this._wrapY?a(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new B(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),Yi=Wi.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=u(this,e)).detectRetina&&Bt.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return Te(n,"load",i(this._tileOnLoad,this,e,n)),Te(n,"error",i(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.src=this.getTileUrl(t),n},getTileUrl:function(e){var i={r:Bt.retina?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-e.y;this.options.tms&&(i.y=n),i["-y"]=n}return p(this._url,t(i,this.options))},_tileOnLoad:function(t,e){Bt.ielt9?setTimeout(i(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=r,e.onerror=r,!e.complete)){e.src=g;var i=this._tiles[t].coords;se(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",g),Wi.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==g))return Wi.prototype._tileReady.call(this,t,e,i)}}),Xi=Yi.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(e,i){this._url=e;var n=t({},this.defaultWmsParams);for(var o in i)o in this.options||(n[o]=i[o]);var s=(i=u(this,i)).detectRetina&&Bt.retina?2:1,a=this.getTileSize();n.width=a.x*s,n.height=a.y*s,this.wmsParams=n},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,Yi.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=N(i.project(e[0]),i.project(e[1])),o=n.min,s=n.max,a=(this._wmsVersion>=1.3&&this._crs===yi?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),r=Yi.prototype.getTileUrl.call(this,t);return r+d(this.wmsParams,r,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(e,i){return t(this.wmsParams,e),i||this.redraw(),this}});Yi.WMS=Xi;var Ki=bi.extend({options:{padding:.1},initialize:function(t){u(this,t),o(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),ce(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),s=n.multiplyBy(-i).add(o).subtract(this._map._getNewPixelOrigin(t,e));Bt.any3d?_e(this._container,s,i):ge(this._container,s)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new B(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Ji=Ki.extend({options:{tolerance:0},getEvents:function(){var t=Ki.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Ki.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Te(t,"mousemove",this._onMouseMove,this),Te(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Te(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){E(this._redrawRequest),delete this._ctx,se(this._container),ke(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Ki.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=Bt.retina?2:1;ge(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",Bt.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Ki.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[o(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[o(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,i,n=t.options.dashArray.split(/[, ]+/),o=[];for(i=0;i')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),tn={_initContainer:function(){this._container=oe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Ki.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Qi("shape");ce(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Qi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[o(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;se(e),t.removeInteractiveTarget(e),delete this._layers[o(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e||(e=t._stroke=Qi("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=f(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=Qi("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){re(t._container)},_bringToBack:function(t){le(t._container)}},en=Bt.vml?Qi:Y,nn=Ki.extend({_initContainer:function(){this._container=en("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=en("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){se(this._container),ke(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){Ki.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),ge(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=en("path");t.options.className&&ce(e,t.options.className),t.options.interactive&&ce(e,"leaflet-interactive"),this._updateStyle(t),this._layers[o(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){se(t._path),t.removeInteractiveTarget(t._path),delete this._layers[o(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,X(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){re(t._path)},_bringToBack:function(t){le(t._path)}});Bt.vml&&nn.include(tn),Ge.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&function(t){return Bt.canvas?new Ji(t):null}(t)||function(t){return Bt.svg||Bt.vml?new nn(t):null}(t)}});var on=Pi.extend({initialize:function(t,e){Pi.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=O(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function sn(t,e){return new on(t,e)}nn.create=en,nn.pointsToPath=X,Ii.geometryToLayer=Bi,Ii.coordsToLatLng=Ri,Ii.coordsToLatLngs=Oi,Ii.latLngToCoords=Zi,Ii.latLngsToCoords=ji,Ii.getFeature=Fi,Ii.asFeature=qi,Ge.mergeOptions({boxZoom:!0});var an=ti.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){Te(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){ke(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){se(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Wt(),be(),this._startPoint=this._map.mouseEventToContainerPoint(t),Te(document,{contextmenu:Ze,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=oe("div","leaflet-zoom-box",this._container),ce(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new B(this._point,this._startPoint),i=e.getSize();ge(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(se(this._box),ue(this._container,"leaflet-crosshair")),Yt(),xe(),ke(document,{contextmenu:Ze,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(i(this._resetState,this),0);var e=new R(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Ge.addInitHook("addHandler","boxZoom",an),Ge.mergeOptions({doubleClickZoom:!0});var rn=ti.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(),n=e.options.zoomDelta,o=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});Ge.addInitHook("addHandler","doubleClickZoom",rn),Ge.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ln=ti.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new ni(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}ce(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ue(this._map._container,"leaflet-grab"),ue(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=O(this._map.options.maxBounds);this._offsetLimit=N(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.xe.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,a=Math.abs(o+i)0?s:-s))-e;this._delta=0,this._startTime=null,a&&("center"===t.options.scrollWheelZoom?t.setZoom(e+a):t.setZoomAround(this._lastMousePos,e+a))}});Ge.addInitHook("addHandler","scrollWheelZoom",cn);Ge.mergeOptions({tapHold:Bt.touchNative&&Bt.safari&&Bt.mobile,tapTolerance:15});var un=ti.extend({addHooks:function(){Te(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){ke(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new z(e.clientX,e.clientY),this._holdTimeout=setTimeout(i((function(){this._cancel(),this._isTapValid()&&(Te(document,"touchend",Oe),Te(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))}),this),600),Te(document,"touchend touchcancel contextmenu",this._cancel,this),Te(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){ke(document,"touchend",Oe),ke(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),ke(document,"touchend touchcancel contextmenu",this._cancel,this),ke(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new z(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var i=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});i._simulated=!0,e.target.dispatchEvent(i)}});Ge.addInitHook("addHandler","tapHold",un),Ge.mergeOptions({touchZoom:Bt.touch,bounceAtZoomLimits:!0});var dn=ti.extend({addHooks:function(){ce(this._map._container,"leaflet-touch-zoom"),Te(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ue(this._map._container,"leaflet-touch-zoom"),ke(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Te(document,"touchmove",this._onTouchMove,this),Te(document,"touchend touchcancel",this._onTouchEnd,this),Oe(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),o=e.mouseEventToContainerPoint(t.touches[1]),s=n.distanceTo(o)/this._startDist;if(this._zoom=e.getScaleZoom(s,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoome.getMaxZoom()&&s>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===s)return}else{var a=n._add(o)._divideBy(2)._subtract(this._centerPoint);if(1===s&&0===a.x&&0===a.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),E(this._animRequest);var r=i(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=C(r,this,!0),Oe(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,E(this._animRequest),ke(document,"touchmove",this._onTouchMove,this),ke(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Ge.addInitHook("addHandler","touchZoom",dn),Ge.BoxZoom=an,Ge.DoubleClickZoom=rn,Ge.Drag=ln,Ge.Keyboard=hn,Ge.ScrollWheelZoom=cn,Ge.TapHold=un,Ge.TouchZoom=dn;var mn=6378137,pn=.0066943799901413165,fn=484813681109536e-20,_n=Math.PI/2,gn=1e-10,yn=.017453292519943295,vn=57.29577951308232,bn=Math.PI/4,xn=2*Math.PI,Mn=3.14159265359,wn={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},Cn={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},Ln=/[\s_\-\/\(\)]/g;function En(t,e){if(t[e])return t[e];for(var i,n=Object.keys(t),o=e.toLowerCase().replace(Ln,""),s=-1;++s=this.text.length)return;t=this.text[this.place++]}switch(this.state){case 1:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},In.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(zn.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},In.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=1)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=1,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},In.prototype.number=function(t){if(!Pn.test(t)){if(zn.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},In.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},In.prototype.keyword=function(t){if(An.test(t))this.word+=t;else{if("["===t){var e=[];return e.push(this.word),this.level++,null===this.root?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,void(this.state=1)}if(!zn.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},In.prototype.neutral=function(t){if(kn.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(Pn.test(t))return this.word=t,void(this.state=3);if(!zn.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},In.prototype.output=function(){for(;this.place0?90:-90)):(t.lat0=Rn(t.lat1>0?90:-90),t.lat_ts=t.lat1)}(o),o}function Zn(t){var e=this;if(2===arguments.length){var i=arguments[1];"string"==typeof i?"+"===i.charAt(0)?Zn[t]=Tn(arguments[1]):Zn[t]=On(arguments[1]):Zn[t]=i}else if(1===arguments.length){if(Array.isArray(t))return t.map((function(t){Array.isArray(t)?Zn.apply(e,t):Zn(t)}));if("string"==typeof t){if(t in Zn)return Zn[t]}else"EPSG"in t?Zn["EPSG:"+t.EPSG]=t:"ESRI"in t?Zn["ESRI:"+t.ESRI]=t:"IAU2000"in t?Zn["IAU2000:"+t.IAU2000]=t:console.log(t);return}}!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}(Zn);var jn=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];var Fn=["3857","900913","3785","102113"];function qn(t){if(!function(t){return"string"==typeof t}(t))return t;if(function(t){return t in Zn}(t))return Zn[t];if(function(t){return jn.some((function(e){return t.indexOf(e)>-1}))}(t)){var e=On(t);if(function(t){var e=En(t,"authority");if(e){var i=En(e,"epsg");return i&&Fn.indexOf(i)>-1}}(e))return Zn["EPSG:3857"];var i=function(t){var e=En(t,"extension");if(e)return En(e,"proj4")}(e);return i?Tn(i):e}return function(t){return"+"===t[0]}(t)?Tn(t):void 0}function Dn(t,e){var i,n;if(t=t||{},!e)return t;for(n in e)void 0!==(i=e[n])&&(t[n]=i);return t}function Hn(t,e,i){var n=t*e;return i/Math.sqrt(1-n*n)}function Un(t){return t<0?-1:1}function Vn(t){return Math.abs(t)<=Mn?t:t-Un(t)*xn}function Gn(t,e,i){var n=t*i,o=.5*t;return n=Math.pow((1-n)/(1+n),o),Math.tan(.5*(_n-e))/n}function $n(t,e){for(var i,n,o=.5*t,s=_n-2*Math.atan(e),a=0;a<=15;a++)if(i=t*Math.sin(s),s+=n=_n-2*Math.atan(e*Math.pow((1-i)/(1+i),o))-s,Math.abs(n)<=1e-10)return s;return-9999}var Wn={init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=Hn(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(t){var e,i,n=t.x,o=t.y;if(o*vn>90&&o*vn<-90&&n*vn>180&&n*vn<-180)return null;if(Math.abs(Math.abs(o)-_n)<=gn)return null;if(this.sphere)e=this.x0+this.a*this.k0*Vn(n-this.long0),i=this.y0+this.a*this.k0*Math.log(Math.tan(bn+.5*o));else{var s=Math.sin(o),a=Gn(this.e,o,s);e=this.x0+this.a*this.k0*Vn(n-this.long0),i=this.y0-this.a*this.k0*Math.log(a)}return t.x=e,t.y=i,t},inverse:function(t){var e,i,n=t.x-this.x0,o=t.y-this.y0;if(this.sphere)i=_n-2*Math.atan(Math.exp(-o/(this.a*this.k0)));else{var s=Math.exp(-o/(this.a*this.k0));if(-9999===(i=$n(this.e,s)))return null}return e=Vn(this.long0+n/(this.a*this.k0)),t.x=e,t.y=i,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]};function Yn(t){return t}var Xn=[Wn,{init:function(){},forward:Yn,inverse:Yn,names:["longlat","identity"]}],Kn={},Jn=[];function Qn(t,e){var i=Jn.length;return t.names?(Jn[i]=t,t.names.forEach((function(t){Kn[t.toLowerCase()]=i})),this):(console.log(e),!0)}var to={start:function(){Xn.forEach(Qn)},add:Qn,get:function(t){if(!t)return!1;var e=t.toLowerCase();return void 0!==Kn[e]&&Jn[Kn[e]]?Jn[Kn[e]]:void 0}},eo={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},io=eo.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};eo.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var no={};no.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},no.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},no.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},no.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},no.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},no.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},no.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},no.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},no.militargeographische_institut={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},no.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},no.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},no.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},no.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},no.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},no.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},no.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},no.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},no.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};var oo={};function so(t){if(0===t.length)return null;var e="@"===t[0];return e&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!e,grid:null,isNull:!0}:{name:t,mandatory:!e,grid:oo[t]||null,isNull:!1}}function ao(t){return t/3600*Math.PI/180}function ro(t,e,i){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(e,i)))}function lo(t){return t.map((function(t){return[ao(t.longitudeShift),ao(t.latitudeShift)]}))}function ho(t,e,i){return{name:ro(t,e+8,e+16).trim(),parent:ro(t,e+24,e+24+8).trim(),lowerLatitude:t.getFloat64(e+72,i),upperLatitude:t.getFloat64(e+88,i),lowerLongitude:t.getFloat64(e+104,i),upperLongitude:t.getFloat64(e+120,i),latitudeInterval:t.getFloat64(e+136,i),longitudeInterval:t.getFloat64(e+152,i),gridNodeCount:t.getInt32(e+168,i)}}function co(t,e,i,n){for(var o=e+176,s=[],a=0;a3&&(0===r.datum_params[3]&&0===r.datum_params[4]&&0===r.datum_params[5]&&0===r.datum_params[6]||(r.datum_type=2,r.datum_params[3]*=fn,r.datum_params[4]*=fn,r.datum_params[5]*=fn,r.datum_params[6]=r.datum_params[6]/1e6+1))),a&&(r.datum_type=3,r.grids=a),r.a=i,r.b=n,r.es=o,r.ep2=s,r}(i.datumCode,i.datum_params,s.a,s.b,a.es,a.ep2,r);Dn(this,i),Dn(this,n),this.a=s.a,this.b=s.b,this.rf=s.rf,this.sphere=s.sphere,this.es=a.es,this.e=a.e,this.ep2=a.ep2,this.datum=l,this.init(),e(null,this)}else e("Could not get projection name from: "+t)}else e("Could not parse to valid json: "+t)}function mo(t,e,i){var n,o,s,a,r=t.x,l=t.y,h=t.z?t.z:0;if(l<-_n&&l>-1.001*_n)l=-_n;else if(l>_n&&l<1.001*_n)l=_n;else{if(l<-_n)return{x:-1/0,y:-1/0,z:t.z};if(l>_n)return{x:1/0,y:1/0,z:t.z}}return r>Math.PI&&(r-=2*Math.PI),o=Math.sin(l),a=Math.cos(l),s=o*o,{x:((n=i/Math.sqrt(1-e*s))+h)*a*Math.cos(r),y:(n+h)*a*Math.sin(r),z:(n*(1-e)+h)*o}}function po(t,e,i,n){var o,s,a,r,l,h,c,u,d,m,p,f,_,g,y,v=1e-12,b=t.x,x=t.y,M=t.z?t.z:0;if(o=Math.sqrt(b*b+x*x),s=Math.sqrt(b*b+x*x+M*M),o/i1e-24&&_<30);return{x:g,y:Math.atan(p/Math.abs(m)),z:y}}function fo(t){return 1===t||2===t}function _o(t,e,i){if(function(t,e){return t.datum_type===e.datum_type&&!(t.a!==e.a||Math.abs(t.es-e.es)>5e-11)&&(1===t.datum_type?t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]:2!==t.datum_type||t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]&&t.datum_params[3]===e.datum_params[3]&&t.datum_params[4]===e.datum_params[4]&&t.datum_params[5]===e.datum_params[5]&&t.datum_params[6]===e.datum_params[6])}(t,e))return i;if(5===t.datum_type||5===e.datum_type)return i;var n=t.a,o=t.es;if(3===t.datum_type){if(0!==go(t,!1,i))return;n=mn,o=pn}var s=e.a,a=e.b,r=e.es;if(3===e.datum_type&&(s=mn,a=6356752.314,r=pn),o===r&&n===s&&!fo(t.datum_type)&&!fo(e.datum_type))return i;if((i=mo(i,o,n),fo(t.datum_type)&&(i=function(t,e,i){if(1===e)return{x:t.x+i[0],y:t.y+i[1],z:t.z+i[2]};if(2===e){var n=i[0],o=i[1],s=i[2],a=i[3],r=i[4],l=i[5],h=i[6];return{x:h*(t.x-l*t.y+r*t.z)+n,y:h*(l*t.x+t.y-a*t.z)+o,z:h*(-r*t.x+a*t.y+t.z)+s}}}(i,t.datum_type,t.datum_params)),fo(e.datum_type)&&(i=function(t,e,i){if(1===e)return{x:t.x-i[0],y:t.y-i[1],z:t.z-i[2]};if(2===e){var n=i[0],o=i[1],s=i[2],a=i[3],r=i[4],l=i[5],h=i[6],c=(t.x-n)/h,u=(t.y-o)/h,d=(t.z-s)/h;return{x:c+l*u-r*d,y:-l*c+u+a*d,z:r*c-a*u+d}}}(i,e.datum_type,e.datum_params)),i=po(i,r,s,a),3===e.datum_type)&&0!==go(e,!0,i))return;return i}function go(t,e,i){if(null===t.grids||0===t.grids.length)return console.log("Grid shift grids not found"),-1;var n={x:-i.x,y:i.y},o={x:Number.NaN,y:Number.NaN},s=[];t:for(var a=0;an.y||m>n.x||_1e-12&&Math.abs(a.y)>1e-12);if(l<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=Vn(s.x+i.ll[0]),n.y=s.y+i.ll[1]}else isNaN(s.x)||(n.x=t.x+s.x,n.y=t.y+s.y);return n}function vo(t,e){var i,n={x:t.x/e.del[0],y:t.y/e.del[1]},o=Math.floor(n.x),s=Math.floor(n.y),a=n.x-1*o,r=n.y-1*s,l={x:Number.NaN,y:Number.NaN};if(o<0||o>=e.lim[0])return l;if(s<0||s>=e.lim[1])return l;i=s*e.lim[0]+o;var h=e.cvs[i][0],c=e.cvs[i][1];i++;var u=e.cvs[i][0],d=e.cvs[i][1];i+=e.lim[0];var m=e.cvs[i][0],p=e.cvs[i][1];i--;var f=e.cvs[i][0],_=e.cvs[i][1],g=a*r,y=a*(1-r),v=(1-a)*(1-r),b=(1-a)*r;return l.x=v*h+y*u+b*f+g*m,l.y=v*c+y*d+b*_+g*p,l}function bo(t,e,i){var n,o,s,a=i.x,r=i.y,l=i.z||0,h={};for(s=0;s<3;s++)if(!e||2!==s||void 0!==i.z)switch(0===s?(n=a,o=-1!=="ew".indexOf(t.axis[s])?"x":"y"):1===s?(n=r,o=-1!=="ns".indexOf(t.axis[s])?"y":"x"):(n=l,o="z"),t.axis[s]){case"e":case"n":h[o]=n;break;case"w":case"s":h[o]=-n;break;case"u":void 0!==i[o]&&(h.z=n);break;case"d":void 0!==i[o]&&(h.z=-n);break;default:return null}return h}function xo(t){var e={x:t[0],y:t[1]};return t.length>2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e}function Mo(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function wo(t,e,i,n){var o,s=void 0!==(i=Array.isArray(i)?xo(i):{x:i.x,y:i.y,z:i.z,m:i.m}).z;if(function(t){Mo(t.x),Mo(t.y)}(i),t.datum&&e.datum&&function(t,e){return(1===t.datum.datum_type||2===t.datum.datum_type||3===t.datum.datum_type)&&"WGS84"!==e.datumCode||(1===e.datum.datum_type||2===e.datum.datum_type||3===e.datum.datum_type)&&"WGS84"!==t.datumCode}(t,e)&&(i=wo(t,o=new uo("WGS84"),i,n),t=o),n&&"enu"!==t.axis&&(i=bo(t,!1,i)),"longlat"===t.projName)i={x:i.x*yn,y:i.y*yn,z:i.z||0};else if(t.to_meter&&(i={x:i.x*t.to_meter,y:i.y*t.to_meter,z:i.z||0}),!(i=t.inverse(i)))return;if(t.from_greenwich&&(i.x+=t.from_greenwich),i=_o(t.datum,e.datum,i))return e.from_greenwich&&(i={x:i.x-e.from_greenwich,y:i.y,z:i.z||0}),"longlat"===e.projName?i={x:i.x*vn,y:i.y*vn,z:i.z||0}:(i=e.forward(i),e.to_meter&&(i={x:i.x/e.to_meter,y:i.y/e.to_meter,z:i.z||0})),n&&"enu"!==e.axis?bo(e,!0,i):(i&&!s&&delete i.z,i)}uo.projections=to,uo.projections.start();var Co=uo("WGS84");function Lo(t,e,i,n){var o,s,a;return Array.isArray(i)?(o=wo(t,e,i,n)||{x:NaN,y:NaN},i.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name?"number"==typeof o.z?[o.x,o.y,o.z].concat(i.slice(3)):[o.x,o.y,i[2]].concat(i.slice(3)):[o.x,o.y].concat(i.slice(2)):[o.x,o.y]):(s=wo(t,e,i,n),2===(a=Object.keys(i)).length||a.forEach((function(n){if(void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name){if("x"===n||"y"===n||"z"===n)return}else if("x"===n||"y"===n)return;s[n]=i[n]})),s)}function Eo(t){return t instanceof uo?t:t.oProj?t.oProj:uo(t)}function To(t,e,i){t=Eo(t);var n,o=!1;return void 0===e?(e=t,t=Co,o=!0):(void 0!==e.x||Array.isArray(e))&&(i=e,e=t,t=Co,o=!0),e=Eo(e),i?Lo(t,e,i):(n={forward:function(i,n){return Lo(t,e,i,n)},inverse:function(i,n){return Lo(e,t,i,n)}},o&&(n.oProj=e),n)}var So="AJSAJS",ko="AFAFAF",Ao=65,zo=73,Po=79,Io=86,Bo=90,No={forward:Ro,inverse:function(t){var e=Fo(Ho(t.toUpperCase()));if(e.lat&&e.lon)return[e.lon,e.lat,e.lon,e.lat];return[e.left,e.bottom,e.right,e.top]},toPoint:Oo};function Ro(t,e){return e=e||5,function(t,e){var i="00000"+t.easting,n="00000"+t.northing;return t.zoneNumber+t.zoneLetter+(m=t.easting,p=t.northing,f=t.zoneNumber,_=Do(f),g=Math.floor(m/1e5),y=Math.floor(p/1e5)%20,o=g,s=y,a=_,r=a-1,l=So.charCodeAt(r),h=ko.charCodeAt(r),c=l+o-1,u=h+s,d=!1,c>Bo&&(c=c-Bo+Ao-1,d=!0),(c===zo||lzo||(c>zo||lPo||(c>Po||lBo&&(c=c-Bo+Ao-1),u>Io?(u=u-Io+Ao-1,d=!0):d=!1,(u===zo||hzo||(u>zo||hPo||(u>Po||hIo&&(u=u-Io+Ao-1),String.fromCharCode(c)+String.fromCharCode(u))+i.substr(i.length-5,e)+n.substr(n.length-5,e);var o,s,a,r,l,h,c,u,d;var m,p,f,_,g,y}(function(t){var e,i,n,o,s,a,r,l,h=t.lat,c=t.lon,u=6378137,d=.00669438,m=.9996,p=Zo(h),f=Zo(c);l=Math.floor((c+180)/6)+1,180===c&&(l=60);h>=56&&h<64&&c>=3&&c<12&&(l=32);h>=72&&h<84&&(c>=0&&c<9?l=31:c>=9&&c<21?l=33:c>=21&&c<33?l=35:c>=33&&c<42&&(l=37));r=Zo(6*(l-1)-180+3),e=d/(1-d),i=u/Math.sqrt(1-d*Math.sin(p)*Math.sin(p)),n=Math.tan(p)*Math.tan(p),o=e*Math.cos(p)*Math.cos(p),s=Math.cos(p)*(f-r),a=u*((1-d/4-3*d*d/64-5*d*d*d/256)*p-(3*d/8+3*d*d/32+45*d*d*d/1024)*Math.sin(2*p)+(15*d*d/256+45*d*d*d/1024)*Math.sin(4*p)-35*d*d*d/3072*Math.sin(6*p));var _=m*i*(s+(1-n+o)*s*s*s/6+(5-18*n+n*n+72*o-58*e)*s*s*s*s*s/120)+5e5,g=m*(a+i*Math.tan(p)*(s*s/2+(5-n+9*o+4*o*o)*s*s*s*s/24+(61-58*n+n*n+600*o-330*e)*s*s*s*s*s*s/720));h<0&&(g+=1e7);return{northing:Math.round(g),easting:Math.round(_),zoneNumber:l,zoneLetter:qo(h)}}({lat:t[1],lon:t[0]}),e)}function Oo(t){var e=Fo(Ho(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function Zo(t){return t*(Math.PI/180)}function jo(t){return t/Math.PI*180}function Fo(t){var e=t.northing,i=t.easting,n=t.zoneLetter,o=t.zoneNumber;if(o<0||o>60)return null;var s,a,r,l,h,c,u,d,m,p=.9996,f=6378137,_=.00669438,g=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),y=i-5e5,v=e;n<"N"&&(v-=1e7),u=6*(o-1)-180+3,s=.006739496752268451,m=(d=v/p/6367449.145945056)+(3*g/2-27*g*g*g/32)*Math.sin(2*d)+(21*g*g/16-55*g*g*g*g/32)*Math.sin(4*d)+151*g*g*g/96*Math.sin(6*d),a=f/Math.sqrt(1-_*Math.sin(m)*Math.sin(m)),r=Math.tan(m)*Math.tan(m),l=s*Math.cos(m)*Math.cos(m),h=.99330562*f/Math.pow(1-_*Math.sin(m)*Math.sin(m),1.5),c=y/(a*p);var b=m-a*Math.tan(m)/h*(c*c/2-(5+3*r+10*l-4*l*l-9*s)*c*c*c*c/24+(61+90*r+298*l+45*r*r-1.6983531815716497-3*l*l)*c*c*c*c*c*c/720);b=jo(b);var x,M=(c-(1+2*r+l)*c*c*c/6+(5-2*l+28*r-3*l*l+8*s+24*r*r)*c*c*c*c*c/120)/Math.cos(m);if(M=u+jo(M),t.accuracy){var w=Fo({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});x={top:w.lat,right:w.lon,bottom:b,left:M}}else x={lat:b,lon:M};return x}function qo(t){var e="Z";return 84>=t&&t>=72?e="X":72>t&&t>=64?e="W":64>t&&t>=56?e="V":56>t&&t>=48?e="U":48>t&&t>=40?e="T":40>t&&t>=32?e="S":32>t&&t>=24?e="R":24>t&&t>=16?e="Q":16>t&&t>=8?e="P":8>t&&t>=0?e="N":0>t&&t>=-8?e="M":-8>t&&t>=-16?e="L":-16>t&&t>=-24?e="K":-24>t&&t>=-32?e="J":-32>t&&t>=-40?e="H":-40>t&&t>=-48?e="G":-48>t&&t>=-56?e="F":-56>t&&t>=-64?e="E":-64>t&&t>=-72?e="D":-72>t&&t>=-80&&(e="C"),e}function Do(t){var e=t%6;return 0===e&&(e=6),e}function Ho(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var e,i=t.length,n=null,o="",s=0;!/[A-Z]/.test(e=t.charAt(s));){if(s>=2)throw"MGRSPoint bad conversion from: "+t;o+=e,s++}var a=parseInt(o,10);if(0===s||s+3>i)throw"MGRSPoint bad conversion from: "+t;var r=t.charAt(s++);if(r<="A"||"B"===r||"Y"===r||r>="Z"||"I"===r||"O"===r)throw"MGRSPoint zone letter "+r+" not handled: "+t;n=t.substring(s,s+=2);for(var l=Do(a),h=function(t,e){var i=So.charCodeAt(e-1),n=1e5,o=!1;for(;i!==t.charCodeAt(0);){if(++i===zo&&i++,i===Po&&i++,i>Bo){if(o)throw"Bad character: "+t;i=Ao,o=!0}n+=1e5}return n}(n.charAt(0),l),c=function(t,e){if(t>"V")throw"MGRSPoint given invalid Northing "+t;var i=ko.charCodeAt(e-1),n=0,o=!1;for(;i!==t.charCodeAt(0);){if(++i===zo&&i++,i===Po&&i++,i>Io){if(o)throw"Bad character: "+t;i=Ao,o=!0}n+=1e5}return n}(n.charAt(1),l);c0&&(d=1e5/Math.pow(10,f),m=t.substring(s,s+f),_=parseFloat(m)*d,p=t.substring(s+f),g=parseFloat(p)*d),{easting:_+h,northing:g+c,zoneLetter:r,zoneNumber:a,accuracy:d}}function Uo(t){var e;switch(t){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+t}function Vo(t,e,i){if(!(this instanceof Vo))return new Vo(t,e,i);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===e){var n=t.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=t,this.y=e,this.z=i||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Vo.fromMGRS=function(t){return new Vo(Oo(t))},Vo.prototype.toMGRS=function(t){return Ro([this.x,this.y],t)};var Go=.046875,$o=.01953125,Wo=.01068115234375;function Yo(t){var e=[];e[0]=1-t*(.25+t*(Go+t*($o+t*Wo))),e[1]=t*(.75-t*(Go+t*($o+t*Wo)));var i=t*t;return e[2]=i*(.46875-t*(.013020833333333334+.007120768229166667*t)),i*=t,e[3]=i*(.3645833333333333-.005696614583333333*t),e[4]=i*t*.3076171875,e}function Xo(t,e,i,n){return i*=e,e*=e,n[0]*t-i*(n[1]+e*(n[2]+e*(n[3]+e*n[4])))}function Ko(t,e,i){for(var n=1/(1-e),o=t,s=20;s;--s){var a=Math.sin(o),r=1-e*a*a;if(o-=r=(Xo(o,a,Math.cos(o),i)-t)*(r*Math.sqrt(r))*n,Math.abs(r)gn?Math.tan(s):0,p=Math.pow(m,2),f=Math.pow(p,2);e=1-this.es*Math.pow(r,2),h/=Math.sqrt(e);var _=Xo(s,r,l,this.en);i=this.a*(this.k0*h*(1+c/6*(1-p+u+c/20*(5-18*p+f+14*u-58*p*u+c/42*(61+179*f-f*p-479*p)))))+this.x0,n=this.a*(this.k0*(_-this.ml0+r*a*h/2*(1+c/12*(5-p+9*u+4*d+c/30*(61+f-58*p+270*u-330*p*u+c/56*(1385+543*f-f*p-3111*p))))))+this.y0}else{var g=l*Math.sin(a);if(Math.abs(Math.abs(g)-1)=1){if(g-1>gn)return 93;n=0}else n=Math.acos(n);s<0&&(n=-n),n=this.a*this.k0*(n-this.lat0)+this.y0}return t.x=i,t.y=n,t},inverse:function(t){var e,i,n,o,s=(t.x-this.x0)*(1/this.a),a=(t.y-this.y0)*(1/this.a);if(this.es)if(i=Ko(e=this.ml0+a/this.k0,this.es,this.en),Math.abs(i)<_n){var r=Math.sin(i),l=Math.cos(i),h=Math.abs(l)>gn?Math.tan(i):0,c=this.ep2*Math.pow(l,2),u=Math.pow(c,2),d=Math.pow(h,2),m=Math.pow(d,2);e=1-this.es*Math.pow(r,2);var p=s*Math.sqrt(e)/this.k0,f=Math.pow(p,2);n=i-(e*=h)*f/(1-this.es)*.5*(1-f/12*(5+3*d-9*c*d+c-4*u-f/30*(61+90*d-252*c*d+45*m+46*c-f/56*(1385+3633*d+4095*m+1574*m*d)))),o=Vn(this.long0+p*(1-f/6*(1+2*d+c-f/20*(5+28*d+24*m+8*c*d+6*c-f/42*(61+662*d+1320*m+720*m*d))))/l)}else n=_n*Un(a),o=0;else{var _=Math.exp(s/this.k0),g=.5*(_-1/_),y=this.lat0+a/this.k0,v=Math.cos(y);e=Math.sqrt((1-Math.pow(v,2))/(1+Math.pow(g,2))),n=Math.asin(e),a<0&&(n=-n),o=0===g&&0===v?0:Vn(Math.atan2(g,v)+this.long0)}return t.x=o,t.y=n,t},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function Qo(t){var e=Math.exp(t);return e=(e-1/e)/2}function ts(t,e){t=Math.abs(t),e=Math.abs(e);var i=Math.max(t,e),n=Math.min(t,e)/(i||1);return i*Math.sqrt(1+Math.pow(n,2))}function es(t){var e=Math.abs(t);return e=function(t){var e=1+t,i=e-1;return 0===i?t:t*Math.log(e)/i}(e*(1+e/(ts(1,e)+1))),t<0?-e:e}function is(t,e){for(var i,n=2*Math.cos(2*e),o=t.length-1,s=t[o],a=0;--o>=0;)i=n*s-a+t[o],a=s,s=i;return e+i*Math.sin(2*e)}function ns(t,e,i){for(var n,o,s=Math.sin(e),a=Math.cos(e),r=Qo(i),l=function(t){var e=Math.exp(t);return(e+1/e)/2}(i),h=2*a*l,c=-2*s*r,u=t.length-1,d=t[u],m=0,p=0,f=0;--u>=0;)n=p,o=m,d=h*(p=d)-n-c*(m=f)+t[u],f=c*p-o+h*m;return[(h=s*l)*d-(c=a*r)*f,h*f+c*d]}var os={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(Jo.init.apply(this),this.forward=Jo.forward,this.inverse=Jo.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),e=t/(2-t),i=e;this.cgb[0]=e*(2+e*(-2/3+e*(e*(116/45+e*(26/45+e*(-2854/675)))-2))),this.cbg[0]=e*(e*(2/3+e*(4/3+e*(-82/45+e*(32/45+e*(4642/4725)))))-2),i*=e,this.cgb[1]=i*(7/3+e*(e*(-227/45+e*(2704/315+e*(2323/945)))-1.6)),this.cbg[1]=i*(5/3+e*(-16/15+e*(-13/9+e*(904/315+e*(-1522/945))))),i*=e,this.cgb[2]=i*(56/15+e*(-136/35+e*(-1262/105+e*(73814/2835)))),this.cbg[2]=i*(-26/15+e*(34/21+e*(1.6+e*(-12686/2835)))),i*=e,this.cgb[3]=i*(4279/630+e*(-332/35+e*(-399572/14175))),this.cbg[3]=i*(1237/630+e*(e*(-24832/14175)-2.4)),i*=e,this.cgb[4]=i*(4174/315+e*(-144838/6237)),this.cbg[4]=i*(-734/315+e*(109598/31185)),i*=e,this.cgb[5]=i*(601676/22275),this.cbg[5]=i*(444337/155925),i=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+i*(1/4+i*(1/64+i/256))),this.utg[0]=e*(e*(2/3+e*(-37/96+e*(1/360+e*(81/512+e*(-96199/604800)))))-.5),this.gtu[0]=e*(.5+e*(-2/3+e*(5/16+e*(41/180+e*(-127/288+e*(7891/37800)))))),this.utg[1]=i*(-1/48+e*(-1/15+e*(437/1440+e*(-46/105+e*(1118711/3870720))))),this.gtu[1]=i*(13/48+e*(e*(557/1440+e*(281/630+e*(-1983433/1935360)))-.6)),i*=e,this.utg[2]=i*(-17/480+e*(37/840+e*(209/4480+e*(-5569/90720)))),this.gtu[2]=i*(61/240+e*(-103/140+e*(15061/26880+e*(167603/181440)))),i*=e,this.utg[3]=i*(-4397/161280+e*(11/504+e*(830251/7257600))),this.gtu[3]=i*(49561/161280+e*(-179/168+e*(6601661/7257600))),i*=e,this.utg[4]=i*(-4583/161280+e*(108847/3991680)),this.gtu[4]=i*(34729/80640+e*(-3418889/1995840)),i*=e,this.utg[5]=i*(-20648693/638668800),this.gtu[5]=.6650675310896665*i;var n=is(this.cbg,this.lat0);this.Zb=-this.Qn*(n+function(t,e){for(var i,n=2*Math.cos(e),o=t.length-1,s=t[o],a=0;--o>=0;)i=n*s-a+t[o],a=s,s=i;return Math.sin(e)*i}(this.gtu,2*n))},forward:function(t){var e=Vn(t.x-this.long0),i=t.y;i=is(this.cbg,i);var n=Math.sin(i),o=Math.cos(i),s=Math.sin(e),a=Math.cos(e);i=Math.atan2(n,a*o),e=Math.atan2(s*o,ts(n,o*a)),e=es(Math.tan(e));var r,l,h=ns(this.gtu,2*i,2*e);return i+=h[0],e+=h[1],Math.abs(e)<=2.623395162778?(r=this.a*(this.Qn*e)+this.x0,l=this.a*(this.Qn*i+this.Zb)+this.y0):(r=1/0,l=1/0),t.x=r,t.y=l,t},inverse:function(t){var e,i,n=(t.x-this.x0)*(1/this.a),o=(t.y-this.y0)*(1/this.a);if(o=(o-this.Zb)/this.Qn,n/=this.Qn,Math.abs(n)<=2.623395162778){var s=ns(this.utg,2*o,2*n);o+=s[0],n+=s[1],n=Math.atan(Qo(n));var a=Math.sin(o),r=Math.cos(o),l=Math.sin(n),h=Math.cos(n);o=Math.atan2(a*h,ts(l,h*r)),e=Vn((n=Math.atan2(l,h*r))+this.long0),i=is(this.cgb,o)}else e=1/0,i=1/0;return t.x=e,t.y=i,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"]};var ss={init:function(){var t=function(t,e){if(void 0===t){if((t=Math.floor(30*(Vn(e)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*yn,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,os.init.apply(this),this.forward=os.forward,this.inverse=os.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function as(t,e){return Math.pow((1-t)/(1+t),e)}var rs={init:function(){var t=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+bn)/(Math.pow(Math.tan(.5*this.lat0+bn),this.C)*as(this.e*t,this.ratexp))},forward:function(t){var e=t.x,i=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*i+bn),this.C)*as(this.e*Math.sin(i),this.ratexp))-_n,t.x=this.C*e,t},inverse:function(t){for(var e=t.x/this.C,i=t.y,n=Math.pow(Math.tan(.5*i+bn)/this.K,1/this.C),o=20;o>0&&(i=2*Math.atan(n*as(this.e*Math.sin(t.y),-.5*this.e))-_n,!(Math.abs(i-t.y)<1e-14));--o)t.y=i;return o?(t.x=e,t.y=i,t):null},names:["gauss"]};var ls={init:function(){rs.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var e,i,n,o;return t.x=Vn(t.x-this.long0),rs.forward.apply(this,[t]),e=Math.sin(t.y),i=Math.cos(t.y),n=Math.cos(t.x),o=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*i*n),t.x=o*i*Math.sin(t.x),t.y=o*(this.cosc0*e-this.sinc0*i*n),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var e,i,n,o,s;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,s=ts(t.x,t.y)){var a=2*Math.atan2(s,this.R2);e=Math.sin(a),i=Math.cos(a),o=Math.asin(i*this.sinc0+t.y*e*this.cosc0/s),n=Math.atan2(t.x*e,s*this.cosc0*i-t.y*this.sinc0*e)}else o=this.phic0,n=0;return t.x=n,t.y=o,rs.inverse.apply(this,[t]),t.x=Vn(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};var hs={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=gn&&(this.k0=.5*(1+Un(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=gn&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=gn&&Math.abs(Math.cos(this.lat_ts))>gn&&(this.k0=.5*this.cons*Hn(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Gn(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=Hn(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-_n,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var e,i,n,o,s,a,r=t.x,l=t.y,h=Math.sin(l),c=Math.cos(l),u=Vn(r-this.long0);return Math.abs(Math.abs(r-this.long0)-Math.PI)<=gn&&Math.abs(l+this.lat0)<=gn?(t.x=NaN,t.y=NaN,t):this.sphere?(e=2*this.k0/(1+this.sinlat0*h+this.coslat0*c*Math.cos(u)),t.x=this.a*e*c*Math.sin(u)+this.x0,t.y=this.a*e*(this.coslat0*h-this.sinlat0*c*Math.cos(u))+this.y0,t):(i=2*Math.atan(this.ssfn_(l,h,this.e))-_n,o=Math.cos(i),n=Math.sin(i),Math.abs(this.coslat0)<=gn?(s=Gn(this.e,l*this.con,this.con*h),a=2*this.a*this.k0*s/this.cons,t.x=this.x0+a*Math.sin(r-this.long0),t.y=this.y0-this.con*a*Math.cos(r-this.long0),t):(Math.abs(this.sinlat0)0?Vn(this.long0+Math.atan2(t.x,-1*t.y)):Vn(this.long0+Math.atan2(t.x,t.y)):Vn(this.long0+Math.atan2(t.x*Math.sin(r),a*this.coslat0*Math.cos(r)-t.y*this.sinlat0*Math.sin(r))),t.x=e,t.y=i,t)}if(Math.abs(this.coslat0)<=gn){if(a<=gn)return i=this.lat0,e=this.long0,t.x=e,t.y=i,t;t.x*=this.con,t.y*=this.con,n=a*this.cons/(2*this.a*this.k0),i=this.con*$n(this.e,n),e=this.con*Vn(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else o=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,a<=gn?s=this.X0:(s=Math.asin(Math.cos(o)*this.sinX0+t.y*Math.sin(o)*this.cosX0/a),e=Vn(this.long0+Math.atan2(t.x*Math.sin(o),a*this.cosX0*Math.cos(o)-t.y*this.sinX0*Math.sin(o)))),i=-1*$n(this.e,Math.tan(.5*(_n+s)));return t.x=e,t.y=i,t},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)","Polar_Stereographic"],ssfn_:function(t,e,i){return e*=i,Math.tan(.5*(_n+t))*Math.pow((1-e)/(1+e),.5*i)}};var cs={init:function(){var t=this.lat0;this.lambda0=this.long0;var e=Math.sin(t),i=this.a,n=1/this.rf,o=2*n-Math.pow(n,2),s=this.e=Math.sqrt(o);this.R=this.k0*i*Math.sqrt(1-o)/(1-o*Math.pow(e,2)),this.alpha=Math.sqrt(1+o/(1-o)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(e/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),r=Math.log(Math.tan(Math.PI/4+t/2)),l=Math.log((1+s*e)/(1-s*e));this.K=a-this.alpha*r+this.alpha*s/2*l},forward:function(t){var e=Math.log(Math.tan(Math.PI/4-t.y/2)),i=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),n=-this.alpha*(e+i)+this.K,o=2*(Math.atan(Math.exp(n))-Math.PI/4),s=this.alpha*(t.x-this.lambda0),a=Math.atan(Math.sin(s)/(Math.sin(this.b0)*Math.tan(o)+Math.cos(this.b0)*Math.cos(s))),r=Math.asin(Math.cos(this.b0)*Math.sin(o)-Math.sin(this.b0)*Math.cos(o)*Math.cos(s));return t.y=this.R/2*Math.log((1+Math.sin(r))/(1-Math.sin(r)))+this.y0,t.x=this.R*a+this.x0,t},inverse:function(t){for(var e=t.x-this.x0,i=t.y-this.y0,n=e/this.R,o=2*(Math.atan(Math.exp(i/this.R))-Math.PI/4),s=Math.asin(Math.cos(this.b0)*Math.sin(o)+Math.sin(this.b0)*Math.cos(o)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(o))),r=this.lambda0+a/this.alpha,l=0,h=s,c=-1e3,u=0;Math.abs(h-c)>1e-7;){if(++u>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+s/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(h))/2)),c=h,h=2*Math.atan(Math.exp(l))-Math.PI/2}return t.x=r,t.y=h,t},names:["somerc"]},us=1e-7;var ds={init:function(){var t,e,i,n,o,s,a,r,l,h,c,u=0,d=0,m=0,p=0,f=0,_=0,g=0;this.no_off=function(t){var e="object"==typeof t.PROJECTION?Object.keys(t.PROJECTION)[0]:t.PROJECTION;return"no_uoff"in t||"no_off"in t||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(e)}(this),this.no_rot="no_rot"in this;var y=!1;"alpha"in this&&(y=!0);var v=!1;if("rectified_grid_angle"in this&&(v=!0),y&&(g=this.alpha),v&&(u=this.rectified_grid_angle*yn),y||v)d=this.longc;else if(m=this.long1,f=this.lat1,p=this.long2,_=this.lat2,Math.abs(f-_)<=us||(t=Math.abs(f))<=us||Math.abs(t-_n)<=us||Math.abs(Math.abs(this.lat0)-_n)<=us||Math.abs(Math.abs(_)-_n)<=us)throw new Error;var b=1-this.es;e=Math.sqrt(b),Math.abs(this.lat0)>gn?(r=Math.sin(this.lat0),i=Math.cos(this.lat0),t=1-this.es*r*r,this.B=i*i,this.B=Math.sqrt(1+this.es*this.B*this.B/b),this.A=this.B*this.k0*e/t,(o=(n=this.B*e/(i*Math.sqrt(t)))*n-1)<=0?o=0:(o=Math.sqrt(o),this.lat0<0&&(o=-o)),this.E=o+=n,this.E*=Math.pow(Gn(this.e,this.lat0,r),this.B)):(this.B=1/e,this.A=this.k0,this.E=n=o=1),y||v?(y?(c=Math.asin(Math.sin(g)/n),v||(u=g)):(c=u,g=Math.asin(n*Math.sin(c))),this.lam0=d-Math.asin(.5*(o-1/o)*Math.tan(c))/this.B):(s=Math.pow(Gn(this.e,f,Math.sin(f)),this.B),a=Math.pow(Gn(this.e,_,Math.sin(_)),this.B),o=this.E/s,l=(a-s)/(a+s),h=((h=this.E*this.E)-a*s)/(h+a*s),(t=m-p)<-Math.pi?p-=xn:t>Math.pi&&(p+=xn),this.lam0=Vn(.5*(m+p)-Math.atan(h*Math.tan(.5*this.B*(m-p))/l)/this.B),c=Math.atan(2*Math.sin(this.B*Vn(m-this.lam0))/(o-1/o)),u=g=Math.asin(n*Math.sin(c))),this.singam=Math.sin(c),this.cosgam=Math.cos(c),this.sinrot=Math.sin(u),this.cosrot=Math.cos(u),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A,this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(g))),this.lat0<0&&(this.u_0=-this.u_0)),o=.5*c,this.v_pole_n=this.ArB*Math.log(Math.tan(bn-o)),this.v_pole_s=this.ArB*Math.log(Math.tan(bn+o))},forward:function(t){var e,i,n,o,s,a,r,l,h={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-_n)>gn){if(e=.5*((s=this.E/Math.pow(Gn(this.e,t.y,Math.sin(t.y)),this.B))-(a=1/s)),i=.5*(s+a),o=Math.sin(this.B*t.x),n=(e*this.singam-o*this.cosgam)/i,Math.abs(Math.abs(n)-1)0?this.v_pole_n:this.v_pole_s,r=this.ArB*t.y;return this.no_rot?(h.x=r,h.y=l):(r-=this.u_0,h.x=l*this.cosrot+r*this.sinrot,h.y=r*this.cosrot-l*this.sinrot),h.x=this.a*h.x+this.x0,h.y=this.a*h.y+this.y0,h},inverse:function(t){var e,i,n,o,s,a,r,l={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(i=t.y,e=t.x):(i=t.x*this.cosrot-t.y*this.sinrot,e=t.y*this.cosrot+t.x*this.sinrot+this.u_0),o=.5*((n=Math.exp(-this.BrA*i))-1/n),s=.5*(n+1/n),r=((a=Math.sin(this.BrA*e))*this.cosgam+o*this.singam)/s,Math.abs(Math.abs(r)-1)gn?this.ns=Math.log(n/r)/Math.log(o/l):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=n/(this.ns*Math.pow(o,this.ns)),this.rh=this.a*this.f0*Math.pow(h,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var e=t.x,i=t.y;Math.abs(2*Math.abs(i)-Math.PI)<=gn&&(i=Un(i)*(_n-2e-10));var n,o,s=Math.abs(Math.abs(i)-_n);if(s>gn)n=Gn(this.e,i,Math.sin(i)),o=this.a*this.f0*Math.pow(n,this.ns);else{if((s=i*this.ns)<=0)return null;o=0}var a=this.ns*Vn(e-this.long0);return t.x=this.k0*(o*Math.sin(a))+this.x0,t.y=this.k0*(this.rh-o*Math.cos(a))+this.y0,t},inverse:function(t){var e,i,n,o,s,a=(t.x-this.x0)/this.k0,r=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(a*a+r*r),i=1):(e=-Math.sqrt(a*a+r*r),i=-1);var l=0;if(0!==e&&(l=Math.atan2(i*a,i*r)),0!==e||this.ns>0){if(i=1/this.ns,n=Math.pow(e/(this.a*this.f0),i),-9999===(o=$n(this.e,n)))return null}else o=-_n;return s=Vn(l/this.ns+this.long0),t.x=s,t.y=o,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]};var ps={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var e,i,n,o,s,a,r,l=t.x,h=t.y,c=Vn(l-this.long0);return e=Math.pow((1+this.e*Math.sin(h))/(1-this.e*Math.sin(h)),this.alfa*this.e/2),i=2*(Math.atan(this.k*Math.pow(Math.tan(h/2+this.s45),this.alfa)/e)-this.s45),n=-c*this.alfa,o=Math.asin(Math.cos(this.ad)*Math.sin(i)+Math.sin(this.ad)*Math.cos(i)*Math.cos(n)),s=Math.asin(Math.cos(i)*Math.sin(n)/Math.cos(o)),a=this.n*s,r=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(o/2+this.s45),this.n),t.y=r*Math.cos(a)/1,t.x=r*Math.sin(a)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var e,i,n,o,s,a,r,l=t.x;t.x=t.y,t.y=l,this.czech||(t.y*=-1,t.x*=-1),s=Math.sqrt(t.x*t.x+t.y*t.y),o=Math.atan2(t.y,t.x)/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/s,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(o)),i=Math.asin(Math.cos(n)*Math.sin(o)/Math.cos(e)),t.x=this.long0-i/this.alfa,a=e,r=0;var h=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-t.y)<1e-10&&(r=1),a=t.y,h+=1}while(0===r&&h<15);return h>=15?null:t},names:["Krovak","krovak"]};function fs(t,e,i,n,o){return t*o-e*Math.sin(2*o)+i*Math.sin(4*o)-n*Math.sin(6*o)}function _s(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function gs(t){return.375*t*(1+.25*t*(1+.46875*t))}function ys(t){return.05859375*t*t*(1+.75*t)}function vs(t){return t*t*t*(35/3072)}function bs(t,e,i){var n=e*i;return t/Math.sqrt(1-n*n)}function xs(t){return Math.abs(t)<_n?t:t-Un(t)*Math.PI}function Ms(t,e,i,n,o){var s,a;s=t/e;for(var r=0;r<15;r++)if(s+=a=(t-(e*s-i*Math.sin(2*s)+n*Math.sin(4*s)-o*Math.sin(6*s)))/(e-2*i*Math.cos(2*s)+4*n*Math.cos(4*s)-6*o*Math.cos(6*s)),Math.abs(a)<=1e-10)return s;return NaN}var ws={init:function(){this.sphere||(this.e0=_s(this.es),this.e1=gs(this.es),this.e2=ys(this.es),this.e3=vs(this.es),this.ml0=this.a*fs(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function(t){var e,i,n=t.x,o=t.y;if(n=Vn(n-this.long0),this.sphere)e=this.a*Math.asin(Math.cos(o)*Math.sin(n)),i=this.a*(Math.atan2(Math.tan(o),Math.cos(n))-this.lat0);else{var s=Math.sin(o),a=Math.cos(o),r=bs(this.a,this.e,s),l=Math.tan(o)*Math.tan(o),h=n*Math.cos(o),c=h*h,u=this.es*a*a/(1-this.es);e=r*h*(1-c*l*(1/6-(8-l+8*u)*c/120)),i=this.a*fs(this.e0,this.e1,this.e2,this.e3,o)-this.ml0+r*s/a*c*(.5+(5-l+6*u)*c/24)}return t.x=e+this.x0,t.y=i+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,i,n=t.x/this.a,o=t.y/this.a;if(this.sphere){var s=o+this.lat0;e=Math.asin(Math.sin(s)*Math.cos(n)),i=Math.atan2(Math.tan(n),Math.cos(s))}else{var a=Ms(this.ml0/this.a+o,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(a)-_n)<=gn)return t.x=this.long0,t.y=_n,o<0&&(t.y*=-1),t;var r=bs(this.a,this.e,Math.sin(a)),l=r*r*r/this.a/this.a*(1-this.es),h=Math.pow(Math.tan(a),2),c=n*this.a/r,u=c*c;e=a-r*Math.tan(a)/l*c*c*(.5-(1+3*h)*c*c/24),i=c*(1-u*(h/3+(1+3*h)*h*u/15))/Math.cos(a)}return t.x=Vn(i+this.long0),t.y=xs(e),t},names:["Cassini","Cassini_Soldner","cass"]};function Cs(t,e){var i;return t>1e-7?(1-t*t)*(e/(1-(i=t*e)*i)-.5/t*Math.log((1-i)/(1+i))):2*e}var Ls=.3333333333333333,Es=.17222222222222222,Ts=.10257936507936508,Ss=.06388888888888888,ks=.0664021164021164,As=.016415012942191543;var zs={init:function(){var t,e=Math.abs(this.lat0);if(Math.abs(e-_n)0)switch(this.qp=Cs(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var e,i=[];return i[0]=t*Ls,e=t*t,i[0]+=e*Es,i[1]=e*Ss,e*=t,i[0]+=e*Ts,i[1]+=e*ks,i[2]=e*As,i}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=Cs(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var e,i,n,o,s,a,r,l,h,c,u=t.x,d=t.y;if(u=Vn(u-this.long0),this.sphere){if(s=Math.sin(d),c=Math.cos(d),n=Math.cos(u),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((i=this.mode===this.EQUIT?1+c*n:1+this.sinph0*s+this.cosph0*c*n)<=gn)return null;e=(i=Math.sqrt(2/i))*c*Math.sin(u),i*=this.mode===this.EQUIT?s:this.cosph0*s-this.sinph0*c*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(d+this.lat0)=0?(e=(h=Math.sqrt(a))*o,i=n*(this.mode===this.S_POLE?h:-h)):e=i=0}}return t.x=this.a*e+this.x0,t.y=this.a*i+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,i,n,o,s,a,r,l=t.x/this.a,h=t.y/this.a;if(this.sphere){var c,u=0,d=0;if((i=.5*(c=Math.sqrt(l*l+h*h)))>1)return null;switch(i=2*Math.asin(i),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(d=Math.sin(i),u=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(c)<=gn?0:Math.asin(h*d/c),l*=d,h=u*c;break;case this.OBLIQ:i=Math.abs(c)<=gn?this.lat0:Math.asin(u*this.sinph0+h*d*this.cosph0/c),l*=d*this.cosph0,h=(u-Math.sin(i)*this.sinph0)*c;break;case this.N_POLE:h=-h,i=_n-i;break;case this.S_POLE:i-=_n}e=0!==h||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(l,h):0}else{if(r=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(l/=this.dd,h*=this.dd,(a=Math.sqrt(l*l+h*h))1&&(t=t>1?1:-1),Math.asin(t)}var Is={init:function(){Math.abs(this.lat1+this.lat2)gn?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var e=t.x,i=t.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var n=Cs(this.e3,this.sin_phi),o=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,s=this.ns0*Vn(e-this.long0),a=o*Math.sin(s)+this.x0,r=this.rh-o*Math.cos(s)+this.y0;return t.x=a,t.y=r,t},inverse:function(t){var e,i,n,o,s,a;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(e=Math.sqrt(t.x*t.x+t.y*t.y),n=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),n=-1),o=0,0!==e&&(o=Math.atan2(n*t.x,n*t.y)),n=e*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(i=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,i)),s=Vn(o/this.ns0+this.long0),t.x=s,t.y=a,t},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(t,e){var i,n,o,s,a=Ps(.5*e);if(t0||Math.abs(s)<=gn?(a=this.x0+1*this.a*i*Math.sin(n)/s,r=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*i*o)/s):(a=this.x0+this.infinity_dist*i*Math.sin(n),r=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*i*o)),t.x=a,t.y=r,t},inverse:function(t){var e,i,n,o,s,a;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(e=Math.sqrt(t.x*t.x+t.y*t.y))?(o=Math.atan2(e,this.rc),i=Math.sin(o),a=Ps((n=Math.cos(o))*this.sin_p14+t.y*i*this.cos_p14/e),s=Math.atan2(t.x*i,e*this.cos_p14*n-t.y*this.sin_p14*i),s=Vn(this.long0+s)):(a=this.phic0,s=0),t.x=s,t.y=a,t},names:["gnom"]};var Ns={init:function(){this.sphere||(this.k0=Hn(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var e,i,n=t.x,o=t.y,s=Vn(n-this.long0);if(this.sphere)e=this.x0+this.a*s*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(o)/Math.cos(this.lat_ts);else{var a=Cs(this.e,Math.sin(o));e=this.x0+this.a*this.k0*s,i=this.y0+this.a*a*.5/this.k0}return t.x=e,t.y=i,t},inverse:function(t){var e,i;return t.x-=this.x0,t.y-=this.y0,this.sphere?(e=Vn(this.long0+t.x/this.a/Math.cos(this.lat_ts)),i=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(i=function(t,e){var i=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(e)-i)<1e-6)return e<0?-1*_n:_n;for(var n,o,s,a,r=Math.asin(.5*e),l=0;l<30;l++)if(o=Math.sin(r),s=Math.cos(r),a=t*o,r+=n=Math.pow(1-a*a,2)/(2*s)*(e/(1-t*t)-o/(1-a*a)+.5/t*Math.log((1-a)/(1+a))),Math.abs(n)<=1e-10)return r;return NaN}(this.e,2*t.y*this.k0/this.a),e=Vn(this.long0+t.x/(this.a*this.k0))),t.x=e,t.y=i,t},names:["cea"]};var Rs={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var e=t.x,i=t.y,n=Vn(e-this.long0),o=xs(i-this.lat0);return t.x=this.x0+this.a*n*this.rc,t.y=this.y0+this.a*o,t},inverse:function(t){var e=t.x,i=t.y;return t.x=Vn(this.long0+(e-this.x0)/(this.a*this.rc)),t.y=xs(this.lat0+(i-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","eqc"]};var Os={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=_s(this.es),this.e1=gs(this.es),this.e2=ys(this.es),this.e3=vs(this.es),this.ml0=this.a*fs(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var e,i,n,o=t.x,s=t.y,a=Vn(o-this.long0);if(n=a*Math.sin(s),this.sphere)Math.abs(s)<=gn?(e=this.a*a,i=-1*this.a*this.lat0):(e=this.a*Math.sin(n)/Math.tan(s),i=this.a*(xs(s-this.lat0)+(1-Math.cos(n))/Math.tan(s)));else if(Math.abs(s)<=gn)e=this.a*a,i=-1*this.ml0;else{var r=bs(this.a,this.e,Math.sin(s))/Math.tan(s);e=r*Math.sin(n),i=this.a*fs(this.e0,this.e1,this.e2,this.e3,s)-this.ml0+r*(1-Math.cos(n))}return t.x=e+this.x0,t.y=i+this.y0,t},inverse:function(t){var e,i,n,o,s,a,r,l,h;if(n=t.x-this.x0,o=t.y-this.y0,this.sphere)if(Math.abs(o+this.a*this.lat0)<=gn)e=Vn(n/this.a+this.long0),i=0;else{var c;for(a=this.lat0+o/this.a,r=n*n/this.a/this.a+a*a,l=a,s=20;s;--s)if(l+=h=-1*(a*(l*(c=Math.tan(l))+1)-l-.5*(l*l+r)*c)/((l-a)/c-1),Math.abs(h)<=gn){i=l;break}e=Vn(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(i))}else if(Math.abs(o+this.ml0)<=gn)i=0,e=Vn(this.long0+n/this.a);else{var u,d,m,p,f;for(a=(this.ml0+o)/this.a,r=n*n/this.a/this.a+a*a,l=a,s=20;s;--s)if(f=this.e*Math.sin(l),u=Math.sqrt(1-f*f)*Math.tan(l),d=this.a*fs(this.e0,this.e1,this.e2,this.e3,l),m=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),l-=h=(a*(u*(p=d/this.a)+1)-p-.5*u*(p*p+r))/(this.es*Math.sin(2*l)*(p*p+r-2*a*p)/(4*u)+(a-p)*(u*m-2/Math.sin(2*l))-m),Math.abs(h)<=gn){i=l;break}u=Math.sqrt(1-this.es*Math.pow(Math.sin(i),2))*Math.tan(i),e=Vn(this.long0+Math.asin(n*u/this.a)/Math.sin(i))}return t.x=e,t.y=i,t},names:["Polyconic","poly"]};var Zs={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var e,i=t.x,n=t.y-this.lat0,o=i-this.long0,s=n/fn*1e-5,a=o,r=1,l=0;for(e=1;e<=10;e++)r*=s,l+=this.A[e]*r;var h,c=l,u=a,d=1,m=0,p=0,f=0;for(e=1;e<=6;e++)h=m*c+d*u,d=d*c-m*u,m=h,p=p+this.B_re[e]*d-this.B_im[e]*m,f=f+this.B_im[e]*d+this.B_re[e]*m;return t.x=f*this.a+this.x0,t.y=p*this.a+this.y0,t},inverse:function(t){var e,i,n=t.x,o=t.y,s=n-this.x0,a=(o-this.y0)/this.a,r=s/this.a,l=1,h=0,c=0,u=0;for(e=1;e<=6;e++)i=h*a+l*r,l=l*a-h*r,h=i,c=c+this.C_re[e]*l-this.C_im[e]*h,u=u+this.C_im[e]*l+this.C_re[e]*h;for(var d=0;d.999999999999&&(i=.999999999999),e=Math.asin(i);var n=Vn(this.long0+t.x/(.900316316158*this.a*Math.cos(e)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),i=(2*e+Math.sin(2*e))/Math.PI,Math.abs(i)>1&&(i=1);var o=Math.asin(i);return t.x=n,t.y=o,t},names:["Mollweide","moll"]};var Ds={init:function(){Math.abs(this.lat1+this.lat2)=0?(i=Math.sqrt(t.x*t.x+t.y*t.y),e=1):(i=-Math.sqrt(t.x*t.x+t.y*t.y),e=-1);var s=0;return 0!==i&&(s=Math.atan2(e*t.x,e*t.y)),this.sphere?(o=Vn(this.long0+s/this.ns),n=xs(this.g-i/this.a),t.x=o,t.y=n,t):(n=Ms(this.g-i/this.a,this.e0,this.e1,this.e2,this.e3),o=Vn(this.long0+s/this.ns),t.x=o,t.y=n,t)},names:["Equidistant_Conic","eqdc"]};var Hs={init:function(){this.R=this.a},forward:function(t){var e,i,n=t.x,o=t.y,s=Vn(n-this.long0);Math.abs(o)<=gn&&(e=this.x0+this.R*s,i=this.y0);var a=Ps(2*Math.abs(o/Math.PI));(Math.abs(s)<=gn||Math.abs(Math.abs(o)-_n)<=gn)&&(e=this.x0,i=o>=0?this.y0+Math.PI*this.R*Math.tan(.5*a):this.y0+Math.PI*this.R*-Math.tan(.5*a));var r=.5*Math.abs(Math.PI/s-s/Math.PI),l=r*r,h=Math.sin(a),c=Math.cos(a),u=c/(h+c-1),d=u*u,m=u*(2/h-1),p=m*m,f=Math.PI*this.R*(r*(u-p)+Math.sqrt(l*(u-p)*(u-p)-(p+l)*(d-p)))/(p+l);s<0&&(f=-f),e=this.x0+f;var _=l+u;return f=Math.PI*this.R*(m*_-r*Math.sqrt((p+l)*(l+1)-_*_))/(p+l),i=o>=0?this.y0+f:this.y0-f,t.x=e,t.y=i,t},inverse:function(t){var e,i,n,o,s,a,r,l,h,c,u,d;return t.x-=this.x0,t.y-=this.y0,u=Math.PI*this.R,s=(n=t.x/u)*n+(o=t.y/u)*o,u=3*(o*o/(l=-2*(a=-Math.abs(o)*(1+s))+1+2*o*o+s*s)+(2*(r=a-2*o*o+n*n)*r*r/l/l/l-9*a*r/l/l)/27)/(h=(a-r*r/3/l)/l)/(c=2*Math.sqrt(-h/3)),Math.abs(u)>1&&(u=u>=0?1:-1),d=Math.acos(u)/3,i=t.y>=0?(-c*Math.cos(d+Math.PI/3)-r/3/l)*Math.PI:-(-c*Math.cos(d+Math.PI/3)-r/3/l)*Math.PI,e=Math.abs(n)2*_n*this.a)return;return i=e/this.a,n=Math.sin(i),o=Math.cos(i),s=this.long0,Math.abs(e)<=gn?a=this.lat0:(a=Ps(o*this.sin_p12+t.y*n*this.cos_p12/e),r=Math.abs(this.lat0)-_n,s=Math.abs(r)<=gn?this.lat0>=0?Vn(this.long0+Math.atan2(t.x,-t.y)):Vn(this.long0-Math.atan2(-t.x,t.y)):Vn(this.long0+Math.atan2(t.x*n,e*this.cos_p12*o-t.y*this.sin_p12*n))),t.x=s,t.y=a,t}return l=_s(this.es),h=gs(this.es),c=ys(this.es),u=vs(this.es),Math.abs(this.sin_p12-1)<=gn?(a=Ms(((d=this.a*fs(l,h,c,u,_n))-(e=Math.sqrt(t.x*t.x+t.y*t.y)))/this.a,l,h,c,u),s=Vn(this.long0+Math.atan2(t.x,-1*t.y)),t.x=s,t.y=a,t):Math.abs(this.sin_p12+1)<=gn?(d=this.a*fs(l,h,c,u,_n),a=Ms(((e=Math.sqrt(t.x*t.x+t.y*t.y))-d)/this.a,l,h,c,u),s=Vn(this.long0+Math.atan2(t.x,t.y)),t.x=s,t.y=a,t):(e=Math.sqrt(t.x*t.x+t.y*t.y),f=Math.atan2(t.x,t.y),m=bs(this.a,this.e,this.sin_p12),_=Math.cos(f),y=-(g=this.e*this.cos_p12*_)*g/(1-this.es),v=3*this.es*(1-y)*this.sin_p12*this.cos_p12*_/(1-this.es),M=1-y*(x=(b=e/m)-y*(1+y)*Math.pow(b,3)/6-v*(1+3*y)*Math.pow(b,4)/24)*x/2-b*x*x*x/6,p=Math.asin(this.sin_p12*Math.cos(x)+this.cos_p12*Math.sin(x)*_),s=Vn(this.long0+Math.asin(Math.sin(f)*Math.sin(x)/Math.cos(p))),w=Math.sin(p),a=Math.atan2((w-this.es*M*this.sin_p12)*Math.tan(p),w*(1-this.es)),t.x=s,t.y=a,t)},names:["Azimuthal_Equidistant","aeqd"]};var Vs={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var e,i,n,o,s,a,r,l=t.x,h=t.y;return n=Vn(l-this.long0),e=Math.sin(h),i=Math.cos(h),o=Math.cos(n),((s=this.sin_p14*e+this.cos_p14*i*o)>0||Math.abs(s)<=gn)&&(a=1*this.a*i*Math.sin(n),r=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*i*o)),t.x=a,t.y=r,t},inverse:function(t){var e,i,n,o,s,a,r;return t.x-=this.x0,t.y-=this.y0,i=Ps((e=Math.sqrt(t.x*t.x+t.y*t.y))/this.a),n=Math.sin(i),o=Math.cos(i),a=this.long0,Math.abs(e)<=gn?(r=this.lat0,t.x=a,t.y=r,t):(r=Ps(o*this.sin_p14+t.y*n*this.cos_p14/e),s=Math.abs(this.lat0)-_n,Math.abs(s)<=gn?(a=this.lat0>=0?Vn(this.long0+Math.atan2(t.x,-t.y)):Vn(this.long0-Math.atan2(-t.x,t.y)),t.x=a,t.y=r,t):(a=Vn(this.long0+Math.atan2(t.x*n,e*this.cos_p14*o-t.y*this.sin_p14*n)),t.x=a,t.y=r,t))},names:["ortho"]},Gs=1,$s=2,Ws=3,Ys=4,Xs=5,Ks=6,Js=1,Qs=2,ta=3,ea=4;function ia(t,e,i,n){var o;return tbn&&o<=_n+bn?(n.value=Qs,o-=_n):o>_n+bn||o<=-(_n+bn)?(n.value=ta,o=o>=0?o-Mn:o+Mn):(n.value=ea,o+=_n)),o}function na(t,e){var i=t+e;return i<-Mn?i+=xn:i>+Mn&&(i-=xn),i}var oa={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=_n-bn/2?this.face=Xs:this.lat0<=-(_n-bn/2)?this.face=Ks:Math.abs(this.long0)<=bn?this.face=Gs:Math.abs(this.long0)<=_n+bn?this.face=this.long0>0?$s:Ys:this.face=Ws,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var e,i,n,o,s,a,r={x:0,y:0},l={value:0};if(t.x-=this.long0,e=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,i=t.x,this.face===Xs)o=_n-e,i>=bn&&i<=_n+bn?(l.value=Js,n=i-_n):i>_n+bn||i<=-(_n+bn)?(l.value=Qs,n=i>0?i-Mn:i+Mn):i>-(_n+bn)&&i<=-bn?(l.value=ta,n=i+_n):(l.value=ea,n=i);else if(this.face===Ks)o=_n+e,i>=bn&&i<=_n+bn?(l.value=Js,n=-i+_n):i=-bn?(l.value=Qs,n=-i):i<-bn&&i>=-(_n+bn)?(l.value=ta,n=-i-_n):(l.value=ea,n=i>0?-i+Mn:-i-Mn);else{var h,c,u,d,m,p;this.face===$s?i=na(i,+_n):this.face===Ws?i=na(i,+Mn):this.face===Ys&&(i=na(i,-_n)),d=Math.sin(e),m=Math.cos(e),p=Math.sin(i),h=m*Math.cos(i),c=m*p,u=d,this.face===Gs?n=ia(o=Math.acos(h),u,c,l):this.face===$s?n=ia(o=Math.acos(c),u,-h,l):this.face===Ws?n=ia(o=Math.acos(-h),u,-c,l):this.face===Ys?n=ia(o=Math.acos(-c),u,h,l):(o=n=0,l.value=Js)}return a=Math.atan(12/Mn*(n+Math.acos(Math.sin(n)*Math.cos(bn))-_n)),s=Math.sqrt((1-Math.cos(o))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(n))))),l.value===Qs?a+=_n:l.value===ta?a+=Mn:l.value===ea&&(a+=1.5*Mn),r.x=s*Math.cos(a),r.y=s*Math.sin(a),r.x=r.x*this.a+this.x0,r.y=r.y*this.a+this.y0,t.x=r.x,t.y=r.y,t},inverse:function(t){var e,i,n,o,s,a,r,l,h,c,u,d,m={lam:0,phi:0},p={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,i=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),e=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?p.value=Js:t.y>=0&&t.y>=Math.abs(t.x)?(p.value=Qs,e-=_n):t.x<0&&-t.x>=Math.abs(t.y)?(p.value=ta,e=e<0?e+Mn:e-Mn):(p.value=ea,e+=_n),h=Mn/12*Math.tan(e),s=Math.sin(h)/(Math.cos(h)-1/Math.sqrt(2)),a=Math.atan(s),(r=1-(n=Math.cos(e))*n*(o=Math.tan(i))*o*(1-Math.cos(Math.atan(1/Math.cos(a)))))<-1?r=-1:r>1&&(r=1),this.face===Xs)l=Math.acos(r),m.phi=_n-l,p.value===Js?m.lam=a+_n:p.value===Qs?m.lam=a<0?a+Mn:a-Mn:p.value===ta?m.lam=a-_n:m.lam=a;else if(this.face===Ks)l=Math.acos(r),m.phi=l-_n,p.value===Js?m.lam=-a+_n:p.value===Qs?m.lam=-a:p.value===ta?m.lam=-a-_n:m.lam=a<0?-a-Mn:-a+Mn;else{var f,_,g;h=(f=r)*f,_=(h+=(g=h>=1?0:Math.sqrt(1-h)*Math.sin(a))*g)>=1?0:Math.sqrt(1-h),p.value===Qs?(h=_,_=-g,g=h):p.value===ta?(_=-_,g=-g):p.value===ea&&(h=_,_=g,g=-h),this.face===$s?(h=f,f=-_,_=h):this.face===Ws?(f=-f,_=-_):this.face===Ys&&(h=f,f=_,_=-h),m.phi=Math.acos(-g)-_n,m.lam=Math.atan2(_,f),this.face===$s?m.lam=na(m.lam,-_n):this.face===Ws?m.lam=na(m.lam,-Mn):this.face===Ys&&(m.lam=na(m.lam,+_n))}return 0!==this.es&&(c=m.phi<0?1:0,u=Math.tan(m.phi),d=this.b/Math.sqrt(u*u+this.one_minus_f_squared),m.phi=Math.atan(Math.sqrt(this.a*this.a-d*d)/(this.one_minus_f*d)),c&&(m.phi=-m.phi)),m.lam+=this.long0,t.x=m.lam,t.y=m.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},sa=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],aa=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],ra=.8487,la=1.3523,ha=vn/5,ca=1/ha,ua=18,da=function(t,e){return t[0]+e*(t[1]+e*(t[2]+e*t[3]))};var ma={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var e=Vn(t.x-this.long0),i=Math.abs(t.y),n=Math.floor(i*ha);n<0?n=0:n>=ua&&(n=17);var o={x:da(sa[n],i=vn*(i-ca*n))*e,y:da(aa[n],i)};return t.y<0&&(o.y=-o.y),o.x=o.x*this.a*ra+this.x0,o.y=o.y*this.a*la+this.y0,o},inverse:function(t){var e={x:(t.x-this.x0)/(this.a*ra),y:Math.abs(t.y-this.y0)/(this.a*la)};if(e.y>=1)e.x/=sa[18][0],e.y=t.y<0?-_n:_n;else{var i=Math.floor(e.y*ua);for(i<0?i=0:i>=ua&&(i=17);;)if(aa[i][0]>e.y)--i;else{if(!(aa[i+1][0]<=e.y))break;++i}var n=aa[i],o=5*(e.y-n[0])/(aa[i+1][0]-n[0]);o=function(t,e,i,n){for(var o=e;n;--n){var s=t(o);if(o-=s,Math.abs(s)1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var t=1-this.es,e=1/t;this.radius_p=Math.sqrt(t),this.radius_p2=t,this.radius_p_inv2=e,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")},forward:function(t){var e,i,n,o,s=t.x,a=t.y;if(s-=this.long0,"ellipse"===this.shape){a=Math.atan(this.radius_p2*Math.tan(a));var r=this.radius_p/ts(this.radius_p*Math.cos(a),Math.sin(a));if(i=r*Math.cos(s)*Math.cos(a),n=r*Math.sin(s)*Math.cos(a),o=r*Math.sin(a),(this.radius_g-i)*i-n*n-o*o*this.radius_p_inv2<0)return t.x=Number.NaN,t.y=Number.NaN,t;e=this.radius_g-i,this.flip_axis?(t.x=this.radius_g_1*Math.atan(n/ts(o,e)),t.y=this.radius_g_1*Math.atan(o/e)):(t.x=this.radius_g_1*Math.atan(n/e),t.y=this.radius_g_1*Math.atan(o/ts(n,e)))}else"sphere"===this.shape&&(e=Math.cos(a),i=Math.cos(s)*e,n=Math.sin(s)*e,o=Math.sin(a),e=this.radius_g-i,this.flip_axis?(t.x=this.radius_g_1*Math.atan(n/ts(o,e)),t.y=this.radius_g_1*Math.atan(o/e)):(t.x=this.radius_g_1*Math.atan(n/e),t.y=this.radius_g_1*Math.atan(o/ts(n,e))));return t.x=t.x*this.a,t.y=t.y*this.a,t},inverse:function(t){var e,i,n,o,s=-1,a=0,r=0;if(t.x=t.x/this.a,t.y=t.y/this.a,"ellipse"===this.shape){this.flip_axis?(r=Math.tan(t.y/this.radius_g_1),a=Math.tan(t.x/this.radius_g_1)*ts(1,r)):(a=Math.tan(t.x/this.radius_g_1),r=Math.tan(t.y/this.radius_g_1)*ts(1,a));var l=r/this.radius_p;if(e=a*a+l*l+s*s,(n=(i=2*this.radius_g*s)*i-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;o=(-i-Math.sqrt(n))/(2*e),s=this.radius_g+o*s,a*=o,r*=o,t.x=Math.atan2(a,s),t.y=Math.atan(r*Math.cos(t.x)/s),t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if("sphere"===this.shape){if(this.flip_axis?(r=Math.tan(t.y/this.radius_g_1),a=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+r*r)):(a=Math.tan(t.x/this.radius_g_1),r=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+a*a)),e=a*a+r*r+s*s,(n=(i=2*this.radius_g*s)*i-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;o=(-i-Math.sqrt(n))/(2*e),s=this.radius_g+o*s,a*=o,r*=o,t.x=Math.atan2(a,s),t.y=Math.atan(r*Math.cos(t.x)/s)}return t.x=t.x+this.long0,t},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]},Ma=1.340264,wa=-.081106,Ca=893e-6,La=.003796,Ea=Math.sqrt(3)/2;var Ta={init:function(){this.es=0,this.long0=void 0!==this.long0?this.long0:0},forward:function(t){var e=Vn(t.x-this.long0),i=t.y,n=Math.asin(Ea*Math.sin(i)),o=n*n,s=o*o*o;return t.x=e*Math.cos(n)/(Ea*(Ma+3*wa*o+s*(7*Ca+9*La*o))),t.y=n*(Ma+wa*o+s*(Ca+La*o)),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a;var e,i,n,o,s=t.y;for(o=0;o<12&&(s-=n=(s*(Ma+wa*(e=s*s)+(i=e*e*e)*(Ca+La*e))-t.y)/(Ma+3*wa*e+i*(7*Ca+9*La*e)),!(Math.abs(n)<1e-9));++o);return i=(e=s*s)*e*e,t.x=Ea*t.x*(Ma+3*wa*e+i*(7*Ca+9*La*e))/Math.cos(s),t.y=Math.asin(Math.sin(s)/Ea),t.x=Vn(t.x+this.long0),t},names:["eqearth","Equal Earth","Equal_Earth"]},Sa=1e-10;function ka(t){var e,i,n,o=Vn(t.x-(this.long0||0)),s=t.y;return e=this.am1+this.m1-Xo(s,i=Math.sin(s),n=Math.cos(s),this.en),i=n*o/(e*Math.sqrt(1-this.es*i*i)),t.x=e*Math.sin(i),t.y=this.am1-e*Math.cos(i),t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function Aa(t){var e,i,n,o;if(t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a,i=ts(t.x,t.y=this.am1-t.y),o=Ko(this.am1+this.m1-i,this.es,this.en),(e=Math.abs(o))<_n)e=Math.sin(o),n=i*Math.atan2(t.x,t.y)*Math.sqrt(1-this.es*e*e)/Math.cos(o);else{if(!(Math.abs(e-_n)<=Sa))throw new Error;n=0}return t.x=Vn(n+(this.long0||0)),t.y=xs(o),t}function za(t){var e,i,n=Vn(t.x-(this.long0||0)),o=t.y;return i=this.cphi1+this.phi1-o,Math.abs(i)>Sa?(t.x=i*Math.sin(e=n*Math.cos(o)/i),t.y=this.cphi1-i*Math.cos(e)):t.x=t.y=0,t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function Pa(t){var e,i;t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a;var n=ts(t.x,t.y=this.cphi1-t.y);if(i=this.cphi1+this.phi1-n,Math.abs(i)>_n)throw new Error;return e=Math.abs(Math.abs(i)-_n)<=Sa?0:n*Math.atan2(t.x,t.y)/Math.cos(i),t.x=Vn(e+(this.long0||0)),t.y=xs(i),t}var Ia={init:function(){var t;if(this.phi1=this.lat1,Math.abs(this.phi1)=_n?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=Pa,this.forward=za)},names:["bonne","Bonne (Werner lat_1=90)"]};To.defaultDatum="WGS84",To.Proj=uo,To.WGS84=new To.Proj("WGS84"),To.Point=Vo,To.toPoint=xo,To.defs=Zn,To.nadgrid=function(t,e){var i=new DataView(e),n=function(t){var e=t.getInt32(8,!1);if(11===e)return!1;e=t.getInt32(8,!0),11!==e&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian");return!0}(i),o=function(t,e){return{nFields:t.getInt32(8,e),nSubgridFields:t.getInt32(24,e),nSubgrids:t.getInt32(40,e),shiftType:ro(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,e),fromSemiMinorAxis:t.getFloat64(136,e),toSemiMajorAxis:t.getFloat64(152,e),toSemiMinorAxis:t.getFloat64(168,e)}}(i,n),s=function(t,e,i){for(var n=176,o=[],s=0;s{!t.inPlace&&i?n.parentElement.zoomTo(+i.lat,+i.lng,+i.z):t.inPlace||n.zoomTo(),o&&(n.opacity=o),a.getContainer().focus()}))}},getBoundsFromMeta:function(t){if(!t)return null;let e,i=t instanceof ShadowRoot?":host":":scope",n=t.querySelector(i+" > map-meta[name=projection]")&&Ba._metaContentToObject(t.querySelector(i+" > map-meta[name=projection]").getAttribute("content")).content.toUpperCase()||M.FALLBACK_PROJECTION;try{let o=t.querySelector(i+" > map-meta[name=extent]")&&Ba._metaContentToObject(t.querySelector(i+" > map-meta[name=extent]").getAttribute("content")),s=o.zoom,a=Object.keys(o);for(let t=0;t map-meta[name=zoom]").getAttribute("content"));return i.min&&i.max&&i.value?{minZoom:+i.min,maxZoom:+i.max,minNativeZoom:+i.value,maxNativeZoom:+i.value}:i.min&&i.max?{minZoom:+i.min,maxZoom:+i.max}:i.min?{minZoom:+i.min}:i.max?{maxZoom:+i.max}:void 0},getZoomBounds:function(t,e){if(!t)return null;let i,n,o=100,s=0,a=t.querySelectorAll("map-feature");for(let t=0;t';t.insertAdjacentHTML("beforeend",i),t.lastElementChild.whenReady().catch((()=>{t&&t.removeChild(t.lastChild),i=null}))}catch(i){if(")|()|()|()|()|()|()|()|(