diff --git a/7/assets/index-aad0ca89.js b/7/assets/index-24dc7fad.js similarity index 94% rename from 7/assets/index-aad0ca89.js rename to 7/assets/index-24dc7fad.js index d22e874..237d2d6 100644 --- a/7/assets/index-aad0ca89.js +++ b/7/assets/index-24dc7fad.js @@ -67,8 +67,8 @@ Error generating stack: `+l.message+` */function Gl(){return Gl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(i[a]=e[a]);return i}function uy(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function cy(e,t){return e.button===0&&(!t||t==="_self")&&!uy(e)}const hy=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],fy="startTransition",of=l_[fy];function dy(e){let{basename:t,children:i,future:o,window:a}=e,l=A.useRef();l.current==null&&(l.current=yg({window:a,v5Compat:!0}));let c=l.current,[d,f]=A.useState({action:c.action,location:c.location}),{v7_startTransition:_}=o||{},S=A.useCallback(P=>{_&&of?of(()=>f(P)):f(P)},[f,_]);return A.useLayoutEffect(()=>c.listen(S),[c,S]),A.createElement(sy,{basename:t,children:i,location:d.location,navigationType:d.action,navigator:c})}const py=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",my=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sf=A.forwardRef(function(t,i){let{onClick:o,relative:a,reloadDocument:l,replace:c,state:d,target:f,to:_,preventScrollReset:S}=t,P=ly(t,hy),{basename:k}=A.useContext(ji),O,M=!1;if(typeof _=="string"&&my.test(_)&&(O=_,py))try{let g=new URL(window.location.href),w=_.startsWith("//")?new URL(g.protocol+_):new URL(_),z=$u(w.pathname,k);w.origin===g.origin&&z!=null?_=z+w.search+w.hash:M=!0}catch{}let C=$g(_,{relative:a}),H=_y(_,{replace:c,state:d,target:f,preventScrollReset:S,relative:a});function y(g){o&&o(g),g.defaultPrevented||H(g)}return A.createElement("a",Gl({},P,{href:O||C,onClick:M||l?o:y,ref:i,target:f}))});var af;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(af||(af={}));var lf;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(lf||(lf={}));function _y(e,t){let{target:i,replace:o,state:a,preventScrollReset:l,relative:c}=t===void 0?{}:t,d=Gg(),f=Is(),_=zp(e,{relative:c});return A.useCallback(S=>{if(cy(S,i)){S.preventDefault();let P=o!==void 0?o:fs(f)===fs(_);d(e,{replace:P,state:a,preventScrollReset:l,relative:c})}},[f,d,_,o,a,i,e,l,c])}const Ip=({offer:e})=>m.jsxs("article",{className:"cities__card place-card",children:[e.isPremium&&m.jsx("div",{className:"place-card__mark",children:m.jsx("span",{children:"Premium"})}),m.jsx("div",{className:"cities__image-wrapper place-card__image-wrapper",children:m.jsx(sf,{to:`/offer/${e.id}`,children:m.jsx("img",{className:"place-card__image",src:e.previewImage,width:"260",height:"200",alt:e.title})})}),m.jsxs("div",{className:"place-card__info",children:[m.jsx("div",{className:"place-card__price-wrapper",children:m.jsxs("div",{className:"place-card__price",children:[m.jsxs("b",{className:"place-card__price-value",children:["€",e.price]}),m.jsx("span",{className:"place-card__price-text",children:"/ night"})]})}),m.jsx("div",{className:"place-card__rating rating",children:m.jsxs("div",{className:"place-card__stars rating__stars",children:[m.jsx("span",{style:{width:`${e.rating/5*100}%`}}),m.jsx("span",{className:"visually-hidden",children:"Rating"})]})}),m.jsx("h2",{className:"place-card__name",children:m.jsx(sf,{to:`/offer/${e.id}`,children:e.title})}),m.jsx("p",{className:"place-card__type",children:e.type})]})]}),jp=({offers:e})=>{const[t,i]=A.useState(null);return m.jsxs("div",{className:"cities__places-list places__list tabs__content",children:[e.map(o=>m.jsx("div",{onMouseEnter:()=>i(o.id),onMouseLeave:()=>i(null),children:m.jsx(Ip,{offer:o})},o.id)),m.jsx("div",{children:t&&m.jsxs("p",{children:["Active Offer ID: ",t]})})]})};var Kl={exports:{}};/* @preserve * Leaflet 1.7.1, a JS library for interactive maps. http://leafletjs.com * (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */(function(e,t){(function(i,o){o(t)})(Gm,function(i){var o="1.7.1";function a(n){var r,s,u,h;for(s=1,u=arguments.length;s"u"||!L||!L.Mixin)){n=w(n)?n:[n];for(var r=0;r0?Math.floor(n):Math.ceil(n)};T.prototype={clone:function(){return new T(this.x,this.y)},add:function(n){return this.clone()._add(R(n))},_add:function(n){return this.x+=n.x,this.y+=n.y,this},subtract:function(n){return this.clone()._subtract(R(n))},_subtract:function(n){return this.x-=n.x,this.y-=n.y,this},divideBy:function(n){return this.clone()._divideBy(n)},_divideBy:function(n){return this.x/=n,this.y/=n,this},multiplyBy:function(n){return this.clone()._multiplyBy(n)},_multiplyBy:function(n){return this.x*=n,this.y*=n,this},scaleBy:function(n){return new T(this.x*n.x,this.y*n.y)},unscaleBy:function(n){return new T(this.x/n.x,this.y/n.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=$(this.x),this.y=$(this.y),this},distanceTo:function(n){n=R(n);var r=n.x-this.x,s=n.y-this.y;return Math.sqrt(r*r+s*s)},equals:function(n){return n=R(n),n.x===this.x&&n.y===this.y},contains:function(n){return n=R(n),Math.abs(n.x)<=Math.abs(this.x)&&Math.abs(n.y)<=Math.abs(this.y)},toString:function(){return"Point("+k(this.x)+", "+k(this.y)+")"}};function R(n,r,s){return n instanceof T?n:w(n)?new T(n[0],n[1]):n==null?n:typeof n=="object"&&"x"in n&&"y"in n?new T(n.x,n.y):new T(n,r,s)}function V(n,r){if(n)for(var s=r?[n,r]:n,u=0,h=s.length;u=this.min.x&&s.x<=this.max.x&&r.y>=this.min.y&&s.y<=this.max.y},intersects:function(n){n=te(n);var r=this.min,s=this.max,u=n.min,h=n.max,p=h.x>=r.x&&u.x<=s.x,v=h.y>=r.y&&u.y<=s.y;return p&&v},overlaps:function(n){n=te(n);var r=this.min,s=this.max,u=n.min,h=n.max,p=h.x>r.x&&u.xr.y&&u.y=r.lat&&h.lat<=s.lat&&u.lng>=r.lng&&h.lng<=s.lng},intersects:function(n){n=oe(n);var r=this._southWest,s=this._northEast,u=n.getSouthWest(),h=n.getNorthEast(),p=h.lat>=r.lat&&u.lat<=s.lat,v=h.lng>=r.lng&&u.lng<=s.lng;return p&&v},overlaps:function(n){n=oe(n);var r=this._southWest,s=this._northEast,u=n.getSouthWest(),h=n.getNorthEast(),p=h.lat>r.lat&&u.latr.lng&&u.lng1,Vn=function(){var n=!1;try{var r=Object.defineProperty({},"passive",{get:function(){n=!0}});window.addEventListener("testPassiveEventSupport",P,r),window.removeEventListener("testPassiveEventSupport",P,r)}catch{}return n}(),nc=function(){return!!document.createElement("canvas").getContext}(),$r=!!(document.createElementNS&&Qu("svg").createSVGRect),Gr=!$r&&function(){try{var n=document.createElement("div");n.innerHTML='';var r=n.firstChild;return r.style.behavior="url(#default#VML)",r&&typeof r.adj=="object"}catch{return!1}}();function xt(n){return navigator.userAgent.toLowerCase().indexOf(n)>=0}var Wp={ie:Wr,ielt9:Wn,edge:Hr,webkit:Zs,android:Bi,android23:Ai,androidStock:bu,opera:Fs,chrome:Us,gecko:Ws,safari:Vr,phantom:Xu,opera12:qu,win:Ju,ie3d:Hs,webkit3d:Vs,gecko3d:ec,any3d:et,mobile:Hn,mobileWebkit:Zp,mobileWebkit3d:Fp,msPointer:Kt,pointer:yt,touch:wt,mobileOpera:tc,mobileGecko:Up,retina:Qt,passiveEvents:Vn,canvas:nc,svg:$r,vml:Gr},$s=Kt?"MSPointerDown":"pointerdown",Gs=Kt?"MSPointerMove":"pointermove",Ks=Kt?"MSPointerUp":"pointerup",Qs=Kt?"MSPointerCancel":"pointercancel",$n={},ic=!1;function Hp(n,r,s,u){return r==="touchstart"?$p(n,s,u):r==="touchmove"?Qp(n,s,u):r==="touchend"&&Yp(n,s,u),this}function Vp(n,r,s){var u=n["_leaflet_"+r+s];return r==="touchstart"?n.removeEventListener($s,u,!1):r==="touchmove"?n.removeEventListener(Gs,u,!1):r==="touchend"&&(n.removeEventListener(Ks,u,!1),n.removeEventListener(Qs,u,!1)),this}function $p(n,r,s){var u=c(function(h){h.MSPOINTER_TYPE_TOUCH&&h.pointerType===h.MSPOINTER_TYPE_TOUCH&&nt(h),Ys(h,r)});n["_leaflet_touchstart"+s]=u,n.addEventListener($s,u,!1),ic||(document.addEventListener($s,Gp,!0),document.addEventListener(Gs,Kp,!0),document.addEventListener(Ks,rc,!0),document.addEventListener(Qs,rc,!0),ic=!0)}function Gp(n){$n[n.pointerId]=n}function Kp(n){$n[n.pointerId]&&($n[n.pointerId]=n)}function rc(n){delete $n[n.pointerId]}function Ys(n,r){n.touches=[];for(var s in $n)n.touches.push($n[s]);n.changedTouches=[n],r(n)}function Qp(n,r,s){var u=function(h){h.pointerType===(h.MSPOINTER_TYPE_MOUSE||"mouse")&&h.buttons===0||Ys(h,r)};n["_leaflet_touchmove"+s]=u,n.addEventListener(Gs,u,!1)}function Yp(n,r,s){var u=function(h){Ys(h,r)};n["_leaflet_touchend"+s]=u,n.addEventListener(Ks,u,!1),n.addEventListener(Qs,u,!1)}var Kr=Kt?"MSPointerDown":yt?"pointerdown":"touchstart",Qr=Kt?"MSPointerUp":yt?"pointerup":"touchend",Gn="_leaflet_";function bp(n,r,s){var u,h,p=!1,v=250;function x(N){if(yt){if(!N.isPrimary||N.pointerType==="mouse")return}else if(N.touches.length>1)return;var B=Date.now(),W=B-(u||B);h=N.touches?N.touches[0]:N,p=W>0&&W<=v,u=B}function E(N){if(p&&!h.cancelBubble){if(yt){if(N.pointerType==="mouse")return;var B={},W,J;for(J in h)W=h[J],B[J]=W&&W.bind?W.bind(h):W;h=B}h.type="dblclick",h.button=0,r(h),u=null}}return n[Gn+Kr+s]=x,n[Gn+Qr+s]=E,n[Gn+"dblclick"+s]=r,n.addEventListener(Kr,x,Vn?{passive:!1}:!1),n.addEventListener(Qr,E,Vn?{passive:!1}:!1),n.addEventListener("dblclick",r,!1),this}function Xp(n,r){var s=n[Gn+Kr+r],u=n[Gn+Qr+r],h=n[Gn+"dblclick"+r];return n.removeEventListener(Kr,s,Vn?{passive:!1}:!1),n.removeEventListener(Qr,u,Vn?{passive:!1}:!1),n.removeEventListener("dblclick",h,!1),this}var bs=Xr(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Di=Xr(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),oc=Di==="webkitTransition"||Di==="OTransition"?Di+"End":"transitionend";function sc(n){return typeof n=="string"?document.getElementById(n):n}function Zi(n,r){var s=n.style[r]||n.currentStyle&&n.currentStyle[r];if((!s||s==="auto")&&document.defaultView){var u=document.defaultView.getComputedStyle(n,null);s=u?u[r]:null}return s==="auto"?null:s}function q(n,r,s){var u=document.createElement(n);return u.className=r||"",s&&s.appendChild(u),u}function he(n){var r=n.parentNode;r&&r.removeChild(n)}function Yr(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function Kn(n){var r=n.parentNode;r&&r.lastChild!==n&&r.appendChild(n)}function Qn(n){var r=n.parentNode;r&&r.firstChild!==n&&r.insertBefore(n,r.firstChild)}function Xs(n,r){if(n.classList!==void 0)return n.classList.contains(r);var s=br(n);return s.length>0&&new RegExp("(^|\\s)"+r+"(\\s|$)").test(s)}function G(n,r){if(n.classList!==void 0)for(var s=M(r),u=0,h=s.length;uthis.options.maxZoom)?this.setZoom(n):this},panInsideBounds:function(n,r){this._enforcingBounds=!0;var s=this.getCenter(),u=this._limitCenter(s,this._zoom,oe(n));return s.equals(u)||this.panTo(u,r),this._enforcingBounds=!1,this},panInside:function(n,r){r=r||{};var s=R(r.paddingTopLeft||r.padding||[0,0]),u=R(r.paddingBottomRight||r.padding||[0,0]),h=this.getCenter(),p=this.project(h),v=this.project(n),x=this.getPixelBounds(),E=x.getSize().divideBy(2),N=te([x.min.add(s),x.max.subtract(u)]);if(!N.contains(v)){this._enforcingBounds=!0;var B=p.subtract(v),W=R(v.x+B.x,v.y+B.y);(v.xN.max.x)&&(W.x=p.x-B.x,B.x>0?W.x+=E.x-s.x:W.x-=E.x-u.x),(v.yN.max.y)&&(W.y=p.y-B.y,B.y>0?W.y+=E.y-s.y:W.y-=E.y-u.y),this.panTo(this.unproject(W),r),this._enforcingBounds=!1}return this},invalidateSize:function(n){if(!this._loaded)return this;n=a({animate:!1,pan:!0},n===!0?{animate:!0}:n);var r=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var s=this.getSize(),u=r.divideBy(2).round(),h=s.divideBy(2).round(),p=u.subtract(h);return!p.x&&!p.y?this:(n.animate&&n.pan?this.panBy(p):(n.pan&&this._rawPanBy(p),this.fire("move"),n.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(c(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:r,newSize:s}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(n){if(n=this._locateOptions=a({timeout:1e4,watch:!1},n),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var r=c(this._handleGeolocationResponse,this),s=c(this._handleGeolocationError,this);return n.watch?this._locationWatchId=navigator.geolocation.watchPosition(r,s,n):navigator.geolocation.getCurrentPosition(r,s,n),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(n){var r=n.code,s=n.message||(r===1?"permission denied":r===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:r,message:"Geolocation error: "+s+"."})},_handleGeolocationResponse:function(n){var r=n.coords.latitude,s=n.coords.longitude,u=new ee(r,s),h=u.toBounds(n.coords.accuracy*2),p=this._locateOptions;if(p.setView){var v=this.getBoundsZoom(h);this.setView(u,p.maxZoom?Math.min(v,p.maxZoom):v)}var x={latlng:u,bounds:h,timestamp:n.timestamp};for(var E in n.coords)typeof n.coords[E]=="number"&&(x[E]=n.coords[E]);this.fire("locationfound",x)},addHandler:function(n,r){if(!r)return this;var s=this[n]=new r(this);return this._handlers.push(s),this.options[n]&&s.enable(),this},remove:function(){if(this._initEvents(!0),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{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),he(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(ye(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var n;for(n in this._layers)this._layers[n].remove();for(n in this._panes)he(this._panes[n]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(n,r){var s="leaflet-pane"+(n?" leaflet-"+n.replace("Pane","")+"-pane":""),u=q("div",s,r||this._mapPane);return n&&(this._panes[n]=u),u},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var n=this.getPixelBounds(),r=this.unproject(n.getBottomLeft()),s=this.unproject(n.getTopRight());return new ke(r,s)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(n,r,s){n=oe(n),s=R(s||[0,0]);var u=this.getZoom()||0,h=this.getMinZoom(),p=this.getMaxZoom(),v=n.getNorthWest(),x=n.getSouthEast(),E=this.getSize().subtract(s),N=te(this.project(x,u),this.project(v,u)).getSize(),B=et?this.options.zoomSnap:1,W=E.x/N.x,J=E.y/N.y,Rt=r?Math.max(W,J):Math.min(W,J);return u=this.getScaleZoom(Rt,u),B&&(u=Math.round(u/(B/100))*(B/100),u=r?Math.ceil(u/B)*B:Math.floor(u/B)*B),Math.max(h,Math.min(p,u))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new T(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(n,r){var s=this._getTopLeftPoint(n,r);return new V(s,s.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(n){return this.options.crs.getProjectedBounds(n===void 0?this.getZoom():n)},getPane:function(n){return typeof n=="string"?this._panes[n]:n},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(n,r){var s=this.options.crs;return r=r===void 0?this._zoom:r,s.scale(n)/s.scale(r)},getScaleZoom:function(n,r){var s=this.options.crs;r=r===void 0?this._zoom:r;var u=s.zoom(n*s.scale(r));return isNaN(u)?1/0:u},project:function(n,r){return r=r===void 0?this._zoom:r,this.options.crs.latLngToPoint(ne(n),r)},unproject:function(n,r){return r=r===void 0?this._zoom:r,this.options.crs.pointToLatLng(R(n),r)},layerPointToLatLng:function(n){var r=R(n).add(this.getPixelOrigin());return this.unproject(r)},latLngToLayerPoint:function(n){var r=this.project(ne(n))._round();return r._subtract(this.getPixelOrigin())},wrapLatLng:function(n){return this.options.crs.wrapLatLng(ne(n))},wrapLatLngBounds:function(n){return this.options.crs.wrapLatLngBounds(oe(n))},distance:function(n,r){return this.options.crs.distance(ne(n),ne(r))},containerPointToLayerPoint:function(n){return R(n).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(n){return R(n).add(this._getMapPanePos())},containerPointToLatLng:function(n){var r=this.containerPointToLayerPoint(R(n));return this.layerPointToLatLng(r)},latLngToContainerPoint:function(n){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ne(n)))},mouseEventToContainerPoint:function(n){return uc(n,this._container)},mouseEventToLayerPoint:function(n){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(n))},mouseEventToLatLng:function(n){return this.layerPointToLatLng(this.mouseEventToLayerPoint(n))},_initContainer:function(n){var r=this._container=sc(n);if(r){if(r._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Q(r,"scroll",this._onScroll,this),this._containerId=f(r)},_initLayout:function(){var n=this._container;this._fadeAnimated=this.options.fadeAnimation&&et,G(n,"leaflet-container"+(wt?" leaflet-touch":"")+(Qt?" leaflet-retina":"")+(Wn?" leaflet-oldie":"")+(Vr?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var r=Zi(n,"position");r!=="absolute"&&r!=="relative"&&r!=="fixed"&&(n.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var n=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),we(this._mapPane,new T(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(G(n.markerPane,"leaflet-zoom-hide"),G(n.shadowPane,"leaflet-zoom-hide"))},_resetView:function(n,r){we(this._mapPane,new T(0,0));var s=!this._loaded;this._loaded=!0,r=this._limitZoom(r),this.fire("viewprereset");var u=this._zoom!==r;this._moveStart(u,!1)._move(n,r)._moveEnd(u),this.fire("viewreset"),s&&this.fire("load")},_moveStart:function(n,r){return n&&this.fire("zoomstart"),r||this.fire("movestart"),this},_move:function(n,r,s){r===void 0&&(r=this._zoom);var u=this._zoom!==r;return this._zoom=r,this._lastCenter=n,this._pixelOrigin=this._getNewPixelOrigin(n),(u||s&&s.pinch)&&this.fire("zoom",s),this.fire("move",s)},_moveEnd:function(n){return n&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return ye(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(n){we(this._mapPane,this._getMapPanePos().subtract(n))},_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(n){this._targets={},this._targets[f(this._container)]=this;var r=n?ve:Q;r(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&r(window,"resize",this._onResize,this),et&&this.options.transform3DLimit&&(n?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){ye(this._resizeRequest),this._resizeRequest=re(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var n=this._getMapPanePos();Math.max(Math.abs(n.x),Math.abs(n.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(n,r){for(var s=[],u,h=r==="mouseout"||r==="mouseover",p=n.target||n.srcElement,v=!1;p;){if(u=this._targets[f(p)],u&&(r==="click"||r==="preclick")&&!n._simulated&&this._draggableMoved(u)){v=!0;break}if(u&&u.listens(r,!0)&&(h&&!to(p,n)||(s.push(u),h))||p===this._container)break;p=p.parentNode}return!s.length&&!v&&!h&&to(p,n)&&(s=[this]),s},_handleDOMEvent:function(n){if(!(!this._loaded||ca(n))){var r=n.type;(r==="mousedown"||r==="keypress"||r==="keyup"||r==="keydown")&&ia(n.target||n.srcElement),this._fireDOMEvent(n,r)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(n,r,s){if(n.type==="click"){var u=a({},n);u.type="preclick",this._fireDOMEvent(u,u.type,s)}if(!n._stopped&&(s=(s||[]).concat(this._findEventTargets(n,r)),!!s.length)){var h=s[0];r==="contextmenu"&&h.listens(r,!0)&&nt(n);var p={originalEvent:n};if(n.type!=="keypress"&&n.type!=="keydown"&&n.type!=="keyup"){var v=h.getLatLng&&(!h._radius||h._radius<=10);p.containerPoint=v?this.latLngToContainerPoint(h.getLatLng()):this.mouseEventToContainerPoint(n),p.layerPoint=this.containerPointToLayerPoint(p.containerPoint),p.latlng=v?h.getLatLng():this.layerPointToLatLng(p.layerPoint)}for(var x=0;x0?Math.round(n-r)/2:Math.max(0,Math.ceil(n))-Math.max(0,Math.floor(r))},_limitZoom:function(n){var r=this.getMinZoom(),s=this.getMaxZoom(),u=et?this.options.zoomSnap:1;return u&&(n=Math.round(n/u)*u),Math.max(r,Math.min(s,n))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){me(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(n,r){var s=this._getCenterOffset(n)._trunc();return(r&&r.animate)!==!0&&!this.getSize().contains(s)?!1:(this.panBy(s,r),!0)},_createAnimProxy:function(){var n=this._proxy=q("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(n),this.on("zoomanim",function(r){var s=bs,u=this._proxy.style[s];Pn(this._proxy,this.project(r.center,r.zoom),this.getZoomScale(r.zoom,1)),u===this._proxy.style[s]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){he(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var n=this.getCenter(),r=this.getZoom();Pn(this._proxy,this.project(n,r),this.getZoomScale(r,1))},_catchTransitionEnd:function(n){this._animatingZoom&&n.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(n,r,s){if(this._animatingZoom)return!0;if(s=s||{},!this._zoomAnimated||s.animate===!1||this._nothingToAnimate()||Math.abs(r-this._zoom)>this.options.zoomAnimationThreshold)return!1;var u=this.getZoomScale(r),h=this._getCenterOffset(n)._divideBy(1-1/u);return s.animate!==!0&&!this.getSize().contains(h)?!1:(re(function(){this._moveStart(!0,!1)._animateZoom(n,r,!0)},this),!0)},_animateZoom:function(n,r,s,u){this._mapPane&&(s&&(this._animatingZoom=!0,this._animateToCenter=n,this._animateToZoom=r,G(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:n,zoom:r,noUpdate:u}),setTimeout(c(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&me(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),re(function(){this._moveEnd(!0)},this))}});function nm(n,r){return new b(n,r)}var ct=Je.extend({options:{position:"topright"},initialize:function(n){C(this,n)},getPosition:function(){return this.options.position},setPosition:function(n){var r=this._map;return r&&r.removeControl(this),this.options.position=n,r&&r.addControl(this),this},getContainer:function(){return this._container},addTo:function(n){this.remove(),this._map=n;var r=this._container=this.onAdd(n),s=this.getPosition(),u=n._controlCorners[s];return G(r,"leaflet-control"),s.indexOf("bottom")!==-1?u.insertBefore(r,u.firstChild):u.appendChild(r),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(he(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(n){this._map&&n&&n.screenX>0&&n.screenY>0&&this._map.getContainer().focus()}}),Vi=function(n){return new ct(n)};b.include({addControl:function(n){return n.addTo(this),this},removeControl:function(n){return n.remove(),this},_initControlPos:function(){var n=this._controlCorners={},r="leaflet-",s=this._controlContainer=q("div",r+"control-container",this._container);function u(h,p){var v=r+h+" "+r+p;n[h+p]=q("div",v,s)}u("top","left"),u("top","right"),u("bottom","left"),u("bottom","right")},_clearControlPos:function(){for(var n in this._controlCorners)he(this._controlCorners[n]);he(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var fc=ct.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(n,r,s,u){return s1,this._baseLayersList.style.display=n?"":"none"),this._separator.style.display=r&&n?"":"none",this},_onLayerChange:function(n){this._handlingClick||this._update();var r=this._getLayer(f(n.target)),s=r.overlay?n.type==="add"?"overlayadd":"overlayremove":n.type==="add"?"baselayerchange":null;s&&this._map.fire(s,r)},_createRadioElement:function(n,r){var s='",u=document.createElement("div");return u.innerHTML=s,u.firstChild},_addItem:function(n){var r=document.createElement("label"),s=this._map.hasLayer(n.layer),u;n.overlay?(u=document.createElement("input"),u.type="checkbox",u.className="leaflet-control-layers-selector",u.defaultChecked=s):u=this._createRadioElement("leaflet-base-layers_"+f(this),s),this._layerControlInputs.push(u),u.layerId=f(n.layer),Q(u,"click",this._onInputClick,this);var h=document.createElement("span");h.innerHTML=" "+n.name;var p=document.createElement("div");r.appendChild(p),p.appendChild(u),p.appendChild(h);var v=n.overlay?this._overlaysList:this._baseLayersList;return v.appendChild(r),this._checkDisabledLayers(),r},_onInputClick:function(){var n=this._layerControlInputs,r,s,u=[],h=[];this._handlingClick=!0;for(var p=n.length-1;p>=0;p--)r=n[p],s=this._getLayer(r.layerId).layer,r.checked?u.push(s):r.checked||h.push(s);for(p=0;p=0;h--)r=n[h],s=this._getLayer(r.layerId).layer,r.disabled=s.options.minZoom!==void 0&&us.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),im=function(n,r,s){return new fc(n,r,s)},ha=ct.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(n){var r="leaflet-control-zoom",s=q("div",r+" leaflet-bar"),u=this.options;return this._zoomInButton=this._createButton(u.zoomInText,u.zoomInTitle,r+"-in",s,this._zoomIn),this._zoomOutButton=this._createButton(u.zoomOutText,u.zoomOutTitle,r+"-out",s,this._zoomOut),this._updateDisabled(),n.on("zoomend zoomlevelschange",this._updateDisabled,this),s},onRemove:function(n){n.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(n){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(n.shiftKey?3:1))},_createButton:function(n,r,s,u,h){var p=q("a",s,u);return p.innerHTML=n,p.href="#",p.title=r,p.setAttribute("role","button"),p.setAttribute("aria-label",r),Hi(p),Q(p,"click",zt),Q(p,"click",h,this),Q(p,"click",this._refocusOnMap,this),p},_updateDisabled:function(){var n=this._map,r="leaflet-disabled";me(this._zoomInButton,r),me(this._zoomOutButton,r),(this._disabled||n._zoom===n.getMinZoom())&&G(this._zoomOutButton,r),(this._disabled||n._zoom===n.getMaxZoom())&&G(this._zoomInButton,r)}});b.mergeOptions({zoomControl:!0}),b.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new ha,this.addControl(this.zoomControl))});var rm=function(n){return new ha(n)},dc=ct.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(n){var r="leaflet-control-scale",s=q("div",r),u=this.options;return this._addScales(u,r+"-line",s),n.on(u.updateWhenIdle?"moveend":"move",this._update,this),n.whenReady(this._update,this),s},onRemove:function(n){n.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(n,r,s){n.metric&&(this._mScale=q("div",r,s)),n.imperial&&(this._iScale=q("div",r,s))},_update:function(){var n=this._map,r=n.getSize().y/2,s=n.distance(n.containerPointToLatLng([0,r]),n.containerPointToLatLng([this.options.maxWidth,r]));this._updateScales(s)},_updateScales:function(n){this.options.metric&&n&&this._updateMetric(n),this.options.imperial&&n&&this._updateImperial(n)},_updateMetric:function(n){var r=this._getRoundNum(n),s=r<1e3?r+" m":r/1e3+" km";this._updateScale(this._mScale,s,r/n)},_updateImperial:function(n){var r=n*3.2808399,s,u,h;r>5280?(s=r/5280,u=this._getRoundNum(s),this._updateScale(this._iScale,u+" mi",u/s)):(h=this._getRoundNum(r),this._updateScale(this._iScale,h+" ft",h/r))},_updateScale:function(n,r,s){n.style.width=Math.round(this.options.maxWidth*s)+"px",n.innerHTML=r},_getRoundNum:function(n){var r=Math.pow(10,(Math.floor(n)+"").length-1),s=n/r;return s=s>=10?10:s>=5?5:s>=3?3:s>=2?2:1,r*s}}),om=function(n){return new dc(n)},fa=ct.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(n){C(this,n),this._attributions={}},onAdd:function(n){n.attributionControl=this,this._container=q("div","leaflet-control-attribution"),Hi(this._container);for(var r in n._layers)n._layers[r].getAttribution&&this.addAttribution(n._layers[r].getAttribution());return this._update(),this._container},setPrefix:function(n){return this.options.prefix=n,this._update(),this},addAttribution:function(n){return n?(this._attributions[n]||(this._attributions[n]=0),this._attributions[n]++,this._update(),this):this},removeAttribution:function(n){return n?(this._attributions[n]&&(this._attributions[n]--,this._update()),this):this},_update:function(){if(this._map){var n=[];for(var r in this._attributions)this._attributions[r]&&n.push(r);var s=[];this.options.prefix&&s.push(this.options.prefix),n.length&&s.push(n.join(", ")),this._container.innerHTML=s.join(" | ")}}});b.mergeOptions({attributionControl:!0}),b.addInitHook(function(){this.options.attributionControl&&new fa().addTo(this)});var sm=function(n){return new fa(n)};ct.Layers=fc,ct.Zoom=ha,ct.Scale=dc,ct.Attribution=fa,Vi.layers=im,Vi.zoom=rm,Vi.scale=om,Vi.attribution=sm;var Pt=Je.extend({initialize:function(n){this._map=n},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Pt.addTo=function(n,r){return n.addHandler(r,this),this};var am={Events:Ne},pc=wt?"touchstart mousedown":"mousedown",mc={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},da={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},kn=Nt.extend({options:{clickTolerance:3},initialize:function(n,r,s,u){C(this,u),this._element=n,this._dragStartTarget=r||n,this._preventOutline=s},enable:function(){this._enabled||(Q(this._dragStartTarget,pc,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(kn._dragging===this&&this.finishDrag(),ve(this._dragStartTarget,pc,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(n){if(!(n._simulated||!this._enabled)&&(this._moved=!1,!Xs(this._element,"leaflet-zoom-anim")&&!(kn._dragging||n.shiftKey||n.which!==1&&n.button!==1&&!n.touches)&&(kn._dragging=this,this._preventOutline&&ia(this._element),ea(),Fi(),!this._moving))){this.fire("down");var r=n.touches?n.touches[0]:n,s=ac(this._element);this._startPoint=new T(r.clientX,r.clientY),this._parentScale=ra(s),Q(document,da[n.type],this._onMove,this),Q(document,mc[n.type],this._onUp,this)}},_onMove:function(n){if(!(n._simulated||!this._enabled)){if(n.touches&&n.touches.length>1){this._moved=!0;return}var r=n.touches&&n.touches.length===1?n.touches[0]:n,s=new T(r.clientX,r.clientY)._subtract(this._startPoint);!s.x&&!s.y||Math.abs(s.x)+Math.abs(s.y)p&&(v=x,p=E);p>s&&(r[v]=1,pa(n,r,s,u,v),pa(n,r,s,v,h))}function cm(n,r){for(var s=[n[0]],u=1,h=0,p=n.length;ur&&(s.push(n[u]),h=u);return hr.max.x&&(s|=2),n.yr.max.y&&(s|=8),s}function hm(n,r){var s=r.x-n.x,u=r.y-n.y;return s*s+u*u}function $i(n,r,s,u){var h=r.x,p=r.y,v=s.x-h,x=s.y-p,E=v*v+x*x,N;return E>0&&(N=((n.x-h)*v+(n.y-p)*x)/E,N>1?(h=s.x,p=s.y):N>0&&(h+=v*N,p+=x*N)),v=n.x-h,x=n.y-p,u?v*v+x*x:new T(h,p)}function Mt(n){return!w(n[0])||typeof n[0][0]!="object"&&typeof n[0][0]<"u"}function wc(n){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Mt(n)}var fm={simplify:_c,pointToSegmentDistance:vc,closestPointOnSegment:lm,clipSegment:yc,_getEdgeIntersection:no,_getBitCode:Ln,_sqClosestPointOnSegment:$i,isFlat:Mt,_flat:wc};function xc(n,r,s){var u,h=[1,4,2,8],p,v,x,E,N,B,W,J;for(p=0,B=n.length;p1e-7;x++)N=h*Math.sin(v),N=Math.pow((1-N)/(1+N),h/2),E=Math.PI/2-2*Math.atan(p*N)-v,v+=E;return new ee(v*r,n.x*r/s)}},pm={LonLat:ma,Mercator:_a,SphericalMercator:Rs},mm=a({},Gt,{code:"EPSG:3395",projection:_a,transformation:function(){var n=.5/(Math.PI*_a.R);return Ri(n,.5,-n,.5)}()}),Pc=a({},Gt,{code:"EPSG:4326",projection:ma,transformation:Ri(1/180,1,-1/180,.5)}),_m=a({},Ue,{projection:ma,transformation:Ri(1,0,-1,0),scale:function(n){return Math.pow(2,n)},zoom:function(n){return Math.log(n)/Math.LN2},distance:function(n,r){var s=r.lng-n.lng,u=r.lat-n.lat;return Math.sqrt(s*s+u*u)},infinite:!0});Ue.Earth=Gt,Ue.EPSG3395=mm,Ue.EPSG3857=As,Ue.EPSG900913=Ap,Ue.EPSG4326=Pc,Ue.Simple=_m;var ht=Nt.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(n){return n.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(n){return n&&n.removeLayer(this),this},getPane:function(n){return this._map.getPane(n?this.options[n]||n:this.options.pane)},addInteractiveTarget:function(n){return this._map._targets[f(n)]=this,this},removeInteractiveTarget:function(n){return delete this._map._targets[f(n)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(n){var r=n.target;if(r.hasLayer(this)){if(this._map=r,this._zoomAnimated=r._zoomAnimated,this.getEvents){var s=this.getEvents();r.on(s,this),this.once("remove",function(){r.off(s,this)},this)}this.onAdd(r),this.getAttribution&&r.attributionControl&&r.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),r.fire("layeradd",{layer:this})}}});b.include({addLayer:function(n){if(!n._layerAdd)throw new Error("The provided object is not a Layer.");var r=f(n);return this._layers[r]?this:(this._layers[r]=n,n._mapToAdd=this,n.beforeAdd&&n.beforeAdd(this),this.whenReady(n._layerAdd,n),this)},removeLayer:function(n){var r=f(n);return this._layers[r]?(this._loaded&&n.onRemove(this),n.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(n.getAttribution()),delete this._layers[r],this._loaded&&(this.fire("layerremove",{layer:n}),n.fire("remove")),n._map=n._mapToAdd=null,this):this},hasLayer:function(n){return!!n&&f(n)in this._layers},eachLayer:function(n,r){for(var s in this._layers)n.call(r,this._layers[s]);return this},_addLayers:function(n){n=n?w(n)?n:[n]:[];for(var r=0,s=n.length;rthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()r)return v=(u-r)/s,this._map.layerPointToLatLng([p.x-v*(p.x-h.x),p.y-v*(p.y-h.y)])},getBounds:function(){return this._bounds},addLatLng:function(n,r){return r=r||this._defaultShape(),n=ne(n),r.push(n),this._bounds.extend(n),this.redraw()},_setLatLngs:function(n){this._bounds=new ke,this._latlngs=this._convertLatLngs(n)},_defaultShape:function(){return Mt(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(n){for(var r=[],s=Mt(n),u=0,h=n.length;u=2&&r[0]instanceof ee&&r[0].equals(r[s-1])&&r.pop(),r},_setLatLngs:function(n){Ot.prototype._setLatLngs.call(this,n),Mt(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Mt(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var n=this._renderer._bounds,r=this.options.weight,s=new T(r,r);if(n=new V(n.min.subtract(s),n.max.add(s)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(n))){if(this.options.noClip){this._parts=this._rings;return}for(var u=0,h=this._rings.length,p;un.y!=h.y>n.y&&n.x<(h.x-u.x)*(n.y-u.y)/(h.y-u.y)+u.x&&(r=!r);return r||Ot.prototype._containsPoint.call(this,n,!0)}});function km(n,r){return new qn(n,r)}var It=bn.extend({initialize:function(n,r){C(this,r),this._layers={},n&&this.addData(n)},addData:function(n){var r=w(n)?n:n.features,s,u,h;if(r){for(s=0,u=r.length;s0?u:[r.src];return}w(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(r.style,"objectFit")&&(r.style.objectFit="fill"),r.autoplay=!!this.options.autoplay,r.loop=!!this.options.loop,r.muted=!!this.options.muted;for(var p=0;ph?(r.height=h+"px",G(n,p)):me(n,p),this._containerWidth=this._container.offsetWidth},_animateZoom:function(n){var r=this._map._latLngToNewLayerPoint(this._latlng,n.zoom,n.center),s=this._getAnchor();we(this._container,r.add(s))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var n=this._map,r=parseInt(Zi(this._container,"marginBottom"),10)||0,s=this._container.offsetHeight+r,u=this._containerWidth,h=new T(this._containerLeft,-s-this._containerBottom);h._add(Yt(this._container));var p=n.layerPointToContainerPoint(h),v=R(this.options.autoPanPadding),x=R(this.options.autoPanPaddingTopLeft||v),E=R(this.options.autoPanPaddingBottomRight||v),N=n.getSize(),B=0,W=0;p.x+u+E.x>N.x&&(B=p.x+u-N.x+E.x),p.x-B-x.x<0&&(B=p.x-x.x),p.y+s+E.y>N.y&&(W=p.y+s-N.y+E.y),p.y-W-x.y<0&&(W=p.y-x.y),(B||W)&&n.fire("autopanstart").panBy([B,W])}},_onCloseButtonClick:function(n){this._close(),zt(n)},_getAnchor:function(){return R(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Nm=function(n,r){return new ei(n,r)};b.mergeOptions({closePopupOnClick:!0}),b.include({openPopup:function(n,r,s){return n instanceof ei||(n=new ei(s).setContent(n)),r&&n.setLatLng(r),this.hasLayer(n)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=n,this.addLayer(n))},closePopup:function(n){return(!n||n===this._popup)&&(n=this._popup,this._popup=null),n&&this.removeLayer(n),this}}),ht.include({bindPopup:function(n,r){return n instanceof ei?(C(n,r),this._popup=n,n._source=this):((!this._popup||r)&&(this._popup=new ei(r,this)),this._popup.setContent(n)),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(n,r){return this._popup&&this._map&&(r=this._popup._prepareOpen(this,n,r),this._map.openPopup(this._popup,r)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(n){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(n)),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(n){return this._popup&&this._popup.setContent(n),this},getPopup:function(){return this._popup},_openPopup:function(n){var r=n.layer||n.target;if(this._popup&&this._map){if(zt(n),r instanceof bt){this.openPopup(n.layer||n.target,n.latlng);return}this._map.hasLayer(this._popup)&&this._popup._source===r?this.closePopup():this.openPopup(r,n.latlng)}},_movePopup:function(n){this._popup.setLatLng(n.latlng)},_onKeyPress:function(n){n.originalEvent.keyCode===13&&this._openPopup(n)}});var ti=jt.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(n){jt.prototype.onAdd.call(this,n),this.setOpacity(this.options.opacity),n.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(n){jt.prototype.onRemove.call(this,n),n.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var n=jt.prototype.getEvents.call(this);return wt&&!this.options.permanent&&(n.preclick=this._close),n},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var n="leaflet-tooltip",r=n+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=q("div",r)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(n){var r,s,u=this._map,h=this._container,p=u.latLngToContainerPoint(u.getCenter()),v=u.layerPointToContainerPoint(n),x=this.options.direction,E=h.offsetWidth,N=h.offsetHeight,B=R(this.options.offset),W=this._getAnchor();x==="top"?(r=E/2,s=N):x==="bottom"?(r=E/2,s=0):x==="center"?(r=E/2,s=N/2):x==="right"?(r=0,s=N/2):x==="left"?(r=E,s=N/2):v.xthis.options.maxZoom||su?this._retainParent(h,p,v,u):!1)},_retainChildren:function(n,r,s,u){for(var h=2*n;h<2*n+2;h++)for(var p=2*r;p<2*r+2;p++){var v=new T(h,p);v.z=s+1;var x=this._tileCoordsToKey(v),E=this._tiles[x];if(E&&E.active){E.retain=!0;continue}else E&&E.loaded&&(E.retain=!0);s+1this.options.maxZoom||this.options.minZoom!==void 0&&h1){this._setView(n,s);return}for(var W=h.min.y;W<=h.max.y;W++)for(var J=h.min.x;J<=h.max.x;J++){var Rt=new T(J,W);if(Rt.z=this._tileZoom,!!this._isValidTile(Rt)){var En=this._tiles[this._tileCoordsToKey(Rt)];En?En.current=!0:v.push(Rt)}}if(v.sort(function(Xt,Pa){return Xt.distanceTo(p)-Pa.distanceTo(p)}),v.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var co=document.createDocumentFragment();for(J=0;Js.max.x)||!r.wrapLat&&(n.ys.max.y))return!1}if(!this.options.bounds)return!0;var u=this._tileCoordsToBounds(n);return oe(this.options.bounds).overlaps(u)},_keyToBounds:function(n){return this._tileCoordsToBounds(this._keyToTileCoords(n))},_tileCoordsToNwSe:function(n){var r=this._map,s=this.getTileSize(),u=n.scaleBy(s),h=u.add(s),p=r.unproject(u,n.z),v=r.unproject(h,n.z);return[p,v]},_tileCoordsToBounds:function(n){var r=this._tileCoordsToNwSe(n),s=new ke(r[0],r[1]);return this.options.noWrap||(s=this._map.wrapLatLngBounds(s)),s},_tileCoordsToKey:function(n){return n.x+":"+n.y+":"+n.z},_keyToTileCoords:function(n){var r=n.split(":"),s=new T(+r[0],+r[1]);return s.z=+r[2],s},_removeTile:function(n){var r=this._tiles[n];r&&(he(r.el),delete this._tiles[n],this.fire("tileunload",{tile:r.el,coords:this._keyToTileCoords(n)}))},_initTile:function(n){G(n,"leaflet-tile");var r=this.getTileSize();n.style.width=r.x+"px",n.style.height=r.y+"px",n.onselectstart=P,n.onmousemove=P,Wn&&this.options.opacity<1&&tt(n,this.options.opacity),Bi&&!Ai&&(n.style.WebkitBackfaceVisibility="hidden")},_addTile:function(n,r){var s=this._getTilePos(n),u=this._tileCoordsToKey(n),h=this.createTile(this._wrapCoords(n),c(this._tileReady,this,n));this._initTile(h),this.createTile.length<2&&re(c(this._tileReady,this,n,null,h)),we(h,s),this._tiles[u]={el:h,coords:n,current:!0},r.appendChild(h),this.fire("tileloadstart",{tile:h,coords:n})},_tileReady:function(n,r,s){r&&this.fire("tileerror",{error:r,tile:s,coords:n});var u=this._tileCoordsToKey(n);s=this._tiles[u],s&&(s.loaded=+new Date,this._map._fadeAnimated?(tt(s.el,0),ye(this._fadeFrame),this._fadeFrame=re(this._updateOpacity,this)):(s.active=!0,this._pruneTiles()),r||(G(s.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:s.el,coords:n})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Wn||!this._map._fadeAnimated?re(this._pruneTiles,this):setTimeout(c(this._pruneTiles,this),250)))},_getTilePos:function(n){return n.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(n){var r=new T(this._wrapX?S(n.x,this._wrapX):n.x,this._wrapY?S(n.y,this._wrapY):n.y);return r.z=n.z,r},_pxBoundsToTileRange:function(n){var r=this.getTileSize();return new V(n.min.unscaleBy(r).floor(),n.max.unscaleBy(r).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var n in this._tiles)if(!this._tiles[n].loaded)return!1;return!0}});function Om(n){return new Ki(n)}var ni=Ki.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(n,r){this._url=n,r=C(this,r),r.detectRetina&&Qt&&r.maxZoom>0&&(r.tileSize=Math.floor(r.tileSize/2),r.zoomReverse?(r.zoomOffset--,r.minZoom++):(r.zoomOffset++,r.maxZoom--),r.minZoom=Math.max(0,r.minZoom)),typeof r.subdomains=="string"&&(r.subdomains=r.subdomains.split("")),Bi||this.on("tileunload",this._onTileRemove)},setUrl:function(n,r){return this._url===n&&r===void 0&&(r=!0),this._url=n,r||this.redraw(),this},createTile:function(n,r){var s=document.createElement("img");return Q(s,"load",c(this._tileOnLoad,this,r,s)),Q(s,"error",c(this._tileOnError,this,r,s)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(s.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),s.alt="",s.setAttribute("role","presentation"),s.src=this.getTileUrl(n),s},getTileUrl:function(n){var r={r:Qt?"@2x":"",s:this._getSubdomain(n),x:n.x,y:n.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var s=this._globalTileRange.max.y-n.y;this.options.tms&&(r.y=s),r["-y"]=s}return g(this._url,a(r,this.options))},_tileOnLoad:function(n,r){Wn?setTimeout(c(n,this,null,r),0):n(null,r)},_tileOnError:function(n,r,s){var u=this.options.errorTileUrl;u&&r.getAttribute("src")!==u&&(r.src=u),n(s,r)},_onTileRemove:function(n){n.tile.onload=null},_getZoomForUrl:function(){var n=this._tileZoom,r=this.options.maxZoom,s=this.options.zoomReverse,u=this.options.zoomOffset;return s&&(n=r-n),n+u},_getSubdomain:function(n){var r=Math.abs(n.x+n.y)%this.options.subdomains.length;return this.options.subdomains[r]},_abortLoading:function(){var n,r;for(n in this._tiles)this._tiles[n].coords.z!==this._tileZoom&&(r=this._tiles[n].el,r.onload=P,r.onerror=P,r.complete||(r.src=j,he(r),delete this._tiles[n]))},_removeTile:function(n){var r=this._tiles[n];if(r)return bu||r.el.setAttribute("src",j),Ki.prototype._removeTile.call(this,n)},_tileReady:function(n,r,s){if(!(!this._map||s&&s.getAttribute("src")===j))return Ki.prototype._tileReady.call(this,n,r,s)}});function Nc(n,r){return new ni(n,r)}var zc=ni.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(n,r){this._url=n;var s=a({},this.defaultWmsParams);for(var u in r)u in this.options||(s[u]=r[u]);r=C(this,r);var h=r.detectRetina&&Qt?2:1,p=this.getTileSize();s.width=p.x*h,s.height=p.y*h,this.wmsParams=s},onAdd:function(n){this._crs=this.options.crs||n.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var r=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[r]=this._crs.code,ni.prototype.onAdd.call(this,n)},getTileUrl:function(n){var r=this._tileCoordsToNwSe(n),s=this._crs,u=te(s.project(r[0]),s.project(r[1])),h=u.min,p=u.max,v=(this._wmsVersion>=1.3&&this._crs===Pc?[h.y,h.x,p.y,p.x]:[h.x,h.y,p.x,p.y]).join(","),x=ni.prototype.getTileUrl.call(this,n);return x+H(this.wmsParams,x,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+v},setParams:function(n,r){return a(this.wmsParams,n),r||this.redraw(),this}});function Im(n,r){return new zc(n,r)}ni.WMS=zc,Nc.wms=Im;var St=ht.extend({options:{padding:.1,tolerance:0},initialize:function(n){C(this,n),f(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&G(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 n={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(n.zoomanim=this._onAnimZoom),n},_onAnimZoom:function(n){this._updateTransform(n.center,n.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(n,r){var s=this._map.getZoomScale(r,this._zoom),u=Yt(this._container),h=this._map.getSize().multiplyBy(.5+this.options.padding),p=this._map.project(this._center,r),v=this._map.project(n,r),x=v.subtract(p),E=h.multiplyBy(-s).add(u).add(h).subtract(x);et?Pn(this._container,E,s):we(this._container,E)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var n in this._layers)this._layers[n]._reset()},_onZoomEnd:function(){for(var n in this._layers)this._layers[n]._project()},_updatePaths:function(){for(var n in this._layers)this._layers[n]._update()},_update:function(){var n=this.options.padding,r=this._map.getSize(),s=this._map.containerPointToLayerPoint(r.multiplyBy(-n)).round();this._bounds=new V(s,s.add(r.multiplyBy(1+n*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Mc=St.extend({getEvents:function(){var n=St.prototype.getEvents.call(this);return n.viewprereset=this._onViewPreReset,n},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){St.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var n=this._container=document.createElement("canvas");Q(n,"mousemove",this._onMouseMove,this),Q(n,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Q(n,"mouseout",this._handleMouseOut,this),this._ctx=n.getContext("2d")},_destroyContainer:function(){ye(this._redrawRequest),delete this._ctx,he(this._container),ve(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var n;this._redrawBounds=null;for(var r in this._layers)n=this._layers[r],n._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){St.prototype._update.call(this);var n=this._bounds,r=this._container,s=n.getSize(),u=Qt?2:1;we(r,n.min),r.width=u*s.x,r.height=u*s.y,r.style.width=s.x+"px",r.style.height=s.y+"px",Qt&&this._ctx.scale(2,2),this._ctx.translate(-n.min.x,-n.min.y),this.fire("update")}},_reset:function(){St.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(n){this._updateDashArray(n),this._layers[f(n)]=n;var r=n._order={layer:n,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=r),this._drawLast=r,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(n){this._requestRedraw(n)},_removePath:function(n){var r=n._order,s=r.next,u=r.prev;s?s.prev=u:this._drawLast=u,u?u.next=s:this._drawFirst=s,delete n._order,delete this._layers[f(n)],this._requestRedraw(n)},_updatePath:function(n){this._extendRedrawBounds(n),n._project(),n._update(),this._requestRedraw(n)},_updateStyle:function(n){this._updateDashArray(n),this._requestRedraw(n)},_updateDashArray:function(n){if(typeof n.options.dashArray=="string"){var r=n.options.dashArray.split(/[, ]+/),s=[],u,h;for(h=0;h')}}catch{return function(r){return document.createElement("<"+r+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),jm={_initContainer:function(){this._container=q("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(St.prototype._update.call(this),this.fire("update"))},_initPath:function(n){var r=n._container=Qi("shape");G(r,"leaflet-vml-shape "+(this.options.className||"")),r.coordsize="1 1",n._path=Qi("path"),r.appendChild(n._path),this._updateStyle(n),this._layers[f(n)]=n},_addPath:function(n){var r=n._container;this._container.appendChild(r),n.options.interactive&&n.addInteractiveTarget(r)},_removePath:function(n){var r=n._container;he(r),n.removeInteractiveTarget(r),delete this._layers[f(n)]},_updateStyle:function(n){var r=n._stroke,s=n._fill,u=n.options,h=n._container;h.stroked=!!u.stroke,h.filled=!!u.fill,u.stroke?(r||(r=n._stroke=Qi("stroke")),h.appendChild(r),r.weight=u.weight+"px",r.color=u.color,r.opacity=u.opacity,u.dashArray?r.dashStyle=w(u.dashArray)?u.dashArray.join(" "):u.dashArray.replace(/( *, *)/g," "):r.dashStyle="",r.endcap=u.lineCap.replace("butt","flat"),r.joinstyle=u.lineJoin):r&&(h.removeChild(r),n._stroke=null),u.fill?(s||(s=n._fill=Qi("fill")),h.appendChild(s),s.color=u.fillColor||u.color,s.opacity=u.fillOpacity):s&&(h.removeChild(s),n._fill=null)},_updateCircle:function(n){var r=n._point.round(),s=Math.round(n._radius),u=Math.round(n._radiusY||s);this._setPath(n,n._empty()?"M0 0":"AL "+r.x+","+r.y+" "+s+","+u+" 0,"+65535*360)},_setPath:function(n,r){n._path.v=r},_bringToFront:function(n){Kn(n._container)},_bringToBack:function(n){Qn(n._container)}},uo=Gr?Qi:Qu,Yi=St.extend({getEvents:function(){var n=St.prototype.getEvents.call(this);return n.zoomstart=this._onZoomStart,n},_initContainer:function(){this._container=uo("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=uo("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){he(this._container),ve(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){St.prototype._update.call(this);var n=this._bounds,r=n.getSize(),s=this._container;(!this._svgSize||!this._svgSize.equals(r))&&(this._svgSize=r,s.setAttribute("width",r.x),s.setAttribute("height",r.y)),we(s,n.min),s.setAttribute("viewBox",[n.min.x,n.min.y,r.x,r.y].join(" ")),this.fire("update")}},_initPath:function(n){var r=n._path=uo("path");n.options.className&&G(r,n.options.className),n.options.interactive&&G(r,"leaflet-interactive"),this._updateStyle(n),this._layers[f(n)]=n},_addPath:function(n){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(n._path),n.addInteractiveTarget(n._path)},_removePath:function(n){he(n._path),n.removeInteractiveTarget(n._path),delete this._layers[f(n)]},_updatePath:function(n){n._project(),n._update()},_updateStyle:function(n){var r=n._path,s=n.options;r&&(s.stroke?(r.setAttribute("stroke",s.color),r.setAttribute("stroke-opacity",s.opacity),r.setAttribute("stroke-width",s.weight),r.setAttribute("stroke-linecap",s.lineCap),r.setAttribute("stroke-linejoin",s.lineJoin),s.dashArray?r.setAttribute("stroke-dasharray",s.dashArray):r.removeAttribute("stroke-dasharray"),s.dashOffset?r.setAttribute("stroke-dashoffset",s.dashOffset):r.removeAttribute("stroke-dashoffset")):r.setAttribute("stroke","none"),s.fill?(r.setAttribute("fill",s.fillColor||s.color),r.setAttribute("fill-opacity",s.fillOpacity),r.setAttribute("fill-rule",s.fillRule||"evenodd")):r.setAttribute("fill","none"))},_updatePoly:function(n,r){this._setPath(n,Yu(n._parts,r))},_updateCircle:function(n){var r=n._point,s=Math.max(Math.round(n._radius),1),u=Math.max(Math.round(n._radiusY),1)||s,h="a"+s+","+u+" 0 1,0 ",p=n._empty()?"M0 0":"M"+(r.x-s)+","+r.y+h+s*2+",0 "+h+-s*2+",0 ";this._setPath(n,p)},_setPath:function(n,r){n._path.setAttribute("d",r)},_bringToFront:function(n){Kn(n._path)},_bringToBack:function(n){Qn(n._path)}});Gr&&Yi.include(jm);function Ic(n){return $r||Gr?new Yi(n):null}b.include({getRenderer:function(n){var r=n.options.renderer||this._getPaneRenderer(n.options.pane)||this.options.renderer||this._renderer;return r||(r=this._renderer=this._createRenderer()),this.hasLayer(r)||this.addLayer(r),r},_getPaneRenderer:function(n){if(n==="overlayPane"||n===void 0)return!1;var r=this._paneRenderers[n];return r===void 0&&(r=this._createRenderer({pane:n}),this._paneRenderers[n]=r),r},_createRenderer:function(n){return this.options.preferCanvas&&Oc(n)||Ic(n)}});var jc=qn.extend({initialize:function(n,r){qn.prototype.initialize.call(this,this._boundsToLatLngs(n),r)},setBounds:function(n){return this.setLatLngs(this._boundsToLatLngs(n))},_boundsToLatLngs:function(n){return n=oe(n),[n.getSouthWest(),n.getNorthWest(),n.getNorthEast(),n.getSouthEast()]}});function Rm(n,r){return new jc(n,r)}Yi.create=uo,Yi.pointsToPath=Yu,It.geometryToLayer=ga,It.coordsToLatLng=ya,It.coordsToLatLngs=oo,It.latLngToCoords=wa,It.latLngsToCoords=so,It.getFeature=Jn,It.asFeature=ao,b.mergeOptions({boxZoom:!0});var Rc=Pt.extend({initialize:function(n){this._map=n,this._container=n._container,this._pane=n._panes.overlayPane,this._resetStateTimeout=0,n.on("unload",this._destroy,this)},addHooks:function(){Q(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){ve(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){he(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(n){if(!n.shiftKey||n.which!==1&&n.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Fi(),ea(),this._startPoint=this._map.mouseEventToContainerPoint(n),Q(document,{contextmenu:zt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(n){this._moved||(this._moved=!0,this._box=q("div","leaflet-zoom-box",this._container),G(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(n);var r=new V(this._point,this._startPoint),s=r.getSize();we(this._box,r.min),this._box.style.width=s.x+"px",this._box.style.height=s.y+"px"},_finish:function(){this._moved&&(he(this._box),me(this._container,"leaflet-crosshair")),Ui(),ta(),ve(document,{contextmenu:zt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(n){if(!(n.which!==1&&n.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(c(this._resetState,this),0);var r=new ke(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(r).fire("boxzoomend",{boxZoomBounds:r})}},_onKeyDown:function(n){n.keyCode===27&&this._finish()}});b.addInitHook("addHandler","boxZoom",Rc),b.mergeOptions({doubleClickZoom:!0});var Bc=Pt.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(n){var r=this._map,s=r.getZoom(),u=r.options.zoomDelta,h=n.originalEvent.shiftKey?s-u:s+u;r.options.doubleClickZoom==="center"?r.setZoom(h):r.setZoomAround(n.containerPoint,h)}});b.addInitHook("addHandler","doubleClickZoom",Bc),b.mergeOptions({dragging:!0,inertia:!Ai,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Ac=Pt.extend({addHooks:function(){if(!this._draggable){var n=this._map;this._draggable=new kn(n._mapPane,n._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),n.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),n.on("zoomend",this._onZoomEnd,this),n.whenReady(this._onZoomEnd,this))}G(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){me(this._map._container,"leaflet-grab"),me(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 n=this._map;if(n._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var r=oe(this._map.options.maxBounds);this._offsetLimit=te(this._map.latLngToContainerPoint(r.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(r.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;n.fire("movestart").fire("dragstart"),n.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(n){if(this._map.options.inertia){var r=this._lastTime=+new Date,s=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(s),this._times.push(r),this._prunePositions(r)}this._map.fire("move",n).fire("drag",n)},_prunePositions:function(n){for(;this._positions.length>1&&n-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var n=this._map.getSize().divideBy(2),r=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=r.subtract(n).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(n,r){return n-(n-r)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var n=this._draggable._newPos.subtract(this._draggable._startPos),r=this._offsetLimit;n.xr.max.x&&(n.x=this._viscousLimit(n.x,r.max.x)),n.y>r.max.y&&(n.y=this._viscousLimit(n.y,r.max.y)),this._draggable._newPos=this._draggable._startPos.add(n)}},_onPreDragWrap:function(){var n=this._worldWidth,r=Math.round(n/2),s=this._initialWorldOffset,u=this._draggable._newPos.x,h=(u-r+s)%n+r-s,p=(u+r+s)%n-r-s,v=Math.abs(h+s)0?p:-p))-r;this._delta=0,this._startTime=null,v&&(n.options.scrollWheelZoom==="center"?n.setZoom(r+v):n.setZoomAround(this._lastMousePos,r+v))}});b.addInitHook("addHandler","scrollWheelZoom",Zc),b.mergeOptions({tap:!0,tapTolerance:15});var Fc=Pt.extend({addHooks:function(){Q(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){ve(this._map._container,"touchstart",this._onDown,this)},_onDown:function(n){if(n.touches){if(nt(n),this._fireClick=!0,n.touches.length>1){this._fireClick=!1,clearTimeout(this._holdTimeout);return}var r=n.touches[0],s=r.target;this._startPos=this._newPos=new T(r.clientX,r.clientY),s.tagName&&s.tagName.toLowerCase()==="a"&&G(s,"leaflet-active"),this._holdTimeout=setTimeout(c(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",r))},this),1e3),this._simulateEvent("mousedown",r),Q(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(n){if(clearTimeout(this._holdTimeout),ve(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&n&&n.changedTouches){var r=n.changedTouches[0],s=r.target;s&&s.tagName&&s.tagName.toLowerCase()==="a"&&me(s,"leaflet-active"),this._simulateEvent("mouseup",r),this._isTapValid()&&this._simulateEvent("click",r)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(n){var r=n.touches[0];this._newPos=new T(r.clientX,r.clientY),this._simulateEvent("mousemove",r)},_simulateEvent:function(n,r){var s=document.createEvent("MouseEvents");s._simulated=!0,r.target._simulatedClick=!0,s.initMouseEvent(n,!0,!0,window,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),r.target.dispatchEvent(s)}});wt&&(!yt||Vr)&&b.addInitHook("addHandler","tap",Fc),b.mergeOptions({touchZoom:wt&&!Ai,bounceAtZoomLimits:!0});var Uc=Pt.extend({addHooks:function(){G(this._map._container,"leaflet-touch-zoom"),Q(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){me(this._map._container,"leaflet-touch-zoom"),ve(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(n){var r=this._map;if(!(!n.touches||n.touches.length!==2||r._animatingZoom||this._zooming)){var s=r.mouseEventToContainerPoint(n.touches[0]),u=r.mouseEventToContainerPoint(n.touches[1]);this._centerPoint=r.getSize()._divideBy(2),this._startLatLng=r.containerPointToLatLng(this._centerPoint),r.options.touchZoom!=="center"&&(this._pinchStartLatLng=r.containerPointToLatLng(s.add(u)._divideBy(2))),this._startDist=s.distanceTo(u),this._startZoom=r.getZoom(),this._moved=!1,this._zooming=!0,r._stop(),Q(document,"touchmove",this._onTouchMove,this),Q(document,"touchend",this._onTouchEnd,this),nt(n)}},_onTouchMove:function(n){if(!(!n.touches||n.touches.length!==2||!this._zooming)){var r=this._map,s=r.mouseEventToContainerPoint(n.touches[0]),u=r.mouseEventToContainerPoint(n.touches[1]),h=s.distanceTo(u)/this._startDist;if(this._zoom=r.getScaleZoom(h,this._startZoom),!r.options.bounceAtZoomLimits&&(this._zoomr.getMaxZoom()&&h>1)&&(this._zoom=r._limitZoom(this._zoom)),r.options.touchZoom==="center"){if(this._center=this._startLatLng,h===1)return}else{var p=s._add(u)._divideBy(2)._subtract(this._centerPoint);if(h===1&&p.x===0&&p.y===0)return;this._center=r.unproject(r.project(this._pinchStartLatLng,this._zoom).subtract(p),this._zoom)}this._moved||(r._moveStart(!0,!1),this._moved=!0),ye(this._animRequest);var v=c(r._move,r,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=re(v,this,!0),nt(n)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,ye(this._animRequest),ve(document,"touchmove",this._onTouchMove,this),ve(document,"touchend",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))}});b.addInitHook("addHandler","touchZoom",Uc),b.BoxZoom=Rc,b.DoubleClickZoom=Bc,b.Drag=Ac,b.Keyboard=Dc,b.ScrollWheelZoom=Zc,b.Tap=Fc,b.TouchZoom=Uc,i.version=o,i.Control=ct,i.control=Vi,i.Browser=Wp,i.Evented=Nt,i.Mixin=am,i.Util=xn,i.Class=Je,i.Handler=Pt,i.extend=a,i.bind=c,i.stamp=f,i.setOptions=C,i.DomEvent=tm,i.DomUtil=Jp,i.PosAnimation=hc,i.Draggable=kn,i.LineUtil=fm,i.PolyUtil=dm,i.Point=T,i.point=R,i.Bounds=V,i.bounds=te,i.Transformation=Bs,i.transformation=Ri,i.Projection=pm,i.LatLng=ee,i.latLng=ne,i.LatLngBounds=ke,i.latLngBounds=oe,i.CRS=Ue,i.GeoJSON=It,i.geoJSON=Lc,i.geoJson=Lm,i.Layer=ht,i.LayerGroup=Yn,i.layerGroup=vm,i.FeatureGroup=bn,i.featureGroup=gm,i.ImageOverlay=lo,i.imageOverlay=Em,i.VideoOverlay=Ec,i.videoOverlay=Cm,i.SVGOverlay=Cc,i.svgOverlay=Tm,i.DivOverlay=jt,i.Popup=ei,i.popup=Nm,i.Tooltip=ti,i.tooltip=zm,i.Icon=Xn,i.icon=ym,i.DivIcon=Tc,i.divIcon=Mm,i.Marker=io,i.marker=wm,i.TileLayer=ni,i.tileLayer=Nc,i.GridLayer=Ki,i.gridLayer=Om,i.SVG=Yi,i.svg=Ic,i.Renderer=St,i.Canvas=Mc,i.canvas=Oc,i.Path=bt,i.CircleMarker=ro,i.circleMarker=xm,i.Circle=va,i.circle=Pm,i.Polyline=Ot,i.polyline=Sm,i.Polygon=qn,i.polygon=km,i.Rectangle=jc,i.rectangle=Rm,i.Map=b,i.map=nm;var Bm=window.L;i.noConflict=function(){return window.L=Bm,this},window.L=i})})(Kl,Kl.exports);var Ni=Kl.exports;function vy(e,t){const[i,o]=A.useState(null),a=A.useRef(!1);return A.useEffect(()=>{if(e.current!==null&&!a.current){const l=new Ni.Map(e.current,{center:{lat:52.3,lng:4.99},zoom:10}),c=new Ni.TileLayer("https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO'});l.addLayer(c),o(l),a.current=!0}},[e,t]),i}const gy=new Ni.Icon({iconUrl:"https://assets.htmlacademy.ru/content/intensive/javascript-1/demo/interactive-map/pin.svg",iconSize:[40,40],iconAnchor:[20,40]}),yy=new Ni.Icon({iconUrl:"https://assets.htmlacademy.ru/content/intensive/javascript-1/demo/interactive-map/main-pin.svg",iconSize:[40,40],iconAnchor:[20,40]});function Rp(e){const{offers:t,selectedPoint:i}=e,o=A.useRef(null),a=vy(o,"Амстердам");return A.useEffect(()=>{if(a){const l=Ni.layerGroup().addTo(a);return t.forEach(c=>{new Ni.Marker({lat:c.latitude,lng:c.longitude}).setIcon(i!==void 0&&c.title===i.title?yy:gy).addTo(l)}),()=>{a.removeLayer(l)}}},[a,t,i]),m.jsx("div",{style:{height:"500px"},ref:o})}const wy=({offers:e})=>m.jsxs("div",{className:"page page--gray page--main",children:[m.jsx("header",{className:"header",children:m.jsx("div",{className:"container",children:m.jsxs("div",{className:"header__wrapper",children:[m.jsx("div",{className:"header__left",children:m.jsx("a",{className:"header__logo-link header__logo-link--active",children:m.jsx("img",{className:"header__logo",src:"img/logo.svg",alt:"6 cities logo",width:"81",height:"41"})})}),m.jsx("nav",{className:"header__nav",children:m.jsxs("ul",{className:"header__nav-list",children:[m.jsx("li",{className:"header__nav-item user",children:m.jsxs("a",{className:"header__nav-link header__nav-link--profile",href:"#",children:[m.jsx("div",{className:"header__avatar-wrapper user__avatar-wrapper"}),m.jsx("span",{className:"header__user-name user__name",children:"nawwarkheder@gmail.com"}),m.jsx("span",{className:"header__favorite-count",children:"3"})]})}),m.jsx("li",{className:"header__nav-item",children:m.jsx("a",{className:"header__nav-link",href:"#",children:m.jsx("span",{className:"header__signout",children:"Sign out"})})})]})})]})})}),m.jsxs("main",{className:"page__main page__main--index",children:[m.jsx("h1",{className:"visually-hidden",children:"Cities"}),m.jsx("div",{className:"tabs",children:m.jsx("section",{className:"locations container",children:m.jsxs("ul",{className:"locations__list tabs__list",children:[m.jsx("li",{className:"locations__item",children:m.jsx("a",{className:"locations__item-link tabs__item",href:"#",children:m.jsx("span",{children:"Paris"})})}),m.jsx("li",{className:"locations__item",children:m.jsx("a",{className:"locations__item-link tabs__item",href:"#",children:m.jsx("span",{children:"Cologne"})})}),m.jsx("li",{className:"locations__item",children:m.jsx("a",{className:"locations__item-link tabs__item",href:"#",children:m.jsx("span",{children:"Brussels"})})}),m.jsx("li",{className:"locations__item",children:m.jsx("a",{className:"locations__item-link tabs__item tabs__item--active",children:m.jsx("span",{children:"Amsterdam"})})}),m.jsx("li",{className:"locations__item",children:m.jsx("a",{className:"locations__item-link tabs__item",href:"#",children:m.jsx("span",{children:"Hamburg"})})}),m.jsx("li",{className:"locations__item",children:m.jsx("a",{className:"locations__item-link tabs__item",href:"#",children:m.jsx("span",{children:"Dusseldorf"})})})]})})}),m.jsx("div",{className:"cities",children:m.jsxs("div",{className:"cities__places-container container",children:[m.jsxs("section",{className:"cities__places places",children:[m.jsx("h2",{className:"visually-hidden",children:"Places"}),m.jsxs("b",{className:"places__found",children:[e.length," places to stay in Amsterdam"]}),m.jsxs("form",{className:"places__sorting",action:"#",method:"get",children:[m.jsx("span",{className:"places__sorting-caption",children:"Sort by"}),m.jsxs("span",{className:"places__sorting-type",tabIndex:0,children:["Popular",m.jsx("svg",{className:"places__sorting-arrow",width:"7",height:"4",children:m.jsx("use",{xlinkHref:"#icon-arrow-select"})})]}),m.jsxs("ul",{className:"places__options places__options--custom places__options--opened",children:[m.jsx("li",{className:"places__option places__option--active",tabIndex:0,children:"Popular"}),m.jsx("li",{className:"places__option",tabIndex:0,children:"Price: low to high"}),m.jsx("li",{className:"places__option",tabIndex:0,children:"Price: high to low"}),m.jsx("li",{className:"places__option",tabIndex:0,children:"Top rated first"})]})]}),m.jsx("div",{className:"cities__places-list places__list tabs__content",children:m.jsx(jp,{offers:e})})]}),m.jsx("div",{className:"cities__right-section",children:m.jsx("section",{className:"cities__map map",children:m.jsx(Rp,{offers:e,selectedPoint:e[3]})})})]})})]})]}),xy=({offers:e})=>m.jsx("div",{className:"page",children:m.jsx("main",{className:"page__main page__main--favorites",children:m.jsx("div",{className:"page__favorites-container container",children:m.jsxs("section",{className:"favorites",children:[m.jsx("h1",{className:"favorites__title",children:"Saved listings"}),m.jsx("div",{className:"favorites__list",children:e.map(t=>m.jsx(Ip,{offer:t},t.id))})]})})})});function Py(){return m.jsxs("div",{className:"page page--gray page--login",children:[m.jsx("header",{className:"header",children:m.jsx("div",{className:"container",children:m.jsx("div",{className:"header__wrapper",children:m.jsx("div",{className:"header__left",children:m.jsx("a",{className:"header__logo-link",href:"main.html",children:m.jsx("img",{className:"header__logo",src:"img/logo.svg",alt:"6 cities logo",width:"81",height:"41"})})})})})}),m.jsx("main",{className:"page__main page__main--login",children:m.jsxs("div",{className:"page__login-container container",children:[m.jsxs("section",{className:"login",children:[m.jsx("h1",{className:"login__title",children:"Sign in"}),m.jsxs("form",{className:"login__form form",action:"#",method:"post",children:[m.jsxs("div",{className:"login__input-wrapper form__input-wrapper",children:[m.jsx("label",{className:"visually-hidden",children:"E-mail"}),m.jsx("input",{className:"login__input form__input",type:"email",name:"email",placeholder:"Email",required:!0})]}),m.jsxs("div",{className:"login__input-wrapper form__input-wrapper",children:[m.jsx("label",{className:"visually-hidden",children:"Password"}),m.jsx("input",{className:"login__input form__input",type:"password",name:"password",placeholder:"Password",required:!0})]}),m.jsx("button",{className:"login__submit form__submit button",type:"submit",children:"Sign in"})]})]}),m.jsx("section",{className:"locations locations--login locations--current",children:m.jsx("div",{className:"locations__item",children:m.jsx("a",{className:"locations__item-link",href:"#",children:m.jsx("span",{children:"Amsterdam"})})})})]})})]})}const Sy=()=>{const[e,t]=A.useState(0),[i,o]=A.useState(""),a=c=>{c.preventDefault()},l=[5,4,3,2,1];return m.jsxs("form",{className:"reviews__form form",onSubmit:a,children:[m.jsx("label",{className:"reviews__label form__label",htmlFor:"review",children:"Your review"}),m.jsx("div",{className:"reviews__rating-form form__rating",children:l.map(c=>m.jsxs(Jl.Fragment,{children:[m.jsx("input",{className:"form__rating-input visually-hidden",name:"rating",value:c,id:`${c}-stars`,type:"radio",onChange:()=>t(c)}),m.jsx("label",{htmlFor:`${c}-stars`,className:"reviews__rating-label form__rating-label",title:`${c} stars`,children:m.jsx("svg",{className:"form__star-image",width:"37",height:"33",children:m.jsx("use",{xlinkHref:"#icon-star"})})})]},c))}),m.jsx("textarea",{className:"reviews__textarea form__textarea",id:"review",name:"review",placeholder:"Tell how was your stay, what you like and what can be improved",value:i,onChange:c=>o(c.target.value)}),m.jsxs("div",{className:"reviews__button-wrapper",children:[m.jsxs("p",{className:"reviews__help",children:["To submit review please make sure to set ",m.jsx("span",{className:"reviews__star",children:"rating"})," and describe your stay with at least ",m.jsx("b",{className:"reviews__text-amount",children:"10 characters"}),"."]}),m.jsx("button",{className:"reviews__submit form__submit button",type:"submit",disabled:i.length<10||e===0,children:"Submit"})]})]})};var Bp={exports:{}};/*! + */(function(e,t){(function(i,o){o(t)})(Gm,function(i){var o="1.7.1";function a(n){var r,s,u,h;for(s=1,u=arguments.length;s"u"||!L||!L.Mixin)){n=w(n)?n:[n];for(var r=0;r0?Math.floor(n):Math.ceil(n)};T.prototype={clone:function(){return new T(this.x,this.y)},add:function(n){return this.clone()._add(R(n))},_add:function(n){return this.x+=n.x,this.y+=n.y,this},subtract:function(n){return this.clone()._subtract(R(n))},_subtract:function(n){return this.x-=n.x,this.y-=n.y,this},divideBy:function(n){return this.clone()._divideBy(n)},_divideBy:function(n){return this.x/=n,this.y/=n,this},multiplyBy:function(n){return this.clone()._multiplyBy(n)},_multiplyBy:function(n){return this.x*=n,this.y*=n,this},scaleBy:function(n){return new T(this.x*n.x,this.y*n.y)},unscaleBy:function(n){return new T(this.x/n.x,this.y/n.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=$(this.x),this.y=$(this.y),this},distanceTo:function(n){n=R(n);var r=n.x-this.x,s=n.y-this.y;return Math.sqrt(r*r+s*s)},equals:function(n){return n=R(n),n.x===this.x&&n.y===this.y},contains:function(n){return n=R(n),Math.abs(n.x)<=Math.abs(this.x)&&Math.abs(n.y)<=Math.abs(this.y)},toString:function(){return"Point("+k(this.x)+", "+k(this.y)+")"}};function R(n,r,s){return n instanceof T?n:w(n)?new T(n[0],n[1]):n==null?n:typeof n=="object"&&"x"in n&&"y"in n?new T(n.x,n.y):new T(n,r,s)}function V(n,r){if(n)for(var s=r?[n,r]:n,u=0,h=s.length;u=this.min.x&&s.x<=this.max.x&&r.y>=this.min.y&&s.y<=this.max.y},intersects:function(n){n=te(n);var r=this.min,s=this.max,u=n.min,h=n.max,p=h.x>=r.x&&u.x<=s.x,v=h.y>=r.y&&u.y<=s.y;return p&&v},overlaps:function(n){n=te(n);var r=this.min,s=this.max,u=n.min,h=n.max,p=h.x>r.x&&u.xr.y&&u.y=r.lat&&h.lat<=s.lat&&u.lng>=r.lng&&h.lng<=s.lng},intersects:function(n){n=oe(n);var r=this._southWest,s=this._northEast,u=n.getSouthWest(),h=n.getNorthEast(),p=h.lat>=r.lat&&u.lat<=s.lat,v=h.lng>=r.lng&&u.lng<=s.lng;return p&&v},overlaps:function(n){n=oe(n);var r=this._southWest,s=this._northEast,u=n.getSouthWest(),h=n.getNorthEast(),p=h.lat>r.lat&&u.latr.lng&&u.lng1,Vn=function(){var n=!1;try{var r=Object.defineProperty({},"passive",{get:function(){n=!0}});window.addEventListener("testPassiveEventSupport",P,r),window.removeEventListener("testPassiveEventSupport",P,r)}catch{}return n}(),nc=function(){return!!document.createElement("canvas").getContext}(),$r=!!(document.createElementNS&&Qu("svg").createSVGRect),Gr=!$r&&function(){try{var n=document.createElement("div");n.innerHTML='';var r=n.firstChild;return r.style.behavior="url(#default#VML)",r&&typeof r.adj=="object"}catch{return!1}}();function xt(n){return navigator.userAgent.toLowerCase().indexOf(n)>=0}var Wp={ie:Wr,ielt9:Wn,edge:Hr,webkit:Zs,android:Bi,android23:Ai,androidStock:bu,opera:Fs,chrome:Us,gecko:Ws,safari:Vr,phantom:Xu,opera12:qu,win:Ju,ie3d:Hs,webkit3d:Vs,gecko3d:ec,any3d:et,mobile:Hn,mobileWebkit:Zp,mobileWebkit3d:Fp,msPointer:Kt,pointer:yt,touch:wt,mobileOpera:tc,mobileGecko:Up,retina:Qt,passiveEvents:Vn,canvas:nc,svg:$r,vml:Gr},$s=Kt?"MSPointerDown":"pointerdown",Gs=Kt?"MSPointerMove":"pointermove",Ks=Kt?"MSPointerUp":"pointerup",Qs=Kt?"MSPointerCancel":"pointercancel",$n={},ic=!1;function Hp(n,r,s,u){return r==="touchstart"?$p(n,s,u):r==="touchmove"?Qp(n,s,u):r==="touchend"&&Yp(n,s,u),this}function Vp(n,r,s){var u=n["_leaflet_"+r+s];return r==="touchstart"?n.removeEventListener($s,u,!1):r==="touchmove"?n.removeEventListener(Gs,u,!1):r==="touchend"&&(n.removeEventListener(Ks,u,!1),n.removeEventListener(Qs,u,!1)),this}function $p(n,r,s){var u=c(function(h){h.MSPOINTER_TYPE_TOUCH&&h.pointerType===h.MSPOINTER_TYPE_TOUCH&&nt(h),Ys(h,r)});n["_leaflet_touchstart"+s]=u,n.addEventListener($s,u,!1),ic||(document.addEventListener($s,Gp,!0),document.addEventListener(Gs,Kp,!0),document.addEventListener(Ks,rc,!0),document.addEventListener(Qs,rc,!0),ic=!0)}function Gp(n){$n[n.pointerId]=n}function Kp(n){$n[n.pointerId]&&($n[n.pointerId]=n)}function rc(n){delete $n[n.pointerId]}function Ys(n,r){n.touches=[];for(var s in $n)n.touches.push($n[s]);n.changedTouches=[n],r(n)}function Qp(n,r,s){var u=function(h){h.pointerType===(h.MSPOINTER_TYPE_MOUSE||"mouse")&&h.buttons===0||Ys(h,r)};n["_leaflet_touchmove"+s]=u,n.addEventListener(Gs,u,!1)}function Yp(n,r,s){var u=function(h){Ys(h,r)};n["_leaflet_touchend"+s]=u,n.addEventListener(Ks,u,!1),n.addEventListener(Qs,u,!1)}var Kr=Kt?"MSPointerDown":yt?"pointerdown":"touchstart",Qr=Kt?"MSPointerUp":yt?"pointerup":"touchend",Gn="_leaflet_";function bp(n,r,s){var u,h,p=!1,v=250;function x(N){if(yt){if(!N.isPrimary||N.pointerType==="mouse")return}else if(N.touches.length>1)return;var B=Date.now(),W=B-(u||B);h=N.touches?N.touches[0]:N,p=W>0&&W<=v,u=B}function E(N){if(p&&!h.cancelBubble){if(yt){if(N.pointerType==="mouse")return;var B={},W,J;for(J in h)W=h[J],B[J]=W&&W.bind?W.bind(h):W;h=B}h.type="dblclick",h.button=0,r(h),u=null}}return n[Gn+Kr+s]=x,n[Gn+Qr+s]=E,n[Gn+"dblclick"+s]=r,n.addEventListener(Kr,x,Vn?{passive:!1}:!1),n.addEventListener(Qr,E,Vn?{passive:!1}:!1),n.addEventListener("dblclick",r,!1),this}function Xp(n,r){var s=n[Gn+Kr+r],u=n[Gn+Qr+r],h=n[Gn+"dblclick"+r];return n.removeEventListener(Kr,s,Vn?{passive:!1}:!1),n.removeEventListener(Qr,u,Vn?{passive:!1}:!1),n.removeEventListener("dblclick",h,!1),this}var bs=Xr(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Di=Xr(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),oc=Di==="webkitTransition"||Di==="OTransition"?Di+"End":"transitionend";function sc(n){return typeof n=="string"?document.getElementById(n):n}function Zi(n,r){var s=n.style[r]||n.currentStyle&&n.currentStyle[r];if((!s||s==="auto")&&document.defaultView){var u=document.defaultView.getComputedStyle(n,null);s=u?u[r]:null}return s==="auto"?null:s}function q(n,r,s){var u=document.createElement(n);return u.className=r||"",s&&s.appendChild(u),u}function he(n){var r=n.parentNode;r&&r.removeChild(n)}function Yr(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function Kn(n){var r=n.parentNode;r&&r.lastChild!==n&&r.appendChild(n)}function Qn(n){var r=n.parentNode;r&&r.firstChild!==n&&r.insertBefore(n,r.firstChild)}function Xs(n,r){if(n.classList!==void 0)return n.classList.contains(r);var s=br(n);return s.length>0&&new RegExp("(^|\\s)"+r+"(\\s|$)").test(s)}function G(n,r){if(n.classList!==void 0)for(var s=M(r),u=0,h=s.length;uthis.options.maxZoom)?this.setZoom(n):this},panInsideBounds:function(n,r){this._enforcingBounds=!0;var s=this.getCenter(),u=this._limitCenter(s,this._zoom,oe(n));return s.equals(u)||this.panTo(u,r),this._enforcingBounds=!1,this},panInside:function(n,r){r=r||{};var s=R(r.paddingTopLeft||r.padding||[0,0]),u=R(r.paddingBottomRight||r.padding||[0,0]),h=this.getCenter(),p=this.project(h),v=this.project(n),x=this.getPixelBounds(),E=x.getSize().divideBy(2),N=te([x.min.add(s),x.max.subtract(u)]);if(!N.contains(v)){this._enforcingBounds=!0;var B=p.subtract(v),W=R(v.x+B.x,v.y+B.y);(v.xN.max.x)&&(W.x=p.x-B.x,B.x>0?W.x+=E.x-s.x:W.x-=E.x-u.x),(v.yN.max.y)&&(W.y=p.y-B.y,B.y>0?W.y+=E.y-s.y:W.y-=E.y-u.y),this.panTo(this.unproject(W),r),this._enforcingBounds=!1}return this},invalidateSize:function(n){if(!this._loaded)return this;n=a({animate:!1,pan:!0},n===!0?{animate:!0}:n);var r=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var s=this.getSize(),u=r.divideBy(2).round(),h=s.divideBy(2).round(),p=u.subtract(h);return!p.x&&!p.y?this:(n.animate&&n.pan?this.panBy(p):(n.pan&&this._rawPanBy(p),this.fire("move"),n.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(c(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:r,newSize:s}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(n){if(n=this._locateOptions=a({timeout:1e4,watch:!1},n),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var r=c(this._handleGeolocationResponse,this),s=c(this._handleGeolocationError,this);return n.watch?this._locationWatchId=navigator.geolocation.watchPosition(r,s,n):navigator.geolocation.getCurrentPosition(r,s,n),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(n){var r=n.code,s=n.message||(r===1?"permission denied":r===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:r,message:"Geolocation error: "+s+"."})},_handleGeolocationResponse:function(n){var r=n.coords.latitude,s=n.coords.longitude,u=new ee(r,s),h=u.toBounds(n.coords.accuracy*2),p=this._locateOptions;if(p.setView){var v=this.getBoundsZoom(h);this.setView(u,p.maxZoom?Math.min(v,p.maxZoom):v)}var x={latlng:u,bounds:h,timestamp:n.timestamp};for(var E in n.coords)typeof n.coords[E]=="number"&&(x[E]=n.coords[E]);this.fire("locationfound",x)},addHandler:function(n,r){if(!r)return this;var s=this[n]=new r(this);return this._handlers.push(s),this.options[n]&&s.enable(),this},remove:function(){if(this._initEvents(!0),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{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),he(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(ye(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var n;for(n in this._layers)this._layers[n].remove();for(n in this._panes)he(this._panes[n]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(n,r){var s="leaflet-pane"+(n?" leaflet-"+n.replace("Pane","")+"-pane":""),u=q("div",s,r||this._mapPane);return n&&(this._panes[n]=u),u},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var n=this.getPixelBounds(),r=this.unproject(n.getBottomLeft()),s=this.unproject(n.getTopRight());return new ke(r,s)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(n,r,s){n=oe(n),s=R(s||[0,0]);var u=this.getZoom()||0,h=this.getMinZoom(),p=this.getMaxZoom(),v=n.getNorthWest(),x=n.getSouthEast(),E=this.getSize().subtract(s),N=te(this.project(x,u),this.project(v,u)).getSize(),B=et?this.options.zoomSnap:1,W=E.x/N.x,J=E.y/N.y,Rt=r?Math.max(W,J):Math.min(W,J);return u=this.getScaleZoom(Rt,u),B&&(u=Math.round(u/(B/100))*(B/100),u=r?Math.ceil(u/B)*B:Math.floor(u/B)*B),Math.max(h,Math.min(p,u))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new T(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(n,r){var s=this._getTopLeftPoint(n,r);return new V(s,s.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(n){return this.options.crs.getProjectedBounds(n===void 0?this.getZoom():n)},getPane:function(n){return typeof n=="string"?this._panes[n]:n},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(n,r){var s=this.options.crs;return r=r===void 0?this._zoom:r,s.scale(n)/s.scale(r)},getScaleZoom:function(n,r){var s=this.options.crs;r=r===void 0?this._zoom:r;var u=s.zoom(n*s.scale(r));return isNaN(u)?1/0:u},project:function(n,r){return r=r===void 0?this._zoom:r,this.options.crs.latLngToPoint(ne(n),r)},unproject:function(n,r){return r=r===void 0?this._zoom:r,this.options.crs.pointToLatLng(R(n),r)},layerPointToLatLng:function(n){var r=R(n).add(this.getPixelOrigin());return this.unproject(r)},latLngToLayerPoint:function(n){var r=this.project(ne(n))._round();return r._subtract(this.getPixelOrigin())},wrapLatLng:function(n){return this.options.crs.wrapLatLng(ne(n))},wrapLatLngBounds:function(n){return this.options.crs.wrapLatLngBounds(oe(n))},distance:function(n,r){return this.options.crs.distance(ne(n),ne(r))},containerPointToLayerPoint:function(n){return R(n).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(n){return R(n).add(this._getMapPanePos())},containerPointToLatLng:function(n){var r=this.containerPointToLayerPoint(R(n));return this.layerPointToLatLng(r)},latLngToContainerPoint:function(n){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ne(n)))},mouseEventToContainerPoint:function(n){return uc(n,this._container)},mouseEventToLayerPoint:function(n){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(n))},mouseEventToLatLng:function(n){return this.layerPointToLatLng(this.mouseEventToLayerPoint(n))},_initContainer:function(n){var r=this._container=sc(n);if(r){if(r._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Q(r,"scroll",this._onScroll,this),this._containerId=f(r)},_initLayout:function(){var n=this._container;this._fadeAnimated=this.options.fadeAnimation&&et,G(n,"leaflet-container"+(wt?" leaflet-touch":"")+(Qt?" leaflet-retina":"")+(Wn?" leaflet-oldie":"")+(Vr?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var r=Zi(n,"position");r!=="absolute"&&r!=="relative"&&r!=="fixed"&&(n.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var n=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),we(this._mapPane,new T(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(G(n.markerPane,"leaflet-zoom-hide"),G(n.shadowPane,"leaflet-zoom-hide"))},_resetView:function(n,r){we(this._mapPane,new T(0,0));var s=!this._loaded;this._loaded=!0,r=this._limitZoom(r),this.fire("viewprereset");var u=this._zoom!==r;this._moveStart(u,!1)._move(n,r)._moveEnd(u),this.fire("viewreset"),s&&this.fire("load")},_moveStart:function(n,r){return n&&this.fire("zoomstart"),r||this.fire("movestart"),this},_move:function(n,r,s){r===void 0&&(r=this._zoom);var u=this._zoom!==r;return this._zoom=r,this._lastCenter=n,this._pixelOrigin=this._getNewPixelOrigin(n),(u||s&&s.pinch)&&this.fire("zoom",s),this.fire("move",s)},_moveEnd:function(n){return n&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return ye(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(n){we(this._mapPane,this._getMapPanePos().subtract(n))},_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(n){this._targets={},this._targets[f(this._container)]=this;var r=n?ve:Q;r(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&r(window,"resize",this._onResize,this),et&&this.options.transform3DLimit&&(n?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){ye(this._resizeRequest),this._resizeRequest=re(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var n=this._getMapPanePos();Math.max(Math.abs(n.x),Math.abs(n.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(n,r){for(var s=[],u,h=r==="mouseout"||r==="mouseover",p=n.target||n.srcElement,v=!1;p;){if(u=this._targets[f(p)],u&&(r==="click"||r==="preclick")&&!n._simulated&&this._draggableMoved(u)){v=!0;break}if(u&&u.listens(r,!0)&&(h&&!to(p,n)||(s.push(u),h))||p===this._container)break;p=p.parentNode}return!s.length&&!v&&!h&&to(p,n)&&(s=[this]),s},_handleDOMEvent:function(n){if(!(!this._loaded||ca(n))){var r=n.type;(r==="mousedown"||r==="keypress"||r==="keyup"||r==="keydown")&&ia(n.target||n.srcElement),this._fireDOMEvent(n,r)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(n,r,s){if(n.type==="click"){var u=a({},n);u.type="preclick",this._fireDOMEvent(u,u.type,s)}if(!n._stopped&&(s=(s||[]).concat(this._findEventTargets(n,r)),!!s.length)){var h=s[0];r==="contextmenu"&&h.listens(r,!0)&&nt(n);var p={originalEvent:n};if(n.type!=="keypress"&&n.type!=="keydown"&&n.type!=="keyup"){var v=h.getLatLng&&(!h._radius||h._radius<=10);p.containerPoint=v?this.latLngToContainerPoint(h.getLatLng()):this.mouseEventToContainerPoint(n),p.layerPoint=this.containerPointToLayerPoint(p.containerPoint),p.latlng=v?h.getLatLng():this.layerPointToLatLng(p.layerPoint)}for(var x=0;x0?Math.round(n-r)/2:Math.max(0,Math.ceil(n))-Math.max(0,Math.floor(r))},_limitZoom:function(n){var r=this.getMinZoom(),s=this.getMaxZoom(),u=et?this.options.zoomSnap:1;return u&&(n=Math.round(n/u)*u),Math.max(r,Math.min(s,n))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){me(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(n,r){var s=this._getCenterOffset(n)._trunc();return(r&&r.animate)!==!0&&!this.getSize().contains(s)?!1:(this.panBy(s,r),!0)},_createAnimProxy:function(){var n=this._proxy=q("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(n),this.on("zoomanim",function(r){var s=bs,u=this._proxy.style[s];Pn(this._proxy,this.project(r.center,r.zoom),this.getZoomScale(r.zoom,1)),u===this._proxy.style[s]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){he(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var n=this.getCenter(),r=this.getZoom();Pn(this._proxy,this.project(n,r),this.getZoomScale(r,1))},_catchTransitionEnd:function(n){this._animatingZoom&&n.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(n,r,s){if(this._animatingZoom)return!0;if(s=s||{},!this._zoomAnimated||s.animate===!1||this._nothingToAnimate()||Math.abs(r-this._zoom)>this.options.zoomAnimationThreshold)return!1;var u=this.getZoomScale(r),h=this._getCenterOffset(n)._divideBy(1-1/u);return s.animate!==!0&&!this.getSize().contains(h)?!1:(re(function(){this._moveStart(!0,!1)._animateZoom(n,r,!0)},this),!0)},_animateZoom:function(n,r,s,u){this._mapPane&&(s&&(this._animatingZoom=!0,this._animateToCenter=n,this._animateToZoom=r,G(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:n,zoom:r,noUpdate:u}),setTimeout(c(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&me(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),re(function(){this._moveEnd(!0)},this))}});function nm(n,r){return new b(n,r)}var ct=Je.extend({options:{position:"topright"},initialize:function(n){C(this,n)},getPosition:function(){return this.options.position},setPosition:function(n){var r=this._map;return r&&r.removeControl(this),this.options.position=n,r&&r.addControl(this),this},getContainer:function(){return this._container},addTo:function(n){this.remove(),this._map=n;var r=this._container=this.onAdd(n),s=this.getPosition(),u=n._controlCorners[s];return G(r,"leaflet-control"),s.indexOf("bottom")!==-1?u.insertBefore(r,u.firstChild):u.appendChild(r),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(he(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(n){this._map&&n&&n.screenX>0&&n.screenY>0&&this._map.getContainer().focus()}}),Vi=function(n){return new ct(n)};b.include({addControl:function(n){return n.addTo(this),this},removeControl:function(n){return n.remove(),this},_initControlPos:function(){var n=this._controlCorners={},r="leaflet-",s=this._controlContainer=q("div",r+"control-container",this._container);function u(h,p){var v=r+h+" "+r+p;n[h+p]=q("div",v,s)}u("top","left"),u("top","right"),u("bottom","left"),u("bottom","right")},_clearControlPos:function(){for(var n in this._controlCorners)he(this._controlCorners[n]);he(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var fc=ct.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(n,r,s,u){return s1,this._baseLayersList.style.display=n?"":"none"),this._separator.style.display=r&&n?"":"none",this},_onLayerChange:function(n){this._handlingClick||this._update();var r=this._getLayer(f(n.target)),s=r.overlay?n.type==="add"?"overlayadd":"overlayremove":n.type==="add"?"baselayerchange":null;s&&this._map.fire(s,r)},_createRadioElement:function(n,r){var s='",u=document.createElement("div");return u.innerHTML=s,u.firstChild},_addItem:function(n){var r=document.createElement("label"),s=this._map.hasLayer(n.layer),u;n.overlay?(u=document.createElement("input"),u.type="checkbox",u.className="leaflet-control-layers-selector",u.defaultChecked=s):u=this._createRadioElement("leaflet-base-layers_"+f(this),s),this._layerControlInputs.push(u),u.layerId=f(n.layer),Q(u,"click",this._onInputClick,this);var h=document.createElement("span");h.innerHTML=" "+n.name;var p=document.createElement("div");r.appendChild(p),p.appendChild(u),p.appendChild(h);var v=n.overlay?this._overlaysList:this._baseLayersList;return v.appendChild(r),this._checkDisabledLayers(),r},_onInputClick:function(){var n=this._layerControlInputs,r,s,u=[],h=[];this._handlingClick=!0;for(var p=n.length-1;p>=0;p--)r=n[p],s=this._getLayer(r.layerId).layer,r.checked?u.push(s):r.checked||h.push(s);for(p=0;p=0;h--)r=n[h],s=this._getLayer(r.layerId).layer,r.disabled=s.options.minZoom!==void 0&&us.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),im=function(n,r,s){return new fc(n,r,s)},ha=ct.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(n){var r="leaflet-control-zoom",s=q("div",r+" leaflet-bar"),u=this.options;return this._zoomInButton=this._createButton(u.zoomInText,u.zoomInTitle,r+"-in",s,this._zoomIn),this._zoomOutButton=this._createButton(u.zoomOutText,u.zoomOutTitle,r+"-out",s,this._zoomOut),this._updateDisabled(),n.on("zoomend zoomlevelschange",this._updateDisabled,this),s},onRemove:function(n){n.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(n){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(n.shiftKey?3:1))},_createButton:function(n,r,s,u,h){var p=q("a",s,u);return p.innerHTML=n,p.href="#",p.title=r,p.setAttribute("role","button"),p.setAttribute("aria-label",r),Hi(p),Q(p,"click",zt),Q(p,"click",h,this),Q(p,"click",this._refocusOnMap,this),p},_updateDisabled:function(){var n=this._map,r="leaflet-disabled";me(this._zoomInButton,r),me(this._zoomOutButton,r),(this._disabled||n._zoom===n.getMinZoom())&&G(this._zoomOutButton,r),(this._disabled||n._zoom===n.getMaxZoom())&&G(this._zoomInButton,r)}});b.mergeOptions({zoomControl:!0}),b.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new ha,this.addControl(this.zoomControl))});var rm=function(n){return new ha(n)},dc=ct.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(n){var r="leaflet-control-scale",s=q("div",r),u=this.options;return this._addScales(u,r+"-line",s),n.on(u.updateWhenIdle?"moveend":"move",this._update,this),n.whenReady(this._update,this),s},onRemove:function(n){n.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(n,r,s){n.metric&&(this._mScale=q("div",r,s)),n.imperial&&(this._iScale=q("div",r,s))},_update:function(){var n=this._map,r=n.getSize().y/2,s=n.distance(n.containerPointToLatLng([0,r]),n.containerPointToLatLng([this.options.maxWidth,r]));this._updateScales(s)},_updateScales:function(n){this.options.metric&&n&&this._updateMetric(n),this.options.imperial&&n&&this._updateImperial(n)},_updateMetric:function(n){var r=this._getRoundNum(n),s=r<1e3?r+" m":r/1e3+" km";this._updateScale(this._mScale,s,r/n)},_updateImperial:function(n){var r=n*3.2808399,s,u,h;r>5280?(s=r/5280,u=this._getRoundNum(s),this._updateScale(this._iScale,u+" mi",u/s)):(h=this._getRoundNum(r),this._updateScale(this._iScale,h+" ft",h/r))},_updateScale:function(n,r,s){n.style.width=Math.round(this.options.maxWidth*s)+"px",n.innerHTML=r},_getRoundNum:function(n){var r=Math.pow(10,(Math.floor(n)+"").length-1),s=n/r;return s=s>=10?10:s>=5?5:s>=3?3:s>=2?2:1,r*s}}),om=function(n){return new dc(n)},fa=ct.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(n){C(this,n),this._attributions={}},onAdd:function(n){n.attributionControl=this,this._container=q("div","leaflet-control-attribution"),Hi(this._container);for(var r in n._layers)n._layers[r].getAttribution&&this.addAttribution(n._layers[r].getAttribution());return this._update(),this._container},setPrefix:function(n){return this.options.prefix=n,this._update(),this},addAttribution:function(n){return n?(this._attributions[n]||(this._attributions[n]=0),this._attributions[n]++,this._update(),this):this},removeAttribution:function(n){return n?(this._attributions[n]&&(this._attributions[n]--,this._update()),this):this},_update:function(){if(this._map){var n=[];for(var r in this._attributions)this._attributions[r]&&n.push(r);var s=[];this.options.prefix&&s.push(this.options.prefix),n.length&&s.push(n.join(", ")),this._container.innerHTML=s.join(" | ")}}});b.mergeOptions({attributionControl:!0}),b.addInitHook(function(){this.options.attributionControl&&new fa().addTo(this)});var sm=function(n){return new fa(n)};ct.Layers=fc,ct.Zoom=ha,ct.Scale=dc,ct.Attribution=fa,Vi.layers=im,Vi.zoom=rm,Vi.scale=om,Vi.attribution=sm;var Pt=Je.extend({initialize:function(n){this._map=n},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Pt.addTo=function(n,r){return n.addHandler(r,this),this};var am={Events:Ne},pc=wt?"touchstart mousedown":"mousedown",mc={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},da={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},kn=Nt.extend({options:{clickTolerance:3},initialize:function(n,r,s,u){C(this,u),this._element=n,this._dragStartTarget=r||n,this._preventOutline=s},enable:function(){this._enabled||(Q(this._dragStartTarget,pc,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(kn._dragging===this&&this.finishDrag(),ve(this._dragStartTarget,pc,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(n){if(!(n._simulated||!this._enabled)&&(this._moved=!1,!Xs(this._element,"leaflet-zoom-anim")&&!(kn._dragging||n.shiftKey||n.which!==1&&n.button!==1&&!n.touches)&&(kn._dragging=this,this._preventOutline&&ia(this._element),ea(),Fi(),!this._moving))){this.fire("down");var r=n.touches?n.touches[0]:n,s=ac(this._element);this._startPoint=new T(r.clientX,r.clientY),this._parentScale=ra(s),Q(document,da[n.type],this._onMove,this),Q(document,mc[n.type],this._onUp,this)}},_onMove:function(n){if(!(n._simulated||!this._enabled)){if(n.touches&&n.touches.length>1){this._moved=!0;return}var r=n.touches&&n.touches.length===1?n.touches[0]:n,s=new T(r.clientX,r.clientY)._subtract(this._startPoint);!s.x&&!s.y||Math.abs(s.x)+Math.abs(s.y)p&&(v=x,p=E);p>s&&(r[v]=1,pa(n,r,s,u,v),pa(n,r,s,v,h))}function cm(n,r){for(var s=[n[0]],u=1,h=0,p=n.length;ur&&(s.push(n[u]),h=u);return hr.max.x&&(s|=2),n.yr.max.y&&(s|=8),s}function hm(n,r){var s=r.x-n.x,u=r.y-n.y;return s*s+u*u}function $i(n,r,s,u){var h=r.x,p=r.y,v=s.x-h,x=s.y-p,E=v*v+x*x,N;return E>0&&(N=((n.x-h)*v+(n.y-p)*x)/E,N>1?(h=s.x,p=s.y):N>0&&(h+=v*N,p+=x*N)),v=n.x-h,x=n.y-p,u?v*v+x*x:new T(h,p)}function Mt(n){return!w(n[0])||typeof n[0][0]!="object"&&typeof n[0][0]<"u"}function wc(n){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Mt(n)}var fm={simplify:_c,pointToSegmentDistance:vc,closestPointOnSegment:lm,clipSegment:yc,_getEdgeIntersection:no,_getBitCode:Ln,_sqClosestPointOnSegment:$i,isFlat:Mt,_flat:wc};function xc(n,r,s){var u,h=[1,4,2,8],p,v,x,E,N,B,W,J;for(p=0,B=n.length;p1e-7;x++)N=h*Math.sin(v),N=Math.pow((1-N)/(1+N),h/2),E=Math.PI/2-2*Math.atan(p*N)-v,v+=E;return new ee(v*r,n.x*r/s)}},pm={LonLat:ma,Mercator:_a,SphericalMercator:Rs},mm=a({},Gt,{code:"EPSG:3395",projection:_a,transformation:function(){var n=.5/(Math.PI*_a.R);return Ri(n,.5,-n,.5)}()}),Pc=a({},Gt,{code:"EPSG:4326",projection:ma,transformation:Ri(1/180,1,-1/180,.5)}),_m=a({},Ue,{projection:ma,transformation:Ri(1,0,-1,0),scale:function(n){return Math.pow(2,n)},zoom:function(n){return Math.log(n)/Math.LN2},distance:function(n,r){var s=r.lng-n.lng,u=r.lat-n.lat;return Math.sqrt(s*s+u*u)},infinite:!0});Ue.Earth=Gt,Ue.EPSG3395=mm,Ue.EPSG3857=As,Ue.EPSG900913=Ap,Ue.EPSG4326=Pc,Ue.Simple=_m;var ht=Nt.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(n){return n.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(n){return n&&n.removeLayer(this),this},getPane:function(n){return this._map.getPane(n?this.options[n]||n:this.options.pane)},addInteractiveTarget:function(n){return this._map._targets[f(n)]=this,this},removeInteractiveTarget:function(n){return delete this._map._targets[f(n)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(n){var r=n.target;if(r.hasLayer(this)){if(this._map=r,this._zoomAnimated=r._zoomAnimated,this.getEvents){var s=this.getEvents();r.on(s,this),this.once("remove",function(){r.off(s,this)},this)}this.onAdd(r),this.getAttribution&&r.attributionControl&&r.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),r.fire("layeradd",{layer:this})}}});b.include({addLayer:function(n){if(!n._layerAdd)throw new Error("The provided object is not a Layer.");var r=f(n);return this._layers[r]?this:(this._layers[r]=n,n._mapToAdd=this,n.beforeAdd&&n.beforeAdd(this),this.whenReady(n._layerAdd,n),this)},removeLayer:function(n){var r=f(n);return this._layers[r]?(this._loaded&&n.onRemove(this),n.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(n.getAttribution()),delete this._layers[r],this._loaded&&(this.fire("layerremove",{layer:n}),n.fire("remove")),n._map=n._mapToAdd=null,this):this},hasLayer:function(n){return!!n&&f(n)in this._layers},eachLayer:function(n,r){for(var s in this._layers)n.call(r,this._layers[s]);return this},_addLayers:function(n){n=n?w(n)?n:[n]:[];for(var r=0,s=n.length;rthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()r)return v=(u-r)/s,this._map.layerPointToLatLng([p.x-v*(p.x-h.x),p.y-v*(p.y-h.y)])},getBounds:function(){return this._bounds},addLatLng:function(n,r){return r=r||this._defaultShape(),n=ne(n),r.push(n),this._bounds.extend(n),this.redraw()},_setLatLngs:function(n){this._bounds=new ke,this._latlngs=this._convertLatLngs(n)},_defaultShape:function(){return Mt(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(n){for(var r=[],s=Mt(n),u=0,h=n.length;u=2&&r[0]instanceof ee&&r[0].equals(r[s-1])&&r.pop(),r},_setLatLngs:function(n){Ot.prototype._setLatLngs.call(this,n),Mt(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Mt(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var n=this._renderer._bounds,r=this.options.weight,s=new T(r,r);if(n=new V(n.min.subtract(s),n.max.add(s)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(n))){if(this.options.noClip){this._parts=this._rings;return}for(var u=0,h=this._rings.length,p;un.y!=h.y>n.y&&n.x<(h.x-u.x)*(n.y-u.y)/(h.y-u.y)+u.x&&(r=!r);return r||Ot.prototype._containsPoint.call(this,n,!0)}});function km(n,r){return new qn(n,r)}var It=bn.extend({initialize:function(n,r){C(this,r),this._layers={},n&&this.addData(n)},addData:function(n){var r=w(n)?n:n.features,s,u,h;if(r){for(s=0,u=r.length;s0?u:[r.src];return}w(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(r.style,"objectFit")&&(r.style.objectFit="fill"),r.autoplay=!!this.options.autoplay,r.loop=!!this.options.loop,r.muted=!!this.options.muted;for(var p=0;ph?(r.height=h+"px",G(n,p)):me(n,p),this._containerWidth=this._container.offsetWidth},_animateZoom:function(n){var r=this._map._latLngToNewLayerPoint(this._latlng,n.zoom,n.center),s=this._getAnchor();we(this._container,r.add(s))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var n=this._map,r=parseInt(Zi(this._container,"marginBottom"),10)||0,s=this._container.offsetHeight+r,u=this._containerWidth,h=new T(this._containerLeft,-s-this._containerBottom);h._add(Yt(this._container));var p=n.layerPointToContainerPoint(h),v=R(this.options.autoPanPadding),x=R(this.options.autoPanPaddingTopLeft||v),E=R(this.options.autoPanPaddingBottomRight||v),N=n.getSize(),B=0,W=0;p.x+u+E.x>N.x&&(B=p.x+u-N.x+E.x),p.x-B-x.x<0&&(B=p.x-x.x),p.y+s+E.y>N.y&&(W=p.y+s-N.y+E.y),p.y-W-x.y<0&&(W=p.y-x.y),(B||W)&&n.fire("autopanstart").panBy([B,W])}},_onCloseButtonClick:function(n){this._close(),zt(n)},_getAnchor:function(){return R(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Nm=function(n,r){return new ei(n,r)};b.mergeOptions({closePopupOnClick:!0}),b.include({openPopup:function(n,r,s){return n instanceof ei||(n=new ei(s).setContent(n)),r&&n.setLatLng(r),this.hasLayer(n)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=n,this.addLayer(n))},closePopup:function(n){return(!n||n===this._popup)&&(n=this._popup,this._popup=null),n&&this.removeLayer(n),this}}),ht.include({bindPopup:function(n,r){return n instanceof ei?(C(n,r),this._popup=n,n._source=this):((!this._popup||r)&&(this._popup=new ei(r,this)),this._popup.setContent(n)),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(n,r){return this._popup&&this._map&&(r=this._popup._prepareOpen(this,n,r),this._map.openPopup(this._popup,r)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(n){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(n)),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(n){return this._popup&&this._popup.setContent(n),this},getPopup:function(){return this._popup},_openPopup:function(n){var r=n.layer||n.target;if(this._popup&&this._map){if(zt(n),r instanceof bt){this.openPopup(n.layer||n.target,n.latlng);return}this._map.hasLayer(this._popup)&&this._popup._source===r?this.closePopup():this.openPopup(r,n.latlng)}},_movePopup:function(n){this._popup.setLatLng(n.latlng)},_onKeyPress:function(n){n.originalEvent.keyCode===13&&this._openPopup(n)}});var ti=jt.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(n){jt.prototype.onAdd.call(this,n),this.setOpacity(this.options.opacity),n.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(n){jt.prototype.onRemove.call(this,n),n.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var n=jt.prototype.getEvents.call(this);return wt&&!this.options.permanent&&(n.preclick=this._close),n},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var n="leaflet-tooltip",r=n+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=q("div",r)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(n){var r,s,u=this._map,h=this._container,p=u.latLngToContainerPoint(u.getCenter()),v=u.layerPointToContainerPoint(n),x=this.options.direction,E=h.offsetWidth,N=h.offsetHeight,B=R(this.options.offset),W=this._getAnchor();x==="top"?(r=E/2,s=N):x==="bottom"?(r=E/2,s=0):x==="center"?(r=E/2,s=N/2):x==="right"?(r=0,s=N/2):x==="left"?(r=E,s=N/2):v.xthis.options.maxZoom||su?this._retainParent(h,p,v,u):!1)},_retainChildren:function(n,r,s,u){for(var h=2*n;h<2*n+2;h++)for(var p=2*r;p<2*r+2;p++){var v=new T(h,p);v.z=s+1;var x=this._tileCoordsToKey(v),E=this._tiles[x];if(E&&E.active){E.retain=!0;continue}else E&&E.loaded&&(E.retain=!0);s+1this.options.maxZoom||this.options.minZoom!==void 0&&h1){this._setView(n,s);return}for(var W=h.min.y;W<=h.max.y;W++)for(var J=h.min.x;J<=h.max.x;J++){var Rt=new T(J,W);if(Rt.z=this._tileZoom,!!this._isValidTile(Rt)){var En=this._tiles[this._tileCoordsToKey(Rt)];En?En.current=!0:v.push(Rt)}}if(v.sort(function(Xt,Pa){return Xt.distanceTo(p)-Pa.distanceTo(p)}),v.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var co=document.createDocumentFragment();for(J=0;Js.max.x)||!r.wrapLat&&(n.ys.max.y))return!1}if(!this.options.bounds)return!0;var u=this._tileCoordsToBounds(n);return oe(this.options.bounds).overlaps(u)},_keyToBounds:function(n){return this._tileCoordsToBounds(this._keyToTileCoords(n))},_tileCoordsToNwSe:function(n){var r=this._map,s=this.getTileSize(),u=n.scaleBy(s),h=u.add(s),p=r.unproject(u,n.z),v=r.unproject(h,n.z);return[p,v]},_tileCoordsToBounds:function(n){var r=this._tileCoordsToNwSe(n),s=new ke(r[0],r[1]);return this.options.noWrap||(s=this._map.wrapLatLngBounds(s)),s},_tileCoordsToKey:function(n){return n.x+":"+n.y+":"+n.z},_keyToTileCoords:function(n){var r=n.split(":"),s=new T(+r[0],+r[1]);return s.z=+r[2],s},_removeTile:function(n){var r=this._tiles[n];r&&(he(r.el),delete this._tiles[n],this.fire("tileunload",{tile:r.el,coords:this._keyToTileCoords(n)}))},_initTile:function(n){G(n,"leaflet-tile");var r=this.getTileSize();n.style.width=r.x+"px",n.style.height=r.y+"px",n.onselectstart=P,n.onmousemove=P,Wn&&this.options.opacity<1&&tt(n,this.options.opacity),Bi&&!Ai&&(n.style.WebkitBackfaceVisibility="hidden")},_addTile:function(n,r){var s=this._getTilePos(n),u=this._tileCoordsToKey(n),h=this.createTile(this._wrapCoords(n),c(this._tileReady,this,n));this._initTile(h),this.createTile.length<2&&re(c(this._tileReady,this,n,null,h)),we(h,s),this._tiles[u]={el:h,coords:n,current:!0},r.appendChild(h),this.fire("tileloadstart",{tile:h,coords:n})},_tileReady:function(n,r,s){r&&this.fire("tileerror",{error:r,tile:s,coords:n});var u=this._tileCoordsToKey(n);s=this._tiles[u],s&&(s.loaded=+new Date,this._map._fadeAnimated?(tt(s.el,0),ye(this._fadeFrame),this._fadeFrame=re(this._updateOpacity,this)):(s.active=!0,this._pruneTiles()),r||(G(s.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:s.el,coords:n})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Wn||!this._map._fadeAnimated?re(this._pruneTiles,this):setTimeout(c(this._pruneTiles,this),250)))},_getTilePos:function(n){return n.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(n){var r=new T(this._wrapX?S(n.x,this._wrapX):n.x,this._wrapY?S(n.y,this._wrapY):n.y);return r.z=n.z,r},_pxBoundsToTileRange:function(n){var r=this.getTileSize();return new V(n.min.unscaleBy(r).floor(),n.max.unscaleBy(r).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var n in this._tiles)if(!this._tiles[n].loaded)return!1;return!0}});function Om(n){return new Ki(n)}var ni=Ki.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(n,r){this._url=n,r=C(this,r),r.detectRetina&&Qt&&r.maxZoom>0&&(r.tileSize=Math.floor(r.tileSize/2),r.zoomReverse?(r.zoomOffset--,r.minZoom++):(r.zoomOffset++,r.maxZoom--),r.minZoom=Math.max(0,r.minZoom)),typeof r.subdomains=="string"&&(r.subdomains=r.subdomains.split("")),Bi||this.on("tileunload",this._onTileRemove)},setUrl:function(n,r){return this._url===n&&r===void 0&&(r=!0),this._url=n,r||this.redraw(),this},createTile:function(n,r){var s=document.createElement("img");return Q(s,"load",c(this._tileOnLoad,this,r,s)),Q(s,"error",c(this._tileOnError,this,r,s)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(s.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),s.alt="",s.setAttribute("role","presentation"),s.src=this.getTileUrl(n),s},getTileUrl:function(n){var r={r:Qt?"@2x":"",s:this._getSubdomain(n),x:n.x,y:n.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var s=this._globalTileRange.max.y-n.y;this.options.tms&&(r.y=s),r["-y"]=s}return g(this._url,a(r,this.options))},_tileOnLoad:function(n,r){Wn?setTimeout(c(n,this,null,r),0):n(null,r)},_tileOnError:function(n,r,s){var u=this.options.errorTileUrl;u&&r.getAttribute("src")!==u&&(r.src=u),n(s,r)},_onTileRemove:function(n){n.tile.onload=null},_getZoomForUrl:function(){var n=this._tileZoom,r=this.options.maxZoom,s=this.options.zoomReverse,u=this.options.zoomOffset;return s&&(n=r-n),n+u},_getSubdomain:function(n){var r=Math.abs(n.x+n.y)%this.options.subdomains.length;return this.options.subdomains[r]},_abortLoading:function(){var n,r;for(n in this._tiles)this._tiles[n].coords.z!==this._tileZoom&&(r=this._tiles[n].el,r.onload=P,r.onerror=P,r.complete||(r.src=j,he(r),delete this._tiles[n]))},_removeTile:function(n){var r=this._tiles[n];if(r)return bu||r.el.setAttribute("src",j),Ki.prototype._removeTile.call(this,n)},_tileReady:function(n,r,s){if(!(!this._map||s&&s.getAttribute("src")===j))return Ki.prototype._tileReady.call(this,n,r,s)}});function Nc(n,r){return new ni(n,r)}var zc=ni.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(n,r){this._url=n;var s=a({},this.defaultWmsParams);for(var u in r)u in this.options||(s[u]=r[u]);r=C(this,r);var h=r.detectRetina&&Qt?2:1,p=this.getTileSize();s.width=p.x*h,s.height=p.y*h,this.wmsParams=s},onAdd:function(n){this._crs=this.options.crs||n.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var r=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[r]=this._crs.code,ni.prototype.onAdd.call(this,n)},getTileUrl:function(n){var r=this._tileCoordsToNwSe(n),s=this._crs,u=te(s.project(r[0]),s.project(r[1])),h=u.min,p=u.max,v=(this._wmsVersion>=1.3&&this._crs===Pc?[h.y,h.x,p.y,p.x]:[h.x,h.y,p.x,p.y]).join(","),x=ni.prototype.getTileUrl.call(this,n);return x+H(this.wmsParams,x,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+v},setParams:function(n,r){return a(this.wmsParams,n),r||this.redraw(),this}});function Im(n,r){return new zc(n,r)}ni.WMS=zc,Nc.wms=Im;var St=ht.extend({options:{padding:.1,tolerance:0},initialize:function(n){C(this,n),f(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&G(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 n={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(n.zoomanim=this._onAnimZoom),n},_onAnimZoom:function(n){this._updateTransform(n.center,n.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(n,r){var s=this._map.getZoomScale(r,this._zoom),u=Yt(this._container),h=this._map.getSize().multiplyBy(.5+this.options.padding),p=this._map.project(this._center,r),v=this._map.project(n,r),x=v.subtract(p),E=h.multiplyBy(-s).add(u).add(h).subtract(x);et?Pn(this._container,E,s):we(this._container,E)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var n in this._layers)this._layers[n]._reset()},_onZoomEnd:function(){for(var n in this._layers)this._layers[n]._project()},_updatePaths:function(){for(var n in this._layers)this._layers[n]._update()},_update:function(){var n=this.options.padding,r=this._map.getSize(),s=this._map.containerPointToLayerPoint(r.multiplyBy(-n)).round();this._bounds=new V(s,s.add(r.multiplyBy(1+n*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Mc=St.extend({getEvents:function(){var n=St.prototype.getEvents.call(this);return n.viewprereset=this._onViewPreReset,n},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){St.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var n=this._container=document.createElement("canvas");Q(n,"mousemove",this._onMouseMove,this),Q(n,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Q(n,"mouseout",this._handleMouseOut,this),this._ctx=n.getContext("2d")},_destroyContainer:function(){ye(this._redrawRequest),delete this._ctx,he(this._container),ve(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var n;this._redrawBounds=null;for(var r in this._layers)n=this._layers[r],n._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){St.prototype._update.call(this);var n=this._bounds,r=this._container,s=n.getSize(),u=Qt?2:1;we(r,n.min),r.width=u*s.x,r.height=u*s.y,r.style.width=s.x+"px",r.style.height=s.y+"px",Qt&&this._ctx.scale(2,2),this._ctx.translate(-n.min.x,-n.min.y),this.fire("update")}},_reset:function(){St.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(n){this._updateDashArray(n),this._layers[f(n)]=n;var r=n._order={layer:n,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=r),this._drawLast=r,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(n){this._requestRedraw(n)},_removePath:function(n){var r=n._order,s=r.next,u=r.prev;s?s.prev=u:this._drawLast=u,u?u.next=s:this._drawFirst=s,delete n._order,delete this._layers[f(n)],this._requestRedraw(n)},_updatePath:function(n){this._extendRedrawBounds(n),n._project(),n._update(),this._requestRedraw(n)},_updateStyle:function(n){this._updateDashArray(n),this._requestRedraw(n)},_updateDashArray:function(n){if(typeof n.options.dashArray=="string"){var r=n.options.dashArray.split(/[, ]+/),s=[],u,h;for(h=0;h')}}catch{return function(r){return document.createElement("<"+r+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),jm={_initContainer:function(){this._container=q("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(St.prototype._update.call(this),this.fire("update"))},_initPath:function(n){var r=n._container=Qi("shape");G(r,"leaflet-vml-shape "+(this.options.className||"")),r.coordsize="1 1",n._path=Qi("path"),r.appendChild(n._path),this._updateStyle(n),this._layers[f(n)]=n},_addPath:function(n){var r=n._container;this._container.appendChild(r),n.options.interactive&&n.addInteractiveTarget(r)},_removePath:function(n){var r=n._container;he(r),n.removeInteractiveTarget(r),delete this._layers[f(n)]},_updateStyle:function(n){var r=n._stroke,s=n._fill,u=n.options,h=n._container;h.stroked=!!u.stroke,h.filled=!!u.fill,u.stroke?(r||(r=n._stroke=Qi("stroke")),h.appendChild(r),r.weight=u.weight+"px",r.color=u.color,r.opacity=u.opacity,u.dashArray?r.dashStyle=w(u.dashArray)?u.dashArray.join(" "):u.dashArray.replace(/( *, *)/g," "):r.dashStyle="",r.endcap=u.lineCap.replace("butt","flat"),r.joinstyle=u.lineJoin):r&&(h.removeChild(r),n._stroke=null),u.fill?(s||(s=n._fill=Qi("fill")),h.appendChild(s),s.color=u.fillColor||u.color,s.opacity=u.fillOpacity):s&&(h.removeChild(s),n._fill=null)},_updateCircle:function(n){var r=n._point.round(),s=Math.round(n._radius),u=Math.round(n._radiusY||s);this._setPath(n,n._empty()?"M0 0":"AL "+r.x+","+r.y+" "+s+","+u+" 0,"+65535*360)},_setPath:function(n,r){n._path.v=r},_bringToFront:function(n){Kn(n._container)},_bringToBack:function(n){Qn(n._container)}},uo=Gr?Qi:Qu,Yi=St.extend({getEvents:function(){var n=St.prototype.getEvents.call(this);return n.zoomstart=this._onZoomStart,n},_initContainer:function(){this._container=uo("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=uo("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){he(this._container),ve(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){St.prototype._update.call(this);var n=this._bounds,r=n.getSize(),s=this._container;(!this._svgSize||!this._svgSize.equals(r))&&(this._svgSize=r,s.setAttribute("width",r.x),s.setAttribute("height",r.y)),we(s,n.min),s.setAttribute("viewBox",[n.min.x,n.min.y,r.x,r.y].join(" ")),this.fire("update")}},_initPath:function(n){var r=n._path=uo("path");n.options.className&&G(r,n.options.className),n.options.interactive&&G(r,"leaflet-interactive"),this._updateStyle(n),this._layers[f(n)]=n},_addPath:function(n){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(n._path),n.addInteractiveTarget(n._path)},_removePath:function(n){he(n._path),n.removeInteractiveTarget(n._path),delete this._layers[f(n)]},_updatePath:function(n){n._project(),n._update()},_updateStyle:function(n){var r=n._path,s=n.options;r&&(s.stroke?(r.setAttribute("stroke",s.color),r.setAttribute("stroke-opacity",s.opacity),r.setAttribute("stroke-width",s.weight),r.setAttribute("stroke-linecap",s.lineCap),r.setAttribute("stroke-linejoin",s.lineJoin),s.dashArray?r.setAttribute("stroke-dasharray",s.dashArray):r.removeAttribute("stroke-dasharray"),s.dashOffset?r.setAttribute("stroke-dashoffset",s.dashOffset):r.removeAttribute("stroke-dashoffset")):r.setAttribute("stroke","none"),s.fill?(r.setAttribute("fill",s.fillColor||s.color),r.setAttribute("fill-opacity",s.fillOpacity),r.setAttribute("fill-rule",s.fillRule||"evenodd")):r.setAttribute("fill","none"))},_updatePoly:function(n,r){this._setPath(n,Yu(n._parts,r))},_updateCircle:function(n){var r=n._point,s=Math.max(Math.round(n._radius),1),u=Math.max(Math.round(n._radiusY),1)||s,h="a"+s+","+u+" 0 1,0 ",p=n._empty()?"M0 0":"M"+(r.x-s)+","+r.y+h+s*2+",0 "+h+-s*2+",0 ";this._setPath(n,p)},_setPath:function(n,r){n._path.setAttribute("d",r)},_bringToFront:function(n){Kn(n._path)},_bringToBack:function(n){Qn(n._path)}});Gr&&Yi.include(jm);function Ic(n){return $r||Gr?new Yi(n):null}b.include({getRenderer:function(n){var r=n.options.renderer||this._getPaneRenderer(n.options.pane)||this.options.renderer||this._renderer;return r||(r=this._renderer=this._createRenderer()),this.hasLayer(r)||this.addLayer(r),r},_getPaneRenderer:function(n){if(n==="overlayPane"||n===void 0)return!1;var r=this._paneRenderers[n];return r===void 0&&(r=this._createRenderer({pane:n}),this._paneRenderers[n]=r),r},_createRenderer:function(n){return this.options.preferCanvas&&Oc(n)||Ic(n)}});var jc=qn.extend({initialize:function(n,r){qn.prototype.initialize.call(this,this._boundsToLatLngs(n),r)},setBounds:function(n){return this.setLatLngs(this._boundsToLatLngs(n))},_boundsToLatLngs:function(n){return n=oe(n),[n.getSouthWest(),n.getNorthWest(),n.getNorthEast(),n.getSouthEast()]}});function Rm(n,r){return new jc(n,r)}Yi.create=uo,Yi.pointsToPath=Yu,It.geometryToLayer=ga,It.coordsToLatLng=ya,It.coordsToLatLngs=oo,It.latLngToCoords=wa,It.latLngsToCoords=so,It.getFeature=Jn,It.asFeature=ao,b.mergeOptions({boxZoom:!0});var Rc=Pt.extend({initialize:function(n){this._map=n,this._container=n._container,this._pane=n._panes.overlayPane,this._resetStateTimeout=0,n.on("unload",this._destroy,this)},addHooks:function(){Q(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){ve(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){he(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(n){if(!n.shiftKey||n.which!==1&&n.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Fi(),ea(),this._startPoint=this._map.mouseEventToContainerPoint(n),Q(document,{contextmenu:zt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(n){this._moved||(this._moved=!0,this._box=q("div","leaflet-zoom-box",this._container),G(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(n);var r=new V(this._point,this._startPoint),s=r.getSize();we(this._box,r.min),this._box.style.width=s.x+"px",this._box.style.height=s.y+"px"},_finish:function(){this._moved&&(he(this._box),me(this._container,"leaflet-crosshair")),Ui(),ta(),ve(document,{contextmenu:zt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(n){if(!(n.which!==1&&n.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(c(this._resetState,this),0);var r=new ke(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(r).fire("boxzoomend",{boxZoomBounds:r})}},_onKeyDown:function(n){n.keyCode===27&&this._finish()}});b.addInitHook("addHandler","boxZoom",Rc),b.mergeOptions({doubleClickZoom:!0});var Bc=Pt.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(n){var r=this._map,s=r.getZoom(),u=r.options.zoomDelta,h=n.originalEvent.shiftKey?s-u:s+u;r.options.doubleClickZoom==="center"?r.setZoom(h):r.setZoomAround(n.containerPoint,h)}});b.addInitHook("addHandler","doubleClickZoom",Bc),b.mergeOptions({dragging:!0,inertia:!Ai,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Ac=Pt.extend({addHooks:function(){if(!this._draggable){var n=this._map;this._draggable=new kn(n._mapPane,n._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),n.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),n.on("zoomend",this._onZoomEnd,this),n.whenReady(this._onZoomEnd,this))}G(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){me(this._map._container,"leaflet-grab"),me(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 n=this._map;if(n._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var r=oe(this._map.options.maxBounds);this._offsetLimit=te(this._map.latLngToContainerPoint(r.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(r.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;n.fire("movestart").fire("dragstart"),n.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(n){if(this._map.options.inertia){var r=this._lastTime=+new Date,s=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(s),this._times.push(r),this._prunePositions(r)}this._map.fire("move",n).fire("drag",n)},_prunePositions:function(n){for(;this._positions.length>1&&n-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var n=this._map.getSize().divideBy(2),r=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=r.subtract(n).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(n,r){return n-(n-r)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var n=this._draggable._newPos.subtract(this._draggable._startPos),r=this._offsetLimit;n.xr.max.x&&(n.x=this._viscousLimit(n.x,r.max.x)),n.y>r.max.y&&(n.y=this._viscousLimit(n.y,r.max.y)),this._draggable._newPos=this._draggable._startPos.add(n)}},_onPreDragWrap:function(){var n=this._worldWidth,r=Math.round(n/2),s=this._initialWorldOffset,u=this._draggable._newPos.x,h=(u-r+s)%n+r-s,p=(u+r+s)%n-r-s,v=Math.abs(h+s)0?p:-p))-r;this._delta=0,this._startTime=null,v&&(n.options.scrollWheelZoom==="center"?n.setZoom(r+v):n.setZoomAround(this._lastMousePos,r+v))}});b.addInitHook("addHandler","scrollWheelZoom",Zc),b.mergeOptions({tap:!0,tapTolerance:15});var Fc=Pt.extend({addHooks:function(){Q(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){ve(this._map._container,"touchstart",this._onDown,this)},_onDown:function(n){if(n.touches){if(nt(n),this._fireClick=!0,n.touches.length>1){this._fireClick=!1,clearTimeout(this._holdTimeout);return}var r=n.touches[0],s=r.target;this._startPos=this._newPos=new T(r.clientX,r.clientY),s.tagName&&s.tagName.toLowerCase()==="a"&&G(s,"leaflet-active"),this._holdTimeout=setTimeout(c(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",r))},this),1e3),this._simulateEvent("mousedown",r),Q(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(n){if(clearTimeout(this._holdTimeout),ve(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&n&&n.changedTouches){var r=n.changedTouches[0],s=r.target;s&&s.tagName&&s.tagName.toLowerCase()==="a"&&me(s,"leaflet-active"),this._simulateEvent("mouseup",r),this._isTapValid()&&this._simulateEvent("click",r)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(n){var r=n.touches[0];this._newPos=new T(r.clientX,r.clientY),this._simulateEvent("mousemove",r)},_simulateEvent:function(n,r){var s=document.createEvent("MouseEvents");s._simulated=!0,r.target._simulatedClick=!0,s.initMouseEvent(n,!0,!0,window,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),r.target.dispatchEvent(s)}});wt&&(!yt||Vr)&&b.addInitHook("addHandler","tap",Fc),b.mergeOptions({touchZoom:wt&&!Ai,bounceAtZoomLimits:!0});var Uc=Pt.extend({addHooks:function(){G(this._map._container,"leaflet-touch-zoom"),Q(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){me(this._map._container,"leaflet-touch-zoom"),ve(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(n){var r=this._map;if(!(!n.touches||n.touches.length!==2||r._animatingZoom||this._zooming)){var s=r.mouseEventToContainerPoint(n.touches[0]),u=r.mouseEventToContainerPoint(n.touches[1]);this._centerPoint=r.getSize()._divideBy(2),this._startLatLng=r.containerPointToLatLng(this._centerPoint),r.options.touchZoom!=="center"&&(this._pinchStartLatLng=r.containerPointToLatLng(s.add(u)._divideBy(2))),this._startDist=s.distanceTo(u),this._startZoom=r.getZoom(),this._moved=!1,this._zooming=!0,r._stop(),Q(document,"touchmove",this._onTouchMove,this),Q(document,"touchend",this._onTouchEnd,this),nt(n)}},_onTouchMove:function(n){if(!(!n.touches||n.touches.length!==2||!this._zooming)){var r=this._map,s=r.mouseEventToContainerPoint(n.touches[0]),u=r.mouseEventToContainerPoint(n.touches[1]),h=s.distanceTo(u)/this._startDist;if(this._zoom=r.getScaleZoom(h,this._startZoom),!r.options.bounceAtZoomLimits&&(this._zoomr.getMaxZoom()&&h>1)&&(this._zoom=r._limitZoom(this._zoom)),r.options.touchZoom==="center"){if(this._center=this._startLatLng,h===1)return}else{var p=s._add(u)._divideBy(2)._subtract(this._centerPoint);if(h===1&&p.x===0&&p.y===0)return;this._center=r.unproject(r.project(this._pinchStartLatLng,this._zoom).subtract(p),this._zoom)}this._moved||(r._moveStart(!0,!1),this._moved=!0),ye(this._animRequest);var v=c(r._move,r,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=re(v,this,!0),nt(n)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,ye(this._animRequest),ve(document,"touchmove",this._onTouchMove,this),ve(document,"touchend",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))}});b.addInitHook("addHandler","touchZoom",Uc),b.BoxZoom=Rc,b.DoubleClickZoom=Bc,b.Drag=Ac,b.Keyboard=Dc,b.ScrollWheelZoom=Zc,b.Tap=Fc,b.TouchZoom=Uc,i.version=o,i.Control=ct,i.control=Vi,i.Browser=Wp,i.Evented=Nt,i.Mixin=am,i.Util=xn,i.Class=Je,i.Handler=Pt,i.extend=a,i.bind=c,i.stamp=f,i.setOptions=C,i.DomEvent=tm,i.DomUtil=Jp,i.PosAnimation=hc,i.Draggable=kn,i.LineUtil=fm,i.PolyUtil=dm,i.Point=T,i.point=R,i.Bounds=V,i.bounds=te,i.Transformation=Bs,i.transformation=Ri,i.Projection=pm,i.LatLng=ee,i.latLng=ne,i.LatLngBounds=ke,i.latLngBounds=oe,i.CRS=Ue,i.GeoJSON=It,i.geoJSON=Lc,i.geoJson=Lm,i.Layer=ht,i.LayerGroup=Yn,i.layerGroup=vm,i.FeatureGroup=bn,i.featureGroup=gm,i.ImageOverlay=lo,i.imageOverlay=Em,i.VideoOverlay=Ec,i.videoOverlay=Cm,i.SVGOverlay=Cc,i.svgOverlay=Tm,i.DivOverlay=jt,i.Popup=ei,i.popup=Nm,i.Tooltip=ti,i.tooltip=zm,i.Icon=Xn,i.icon=ym,i.DivIcon=Tc,i.divIcon=Mm,i.Marker=io,i.marker=wm,i.TileLayer=ni,i.tileLayer=Nc,i.GridLayer=Ki,i.gridLayer=Om,i.SVG=Yi,i.svg=Ic,i.Renderer=St,i.Canvas=Mc,i.canvas=Oc,i.Path=bt,i.CircleMarker=ro,i.circleMarker=xm,i.Circle=va,i.circle=Pm,i.Polyline=Ot,i.polyline=Sm,i.Polygon=qn,i.polygon=km,i.Rectangle=jc,i.rectangle=Rm,i.Map=b,i.map=nm;var Bm=window.L;i.noConflict=function(){return window.L=Bm,this},window.L=i})})(Kl,Kl.exports);var Ni=Kl.exports;function vy(e,t){const[i,o]=A.useState(null),a=A.useRef(!1);return A.useEffect(()=>{if(e.current!==null&&!a.current){const l=new Ni.Map(e.current,{center:{lat:52.3,lng:4.99},zoom:10}),c=new Ni.TileLayer("https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png",{attribution:'© OpenStreetMap contributors © CARTO'});l.addLayer(c),o(l),a.current=!0}},[e,t]),i}const gy=new Ni.Icon({iconUrl:"https://assets.htmlacademy.ru/content/intensive/javascript-1/demo/interactive-map/pin.svg",iconSize:[40,40],iconAnchor:[20,40]}),yy=new Ni.Icon({iconUrl:"https://assets.htmlacademy.ru/content/intensive/javascript-1/demo/interactive-map/main-pin.svg",iconSize:[40,40],iconAnchor:[20,40]});function Rp(e){const{offers:t,selectedPoint:i}=e,o=A.useRef(null),a=vy(o,"Амстердам");return A.useEffect(()=>{if(a){const l=Ni.layerGroup().addTo(a);return t.forEach(c=>{new Ni.Marker({lat:c.location.latitude,lng:c.location.longitude}).setIcon(i!==void 0&&c.title===i.title?yy:gy).addTo(l)}),()=>{a.removeLayer(l)}}},[a,t,i]),m.jsx("div",{style:{height:"100%"},ref:o})}const wy=({offers:e})=>m.jsxs("div",{className:"page page--gray page--main",children:[m.jsx("header",{className:"header",children:m.jsx("div",{className:"container",children:m.jsxs("div",{className:"header__wrapper",children:[m.jsx("div",{className:"header__left",children:m.jsx("a",{className:"header__logo-link header__logo-link--active",children:m.jsx("img",{className:"header__logo",src:"img/logo.svg",alt:"6 cities logo",width:"81",height:"41"})})}),m.jsx("nav",{className:"header__nav",children:m.jsxs("ul",{className:"header__nav-list",children:[m.jsx("li",{className:"header__nav-item user",children:m.jsxs("a",{className:"header__nav-link header__nav-link--profile",href:"#",children:[m.jsx("div",{className:"header__avatar-wrapper user__avatar-wrapper"}),m.jsx("span",{className:"header__user-name user__name",children:"nawwarkheder@gmail.com"}),m.jsx("span",{className:"header__favorite-count",children:"3"})]})}),m.jsx("li",{className:"header__nav-item",children:m.jsx("a",{className:"header__nav-link",href:"#",children:m.jsx("span",{className:"header__signout",children:"Sign out"})})})]})})]})})}),m.jsxs("main",{className:"page__main page__main--index",children:[m.jsx("h1",{className:"visually-hidden",children:"Cities"}),m.jsx("div",{className:"tabs",children:m.jsx("section",{className:"locations container",children:m.jsxs("ul",{className:"locations__list tabs__list",children:[m.jsx("li",{className:"locations__item",children:m.jsx("a",{className:"locations__item-link tabs__item",href:"#",children:m.jsx("span",{children:"Paris"})})}),m.jsx("li",{className:"locations__item",children:m.jsx("a",{className:"locations__item-link tabs__item",href:"#",children:m.jsx("span",{children:"Cologne"})})}),m.jsx("li",{className:"locations__item",children:m.jsx("a",{className:"locations__item-link tabs__item",href:"#",children:m.jsx("span",{children:"Brussels"})})}),m.jsx("li",{className:"locations__item",children:m.jsx("a",{className:"locations__item-link tabs__item tabs__item--active",children:m.jsx("span",{children:"Amsterdam"})})}),m.jsx("li",{className:"locations__item",children:m.jsx("a",{className:"locations__item-link tabs__item",href:"#",children:m.jsx("span",{children:"Hamburg"})})}),m.jsx("li",{className:"locations__item",children:m.jsx("a",{className:"locations__item-link tabs__item",href:"#",children:m.jsx("span",{children:"Dusseldorf"})})})]})})}),m.jsx("div",{className:"cities",children:m.jsxs("div",{className:"cities__places-container container",children:[m.jsxs("section",{className:"cities__places places",children:[m.jsx("h2",{className:"visually-hidden",children:"Places"}),m.jsxs("b",{className:"places__found",children:[e.length," places to stay in Amsterdam"]}),m.jsxs("form",{className:"places__sorting",action:"#",method:"get",children:[m.jsx("span",{className:"places__sorting-caption",children:"Sort by"}),m.jsxs("span",{className:"places__sorting-type",tabIndex:0,children:["Popular",m.jsx("svg",{className:"places__sorting-arrow",width:"7",height:"4",children:m.jsx("use",{xlinkHref:"#icon-arrow-select"})})]}),m.jsxs("ul",{className:"places__options places__options--custom places__options--opened",children:[m.jsx("li",{className:"places__option places__option--active",tabIndex:0,children:"Popular"}),m.jsx("li",{className:"places__option",tabIndex:0,children:"Price: low to high"}),m.jsx("li",{className:"places__option",tabIndex:0,children:"Price: high to low"}),m.jsx("li",{className:"places__option",tabIndex:0,children:"Top rated first"})]})]}),m.jsx("div",{className:"cities__places-list places__list tabs__content",children:m.jsx(jp,{offers:e})})]}),m.jsx("div",{className:"cities__right-section",children:m.jsx("section",{className:"cities__map map",children:m.jsx(Rp,{offers:e,selectedPoint:e[3]})})})]})})]})]}),xy=({offers:e})=>m.jsx("div",{className:"page",children:m.jsx("main",{className:"page__main page__main--favorites",children:m.jsx("div",{className:"page__favorites-container container",children:m.jsxs("section",{className:"favorites",children:[m.jsx("h1",{className:"favorites__title",children:"Saved listings"}),m.jsx("div",{className:"favorites__list",children:e.map(t=>m.jsx(Ip,{offer:t},t.id))})]})})})});function Py(){return m.jsxs("div",{className:"page page--gray page--login",children:[m.jsx("header",{className:"header",children:m.jsx("div",{className:"container",children:m.jsx("div",{className:"header__wrapper",children:m.jsx("div",{className:"header__left",children:m.jsx("a",{className:"header__logo-link",href:"main.html",children:m.jsx("img",{className:"header__logo",src:"img/logo.svg",alt:"6 cities logo",width:"81",height:"41"})})})})})}),m.jsx("main",{className:"page__main page__main--login",children:m.jsxs("div",{className:"page__login-container container",children:[m.jsxs("section",{className:"login",children:[m.jsx("h1",{className:"login__title",children:"Sign in"}),m.jsxs("form",{className:"login__form form",action:"#",method:"post",children:[m.jsxs("div",{className:"login__input-wrapper form__input-wrapper",children:[m.jsx("label",{className:"visually-hidden",children:"E-mail"}),m.jsx("input",{className:"login__input form__input",type:"email",name:"email",placeholder:"Email",required:!0})]}),m.jsxs("div",{className:"login__input-wrapper form__input-wrapper",children:[m.jsx("label",{className:"visually-hidden",children:"Password"}),m.jsx("input",{className:"login__input form__input",type:"password",name:"password",placeholder:"Password",required:!0})]}),m.jsx("button",{className:"login__submit form__submit button",type:"submit",children:"Sign in"})]})]}),m.jsx("section",{className:"locations locations--login locations--current",children:m.jsx("div",{className:"locations__item",children:m.jsx("a",{className:"locations__item-link",href:"#",children:m.jsx("span",{children:"Amsterdam"})})})})]})})]})}const Sy=()=>{const[e,t]=A.useState(0),[i,o]=A.useState(""),a=c=>{c.preventDefault()},l=[5,4,3,2,1];return m.jsxs("form",{className:"reviews__form form",onSubmit:a,children:[m.jsx("label",{className:"reviews__label form__label",htmlFor:"review",children:"Your review"}),m.jsx("div",{className:"reviews__rating-form form__rating",children:l.map(c=>m.jsxs(Jl.Fragment,{children:[m.jsx("input",{className:"form__rating-input visually-hidden",name:"rating",value:c,id:`${c}-stars`,type:"radio",onChange:()=>t(c)}),m.jsx("label",{htmlFor:`${c}-stars`,className:"reviews__rating-label form__rating-label",title:`${c} stars`,children:m.jsx("svg",{className:"form__star-image",width:"37",height:"33",children:m.jsx("use",{xlinkHref:"#icon-star"})})})]},c))}),m.jsx("textarea",{className:"reviews__textarea form__textarea",id:"review",name:"review",placeholder:"Tell how was your stay, what you like and what can be improved",value:i,onChange:c=>o(c.target.value)}),m.jsxs("div",{className:"reviews__button-wrapper",children:[m.jsxs("p",{className:"reviews__help",children:["To submit review please make sure to set ",m.jsx("span",{className:"reviews__star",children:"rating"})," and describe your stay with at least ",m.jsx("b",{className:"reviews__text-amount",children:"10 characters"}),"."]}),m.jsx("button",{className:"reviews__submit form__submit button",type:"submit",disabled:i.length<10||e===0,children:"Submit"})]})]})};var Bp={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(e){(function(){var t={}.hasOwnProperty;function i(){for(var o=[],a=0;a{const a=t==="full";return m.jsxs("div",{className:Ql(i,"rating"),children:[m.jsxs("div",{className:Ql(o,"rating__stars"),children:[m.jsx("span",{style:{width:`${20*Math.trunc(e)}%`}}),m.jsxs("span",{className:"visually-hidden",children:["Rating ",e]})]}),!!a&&m.jsx("span",{className:"offer__rating-value rating__value",children:e})]})},Ey=e=>new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit"}).format(e),Cy=e=>new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"long"}).format(e),Ty=({text:e,date:t,rating:i,userName:o,userAvatarSrc:a})=>m.jsxs("li",{className:"reviews__item",children:[m.jsxs("div",{className:"reviews__user user",children:[m.jsx("div",{className:"reviews__avatar-wrapper user__avatar-wrapper",children:m.jsx("img",{className:"reviews__avatar user__avatar",src:a,width:"54",height:"54",alt:"Reviews avatar"})}),m.jsx("span",{className:"reviews__user-name",children:o})]}),m.jsxs("div",{className:"reviews__info",children:[m.jsx(Ly,{rating:i,containerMix:"reviews__rating",starsMix:"reviews__stars",mode:"compact"}),m.jsx("p",{className:"reviews__text",children:e}),m.jsx("time",{className:"reviews__time",dateTime:Ey(t),children:Cy(t)})]})]}),Ny=({reviews:e,containerMix:t})=>m.jsxs("section",{className:Ql("reviews",t),children:[m.jsxs("h2",{className:"reviews__title",children:["Reviews · ",m.jsx("span",{className:"reviews__amount",children:e.length})]}),m.jsx("ul",{className:"reviews__list",children:e.map(i=>m.jsx(Ty,{...i},i.date.toString()))})]}),ms=[{id:1,title:"Luxury Apartment in Downtown",price:250,rating:4.9,type:"Apartment",isPremium:!0,previewImage:"img/apartment-01.jpg",NumberOfPlaces:1,latitude:52.3909553943508,longitude:4.85309666406198},{id:2,title:"Cozy House in Suburbs",price:100,rating:4.7,type:"House",isPremium:!1,previewImage:"img/apartment-02.jpg",NumberOfPlaces:1,latitude:52.3609553943508,longitude:4.85309666406198},{id:3,title:"Stylish Studio in City Center",price:150,rating:4.8,type:"Studio",isPremium:!1,previewImage:"img/studio-01.jpg",NumberOfPlaces:1,latitude:52.3909553943508,longitude:4.929309666406198},{id:4,title:"Modern Loft with River View",price:200,rating:5,type:"Loft",isPremium:!0,previewImage:"img/studio-01.jpg",NumberOfPlaces:1,latitude:52.3809553943508,longitude:4.939309666406198}],zy=()=>m.jsxs("section",{className:"near-places places",children:[m.jsx("h2",{className:"near-places__title",children:"Other places in the neighbourhood"}),m.jsx(jp,{offers:ms.slice(0,3)})]});function My(){return m.jsxs("div",{className:"page",children:[m.jsx("header",{className:"header",children:m.jsx("div",{className:"container",children:m.jsxs("div",{className:"header__wrapper",children:[m.jsx("div",{className:"header__left",children:m.jsx("a",{className:"header__logo-link",href:"main.html",children:m.jsx("img",{className:"header__logo",src:"img/logo.svg",alt:"6 cities logo",width:"81",height:"41"})})}),m.jsx("nav",{className:"header__nav",children:m.jsxs("ul",{className:"header__nav-list",children:[m.jsx("li",{className:"header__nav-item user",children:m.jsxs("a",{className:"header__nav-link header__nav-link--profile",href:"#",children:[m.jsx("div",{className:"header__avatar-wrapper user__avatar-wrapper"}),m.jsx("span",{className:"header__user-name user__name",children:"Oliver.conner@gmail.com"}),m.jsx("span",{className:"header__favorite-count",children:"3"})]})}),m.jsx("li",{className:"header__nav-item",children:m.jsx("a",{className:"header__nav-link",href:"#",children:m.jsx("span",{className:"header__signout",children:"Sign out"})})})]})})]})})}),m.jsxs("main",{className:"page__main page__main--offer",children:[m.jsxs("section",{className:"offer",children:[m.jsx("div",{className:"offer__gallery-container container",children:m.jsxs("div",{className:"offer__gallery",children:[m.jsx("div",{className:"offer__image-wrapper",children:m.jsx("img",{className:"offer__image",src:"img/room.jpg",alt:"Photo studio"})}),m.jsx("div",{className:"offer__image-wrapper",children:m.jsx("img",{className:"offer__image",src:"img/apartment-01.jpg",alt:"Photo studio"})}),m.jsx("div",{className:"offer__image-wrapper",children:m.jsx("img",{className:"offer__image",src:"img/apartment-02.jpg",alt:"Photo studio"})}),m.jsx("div",{className:"offer__image-wrapper",children:m.jsx("img",{className:"offer__image",src:"img/apartment-03.jpg",alt:"Photo studio"})}),m.jsx("div",{className:"offer__image-wrapper",children:m.jsx("img",{className:"offer__image",src:"img/studio-01.jpg",alt:"Photo studio"})}),m.jsx("div",{className:"offer__image-wrapper",children:m.jsx("img",{className:"offer__image",src:"img/apartment-01.jpg",alt:"Photo studio"})})]})}),m.jsx("div",{className:"offer__container container",children:m.jsxs("div",{className:"offer__wrapper",children:[m.jsx("div",{className:"offer__mark",children:m.jsx("span",{children:"Premium"})}),m.jsxs("div",{className:"offer__name-wrapper",children:[m.jsx("h1",{className:"offer__name",children:"Beautiful & luxurious studio at great location"}),m.jsxs("button",{className:"offer__bookmark-button button",type:"button",children:[m.jsx("svg",{className:"offer__bookmark-icon",width:"31",height:"33",children:m.jsx("use",{xlinkHref:"#icon-bookmark"})}),m.jsx("span",{className:"visually-hidden",children:"To bookmarks"})]})]}),m.jsxs("div",{className:"offer__rating rating",children:[m.jsxs("div",{className:"offer__stars rating__stars",children:[m.jsx("span",{style:{width:"80%"}}),m.jsx("span",{className:"visually-hidden",children:"Rating"})]}),m.jsx("span",{className:"offer__rating-value rating__value",children:"4.8"})]}),m.jsxs("ul",{className:"offer__features",children:[m.jsx("li",{className:"offer__feature offer__feature--entire",children:"Apartment"}),m.jsx("li",{className:"offer__feature offer__feature--bedrooms",children:"3 Bedrooms"}),m.jsx("li",{className:"offer__feature offer__feature--adults",children:"Max 4 adults"})]}),m.jsxs("div",{className:"offer__price",children:[m.jsx("b",{className:"offer__price-value",children:"€120"}),m.jsx("span",{className:"offer__price-text",children:" night"})]}),m.jsxs("div",{className:"offer__inside",children:[m.jsx("h2",{className:"offer__inside-title",children:"What's inside"}),m.jsxs("ul",{className:"offer__inside-list",children:[m.jsx("li",{className:"offer__inside-item",children:"Wi-Fi"}),m.jsx("li",{className:"offer__inside-item",children:"Washing machine"}),m.jsx("li",{className:"offer__inside-item",children:"Towels"}),m.jsx("li",{className:"offer__inside-item",children:"Heating"}),m.jsx("li",{className:"offer__inside-item",children:"Coffee machine"}),m.jsx("li",{className:"offer__inside-item",children:"Baby seat"}),m.jsx("li",{className:"offer__inside-item",children:"Kitchen"}),m.jsx("li",{className:"offer__inside-item",children:"Dishwasher"}),m.jsx("li",{className:"offer__inside-item",children:"Cabel TV"}),m.jsx("li",{className:"offer__inside-item",children:"Fridge"})]})]}),m.jsxs("div",{className:"offer__host",children:[m.jsx("h2",{className:"offer__host-title",children:"Meet the host"}),m.jsxs("div",{className:"offer__host-user user",children:[m.jsx("div",{className:"offer__avatar-wrapper offer__avatar-wrapper--pro user__avatar-wrapper",children:m.jsx("img",{className:"offer__avatar user__avatar",src:"img/avatar-angelina.jpg",width:"74",height:"74",alt:"Host avatar"})}),m.jsx("span",{className:"offer__user-name",children:"Angelina"}),m.jsx("span",{className:"offer__user-status",children:"Pro"})]}),m.jsxs("div",{className:"offer__description",children:[m.jsx("p",{className:"offer__text",children:"A quiet cozy and picturesque that hides behind a a river by the unique lightness of Amsterdam. The building is green and from 18th century."}),m.jsx("p",{className:"offer__text",children:"An independent House, strategically located between Rembrand Square and National Opera, but where the bustle of the city comes to rest in this alley flowery and colorful."})]})]}),m.jsx(Ny,{reviews:[{userName:"Max",userAvatarSrc:"img/avatar-max.jpg",rating:3,text:"A quiet cozy and picturesque that hides behind a a river by the unique lightness of Amsterdam. The building is green and from 18th century.",date:new Date("2024-04-24")}],containerMix:"offer__reviews"})]})}),m.jsx("section",{className:"offer__map map",children:m.jsx(Rp,{offers:[...ms.slice(0,3)],selectedPoint:ms[2]})})]}),m.jsx("div",{className:"container",children:m.jsx(zy,{})}),m.jsxs("div",{children:[m.jsx("h2",{className:"reviews__title",children:"Reviews"}),m.jsx(Sy,{})," "]})]})]})}function Oy({offers:e}){return m.jsx(dy,{children:m.jsxs(ay,{children:[m.jsx(lr,{path:"/",element:m.jsx(wy,{offers:e})}),m.jsx(lr,{path:"/login",element:m.jsx(Py,{})}),m.jsx(lr,{path:"/offer/:id",element:m.jsx(My,{})}),m.jsx(lr,{path:"/favorites",element:m.jsx(xy,{offers:e})})]})})}const Iy=Xa.createRoot(document.getElementById("root"));Iy.render(m.jsx(Jl.StrictMode,{children:m.jsx(Oy,{offers:ms})})); +*/(function(e){(function(){var t={}.hasOwnProperty;function i(){for(var o=[],a=0;a{const a=t==="full";return m.jsxs("div",{className:Ql(i,"rating"),children:[m.jsxs("div",{className:Ql(o,"rating__stars"),children:[m.jsx("span",{style:{width:`${20*Math.trunc(e)}%`}}),m.jsxs("span",{className:"visually-hidden",children:["Rating ",e]})]}),!!a&&m.jsx("span",{className:"offer__rating-value rating__value",children:e})]})},Ey=e=>new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit"}).format(e),Cy=e=>new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"long"}).format(e),Ty=({comment:e,date:t,rating:i,user:o})=>m.jsxs("li",{className:"reviews__item",children:[m.jsxs("div",{className:"reviews__user user",children:[m.jsx("div",{className:"reviews__avatar-wrapper user__avatar-wrapper",children:m.jsx("img",{className:"reviews__avatar user__avatar",src:o.avatarUrl,width:"54",height:"54",alt:"Reviews avatar"})}),m.jsx("span",{className:"reviews__user-name",children:o.name})]}),m.jsxs("div",{className:"reviews__info",children:[m.jsx(Ly,{rating:i,containerMix:"reviews__rating",starsMix:"reviews__stars",mode:"compact"}),m.jsx("p",{className:"reviews__text",children:e}),m.jsx("time",{className:"reviews__time",dateTime:Ey(t),children:Cy(t)})]})]}),Ny=({reviews:e,containerMix:t})=>m.jsxs("section",{className:Ql("reviews",t),children:[m.jsxs("h2",{className:"reviews__title",children:["Reviews · ",m.jsx("span",{className:"reviews__amount",children:e.length})]}),m.jsx("ul",{className:"reviews__list",children:e.map(i=>m.jsx(Ty,{...i},i.date.toString()))})]}),ms=[{id:1,title:"Luxury Apartment in Downtown",price:250,rating:4.9,type:"Apartment",isPremium:!0,previewImage:"img/apartment-01.jpg",NumberOfPlaces:1,location:{latitude:52.3909553943508,longitude:4.85309666406198,zoom:0},city:{name:"Amsterdam",location:{latitude:52.35514938496378,longitude:4.673877537499948,zoom:8}},isFavorite:!1},{id:2,title:"Cozy House in Suburbs",price:100,rating:4.7,type:"House",isPremium:!1,previewImage:"img/apartment-02.jpg",NumberOfPlaces:1,location:{latitude:52.3609553943508,longitude:4.85309666406198,zoom:0},city:{name:"Amsterdam",location:{latitude:52.35514938496378,longitude:4.673877537499948,zoom:8}},isFavorite:!1},{id:3,title:"Stylish Studio in City Center",price:150,rating:4.8,type:"Studio",isPremium:!1,previewImage:"img/studio-01.jpg",NumberOfPlaces:1,location:{latitude:52.3909553943508,longitude:4.929309666406198,zoom:0},city:{name:"Amsterdam",location:{latitude:52.35514938496378,longitude:4.673877537499948,zoom:8}},isFavorite:!1},{id:4,title:"Modern Loft with River View",price:200,rating:5,type:"Loft",isPremium:!0,previewImage:"img/studio-01.jpg",NumberOfPlaces:1,location:{latitude:52.3809553943508,longitude:4.939309666406198,zoom:0},city:{name:"Amsterdam",location:{latitude:52.35514938496378,longitude:4.673877537499948,zoom:8}},isFavorite:!1}],zy=()=>m.jsxs("section",{className:"near-places places",children:[m.jsx("h2",{className:"near-places__title",children:"Other places in the neighbourhood"}),m.jsx(jp,{offers:ms.slice(0,3)})]});function My(){return m.jsxs("div",{className:"page",children:[m.jsx("header",{className:"header",children:m.jsx("div",{className:"container",children:m.jsxs("div",{className:"header__wrapper",children:[m.jsx("div",{className:"header__left",children:m.jsx("a",{className:"header__logo-link",href:"main.html",children:m.jsx("img",{className:"header__logo",src:"img/logo.svg",alt:"6 cities logo",width:"81",height:"41"})})}),m.jsx("nav",{className:"header__nav",children:m.jsxs("ul",{className:"header__nav-list",children:[m.jsx("li",{className:"header__nav-item user",children:m.jsxs("a",{className:"header__nav-link header__nav-link--profile",href:"#",children:[m.jsx("div",{className:"header__avatar-wrapper user__avatar-wrapper"}),m.jsx("span",{className:"header__user-name user__name",children:"Oliver.conner@gmail.com"}),m.jsx("span",{className:"header__favorite-count",children:"3"})]})}),m.jsx("li",{className:"header__nav-item",children:m.jsx("a",{className:"header__nav-link",href:"#",children:m.jsx("span",{className:"header__signout",children:"Sign out"})})})]})})]})})}),m.jsxs("main",{className:"page__main page__main--offer",children:[m.jsxs("section",{className:"offer",children:[m.jsx("div",{className:"offer__gallery-container container",children:m.jsxs("div",{className:"offer__gallery",children:[m.jsx("div",{className:"offer__image-wrapper",children:m.jsx("img",{className:"offer__image",src:"img/room.jpg",alt:"Photo studio"})}),m.jsx("div",{className:"offer__image-wrapper",children:m.jsx("img",{className:"offer__image",src:"img/apartment-01.jpg",alt:"Photo studio"})}),m.jsx("div",{className:"offer__image-wrapper",children:m.jsx("img",{className:"offer__image",src:"img/apartment-02.jpg",alt:"Photo studio"})}),m.jsx("div",{className:"offer__image-wrapper",children:m.jsx("img",{className:"offer__image",src:"img/apartment-03.jpg",alt:"Photo studio"})}),m.jsx("div",{className:"offer__image-wrapper",children:m.jsx("img",{className:"offer__image",src:"img/studio-01.jpg",alt:"Photo studio"})}),m.jsx("div",{className:"offer__image-wrapper",children:m.jsx("img",{className:"offer__image",src:"img/apartment-01.jpg",alt:"Photo studio"})})]})}),m.jsx("div",{className:"offer__container container",children:m.jsxs("div",{className:"offer__wrapper",children:[m.jsx("div",{className:"offer__mark",children:m.jsx("span",{children:"Premium"})}),m.jsxs("div",{className:"offer__name-wrapper",children:[m.jsx("h1",{className:"offer__name",children:"Beautiful & luxurious studio at great location"}),m.jsxs("button",{className:"offer__bookmark-button button",type:"button",children:[m.jsx("svg",{className:"offer__bookmark-icon",width:"31",height:"33",children:m.jsx("use",{xlinkHref:"#icon-bookmark"})}),m.jsx("span",{className:"visually-hidden",children:"To bookmarks"})]})]}),m.jsxs("div",{className:"offer__rating rating",children:[m.jsxs("div",{className:"offer__stars rating__stars",children:[m.jsx("span",{style:{width:"80%"}}),m.jsx("span",{className:"visually-hidden",children:"Rating"})]}),m.jsx("span",{className:"offer__rating-value rating__value",children:"4.8"})]}),m.jsxs("ul",{className:"offer__features",children:[m.jsx("li",{className:"offer__feature offer__feature--entire",children:"Apartment"}),m.jsx("li",{className:"offer__feature offer__feature--bedrooms",children:"3 Bedrooms"}),m.jsx("li",{className:"offer__feature offer__feature--adults",children:"Max 4 adults"})]}),m.jsxs("div",{className:"offer__price",children:[m.jsx("b",{className:"offer__price-value",children:"€120"}),m.jsx("span",{className:"offer__price-text",children:" night"})]}),m.jsxs("div",{className:"offer__inside",children:[m.jsx("h2",{className:"offer__inside-title",children:"What's inside"}),m.jsxs("ul",{className:"offer__inside-list",children:[m.jsx("li",{className:"offer__inside-item",children:"Wi-Fi"}),m.jsx("li",{className:"offer__inside-item",children:"Washing machine"}),m.jsx("li",{className:"offer__inside-item",children:"Towels"}),m.jsx("li",{className:"offer__inside-item",children:"Heating"}),m.jsx("li",{className:"offer__inside-item",children:"Coffee machine"}),m.jsx("li",{className:"offer__inside-item",children:"Baby seat"}),m.jsx("li",{className:"offer__inside-item",children:"Kitchen"}),m.jsx("li",{className:"offer__inside-item",children:"Dishwasher"}),m.jsx("li",{className:"offer__inside-item",children:"Cabel TV"}),m.jsx("li",{className:"offer__inside-item",children:"Fridge"})]})]}),m.jsxs("div",{className:"offer__host",children:[m.jsx("h2",{className:"offer__host-title",children:"Meet the host"}),m.jsxs("div",{className:"offer__host-user user",children:[m.jsx("div",{className:"offer__avatar-wrapper offer__avatar-wrapper--pro user__avatar-wrapper",children:m.jsx("img",{className:"offer__avatar user__avatar",src:"img/avatar-angelina.jpg",width:"74",height:"74",alt:"Host avatar"})}),m.jsx("span",{className:"offer__user-name",children:"Angelina"}),m.jsx("span",{className:"offer__user-status",children:"Pro"})]}),m.jsxs("div",{className:"offer__description",children:[m.jsx("p",{className:"offer__text",children:"A quiet cozy and picturesque that hides behind a a river by the unique lightness of Amsterdam. The building is green and from 18th century."}),m.jsx("p",{className:"offer__text",children:"An independent House, strategically located between Rembrand Square and National Opera, but where the bustle of the city comes to rest in this alley flowery and colorful."})]})]}),m.jsx(Ny,{reviews:[{id:"1",user:{name:"Max",avatarUrl:"img/avatar-max.jpg",isPro:!1},rating:3,comment:"A quiet cozy and picturesque that hides behind a a river by the unique lightness of Amsterdam. The building is green and from 18th century.",date:new Date("2024-04-24")}],containerMix:"offer__reviews"})]})}),m.jsx("section",{className:"offer__map map",children:m.jsx(Rp,{offers:[...ms.slice(0,3)],selectedPoint:ms[2]})})]}),m.jsx("div",{className:"container",children:m.jsx(zy,{})}),m.jsxs("div",{children:[m.jsx("h2",{className:"reviews__title",children:"Reviews"}),m.jsx(Sy,{})," "]})]})]})}function Oy({offers:e}){return m.jsx(dy,{children:m.jsxs(ay,{children:[m.jsx(lr,{path:"/",element:m.jsx(wy,{offers:e})}),m.jsx(lr,{path:"/login",element:m.jsx(Py,{})}),m.jsx(lr,{path:"/offer/:id",element:m.jsx(My,{})}),m.jsx(lr,{path:"/favorites",element:m.jsx(xy,{offers:e})})]})})}const Iy=Xa.createRoot(document.getElementById("root"));Iy.render(m.jsx(Jl.StrictMode,{children:m.jsx(Oy,{offers:ms})})); diff --git a/7/index.html b/7/index.html index c7c7a4b..5cf9e05 100644 --- a/7/index.html +++ b/7/index.html @@ -7,7 +7,7 @@ 6 cities - +